diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php new file mode 100644 index 0000000..622e774 --- /dev/null +++ b/app/Console/Kernel.php @@ -0,0 +1,40 @@ +command('inspire') + // ->hourly(); + } + + /** + * Register the Closure based commands for the application. + * + * @return void + */ + protected function commands() + { + require base_path('routes/console.php'); + } +} diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php new file mode 100644 index 0000000..a747e31 --- /dev/null +++ b/app/Exceptions/Handler.php @@ -0,0 +1,65 @@ +expectsJson()) { + return response()->json(['error' => 'Unauthenticated.'], 401); + } + + return redirect()->guest(route('login')); + } +} diff --git a/app/Http/Controllers/Auth/ForgotPasswordController.php b/app/Http/Controllers/Auth/ForgotPasswordController.php new file mode 100644 index 0000000..6a247fe --- /dev/null +++ b/app/Http/Controllers/Auth/ForgotPasswordController.php @@ -0,0 +1,32 @@ +middleware('guest'); + } +} diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php new file mode 100644 index 0000000..b2ea669 --- /dev/null +++ b/app/Http/Controllers/Auth/LoginController.php @@ -0,0 +1,39 @@ +middleware('guest')->except('logout'); + } +} diff --git a/app/Http/Controllers/Auth/RegisterController.php b/app/Http/Controllers/Auth/RegisterController.php new file mode 100644 index 0000000..ed8d1b7 --- /dev/null +++ b/app/Http/Controllers/Auth/RegisterController.php @@ -0,0 +1,71 @@ +middleware('guest'); + } + + /** + * Get a validator for an incoming registration request. + * + * @param array $data + * @return \Illuminate\Contracts\Validation\Validator + */ + protected function validator(array $data) + { + return Validator::make($data, [ + 'name' => 'required|string|max:255', + 'email' => 'required|string|email|max:255|unique:users', + 'password' => 'required|string|min:6|confirmed', + ]); + } + + /** + * Create a new user instance after a valid registration. + * + * @param array $data + * @return User + */ + protected function create(array $data) + { + return User::create([ + 'name' => $data['name'], + 'email' => $data['email'], + 'password' => bcrypt($data['password']), + ]); + } +} diff --git a/app/Http/Controllers/Auth/ResetPasswordController.php b/app/Http/Controllers/Auth/ResetPasswordController.php new file mode 100644 index 0000000..cf726ee --- /dev/null +++ b/app/Http/Controllers/Auth/ResetPasswordController.php @@ -0,0 +1,39 @@ +middleware('guest'); + } +} diff --git a/app/Http/Controllers/Controller.php b/app/Http/Controllers/Controller.php new file mode 100644 index 0000000..03e02a2 --- /dev/null +++ b/app/Http/Controllers/Controller.php @@ -0,0 +1,13 @@ + [ + \App\Http\Middleware\EncryptCookies::class, + \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, + \Illuminate\Session\Middleware\StartSession::class, + // \Illuminate\Session\Middleware\AuthenticateSession::class, + \Illuminate\View\Middleware\ShareErrorsFromSession::class, + \App\Http\Middleware\VerifyCsrfToken::class, + \Illuminate\Routing\Middleware\SubstituteBindings::class, + ], + + 'api' => [ + 'throttle:60,1', + 'bindings', + ], + ]; + + /** + * The application's route middleware. + * + * These middleware may be assigned to groups or used individually. + * + * @var array + */ + protected $routeMiddleware = [ + 'auth' => \Illuminate\Auth\Middleware\Authenticate::class, + 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, + 'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class, + 'can' => \Illuminate\Auth\Middleware\Authorize::class, + 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, + 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, + ]; +} diff --git a/app/Http/Middleware/EncryptCookies.php b/app/Http/Middleware/EncryptCookies.php new file mode 100644 index 0000000..3aa15f8 --- /dev/null +++ b/app/Http/Middleware/EncryptCookies.php @@ -0,0 +1,17 @@ +check()) { + return redirect('/home'); + } + + return $next($request); + } +} diff --git a/app/Http/Middleware/TrimStrings.php b/app/Http/Middleware/TrimStrings.php new file mode 100644 index 0000000..943e9a4 --- /dev/null +++ b/app/Http/Middleware/TrimStrings.php @@ -0,0 +1,18 @@ + 'App\Policies\ModelPolicy', + ]; + + /** + * Register any authentication / authorization services. + * + * @return void + */ + public function boot() + { + $this->registerPolicies(); + + // + } +} diff --git a/app/Providers/BroadcastServiceProvider.php b/app/Providers/BroadcastServiceProvider.php new file mode 100644 index 0000000..352cce4 --- /dev/null +++ b/app/Providers/BroadcastServiceProvider.php @@ -0,0 +1,21 @@ + [ + 'App\Listeners\EventListener', + ], + ]; + + /** + * Register any events for your application. + * + * @return void + */ + public function boot() + { + parent::boot(); + + // + } +} diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php new file mode 100644 index 0000000..5ea48d3 --- /dev/null +++ b/app/Providers/RouteServiceProvider.php @@ -0,0 +1,73 @@ +mapApiRoutes(); + + $this->mapWebRoutes(); + + // + } + + /** + * Define the "web" routes for the application. + * + * These routes all receive session state, CSRF protection, etc. + * + * @return void + */ + protected function mapWebRoutes() + { + Route::middleware('web') + ->namespace($this->namespace) + ->group(base_path('routes/web.php')); + } + + /** + * Define the "api" routes for the application. + * + * These routes are typically stateless. + * + * @return void + */ + protected function mapApiRoutes() + { + Route::prefix('api') + ->middleware('api') + ->namespace($this->namespace) + ->group(base_path('routes/api.php')); + } +} diff --git a/app/User.php b/app/User.php new file mode 100644 index 0000000..bfd96a6 --- /dev/null +++ b/app/User.php @@ -0,0 +1,29 @@ +make(Illuminate\Contracts\Console\Kernel::class); + +$status = $kernel->handle( + $input = new Symfony\Component\Console\Input\ArgvInput, + new Symfony\Component\Console\Output\ConsoleOutput +); + +/* +|-------------------------------------------------------------------------- +| Shutdown The Application +|-------------------------------------------------------------------------- +| +| Once Artisan has finished running. We will fire off the shutdown events +| so that any final work may be done by the application before we shut +| down the process. This is the last thing to happen to the request. +| +*/ + +$kernel->terminate($input, $status); + +exit($status); diff --git a/bootstrap/app.php b/bootstrap/app.php new file mode 100644 index 0000000..f2801ad --- /dev/null +++ b/bootstrap/app.php @@ -0,0 +1,55 @@ +singleton( + Illuminate\Contracts\Http\Kernel::class, + App\Http\Kernel::class +); + +$app->singleton( + Illuminate\Contracts\Console\Kernel::class, + App\Console\Kernel::class +); + +$app->singleton( + Illuminate\Contracts\Debug\ExceptionHandler::class, + App\Exceptions\Handler::class +); + +/* +|-------------------------------------------------------------------------- +| Return The Application +|-------------------------------------------------------------------------- +| +| This script returns the application instance. The instance is given to +| the calling script so we can separate the building of the instances +| from the actual running of the application and sending responses. +| +*/ + +return $app; diff --git a/bootstrap/autoload.php b/bootstrap/autoload.php new file mode 100644 index 0000000..94adc99 --- /dev/null +++ b/bootstrap/autoload.php @@ -0,0 +1,17 @@ +=5.6.4", + "laravel/framework": "5.4.*", + "laravel/tinker": "~1.0" + }, + "require-dev": { + "fzaninotto/faker": "~1.4", + "mockery/mockery": "0.9.*", + "phpunit/phpunit": "~5.7" + }, + "autoload": { + "classmap": [ + "database" + ], + "psr-4": { + "App\\": "app/" + } + }, + "autoload-dev": { + "psr-4": { + "Tests\\": "tests/" + } + }, + "scripts": { + "post-root-package-install": [ + "php -r \"file_exists('.env') || copy('.env.example', '.env');\"" + ], + "post-create-project-cmd": [ + "php artisan key:generate" + ], + "post-install-cmd": [ + "Illuminate\\Foundation\\ComposerScripts::postInstall", + "php artisan optimize" + ], + "post-update-cmd": [ + "Illuminate\\Foundation\\ComposerScripts::postUpdate", + "php artisan optimize" + ] + }, + "config": { + "preferred-install": "dist", + "sort-packages": true, + "optimize-autoloader": true + } +} diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000..870d4bb --- /dev/null +++ b/composer.lock @@ -0,0 +1,3348 @@ +{ + "_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" + ], + "content-hash": "96098e473b028cdb2529580554a1ae3e", + "packages": [ + { + "name": "dnoegel/php-xdg-base-dir", + "version": "0.1", + "source": { + "type": "git", + "url": "https://github.com/dnoegel/php-xdg-base-dir.git", + "reference": "265b8593498b997dc2d31e75b89f053b5cc9621a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dnoegel/php-xdg-base-dir/zipball/265b8593498b997dc2d31e75b89f053b5cc9621a", + "reference": "265b8593498b997dc2d31e75b89f053b5cc9621a", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "require-dev": { + "phpunit/phpunit": "@stable" + }, + "type": "project", + "autoload": { + "psr-4": { + "XdgBaseDir\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "implementation of xdg base directory specification for php", + "time": "2014-10-24T07:27:01+00:00" + }, + { + "name": "doctrine/inflector", + "version": "v1.1.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.*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" + } + }, + "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" + ], + "time": "2015-11-06T14:35:42+00:00" + }, + { + "name": "erusev/parsedown", + "version": "1.6.2", + "source": { + "type": "git", + "url": "https://github.com/erusev/parsedown.git", + "reference": "1bf24f7334fe16c88bf9d467863309ceaf285b01" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/erusev/parsedown/zipball/1bf24f7334fe16c88bf9d467863309ceaf285b01", + "reference": "1bf24f7334fe16c88bf9d467863309ceaf285b01", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "autoload": { + "psr-0": { + "Parsedown": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Emanuil Rusev", + "email": "hello@erusev.com", + "homepage": "http://erusev.com" + } + ], + "description": "Parser for Markdown.", + "homepage": "http://parsedown.org", + "keywords": [ + "markdown", + "parser" + ], + "time": "2017-03-29T16:04:15+00:00" + }, + { + "name": "jakub-onderka/php-console-color", + "version": "0.1", + "source": { + "type": "git", + "url": "https://github.com/JakubOnderka/PHP-Console-Color.git", + "reference": "e0b393dacf7703fc36a4efc3df1435485197e6c1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/JakubOnderka/PHP-Console-Color/zipball/e0b393dacf7703fc36a4efc3df1435485197e6c1", + "reference": "e0b393dacf7703fc36a4efc3df1435485197e6c1", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "require-dev": { + "jakub-onderka/php-code-style": "1.0", + "jakub-onderka/php-parallel-lint": "0.*", + "jakub-onderka/php-var-dump-check": "0.*", + "phpunit/phpunit": "3.7.*", + "squizlabs/php_codesniffer": "1.*" + }, + "type": "library", + "autoload": { + "psr-0": { + "JakubOnderka\\PhpConsoleColor": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-2-Clause" + ], + "authors": [ + { + "name": "Jakub Onderka", + "email": "jakub.onderka@gmail.com", + "homepage": "http://www.acci.cz" + } + ], + "time": "2014-04-08T15:00:19+00:00" + }, + { + "name": "jakub-onderka/php-console-highlighter", + "version": "v0.3.2", + "source": { + "type": "git", + "url": "https://github.com/JakubOnderka/PHP-Console-Highlighter.git", + "reference": "7daa75df45242c8d5b75a22c00a201e7954e4fb5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/JakubOnderka/PHP-Console-Highlighter/zipball/7daa75df45242c8d5b75a22c00a201e7954e4fb5", + "reference": "7daa75df45242c8d5b75a22c00a201e7954e4fb5", + "shasum": "" + }, + "require": { + "jakub-onderka/php-console-color": "~0.1", + "php": ">=5.3.0" + }, + "require-dev": { + "jakub-onderka/php-code-style": "~1.0", + "jakub-onderka/php-parallel-lint": "~0.5", + "jakub-onderka/php-var-dump-check": "~0.1", + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "~1.5" + }, + "type": "library", + "autoload": { + "psr-0": { + "JakubOnderka\\PhpConsoleHighlighter": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jakub Onderka", + "email": "acci@acci.cz", + "homepage": "http://www.acci.cz/" + } + ], + "time": "2015-04-20T18:58:01+00:00" + }, + { + "name": "laravel/framework", + "version": "v5.4.19", + "source": { + "type": "git", + "url": "https://github.com/laravel/framework.git", + "reference": "02444b7450350db17a7607c8a52f7268ebdb0dad" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/framework/zipball/02444b7450350db17a7607c8a52f7268ebdb0dad", + "reference": "02444b7450350db17a7607c8a52f7268ebdb0dad", + "shasum": "" + }, + "require": { + "doctrine/inflector": "~1.0", + "erusev/parsedown": "~1.6", + "ext-mbstring": "*", + "ext-openssl": "*", + "league/flysystem": "~1.0", + "monolog/monolog": "~1.11", + "mtdowling/cron-expression": "~1.0", + "nesbot/carbon": "~1.20", + "paragonie/random_compat": "~1.4|~2.0", + "php": ">=5.6.4", + "ramsey/uuid": "~3.0", + "swiftmailer/swiftmailer": "~5.4", + "symfony/console": "~3.2", + "symfony/debug": "~3.2", + "symfony/finder": "~3.2", + "symfony/http-foundation": "~3.2", + "symfony/http-kernel": "~3.2", + "symfony/process": "~3.2", + "symfony/routing": "~3.2", + "symfony/var-dumper": "~3.2", + "tijsverkoyen/css-to-inline-styles": "~2.2", + "vlucas/phpdotenv": "~2.2" + }, + "replace": { + "illuminate/auth": "self.version", + "illuminate/broadcasting": "self.version", + "illuminate/bus": "self.version", + "illuminate/cache": "self.version", + "illuminate/config": "self.version", + "illuminate/console": "self.version", + "illuminate/container": "self.version", + "illuminate/contracts": "self.version", + "illuminate/cookie": "self.version", + "illuminate/database": "self.version", + "illuminate/encryption": "self.version", + "illuminate/events": "self.version", + "illuminate/exception": "self.version", + "illuminate/filesystem": "self.version", + "illuminate/hashing": "self.version", + "illuminate/http": "self.version", + "illuminate/log": "self.version", + "illuminate/mail": "self.version", + "illuminate/notifications": "self.version", + "illuminate/pagination": "self.version", + "illuminate/pipeline": "self.version", + "illuminate/queue": "self.version", + "illuminate/redis": "self.version", + "illuminate/routing": "self.version", + "illuminate/session": "self.version", + "illuminate/support": "self.version", + "illuminate/translation": "self.version", + "illuminate/validation": "self.version", + "illuminate/view": "self.version", + "tightenco/collect": "self.version" + }, + "require-dev": { + "aws/aws-sdk-php": "~3.0", + "doctrine/dbal": "~2.5", + "mockery/mockery": "~0.9.4", + "pda/pheanstalk": "~3.0", + "phpunit/phpunit": "~5.7", + "predis/predis": "~1.0", + "symfony/css-selector": "~3.2", + "symfony/dom-crawler": "~3.2" + }, + "suggest": { + "aws/aws-sdk-php": "Required to use the SQS queue driver and SES mail driver (~3.0).", + "doctrine/dbal": "Required to rename columns and drop SQLite columns (~2.5).", + "fzaninotto/faker": "Required to use the eloquent factory builder (~1.4).", + "guzzlehttp/guzzle": "Required to use the Mailgun and Mandrill mail drivers and the ping methods on schedules (~6.0).", + "laravel/tinker": "Required to use the tinker console command (~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).", + "nexmo/client": "Required to use the Nexmo transport (~1.0).", + "pda/pheanstalk": "Required to use the beanstalk queue driver (~3.0).", + "predis/predis": "Required to use the redis cache and queue drivers (~1.0).", + "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (~2.0).", + "symfony/css-selector": "Required to use some of the crawler integration testing tools (~3.2).", + "symfony/dom-crawler": "Required to use most of the crawler integration testing tools (~3.2).", + "symfony/psr-http-message-bridge": "Required to psr7 bridging features (0.2.*)." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.4-dev" + } + }, + "autoload": { + "files": [ + "src/Illuminate/Foundation/helpers.php", + "src/Illuminate/Support/helpers.php" + ], + "psr-4": { + "Illuminate\\": "src/Illuminate/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Laravel Framework.", + "homepage": "https://laravel.com", + "keywords": [ + "framework", + "laravel" + ], + "time": "2017-04-16T13:33:34+00:00" + }, + { + "name": "laravel/tinker", + "version": "v1.0.0", + "source": { + "type": "git", + "url": "https://github.com/laravel/tinker.git", + "reference": "3d5b675b55b24ccbf86395964042dbe061d5a965" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/tinker/zipball/3d5b675b55b24ccbf86395964042dbe061d5a965", + "reference": "3d5b675b55b24ccbf86395964042dbe061d5a965", + "shasum": "" + }, + "require": { + "illuminate/console": "~5.1", + "illuminate/contracts": "~5.1", + "illuminate/support": "~5.1", + "php": ">=5.5.9", + "psy/psysh": "0.7.*|0.8.*", + "symfony/var-dumper": "~3.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.0|~5.0" + }, + "suggest": { + "illuminate/database": "The Illuminate Database package (~5.1)." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "Laravel\\Tinker\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "Powerful REPL for the Laravel framework.", + "keywords": [ + "REPL", + "Tinker", + "laravel", + "psysh" + ], + "time": "2016-12-30T18:13:17+00:00" + }, + { + "name": "league/flysystem", + "version": "1.0.38", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/flysystem.git", + "reference": "4ba6e13f5116204b21c3afdf400ecf2b9eb1c482" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/4ba6e13f5116204b21c3afdf400ecf2b9eb1c482", + "reference": "4ba6e13f5116204b21c3afdf400ecf2b9eb1c482", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "conflict": { + "league/flysystem-sftp": "<1.0.6" + }, + "require-dev": { + "ext-fileinfo": "*", + "mockery/mockery": "~0.9", + "phpspec/phpspec": "^2.2", + "phpunit/phpunit": "~4.8" + }, + "suggest": { + "ext-fileinfo": "Required for MimeType", + "league/flysystem-aws-s3-v2": "Allows you to use S3 storage with AWS SDK v2", + "league/flysystem-aws-s3-v3": "Allows you to use S3 storage with AWS SDK v3", + "league/flysystem-azure": "Allows you to use Windows Azure Blob storage", + "league/flysystem-cached-adapter": "Flysystem adapter decorator for metadata caching", + "league/flysystem-copy": "Allows you to use Copy.com storage", + "league/flysystem-eventable-filesystem": "Allows you to use EventableFilesystem", + "league/flysystem-rackspace": "Allows you to use Rackspace Cloud Files", + "league/flysystem-sftp": "Allows you to use SFTP server storage via phpseclib", + "league/flysystem-webdav": "Allows you to use WebDAV storage", + "league/flysystem-ziparchive": "Allows you to use ZipArchive adapter", + "spatie/flysystem-dropbox": "Allows you to use Dropbox storage" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Flysystem\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frenky.net" + } + ], + "description": "Filesystem abstraction: Many filesystems, one API.", + "keywords": [ + "Cloud Files", + "WebDAV", + "abstraction", + "aws", + "cloud", + "copy.com", + "dropbox", + "file systems", + "files", + "filesystem", + "filesystems", + "ftp", + "rackspace", + "remote", + "s3", + "sftp", + "storage" + ], + "time": "2017-04-22T18:59:19+00:00" + }, + { + "name": "monolog/monolog", + "version": "1.22.1", + "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" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "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" + ], + "time": "2017-03-13T07:08:03+00:00" + }, + { + "name": "mtdowling/cron-expression", + "version": "v1.2.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" + }, + "type": "library", + "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" + ], + "time": "2017-01-23T04:29:33+00:00" + }, + { + "name": "nesbot/carbon", + "version": "1.22.1", + "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" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.23-dev" + } + }, + "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" + ], + "time": "2017-01-16T07:55:07+00:00" + }, + { + "name": "nikic/php-parser", + "version": "v3.0.5", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "2b9e2f71b722f7c53918ab0c25f7646c2013f17d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/2b9e2f71b722f7c53918ab0c25f7646c2013f17d", + "reference": "2b9e2f71b722f7c53918ab0c25f7646c2013f17d", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=5.5" + }, + "require-dev": { + "phpunit/phpunit": "~4.0|~5.0" + }, + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], + "time": "2017-03-05T18:23:57+00:00" + }, + { + "name": "paragonie/random_compat", + "version": "v2.0.10", + "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." + }, + "type": "library", + "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" + ], + "time": "2017-03-13T16:27:32+00:00" + }, + { + "name": "psr/log", + "version": "1.0.2", + "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" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "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" + ], + "time": "2016-10-10T12:19:37+00:00" + }, + { + "name": "psy/psysh", + "version": "v0.8.3", + "source": { + "type": "git", + "url": "https://github.com/bobthecow/psysh.git", + "reference": "1dd4bbbc64d71e7ec075ffe82b42d9e096dc8d5e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/1dd4bbbc64d71e7ec075ffe82b42d9e096dc8d5e", + "reference": "1dd4bbbc64d71e7ec075ffe82b42d9e096dc8d5e", + "shasum": "" + }, + "require": { + "dnoegel/php-xdg-base-dir": "0.1", + "jakub-onderka/php-console-highlighter": "0.3.*", + "nikic/php-parser": "~1.3|~2.0|~3.0", + "php": ">=5.3.9", + "symfony/console": "~2.3.10|^2.4.2|~3.0", + "symfony/var-dumper": "~2.7|~3.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "~1.11", + "hoa/console": "~3.16|~1.14", + "phpunit/phpunit": "~4.4|~5.0", + "symfony/finder": "~2.1|~3.0" + }, + "suggest": { + "ext-pcntl": "Enabling the PCNTL extension makes PsySH a lot happier :)", + "ext-pdo-sqlite": "The doc command requires SQLite to work.", + "ext-posix": "If you have PCNTL, you'll want the POSIX extension as well.", + "ext-readline": "Enables support for arrow-key history navigation, and showing and manipulating command history.", + "hoa/console": "A pure PHP readline implementation. You'll want this if your PHP install doesn't already support readline or libedit." + }, + "bin": [ + "bin/psysh" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-develop": "0.9.x-dev" + } + }, + "autoload": { + "files": [ + "src/Psy/functions.php" + ], + "psr-4": { + "Psy\\": "src/Psy/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Justin Hileman", + "email": "justin@justinhileman.info", + "homepage": "http://justinhileman.com" + } + ], + "description": "An interactive shell for modern PHP.", + "homepage": "http://psysh.org", + "keywords": [ + "REPL", + "console", + "interactive", + "shell" + ], + "time": "2017-03-19T21:40:44+00:00" + }, + { + "name": "ramsey/uuid", + "version": "3.6.1", + "source": { + "type": "git", + "url": "https://github.com/ramsey/uuid.git", + "reference": "4ae32dd9ab8860a4bbd750ad269cba7f06f7934e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/4ae32dd9ab8860a4bbd750ad269cba7f06f7934e", + "reference": "4ae32dd9ab8860a4bbd750ad269cba7f06f7934e", + "shasum": "" + }, + "require": { + "paragonie/random_compat": "^1.0|^2.0", + "php": "^5.4 || ^7.0" + }, + "replace": { + "rhumsaa/uuid": "self.version" + }, + "require-dev": { + "apigen/apigen": "^4.1", + "codeception/aspect-mock": "^1.0 | ^2.0", + "doctrine/annotations": "~1.2.0", + "goaop/framework": "1.0.0-alpha.2 | ^1.0 | ^2.1", + "ircmaxell/random-lib": "^1.1", + "jakub-onderka/php-parallel-lint": "^0.9.0", + "mockery/mockery": "^0.9.4", + "moontoast/math": "^1.1", + "php-mock/php-mock-phpunit": "^0.3|^1.1", + "phpunit/phpunit": "^4.7|>=5.0 <5.4", + "satooshi/php-coveralls": "^0.6.1", + "squizlabs/php_codesniffer": "^2.3" + }, + "suggest": { + "ext-libsodium": "Provides the PECL libsodium extension for use with the SodiumRandomGenerator", + "ext-uuid": "Provides the PECL UUID extension for use with the PeclUuidTimeGenerator and PeclUuidRandomGenerator", + "ircmaxell/random-lib": "Provides RandomLib for use with the RandomLibAdapter", + "moontoast/math": "Provides support for converting UUID to 128-bit integer (in string form).", + "ramsey/uuid-console": "A console application for generating UUIDs with ramsey/uuid", + "ramsey/uuid-doctrine": "Allows the use of Ramsey\\Uuid\\Uuid as Doctrine field type." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Ramsey\\Uuid\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marijn Huizendveld", + "email": "marijn.huizendveld@gmail.com" + }, + { + "name": "Thibaud Fabre", + "email": "thibaud@aztech.io" + }, + { + "name": "Ben Ramsey", + "email": "ben@benramsey.com", + "homepage": "https://benramsey.com" + } + ], + "description": "Formerly rhumsaa/uuid. A PHP 5.4+ library for generating RFC 4122 version 1, 3, 4, and 5 universally unique identifiers (UUID).", + "homepage": "https://github.com/ramsey/uuid", + "keywords": [ + "guid", + "identifier", + "uuid" + ], + "time": "2017-03-26T20:37:53+00:00" + }, + { + "name": "swiftmailer/swiftmailer", + "version": "v5.4.7", + "source": { + "type": "git", + "url": "https://github.com/swiftmailer/swiftmailer.git", + "reference": "56db4ed32a6d5c9824c3ecc1d2e538f663f47eb4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/56db4ed32a6d5c9824c3ecc1d2e538f663f47eb4", + "reference": "56db4ed32a6d5c9824c3ecc1d2e538f663f47eb4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "mockery/mockery": "~0.9.1", + "symfony/phpunit-bridge": "~3.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.4-dev" + } + }, + "autoload": { + "files": [ + "lib/swift_required.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Chris Corbyn" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Swiftmailer, free feature-rich PHP mailer", + "homepage": "http://swiftmailer.org", + "keywords": [ + "email", + "mail", + "mailer" + ], + "time": "2017-04-20T17:32:18+00:00" + }, + { + "name": "symfony/console", + "version": "v3.2.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "c30243cc51f726812be3551316b109a2f5deaf8d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/c30243cc51f726812be3551316b109a2f5deaf8d", + "reference": "c30243cc51f726812be3551316b109a2f5deaf8d", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "symfony/debug": "~2.8|~3.0", + "symfony/polyfill-mbstring": "~1.0" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/event-dispatcher": "~2.8|~3.0", + "symfony/filesystem": "~2.8|~3.0", + "symfony/process": "~2.8|~3.0" + }, + "suggest": { + "psr/log": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/filesystem": "", + "symfony/process": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "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", + "time": "2017-04-04T14:33:42+00:00" + }, + { + "name": "symfony/css-selector", + "version": "v3.2.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/css-selector.git", + "reference": "a48f13dc83c168f1253a5d2a5a4fb46c36244c4c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/a48f13dc83c168f1253a5d2a5a4fb46c36244c4c", + "reference": "a48f13dc83c168f1253a5d2a5a4fb46c36244c4c", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\CssSelector\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jean-François Simon", + "email": "jeanfrancois.simon@sensiolabs.com" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony CssSelector Component", + "homepage": "https://symfony.com", + "time": "2017-02-21T09:12:04+00:00" + }, + { + "name": "symfony/debug", + "version": "v3.2.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/debug.git", + "reference": "56f613406446a4a0a031475cfd0a01751de22659" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/debug/zipball/56f613406446a4a0a031475cfd0a01751de22659", + "reference": "56f613406446a4a0a031475cfd0a01751de22659", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "psr/log": "~1.0" + }, + "conflict": { + "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" + }, + "require-dev": { + "symfony/class-loader": "~2.8|~3.0", + "symfony/http-kernel": "~2.8|~3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Debug\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Debug Component", + "homepage": "https://symfony.com", + "time": "2017-03-28T21:38:24+00:00" + }, + { + "name": "symfony/event-dispatcher", + "version": "v3.2.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "154bb1ef7b0e42ccc792bd53edbce18ed73440ca" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/154bb1ef7b0e42ccc792bd53edbce18ed73440ca", + "reference": "154bb1ef7b0e42ccc792bd53edbce18ed73440ca", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~2.8|~3.0", + "symfony/dependency-injection": "~2.8|~3.0", + "symfony/expression-language": "~2.8|~3.0", + "symfony/stopwatch": "~2.8|~3.0" + }, + "suggest": { + "symfony/dependency-injection": "", + "symfony/http-kernel": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "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", + "time": "2017-04-04T07:26:27+00:00" + }, + { + "name": "symfony/finder", + "version": "v3.2.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "b20900ce5ea164cd9314af52725b0bb5a758217a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/b20900ce5ea164cd9314af52725b0bb5a758217a", + "reference": "b20900ce5ea164cd9314af52725b0bb5a758217a", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "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", + "time": "2017-03-20T09:32:19+00:00" + }, + { + "name": "symfony/http-foundation", + "version": "v3.2.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-foundation.git", + "reference": "cb0b6418f588952c9290b3df4ca650f1b7ab570a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/cb0b6418f588952c9290b3df4ca650f1b7ab570a", + "reference": "cb0b6418f588952c9290b3df4ca650f1b7ab570a", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "symfony/polyfill-mbstring": "~1.1" + }, + "require-dev": { + "symfony/expression-language": "~2.8|~3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "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", + "time": "2017-04-04T15:30:56+00:00" + }, + { + "name": "symfony/http-kernel", + "version": "v3.2.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-kernel.git", + "reference": "8285ab5faf1306b1a5ebcf287fe91c231a6de88e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/8285ab5faf1306b1a5ebcf287fe91c231a6de88e", + "reference": "8285ab5faf1306b1a5ebcf287fe91c231a6de88e", + "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": "~2.8.13|~3.1.6|~3.2" + }, + "conflict": { + "symfony/config": "<2.8" + }, + "require-dev": { + "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": "~2.8|~3.0", + "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.2" + }, + "suggest": { + "symfony/browser-kit": "", + "symfony/class-loader": "", + "symfony/config": "", + "symfony/console": "", + "symfony/dependency-injection": "", + "symfony/finder": "", + "symfony/var-dumper": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "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", + "time": "2017-04-05T12:52:03+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.3.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" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "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" + ], + "time": "2016-11-14T01:06:16+00:00" + }, + { + "name": "symfony/process", + "version": "v3.2.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "57fdaa55827ae14d617550ebe71a820f0a5e2282" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/57fdaa55827ae14d617550ebe71a820f0a5e2282", + "reference": "57fdaa55827ae14d617550ebe71a820f0a5e2282", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "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", + "time": "2017-03-27T18:07:02+00:00" + }, + { + "name": "symfony/routing", + "version": "v3.2.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/routing.git", + "reference": "d6605f9a5767bc5bc4895e1c762ba93964608aee" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/routing/zipball/d6605f9a5767bc5bc4895e1c762ba93964608aee", + "reference": "d6605f9a5767bc5bc4895e1c762ba93964608aee", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "conflict": { + "symfony/config": "<2.8" + }, + "require-dev": { + "doctrine/annotations": "~1.0", + "doctrine/common": "~2.2", + "psr/log": "~1.0", + "symfony/config": "~2.8|~3.0", + "symfony/expression-language": "~2.8|~3.0", + "symfony/http-foundation": "~2.8|~3.0", + "symfony/yaml": "~2.8|~3.0" + }, + "suggest": { + "doctrine/annotations": "For using the annotation loader", + "symfony/config": "For using the all-in-one router or any loader", + "symfony/dependency-injection": "For loading routes from a service", + "symfony/expression-language": "For using expression matching", + "symfony/http-foundation": "For using a Symfony Request object", + "symfony/yaml": "For using the YAML loader" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Routing\\": "" + }, + "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 Routing Component", + "homepage": "https://symfony.com", + "keywords": [ + "router", + "routing", + "uri", + "url" + ], + "time": "2017-03-02T15:58:09+00:00" + }, + { + "name": "symfony/translation", + "version": "v3.2.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/translation.git", + "reference": "c740eee70783d2af4d3d6b70d5146f209e6b4d13" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/translation/zipball/c740eee70783d2af4d3d6b70d5146f209e6b4d13", + "reference": "c740eee70783d2af4d3d6b70d5146f209e6b4d13", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/config": "<2.8" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~2.8|~3.0", + "symfony/intl": "^2.8.18|^3.2.5", + "symfony/yaml": "~2.8|~3.0" + }, + "suggest": { + "psr/log": "To use logging capability in translator", + "symfony/config": "", + "symfony/yaml": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Translation\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Translation Component", + "homepage": "https://symfony.com", + "time": "2017-03-21T21:44:32+00:00" + }, + { + "name": "symfony/var-dumper", + "version": "v3.2.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/var-dumper.git", + "reference": "81dce20f69a8b40427e1f4e6462178df87cafc03" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/81dce20f69a8b40427e1f4e6462178df87cafc03", + "reference": "81dce20f69a8b40427e1f4e6462178df87cafc03", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0" + }, + "require-dev": { + "twig/twig": "~1.20|~2.0" + }, + "suggest": { + "ext-symfony_debug": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "autoload": { + "files": [ + "Resources/functions/dump.php" + ], + "psr-4": { + "Symfony\\Component\\VarDumper\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "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 mechanism for exploring and dumping PHP variables", + "homepage": "https://symfony.com", + "keywords": [ + "debug", + "dump" + ], + "time": "2017-03-12T16:07:05+00:00" + }, + { + "name": "tijsverkoyen/css-to-inline-styles", + "version": "2.2.0", + "source": { + "type": "git", + "url": "https://github.com/tijsverkoyen/CssToInlineStyles.git", + "reference": "ab03919dfd85a74ae0372f8baf9f3c7d5c03b04b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/tijsverkoyen/CssToInlineStyles/zipball/ab03919dfd85a74ae0372f8baf9f3c7d5c03b04b", + "reference": "ab03919dfd85a74ae0372f8baf9f3c7d5c03b04b", + "shasum": "" + }, + "require": { + "php": "^5.5 || ^7", + "symfony/css-selector": "^2.7|~3.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.8|5.1.*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "TijsVerkoyen\\CssToInlineStyles\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Tijs Verkoyen", + "email": "css_to_inline_styles@verkoyen.eu", + "role": "Developer" + } + ], + "description": "CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very useful when you're sending emails.", + "homepage": "https://github.com/tijsverkoyen/CssToInlineStyles", + "time": "2016-09-20T12:50:39+00:00" + }, + { + "name": "vlucas/phpdotenv", + "version": "v2.4.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" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.4-dev" + } + }, + "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" + ], + "time": "2016-09-01T10:05:43+00:00" + } + ], + "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-14T21:17:01+00:00" + }, + { + "name": "fzaninotto/faker", + "version": "v1.6.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" + }, + "type": "library", + "extra": { + "branch-alias": [] + }, + "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" + ], + "time": "2016-04-29T12:21:54+00:00" + }, + { + "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-11T14:41:42+00:00" + }, + { + "name": "mockery/mockery", + "version": "0.9.9", + "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" + }, + "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": "2017-02-28T12:52:32+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.6.1", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "8e6e04167378abf1ddb4d3522d8755c5fd90d102" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/8e6e04167378abf1ddb4d3522d8755c5fd90d102", + "reference": "8e6e04167378abf1ddb4d3522d8755c5fd90d102", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "require-dev": { + "doctrine/collections": "1.*", + "phpunit/phpunit": "~4.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "homepage": "https://github.com/myclabs/DeepCopy", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "time": "2017-04-12T18:52:22+00:00" + }, + { + "name": "phpdocumentor/reflection-common", + "version": "1.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/144c307535e82c8fdcaacbcfc1d6d8eeb896687c", + "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c", + "shasum": "" + }, + "require": { + "php": ">=5.5" + }, + "require-dev": { + "phpunit/phpunit": "^4.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "time": "2015-12-27T11:43:31+00:00" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "3.1.1", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/8331b5efe816ae05461b7ca1e721c01b46bafb3e", + "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e", + "shasum": "" + }, + "require": { + "php": ">=5.5", + "phpdocumentor/reflection-common": "^1.0@dev", + "phpdocumentor/type-resolver": "^0.2.0", + "webmozart/assert": "^1.0" + }, + "require-dev": { + "mockery/mockery": "^0.9.4", + "phpunit/phpunit": "^4.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "time": "2016-09-30T07:12:33+00:00" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "0.2.1", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb", + "reference": "e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb", + "shasum": "" + }, + "require": { + "php": ">=5.5", + "phpdocumentor/reflection-common": "^1.0" + }, + "require-dev": { + "mockery/mockery": "^0.9.4", + "phpunit/phpunit": "^5.2||^4.8.24" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "time": "2016-11-25T06:54:22+00:00" + }, + { + "name": "phpspec/prophecy", + "version": "v1.7.0", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "93d39f1f7f9326d746203c7c056f300f7f126073" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/93d39f1f7f9326d746203c7c056f300f7f126073", + "reference": "93d39f1f7f9326d746203c7c056f300f7f126073", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "php": "^5.3|^7.0", + "phpdocumentor/reflection-docblock": "^2.0|^3.0.2", + "sebastian/comparator": "^1.1|^2.0", + "sebastian/recursion-context": "^1.0|^2.0|^3.0" + }, + "require-dev": { + "phpspec/phpspec": "^2.5|^3.2", + "phpunit/phpunit": "^4.8 || ^5.6.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.6.x-dev" + } + }, + "autoload": { + "psr-0": { + "Prophecy\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" + } + ], + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "https://github.com/phpspec/prophecy", + "keywords": [ + "Double", + "Dummy", + "fake", + "mock", + "spy", + "stub" + ], + "time": "2017-03-02T20:05:34+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "4.0.8", + "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" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0.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": "2017-04-02T07:44:40+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "1.4.2", + "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" + }, + "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": "2016-10-03T07:40:28+00:00" + }, + { + "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-21T13:50:34+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "1.0.9", + "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" + }, + "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": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "time": "2017-02-26T11:10:40+00:00" + }, + { + "name": "phpunit/php-token-stream", + "version": "1.4.11", + "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" + }, + "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": "2017-02-27T10:12:30+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "5.7.19", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "69c4f49ff376af2692bad9cebd883d17ebaa98a1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/69c4f49ff376af2692bad9cebd883d17ebaa98a1", + "reference": "69c4f49ff376af2692bad9cebd883d17ebaa98a1", + "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.2", + "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" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.7.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": "2017-04-03T02:22:27+00:00" + }, + { + "name": "phpunit/phpunit-mock-objects", + "version": "3.4.3", + "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": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2.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": "2016-12-08T20:27:08+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", + "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7 || ^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "time": "2017-03-04T06:30:41+00:00" + }, + { + "name": "sebastian/comparator", + "version": "1.2.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", + "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "sebastian/diff": "~1.2", + "sebastian/exporter": "~1.2 || ~2.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" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "http://www.github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "time": "2017-01-29T09:50:25+00:00" + }, + { + "name": "sebastian/diff", + "version": "1.4.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/13edfd8706462032c2f52b4b862974dd46b71c9e", + "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.8" + }, + "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": "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" + ], + "time": "2015-12-08T07:14:41+00:00" + }, + { + "name": "sebastian/environment", + "version": "2.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" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "time": "2016-11-26T07:53:53+00:00" + }, + { + "name": "sebastian/exporter", + "version": "2.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" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "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": "2016-11-19T08:54:04+00:00" + }, + { + "name": "sebastian/global-state", + "version": "1.1.1", + "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": "*" + }, + "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": "2015-10-12T03:26:01+00:00" + }, + { + "name": "sebastian/object-enumerator", + "version": "2.0.1", + "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" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "time": "2017-02-18T15:18:39+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/2c3ba150cbec723aa057506e73a8d33bdb286c9a", + "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "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": "2016-11-19T07:33:16+00:00" + }, + { + "name": "sebastian/resource-operations", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", + "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", + "shasum": "" + }, + "require": { + "php": ">=5.6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "time": "2015-07-28T20:34:47+00:00" + }, + { + "name": "sebastian/version", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "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": "2016-10-03T07:35:21+00:00" + }, + { + "name": "symfony/yaml", + "version": "v3.2.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "62b4cdb99d52cb1ff253c465eb1532a80cebb621" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/62b4cdb99d52cb1ff253c465eb1532a80cebb621", + "reference": "62b4cdb99d52cb1ff253c465eb1532a80cebb621", + "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" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "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", + "time": "2017-03-20T09:45:15+00:00" + }, + { + "name": "webmozart/assert", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/webmozart/assert.git", + "reference": "2db61e59ff05fe5126d152bd0655c9ea113e550f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozart/assert/zipball/2db61e59ff05fe5126d152bd0655c9ea113e550f", + "reference": "2db61e59ff05fe5126d152bd0655c9ea113e550f", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.6", + "sebastian/version": "^1.0.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "time": "2016-11-23T20:04:58+00:00" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "php": ">=5.6.4" + }, + "platform-dev": [] +} diff --git a/config/app.php b/config/app.php new file mode 100644 index 0000000..135e977 --- /dev/null +++ b/config/app.php @@ -0,0 +1,231 @@ + env('APP_NAME', 'Laravel'), + + /* + |-------------------------------------------------------------------------- + | Application Environment + |-------------------------------------------------------------------------- + | + | This value determines the "environment" your application is currently + | running in. This may determine how you prefer to configure various + | services your application utilizes. Set this in your ".env" file. + | + */ + + 'env' => env('APP_ENV', 'production'), + + /* + |-------------------------------------------------------------------------- + | Application Debug Mode + |-------------------------------------------------------------------------- + | + | When your application is in debug mode, detailed error messages with + | stack traces will be shown on every error that occurs within your + | application. If disabled, a simple generic error page is shown. + | + */ + + 'debug' => env('APP_DEBUG', false), + + /* + |-------------------------------------------------------------------------- + | Application URL + |-------------------------------------------------------------------------- + | + | This URL is used by the console to properly generate URLs when using + | the Artisan command line tool. You should set this to the root of + | your application so that it is used when running Artisan tasks. + | + */ + + 'url' => env('APP_URL', 'http://localhost'), + + /* + |-------------------------------------------------------------------------- + | Application Timezone + |-------------------------------------------------------------------------- + | + | Here you may specify the default timezone for your application, which + | will be used by the PHP date and date-time functions. We have gone + | ahead and set this to a sensible default for you out of the box. + | + */ + + 'timezone' => 'UTC', + + /* + |-------------------------------------------------------------------------- + | Application Locale Configuration + |-------------------------------------------------------------------------- + | + | The application locale determines the default locale that will be used + | by the translation service provider. You are free to set this value + | to any of the locales which will be supported by the application. + | + */ + + 'locale' => 'en', + + /* + |-------------------------------------------------------------------------- + | Application Fallback Locale + |-------------------------------------------------------------------------- + | + | The fallback locale determines the locale to use when the current one + | is not available. You may change the value to correspond to any of + | the language folders that are provided through your application. + | + */ + + 'fallback_locale' => 'en', + + /* + |-------------------------------------------------------------------------- + | Encryption Key + |-------------------------------------------------------------------------- + | + | This key is used by the Illuminate encrypter service and should be set + | to a random, 32 character string, otherwise these encrypted strings + | will not be safe. Please do this before deploying an application! + | + */ + + 'key' => env('APP_KEY'), + + 'cipher' => 'AES-256-CBC', + + /* + |-------------------------------------------------------------------------- + | Logging Configuration + |-------------------------------------------------------------------------- + | + | Here you may configure the log settings for your application. Out of + | the box, Laravel uses the Monolog PHP logging library. This gives + | you a variety of powerful log handlers / formatters to utilize. + | + | Available Settings: "single", "daily", "syslog", "errorlog" + | + */ + + 'log' => env('APP_LOG', 'single'), + + 'log_level' => env('APP_LOG_LEVEL', 'debug'), + + /* + |-------------------------------------------------------------------------- + | Autoloaded Service Providers + |-------------------------------------------------------------------------- + | + | The service providers listed here will be automatically loaded on the + | request to your application. Feel free to add your own services to + | this array to grant expanded functionality to your applications. + | + */ + + 'providers' => [ + + /* + * Laravel Framework Service Providers... + */ + Illuminate\Auth\AuthServiceProvider::class, + Illuminate\Broadcasting\BroadcastServiceProvider::class, + Illuminate\Bus\BusServiceProvider::class, + Illuminate\Cache\CacheServiceProvider::class, + Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class, + Illuminate\Cookie\CookieServiceProvider::class, + Illuminate\Database\DatabaseServiceProvider::class, + Illuminate\Encryption\EncryptionServiceProvider::class, + Illuminate\Filesystem\FilesystemServiceProvider::class, + Illuminate\Foundation\Providers\FoundationServiceProvider::class, + Illuminate\Hashing\HashServiceProvider::class, + Illuminate\Mail\MailServiceProvider::class, + Illuminate\Notifications\NotificationServiceProvider::class, + Illuminate\Pagination\PaginationServiceProvider::class, + Illuminate\Pipeline\PipelineServiceProvider::class, + Illuminate\Queue\QueueServiceProvider::class, + Illuminate\Redis\RedisServiceProvider::class, + Illuminate\Auth\Passwords\PasswordResetServiceProvider::class, + Illuminate\Session\SessionServiceProvider::class, + Illuminate\Translation\TranslationServiceProvider::class, + Illuminate\Validation\ValidationServiceProvider::class, + Illuminate\View\ViewServiceProvider::class, + + /* + * Package Service Providers... + */ + Laravel\Tinker\TinkerServiceProvider::class, + + /* + * Application Service Providers... + */ + App\Providers\AppServiceProvider::class, + App\Providers\AuthServiceProvider::class, + // App\Providers\BroadcastServiceProvider::class, + App\Providers\EventServiceProvider::class, + App\Providers\RouteServiceProvider::class, + + ], + + /* + |-------------------------------------------------------------------------- + | Class Aliases + |-------------------------------------------------------------------------- + | + | This array of class aliases will be registered when this application + | is started. However, feel free to register as many as you wish as + | the aliases are "lazy" loaded so they don't hinder performance. + | + */ + + 'aliases' => [ + + 'App' => Illuminate\Support\Facades\App::class, + 'Artisan' => Illuminate\Support\Facades\Artisan::class, + 'Auth' => Illuminate\Support\Facades\Auth::class, + 'Blade' => Illuminate\Support\Facades\Blade::class, + 'Broadcast' => Illuminate\Support\Facades\Broadcast::class, + 'Bus' => Illuminate\Support\Facades\Bus::class, + 'Cache' => Illuminate\Support\Facades\Cache::class, + 'Config' => Illuminate\Support\Facades\Config::class, + 'Cookie' => Illuminate\Support\Facades\Cookie::class, + 'Crypt' => Illuminate\Support\Facades\Crypt::class, + 'DB' => Illuminate\Support\Facades\DB::class, + 'Eloquent' => Illuminate\Database\Eloquent\Model::class, + 'Event' => Illuminate\Support\Facades\Event::class, + 'File' => Illuminate\Support\Facades\File::class, + 'Gate' => Illuminate\Support\Facades\Gate::class, + 'Hash' => Illuminate\Support\Facades\Hash::class, + 'Lang' => Illuminate\Support\Facades\Lang::class, + 'Log' => Illuminate\Support\Facades\Log::class, + 'Mail' => Illuminate\Support\Facades\Mail::class, + 'Notification' => Illuminate\Support\Facades\Notification::class, + 'Password' => Illuminate\Support\Facades\Password::class, + 'Queue' => Illuminate\Support\Facades\Queue::class, + 'Redirect' => Illuminate\Support\Facades\Redirect::class, + 'Redis' => Illuminate\Support\Facades\Redis::class, + 'Request' => Illuminate\Support\Facades\Request::class, + 'Response' => Illuminate\Support\Facades\Response::class, + 'Route' => Illuminate\Support\Facades\Route::class, + 'Schema' => Illuminate\Support\Facades\Schema::class, + 'Session' => Illuminate\Support\Facades\Session::class, + 'Storage' => Illuminate\Support\Facades\Storage::class, + 'URL' => Illuminate\Support\Facades\URL::class, + 'Validator' => Illuminate\Support\Facades\Validator::class, + 'View' => Illuminate\Support\Facades\View::class, + + ], + +]; diff --git a/config/auth.php b/config/auth.php new file mode 100644 index 0000000..7817501 --- /dev/null +++ b/config/auth.php @@ -0,0 +1,102 @@ + [ + 'guard' => 'web', + 'passwords' => 'users', + ], + + /* + |-------------------------------------------------------------------------- + | Authentication Guards + |-------------------------------------------------------------------------- + | + | Next, you may define every authentication guard for your application. + | Of course, a great default configuration has been defined for you + | here which uses session storage and the Eloquent user provider. + | + | All authentication drivers have a user provider. This defines how the + | users are actually retrieved out of your database or other storage + | mechanisms used by this application to persist your user's data. + | + | Supported: "session", "token" + | + */ + + 'guards' => [ + 'web' => [ + 'driver' => 'session', + 'provider' => 'users', + ], + + 'api' => [ + 'driver' => 'token', + 'provider' => 'users', + ], + ], + + /* + |-------------------------------------------------------------------------- + | User Providers + |-------------------------------------------------------------------------- + | + | All authentication drivers have a user provider. This defines how the + | users are actually retrieved out of your database or other storage + | mechanisms used by this application to persist your user's data. + | + | If you have multiple user tables or models you may configure multiple + | sources which represent each model / table. These sources may then + | be assigned to any extra authentication guards you have defined. + | + | Supported: "database", "eloquent" + | + */ + + 'providers' => [ + 'users' => [ + 'driver' => 'eloquent', + 'model' => App\User::class, + ], + + // 'users' => [ + // 'driver' => 'database', + // 'table' => 'users', + // ], + ], + + /* + |-------------------------------------------------------------------------- + | Resetting Passwords + |-------------------------------------------------------------------------- + | + | You may specify multiple password reset configurations if you have more + | than one user table or model in the application and you want to have + | separate password reset settings based on the specific user types. + | + | The expire time is the number of minutes that the reset token should be + | considered valid. This security feature keeps tokens short-lived so + | they have less time to be guessed. You may change this as needed. + | + */ + + 'passwords' => [ + 'users' => [ + 'provider' => 'users', + 'table' => 'password_resets', + 'expire' => 60, + ], + ], + +]; diff --git a/config/broadcasting.php b/config/broadcasting.php new file mode 100644 index 0000000..5eecd2b --- /dev/null +++ b/config/broadcasting.php @@ -0,0 +1,58 @@ + env('BROADCAST_DRIVER', 'null'), + + /* + |-------------------------------------------------------------------------- + | Broadcast Connections + |-------------------------------------------------------------------------- + | + | Here you may define all of the broadcast connections that will be used + | to broadcast events to other systems or over websockets. Samples of + | each available type of connection are provided inside this array. + | + */ + + 'connections' => [ + + 'pusher' => [ + 'driver' => 'pusher', + 'key' => env('PUSHER_APP_KEY'), + 'secret' => env('PUSHER_APP_SECRET'), + 'app_id' => env('PUSHER_APP_ID'), + 'options' => [ + // + ], + ], + + 'redis' => [ + 'driver' => 'redis', + 'connection' => 'default', + ], + + 'log' => [ + 'driver' => 'log', + ], + + 'null' => [ + 'driver' => 'null', + ], + + ], + +]; diff --git a/config/cache.php b/config/cache.php new file mode 100644 index 0000000..e87f032 --- /dev/null +++ b/config/cache.php @@ -0,0 +1,91 @@ + env('CACHE_DRIVER', 'file'), + + /* + |-------------------------------------------------------------------------- + | Cache Stores + |-------------------------------------------------------------------------- + | + | Here you may define all of the cache "stores" for your application as + | well as their drivers. You may even define multiple stores for the + | same cache driver to group types of items stored in your caches. + | + */ + + 'stores' => [ + + 'apc' => [ + 'driver' => 'apc', + ], + + 'array' => [ + 'driver' => 'array', + ], + + 'database' => [ + 'driver' => 'database', + 'table' => 'cache', + 'connection' => null, + ], + + 'file' => [ + 'driver' => 'file', + 'path' => storage_path('framework/cache/data'), + ], + + 'memcached' => [ + 'driver' => 'memcached', + 'persistent_id' => env('MEMCACHED_PERSISTENT_ID'), + 'sasl' => [ + env('MEMCACHED_USERNAME'), + env('MEMCACHED_PASSWORD'), + ], + 'options' => [ + // Memcached::OPT_CONNECT_TIMEOUT => 2000, + ], + 'servers' => [ + [ + 'host' => env('MEMCACHED_HOST', '127.0.0.1'), + 'port' => env('MEMCACHED_PORT', 11211), + 'weight' => 100, + ], + ], + ], + + 'redis' => [ + 'driver' => 'redis', + 'connection' => 'default', + ], + + ], + + /* + |-------------------------------------------------------------------------- + | Cache Key Prefix + |-------------------------------------------------------------------------- + | + | When utilizing a RAM based store such as APC or Memcached, there might + | be other applications utilizing the same cache. So, we'll specify a + | value to get prefixed to all our keys so we can avoid collisions. + | + */ + + 'prefix' => 'laravel', + +]; diff --git a/config/database.php b/config/database.php new file mode 100644 index 0000000..a196943 --- /dev/null +++ b/config/database.php @@ -0,0 +1,109 @@ + env('DB_CONNECTION', 'mysql'), + + /* + |-------------------------------------------------------------------------- + | Database Connections + |-------------------------------------------------------------------------- + | + | Here are each of the database connections setup for your application. + | Of course, examples of configuring each database platform that is + | supported by Laravel is shown below to make development simple. + | + | + | All database work in Laravel is done through the PHP PDO facilities + | so make sure you have the driver for your particular database of + | choice installed on your machine before you begin development. + | + */ + + 'connections' => [ + + 'sqlite' => [ + 'driver' => 'sqlite', + 'database' => env('DB_DATABASE', database_path('database.sqlite')), + 'prefix' => '', + ], + + 'mysql' => [ + 'driver' => 'mysql', + 'host' => env('DB_HOST', '127.0.0.1'), + 'port' => env('DB_PORT', '3306'), + 'database' => env('DB_DATABASE', 'forge'), + 'username' => env('DB_USERNAME', 'forge'), + 'password' => env('DB_PASSWORD', ''), + 'unix_socket' => env('DB_SOCKET', ''), + 'charset' => 'utf8mb4', + 'collation' => 'utf8mb4_unicode_ci', + 'prefix' => '', + 'strict' => true, + 'engine' => null, + ], + + 'pgsql' => [ + 'driver' => 'pgsql', + 'host' => env('DB_HOST', '127.0.0.1'), + 'port' => env('DB_PORT', '5432'), + 'database' => env('DB_DATABASE', 'forge'), + 'username' => env('DB_USERNAME', 'forge'), + 'password' => env('DB_PASSWORD', ''), + 'charset' => 'utf8', + 'prefix' => '', + 'schema' => 'public', + 'sslmode' => 'prefer', + ], + + ], + + /* + |-------------------------------------------------------------------------- + | Migration Repository Table + |-------------------------------------------------------------------------- + | + | This table keeps track of all the migrations that have already run for + | your application. Using this information, we can determine which of + | the migrations on disk haven't actually been run in the database. + | + */ + + 'migrations' => 'migrations', + + /* + |-------------------------------------------------------------------------- + | Redis Databases + |-------------------------------------------------------------------------- + | + | Redis is an open source, fast, and advanced key-value store that also + | provides a richer set of commands than a typical key-value systems + | such as APC or Memcached. Laravel makes it easy to dig right in. + | + */ + + 'redis' => [ + + 'client' => 'predis', + + 'default' => [ + 'host' => env('REDIS_HOST', '127.0.0.1'), + 'password' => env('REDIS_PASSWORD', null), + 'port' => env('REDIS_PORT', 6379), + 'database' => 0, + ], + + ], + +]; diff --git a/config/filesystems.php b/config/filesystems.php new file mode 100644 index 0000000..4544f60 --- /dev/null +++ b/config/filesystems.php @@ -0,0 +1,68 @@ + env('FILESYSTEM_DRIVER', 'local'), + + /* + |-------------------------------------------------------------------------- + | Default Cloud Filesystem Disk + |-------------------------------------------------------------------------- + | + | Many applications store files both locally and in the cloud. For this + | reason, you may specify a default "cloud" driver here. This driver + | will be bound as the Cloud disk implementation in the container. + | + */ + + 'cloud' => env('FILESYSTEM_CLOUD', 's3'), + + /* + |-------------------------------------------------------------------------- + | Filesystem Disks + |-------------------------------------------------------------------------- + | + | Here you may configure as many filesystem "disks" as you wish, and you + | may even configure multiple disks of the same driver. Defaults have + | been setup for each driver as an example of the required options. + | + | Supported Drivers: "local", "ftp", "s3", "rackspace" + | + */ + + 'disks' => [ + + 'local' => [ + 'driver' => 'local', + 'root' => storage_path('app'), + ], + + 'public' => [ + 'driver' => 'local', + 'root' => storage_path('app/public'), + 'url' => env('APP_URL').'/storage', + 'visibility' => 'public', + ], + + 's3' => [ + 'driver' => 's3', + 'key' => env('AWS_KEY'), + 'secret' => env('AWS_SECRET'), + 'region' => env('AWS_REGION'), + 'bucket' => env('AWS_BUCKET'), + ], + + ], + +]; diff --git a/config/mail.php b/config/mail.php new file mode 100644 index 0000000..bb92224 --- /dev/null +++ b/config/mail.php @@ -0,0 +1,123 @@ + env('MAIL_DRIVER', 'smtp'), + + /* + |-------------------------------------------------------------------------- + | SMTP Host Address + |-------------------------------------------------------------------------- + | + | Here you may provide the host address of the SMTP server used by your + | applications. A default option is provided that is compatible with + | the Mailgun mail service which will provide reliable deliveries. + | + */ + + 'host' => env('MAIL_HOST', 'smtp.mailgun.org'), + + /* + |-------------------------------------------------------------------------- + | SMTP Host Port + |-------------------------------------------------------------------------- + | + | This is the SMTP port used by your application to deliver e-mails to + | users of the application. Like the host we have set this value to + | stay compatible with the Mailgun e-mail application by default. + | + */ + + 'port' => env('MAIL_PORT', 587), + + /* + |-------------------------------------------------------------------------- + | Global "From" Address + |-------------------------------------------------------------------------- + | + | You may wish for all e-mails sent by your application to be sent from + | the same address. Here, you may specify a name and address that is + | used globally for all e-mails that are sent by your application. + | + */ + + 'from' => [ + 'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'), + 'name' => env('MAIL_FROM_NAME', 'Example'), + ], + + /* + |-------------------------------------------------------------------------- + | E-Mail Encryption Protocol + |-------------------------------------------------------------------------- + | + | Here you may specify the encryption protocol that should be used when + | the application send e-mail messages. A sensible default using the + | transport layer security protocol should provide great security. + | + */ + + 'encryption' => env('MAIL_ENCRYPTION', 'tls'), + + /* + |-------------------------------------------------------------------------- + | SMTP Server Username + |-------------------------------------------------------------------------- + | + | If your SMTP server requires a username for authentication, you should + | set it here. This will get used to authenticate with your server on + | connection. You may also set the "password" value below this one. + | + */ + + 'username' => env('MAIL_USERNAME'), + + 'password' => env('MAIL_PASSWORD'), + + /* + |-------------------------------------------------------------------------- + | Sendmail System Path + |-------------------------------------------------------------------------- + | + | When using the "sendmail" driver to send e-mails, we will need to know + | the path to where Sendmail lives on this server. A default path has + | been provided here, which will work well on most of your systems. + | + */ + + 'sendmail' => '/usr/sbin/sendmail -bs', + + /* + |-------------------------------------------------------------------------- + | Markdown Mail Settings + |-------------------------------------------------------------------------- + | + | If you are using Markdown based email rendering, you may configure your + | theme and component paths here, allowing you to customize the design + | of the emails. Or, you may simply stick with the Laravel defaults! + | + */ + + 'markdown' => [ + 'theme' => 'default', + + 'paths' => [ + resource_path('views/vendor/mail'), + ], + ], + +]; diff --git a/config/queue.php b/config/queue.php new file mode 100644 index 0000000..86b55a6 --- /dev/null +++ b/config/queue.php @@ -0,0 +1,98 @@ + env('QUEUE_DRIVER', 'sync'), + + /* + |-------------------------------------------------------------------------- + | Queue Prefix + |-------------------------------------------------------------------------- + | + | If you are running multiple sites on a single server you should consider + | specifying a queue prefix. This string will be prepended to the queue + | names to prevent cross-talk when using certain local queue drivers. + | + */ + + 'prefix' => env('QUEUE_PREFIX', ''), + + /* + |-------------------------------------------------------------------------- + | Queue Connections + |-------------------------------------------------------------------------- + | + | Here you may configure the connection information for each server that + | is used by your application. A default configuration has been added + | for each back-end shipped with Laravel. You are free to add more. + | + */ + + 'connections' => [ + + 'sync' => [ + 'driver' => 'sync', + ], + + 'database' => [ + 'driver' => 'database', + 'table' => 'jobs', + 'queue' => 'default', + 'retry_after' => 90, + ], + + 'beanstalkd' => [ + 'driver' => 'beanstalkd', + 'host' => 'localhost', + 'queue' => 'default', + 'retry_after' => 90, + ], + + 'sqs' => [ + 'driver' => 'sqs', + 'key' => 'your-public-key', + 'secret' => 'your-secret-key', + 'prefix' => 'https://sqs.us-east-1.amazonaws.com/your-account-id', + 'queue' => 'your-queue-name', + 'region' => 'us-east-1', + ], + + 'redis' => [ + 'driver' => 'redis', + 'connection' => 'default', + 'queue' => 'default', + 'retry_after' => 90, + ], + + ], + + /* + |-------------------------------------------------------------------------- + | Failed Queue Jobs + |-------------------------------------------------------------------------- + | + | These options configure the behavior of failed queue job logging so you + | can control which database and table are used to store the jobs that + | have failed. You may change them to any database / table you wish. + | + */ + + 'failed' => [ + 'database' => env('DB_CONNECTION', 'mysql'), + 'table' => 'failed_jobs', + ], + +]; diff --git a/config/services.php b/config/services.php new file mode 100644 index 0000000..4460f0e --- /dev/null +++ b/config/services.php @@ -0,0 +1,38 @@ + [ + 'domain' => env('MAILGUN_DOMAIN'), + 'secret' => env('MAILGUN_SECRET'), + ], + + 'ses' => [ + 'key' => env('SES_KEY'), + 'secret' => env('SES_SECRET'), + 'region' => 'us-east-1', + ], + + 'sparkpost' => [ + 'secret' => env('SPARKPOST_SECRET'), + ], + + 'stripe' => [ + 'model' => App\User::class, + 'key' => env('STRIPE_KEY'), + 'secret' => env('STRIPE_SECRET'), + ], + +]; diff --git a/config/session.php b/config/session.php new file mode 100644 index 0000000..e2779ad --- /dev/null +++ b/config/session.php @@ -0,0 +1,179 @@ + env('SESSION_DRIVER', 'file'), + + /* + |-------------------------------------------------------------------------- + | Session Lifetime + |-------------------------------------------------------------------------- + | + | Here you may specify the number of minutes that you wish the session + | to be allowed to remain idle before it expires. If you want them + | to immediately expire on the browser closing, set that option. + | + */ + + 'lifetime' => 120, + + 'expire_on_close' => false, + + /* + |-------------------------------------------------------------------------- + | Session Encryption + |-------------------------------------------------------------------------- + | + | This option allows you to easily specify that all of your session data + | should be encrypted before it is stored. All encryption will be run + | automatically by Laravel and you can use the Session like normal. + | + */ + + 'encrypt' => false, + + /* + |-------------------------------------------------------------------------- + | Session File Location + |-------------------------------------------------------------------------- + | + | When using the native session driver, we need a location where session + | files may be stored. A default has been set for you but a different + | location may be specified. This is only needed for file sessions. + | + */ + + 'files' => storage_path('framework/sessions'), + + /* + |-------------------------------------------------------------------------- + | Session Database Connection + |-------------------------------------------------------------------------- + | + | When using the "database" or "redis" session drivers, you may specify a + | connection that should be used to manage these sessions. This should + | correspond to a connection in your database configuration options. + | + */ + + 'connection' => null, + + /* + |-------------------------------------------------------------------------- + | Session Database Table + |-------------------------------------------------------------------------- + | + | When using the "database" session driver, you may specify the table we + | should use to manage the sessions. Of course, a sensible default is + | provided for you; however, you are free to change this as needed. + | + */ + + 'table' => 'sessions', + + /* + |-------------------------------------------------------------------------- + | Session Cache Store + |-------------------------------------------------------------------------- + | + | When using the "apc" or "memcached" session drivers, you may specify a + | cache store that should be used for these sessions. This value must + | correspond with one of the application's configured cache stores. + | + */ + + 'store' => null, + + /* + |-------------------------------------------------------------------------- + | Session Sweeping Lottery + |-------------------------------------------------------------------------- + | + | Some session drivers must manually sweep their storage location to get + | rid of old sessions from storage. Here are the chances that it will + | happen on a given request. By default, the odds are 2 out of 100. + | + */ + + 'lottery' => [2, 100], + + /* + |-------------------------------------------------------------------------- + | Session Cookie Name + |-------------------------------------------------------------------------- + | + | Here you may change the name of the cookie used to identify a session + | instance by ID. The name specified here will get used every time a + | new session cookie is created by the framework for every driver. + | + */ + + 'cookie' => 'laravel_session', + + /* + |-------------------------------------------------------------------------- + | Session Cookie Path + |-------------------------------------------------------------------------- + | + | The session cookie path determines the path for which the cookie will + | be regarded as available. Typically, this will be the root path of + | your application but you are free to change this when necessary. + | + */ + + 'path' => '/', + + /* + |-------------------------------------------------------------------------- + | Session Cookie Domain + |-------------------------------------------------------------------------- + | + | Here you may change the domain of the cookie used to identify a session + | in your application. This will determine which domains the cookie is + | available to in your application. A sensible default has been set. + | + */ + + 'domain' => env('SESSION_DOMAIN', null), + + /* + |-------------------------------------------------------------------------- + | HTTPS Only Cookies + |-------------------------------------------------------------------------- + | + | By setting this option to true, session cookies will only be sent back + | to the server if the browser has a HTTPS connection. This will keep + | the cookie from being sent to you if it can not be done securely. + | + */ + + 'secure' => env('SESSION_SECURE_COOKIE', false), + + /* + |-------------------------------------------------------------------------- + | HTTP Access Only + |-------------------------------------------------------------------------- + | + | Setting this value to true will prevent JavaScript from accessing the + | value of the cookie and the cookie will only be accessible through + | the HTTP protocol. You are free to modify this option if needed. + | + */ + + 'http_only' => true, + +]; diff --git a/config/view.php b/config/view.php new file mode 100644 index 0000000..2acfd9c --- /dev/null +++ b/config/view.php @@ -0,0 +1,33 @@ + [ + resource_path('views'), + ], + + /* + |-------------------------------------------------------------------------- + | Compiled View Path + |-------------------------------------------------------------------------- + | + | This option determines where all the compiled Blade templates will be + | stored for your application. Typically, this is within the storage + | directory. However, as usual, you are free to change this value. + | + */ + + 'compiled' => realpath(storage_path('framework/views')), + +]; diff --git a/database/.gitignore b/database/.gitignore new file mode 100644 index 0000000..9b1dffd --- /dev/null +++ b/database/.gitignore @@ -0,0 +1 @@ +*.sqlite diff --git a/database/factories/ModelFactory.php b/database/factories/ModelFactory.php new file mode 100644 index 0000000..7926c79 --- /dev/null +++ b/database/factories/ModelFactory.php @@ -0,0 +1,24 @@ +define(App\User::class, function (Faker\Generator $faker) { + static $password; + + return [ + 'name' => $faker->name, + 'email' => $faker->unique()->safeEmail, + 'password' => $password ?: $password = bcrypt('secret'), + 'remember_token' => str_random(10), + ]; +}); diff --git a/database/migrations/2014_10_12_000000_create_users_table.php b/database/migrations/2014_10_12_000000_create_users_table.php new file mode 100644 index 0000000..689cbee --- /dev/null +++ b/database/migrations/2014_10_12_000000_create_users_table.php @@ -0,0 +1,35 @@ +increments('id'); + $table->string('name'); + $table->string('email')->unique(); + $table->string('password'); + $table->rememberToken(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('users'); + } +} diff --git a/database/migrations/2014_10_12_100000_create_password_resets_table.php b/database/migrations/2014_10_12_100000_create_password_resets_table.php new file mode 100644 index 0000000..0d5cb84 --- /dev/null +++ b/database/migrations/2014_10_12_100000_create_password_resets_table.php @@ -0,0 +1,32 @@ +string('email')->index(); + $table->string('token'); + $table->timestamp('created_at')->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('password_resets'); + } +} diff --git a/database/seeds/DatabaseSeeder.php b/database/seeds/DatabaseSeeder.php new file mode 100644 index 0000000..e119db6 --- /dev/null +++ b/database/seeds/DatabaseSeeder.php @@ -0,0 +1,16 @@ +call(UsersTableSeeder::class); + } +} diff --git a/npm-debug.log b/npm-debug.log new file mode 100644 index 0000000..4c5ad67 --- /dev/null +++ b/npm-debug.log @@ -0,0 +1,23 @@ +0 info it worked if it ends with ok +1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ] +2 info using npm@3.10.3 +3 info using node@v6.7.0 +4 verbose stack Error: missing script: start +4 verbose stack at run (/usr/local/lib/node_modules/npm/lib/run-script.js:151:19) +4 verbose stack at /usr/local/lib/node_modules/npm/lib/run-script.js:61:5 +4 verbose stack at /usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:356:5 +4 verbose stack at checkBinReferences_ (/usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:320:45) +4 verbose stack at final (/usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:354:3) +4 verbose stack at then (/usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:124:5) +4 verbose stack at ReadFileContext. (/usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:295:20) +4 verbose stack at ReadFileContext.callback (/usr/local/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:78:16) +4 verbose stack at FSReqWrap.readFileAfterOpen [as oncomplete] (fs.js:365:13) +5 verbose cwd /Applications/XAMPP/xamppfiles/htdocs/Ivent +6 error Darwin 15.6.0 +7 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "start" +8 error node v6.7.0 +9 error npm v3.10.3 +10 error missing script: start +11 error If you need help, you may report this error at: +11 error +12 verbose exit [ 1, true ] diff --git a/package.json b/package.json new file mode 100644 index 0000000..83294b6 --- /dev/null +++ b/package.json @@ -0,0 +1,21 @@ +{ + "private": true, + "scripts": { + "dev": "npm run development", + "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", + "watch": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", + "watch-poll": "npm run watch -- --watch-poll", + "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js", + "prod": "npm run production", + "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js" + }, + "devDependencies": { + "axios": "^0.15.3", + "bootstrap-sass": "^3.3.7", + "cross-env": "^3.2.3", + "jquery": "^3.1.1", + "laravel-mix": "0.*", + "lodash": "^4.17.4", + "vue": "^2.1.10" + } +} diff --git a/phpunit.xml b/phpunit.xml new file mode 100644 index 0000000..a2c496e --- /dev/null +++ b/phpunit.xml @@ -0,0 +1,31 @@ + + + + + ./tests/Feature + + + + ./tests/Unit + + + + + ./app + + + + + + + + + diff --git a/public/.htaccess b/public/.htaccess new file mode 100644 index 0000000..903f639 --- /dev/null +++ b/public/.htaccess @@ -0,0 +1,20 @@ + + + Options -MultiViews + + + RewriteEngine On + + # Redirect Trailing Slashes If Not A Folder... + RewriteCond %{REQUEST_FILENAME} !-d + RewriteRule ^(.*)/$ /$1 [L,R=301] + + # Handle Front Controller... + RewriteCond %{REQUEST_FILENAME} !-d + RewriteCond %{REQUEST_FILENAME} !-f + RewriteRule ^ index.php [L] + + # Handle Authorization Header + RewriteCond %{HTTP:Authorization} . + RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] + diff --git a/public/assets/css/animate.css b/public/assets/css/animate.css new file mode 100644 index 0000000..7148b57 --- /dev/null +++ b/public/assets/css/animate.css @@ -0,0 +1,3340 @@ +@charset "UTF-8"; + +/*! + * animate.css -http://daneden.me/animate + * Version - 3.5.1 + * Licensed under the MIT license - http://opensource.org/licenses/MIT + * + * Copyright (c) 2016 Daniel Eden + */ + +.animated { + -webkit-animation-duration: 1s; + animation-duration: 1s; + -webkit-animation-fill-mode: both; + animation-fill-mode: both; +} + +.animated.infinite { + -webkit-animation-iteration-count: infinite; + animation-iteration-count: infinite; +} + +.animated.hinge { + -webkit-animation-duration: 2s; + animation-duration: 2s; +} + +.animated.flipOutX, +.animated.flipOutY, +.animated.bounceIn, +.animated.bounceOut { + -webkit-animation-duration: .75s; + animation-duration: .75s; +} + +@-webkit-keyframes bounce { + from, 20%, 53%, 80%, to { + -webkit-animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); + animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); + -webkit-transform: translate3d(0,0,0); + transform: translate3d(0,0,0); + } + + 40%, 43% { + -webkit-animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060); + animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060); + -webkit-transform: translate3d(0, -30px, 0); + transform: translate3d(0, -30px, 0); + } + + 70% { + -webkit-animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060); + animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060); + -webkit-transform: translate3d(0, -15px, 0); + transform: translate3d(0, -15px, 0); + } + + 90% { + -webkit-transform: translate3d(0,-4px,0); + transform: translate3d(0,-4px,0); + } +} + +@keyframes bounce { + from, 20%, 53%, 80%, to { + -webkit-animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); + animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); + -webkit-transform: translate3d(0,0,0); + transform: translate3d(0,0,0); + } + + 40%, 43% { + -webkit-animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060); + animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060); + -webkit-transform: translate3d(0, -30px, 0); + transform: translate3d(0, -30px, 0); + } + + 70% { + -webkit-animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060); + animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060); + -webkit-transform: translate3d(0, -15px, 0); + transform: translate3d(0, -15px, 0); + } + + 90% { + -webkit-transform: translate3d(0,-4px,0); + transform: translate3d(0,-4px,0); + } +} + +.bounce { + -webkit-animation-name: bounce; + animation-name: bounce; + -webkit-transform-origin: center bottom; + transform-origin: center bottom; +} + +@-webkit-keyframes flash { + from, 50%, to { + opacity: 1; + } + + 25%, 75% { + opacity: 0; + } +} + +@keyframes flash { + from, 50%, to { + opacity: 1; + } + + 25%, 75% { + opacity: 0; + } +} + +.flash { + -webkit-animation-name: flash; + animation-name: flash; +} + +/* originally authored by Nick Pettit - https://github.com/nickpettit/glide */ + +@-webkit-keyframes pulse { + from { + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1); + } + + 50% { + -webkit-transform: scale3d(1.05, 1.05, 1.05); + transform: scale3d(1.05, 1.05, 1.05); + } + + to { + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1); + } +} + +@keyframes pulse { + from { + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1); + } + + 50% { + -webkit-transform: scale3d(1.05, 1.05, 1.05); + transform: scale3d(1.05, 1.05, 1.05); + } + + to { + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1); + } +} + +.pulse { + -webkit-animation-name: pulse; + animation-name: pulse; +} + +@-webkit-keyframes rubberBand { + from { + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1); + } + + 30% { + -webkit-transform: scale3d(1.25, 0.75, 1); + transform: scale3d(1.25, 0.75, 1); + } + + 40% { + -webkit-transform: scale3d(0.75, 1.25, 1); + transform: scale3d(0.75, 1.25, 1); + } + + 50% { + -webkit-transform: scale3d(1.15, 0.85, 1); + transform: scale3d(1.15, 0.85, 1); + } + + 65% { + -webkit-transform: scale3d(.95, 1.05, 1); + transform: scale3d(.95, 1.05, 1); + } + + 75% { + -webkit-transform: scale3d(1.05, .95, 1); + transform: scale3d(1.05, .95, 1); + } + + to { + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1); + } +} + +@keyframes rubberBand { + from { + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1); + } + + 30% { + -webkit-transform: scale3d(1.25, 0.75, 1); + transform: scale3d(1.25, 0.75, 1); + } + + 40% { + -webkit-transform: scale3d(0.75, 1.25, 1); + transform: scale3d(0.75, 1.25, 1); + } + + 50% { + -webkit-transform: scale3d(1.15, 0.85, 1); + transform: scale3d(1.15, 0.85, 1); + } + + 65% { + -webkit-transform: scale3d(.95, 1.05, 1); + transform: scale3d(.95, 1.05, 1); + } + + 75% { + -webkit-transform: scale3d(1.05, .95, 1); + transform: scale3d(1.05, .95, 1); + } + + to { + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1); + } +} + +.rubberBand { + -webkit-animation-name: rubberBand; + animation-name: rubberBand; +} + +@-webkit-keyframes shake { + from, to { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } + + 10%, 30%, 50%, 70%, 90% { + -webkit-transform: translate3d(-10px, 0, 0); + transform: translate3d(-10px, 0, 0); + } + + 20%, 40%, 60%, 80% { + -webkit-transform: translate3d(10px, 0, 0); + transform: translate3d(10px, 0, 0); + } +} + +@keyframes shake { + from, to { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } + + 10%, 30%, 50%, 70%, 90% { + -webkit-transform: translate3d(-10px, 0, 0); + transform: translate3d(-10px, 0, 0); + } + + 20%, 40%, 60%, 80% { + -webkit-transform: translate3d(10px, 0, 0); + transform: translate3d(10px, 0, 0); + } +} + +.shake { + -webkit-animation-name: shake; + animation-name: shake; +} + +@-webkit-keyframes headShake { + 0% { + -webkit-transform: translateX(0); + transform: translateX(0); + } + + 6.5% { + -webkit-transform: translateX(-6px) rotateY(-9deg); + transform: translateX(-6px) rotateY(-9deg); + } + + 18.5% { + -webkit-transform: translateX(5px) rotateY(7deg); + transform: translateX(5px) rotateY(7deg); + } + + 31.5% { + -webkit-transform: translateX(-3px) rotateY(-5deg); + transform: translateX(-3px) rotateY(-5deg); + } + + 43.5% { + -webkit-transform: translateX(2px) rotateY(3deg); + transform: translateX(2px) rotateY(3deg); + } + + 50% { + -webkit-transform: translateX(0); + transform: translateX(0); + } +} + +@keyframes headShake { + 0% { + -webkit-transform: translateX(0); + transform: translateX(0); + } + + 6.5% { + -webkit-transform: translateX(-6px) rotateY(-9deg); + transform: translateX(-6px) rotateY(-9deg); + } + + 18.5% { + -webkit-transform: translateX(5px) rotateY(7deg); + transform: translateX(5px) rotateY(7deg); + } + + 31.5% { + -webkit-transform: translateX(-3px) rotateY(-5deg); + transform: translateX(-3px) rotateY(-5deg); + } + + 43.5% { + -webkit-transform: translateX(2px) rotateY(3deg); + transform: translateX(2px) rotateY(3deg); + } + + 50% { + -webkit-transform: translateX(0); + transform: translateX(0); + } +} + +.headShake { + -webkit-animation-timing-function: ease-in-out; + animation-timing-function: ease-in-out; + -webkit-animation-name: headShake; + animation-name: headShake; +} + +@-webkit-keyframes swing { + 20% { + -webkit-transform: rotate3d(0, 0, 1, 15deg); + transform: rotate3d(0, 0, 1, 15deg); + } + + 40% { + -webkit-transform: rotate3d(0, 0, 1, -10deg); + transform: rotate3d(0, 0, 1, -10deg); + } + + 60% { + -webkit-transform: rotate3d(0, 0, 1, 5deg); + transform: rotate3d(0, 0, 1, 5deg); + } + + 80% { + -webkit-transform: rotate3d(0, 0, 1, -5deg); + transform: rotate3d(0, 0, 1, -5deg); + } + + to { + -webkit-transform: rotate3d(0, 0, 1, 0deg); + transform: rotate3d(0, 0, 1, 0deg); + } +} + +@keyframes swing { + 20% { + -webkit-transform: rotate3d(0, 0, 1, 15deg); + transform: rotate3d(0, 0, 1, 15deg); + } + + 40% { + -webkit-transform: rotate3d(0, 0, 1, -10deg); + transform: rotate3d(0, 0, 1, -10deg); + } + + 60% { + -webkit-transform: rotate3d(0, 0, 1, 5deg); + transform: rotate3d(0, 0, 1, 5deg); + } + + 80% { + -webkit-transform: rotate3d(0, 0, 1, -5deg); + transform: rotate3d(0, 0, 1, -5deg); + } + + to { + -webkit-transform: rotate3d(0, 0, 1, 0deg); + transform: rotate3d(0, 0, 1, 0deg); + } +} + +.swing { + -webkit-transform-origin: top center; + transform-origin: top center; + -webkit-animation-name: swing; + animation-name: swing; +} + +@-webkit-keyframes tada { + from { + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1); + } + + 10%, 20% { + -webkit-transform: scale3d(.9, .9, .9) rotate3d(0, 0, 1, -3deg); + transform: scale3d(.9, .9, .9) rotate3d(0, 0, 1, -3deg); + } + + 30%, 50%, 70%, 90% { + -webkit-transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg); + transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg); + } + + 40%, 60%, 80% { + -webkit-transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg); + transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg); + } + + to { + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1); + } +} + +@keyframes tada { + from { + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1); + } + + 10%, 20% { + -webkit-transform: scale3d(.9, .9, .9) rotate3d(0, 0, 1, -3deg); + transform: scale3d(.9, .9, .9) rotate3d(0, 0, 1, -3deg); + } + + 30%, 50%, 70%, 90% { + -webkit-transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg); + transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg); + } + + 40%, 60%, 80% { + -webkit-transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg); + transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg); + } + + to { + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1); + } +} + +.tada { + -webkit-animation-name: tada; + animation-name: tada; +} + +/* originally authored by Nick Pettit - https://github.com/nickpettit/glide */ + +@-webkit-keyframes wobble { + from { + -webkit-transform: none; + transform: none; + } + + 15% { + -webkit-transform: translate3d(-25%, 0, 0) rotate3d(0, 0, 1, -5deg); + transform: translate3d(-25%, 0, 0) rotate3d(0, 0, 1, -5deg); + } + + 30% { + -webkit-transform: translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg); + transform: translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg); + } + + 45% { + -webkit-transform: translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg); + transform: translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg); + } + + 60% { + -webkit-transform: translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg); + transform: translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg); + } + + 75% { + -webkit-transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg); + transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg); + } + + to { + -webkit-transform: none; + transform: none; + } +} + +@keyframes wobble { + from { + -webkit-transform: none; + transform: none; + } + + 15% { + -webkit-transform: translate3d(-25%, 0, 0) rotate3d(0, 0, 1, -5deg); + transform: translate3d(-25%, 0, 0) rotate3d(0, 0, 1, -5deg); + } + + 30% { + -webkit-transform: translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg); + transform: translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg); + } + + 45% { + -webkit-transform: translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg); + transform: translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg); + } + + 60% { + -webkit-transform: translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg); + transform: translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg); + } + + 75% { + -webkit-transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg); + transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg); + } + + to { + -webkit-transform: none; + transform: none; + } +} + +.wobble { + -webkit-animation-name: wobble; + animation-name: wobble; +} + +@-webkit-keyframes jello { + from, 11.1%, to { + -webkit-transform: none; + transform: none; + } + + 22.2% { + -webkit-transform: skewX(-12.5deg) skewY(-12.5deg); + transform: skewX(-12.5deg) skewY(-12.5deg); + } + + 33.3% { + -webkit-transform: skewX(6.25deg) skewY(6.25deg); + transform: skewX(6.25deg) skewY(6.25deg); + } + + 44.4% { + -webkit-transform: skewX(-3.125deg) skewY(-3.125deg); + transform: skewX(-3.125deg) skewY(-3.125deg); + } + + 55.5% { + -webkit-transform: skewX(1.5625deg) skewY(1.5625deg); + transform: skewX(1.5625deg) skewY(1.5625deg); + } + + 66.6% { + -webkit-transform: skewX(-0.78125deg) skewY(-0.78125deg); + transform: skewX(-0.78125deg) skewY(-0.78125deg); + } + + 77.7% { + -webkit-transform: skewX(0.390625deg) skewY(0.390625deg); + transform: skewX(0.390625deg) skewY(0.390625deg); + } + + 88.8% { + -webkit-transform: skewX(-0.1953125deg) skewY(-0.1953125deg); + transform: skewX(-0.1953125deg) skewY(-0.1953125deg); + } +} + +@keyframes jello { + from, 11.1%, to { + -webkit-transform: none; + transform: none; + } + + 22.2% { + -webkit-transform: skewX(-12.5deg) skewY(-12.5deg); + transform: skewX(-12.5deg) skewY(-12.5deg); + } + + 33.3% { + -webkit-transform: skewX(6.25deg) skewY(6.25deg); + transform: skewX(6.25deg) skewY(6.25deg); + } + + 44.4% { + -webkit-transform: skewX(-3.125deg) skewY(-3.125deg); + transform: skewX(-3.125deg) skewY(-3.125deg); + } + + 55.5% { + -webkit-transform: skewX(1.5625deg) skewY(1.5625deg); + transform: skewX(1.5625deg) skewY(1.5625deg); + } + + 66.6% { + -webkit-transform: skewX(-0.78125deg) skewY(-0.78125deg); + transform: skewX(-0.78125deg) skewY(-0.78125deg); + } + + 77.7% { + -webkit-transform: skewX(0.390625deg) skewY(0.390625deg); + transform: skewX(0.390625deg) skewY(0.390625deg); + } + + 88.8% { + -webkit-transform: skewX(-0.1953125deg) skewY(-0.1953125deg); + transform: skewX(-0.1953125deg) skewY(-0.1953125deg); + } +} + +.jello { + -webkit-animation-name: jello; + animation-name: jello; + -webkit-transform-origin: center; + transform-origin: center; +} + +@-webkit-keyframes bounceIn { + from, 20%, 40%, 60%, 80%, to { + -webkit-animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); + animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); + } + + 0% { + opacity: 0; + -webkit-transform: scale3d(.3, .3, .3); + transform: scale3d(.3, .3, .3); + } + + 20% { + -webkit-transform: scale3d(1.1, 1.1, 1.1); + transform: scale3d(1.1, 1.1, 1.1); + } + + 40% { + -webkit-transform: scale3d(.9, .9, .9); + transform: scale3d(.9, .9, .9); + } + + 60% { + opacity: 1; + -webkit-transform: scale3d(1.03, 1.03, 1.03); + transform: scale3d(1.03, 1.03, 1.03); + } + + 80% { + -webkit-transform: scale3d(.97, .97, .97); + transform: scale3d(.97, .97, .97); + } + + to { + opacity: 1; + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1); + } +} + +@keyframes bounceIn { + from, 20%, 40%, 60%, 80%, to { + -webkit-animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); + animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); + } + + 0% { + opacity: 0; + -webkit-transform: scale3d(.3, .3, .3); + transform: scale3d(.3, .3, .3); + } + + 20% { + -webkit-transform: scale3d(1.1, 1.1, 1.1); + transform: scale3d(1.1, 1.1, 1.1); + } + + 40% { + -webkit-transform: scale3d(.9, .9, .9); + transform: scale3d(.9, .9, .9); + } + + 60% { + opacity: 1; + -webkit-transform: scale3d(1.03, 1.03, 1.03); + transform: scale3d(1.03, 1.03, 1.03); + } + + 80% { + -webkit-transform: scale3d(.97, .97, .97); + transform: scale3d(.97, .97, .97); + } + + to { + opacity: 1; + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1); + } +} + +.bounceIn { + -webkit-animation-name: bounceIn; + animation-name: bounceIn; +} + +@-webkit-keyframes bounceInDown { + from, 60%, 75%, 90%, to { + -webkit-animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); + animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); + } + + 0% { + opacity: 0; + -webkit-transform: translate3d(0, -3000px, 0); + transform: translate3d(0, -3000px, 0); + } + + 60% { + opacity: 1; + -webkit-transform: translate3d(0, 25px, 0); + transform: translate3d(0, 25px, 0); + } + + 75% { + -webkit-transform: translate3d(0, -10px, 0); + transform: translate3d(0, -10px, 0); + } + + 90% { + -webkit-transform: translate3d(0, 5px, 0); + transform: translate3d(0, 5px, 0); + } + + to { + -webkit-transform: none; + transform: none; + } +} + +@keyframes bounceInDown { + from, 60%, 75%, 90%, to { + -webkit-animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); + animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); + } + + 0% { + opacity: 0; + -webkit-transform: translate3d(0, -3000px, 0); + transform: translate3d(0, -3000px, 0); + } + + 60% { + opacity: 1; + -webkit-transform: translate3d(0, 25px, 0); + transform: translate3d(0, 25px, 0); + } + + 75% { + -webkit-transform: translate3d(0, -10px, 0); + transform: translate3d(0, -10px, 0); + } + + 90% { + -webkit-transform: translate3d(0, 5px, 0); + transform: translate3d(0, 5px, 0); + } + + to { + -webkit-transform: none; + transform: none; + } +} + +.bounceInDown { + -webkit-animation-name: bounceInDown; + animation-name: bounceInDown; +} + +@-webkit-keyframes bounceInLeft { + from, 60%, 75%, 90%, to { + -webkit-animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); + animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); + } + + 0% { + opacity: 0; + -webkit-transform: translate3d(-3000px, 0, 0); + transform: translate3d(-3000px, 0, 0); + } + + 60% { + opacity: 1; + -webkit-transform: translate3d(25px, 0, 0); + transform: translate3d(25px, 0, 0); + } + + 75% { + -webkit-transform: translate3d(-10px, 0, 0); + transform: translate3d(-10px, 0, 0); + } + + 90% { + -webkit-transform: translate3d(5px, 0, 0); + transform: translate3d(5px, 0, 0); + } + + to { + -webkit-transform: none; + transform: none; + } +} + +@keyframes bounceInLeft { + from, 60%, 75%, 90%, to { + -webkit-animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); + animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); + } + + 0% { + opacity: 0; + -webkit-transform: translate3d(-3000px, 0, 0); + transform: translate3d(-3000px, 0, 0); + } + + 60% { + opacity: 1; + -webkit-transform: translate3d(25px, 0, 0); + transform: translate3d(25px, 0, 0); + } + + 75% { + -webkit-transform: translate3d(-10px, 0, 0); + transform: translate3d(-10px, 0, 0); + } + + 90% { + -webkit-transform: translate3d(5px, 0, 0); + transform: translate3d(5px, 0, 0); + } + + to { + -webkit-transform: none; + transform: none; + } +} + +.bounceInLeft { + -webkit-animation-name: bounceInLeft; + animation-name: bounceInLeft; +} + +@-webkit-keyframes bounceInRight { + from, 60%, 75%, 90%, to { + -webkit-animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); + animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); + } + + from { + opacity: 0; + -webkit-transform: translate3d(3000px, 0, 0); + transform: translate3d(3000px, 0, 0); + } + + 60% { + opacity: 1; + -webkit-transform: translate3d(-25px, 0, 0); + transform: translate3d(-25px, 0, 0); + } + + 75% { + -webkit-transform: translate3d(10px, 0, 0); + transform: translate3d(10px, 0, 0); + } + + 90% { + -webkit-transform: translate3d(-5px, 0, 0); + transform: translate3d(-5px, 0, 0); + } + + to { + -webkit-transform: none; + transform: none; + } +} + +@keyframes bounceInRight { + from, 60%, 75%, 90%, to { + -webkit-animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); + animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); + } + + from { + opacity: 0; + -webkit-transform: translate3d(3000px, 0, 0); + transform: translate3d(3000px, 0, 0); + } + + 60% { + opacity: 1; + -webkit-transform: translate3d(-25px, 0, 0); + transform: translate3d(-25px, 0, 0); + } + + 75% { + -webkit-transform: translate3d(10px, 0, 0); + transform: translate3d(10px, 0, 0); + } + + 90% { + -webkit-transform: translate3d(-5px, 0, 0); + transform: translate3d(-5px, 0, 0); + } + + to { + -webkit-transform: none; + transform: none; + } +} + +.bounceInRight { + -webkit-animation-name: bounceInRight; + animation-name: bounceInRight; +} + +@-webkit-keyframes bounceInUp { + from, 60%, 75%, 90%, to { + -webkit-animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); + animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); + } + + from { + opacity: 0; + -webkit-transform: translate3d(0, 3000px, 0); + transform: translate3d(0, 3000px, 0); + } + + 60% { + opacity: 1; + -webkit-transform: translate3d(0, -20px, 0); + transform: translate3d(0, -20px, 0); + } + + 75% { + -webkit-transform: translate3d(0, 10px, 0); + transform: translate3d(0, 10px, 0); + } + + 90% { + -webkit-transform: translate3d(0, -5px, 0); + transform: translate3d(0, -5px, 0); + } + + to { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } +} + +@keyframes bounceInUp { + from, 60%, 75%, 90%, to { + -webkit-animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); + animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); + } + + from { + opacity: 0; + -webkit-transform: translate3d(0, 3000px, 0); + transform: translate3d(0, 3000px, 0); + } + + 60% { + opacity: 1; + -webkit-transform: translate3d(0, -20px, 0); + transform: translate3d(0, -20px, 0); + } + + 75% { + -webkit-transform: translate3d(0, 10px, 0); + transform: translate3d(0, 10px, 0); + } + + 90% { + -webkit-transform: translate3d(0, -5px, 0); + transform: translate3d(0, -5px, 0); + } + + to { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } +} + +.bounceInUp { + -webkit-animation-name: bounceInUp; + animation-name: bounceInUp; +} + +@-webkit-keyframes bounceOut { + 20% { + -webkit-transform: scale3d(.9, .9, .9); + transform: scale3d(.9, .9, .9); + } + + 50%, 55% { + opacity: 1; + -webkit-transform: scale3d(1.1, 1.1, 1.1); + transform: scale3d(1.1, 1.1, 1.1); + } + + to { + opacity: 0; + -webkit-transform: scale3d(.3, .3, .3); + transform: scale3d(.3, .3, .3); + } +} + +@keyframes bounceOut { + 20% { + -webkit-transform: scale3d(.9, .9, .9); + transform: scale3d(.9, .9, .9); + } + + 50%, 55% { + opacity: 1; + -webkit-transform: scale3d(1.1, 1.1, 1.1); + transform: scale3d(1.1, 1.1, 1.1); + } + + to { + opacity: 0; + -webkit-transform: scale3d(.3, .3, .3); + transform: scale3d(.3, .3, .3); + } +} + +.bounceOut { + -webkit-animation-name: bounceOut; + animation-name: bounceOut; +} + +@-webkit-keyframes bounceOutDown { + 20% { + -webkit-transform: translate3d(0, 10px, 0); + transform: translate3d(0, 10px, 0); + } + + 40%, 45% { + opacity: 1; + -webkit-transform: translate3d(0, -20px, 0); + transform: translate3d(0, -20px, 0); + } + + to { + opacity: 0; + -webkit-transform: translate3d(0, 2000px, 0); + transform: translate3d(0, 2000px, 0); + } +} + +@keyframes bounceOutDown { + 20% { + -webkit-transform: translate3d(0, 10px, 0); + transform: translate3d(0, 10px, 0); + } + + 40%, 45% { + opacity: 1; + -webkit-transform: translate3d(0, -20px, 0); + transform: translate3d(0, -20px, 0); + } + + to { + opacity: 0; + -webkit-transform: translate3d(0, 2000px, 0); + transform: translate3d(0, 2000px, 0); + } +} + +.bounceOutDown { + -webkit-animation-name: bounceOutDown; + animation-name: bounceOutDown; +} + +@-webkit-keyframes bounceOutLeft { + 20% { + opacity: 1; + -webkit-transform: translate3d(20px, 0, 0); + transform: translate3d(20px, 0, 0); + } + + to { + opacity: 0; + -webkit-transform: translate3d(-2000px, 0, 0); + transform: translate3d(-2000px, 0, 0); + } +} + +@keyframes bounceOutLeft { + 20% { + opacity: 1; + -webkit-transform: translate3d(20px, 0, 0); + transform: translate3d(20px, 0, 0); + } + + to { + opacity: 0; + -webkit-transform: translate3d(-2000px, 0, 0); + transform: translate3d(-2000px, 0, 0); + } +} + +.bounceOutLeft { + -webkit-animation-name: bounceOutLeft; + animation-name: bounceOutLeft; +} + +@-webkit-keyframes bounceOutRight { + 20% { + opacity: 1; + -webkit-transform: translate3d(-20px, 0, 0); + transform: translate3d(-20px, 0, 0); + } + + to { + opacity: 0; + -webkit-transform: translate3d(2000px, 0, 0); + transform: translate3d(2000px, 0, 0); + } +} + +@keyframes bounceOutRight { + 20% { + opacity: 1; + -webkit-transform: translate3d(-20px, 0, 0); + transform: translate3d(-20px, 0, 0); + } + + to { + opacity: 0; + -webkit-transform: translate3d(2000px, 0, 0); + transform: translate3d(2000px, 0, 0); + } +} + +.bounceOutRight { + -webkit-animation-name: bounceOutRight; + animation-name: bounceOutRight; +} + +@-webkit-keyframes bounceOutUp { + 20% { + -webkit-transform: translate3d(0, -10px, 0); + transform: translate3d(0, -10px, 0); + } + + 40%, 45% { + opacity: 1; + -webkit-transform: translate3d(0, 20px, 0); + transform: translate3d(0, 20px, 0); + } + + to { + opacity: 0; + -webkit-transform: translate3d(0, -2000px, 0); + transform: translate3d(0, -2000px, 0); + } +} + +@keyframes bounceOutUp { + 20% { + -webkit-transform: translate3d(0, -10px, 0); + transform: translate3d(0, -10px, 0); + } + + 40%, 45% { + opacity: 1; + -webkit-transform: translate3d(0, 20px, 0); + transform: translate3d(0, 20px, 0); + } + + to { + opacity: 0; + -webkit-transform: translate3d(0, -2000px, 0); + transform: translate3d(0, -2000px, 0); + } +} + +.bounceOutUp { + -webkit-animation-name: bounceOutUp; + animation-name: bounceOutUp; +} + +@-webkit-keyframes fadeIn { + from { + opacity: 0; + } + + to { + opacity: 1; + } +} + +@keyframes fadeIn { + from { + opacity: 0; + } + + to { + opacity: 1; + } +} + +.fadeIn { + -webkit-animation-name: fadeIn; + animation-name: fadeIn; +} + +@-webkit-keyframes fadeInDown { + from { + opacity: 0; + -webkit-transform: translate3d(0, -100%, 0); + transform: translate3d(0, -100%, 0); + } + + to { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} + +@keyframes fadeInDown { + from { + opacity: 0; + -webkit-transform: translate3d(0, -100%, 0); + transform: translate3d(0, -100%, 0); + } + + to { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} + +.fadeInDown { + -webkit-animation-name: fadeInDown; + animation-name: fadeInDown; +} + +@-webkit-keyframes fadeInDownBig { + from { + opacity: 0; + -webkit-transform: translate3d(0, -2000px, 0); + transform: translate3d(0, -2000px, 0); + } + + to { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} + +@keyframes fadeInDownBig { + from { + opacity: 0; + -webkit-transform: translate3d(0, -2000px, 0); + transform: translate3d(0, -2000px, 0); + } + + to { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} + +.fadeInDownBig { + -webkit-animation-name: fadeInDownBig; + animation-name: fadeInDownBig; +} + +@-webkit-keyframes fadeInLeft { + from { + opacity: 0; + -webkit-transform: translate3d(-100%, 0, 0); + transform: translate3d(-100%, 0, 0); + } + + to { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} + +@keyframes fadeInLeft { + from { + opacity: 0; + -webkit-transform: translate3d(-100%, 0, 0); + transform: translate3d(-100%, 0, 0); + } + + to { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} + +.fadeInLeft { + -webkit-animation-name: fadeInLeft; + animation-name: fadeInLeft; +} + +@-webkit-keyframes fadeInLeftBig { + from { + opacity: 0; + -webkit-transform: translate3d(-2000px, 0, 0); + transform: translate3d(-2000px, 0, 0); + } + + to { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} + +@keyframes fadeInLeftBig { + from { + opacity: 0; + -webkit-transform: translate3d(-2000px, 0, 0); + transform: translate3d(-2000px, 0, 0); + } + + to { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} + +.fadeInLeftBig { + -webkit-animation-name: fadeInLeftBig; + animation-name: fadeInLeftBig; +} + +@-webkit-keyframes fadeInRight { + from { + opacity: 0; + -webkit-transform: translate3d(100%, 0, 0); + transform: translate3d(100%, 0, 0); + } + + to { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} + +@keyframes fadeInRight { + from { + opacity: 0; + -webkit-transform: translate3d(100%, 0, 0); + transform: translate3d(100%, 0, 0); + } + + to { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} + +.fadeInRight { + -webkit-animation-name: fadeInRight; + animation-name: fadeInRight; +} + +@-webkit-keyframes fadeInRightBig { + from { + opacity: 0; + -webkit-transform: translate3d(2000px, 0, 0); + transform: translate3d(2000px, 0, 0); + } + + to { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} + +@keyframes fadeInRightBig { + from { + opacity: 0; + -webkit-transform: translate3d(2000px, 0, 0); + transform: translate3d(2000px, 0, 0); + } + + to { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} + +.fadeInRightBig { + -webkit-animation-name: fadeInRightBig; + animation-name: fadeInRightBig; +} + +@-webkit-keyframes fadeInUp { + from { + opacity: 0; + -webkit-transform: translate3d(0, 100%, 0); + transform: translate3d(0, 100%, 0); + } + + to { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} + +@keyframes fadeInUp { + from { + opacity: 0; + -webkit-transform: translate3d(0, 100%, 0); + transform: translate3d(0, 100%, 0); + } + + to { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} + +.fadeInUp { + -webkit-animation-name: fadeInUp; + animation-name: fadeInUp; +} + +@-webkit-keyframes fadeInUpBig { + from { + opacity: 0; + -webkit-transform: translate3d(0, 2000px, 0); + transform: translate3d(0, 2000px, 0); + } + + to { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} + +@keyframes fadeInUpBig { + from { + opacity: 0; + -webkit-transform: translate3d(0, 2000px, 0); + transform: translate3d(0, 2000px, 0); + } + + to { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} + +.fadeInUpBig { + -webkit-animation-name: fadeInUpBig; + animation-name: fadeInUpBig; +} + +@-webkit-keyframes fadeOut { + from { + opacity: 1; + } + + to { + opacity: 0; + } +} + +@keyframes fadeOut { + from { + opacity: 1; + } + + to { + opacity: 0; + } +} + +.fadeOut { + -webkit-animation-name: fadeOut; + animation-name: fadeOut; +} + +@-webkit-keyframes fadeOutDown { + from { + opacity: 1; + } + + to { + opacity: 0; + -webkit-transform: translate3d(0, 100%, 0); + transform: translate3d(0, 100%, 0); + } +} + +@keyframes fadeOutDown { + from { + opacity: 1; + } + + to { + opacity: 0; + -webkit-transform: translate3d(0, 100%, 0); + transform: translate3d(0, 100%, 0); + } +} + +.fadeOutDown { + -webkit-animation-name: fadeOutDown; + animation-name: fadeOutDown; +} + +@-webkit-keyframes fadeOutDownBig { + from { + opacity: 1; + } + + to { + opacity: 0; + -webkit-transform: translate3d(0, 2000px, 0); + transform: translate3d(0, 2000px, 0); + } +} + +@keyframes fadeOutDownBig { + from { + opacity: 1; + } + + to { + opacity: 0; + -webkit-transform: translate3d(0, 2000px, 0); + transform: translate3d(0, 2000px, 0); + } +} + +.fadeOutDownBig { + -webkit-animation-name: fadeOutDownBig; + animation-name: fadeOutDownBig; +} + +@-webkit-keyframes fadeOutLeft { + from { + opacity: 1; + } + + to { + opacity: 0; + -webkit-transform: translate3d(-100%, 0, 0); + transform: translate3d(-100%, 0, 0); + } +} + +@keyframes fadeOutLeft { + from { + opacity: 1; + } + + to { + opacity: 0; + -webkit-transform: translate3d(-100%, 0, 0); + transform: translate3d(-100%, 0, 0); + } +} + +.fadeOutLeft { + -webkit-animation-name: fadeOutLeft; + animation-name: fadeOutLeft; +} + +@-webkit-keyframes fadeOutLeftBig { + from { + opacity: 1; + } + + to { + opacity: 0; + -webkit-transform: translate3d(-2000px, 0, 0); + transform: translate3d(-2000px, 0, 0); + } +} + +@keyframes fadeOutLeftBig { + from { + opacity: 1; + } + + to { + opacity: 0; + -webkit-transform: translate3d(-2000px, 0, 0); + transform: translate3d(-2000px, 0, 0); + } +} + +.fadeOutLeftBig { + -webkit-animation-name: fadeOutLeftBig; + animation-name: fadeOutLeftBig; +} + +@-webkit-keyframes fadeOutRight { + from { + opacity: 1; + } + + to { + opacity: 0; + -webkit-transform: translate3d(100%, 0, 0); + transform: translate3d(100%, 0, 0); + } +} + +@keyframes fadeOutRight { + from { + opacity: 1; + } + + to { + opacity: 0; + -webkit-transform: translate3d(100%, 0, 0); + transform: translate3d(100%, 0, 0); + } +} + +.fadeOutRight { + -webkit-animation-name: fadeOutRight; + animation-name: fadeOutRight; +} + +@-webkit-keyframes fadeOutRightBig { + from { + opacity: 1; + } + + to { + opacity: 0; + -webkit-transform: translate3d(2000px, 0, 0); + transform: translate3d(2000px, 0, 0); + } +} + +@keyframes fadeOutRightBig { + from { + opacity: 1; + } + + to { + opacity: 0; + -webkit-transform: translate3d(2000px, 0, 0); + transform: translate3d(2000px, 0, 0); + } +} + +.fadeOutRightBig { + -webkit-animation-name: fadeOutRightBig; + animation-name: fadeOutRightBig; +} + +@-webkit-keyframes fadeOutUp { + from { + opacity: 1; + } + + to { + opacity: 0; + -webkit-transform: translate3d(0, -100%, 0); + transform: translate3d(0, -100%, 0); + } +} + +@keyframes fadeOutUp { + from { + opacity: 1; + } + + to { + opacity: 0; + -webkit-transform: translate3d(0, -100%, 0); + transform: translate3d(0, -100%, 0); + } +} + +.fadeOutUp { + -webkit-animation-name: fadeOutUp; + animation-name: fadeOutUp; +} + +@-webkit-keyframes fadeOutUpBig { + from { + opacity: 1; + } + + to { + opacity: 0; + -webkit-transform: translate3d(0, -2000px, 0); + transform: translate3d(0, -2000px, 0); + } +} + +@keyframes fadeOutUpBig { + from { + opacity: 1; + } + + to { + opacity: 0; + -webkit-transform: translate3d(0, -2000px, 0); + transform: translate3d(0, -2000px, 0); + } +} + +.fadeOutUpBig { + -webkit-animation-name: fadeOutUpBig; + animation-name: fadeOutUpBig; +} + +@-webkit-keyframes flip { + from { + -webkit-transform: perspective(400px) rotate3d(0, 1, 0, -360deg); + transform: perspective(400px) rotate3d(0, 1, 0, -360deg); + -webkit-animation-timing-function: ease-out; + animation-timing-function: ease-out; + } + + 40% { + -webkit-transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -190deg); + transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -190deg); + -webkit-animation-timing-function: ease-out; + animation-timing-function: ease-out; + } + + 50% { + -webkit-transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -170deg); + transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -170deg); + -webkit-animation-timing-function: ease-in; + animation-timing-function: ease-in; + } + + 80% { + -webkit-transform: perspective(400px) scale3d(.95, .95, .95); + transform: perspective(400px) scale3d(.95, .95, .95); + -webkit-animation-timing-function: ease-in; + animation-timing-function: ease-in; + } + + to { + -webkit-transform: perspective(400px); + transform: perspective(400px); + -webkit-animation-timing-function: ease-in; + animation-timing-function: ease-in; + } +} + +@keyframes flip { + from { + -webkit-transform: perspective(400px) rotate3d(0, 1, 0, -360deg); + transform: perspective(400px) rotate3d(0, 1, 0, -360deg); + -webkit-animation-timing-function: ease-out; + animation-timing-function: ease-out; + } + + 40% { + -webkit-transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -190deg); + transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -190deg); + -webkit-animation-timing-function: ease-out; + animation-timing-function: ease-out; + } + + 50% { + -webkit-transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -170deg); + transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -170deg); + -webkit-animation-timing-function: ease-in; + animation-timing-function: ease-in; + } + + 80% { + -webkit-transform: perspective(400px) scale3d(.95, .95, .95); + transform: perspective(400px) scale3d(.95, .95, .95); + -webkit-animation-timing-function: ease-in; + animation-timing-function: ease-in; + } + + to { + -webkit-transform: perspective(400px); + transform: perspective(400px); + -webkit-animation-timing-function: ease-in; + animation-timing-function: ease-in; + } +} + +.animated.flip { + -webkit-backface-visibility: visible; + backface-visibility: visible; + -webkit-animation-name: flip; + animation-name: flip; +} + +@-webkit-keyframes flipInX { + from { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 90deg); + transform: perspective(400px) rotate3d(1, 0, 0, 90deg); + -webkit-animation-timing-function: ease-in; + animation-timing-function: ease-in; + opacity: 0; + } + + 40% { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -20deg); + transform: perspective(400px) rotate3d(1, 0, 0, -20deg); + -webkit-animation-timing-function: ease-in; + animation-timing-function: ease-in; + } + + 60% { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 10deg); + transform: perspective(400px) rotate3d(1, 0, 0, 10deg); + opacity: 1; + } + + 80% { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -5deg); + transform: perspective(400px) rotate3d(1, 0, 0, -5deg); + } + + to { + -webkit-transform: perspective(400px); + transform: perspective(400px); + } +} + +@keyframes flipInX { + from { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 90deg); + transform: perspective(400px) rotate3d(1, 0, 0, 90deg); + -webkit-animation-timing-function: ease-in; + animation-timing-function: ease-in; + opacity: 0; + } + + 40% { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -20deg); + transform: perspective(400px) rotate3d(1, 0, 0, -20deg); + -webkit-animation-timing-function: ease-in; + animation-timing-function: ease-in; + } + + 60% { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 10deg); + transform: perspective(400px) rotate3d(1, 0, 0, 10deg); + opacity: 1; + } + + 80% { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -5deg); + transform: perspective(400px) rotate3d(1, 0, 0, -5deg); + } + + to { + -webkit-transform: perspective(400px); + transform: perspective(400px); + } +} + +.flipInX { + -webkit-backface-visibility: visible !important; + backface-visibility: visible !important; + -webkit-animation-name: flipInX; + animation-name: flipInX; +} + +@-webkit-keyframes flipInY { + from { + -webkit-transform: perspective(400px) rotate3d(0, 1, 0, 90deg); + transform: perspective(400px) rotate3d(0, 1, 0, 90deg); + -webkit-animation-timing-function: ease-in; + animation-timing-function: ease-in; + opacity: 0; + } + + 40% { + -webkit-transform: perspective(400px) rotate3d(0, 1, 0, -20deg); + transform: perspective(400px) rotate3d(0, 1, 0, -20deg); + -webkit-animation-timing-function: ease-in; + animation-timing-function: ease-in; + } + + 60% { + -webkit-transform: perspective(400px) rotate3d(0, 1, 0, 10deg); + transform: perspective(400px) rotate3d(0, 1, 0, 10deg); + opacity: 1; + } + + 80% { + -webkit-transform: perspective(400px) rotate3d(0, 1, 0, -5deg); + transform: perspective(400px) rotate3d(0, 1, 0, -5deg); + } + + to { + -webkit-transform: perspective(400px); + transform: perspective(400px); + } +} + +@keyframes flipInY { + from { + -webkit-transform: perspective(400px) rotate3d(0, 1, 0, 90deg); + transform: perspective(400px) rotate3d(0, 1, 0, 90deg); + -webkit-animation-timing-function: ease-in; + animation-timing-function: ease-in; + opacity: 0; + } + + 40% { + -webkit-transform: perspective(400px) rotate3d(0, 1, 0, -20deg); + transform: perspective(400px) rotate3d(0, 1, 0, -20deg); + -webkit-animation-timing-function: ease-in; + animation-timing-function: ease-in; + } + + 60% { + -webkit-transform: perspective(400px) rotate3d(0, 1, 0, 10deg); + transform: perspective(400px) rotate3d(0, 1, 0, 10deg); + opacity: 1; + } + + 80% { + -webkit-transform: perspective(400px) rotate3d(0, 1, 0, -5deg); + transform: perspective(400px) rotate3d(0, 1, 0, -5deg); + } + + to { + -webkit-transform: perspective(400px); + transform: perspective(400px); + } +} + +.flipInY { + -webkit-backface-visibility: visible !important; + backface-visibility: visible !important; + -webkit-animation-name: flipInY; + animation-name: flipInY; +} + +@-webkit-keyframes flipOutX { + from { + -webkit-transform: perspective(400px); + transform: perspective(400px); + } + + 30% { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -20deg); + transform: perspective(400px) rotate3d(1, 0, 0, -20deg); + opacity: 1; + } + + to { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 90deg); + transform: perspective(400px) rotate3d(1, 0, 0, 90deg); + opacity: 0; + } +} + +@keyframes flipOutX { + from { + -webkit-transform: perspective(400px); + transform: perspective(400px); + } + + 30% { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -20deg); + transform: perspective(400px) rotate3d(1, 0, 0, -20deg); + opacity: 1; + } + + to { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 90deg); + transform: perspective(400px) rotate3d(1, 0, 0, 90deg); + opacity: 0; + } +} + +.flipOutX { + -webkit-animation-name: flipOutX; + animation-name: flipOutX; + -webkit-backface-visibility: visible !important; + backface-visibility: visible !important; +} + +@-webkit-keyframes flipOutY { + from { + -webkit-transform: perspective(400px); + transform: perspective(400px); + } + + 30% { + -webkit-transform: perspective(400px) rotate3d(0, 1, 0, -15deg); + transform: perspective(400px) rotate3d(0, 1, 0, -15deg); + opacity: 1; + } + + to { + -webkit-transform: perspective(400px) rotate3d(0, 1, 0, 90deg); + transform: perspective(400px) rotate3d(0, 1, 0, 90deg); + opacity: 0; + } +} + +@keyframes flipOutY { + from { + -webkit-transform: perspective(400px); + transform: perspective(400px); + } + + 30% { + -webkit-transform: perspective(400px) rotate3d(0, 1, 0, -15deg); + transform: perspective(400px) rotate3d(0, 1, 0, -15deg); + opacity: 1; + } + + to { + -webkit-transform: perspective(400px) rotate3d(0, 1, 0, 90deg); + transform: perspective(400px) rotate3d(0, 1, 0, 90deg); + opacity: 0; + } +} + +.flipOutY { + -webkit-backface-visibility: visible !important; + backface-visibility: visible !important; + -webkit-animation-name: flipOutY; + animation-name: flipOutY; +} + +@-webkit-keyframes lightSpeedIn { + from { + -webkit-transform: translate3d(100%, 0, 0) skewX(-30deg); + transform: translate3d(100%, 0, 0) skewX(-30deg); + opacity: 0; + } + + 60% { + -webkit-transform: skewX(20deg); + transform: skewX(20deg); + opacity: 1; + } + + 80% { + -webkit-transform: skewX(-5deg); + transform: skewX(-5deg); + opacity: 1; + } + + to { + -webkit-transform: none; + transform: none; + opacity: 1; + } +} + +@keyframes lightSpeedIn { + from { + -webkit-transform: translate3d(100%, 0, 0) skewX(-30deg); + transform: translate3d(100%, 0, 0) skewX(-30deg); + opacity: 0; + } + + 60% { + -webkit-transform: skewX(20deg); + transform: skewX(20deg); + opacity: 1; + } + + 80% { + -webkit-transform: skewX(-5deg); + transform: skewX(-5deg); + opacity: 1; + } + + to { + -webkit-transform: none; + transform: none; + opacity: 1; + } +} + +.lightSpeedIn { + -webkit-animation-name: lightSpeedIn; + animation-name: lightSpeedIn; + -webkit-animation-timing-function: ease-out; + animation-timing-function: ease-out; +} + +@-webkit-keyframes lightSpeedOut { + from { + opacity: 1; + } + + to { + -webkit-transform: translate3d(100%, 0, 0) skewX(30deg); + transform: translate3d(100%, 0, 0) skewX(30deg); + opacity: 0; + } +} + +@keyframes lightSpeedOut { + from { + opacity: 1; + } + + to { + -webkit-transform: translate3d(100%, 0, 0) skewX(30deg); + transform: translate3d(100%, 0, 0) skewX(30deg); + opacity: 0; + } +} + +.lightSpeedOut { + -webkit-animation-name: lightSpeedOut; + animation-name: lightSpeedOut; + -webkit-animation-timing-function: ease-in; + animation-timing-function: ease-in; +} + +@-webkit-keyframes rotateIn { + from { + -webkit-transform-origin: center; + transform-origin: center; + -webkit-transform: rotate3d(0, 0, 1, -200deg); + transform: rotate3d(0, 0, 1, -200deg); + opacity: 0; + } + + to { + -webkit-transform-origin: center; + transform-origin: center; + -webkit-transform: none; + transform: none; + opacity: 1; + } +} + +@keyframes rotateIn { + from { + -webkit-transform-origin: center; + transform-origin: center; + -webkit-transform: rotate3d(0, 0, 1, -200deg); + transform: rotate3d(0, 0, 1, -200deg); + opacity: 0; + } + + to { + -webkit-transform-origin: center; + transform-origin: center; + -webkit-transform: none; + transform: none; + opacity: 1; + } +} + +.rotateIn { + -webkit-animation-name: rotateIn; + animation-name: rotateIn; +} + +@-webkit-keyframes rotateInDownLeft { + from { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate3d(0, 0, 1, -45deg); + transform: rotate3d(0, 0, 1, -45deg); + opacity: 0; + } + + to { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: none; + transform: none; + opacity: 1; + } +} + +@keyframes rotateInDownLeft { + from { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate3d(0, 0, 1, -45deg); + transform: rotate3d(0, 0, 1, -45deg); + opacity: 0; + } + + to { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: none; + transform: none; + opacity: 1; + } +} + +.rotateInDownLeft { + -webkit-animation-name: rotateInDownLeft; + animation-name: rotateInDownLeft; +} + +@-webkit-keyframes rotateInDownRight { + from { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate3d(0, 0, 1, 45deg); + transform: rotate3d(0, 0, 1, 45deg); + opacity: 0; + } + + to { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: none; + transform: none; + opacity: 1; + } +} + +@keyframes rotateInDownRight { + from { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate3d(0, 0, 1, 45deg); + transform: rotate3d(0, 0, 1, 45deg); + opacity: 0; + } + + to { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: none; + transform: none; + opacity: 1; + } +} + +.rotateInDownRight { + -webkit-animation-name: rotateInDownRight; + animation-name: rotateInDownRight; +} + +@-webkit-keyframes rotateInUpLeft { + from { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate3d(0, 0, 1, 45deg); + transform: rotate3d(0, 0, 1, 45deg); + opacity: 0; + } + + to { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: none; + transform: none; + opacity: 1; + } +} + +@keyframes rotateInUpLeft { + from { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate3d(0, 0, 1, 45deg); + transform: rotate3d(0, 0, 1, 45deg); + opacity: 0; + } + + to { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: none; + transform: none; + opacity: 1; + } +} + +.rotateInUpLeft { + -webkit-animation-name: rotateInUpLeft; + animation-name: rotateInUpLeft; +} + +@-webkit-keyframes rotateInUpRight { + from { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate3d(0, 0, 1, -90deg); + transform: rotate3d(0, 0, 1, -90deg); + opacity: 0; + } + + to { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: none; + transform: none; + opacity: 1; + } +} + +@keyframes rotateInUpRight { + from { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate3d(0, 0, 1, -90deg); + transform: rotate3d(0, 0, 1, -90deg); + opacity: 0; + } + + to { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: none; + transform: none; + opacity: 1; + } +} + +.rotateInUpRight { + -webkit-animation-name: rotateInUpRight; + animation-name: rotateInUpRight; +} + +@-webkit-keyframes rotateOut { + from { + -webkit-transform-origin: center; + transform-origin: center; + opacity: 1; + } + + to { + -webkit-transform-origin: center; + transform-origin: center; + -webkit-transform: rotate3d(0, 0, 1, 200deg); + transform: rotate3d(0, 0, 1, 200deg); + opacity: 0; + } +} + +@keyframes rotateOut { + from { + -webkit-transform-origin: center; + transform-origin: center; + opacity: 1; + } + + to { + -webkit-transform-origin: center; + transform-origin: center; + -webkit-transform: rotate3d(0, 0, 1, 200deg); + transform: rotate3d(0, 0, 1, 200deg); + opacity: 0; + } +} + +.rotateOut { + -webkit-animation-name: rotateOut; + animation-name: rotateOut; +} + +@-webkit-keyframes rotateOutDownLeft { + from { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + opacity: 1; + } + + to { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate3d(0, 0, 1, 45deg); + transform: rotate3d(0, 0, 1, 45deg); + opacity: 0; + } +} + +@keyframes rotateOutDownLeft { + from { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + opacity: 1; + } + + to { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate3d(0, 0, 1, 45deg); + transform: rotate3d(0, 0, 1, 45deg); + opacity: 0; + } +} + +.rotateOutDownLeft { + -webkit-animation-name: rotateOutDownLeft; + animation-name: rotateOutDownLeft; +} + +@-webkit-keyframes rotateOutDownRight { + from { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + opacity: 1; + } + + to { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate3d(0, 0, 1, -45deg); + transform: rotate3d(0, 0, 1, -45deg); + opacity: 0; + } +} + +@keyframes rotateOutDownRight { + from { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + opacity: 1; + } + + to { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate3d(0, 0, 1, -45deg); + transform: rotate3d(0, 0, 1, -45deg); + opacity: 0; + } +} + +.rotateOutDownRight { + -webkit-animation-name: rotateOutDownRight; + animation-name: rotateOutDownRight; +} + +@-webkit-keyframes rotateOutUpLeft { + from { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + opacity: 1; + } + + to { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate3d(0, 0, 1, -45deg); + transform: rotate3d(0, 0, 1, -45deg); + opacity: 0; + } +} + +@keyframes rotateOutUpLeft { + from { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + opacity: 1; + } + + to { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate3d(0, 0, 1, -45deg); + transform: rotate3d(0, 0, 1, -45deg); + opacity: 0; + } +} + +.rotateOutUpLeft { + -webkit-animation-name: rotateOutUpLeft; + animation-name: rotateOutUpLeft; +} + +@-webkit-keyframes rotateOutUpRight { + from { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + opacity: 1; + } + + to { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate3d(0, 0, 1, 90deg); + transform: rotate3d(0, 0, 1, 90deg); + opacity: 0; + } +} + +@keyframes rotateOutUpRight { + from { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + opacity: 1; + } + + to { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate3d(0, 0, 1, 90deg); + transform: rotate3d(0, 0, 1, 90deg); + opacity: 0; + } +} + +.rotateOutUpRight { + -webkit-animation-name: rotateOutUpRight; + animation-name: rotateOutUpRight; +} + +@-webkit-keyframes hinge { + 0% { + -webkit-transform-origin: top left; + transform-origin: top left; + -webkit-animation-timing-function: ease-in-out; + animation-timing-function: ease-in-out; + } + + 20%, 60% { + -webkit-transform: rotate3d(0, 0, 1, 80deg); + transform: rotate3d(0, 0, 1, 80deg); + -webkit-transform-origin: top left; + transform-origin: top left; + -webkit-animation-timing-function: ease-in-out; + animation-timing-function: ease-in-out; + } + + 40%, 80% { + -webkit-transform: rotate3d(0, 0, 1, 60deg); + transform: rotate3d(0, 0, 1, 60deg); + -webkit-transform-origin: top left; + transform-origin: top left; + -webkit-animation-timing-function: ease-in-out; + animation-timing-function: ease-in-out; + opacity: 1; + } + + to { + -webkit-transform: translate3d(0, 700px, 0); + transform: translate3d(0, 700px, 0); + opacity: 0; + } +} + +@keyframes hinge { + 0% { + -webkit-transform-origin: top left; + transform-origin: top left; + -webkit-animation-timing-function: ease-in-out; + animation-timing-function: ease-in-out; + } + + 20%, 60% { + -webkit-transform: rotate3d(0, 0, 1, 80deg); + transform: rotate3d(0, 0, 1, 80deg); + -webkit-transform-origin: top left; + transform-origin: top left; + -webkit-animation-timing-function: ease-in-out; + animation-timing-function: ease-in-out; + } + + 40%, 80% { + -webkit-transform: rotate3d(0, 0, 1, 60deg); + transform: rotate3d(0, 0, 1, 60deg); + -webkit-transform-origin: top left; + transform-origin: top left; + -webkit-animation-timing-function: ease-in-out; + animation-timing-function: ease-in-out; + opacity: 1; + } + + to { + -webkit-transform: translate3d(0, 700px, 0); + transform: translate3d(0, 700px, 0); + opacity: 0; + } +} + +.hinge { + -webkit-animation-name: hinge; + animation-name: hinge; +} + +/* originally authored by Nick Pettit - https://github.com/nickpettit/glide */ + +@-webkit-keyframes rollIn { + from { + opacity: 0; + -webkit-transform: translate3d(-100%, 0, 0) rotate3d(0, 0, 1, -120deg); + transform: translate3d(-100%, 0, 0) rotate3d(0, 0, 1, -120deg); + } + + to { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} + +@keyframes rollIn { + from { + opacity: 0; + -webkit-transform: translate3d(-100%, 0, 0) rotate3d(0, 0, 1, -120deg); + transform: translate3d(-100%, 0, 0) rotate3d(0, 0, 1, -120deg); + } + + to { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} + +.rollIn { + -webkit-animation-name: rollIn; + animation-name: rollIn; +} + +/* originally authored by Nick Pettit - https://github.com/nickpettit/glide */ + +@-webkit-keyframes rollOut { + from { + opacity: 1; + } + + to { + opacity: 0; + -webkit-transform: translate3d(100%, 0, 0) rotate3d(0, 0, 1, 120deg); + transform: translate3d(100%, 0, 0) rotate3d(0, 0, 1, 120deg); + } +} + +@keyframes rollOut { + from { + opacity: 1; + } + + to { + opacity: 0; + -webkit-transform: translate3d(100%, 0, 0) rotate3d(0, 0, 1, 120deg); + transform: translate3d(100%, 0, 0) rotate3d(0, 0, 1, 120deg); + } +} + +.rollOut { + -webkit-animation-name: rollOut; + animation-name: rollOut; +} + +@-webkit-keyframes zoomIn { + from { + opacity: 0; + -webkit-transform: scale3d(.3, .3, .3); + transform: scale3d(.3, .3, .3); + } + + 50% { + opacity: 1; + } +} + +@keyframes zoomIn { + from { + opacity: 0; + -webkit-transform: scale3d(.3, .3, .3); + transform: scale3d(.3, .3, .3); + } + + 50% { + opacity: 1; + } +} + +.zoomIn { + -webkit-animation-name: zoomIn; + animation-name: zoomIn; +} + +@-webkit-keyframes zoomInDown { + from { + opacity: 0; + -webkit-transform: scale3d(.1, .1, .1) translate3d(0, -1000px, 0); + transform: scale3d(.1, .1, .1) translate3d(0, -1000px, 0); + -webkit-animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190); + animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190); + } + + 60% { + opacity: 1; + -webkit-transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0); + transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0); + -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1); + animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1); + } +} + +@keyframes zoomInDown { + from { + opacity: 0; + -webkit-transform: scale3d(.1, .1, .1) translate3d(0, -1000px, 0); + transform: scale3d(.1, .1, .1) translate3d(0, -1000px, 0); + -webkit-animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190); + animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190); + } + + 60% { + opacity: 1; + -webkit-transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0); + transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0); + -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1); + animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1); + } +} + +.zoomInDown { + -webkit-animation-name: zoomInDown; + animation-name: zoomInDown; +} + +@-webkit-keyframes zoomInLeft { + from { + opacity: 0; + -webkit-transform: scale3d(.1, .1, .1) translate3d(-1000px, 0, 0); + transform: scale3d(.1, .1, .1) translate3d(-1000px, 0, 0); + -webkit-animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190); + animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190); + } + + 60% { + opacity: 1; + -webkit-transform: scale3d(.475, .475, .475) translate3d(10px, 0, 0); + transform: scale3d(.475, .475, .475) translate3d(10px, 0, 0); + -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1); + animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1); + } +} + +@keyframes zoomInLeft { + from { + opacity: 0; + -webkit-transform: scale3d(.1, .1, .1) translate3d(-1000px, 0, 0); + transform: scale3d(.1, .1, .1) translate3d(-1000px, 0, 0); + -webkit-animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190); + animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190); + } + + 60% { + opacity: 1; + -webkit-transform: scale3d(.475, .475, .475) translate3d(10px, 0, 0); + transform: scale3d(.475, .475, .475) translate3d(10px, 0, 0); + -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1); + animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1); + } +} + +.zoomInLeft { + -webkit-animation-name: zoomInLeft; + animation-name: zoomInLeft; +} + +@-webkit-keyframes zoomInRight { + from { + opacity: 0; + -webkit-transform: scale3d(.1, .1, .1) translate3d(1000px, 0, 0); + transform: scale3d(.1, .1, .1) translate3d(1000px, 0, 0); + -webkit-animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190); + animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190); + } + + 60% { + opacity: 1; + -webkit-transform: scale3d(.475, .475, .475) translate3d(-10px, 0, 0); + transform: scale3d(.475, .475, .475) translate3d(-10px, 0, 0); + -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1); + animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1); + } +} + +@keyframes zoomInRight { + from { + opacity: 0; + -webkit-transform: scale3d(.1, .1, .1) translate3d(1000px, 0, 0); + transform: scale3d(.1, .1, .1) translate3d(1000px, 0, 0); + -webkit-animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190); + animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190); + } + + 60% { + opacity: 1; + -webkit-transform: scale3d(.475, .475, .475) translate3d(-10px, 0, 0); + transform: scale3d(.475, .475, .475) translate3d(-10px, 0, 0); + -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1); + animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1); + } +} + +.zoomInRight { + -webkit-animation-name: zoomInRight; + animation-name: zoomInRight; +} + +@-webkit-keyframes zoomInUp { + from { + opacity: 0; + -webkit-transform: scale3d(.1, .1, .1) translate3d(0, 1000px, 0); + transform: scale3d(.1, .1, .1) translate3d(0, 1000px, 0); + -webkit-animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190); + animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190); + } + + 60% { + opacity: 1; + -webkit-transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0); + transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0); + -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1); + animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1); + } +} + +@keyframes zoomInUp { + from { + opacity: 0; + -webkit-transform: scale3d(.1, .1, .1) translate3d(0, 1000px, 0); + transform: scale3d(.1, .1, .1) translate3d(0, 1000px, 0); + -webkit-animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190); + animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190); + } + + 60% { + opacity: 1; + -webkit-transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0); + transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0); + -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1); + animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1); + } +} + +.zoomInUp { + -webkit-animation-name: zoomInUp; + animation-name: zoomInUp; +} + +@-webkit-keyframes zoomOut { + from { + opacity: 1; + } + + 50% { + opacity: 0; + -webkit-transform: scale3d(.3, .3, .3); + transform: scale3d(.3, .3, .3); + } + + to { + opacity: 0; + } +} + +@keyframes zoomOut { + from { + opacity: 1; + } + + 50% { + opacity: 0; + -webkit-transform: scale3d(.3, .3, .3); + transform: scale3d(.3, .3, .3); + } + + to { + opacity: 0; + } +} + +.zoomOut { + -webkit-animation-name: zoomOut; + animation-name: zoomOut; +} + +@-webkit-keyframes zoomOutDown { + 40% { + opacity: 1; + -webkit-transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0); + transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0); + -webkit-animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190); + animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190); + } + + to { + opacity: 0; + -webkit-transform: scale3d(.1, .1, .1) translate3d(0, 2000px, 0); + transform: scale3d(.1, .1, .1) translate3d(0, 2000px, 0); + -webkit-transform-origin: center bottom; + transform-origin: center bottom; + -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1); + animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1); + } +} + +@keyframes zoomOutDown { + 40% { + opacity: 1; + -webkit-transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0); + transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0); + -webkit-animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190); + animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190); + } + + to { + opacity: 0; + -webkit-transform: scale3d(.1, .1, .1) translate3d(0, 2000px, 0); + transform: scale3d(.1, .1, .1) translate3d(0, 2000px, 0); + -webkit-transform-origin: center bottom; + transform-origin: center bottom; + -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1); + animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1); + } +} + +.zoomOutDown { + -webkit-animation-name: zoomOutDown; + animation-name: zoomOutDown; +} + +@-webkit-keyframes zoomOutLeft { + 40% { + opacity: 1; + -webkit-transform: scale3d(.475, .475, .475) translate3d(42px, 0, 0); + transform: scale3d(.475, .475, .475) translate3d(42px, 0, 0); + } + + to { + opacity: 0; + -webkit-transform: scale(.1) translate3d(-2000px, 0, 0); + transform: scale(.1) translate3d(-2000px, 0, 0); + -webkit-transform-origin: left center; + transform-origin: left center; + } +} + +@keyframes zoomOutLeft { + 40% { + opacity: 1; + -webkit-transform: scale3d(.475, .475, .475) translate3d(42px, 0, 0); + transform: scale3d(.475, .475, .475) translate3d(42px, 0, 0); + } + + to { + opacity: 0; + -webkit-transform: scale(.1) translate3d(-2000px, 0, 0); + transform: scale(.1) translate3d(-2000px, 0, 0); + -webkit-transform-origin: left center; + transform-origin: left center; + } +} + +.zoomOutLeft { + -webkit-animation-name: zoomOutLeft; + animation-name: zoomOutLeft; +} + +@-webkit-keyframes zoomOutRight { + 40% { + opacity: 1; + -webkit-transform: scale3d(.475, .475, .475) translate3d(-42px, 0, 0); + transform: scale3d(.475, .475, .475) translate3d(-42px, 0, 0); + } + + to { + opacity: 0; + -webkit-transform: scale(.1) translate3d(2000px, 0, 0); + transform: scale(.1) translate3d(2000px, 0, 0); + -webkit-transform-origin: right center; + transform-origin: right center; + } +} + +@keyframes zoomOutRight { + 40% { + opacity: 1; + -webkit-transform: scale3d(.475, .475, .475) translate3d(-42px, 0, 0); + transform: scale3d(.475, .475, .475) translate3d(-42px, 0, 0); + } + + to { + opacity: 0; + -webkit-transform: scale(.1) translate3d(2000px, 0, 0); + transform: scale(.1) translate3d(2000px, 0, 0); + -webkit-transform-origin: right center; + transform-origin: right center; + } +} + +.zoomOutRight { + -webkit-animation-name: zoomOutRight; + animation-name: zoomOutRight; +} + +@-webkit-keyframes zoomOutUp { + 40% { + opacity: 1; + -webkit-transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0); + transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0); + -webkit-animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190); + animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190); + } + + to { + opacity: 0; + -webkit-transform: scale3d(.1, .1, .1) translate3d(0, -2000px, 0); + transform: scale3d(.1, .1, .1) translate3d(0, -2000px, 0); + -webkit-transform-origin: center bottom; + transform-origin: center bottom; + -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1); + animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1); + } +} + +@keyframes zoomOutUp { + 40% { + opacity: 1; + -webkit-transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0); + transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0); + -webkit-animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190); + animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190); + } + + to { + opacity: 0; + -webkit-transform: scale3d(.1, .1, .1) translate3d(0, -2000px, 0); + transform: scale3d(.1, .1, .1) translate3d(0, -2000px, 0); + -webkit-transform-origin: center bottom; + transform-origin: center bottom; + -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1); + animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1); + } +} + +.zoomOutUp { + -webkit-animation-name: zoomOutUp; + animation-name: zoomOutUp; +} + +@-webkit-keyframes slideInDown { + from { + -webkit-transform: translate3d(0, -100%, 0); + transform: translate3d(0, -100%, 0); + visibility: visible; + } + + to { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } +} + +@keyframes slideInDown { + from { + -webkit-transform: translate3d(0, -100%, 0); + transform: translate3d(0, -100%, 0); + visibility: visible; + } + + to { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } +} + +.slideInDown { + -webkit-animation-name: slideInDown; + animation-name: slideInDown; +} + +@-webkit-keyframes slideInLeft { + from { + -webkit-transform: translate3d(-100%, 0, 0); + transform: translate3d(-100%, 0, 0); + visibility: visible; + } + + to { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } +} + +@keyframes slideInLeft { + from { + -webkit-transform: translate3d(-100%, 0, 0); + transform: translate3d(-100%, 0, 0); + visibility: visible; + } + + to { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } +} + +.slideInLeft { + -webkit-animation-name: slideInLeft; + animation-name: slideInLeft; +} + +@-webkit-keyframes slideInRight { + from { + -webkit-transform: translate3d(100%, 0, 0); + transform: translate3d(100%, 0, 0); + visibility: visible; + } + + to { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } +} + +@keyframes slideInRight { + from { + -webkit-transform: translate3d(100%, 0, 0); + transform: translate3d(100%, 0, 0); + visibility: visible; + } + + to { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } +} + +.slideInRight { + -webkit-animation-name: slideInRight; + animation-name: slideInRight; +} + +@-webkit-keyframes slideInUp { + from { + -webkit-transform: translate3d(0, 100%, 0); + transform: translate3d(0, 100%, 0); + visibility: visible; + } + + to { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } +} + +@keyframes slideInUp { + from { + -webkit-transform: translate3d(0, 100%, 0); + transform: translate3d(0, 100%, 0); + visibility: visible; + } + + to { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } +} + +.slideInUp { + -webkit-animation-name: slideInUp; + animation-name: slideInUp; +} + +@-webkit-keyframes slideOutDown { + from { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } + + to { + visibility: hidden; + -webkit-transform: translate3d(0, 100%, 0); + transform: translate3d(0, 100%, 0); + } +} + +@keyframes slideOutDown { + from { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } + + to { + visibility: hidden; + -webkit-transform: translate3d(0, 100%, 0); + transform: translate3d(0, 100%, 0); + } +} + +.slideOutDown { + -webkit-animation-name: slideOutDown; + animation-name: slideOutDown; +} + +@-webkit-keyframes slideOutLeft { + from { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } + + to { + visibility: hidden; + -webkit-transform: translate3d(-100%, 0, 0); + transform: translate3d(-100%, 0, 0); + } +} + +@keyframes slideOutLeft { + from { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } + + to { + visibility: hidden; + -webkit-transform: translate3d(-100%, 0, 0); + transform: translate3d(-100%, 0, 0); + } +} + +.slideOutLeft { + -webkit-animation-name: slideOutLeft; + animation-name: slideOutLeft; +} + +@-webkit-keyframes slideOutRight { + from { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } + + to { + visibility: hidden; + -webkit-transform: translate3d(100%, 0, 0); + transform: translate3d(100%, 0, 0); + } +} + +@keyframes slideOutRight { + from { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } + + to { + visibility: hidden; + -webkit-transform: translate3d(100%, 0, 0); + transform: translate3d(100%, 0, 0); + } +} + +.slideOutRight { + -webkit-animation-name: slideOutRight; + animation-name: slideOutRight; +} + +@-webkit-keyframes slideOutUp { + from { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } + + to { + visibility: hidden; + -webkit-transform: translate3d(0, -100%, 0); + transform: translate3d(0, -100%, 0); + } +} + +@keyframes slideOutUp { + from { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } + + to { + visibility: hidden; + -webkit-transform: translate3d(0, -100%, 0); + transform: translate3d(0, -100%, 0); + } +} + +.slideOutUp { + -webkit-animation-name: slideOutUp; + animation-name: slideOutUp; +} diff --git a/public/assets/css/bootstrap.min.css b/public/assets/css/bootstrap.min.css new file mode 100644 index 0000000..aa1b6c5 --- /dev/null +++ b/public/assets/css/bootstrap.min.css @@ -0,0 +1,5 @@ +/*! + * Bootstrap v3.3.4 (http://getbootstrap.com) + * Copyright 2011-2015 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + *//*! normalize.css v3.0.2 | MIT License | git.io/normalize */html{-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,:after,:before{color:#000!important;text-shadow:none!important;background:0 0!important;-webkit-box-shadow:none!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}blockquote,pre{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}select{background:#fff!important}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff2) format('woff2'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\2a"}.glyphicon-plus:before{content:"\2b"}.glyphicon-eur:before,.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.glyphicon-cd:before{content:"\e201"}.glyphicon-save-file:before{content:"\e202"}.glyphicon-open-file:before{content:"\e203"}.glyphicon-level-up:before{content:"\e204"}.glyphicon-copy:before{content:"\e205"}.glyphicon-paste:before{content:"\e206"}.glyphicon-alert:before{content:"\e209"}.glyphicon-equalizer:before{content:"\e210"}.glyphicon-king:before{content:"\e211"}.glyphicon-queen:before{content:"\e212"}.glyphicon-pawn:before{content:"\e213"}.glyphicon-bishop:before{content:"\e214"}.glyphicon-knight:before{content:"\e215"}.glyphicon-baby-formula:before{content:"\e216"}.glyphicon-tent:before{content:"\26fa"}.glyphicon-blackboard:before{content:"\e218"}.glyphicon-bed:before{content:"\e219"}.glyphicon-apple:before{content:"\f8ff"}.glyphicon-erase:before{content:"\e221"}.glyphicon-hourglass:before{content:"\231b"}.glyphicon-lamp:before{content:"\e223"}.glyphicon-duplicate:before{content:"\e224"}.glyphicon-piggy-bank:before{content:"\e225"}.glyphicon-scissors:before{content:"\e226"}.glyphicon-bitcoin:before{content:"\e227"}.glyphicon-btc:before{content:"\e227"}.glyphicon-xbt:before{content:"\e227"}.glyphicon-yen:before{content:"\00a5"}.glyphicon-jpy:before{content:"\00a5"}.glyphicon-ruble:before{content:"\20bd"}.glyphicon-rub:before{content:"\20bd"}.glyphicon-scale:before{content:"\e230"}.glyphicon-ice-lolly:before{content:"\e231"}.glyphicon-ice-lolly-tasted:before{content:"\e232"}.glyphicon-education:before{content:"\e233"}.glyphicon-option-horizontal:before{content:"\e234"}.glyphicon-option-vertical:before{content:"\e235"}.glyphicon-menu-hamburger:before{content:"\e236"}.glyphicon-modal-window:before{content:"\e237"}.glyphicon-oil:before{content:"\e238"}.glyphicon-grain:before{content:"\e239"}.glyphicon-sunglasses:before{content:"\e240"}.glyphicon-text-size:before{content:"\e241"}.glyphicon-text-color:before{content:"\e242"}.glyphicon-text-background:before{content:"\e243"}.glyphicon-object-align-top:before{content:"\e244"}.glyphicon-object-align-bottom:before{content:"\e245"}.glyphicon-object-align-horizontal:before{content:"\e246"}.glyphicon-object-align-left:before{content:"\e247"}.glyphicon-object-align-vertical:before{content:"\e248"}.glyphicon-object-align-right:before{content:"\e249"}.glyphicon-triangle-right:before{content:"\e250"}.glyphicon-triangle-left:before{content:"\e251"}.glyphicon-triangle-bottom:before{content:"\e252"}.glyphicon-triangle-top:before{content:"\e253"}.glyphicon-console:before{content:"\e254"}.glyphicon-superscript:before{content:"\e255"}.glyphicon-subscript:before{content:"\e256"}.glyphicon-menu-left:before{content:"\e257"}.glyphicon-menu-right:before{content:"\e258"}.glyphicon-menu-down:before{content:"\e259"}.glyphicon-menu-up:before{content:"\e260"}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail a>img,.thumbnail>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role=button]{cursor:pointer}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{padding:.2em;background-color:#fcf8e3}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ol,ul{margin-top:0;margin-bottom:10px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;margin-left:-5px;list-style:none}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-top:0;margin-bottom:20px}dd,dt{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child{margin-bottom:0}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote .small:before,blockquote footer:before,blockquote small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:''}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:'\00A0 \2014'}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.25);box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;-webkit-box-shadow:none;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#777;text-align:left}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table-responsive{min-height:.01%;overflow-x:auto}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px \9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=file]:focus,input[type=checkbox]:focus,input[type=radio]:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date],input[type=time],input[type=datetime-local],input[type=month]{line-height:34px}.input-group-sm input[type=date],.input-group-sm input[type=time],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],input[type=date].input-sm,input[type=time].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=time],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],input[type=date].input-lg,input[type=time].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{position:absolute;margin-top:4px \9;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.checkbox-inline.disabled,.radio-inline.disabled,fieldset[disabled] .checkbox-inline,fieldset[disabled] .radio-inline{cursor:not-allowed}.checkbox.disabled label,.radio.disabled label,fieldset[disabled] .checkbox label,fieldset[disabled] .radio label{cursor:not-allowed}.form-control-static{min-height:34px;padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.form-group-sm .form-control{height:30px;line-height:30px}select[multiple].form-group-sm .form-control,textarea.form-group-sm .form-control{height:auto}.form-group-sm .form-control-static{height:30px;min-height:32px;padding:5px 10px;font-size:12px;line-height:1.5}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.form-group-lg .form-control{height:46px;line-height:46px}select[multiple].form-group-lg .form-control,textarea.form-group-lg .form-control{height:auto}.form-group-lg .form-control-static{height:46px;min-height:38px;padding:10px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .checkbox,.has-success .checkbox-inline,.has-success .control-label,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.checkbox label,.has-success.checkbox-inline label,.has-success.radio label,.has-success.radio-inline label{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning .control-label,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.checkbox label,.has-warning.checkbox-inline label,.has-warning.radio label,.has-warning.radio-inline label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error .control-label,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.checkbox label,.has-error.checkbox-inline label,.has-error.radio label,.has-error.radio-inline label{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:14.33px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{pointer-events:none;cursor:not-allowed;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none;opacity:.65}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.active,.btn-default.focus,.btn-default:active,.btn-default:focus,.btn-default:hover,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled,.btn-default.disabled.active,.btn-default.disabled.focus,.btn-default.disabled:active,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled],.btn-default[disabled].active,.btn-default[disabled].focus,.btn-default[disabled]:active,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default,fieldset[disabled] .btn-default.active,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:active,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary.active,.btn-primary.focus,.btn-primary:active,.btn-primary:focus,.btn-primary:hover,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled,.btn-primary.disabled.active,.btn-primary.disabled.focus,.btn-primary.disabled:active,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled],.btn-primary[disabled].active,.btn-primary[disabled].focus,.btn-primary[disabled]:active,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary,fieldset[disabled] .btn-primary.active,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:active,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.active,.btn-success.focus,.btn-success:active,.btn-success:focus,.btn-success:hover,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled,.btn-success.disabled.active,.btn-success.disabled.focus,.btn-success.disabled:active,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled],.btn-success[disabled].active,.btn-success[disabled].focus,.btn-success[disabled]:active,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success,fieldset[disabled] .btn-success.active,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:active,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.active,.btn-info.focus,.btn-info:active,.btn-info:focus,.btn-info:hover,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled,.btn-info.disabled.active,.btn-info.disabled.focus,.btn-info.disabled:active,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled],.btn-info[disabled].active,.btn-info[disabled].focus,.btn-info[disabled]:active,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info,fieldset[disabled] .btn-info.active,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:active,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.active,.btn-warning.focus,.btn-warning:active,.btn-warning:focus,.btn-warning:hover,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled,.btn-warning.disabled.active,.btn-warning.disabled.focus,.btn-warning.disabled:active,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled],.btn-warning[disabled].active,.btn-warning[disabled].focus,.btn-warning[disabled]:active,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning,fieldset[disabled] .btn-warning.active,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:active,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.active,.btn-danger.focus,.btn-danger:active,.btn-danger:focus,.btn-danger:hover,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled,.btn-danger.disabled.active,.btn-danger.disabled.focus,.btn-danger.disabled:active,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled],.btn-danger[disabled].active,.btn-danger[disabled].focus,.btn-danger[disabled]:active,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger,fieldset[disabled] .btn-danger.active,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:active,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#337ab7;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-timing-function:ease;-o-transition-timing-function:ease;transition-timing-function:ease;-webkit-transition-duration:.35s;-o-transition-duration:.35s;transition-duration:.35s;-webkit-transition-property:height,visibility;-o-transition-property:height,visibility;transition-property:height,visibility}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown,.dropup{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{right:0;left:auto}.dropdown-menu-left{right:auto;left:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px solid}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn input[type=radio],[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group .form-control,.input-group-addon,.input-group-btn{display:table-cell}.input-group .form-control:not(:first-child):not(:last-child),.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#337ab7}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;height:40px;margin-bottom:20px;border:1px solid transparent;line-height:40px;}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;-webkit-box-shadow:none;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-right:0;padding-left:0}}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:340px}@media (max-device-width:480px)and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-bottom,.navbar-fixed-top{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px 15px;font-size:18px;line-height:20px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{padding:10px 15px;margin-top:8px;margin-right:-15px;margin-bottom:8px;margin-left:-15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1)}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:768px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;-webkit-box-shadow:none;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#777}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#337ab7;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{color:#23527c;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:2;color:#fff;cursor:default;background-color:#337ab7;border-color:#337ab7}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding:30px 15px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron .h1,.jumbotron h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron,.container-fluid .jumbotron{border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding:48px 0}.container .jumbotron,.container-fluid .jumbotron{padding-right:60px;padding-left:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:border .2s ease-in-out;-o-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail a>img,.thumbnail>img{margin-right:auto;margin-left:auto}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#337ab7}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#337ab7;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress-bar-striped,.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;background-size:40px 40px}.progress-bar.active,.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{overflow:hidden;zoom:1}.media-body{width:10000px}.media-object{display:block}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-body,.media-left,.media-right{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item{color:#555}a.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover{color:#555;text-decoration:none;background-color:#f5f5f5}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{color:#777;cursor:not-allowed;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.list-group+.panel-footer{border-top-width:0}.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.panel-collapse>.table caption,.panel>.table caption,.panel>.table-responsive>.table caption{padding-right:15px;padding-left:15px}.panel>.table-responsive:first-child>.table:first-child,.panel>.table:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table:first-child>thead:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#337ab7}.panel-primary>.panel-heading{color:#fff;background-color:#337ab7;border-color:#337ab7}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#337ab7}.panel-primary>.panel-heading .badge{color:#337ab7;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#337ab7}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:0 0;border:0}.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;overflow:hidden;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);-o-transform:translate(0,-25%);transform:translate(0,-25%)}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);-o-transform:translate(0,0);transform:translate(0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-header{min-height:16.43px;padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;font-weight:400;line-height:1.4;filter:alpha(opacity=0);opacity:0}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{right:5px;bottom:0;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{bottom:0;left:5px;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;right:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;left:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;font-weight:400;line-height:1.42857143;text-align:left;white-space:normal;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2)}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{bottom:-10px;left:1px;content:" ";border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;bottom:-10px;content:" ";border-right-width:0;border-left-color:#fff}.carousel{position:relative}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>a>img,.carousel-inner>.item>img{line-height:1}@media all and (transform-3d),(-webkit-transform-3d){.carousel-inner>.item{-webkit-transition:-webkit-transform .6s ease-in-out;-o-transition:-o-transform .6s ease-in-out;transition:transform .6s ease-in-out;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000;perspective:1000}.carousel-inner>.item.active.right,.carousel-inner>.item.next{left:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.carousel-inner>.item.active.left,.carousel-inner>.item.prev{left:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.carousel-inner>.item.active,.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right{left:0;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6);filter:alpha(opacity=50);opacity:.5}.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.0001)));background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.0001)),to(rgba(0,0,0,.5)));background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);background-repeat:repeat-x}.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;z-index:5;display:inline-block}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;margin-top:-10px;font-family:serif;line-height:1}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000 \9;background-color:rgba(0,0,0,0);border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-15px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-15px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-15px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{display:table;content:" "}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-lg,.visible-md,.visible-sm,.visible-xs{display:none!important}.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}}@media (max-width:767px){.visible-xs-block{display:block!important}}@media (max-width:767px){.visible-xs-inline{display:inline!important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px)and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}}@media (min-width:768px)and (max-width:991px){.visible-sm-block{display:block!important}}@media (min-width:768px)and (max-width:991px){.visible-sm-inline{display:inline!important}}@media (min-width:768px)and (max-width:991px){.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px)and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}}@media (min-width:992px)and (max-width:1199px){.visible-md-block{display:block!important}}@media (min-width:992px)and (max-width:1199px){.visible-md-inline{display:inline!important}}@media (min-width:992px)and (max-width:1199px){.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}}@media (min-width:1200px){.visible-lg-block{display:block!important}}@media (min-width:1200px){.visible-lg-inline{display:inline!important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px)and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px)and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}}@media print{.hidden-print{display:none!important}} \ No newline at end of file diff --git a/public/assets/css/hover-min.css b/public/assets/css/hover-min.css new file mode 100755 index 0000000..b7080b4 --- /dev/null +++ b/public/assets/css/hover-min.css @@ -0,0 +1,12 @@ +/*! + * Hover.css (http://ianlunn.github.io/Hover/) + * Version: 2.0.2 + * Author: Ian Lunn @IanLunn + * Author URL: http://ianlunn.co.uk/ + * Github: https://github.com/IanLunn/Hover + + * Made available under a MIT License: + * http://www.opensource.org/licenses/mit-license.php + + * Hover.css Copyright Ian Lunn 2014. Generated with Sass. + */.hvr-grow{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-property:transform;transition-property:transform}.hvr-grow:active,.hvr-grow:focus,.hvr-grow:hover{-webkit-transform:scale(1.1);transform:scale(1.1)}.hvr-shrink{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-property:transform;transition-property:transform}.hvr-shrink:active,.hvr-shrink:focus,.hvr-shrink:hover{-webkit-transform:scale(0.9);transform:scale(0.9)}@-webkit-keyframes hvr-pulse{25%{-webkit-transform:scale(1.1);transform:scale(1.1)}75%{-webkit-transform:scale(0.9);transform:scale(0.9)}}@keyframes hvr-pulse{25%{-webkit-transform:scale(1.1);transform:scale(1.1)}75%{-webkit-transform:scale(0.9);transform:scale(0.9)}}.hvr-pulse{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent}.hvr-pulse:active,.hvr-pulse:focus,.hvr-pulse:hover{-webkit-animation-name:hvr-pulse;animation-name:hvr-pulse;-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-timing-function:linear;animation-timing-function:linear;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}@-webkit-keyframes hvr-pulse-grow{to{-webkit-transform:scale(1.1);transform:scale(1.1)}}@keyframes hvr-pulse-grow{to{-webkit-transform:scale(1.1);transform:scale(1.1)}}.hvr-pulse-grow{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent}.hvr-pulse-grow:active,.hvr-pulse-grow:focus,.hvr-pulse-grow:hover{-webkit-animation-name:hvr-pulse-grow;animation-name:hvr-pulse-grow;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:linear;animation-timing-function:linear;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-direction:alternate;animation-direction:alternate}@-webkit-keyframes hvr-pulse-shrink{to{-webkit-transform:scale(0.9);transform:scale(0.9)}}@keyframes hvr-pulse-shrink{to{-webkit-transform:scale(0.9);transform:scale(0.9)}}.hvr-pulse-shrink{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent}.hvr-pulse-shrink:active,.hvr-pulse-shrink:focus,.hvr-pulse-shrink:hover{-webkit-animation-name:hvr-pulse-shrink;animation-name:hvr-pulse-shrink;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:linear;animation-timing-function:linear;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-direction:alternate;animation-direction:alternate}@-webkit-keyframes hvr-push{50%{-webkit-transform:scale(0.8);transform:scale(0.8)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes hvr-push{50%{-webkit-transform:scale(0.8);transform:scale(0.8)}100%{-webkit-transform:scale(1);transform:scale(1)}}.hvr-push{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent}.hvr-push:active,.hvr-push:focus,.hvr-push:hover{-webkit-animation-name:hvr-push;animation-name:hvr-push;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:linear;animation-timing-function:linear;-webkit-animation-iteration-count:1;animation-iteration-count:1}@-webkit-keyframes hvr-pop{50%{-webkit-transform:scale(1.2);transform:scale(1.2)}}@keyframes hvr-pop{50%{-webkit-transform:scale(1.2);transform:scale(1.2)}}.hvr-pop{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent}.hvr-pop:active,.hvr-pop:focus,.hvr-pop:hover{-webkit-animation-name:hvr-pop;animation-name:hvr-pop;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:linear;animation-timing-function:linear;-webkit-animation-iteration-count:1;animation-iteration-count:1}.hvr-bounce-in{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;-webkit-transition-duration:.5s;transition-duration:.5s}.hvr-bounce-in:active,.hvr-bounce-in:focus,.hvr-bounce-in:hover{-webkit-transform:scale(1.2);transform:scale(1.2);-webkit-transition-timing-function:cubic-bezier(0.47,2.02,.31,-.36);transition-timing-function:cubic-bezier(0.47,2.02,.31,-.36)}.hvr-bounce-out{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;-webkit-transition-duration:.5s;transition-duration:.5s}.hvr-bounce-out:active,.hvr-bounce-out:focus,.hvr-bounce-out:hover{-webkit-transform:scale(0.8);transform:scale(0.8);-webkit-transition-timing-function:cubic-bezier(0.47,2.02,.31,-.36);transition-timing-function:cubic-bezier(0.47,2.02,.31,-.36)}.hvr-rotate{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-property:transform;transition-property:transform}.hvr-rotate:active,.hvr-rotate:focus,.hvr-rotate:hover{-webkit-transform:rotate(4deg);transform:rotate(4deg)}.hvr-grow-rotate{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-property:transform;transition-property:transform}.hvr-grow-rotate:active,.hvr-grow-rotate:focus,.hvr-grow-rotate:hover{-webkit-transform:scale(1.1) rotate(4deg);transform:scale(1.1) rotate(4deg)}.hvr-float{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-property:transform;transition-property:transform;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.hvr-float:active,.hvr-float:focus,.hvr-float:hover{-webkit-transform:translateY(-8px);transform:translateY(-8px)}.hvr-sink{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-property:transform;transition-property:transform;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.hvr-sink:active,.hvr-sink:focus,.hvr-sink:hover{-webkit-transform:translateY(8px);transform:translateY(8px)}@-webkit-keyframes hvr-bob{0%{-webkit-transform:translateY(-8px);transform:translateY(-8px)}50%{-webkit-transform:translateY(-4px);transform:translateY(-4px)}100%{-webkit-transform:translateY(-8px);transform:translateY(-8px)}}@keyframes hvr-bob{0%{-webkit-transform:translateY(-8px);transform:translateY(-8px)}50%{-webkit-transform:translateY(-4px);transform:translateY(-4px)}100%{-webkit-transform:translateY(-8px);transform:translateY(-8px)}}@-webkit-keyframes hvr-bob-float{100%{-webkit-transform:translateY(-8px);transform:translateY(-8px)}}@keyframes hvr-bob-float{100%{-webkit-transform:translateY(-8px);transform:translateY(-8px)}}.hvr-bob{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent}.hvr-bob:active,.hvr-bob:focus,.hvr-bob:hover{-webkit-animation-name:hvr-bob-float,hvr-bob;animation-name:hvr-bob-float,hvr-bob;-webkit-animation-duration:.3s,1.5s;animation-duration:.3s,1.5s;-webkit-animation-delay:0s,.3s;animation-delay:0s,.3s;-webkit-animation-timing-function:ease-out,ease-in-out;animation-timing-function:ease-out,ease-in-out;-webkit-animation-iteration-count:1,infinite;animation-iteration-count:1,infinite;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-direction:normal,alternate;animation-direction:normal,alternate}@-webkit-keyframes hvr-hang{0%{-webkit-transform:translateY(8px);transform:translateY(8px)}50%{-webkit-transform:translateY(4px);transform:translateY(4px)}100%{-webkit-transform:translateY(8px);transform:translateY(8px)}}@keyframes hvr-hang{0%{-webkit-transform:translateY(8px);transform:translateY(8px)}50%{-webkit-transform:translateY(4px);transform:translateY(4px)}100%{-webkit-transform:translateY(8px);transform:translateY(8px)}}@-webkit-keyframes hvr-hang-sink{100%{-webkit-transform:translateY(8px);transform:translateY(8px)}}@keyframes hvr-hang-sink{100%{-webkit-transform:translateY(8px);transform:translateY(8px)}}.hvr-hang{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent}.hvr-hang:active,.hvr-hang:focus,.hvr-hang:hover{-webkit-animation-name:hvr-hang-sink,hvr-hang;animation-name:hvr-hang-sink,hvr-hang;-webkit-animation-duration:.3s,1.5s;animation-duration:.3s,1.5s;-webkit-animation-delay:0s,.3s;animation-delay:0s,.3s;-webkit-animation-timing-function:ease-out,ease-in-out;animation-timing-function:ease-out,ease-in-out;-webkit-animation-iteration-count:1,infinite;animation-iteration-count:1,infinite;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-direction:normal,alternate;animation-direction:normal,alternate}.hvr-skew{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-property:transform;transition-property:transform}.hvr-skew:active,.hvr-skew:focus,.hvr-skew:hover{-webkit-transform:skew(-10deg);transform:skew(-10deg)}.hvr-skew-forward{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-property:transform;transition-property:transform;-webkit-transform-origin:0 100%;transform-origin:0 100%}.hvr-skew-forward:active,.hvr-skew-forward:focus,.hvr-skew-forward:hover{-webkit-transform:skew(-10deg);transform:skew(-10deg)}.hvr-skew-backward{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-property:transform;transition-property:transform;-webkit-transform-origin:0 100%;transform-origin:0 100%}.hvr-skew-backward:active,.hvr-skew-backward:focus,.hvr-skew-backward:hover{-webkit-transform:skew(10deg);transform:skew(10deg)}@-webkit-keyframes hvr-wobble-vertical{16.65%{-webkit-transform:translateY(8px);transform:translateY(8px)}33.3%{-webkit-transform:translateY(-6px);transform:translateY(-6px)}49.95%{-webkit-transform:translateY(4px);transform:translateY(4px)}66.6%{-webkit-transform:translateY(-2px);transform:translateY(-2px)}83.25%{-webkit-transform:translateY(1px);transform:translateY(1px)}100%{-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes hvr-wobble-vertical{16.65%{-webkit-transform:translateY(8px);transform:translateY(8px)}33.3%{-webkit-transform:translateY(-6px);transform:translateY(-6px)}49.95%{-webkit-transform:translateY(4px);transform:translateY(4px)}66.6%{-webkit-transform:translateY(-2px);transform:translateY(-2px)}83.25%{-webkit-transform:translateY(1px);transform:translateY(1px)}100%{-webkit-transform:translateY(0);transform:translateY(0)}}.hvr-wobble-vertical{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent}.hvr-wobble-vertical:active,.hvr-wobble-vertical:focus,.hvr-wobble-vertical:hover{-webkit-animation-name:hvr-wobble-vertical;animation-name:hvr-wobble-vertical;-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;-webkit-animation-iteration-count:1;animation-iteration-count:1}@-webkit-keyframes hvr-wobble-horizontal{16.65%{-webkit-transform:translateX(8px);transform:translateX(8px)}33.3%{-webkit-transform:translateX(-6px);transform:translateX(-6px)}49.95%{-webkit-transform:translateX(4px);transform:translateX(4px)}66.6%{-webkit-transform:translateX(-2px);transform:translateX(-2px)}83.25%{-webkit-transform:translateX(1px);transform:translateX(1px)}100%{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes hvr-wobble-horizontal{16.65%{-webkit-transform:translateX(8px);transform:translateX(8px)}33.3%{-webkit-transform:translateX(-6px);transform:translateX(-6px)}49.95%{-webkit-transform:translateX(4px);transform:translateX(4px)}66.6%{-webkit-transform:translateX(-2px);transform:translateX(-2px)}83.25%{-webkit-transform:translateX(1px);transform:translateX(1px)}100%{-webkit-transform:translateX(0);transform:translateX(0)}}.hvr-wobble-horizontal{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent}.hvr-wobble-horizontal:active,.hvr-wobble-horizontal:focus,.hvr-wobble-horizontal:hover{-webkit-animation-name:hvr-wobble-horizontal;animation-name:hvr-wobble-horizontal;-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;-webkit-animation-iteration-count:1;animation-iteration-count:1}@-webkit-keyframes hvr-wobble-to-bottom-right{16.65%{-webkit-transform:translate(8px,8px);transform:translate(8px,8px)}33.3%{-webkit-transform:translate(-6px,-6px);transform:translate(-6px,-6px)}49.95%{-webkit-transform:translate(4px,4px);transform:translate(4px,4px)}66.6%{-webkit-transform:translate(-2px,-2px);transform:translate(-2px,-2px)}83.25%{-webkit-transform:translate(1px,1px);transform:translate(1px,1px)}100%{-webkit-transform:translate(0,0);transform:translate(0,0)}}@keyframes hvr-wobble-to-bottom-right{16.65%{-webkit-transform:translate(8px,8px);transform:translate(8px,8px)}33.3%{-webkit-transform:translate(-6px,-6px);transform:translate(-6px,-6px)}49.95%{-webkit-transform:translate(4px,4px);transform:translate(4px,4px)}66.6%{-webkit-transform:translate(-2px,-2px);transform:translate(-2px,-2px)}83.25%{-webkit-transform:translate(1px,1px);transform:translate(1px,1px)}100%{-webkit-transform:translate(0,0);transform:translate(0,0)}}.hvr-wobble-to-bottom-right{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent}.hvr-wobble-to-bottom-right:active,.hvr-wobble-to-bottom-right:focus,.hvr-wobble-to-bottom-right:hover{-webkit-animation-name:hvr-wobble-to-bottom-right;animation-name:hvr-wobble-to-bottom-right;-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;-webkit-animation-iteration-count:1;animation-iteration-count:1}@-webkit-keyframes hvr-wobble-to-top-right{16.65%{-webkit-transform:translate(8px,-8px);transform:translate(8px,-8px)}33.3%{-webkit-transform:translate(-6px,6px);transform:translate(-6px,6px)}49.95%{-webkit-transform:translate(4px,-4px);transform:translate(4px,-4px)}66.6%{-webkit-transform:translate(-2px,2px);transform:translate(-2px,2px)}83.25%{-webkit-transform:translate(1px,-1px);transform:translate(1px,-1px)}100%{-webkit-transform:translate(0,0);transform:translate(0,0)}}@keyframes hvr-wobble-to-top-right{16.65%{-webkit-transform:translate(8px,-8px);transform:translate(8px,-8px)}33.3%{-webkit-transform:translate(-6px,6px);transform:translate(-6px,6px)}49.95%{-webkit-transform:translate(4px,-4px);transform:translate(4px,-4px)}66.6%{-webkit-transform:translate(-2px,2px);transform:translate(-2px,2px)}83.25%{-webkit-transform:translate(1px,-1px);transform:translate(1px,-1px)}100%{-webkit-transform:translate(0,0);transform:translate(0,0)}}.hvr-wobble-to-top-right{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent}.hvr-wobble-to-top-right:active,.hvr-wobble-to-top-right:focus,.hvr-wobble-to-top-right:hover{-webkit-animation-name:hvr-wobble-to-top-right;animation-name:hvr-wobble-to-top-right;-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;-webkit-animation-iteration-count:1;animation-iteration-count:1}@-webkit-keyframes hvr-wobble-top{16.65%{-webkit-transform:skew(-12deg);transform:skew(-12deg)}33.3%{-webkit-transform:skew(10deg);transform:skew(10deg)}49.95%{-webkit-transform:skew(-6deg);transform:skew(-6deg)}66.6%{-webkit-transform:skew(4deg);transform:skew(4deg)}83.25%{-webkit-transform:skew(-2deg);transform:skew(-2deg)}100%{-webkit-transform:skew(0);transform:skew(0)}}@keyframes hvr-wobble-top{16.65%{-webkit-transform:skew(-12deg);transform:skew(-12deg)}33.3%{-webkit-transform:skew(10deg);transform:skew(10deg)}49.95%{-webkit-transform:skew(-6deg);transform:skew(-6deg)}66.6%{-webkit-transform:skew(4deg);transform:skew(4deg)}83.25%{-webkit-transform:skew(-2deg);transform:skew(-2deg)}100%{-webkit-transform:skew(0);transform:skew(0)}}.hvr-wobble-top{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;-webkit-transform-origin:0 100%;transform-origin:0 100%}.hvr-wobble-top:active,.hvr-wobble-top:focus,.hvr-wobble-top:hover{-webkit-animation-name:hvr-wobble-top;animation-name:hvr-wobble-top;-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;-webkit-animation-iteration-count:1;animation-iteration-count:1}@-webkit-keyframes hvr-wobble-bottom{16.65%{-webkit-transform:skew(-12deg);transform:skew(-12deg)}33.3%{-webkit-transform:skew(10deg);transform:skew(10deg)}49.95%{-webkit-transform:skew(-6deg);transform:skew(-6deg)}66.6%{-webkit-transform:skew(4deg);transform:skew(4deg)}83.25%{-webkit-transform:skew(-2deg);transform:skew(-2deg)}100%{-webkit-transform:skew(0);transform:skew(0)}}@keyframes hvr-wobble-bottom{16.65%{-webkit-transform:skew(-12deg);transform:skew(-12deg)}33.3%{-webkit-transform:skew(10deg);transform:skew(10deg)}49.95%{-webkit-transform:skew(-6deg);transform:skew(-6deg)}66.6%{-webkit-transform:skew(4deg);transform:skew(4deg)}83.25%{-webkit-transform:skew(-2deg);transform:skew(-2deg)}100%{-webkit-transform:skew(0);transform:skew(0)}}.hvr-wobble-bottom{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;-webkit-transform-origin:100% 0;transform-origin:100% 0}.hvr-wobble-bottom:active,.hvr-wobble-bottom:focus,.hvr-wobble-bottom:hover{-webkit-animation-name:hvr-wobble-bottom;animation-name:hvr-wobble-bottom;-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;-webkit-animation-iteration-count:1;animation-iteration-count:1}@-webkit-keyframes hvr-wobble-skew{16.65%{-webkit-transform:skew(-12deg);transform:skew(-12deg)}33.3%{-webkit-transform:skew(10deg);transform:skew(10deg)}49.95%{-webkit-transform:skew(-6deg);transform:skew(-6deg)}66.6%{-webkit-transform:skew(4deg);transform:skew(4deg)}83.25%{-webkit-transform:skew(-2deg);transform:skew(-2deg)}100%{-webkit-transform:skew(0);transform:skew(0)}}@keyframes hvr-wobble-skew{16.65%{-webkit-transform:skew(-12deg);transform:skew(-12deg)}33.3%{-webkit-transform:skew(10deg);transform:skew(10deg)}49.95%{-webkit-transform:skew(-6deg);transform:skew(-6deg)}66.6%{-webkit-transform:skew(4deg);transform:skew(4deg)}83.25%{-webkit-transform:skew(-2deg);transform:skew(-2deg)}100%{-webkit-transform:skew(0);transform:skew(0)}}.hvr-wobble-skew{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent}.hvr-wobble-skew:active,.hvr-wobble-skew:focus,.hvr-wobble-skew:hover{-webkit-animation-name:hvr-wobble-skew;animation-name:hvr-wobble-skew;-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;-webkit-animation-iteration-count:1;animation-iteration-count:1}@-webkit-keyframes hvr-buzz{50%{-webkit-transform:translateX(3px) rotate(2deg);transform:translateX(3px) rotate(2deg)}100%{-webkit-transform:translateX(-3px) rotate(-2deg);transform:translateX(-3px) rotate(-2deg)}}@keyframes hvr-buzz{50%{-webkit-transform:translateX(3px) rotate(2deg);transform:translateX(3px) rotate(2deg)}100%{-webkit-transform:translateX(-3px) rotate(-2deg);transform:translateX(-3px) rotate(-2deg)}}.hvr-buzz{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent}.hvr-buzz:active,.hvr-buzz:focus,.hvr-buzz:hover{-webkit-animation-name:hvr-buzz;animation-name:hvr-buzz;-webkit-animation-duration:.15s;animation-duration:.15s;-webkit-animation-timing-function:linear;animation-timing-function:linear;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}@-webkit-keyframes hvr-buzz-out{10%{-webkit-transform:translateX(3px) rotate(2deg);transform:translateX(3px) rotate(2deg)}20%{-webkit-transform:translateX(-3px) rotate(-2deg);transform:translateX(-3px) rotate(-2deg)}30%{-webkit-transform:translateX(3px) rotate(2deg);transform:translateX(3px) rotate(2deg)}40%{-webkit-transform:translateX(-3px) rotate(-2deg);transform:translateX(-3px) rotate(-2deg)}50%{-webkit-transform:translateX(2px) rotate(1deg);transform:translateX(2px) rotate(1deg)}60%{-webkit-transform:translateX(-2px) rotate(-1deg);transform:translateX(-2px) rotate(-1deg)}70%{-webkit-transform:translateX(2px) rotate(1deg);transform:translateX(2px) rotate(1deg)}80%{-webkit-transform:translateX(-2px) rotate(-1deg);transform:translateX(-2px) rotate(-1deg)}90%{-webkit-transform:translateX(1px) rotate(0);transform:translateX(1px) rotate(0)}100%{-webkit-transform:translateX(-1px) rotate(0);transform:translateX(-1px) rotate(0)}}@keyframes hvr-buzz-out{10%{-webkit-transform:translateX(3px) rotate(2deg);transform:translateX(3px) rotate(2deg)}20%{-webkit-transform:translateX(-3px) rotate(-2deg);transform:translateX(-3px) rotate(-2deg)}30%{-webkit-transform:translateX(3px) rotate(2deg);transform:translateX(3px) rotate(2deg)}40%{-webkit-transform:translateX(-3px) rotate(-2deg);transform:translateX(-3px) rotate(-2deg)}50%{-webkit-transform:translateX(2px) rotate(1deg);transform:translateX(2px) rotate(1deg)}60%{-webkit-transform:translateX(-2px) rotate(-1deg);transform:translateX(-2px) rotate(-1deg)}70%{-webkit-transform:translateX(2px) rotate(1deg);transform:translateX(2px) rotate(1deg)}80%{-webkit-transform:translateX(-2px) rotate(-1deg);transform:translateX(-2px) rotate(-1deg)}90%{-webkit-transform:translateX(1px) rotate(0);transform:translateX(1px) rotate(0)}100%{-webkit-transform:translateX(-1px) rotate(0);transform:translateX(-1px) rotate(0)}}.hvr-buzz-out{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent}.hvr-buzz-out:active,.hvr-buzz-out:focus,.hvr-buzz-out:hover{-webkit-animation-name:hvr-buzz-out;animation-name:hvr-buzz-out;-webkit-animation-duration:.75s;animation-duration:.75s;-webkit-animation-timing-function:linear;animation-timing-function:linear;-webkit-animation-iteration-count:1;animation-iteration-count:1}.hvr-forward{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-property:transform;transition-property:transform}.hvr-forward:active,.hvr-forward:focus,.hvr-forward:hover{-webkit-transform:translateX(8px);transform:translateX(8px)}.hvr-backward{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-property:transform;transition-property:transform}.hvr-backward:active,.hvr-backward:focus,.hvr-backward:hover{-webkit-transform:translateX(-8px);transform:translateX(-8px)}.hvr-fade{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;overflow:hidden;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-property:color,background-color;transition-property:color,background-color}.hvr-fade:active,.hvr-fade:focus,.hvr-fade:hover{background-color:#2098D1;color:#fff}@-webkit-keyframes hvr-back-pulse{50%{background-color:rgba(32,152,209,.75)}}@keyframes hvr-back-pulse{50%{background-color:rgba(32,152,209,.75)}}.hvr-back-pulse{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;overflow:hidden;-webkit-transition-duration:.5s;transition-duration:.5s;-webkit-transition-property:color,background-color;transition-property:color,background-color}.hvr-back-pulse:active,.hvr-back-pulse:focus,.hvr-back-pulse:hover{-webkit-animation-name:hvr-back-pulse;animation-name:hvr-back-pulse;-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-delay:.5s;animation-delay:.5s;-webkit-animation-timing-function:linear;animation-timing-function:linear;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;background-color:#2098D1;background-color:#2098d1;color:#fff}.hvr-sweep-to-right{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;-webkit-transition-property:color;transition-property:color;-webkit-transition-duration:.3s;transition-duration:.3s}.hvr-sweep-to-right:before{content:"";position:absolute;z-index:-1;top:0;left:0;right:0;bottom:0;background:#2098D1;-webkit-transform:scaleX(0);transform:scaleX(0);-webkit-transform-origin:0 50%;transform-origin:0 50%;-webkit-transition-property:transform;transition-property:transform;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.hvr-sweep-to-right:active,.hvr-sweep-to-right:focus,.hvr-sweep-to-right:hover{color:#fff}.hvr-sweep-to-right:active:before,.hvr-sweep-to-right:focus:before,.hvr-sweep-to-right:hover:before{-webkit-transform:scaleX(1);transform:scaleX(1)}.hvr-sweep-to-left{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;-webkit-transition-property:color;transition-property:color;-webkit-transition-duration:.3s;transition-duration:.3s}.hvr-sweep-to-left:before{content:"";position:absolute;z-index:-1;top:0;left:0;right:0;bottom:0;background:#2098D1;-webkit-transform:scaleX(0);transform:scaleX(0);-webkit-transform-origin:100% 50%;transform-origin:100% 50%;-webkit-transition-property:transform;transition-property:transform;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.hvr-sweep-to-left:active,.hvr-sweep-to-left:focus,.hvr-sweep-to-left:hover{color:#fff}.hvr-sweep-to-left:active:before,.hvr-sweep-to-left:focus:before,.hvr-sweep-to-left:hover:before{-webkit-transform:scaleX(1);transform:scaleX(1)}.hvr-sweep-to-bottom{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;-webkit-transition-property:color;transition-property:color;-webkit-transition-duration:.3s;transition-duration:.3s}.hvr-sweep-to-bottom:before{content:"";position:absolute;z-index:-1;top:0;left:0;right:0;bottom:0;background:#2098D1;-webkit-transform:scaleY(0);transform:scaleY(0);-webkit-transform-origin:50% 0;transform-origin:50% 0;-webkit-transition-property:transform;transition-property:transform;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.hvr-sweep-to-bottom:active,.hvr-sweep-to-bottom:focus,.hvr-sweep-to-bottom:hover{color:#fff}.hvr-sweep-to-bottom:active:before,.hvr-sweep-to-bottom:focus:before,.hvr-sweep-to-bottom:hover:before{-webkit-transform:scaleY(1);transform:scaleY(1)}.hvr-sweep-to-top{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;-webkit-transition-property:color;transition-property:color;-webkit-transition-duration:.3s;transition-duration:.3s}.hvr-sweep-to-top:before{content:"";position:absolute;z-index:-1;top:0;left:0;right:0;bottom:0;background:#2098D1;-webkit-transform:scaleY(0);transform:scaleY(0);-webkit-transform-origin:50% 100%;transform-origin:50% 100%;-webkit-transition-property:transform;transition-property:transform;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.hvr-sweep-to-top:active,.hvr-sweep-to-top:focus,.hvr-sweep-to-top:hover{color:#fff}.hvr-sweep-to-top:active:before,.hvr-sweep-to-top:focus:before,.hvr-sweep-to-top:hover:before{-webkit-transform:scaleY(1);transform:scaleY(1)}.hvr-bounce-to-right{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;-webkit-transition-property:color;transition-property:color;-webkit-transition-duration:.5s;transition-duration:.5s}.hvr-bounce-to-right:before{content:"";position:absolute;z-index:-1;top:0;left:0;right:0;bottom:0;background:#2098D1;-webkit-transform:scaleX(0);transform:scaleX(0);-webkit-transform-origin:0 50%;transform-origin:0 50%;-webkit-transition-property:transform;transition-property:transform;-webkit-transition-duration:.5s;transition-duration:.5s;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.hvr-bounce-to-right:active,.hvr-bounce-to-right:focus,.hvr-bounce-to-right:hover{color:#fff}.hvr-bounce-to-right:active:before,.hvr-bounce-to-right:focus:before,.hvr-bounce-to-right:hover:before{-webkit-transform:scaleX(1);transform:scaleX(1);-webkit-transition-timing-function:cubic-bezier(0.52,1.64,.37,.66);transition-timing-function:cubic-bezier(0.52,1.64,.37,.66)}.hvr-bounce-to-left{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;-webkit-transition-property:color;transition-property:color;-webkit-transition-duration:.5s;transition-duration:.5s}.hvr-bounce-to-left:before{content:"";position:absolute;z-index:-1;top:0;left:0;right:0;bottom:0;background:#2098D1;-webkit-transform:scaleX(0);transform:scaleX(0);-webkit-transform-origin:100% 50%;transform-origin:100% 50%;-webkit-transition-property:transform;transition-property:transform;-webkit-transition-duration:.5s;transition-duration:.5s;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.hvr-bounce-to-left:active,.hvr-bounce-to-left:focus,.hvr-bounce-to-left:hover{color:#fff}.hvr-bounce-to-left:active:before,.hvr-bounce-to-left:focus:before,.hvr-bounce-to-left:hover:before{-webkit-transform:scaleX(1);transform:scaleX(1);-webkit-transition-timing-function:cubic-bezier(0.52,1.64,.37,.66);transition-timing-function:cubic-bezier(0.52,1.64,.37,.66)}.hvr-bounce-to-bottom{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;-webkit-transition-property:color;transition-property:color;-webkit-transition-duration:.5s;transition-duration:.5s}.hvr-bounce-to-bottom:before{content:"";position:absolute;z-index:-1;top:0;left:0;right:0;bottom:0;background:#2098D1;-webkit-transform:scaleY(0);transform:scaleY(0);-webkit-transform-origin:50% 0;transform-origin:50% 0;-webkit-transition-property:transform;transition-property:transform;-webkit-transition-duration:.5s;transition-duration:.5s;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.hvr-bounce-to-bottom:active,.hvr-bounce-to-bottom:focus,.hvr-bounce-to-bottom:hover{color:#fff}.hvr-bounce-to-bottom:active:before,.hvr-bounce-to-bottom:focus:before,.hvr-bounce-to-bottom:hover:before{-webkit-transform:scaleY(1);transform:scaleY(1);-webkit-transition-timing-function:cubic-bezier(0.52,1.64,.37,.66);transition-timing-function:cubic-bezier(0.52,1.64,.37,.66)}.hvr-bounce-to-top{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;-webkit-transition-property:color;transition-property:color;-webkit-transition-duration:.5s;transition-duration:.5s}.hvr-bounce-to-top:before{content:"";position:absolute;z-index:-1;top:0;left:0;right:0;bottom:0;background:#2098D1;-webkit-transform:scaleY(0);transform:scaleY(0);-webkit-transform-origin:50% 100%;transform-origin:50% 100%;-webkit-transition-property:transform;transition-property:transform;-webkit-transition-duration:.5s;transition-duration:.5s;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.hvr-bounce-to-top:active,.hvr-bounce-to-top:focus,.hvr-bounce-to-top:hover{color:#fff}.hvr-bounce-to-top:active:before,.hvr-bounce-to-top:focus:before,.hvr-bounce-to-top:hover:before{-webkit-transform:scaleY(1);transform:scaleY(1);-webkit-transition-timing-function:cubic-bezier(0.52,1.64,.37,.66);transition-timing-function:cubic-bezier(0.52,1.64,.37,.66)}.hvr-radial-out{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;overflow:hidden;background:#e1e1e1;-webkit-transition-property:color;transition-property:color;-webkit-transition-duration:.3s;transition-duration:.3s}.hvr-radial-out:before{content:"";position:absolute;z-index:-1;top:0;left:0;right:0;bottom:0;background:#2098D1;border-radius:100%;-webkit-transform:scale(0);transform:scale(0);-webkit-transition-property:transform;transition-property:transform;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.hvr-radial-out:active,.hvr-radial-out:focus,.hvr-radial-out:hover{color:#fff}.hvr-radial-out:active:before,.hvr-radial-out:focus:before,.hvr-radial-out:hover:before{-webkit-transform:scale(2);transform:scale(2)}.hvr-radial-in{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;overflow:hidden;background:#2098D1;-webkit-transition-property:color;transition-property:color;-webkit-transition-duration:.3s;transition-duration:.3s}.hvr-radial-in:before{content:"";position:absolute;z-index:-1;top:0;left:0;right:0;bottom:0;background:#e1e1e1;border-radius:100%;-webkit-transform:scale(2);transform:scale(2);-webkit-transition-property:transform;transition-property:transform;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.hvr-radial-in:active,.hvr-radial-in:focus,.hvr-radial-in:hover{color:#fff}.hvr-radial-in:active:before,.hvr-radial-in:focus:before,.hvr-radial-in:hover:before{-webkit-transform:scale(0);transform:scale(0)}.hvr-rectangle-in{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;background:#2098D1;-webkit-transition-property:color;transition-property:color;-webkit-transition-duration:.3s;transition-duration:.3s}.hvr-rectangle-in:before{content:"";position:absolute;z-index:-1;top:0;left:0;right:0;bottom:0;background:#e1e1e1;-webkit-transform:scale(1);transform:scale(1);-webkit-transition-property:transform;transition-property:transform;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.hvr-rectangle-in:active,.hvr-rectangle-in:focus,.hvr-rectangle-in:hover{color:#fff}.hvr-rectangle-in:active:before,.hvr-rectangle-in:focus:before,.hvr-rectangle-in:hover:before{-webkit-transform:scale(0);transform:scale(0)}.hvr-rectangle-out{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;background:#e1e1e1;-webkit-transition-property:color;transition-property:color;-webkit-transition-duration:.3s;transition-duration:.3s}.hvr-rectangle-out:before{content:"";position:absolute;z-index:-1;top:0;left:0;right:0;bottom:0;background:#2098D1;-webkit-transform:scale(0);transform:scale(0);-webkit-transition-property:transform;transition-property:transform;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.hvr-rectangle-out:active,.hvr-rectangle-out:focus,.hvr-rectangle-out:hover{color:#fff}.hvr-rectangle-out:active:before,.hvr-rectangle-out:focus:before,.hvr-rectangle-out:hover:before{-webkit-transform:scale(1);transform:scale(1)}.hvr-shutter-in-horizontal{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;background:#2098D1;-webkit-transition-property:color;transition-property:color;-webkit-transition-duration:.3s;transition-duration:.3s}.hvr-shutter-in-horizontal:before{content:"";position:absolute;z-index:-1;top:0;bottom:0;left:0;right:0;background:#e1e1e1;-webkit-transform:scaleX(1);transform:scaleX(1);-webkit-transform-origin:50%;transform-origin:50%;-webkit-transition-property:transform;transition-property:transform;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.hvr-shutter-in-horizontal:active,.hvr-shutter-in-horizontal:focus,.hvr-shutter-in-horizontal:hover{color:#fff}.hvr-shutter-in-horizontal:active:before,.hvr-shutter-in-horizontal:focus:before,.hvr-shutter-in-horizontal:hover:before{-webkit-transform:scaleX(0);transform:scaleX(0)}.hvr-shutter-out-horizontal{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;background:#e1e1e1;-webkit-transition-property:color;transition-property:color;-webkit-transition-duration:.3s;transition-duration:.3s}.hvr-shutter-out-horizontal:before{content:"";position:absolute;z-index:-1;top:0;bottom:0;left:0;right:0;background:#2098D1;-webkit-transform:scaleX(0);transform:scaleX(0);-webkit-transform-origin:50%;transform-origin:50%;-webkit-transition-property:transform;transition-property:transform;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.hvr-shutter-out-horizontal:active,.hvr-shutter-out-horizontal:focus,.hvr-shutter-out-horizontal:hover{color:#fff}.hvr-shutter-out-horizontal:active:before,.hvr-shutter-out-horizontal:focus:before,.hvr-shutter-out-horizontal:hover:before{-webkit-transform:scaleX(1);transform:scaleX(1)}.hvr-shutter-in-vertical{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;background:#2098D1;-webkit-transition-property:color;transition-property:color;-webkit-transition-duration:.3s;transition-duration:.3s}.hvr-shutter-in-vertical:before{content:"";position:absolute;z-index:-1;top:0;bottom:0;left:0;right:0;background:#e1e1e1;-webkit-transform:scaleY(1);transform:scaleY(1);-webkit-transform-origin:50%;transform-origin:50%;-webkit-transition-property:transform;transition-property:transform;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.hvr-shutter-in-vertical:active,.hvr-shutter-in-vertical:focus,.hvr-shutter-in-vertical:hover{color:#fff}.hvr-shutter-in-vertical:active:before,.hvr-shutter-in-vertical:focus:before,.hvr-shutter-in-vertical:hover:before{-webkit-transform:scaleY(0);transform:scaleY(0)}.hvr-shutter-out-vertical{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;background:#e1e1e1;-webkit-transition-property:color;transition-property:color;-webkit-transition-duration:.3s;transition-duration:.3s}.hvr-shutter-out-vertical:before{content:"";position:absolute;z-index:-1;top:0;bottom:0;left:0;right:0;background:#2098D1;-webkit-transform:scaleY(0);transform:scaleY(0);-webkit-transform-origin:50%;transform-origin:50%;-webkit-transition-property:transform;transition-property:transform;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.hvr-shutter-out-vertical:active,.hvr-shutter-out-vertical:focus,.hvr-shutter-out-vertical:hover{color:#fff}.hvr-shutter-out-vertical:active:before,.hvr-shutter-out-vertical:focus:before,.hvr-shutter-out-vertical:hover:before{-webkit-transform:scaleY(1);transform:scaleY(1)}.hvr-border-fade{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-property:box-shadow;transition-property:box-shadow;box-shadow:inset 0 0 0 4px #e1e1e1,0 0 1px transparent}.hvr-border-fade:active,.hvr-border-fade:focus,.hvr-border-fade:hover{box-shadow:inset 0 0 0 4px #2098D1,0 0 1px transparent}.hvr-hollow{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-property:background;transition-property:background;box-shadow:inset 0 0 0 4px #e1e1e1,0 0 1px transparent}.hvr-hollow:active,.hvr-hollow:focus,.hvr-hollow:hover{background:0 0}.hvr-trim{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative}.hvr-trim:before{content:'';position:absolute;border:#fff solid 4px;top:4px;left:4px;right:4px;bottom:4px;opacity:0;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-property:opacity;transition-property:opacity}.hvr-trim:active:before,.hvr-trim:focus:before,.hvr-trim:hover:before{opacity:1}@-webkit-keyframes hvr-ripple-out{100%{top:-12px;right:-12px;bottom:-12px;left:-12px;opacity:0}}@keyframes hvr-ripple-out{100%{top:-12px;right:-12px;bottom:-12px;left:-12px;opacity:0}}.hvr-ripple-out{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative}.hvr-ripple-out:before{content:'';position:absolute;border:#e1e1e1 solid 6px;top:0;right:0;bottom:0;left:0;-webkit-animation-duration:1s;animation-duration:1s}.hvr-ripple-out:active:before,.hvr-ripple-out:focus:before,.hvr-ripple-out:hover:before{-webkit-animation-name:hvr-ripple-out;animation-name:hvr-ripple-out}@-webkit-keyframes hvr-ripple-in{100%{top:0;right:0;bottom:0;left:0;opacity:1}}@keyframes hvr-ripple-in{100%{top:0;right:0;bottom:0;left:0;opacity:1}}.hvr-ripple-in{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative}.hvr-ripple-in:before{content:'';position:absolute;border:#e1e1e1 solid 4px;top:-12px;right:-12px;bottom:-12px;left:-12px;opacity:0;-webkit-animation-duration:1s;animation-duration:1s}.hvr-ripple-in:active:before,.hvr-ripple-in:focus:before,.hvr-ripple-in:hover:before{-webkit-animation-name:hvr-ripple-in;animation-name:hvr-ripple-in}.hvr-outline-out{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative}.hvr-outline-out:before{content:'';position:absolute;border:#e1e1e1 solid 4px;top:0;right:0;bottom:0;left:0;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-property:top,right,bottom,left;transition-property:top,right,bottom,left}.hvr-outline-out:active:before,.hvr-outline-out:focus:before,.hvr-outline-out:hover:before{top:-8px;right:-8px;bottom:-8px;left:-8px}.hvr-outline-in{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative}.hvr-outline-in:before{pointer-events:none;content:'';position:absolute;border:#e1e1e1 solid 4px;top:-16px;right:-16px;bottom:-16px;left:-16px;opacity:0;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-property:top,right,bottom,left;transition-property:top,right,bottom,left}.hvr-outline-in:active:before,.hvr-outline-in:focus:before,.hvr-outline-in:hover:before{top:-8px;right:-8px;bottom:-8px;left:-8px;opacity:1}.hvr-round-corners{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-property:border-radius;transition-property:border-radius}.hvr-round-corners:active,.hvr-round-corners:focus,.hvr-round-corners:hover{border-radius:1em}.hvr-underline-from-left{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;overflow:hidden}.hvr-underline-from-left:before{content:"";position:absolute;z-index:-1;left:0;right:100%;bottom:0;background:#2098D1;height:4px;-webkit-transition-property:right;transition-property:right;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.hvr-underline-from-left:active:before,.hvr-underline-from-left:focus:before,.hvr-underline-from-left:hover:before{right:0}.hvr-underline-from-center{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;overflow:hidden}.hvr-underline-from-center:before{content:"";position:absolute;z-index:-1;left:50%;right:50%;bottom:0;background:#2098D1;height:4px;-webkit-transition-property:left,right;transition-property:left,right;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.hvr-underline-from-center:active:before,.hvr-underline-from-center:focus:before,.hvr-underline-from-center:hover:before{left:0;right:0}.hvr-underline-from-right{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;overflow:hidden}.hvr-underline-from-right:before{content:"";position:absolute;z-index:-1;left:100%;right:0;bottom:0;background:#2098D1;height:4px;-webkit-transition-property:left;transition-property:left;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.hvr-underline-from-right:active:before,.hvr-underline-from-right:focus:before,.hvr-underline-from-right:hover:before{left:0}.hvr-overline-from-left{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;overflow:hidden}.hvr-overline-from-left:before{content:"";position:absolute;z-index:-1;left:0;right:100%;top:0;background:#2098D1;height:4px;-webkit-transition-property:right;transition-property:right;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.hvr-overline-from-left:active:before,.hvr-overline-from-left:focus:before,.hvr-overline-from-left:hover:before{right:0}.hvr-overline-from-center{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;overflow:hidden}.hvr-overline-from-center:before{content:"";position:absolute;z-index:-1;left:50%;right:50%;top:0;background:#2098D1;height:4px;-webkit-transition-property:left,right;transition-property:left,right;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.hvr-overline-from-center:active:before,.hvr-overline-from-center:focus:before,.hvr-overline-from-center:hover:before{left:0;right:0}.hvr-overline-from-right{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;overflow:hidden}.hvr-overline-from-right:before{content:"";position:absolute;z-index:-1;left:100%;right:0;top:0;background:#2098D1;height:4px;-webkit-transition-property:left;transition-property:left;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.hvr-overline-from-right:active:before,.hvr-overline-from-right:focus:before,.hvr-overline-from-right:hover:before{left:0}.hvr-reveal{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;overflow:hidden}.hvr-reveal:before{content:"";position:absolute;z-index:-1;left:0;right:0;top:0;bottom:0;border-color:#2098D1;border-style:solid;border-width:0;-webkit-transition-property:border-width;transition-property:border-width;-webkit-transition-duration:.1s;transition-duration:.1s;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.hvr-reveal:active:before,.hvr-reveal:focus:before,.hvr-reveal:hover:before{-webkit-transform:translateY(0);transform:translateY(0);border-width:4px}.hvr-underline-reveal{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;overflow:hidden}.hvr-underline-reveal:before{content:"";position:absolute;z-index:-1;left:0;right:0;bottom:0;background:#2098D1;height:4px;-webkit-transform:translateY(4px);transform:translateY(4px);-webkit-transition-property:transform;transition-property:transform;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.hvr-underline-reveal:active:before,.hvr-underline-reveal:focus:before,.hvr-underline-reveal:hover:before{-webkit-transform:translateY(0);transform:translateY(0)}.hvr-overline-reveal{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;overflow:hidden}.hvr-overline-reveal:before{content:"";position:absolute;z-index:-1;left:0;right:0;top:0;background:#2098D1;height:4px;-webkit-transform:translateY(-4px);transform:translateY(-4px);-webkit-transition-property:transform;transition-property:transform;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.hvr-overline-reveal:active:before,.hvr-overline-reveal:focus:before,.hvr-overline-reveal:hover:before{-webkit-transform:translateY(0);transform:translateY(0)}.hvr-glow{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-property:box-shadow;transition-property:box-shadow}.hvr-glow:active,.hvr-glow:focus,.hvr-glow:hover{box-shadow:0 0 8px rgba(0,0,0,.6)}.hvr-shadow{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-property:box-shadow;transition-property:box-shadow}.hvr-shadow:active,.hvr-shadow:focus,.hvr-shadow:hover{box-shadow:0 10px 10px -10px rgba(0,0,0,.5)}.hvr-grow-shadow{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-property:box-shadow,transform;transition-property:box-shadow,transform}.hvr-grow-shadow:active,.hvr-grow-shadow:focus,.hvr-grow-shadow:hover{box-shadow:0 10px 10px -10px rgba(0,0,0,.5);-webkit-transform:scale(1.1);transform:scale(1.1)}.hvr-box-shadow-outset{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-property:box-shadow;transition-property:box-shadow}.hvr-box-shadow-outset:active,.hvr-box-shadow-outset:focus,.hvr-box-shadow-outset:hover{box-shadow:2px 2px 2px rgba(0,0,0,.6)}.hvr-box-shadow-inset{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-property:box-shadow;transition-property:box-shadow;box-shadow:inset 0 0 0 rgba(0,0,0,.6),0 0 1px transparent}.hvr-box-shadow-inset:active,.hvr-box-shadow-inset:focus,.hvr-box-shadow-inset:hover{box-shadow:inset 2px 2px 2px rgba(0,0,0,.6),0 0 1px transparent}.hvr-float-shadow{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-property:transform;transition-property:transform}.hvr-float-shadow:before{pointer-events:none;position:absolute;z-index:-1;content:'';top:100%;left:5%;height:10px;width:90%;opacity:0;background:-webkit-radial-gradient(center,ellipse,rgba(0,0,0,.35) 0,transparent 80%);background:radial-gradient(ellipse at center,rgba(0,0,0,.35) 0,transparent 80%);-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-property:transform,opacity;transition-property:transform,opacity}.hvr-float-shadow:active,.hvr-float-shadow:focus,.hvr-float-shadow:hover{-webkit-transform:translateY(-5px);transform:translateY(-5px)}.hvr-float-shadow:active:before,.hvr-float-shadow:focus:before,.hvr-float-shadow:hover:before{opacity:1;-webkit-transform:translateY(5px);transform:translateY(5px)}.hvr-shadow-radial{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative}.hvr-shadow-radial:after,.hvr-shadow-radial:before{pointer-events:none;position:absolute;content:'';left:0;width:100%;box-sizing:border-box;height:5px;opacity:0;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-property:opacity;transition-property:opacity}.hvr-shadow-radial:before{bottom:100%;background:-webkit-radial-gradient(50% 150%,ellipse,rgba(0,0,0,.6) 0,transparent 80%);background:radial-gradient(ellipse at 50% 150%,rgba(0,0,0,.6) 0,transparent 80%)}.hvr-shadow-radial:after{top:100%;background:-webkit-radial-gradient(50% -50%,ellipse,rgba(0,0,0,.6) 0,transparent 80%);background:radial-gradient(ellipse at 50% -50%,rgba(0,0,0,.6) 0,transparent 80%)}.hvr-shadow-radial:active:after,.hvr-shadow-radial:active:before,.hvr-shadow-radial:focus:after,.hvr-shadow-radial:focus:before,.hvr-shadow-radial:hover:after,.hvr-shadow-radial:hover:before{opacity:1}.hvr-bubble-top{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative}.hvr-bubble-top:before{pointer-events:none;position:absolute;z-index:-1;content:'';border-style:solid;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-property:transform;transition-property:transform;left:calc(50% - 10px);top:0;border-width:0 10px 10px;border-color:transparent transparent #e1e1e1}.hvr-bubble-top:active:before,.hvr-bubble-top:focus:before,.hvr-bubble-top:hover:before{-webkit-transform:translateY(-10px);transform:translateY(-10px)}.hvr-bubble-right{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative}.hvr-bubble-right:before{pointer-events:none;position:absolute;z-index:-1;content:'';border-style:solid;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-property:transform;transition-property:transform;top:calc(50% - 10px);right:0;border-width:10px 0 10px 10px;border-color:transparent transparent transparent #e1e1e1}.hvr-bubble-right:active:before,.hvr-bubble-right:focus:before,.hvr-bubble-right:hover:before{-webkit-transform:translateX(10px);transform:translateX(10px)}.hvr-bubble-bottom{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative}.hvr-bubble-bottom:before{pointer-events:none;position:absolute;z-index:-1;content:'';border-style:solid;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-property:transform;transition-property:transform;left:calc(50% - 10px);bottom:0;border-width:10px 10px 0;border-color:#e1e1e1 transparent transparent}.hvr-bubble-bottom:active:before,.hvr-bubble-bottom:focus:before,.hvr-bubble-bottom:hover:before{-webkit-transform:translateY(10px);transform:translateY(10px)}.hvr-bubble-left{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative}.hvr-bubble-left:before{pointer-events:none;position:absolute;z-index:-1;content:'';border-style:solid;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-property:transform;transition-property:transform;top:calc(50% - 10px);left:0;border-width:10px 10px 10px 0;border-color:transparent #e1e1e1 transparent transparent}.hvr-bubble-left:active:before,.hvr-bubble-left:focus:before,.hvr-bubble-left:hover:before{-webkit-transform:translateX(-10px);transform:translateX(-10px)}.hvr-bubble-float-top{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-property:transform;transition-property:transform}.hvr-bubble-float-top:before{position:absolute;z-index:-1;content:'';left:calc(50% - 10px);top:0;border-style:solid;border-width:0 10px 10px;border-color:transparent transparent #e1e1e1;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-property:transform;transition-property:transform}.hvr-bubble-float-top:active,.hvr-bubble-float-top:focus,.hvr-bubble-float-top:hover{-webkit-transform:translateY(10px);transform:translateY(10px)}.hvr-bubble-float-top:active:before,.hvr-bubble-float-top:focus:before,.hvr-bubble-float-top:hover:before{-webkit-transform:translateY(-10px);transform:translateY(-10px)}.hvr-bubble-float-right{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-property:transform;transition-property:transform}.hvr-bubble-float-right:before{position:absolute;z-index:-1;top:calc(50% - 10px);right:0;content:'';border-style:solid;border-width:10px 0 10px 10px;border-color:transparent transparent transparent #e1e1e1;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-property:transform;transition-property:transform}.hvr-bubble-float-right:active,.hvr-bubble-float-right:focus,.hvr-bubble-float-right:hover{-webkit-transform:translateX(-10px);transform:translateX(-10px)}.hvr-bubble-float-right:active:before,.hvr-bubble-float-right:focus:before,.hvr-bubble-float-right:hover:before{-webkit-transform:translateX(10px);transform:translateX(10px)}.hvr-bubble-float-bottom{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-property:transform;transition-property:transform}.hvr-bubble-float-bottom:before{position:absolute;z-index:-1;content:'';left:calc(50% - 10px);bottom:0;border-style:solid;border-width:10px 10px 0;border-color:#e1e1e1 transparent transparent;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-property:transform;transition-property:transform}.hvr-bubble-float-bottom:active,.hvr-bubble-float-bottom:focus,.hvr-bubble-float-bottom:hover{-webkit-transform:translateY(-10px);transform:translateY(-10px)}.hvr-bubble-float-bottom:active:before,.hvr-bubble-float-bottom:focus:before,.hvr-bubble-float-bottom:hover:before{-webkit-transform:translateY(10px);transform:translateY(10px)}.hvr-bubble-float-left{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-property:transform;transition-property:transform}.hvr-bubble-float-left:before{position:absolute;z-index:-1;content:'';top:calc(50% - 10px);left:0;border-style:solid;border-width:10px 10px 10px 0;border-color:transparent #e1e1e1 transparent transparent;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-property:transform;transition-property:transform}.hvr-bubble-float-left:active,.hvr-bubble-float-left:focus,.hvr-bubble-float-left:hover{-webkit-transform:translateX(10px);transform:translateX(10px)}.hvr-bubble-float-left:active:before,.hvr-bubble-float-left:focus:before,.hvr-bubble-float-left:hover:before{-webkit-transform:translateX(-10px);transform:translateX(-10px)}.hvr-icon-back{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;padding-left:2.2em;-webkit-transition-duration:.1s;transition-duration:.1s}.hvr-icon-back:before{content:"\f137";position:absolute;left:1em;padding:0 1px;font-family:FontAwesome;-webkit-transform:translateZ(0);transform:translateZ(0);-webkit-transition-duration:.1s;transition-duration:.1s;-webkit-transition-property:transform;transition-property:transform;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.hvr-icon-back:active:before,.hvr-icon-back:focus:before,.hvr-icon-back:hover:before{-webkit-transform:translateX(-4px);transform:translateX(-4px)}.hvr-icon-forward{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;padding-right:2.2em;-webkit-transition-duration:.1s;transition-duration:.1s}.hvr-icon-forward:before{content:"\f138";position:absolute;right:1em;padding:0 1px;font-family:FontAwesome;-webkit-transform:translateZ(0);transform:translateZ(0);-webkit-transition-duration:.1s;transition-duration:.1s;-webkit-transition-property:transform;transition-property:transform;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.hvr-icon-forward:active:before,.hvr-icon-forward:focus:before,.hvr-icon-forward:hover:before{-webkit-transform:translateX(4px);transform:translateX(4px)}@-webkit-keyframes hvr-icon-down{0%,100%,50%{-webkit-transform:translateY(0);transform:translateY(0)}25%,75%{-webkit-transform:translateY(6px);transform:translateY(6px)}}@keyframes hvr-icon-down{0%,100%,50%{-webkit-transform:translateY(0);transform:translateY(0)}25%,75%{-webkit-transform:translateY(6px);transform:translateY(6px)}}.hvr-icon-down{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;padding-right:2.2em}.hvr-icon-down:before{content:"\f01a";position:absolute;right:1em;padding:0 1px;font-family:FontAwesome;-webkit-transform:translateZ(0);transform:translateZ(0)}.hvr-icon-down:active:before,.hvr-icon-down:focus:before,.hvr-icon-down:hover:before{-webkit-animation-name:hvr-icon-down;animation-name:hvr-icon-down;-webkit-animation-duration:.75s;animation-duration:.75s;-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}@-webkit-keyframes hvr-icon-up{0%,100%,50%{-webkit-transform:translateY(0);transform:translateY(0)}25%,75%{-webkit-transform:translateY(-6px);transform:translateY(-6px)}}@keyframes hvr-icon-up{0%,100%,50%{-webkit-transform:translateY(0);transform:translateY(0)}25%,75%{-webkit-transform:translateY(-6px);transform:translateY(-6px)}}.hvr-icon-up{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;padding-right:2.2em}.hvr-icon-up:before{content:"\f01b";position:absolute;right:1em;padding:0 1px;font-family:FontAwesome;-webkit-transform:translateZ(0);transform:translateZ(0)}.hvr-icon-up:active:before,.hvr-icon-up:focus:before,.hvr-icon-up:hover:before{-webkit-animation-name:hvr-icon-up;animation-name:hvr-icon-up;-webkit-animation-duration:.75s;animation-duration:.75s;-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}.hvr-icon-spin{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;padding-right:2.2em}.hvr-icon-spin:before{content:"\f021";position:absolute;right:1em;padding:0 1px;font-family:FontAwesome;-webkit-transition-duration:1s;transition-duration:1s;-webkit-transition-property:transform;transition-property:transform;-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out}.hvr-icon-spin:active:before,.hvr-icon-spin:focus:before,.hvr-icon-spin:hover:before{-webkit-transform:rotate(360deg);transform:rotate(360deg)}@-webkit-keyframes hvr-icon-drop{0%{opacity:0}50%{opacity:0;-webkit-transform:translateY(-100%);transform:translateY(-100%)}100%,51%{opacity:1}}@keyframes hvr-icon-drop{0%{opacity:0}50%{opacity:0;-webkit-transform:translateY(-100%);transform:translateY(-100%)}100%,51%{opacity:1}}.hvr-icon-drop{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;padding-right:2.2em}.hvr-icon-drop:before{content:"\f041";position:absolute;right:1em;opacity:1;padding:0 1px;font-family:FontAwesome;-webkit-transform:translateZ(0);transform:translateZ(0)}.hvr-icon-drop:active:before,.hvr-icon-drop:focus:before,.hvr-icon-drop:hover:before{opacity:0;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-animation-name:hvr-icon-drop;animation-name:hvr-icon-drop;-webkit-animation-duration:.5s;animation-duration:.5s;-webkit-animation-delay:.3s;animation-delay:.3s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-timing-function:cubic-bezier(0.52,1.64,.37,.66);animation-timing-function:cubic-bezier(0.52,1.64,.37,.66)}.hvr-icon-fade{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;padding-right:2.2em}.hvr-icon-fade:before{content:"\f00c";position:absolute;right:1em;padding:0 1px;font-family:FontAwesome;-webkit-transform:translateZ(0);transform:translateZ(0);-webkit-transition-duration:.5s;transition-duration:.5s;-webkit-transition-property:color;transition-property:color}.hvr-icon-fade:active:before,.hvr-icon-fade:focus:before,.hvr-icon-fade:hover:before{color:#0F9E5E}@-webkit-keyframes hvr-icon-float-away{0%{opacity:1}100%{opacity:0;-webkit-transform:translateY(-1em);transform:translateY(-1em)}}@keyframes hvr-icon-float-away{0%{opacity:1}100%{opacity:0;-webkit-transform:translateY(-1em);transform:translateY(-1em)}}.hvr-icon-float-away{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;padding-right:2.2em}.hvr-icon-float-away:after,.hvr-icon-float-away:before{content:"\f055";position:absolute;right:1em;padding:0 1px;font-family:FontAwesome}.hvr-icon-float-away:after{opacity:0;-webkit-animation-duration:.5s;animation-duration:.5s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}.hvr-icon-float-away:active:after,.hvr-icon-float-away:focus:after,.hvr-icon-float-away:hover:after{-webkit-animation-name:hvr-icon-float-away;animation-name:hvr-icon-float-away;-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}@-webkit-keyframes hvr-icon-sink-away{0%{opacity:1}100%{opacity:0;-webkit-transform:translateY(1em);transform:translateY(1em)}}@keyframes hvr-icon-sink-away{0%{opacity:1}100%{opacity:0;-webkit-transform:translateY(1em);transform:translateY(1em)}}.hvr-icon-sink-away{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;padding-right:2.2em}.hvr-icon-sink-away:after,.hvr-icon-sink-away:before{content:"\f056";position:absolute;right:1em;padding:0 1px;font-family:FontAwesome;-webkit-transform:translateZ(0);transform:translateZ(0)}.hvr-icon-sink-away:after{opacity:0;-webkit-animation-duration:.5s;animation-duration:.5s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}.hvr-icon-sink-away:active:after,.hvr-icon-sink-away:focus:after,.hvr-icon-sink-away:hover:after{-webkit-animation-name:hvr-icon-sink-away;animation-name:hvr-icon-sink-away;-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}.hvr-icon-grow{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;padding-right:2.2em;-webkit-transition-duration:.3s;transition-duration:.3s}.hvr-icon-grow:before{content:"\f118";position:absolute;right:1em;padding:0 1px;font-family:FontAwesome;-webkit-transform:translateZ(0);transform:translateZ(0);-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-property:transform;transition-property:transform;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.hvr-icon-grow:active:before,.hvr-icon-grow:focus:before,.hvr-icon-grow:hover:before{-webkit-transform:scale(1.3) translateZ(0);transform:scale(1.3) translateZ(0)}.hvr-icon-shrink{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;padding-right:2.2em;-webkit-transition-duration:.3s;transition-duration:.3s}.hvr-icon-shrink:before{content:"\f119";position:absolute;right:1em;padding:0 1px;font-family:FontAwesome;-webkit-transform:translateZ(0);transform:translateZ(0);-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-property:transform;transition-property:transform;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.hvr-icon-shrink:active:before,.hvr-icon-shrink:focus:before,.hvr-icon-shrink:hover:before{-webkit-transform:scale(0.8);transform:scale(0.8)}@-webkit-keyframes hvr-icon-pulse{25%{-webkit-transform:scale(1.3);transform:scale(1.3)}75%{-webkit-transform:scale(0.8);transform:scale(0.8)}}@keyframes hvr-icon-pulse{25%{-webkit-transform:scale(1.3);transform:scale(1.3)}75%{-webkit-transform:scale(0.8);transform:scale(0.8)}}.hvr-icon-pulse{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;padding-right:2.2em}.hvr-icon-pulse:before{content:"\f015";position:absolute;right:1em;padding:0 1px;font-family:FontAwesome;-webkit-transform:translateZ(0);transform:translateZ(0);-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.hvr-icon-pulse:active:before,.hvr-icon-pulse:focus:before,.hvr-icon-pulse:hover:before{-webkit-animation-name:hvr-icon-pulse;animation-name:hvr-icon-pulse;-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-timing-function:linear;animation-timing-function:linear;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}@-webkit-keyframes hvr-icon-pulse-grow{to{-webkit-transform:scale(1.3);transform:scale(1.3)}}@keyframes hvr-icon-pulse-grow{to{-webkit-transform:scale(1.3);transform:scale(1.3)}}.hvr-icon-pulse-grow{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;padding-right:2.2em}.hvr-icon-pulse-grow:before{content:"\f015";position:absolute;right:1em;padding:0 1px;font-family:FontAwesome;-webkit-transform:translateZ(0);transform:translateZ(0);-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.hvr-icon-pulse-grow:active:before,.hvr-icon-pulse-grow:focus:before,.hvr-icon-pulse-grow:hover:before{-webkit-animation-name:hvr-icon-pulse-grow;animation-name:hvr-icon-pulse-grow;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:linear;animation-timing-function:linear;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-direction:alternate;animation-direction:alternate}@-webkit-keyframes hvr-icon-pulse-shrink{to{-webkit-transform:scale(0.8);transform:scale(0.8)}}@keyframes hvr-icon-pulse-shrink{to{-webkit-transform:scale(0.8);transform:scale(0.8)}}.hvr-icon-pulse-shrink{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;padding-right:2.2em}.hvr-icon-pulse-shrink:before{content:"\f015";position:absolute;right:1em;padding:0 1px;font-family:FontAwesome;-webkit-transform:translateZ(0);transform:translateZ(0);-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.hvr-icon-pulse-shrink:active:before,.hvr-icon-pulse-shrink:focus:before,.hvr-icon-pulse-shrink:hover:before{-webkit-animation-name:hvr-icon-pulse-shrink;animation-name:hvr-icon-pulse-shrink;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:linear;animation-timing-function:linear;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-direction:alternate;animation-direction:alternate}@-webkit-keyframes hvr-icon-push{50%{-webkit-transform:scale(0.5);transform:scale(0.5)}}@keyframes hvr-icon-push{50%{-webkit-transform:scale(0.5);transform:scale(0.5)}}.hvr-icon-push{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;padding-right:2.2em;-webkit-transition-duration:.3s;transition-duration:.3s}.hvr-icon-push:before{content:"\f006";position:absolute;right:1em;padding:0 1px;font-family:FontAwesome;-webkit-transform:translateZ(0);transform:translateZ(0);-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-property:transform;transition-property:transform;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.hvr-icon-push:active:before,.hvr-icon-push:focus:before,.hvr-icon-push:hover:before{-webkit-animation-name:hvr-icon-push;animation-name:hvr-icon-push;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:linear;animation-timing-function:linear;-webkit-animation-iteration-count:1;animation-iteration-count:1}@-webkit-keyframes hvr-icon-pop{50%{-webkit-transform:scale(1.5);transform:scale(1.5)}}@keyframes hvr-icon-pop{50%{-webkit-transform:scale(1.5);transform:scale(1.5)}}.hvr-icon-pop{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;padding-right:2.2em;-webkit-transition-duration:.3s;transition-duration:.3s}.hvr-icon-pop:before{content:"\f005";position:absolute;right:1em;padding:0 1px;font-family:FontAwesome;-webkit-transform:translateZ(0);transform:translateZ(0);-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-property:transform;transition-property:transform;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.hvr-icon-pop:active:before,.hvr-icon-pop:focus:before,.hvr-icon-pop:hover:before{-webkit-animation-name:hvr-icon-pop;animation-name:hvr-icon-pop;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:linear;animation-timing-function:linear;-webkit-animation-iteration-count:1;animation-iteration-count:1}.hvr-icon-bounce{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;padding-right:2.2em;-webkit-transition-duration:.3s;transition-duration:.3s}.hvr-icon-bounce:before{content:"\f087";position:absolute;right:1em;padding:0 1px;font-family:FontAwesome;-webkit-transform:translateZ(0);transform:translateZ(0);-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-property:transform;transition-property:transform;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.hvr-icon-bounce:active:before,.hvr-icon-bounce:focus:before,.hvr-icon-bounce:hover:before{-webkit-transform:scale(1.5);transform:scale(1.5);-webkit-transition-timing-function:cubic-bezier(0.47,2.02,.31,-.36);transition-timing-function:cubic-bezier(0.47,2.02,.31,-.36)}.hvr-icon-rotate{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;padding-right:2.2em;-webkit-transition-duration:.3s;transition-duration:.3s}.hvr-icon-rotate:before{content:"\f0c6";position:absolute;right:1em;padding:0 1px;font-family:FontAwesome;-webkit-transform:translateZ(0);transform:translateZ(0);-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-property:transform;transition-property:transform;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.hvr-icon-rotate:active:before,.hvr-icon-rotate:focus:before,.hvr-icon-rotate:hover:before{-webkit-transform:rotate(20deg);transform:rotate(20deg)}.hvr-icon-grow-rotate{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;padding-right:2.2em;-webkit-transition-duration:.3s;transition-duration:.3s}.hvr-icon-grow-rotate:before{content:"\f095";position:absolute;right:1em;padding:0 1px;font-family:FontAwesome;-webkit-transform:translateZ(0);transform:translateZ(0);-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-property:transform;transition-property:transform;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.hvr-icon-grow-rotate:active:before,.hvr-icon-grow-rotate:focus:before,.hvr-icon-grow-rotate:hover:before{-webkit-transform:scale(1.5) rotate(12deg);transform:scale(1.5) rotate(12deg)}.hvr-icon-float{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;padding-right:2.2em;-webkit-transition-duration:.3s;transition-duration:.3s}.hvr-icon-float:before{content:"\f01b";position:absolute;right:1em;padding:0 1px;font-family:FontAwesome;-webkit-transform:translateZ(0);transform:translateZ(0);-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-property:transform;transition-property:transform;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.hvr-icon-float:active:before,.hvr-icon-float:focus:before,.hvr-icon-float:hover:before{-webkit-transform:translateY(-4px);transform:translateY(-4px)}.hvr-icon-sink{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;padding-right:2.2em;-webkit-transition-duration:.3s;transition-duration:.3s}.hvr-icon-sink:before{content:"\f01a";position:absolute;right:1em;padding:0 1px;font-family:FontAwesome;-webkit-transform:translateZ(0);transform:translateZ(0);-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-property:transform;transition-property:transform;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.hvr-icon-sink:active:before,.hvr-icon-sink:focus:before,.hvr-icon-sink:hover:before{-webkit-transform:translateY(4px);transform:translateY(4px)}@-webkit-keyframes hvr-icon-bob{0%{-webkit-transform:translateY(-6px);transform:translateY(-6px)}50%{-webkit-transform:translateY(-2px);transform:translateY(-2px)}100%{-webkit-transform:translateY(-6px);transform:translateY(-6px)}}@keyframes hvr-icon-bob{0%{-webkit-transform:translateY(-6px);transform:translateY(-6px)}50%{-webkit-transform:translateY(-2px);transform:translateY(-2px)}100%{-webkit-transform:translateY(-6px);transform:translateY(-6px)}}@-webkit-keyframes hvr-icon-bob-float{100%{-webkit-transform:translateY(-6px);transform:translateY(-6px)}}@keyframes hvr-icon-bob-float{100%{-webkit-transform:translateY(-6px);transform:translateY(-6px)}}.hvr-icon-bob{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;padding-right:2.2em;-webkit-transition-duration:.3s;transition-duration:.3s}.hvr-icon-bob:before{content:"\f077";position:absolute;right:1em;padding:0 1px;font-family:FontAwesome;-webkit-transform:translateZ(0);transform:translateZ(0)}.hvr-icon-bob:active:before,.hvr-icon-bob:focus:before,.hvr-icon-bob:hover:before{-webkit-animation-name:hvr-icon-bob-float,hvr-icon-bob;animation-name:hvr-icon-bob-float,hvr-icon-bob;-webkit-animation-duration:.3s,1.5s;animation-duration:.3s,1.5s;-webkit-animation-delay:0s,.3s;animation-delay:0s,.3s;-webkit-animation-timing-function:ease-out,ease-in-out;animation-timing-function:ease-out,ease-in-out;-webkit-animation-iteration-count:1,infinite;animation-iteration-count:1,infinite;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-direction:normal,alternate;animation-direction:normal,alternate}@-webkit-keyframes hvr-icon-hang{0%{-webkit-transform:translateY(6px);transform:translateY(6px)}50%{-webkit-transform:translateY(2px);transform:translateY(2px)}100%{-webkit-transform:translateY(6px);transform:translateY(6px)}}@keyframes hvr-icon-hang{0%{-webkit-transform:translateY(6px);transform:translateY(6px)}50%{-webkit-transform:translateY(2px);transform:translateY(2px)}100%{-webkit-transform:translateY(6px);transform:translateY(6px)}}@-webkit-keyframes hvr-icon-hang-sink{100%{-webkit-transform:translateY(6px);transform:translateY(6px)}}@keyframes hvr-icon-hang-sink{100%{-webkit-transform:translateY(6px);transform:translateY(6px)}}.hvr-icon-hang{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;padding-right:2.2em;-webkit-transition-duration:.3s;transition-duration:.3s}.hvr-icon-hang:before{content:"\f078";position:absolute;right:1em;padding:0 1px;font-family:FontAwesome;-webkit-transform:translateZ(0);transform:translateZ(0)}.hvr-icon-hang:active:before,.hvr-icon-hang:focus:before,.hvr-icon-hang:hover:before{-webkit-animation-name:hvr-icon-hang-sink,hvr-icon-hang;animation-name:hvr-icon-hang-sink,hvr-icon-hang;-webkit-animation-duration:.3s,1.5s;animation-duration:.3s,1.5s;-webkit-animation-delay:0s,.3s;animation-delay:0s,.3s;-webkit-animation-timing-function:ease-out,ease-in-out;animation-timing-function:ease-out,ease-in-out;-webkit-animation-iteration-count:1,infinite;animation-iteration-count:1,infinite;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-direction:normal,alternate;animation-direction:normal,alternate}@-webkit-keyframes hvr-icon-wobble-horizontal{16.65%{-webkit-transform:translateX(6px);transform:translateX(6px)}33.3%{-webkit-transform:translateX(-5px);transform:translateX(-5px)}49.95%{-webkit-transform:translateX(4px);transform:translateX(4px)}66.6%{-webkit-transform:translateX(-2px);transform:translateX(-2px)}83.25%{-webkit-transform:translateX(1px);transform:translateX(1px)}100%{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes hvr-icon-wobble-horizontal{16.65%{-webkit-transform:translateX(6px);transform:translateX(6px)}33.3%{-webkit-transform:translateX(-5px);transform:translateX(-5px)}49.95%{-webkit-transform:translateX(4px);transform:translateX(4px)}66.6%{-webkit-transform:translateX(-2px);transform:translateX(-2px)}83.25%{-webkit-transform:translateX(1px);transform:translateX(1px)}100%{-webkit-transform:translateX(0);transform:translateX(0)}}.hvr-icon-wobble-horizontal{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;padding-right:2.2em;-webkit-transition-duration:.3s;transition-duration:.3s}.hvr-icon-wobble-horizontal:before{content:"\f061";position:absolute;right:1em;padding:0 1px;font-family:FontAwesome;-webkit-transform:translateZ(0);transform:translateZ(0)}.hvr-icon-wobble-horizontal:active:before,.hvr-icon-wobble-horizontal:focus:before,.hvr-icon-wobble-horizontal:hover:before{-webkit-animation-name:hvr-icon-wobble-horizontal;animation-name:hvr-icon-wobble-horizontal;-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;-webkit-animation-iteration-count:1;animation-iteration-count:1}@-webkit-keyframes hvr-icon-wobble-vertical{16.65%{-webkit-transform:translateY(6px);transform:translateY(6px)}33.3%{-webkit-transform:translateY(-5px);transform:translateY(-5px)}49.95%{-webkit-transform:translateY(4px);transform:translateY(4px)}66.6%{-webkit-transform:translateY(-2px);transform:translateY(-2px)}83.25%{-webkit-transform:translateY(1px);transform:translateY(1px)}100%{-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes hvr-icon-wobble-vertical{16.65%{-webkit-transform:translateY(6px);transform:translateY(6px)}33.3%{-webkit-transform:translateY(-5px);transform:translateY(-5px)}49.95%{-webkit-transform:translateY(4px);transform:translateY(4px)}66.6%{-webkit-transform:translateY(-2px);transform:translateY(-2px)}83.25%{-webkit-transform:translateY(1px);transform:translateY(1px)}100%{-webkit-transform:translateY(0);transform:translateY(0)}}.hvr-icon-wobble-vertical{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;padding-right:2.2em;-webkit-transition-duration:.3s;transition-duration:.3s}.hvr-icon-wobble-vertical:before{content:"\f062";position:absolute;right:1em;padding:0 1px;font-family:FontAwesome;-webkit-transform:translateZ(0);transform:translateZ(0)}.hvr-icon-wobble-vertical:active:before,.hvr-icon-wobble-vertical:focus:before,.hvr-icon-wobble-vertical:hover:before{-webkit-animation-name:hvr-icon-wobble-vertical;animation-name:hvr-icon-wobble-vertical;-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;-webkit-animation-iteration-count:1;animation-iteration-count:1}@-webkit-keyframes hvr-icon-buzz{50%{-webkit-transform:translateX(3px) rotate(2deg);transform:translateX(3px) rotate(2deg)}100%{-webkit-transform:translateX(-3px) rotate(-2deg);transform:translateX(-3px) rotate(-2deg)}}@keyframes hvr-icon-buzz{50%{-webkit-transform:translateX(3px) rotate(2deg);transform:translateX(3px) rotate(2deg)}100%{-webkit-transform:translateX(-3px) rotate(-2deg);transform:translateX(-3px) rotate(-2deg)}}.hvr-icon-buzz{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;padding-right:2.2em;-webkit-transition-duration:.3s;transition-duration:.3s}.hvr-icon-buzz:before{content:"\f017";position:absolute;right:1em;padding:0 1px;font-family:FontAwesome;-webkit-transform:translateZ(0);transform:translateZ(0)}.hvr-icon-buzz:active:before,.hvr-icon-buzz:focus:before,.hvr-icon-buzz:hover:before{-webkit-animation-name:hvr-icon-buzz;animation-name:hvr-icon-buzz;-webkit-animation-duration:.15s;animation-duration:.15s;-webkit-animation-timing-function:linear;animation-timing-function:linear;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}@-webkit-keyframes hvr-icon-buzz-out{10%{-webkit-transform:translateX(3px) rotate(2deg);transform:translateX(3px) rotate(2deg)}20%{-webkit-transform:translateX(-3px) rotate(-2deg);transform:translateX(-3px) rotate(-2deg)}30%{-webkit-transform:translateX(3px) rotate(2deg);transform:translateX(3px) rotate(2deg)}40%{-webkit-transform:translateX(-3px) rotate(-2deg);transform:translateX(-3px) rotate(-2deg)}50%{-webkit-transform:translateX(2px) rotate(1deg);transform:translateX(2px) rotate(1deg)}60%{-webkit-transform:translateX(-2px) rotate(-1deg);transform:translateX(-2px) rotate(-1deg)}70%{-webkit-transform:translateX(2px) rotate(1deg);transform:translateX(2px) rotate(1deg)}80%{-webkit-transform:translateX(-2px) rotate(-1deg);transform:translateX(-2px) rotate(-1deg)}90%{-webkit-transform:translateX(1px) rotate(0);transform:translateX(1px) rotate(0)}100%{-webkit-transform:translateX(-1px) rotate(0);transform:translateX(-1px) rotate(0)}}@keyframes hvr-icon-buzz-out{10%{-webkit-transform:translateX(3px) rotate(2deg);transform:translateX(3px) rotate(2deg)}20%{-webkit-transform:translateX(-3px) rotate(-2deg);transform:translateX(-3px) rotate(-2deg)}30%{-webkit-transform:translateX(3px) rotate(2deg);transform:translateX(3px) rotate(2deg)}40%{-webkit-transform:translateX(-3px) rotate(-2deg);transform:translateX(-3px) rotate(-2deg)}50%{-webkit-transform:translateX(2px) rotate(1deg);transform:translateX(2px) rotate(1deg)}60%{-webkit-transform:translateX(-2px) rotate(-1deg);transform:translateX(-2px) rotate(-1deg)}70%{-webkit-transform:translateX(2px) rotate(1deg);transform:translateX(2px) rotate(1deg)}80%{-webkit-transform:translateX(-2px) rotate(-1deg);transform:translateX(-2px) rotate(-1deg)}90%{-webkit-transform:translateX(1px) rotate(0);transform:translateX(1px) rotate(0)}100%{-webkit-transform:translateX(-1px) rotate(0);transform:translateX(-1px) rotate(0)}}.hvr-icon-buzz-out{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;padding-right:2.2em;-webkit-transition-duration:.3s;transition-duration:.3s}.hvr-icon-buzz-out:before{content:"\f023";position:absolute;right:1em;padding:0 1px;font-family:FontAwesome;-webkit-transform:translateZ(0);transform:translateZ(0)}.hvr-icon-buzz-out:active:before,.hvr-icon-buzz-out:focus:before,.hvr-icon-buzz-out:hover:before{-webkit-animation-name:hvr-icon-buzz-out;animation-name:hvr-icon-buzz-out;-webkit-animation-duration:.75s;animation-duration:.75s;-webkit-animation-timing-function:linear;animation-timing-function:linear;-webkit-animation-iteration-count:1;animation-iteration-count:1}.hvr-curl-top-left{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative}.hvr-curl-top-left:before{pointer-events:none;position:absolute;content:'';height:0;width:0;top:0;left:0;background:#fff;background:linear-gradient(135deg,#fff 45%,#aaa 50%,#ccc 56%,#fff 80%);filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#ffffff', endColorstr='#000000');z-index:1000;box-shadow:1px 1px 1px rgba(0,0,0,.4);-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-property:width,height;transition-property:width,height}.hvr-curl-top-left:active:before,.hvr-curl-top-left:focus:before,.hvr-curl-top-left:hover:before{width:25px;height:25px}.hvr-curl-top-right{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative}.hvr-curl-top-right:before{pointer-events:none;position:absolute;content:'';height:0;width:0;top:0;right:0;background:#fff;background:linear-gradient(225deg,#fff 45%,#aaa 50%,#ccc 56%,#fff 80%);box-shadow:-1px 1px 1px rgba(0,0,0,.4);-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-property:width,height;transition-property:width,height}.hvr-curl-top-right:active:before,.hvr-curl-top-right:focus:before,.hvr-curl-top-right:hover:before{width:25px;height:25px}.hvr-curl-bottom-right{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative}.hvr-curl-bottom-right:before{pointer-events:none;position:absolute;content:'';height:0;width:0;bottom:0;right:0;background:#fff;background:linear-gradient(315deg,#fff 45%,#aaa 50%,#ccc 56%,#fff 80%);box-shadow:-1px -1px 1px rgba(0,0,0,.4);-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-property:width,height;transition-property:width,height}.hvr-curl-bottom-right:active:before,.hvr-curl-bottom-right:focus:before,.hvr-curl-bottom-right:hover:before{width:25px;height:25px}.hvr-curl-bottom-left{display:inline-block;vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative}.hvr-curl-bottom-left:before{pointer-events:none;position:absolute;content:'';height:0;width:0;bottom:0;left:0;background:#fff;background:linear-gradient(45deg,#fff 45%,#aaa 50%,#ccc 56%,#fff 80%);box-shadow:1px -1px 1px rgba(0,0,0,.4);-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-property:width,height;transition-property:width,height}.hvr-curl-bottom-left:active:before,.hvr-curl-bottom-left:focus:before,.hvr-curl-bottom-left:hover:before{width:25px;height:25px} \ No newline at end of file diff --git a/public/assets/css/linearicons.css b/public/assets/css/linearicons.css new file mode 100755 index 0000000..7d23ccf --- /dev/null +++ b/public/assets/css/linearicons.css @@ -0,0 +1,538 @@ +@font-face { + font-family: 'Linearicons-Free'; + src:url('../fonts/Linearicons-Free.eot?w118d'); + src:url('../fonts/Linearicons-Free.eot?#iefixw118d') format('embedded-opentype'), + url('../fonts/Linearicons-Free.woff2?w118d') format('woff2'), + url('../fonts/Linearicons-Free.woff?w118d') format('woff'), + url('../fonts/Linearicons-Free.ttf?w118d') format('truetype'), + url('../fonts/Linearicons-Free.svg?w118d#Linearicons-Free') format('svg'); + font-weight: normal; + font-style: normal; +} + +.lnr { + font-family: 'Linearicons-Free'; + speak: none; + font-style: normal; + font-weight: normal; + font-variant: normal; + text-transform: none; + line-height: 1; + margin-right: 5px; + + + /* Better Font Rendering =========== */ + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.lnr-home:before { + content: "\e800"; +} +.lnr-apartment:before { + content: "\e801"; +} +.lnr-pencil:before { + content: "\e802"; +} +.lnr-magic-wand:before { + content: "\e803"; +} +.lnr-drop:before { + content: "\e804"; +} +.lnr-lighter:before { + content: "\e805"; +} +.lnr-poop:before { + content: "\e806"; +} +.lnr-sun:before { + content: "\e807"; +} +.lnr-moon:before { + content: "\e808"; +} +.lnr-cloud:before { + content: "\e809"; +} +.lnr-cloud-upload:before { + content: "\e80a"; +} +.lnr-cloud-download:before { + content: "\e80b"; +} +.lnr-cloud-sync:before { + content: "\e80c"; +} +.lnr-cloud-check:before { + content: "\e80d"; +} +.lnr-database:before { + content: "\e80e"; +} +.lnr-lock:before { + content: "\e80f"; +} +.lnr-cog:before { + content: "\e810"; +} +.lnr-trash:before { + content: "\e811"; +} +.lnr-dice:before { + content: "\e812"; +} +.lnr-heart:before { + content: "\e813"; +} +.lnr-star:before { + content: "\e814"; +} +.lnr-star-half:before { + content: "\e815"; +} +.lnr-star-empty:before { + content: "\e816"; +} +.lnr-flag:before { + content: "\e817"; +} +.lnr-envelope:before { + content: "\e818"; +} +.lnr-paperclip:before { + content: "\e819"; +} +.lnr-inbox:before { + content: "\e81a"; +} +.lnr-eye:before { + content: "\e81b"; +} +.lnr-printer:before { + content: "\e81c"; +} +.lnr-file-empty:before { + content: "\e81d"; +} +.lnr-file-add:before { + content: "\e81e"; +} +.lnr-enter:before { + content: "\e81f"; +} +.lnr-exit:before { + content: "\e820"; +} +.lnr-graduation-hat:before { + content: "\e821"; +} +.lnr-license:before { + content: "\e822"; +} +.lnr-music-note:before { + content: "\e823"; +} +.lnr-film-play:before { + content: "\e824"; +} +.lnr-camera-video:before { + content: "\e825"; +} +.lnr-camera:before { + content: "\e826"; +} +.lnr-picture:before { + content: "\e827"; +} +.lnr-book:before { + content: "\e828"; +} +.lnr-bookmark:before { + content: "\e829"; +} +.lnr-user:before { + content: "\e82a"; +} +.lnr-users:before { + content: "\e82b"; +} +.lnr-shirt:before { + content: "\e82c"; +} +.lnr-store:before { + content: "\e82d"; +} +.lnr-cart:before { + content: "\e82e"; +} +.lnr-tag:before { + content: "\e82f"; +} +.lnr-phone-handset:before { + content: "\e830"; +} +.lnr-phone:before { + content: "\e831"; +} +.lnr-pushpin:before { + content: "\e832"; +} +.lnr-map-marker:before { + content: "\e833"; +} +.lnr-map:before { + content: "\e834"; +} +.lnr-location:before { + content: "\e835"; +} +.lnr-calendar-full:before { + content: "\e836"; +} +.lnr-keyboard:before { + content: "\e837"; +} +.lnr-spell-check:before { + content: "\e838"; +} +.lnr-screen:before { + content: "\e839"; +} +.lnr-smartphone:before { + content: "\e83a"; +} +.lnr-tablet:before { + content: "\e83b"; +} +.lnr-laptop:before { + content: "\e83c"; +} +.lnr-laptop-phone:before { + content: "\e83d"; +} +.lnr-power-switch:before { + content: "\e83e"; +} +.lnr-bubble:before { + content: "\e83f"; +} +.lnr-heart-pulse:before { + content: "\e840"; +} +.lnr-construction:before { + content: "\e841"; +} +.lnr-pie-chart:before { + content: "\e842"; +} +.lnr-chart-bars:before { + content: "\e843"; +} +.lnr-gift:before { + content: "\e844"; +} +.lnr-diamond:before { + content: "\e845"; +} +.lnr-linearicons:before { + content: "\e846"; +} +.lnr-dinner:before { + content: "\e847"; +} +.lnr-coffee-cup:before { + content: "\e848"; +} +.lnr-leaf:before { + content: "\e849"; +} +.lnr-paw:before { + content: "\e84a"; +} +.lnr-rocket:before { + content: "\e84b"; +} +.lnr-briefcase:before { + content: "\e84c"; +} +.lnr-bus:before { + content: "\e84d"; +} +.lnr-car:before { + content: "\e84e"; +} +.lnr-train:before { + content: "\e84f"; +} +.lnr-bicycle:before { + content: "\e850"; +} +.lnr-wheelchair:before { + content: "\e851"; +} +.lnr-select:before { + content: "\e852"; +} +.lnr-earth:before { + content: "\e853"; +} +.lnr-smile:before { + content: "\e854"; +} +.lnr-sad:before { + content: "\e855"; +} +.lnr-neutral:before { + content: "\e856"; +} +.lnr-mustache:before { + content: "\e857"; +} +.lnr-alarm:before { + content: "\e858"; +} +.lnr-bullhorn:before { + content: "\e859"; +} +.lnr-volume-high:before { + content: "\e85a"; +} +.lnr-volume-medium:before { + content: "\e85b"; +} +.lnr-volume-low:before { + content: "\e85c"; +} +.lnr-volume:before { + content: "\e85d"; +} +.lnr-mic:before { + content: "\e85e"; +} +.lnr-hourglass:before { + content: "\e85f"; +} +.lnr-undo:before { + content: "\e860"; +} +.lnr-redo:before { + content: "\e861"; +} +.lnr-sync:before { + content: "\e862"; +} +.lnr-history:before { + content: "\e863"; +} +.lnr-clock:before { + content: "\e864"; +} +.lnr-download:before { + content: "\e865"; +} +.lnr-upload:before { + content: "\e866"; +} +.lnr-enter-down:before { + content: "\e867"; +} +.lnr-exit-up:before { + content: "\e868"; +} +.lnr-bug:before { + content: "\e869"; +} +.lnr-code:before { + content: "\e86a"; +} +.lnr-link:before { + content: "\e86b"; +} +.lnr-unlink:before { + content: "\e86c"; +} +.lnr-thumbs-up:before { + content: "\e86d"; +} +.lnr-thumbs-down:before { + content: "\e86e"; +} +.lnr-magnifier:before { + content: "\e86f"; +} +.lnr-cross:before { + content: "\e870"; +} +.lnr-menu:before { + content: "\e871"; +} +.lnr-list:before { + content: "\e872"; +} +.lnr-chevron-up:before { + content: "\e873"; +} +.lnr-chevron-down:before { + content: "\e874"; +} +.lnr-chevron-left:before { + content: "\e875"; +} +.lnr-chevron-right:before { + content: "\e876"; +} +.lnr-arrow-up:before { + content: "\e877"; +} +.lnr-arrow-down:before { + content: "\e878"; +} +.lnr-arrow-left:before { + content: "\e879"; +} +.lnr-arrow-right:before { + content: "\e87a"; +} +.lnr-move:before { + content: "\e87b"; +} +.lnr-warning:before { + content: "\e87c"; +} +.lnr-question-circle:before { + content: "\e87d"; +} +.lnr-menu-circle:before { + content: "\e87e"; +} +.lnr-checkmark-circle:before { + content: "\e87f"; +} +.lnr-cross-circle:before { + content: "\e880"; +} +.lnr-plus-circle:before { + content: "\e881"; +} +.lnr-circle-minus:before { + content: "\e882"; +} +.lnr-arrow-up-circle:before { + content: "\e883"; +} +.lnr-arrow-down-circle:before { + content: "\e884"; +} +.lnr-arrow-left-circle:before { + content: "\e885"; +} +.lnr-arrow-right-circle:before { + content: "\e886"; +} +.lnr-chevron-up-circle:before { + content: "\e887"; +} +.lnr-chevron-down-circle:before { + content: "\e888"; +} +.lnr-chevron-left-circle:before { + content: "\e889"; +} +.lnr-chevron-right-circle:before { + content: "\e88a"; +} +.lnr-crop:before { + content: "\e88b"; +} +.lnr-frame-expand:before { + content: "\e88c"; +} +.lnr-frame-contract:before { + content: "\e88d"; +} +.lnr-layers:before { + content: "\e88e"; +} +.lnr-funnel:before { + content: "\e88f"; +} +.lnr-text-format:before { + content: "\e890"; +} +.lnr-text-format-remove:before { + content: "\e891"; +} +.lnr-text-size:before { + content: "\e892"; +} +.lnr-bold:before { + content: "\e893"; +} +.lnr-italic:before { + content: "\e894"; +} +.lnr-underline:before { + content: "\e895"; +} +.lnr-strikethrough:before { + content: "\e896"; +} +.lnr-highlight:before { + content: "\e897"; +} +.lnr-text-align-left:before { + content: "\e898"; +} +.lnr-text-align-center:before { + content: "\e899"; +} +.lnr-text-align-right:before { + content: "\e89a"; +} +.lnr-text-align-justify:before { + content: "\e89b"; +} +.lnr-line-spacing:before { + content: "\e89c"; +} +.lnr-indent-increase:before { + content: "\e89d"; +} +.lnr-indent-decrease:before { + content: "\e89e"; +} +.lnr-pilcrow:before { + content: "\e89f"; +} +.lnr-direction-ltr:before { + content: "\e8a0"; +} +.lnr-direction-rtl:before { + content: "\e8a1"; +} +.lnr-page-break:before { + content: "\e8a2"; +} +.lnr-sort-alpha-asc:before { + content: "\e8a3"; +} +.lnr-sort-amount-asc:before { + content: "\e8a4"; +} +.lnr-hand:before { + content: "\e8a5"; +} +.lnr-pointer-up:before { + content: "\e8a6"; +} +.lnr-pointer-right:before { + content: "\e8a7"; +} +.lnr-pointer-down:before { + content: "\e8a8"; +} +.lnr-pointer-left:before { + content: "\e8a9"; +} diff --git a/public/assets/css/style.css b/public/assets/css/style.css new file mode 100644 index 0000000..421b829 --- /dev/null +++ b/public/assets/css/style.css @@ -0,0 +1,640 @@ + +@import url('https://fonts.googleapis.com/css?family=Lato:100,100i,300,300i,400,400i,700,700i,900,900i|Raleway:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i'); + +body{ + font-family: 'Raleway'; +} +img{ + max-width: 100%; +} +a, a:hover, a:visited{ + text-decoration: none; + transition: 0.3s all ease-in-out; + -moz-transition: 0.3s all ease-in-out; + -webkit-transition: 0.3s all ease-in-out; + -o-transition: 0.3s all ease-in-out; +} + +/*Font family*/ +.lato{ + font-family: 'Lato'; +} + +/*Typography*/ +h3{ + font-weight: 600; +} + +/*Font weight*/ +.semi-bold{ + font-weight: 500; +} +.bold{ + font-weight: 600; +} +.semi-bolder{ + font-weight: 700; +} +.bolder{ + font-weight: 800; +} + +/*Text-color*/ +.text-red{ + color: #ed7063; +} +.text-green{ + color: #27ae60!important; +} +.text-grey{ + color: rgba(0,0,0,.6); +} +.text-tosca{ + color: #1bbc9b; +} + +/*background*/ +.bg-tosca, .bg-tosca a{ + background-color: #1bbc9b!important; + color: #fff!important; +} + + + +/*Button*/ +button{ + background: transparent; + border: 0; +} +.btn, .btn-hover{ + transition: 0.3s background-color, border ease-in-out; + -moz-transition: 0.3s background-color, border ease-in-out; + -webkit-transition: 0.3s background-color, border ease-in-out; + -o-transition: 0.3s background-color, border ease-in-out; +} +.btn-red{ + background-color: #ed7063; + border: 2px solid transparent; + color: #fff; +} +.btn-red:hover{ + border: 2px solid #ed7063; + background: transparent; + color: #ed7063 +} +.btn-small{ + padding: 5px 15px!important; + font-size: 11px; + letter-spacing: 1px; + font-weight: 700; + font-family: 'Lato'; +} + +#wrapper{ + width: 1000px; + margin: 0px auto; + padding: 30px 0; +} +#wrapper-top{ + width: 1000px; + margin: 0px auto; + padding: 0 0 30px 0; +} + +#header{ + background: #ed7063 url(../img/bg-noise.png); + color: rgba(0,0,0,.3); + position: relative; +} +#header #wrapper{ + padding-top: 0; +} +#header h4{ + font-weight: 700; + margin-bottom: 15px; +} +#header .img-header{ + margin-right: -70px; +} +.form-daftar{ + margin-top: 140px; +} +.form-daftar form{ + padding: 20px; + border: 1px solid rgba(0,0,0,.3); + border-radius: 8px; + -moz-border-radius: 8px; + -webkit-border-radius: 8px; + padding-bottom: 10px!important; + margin-bottom: 5px; +} +.form-daftar form input{ + width: 100%; + border-radius: 5px; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + background-color: rgba(0,0,0,.02); + padding: 10px; + border: 1px solid rgba(0,0,0,.3); + margin-bottom: 10px; + color: #fff; + transition: 0.3s background-color ease-in-out; + -moz-transition: 0.3s background-color ease-in-out; + -webkit-transition: 0.3s background-color ease-in-out; + -o-transition: 0.3s background-color ease-in-out; +} +.form-daftar form input:focus{ + border-color: rgba(255,255,255,.4); + background-color: rgba(255,255,255,.05); + outline: none; + transition: 0.3s background-color ease-in-out; + -moz-transition: 0.3s background-color ease-in-out; + -webkit-transition: 0.3s background-color ease-in-out; + -o-transition: 0.3s background-color ease-in-out; +} +.form-daftar form input:last-child{ + margin-bottom: 0px; +} +.form-daftar form input[type=submit]{ + width: auto; + padding: 5px 20px; + font-weight: bold; + position: absolute; + right: 35px; + background-color: #e06a5e; + color: rgba(0,0,0,.3); +} +.form-daftar form input[type=submit]:hover{ + background-color: #72352f; + color: #ee7164; + transition: 0.3s all ease-in-out; + -moz-transition: 0.3s all ease-in-out; + -webkit-transition: 0.3s all ease-in-out; + -o-transition: 0.3s all ease-in-out; +} +#header a, #header a:hover, #header a:visited{ + color: rgba(0,0,0,.3); +} + +/*Cari Event*/ +#cari{ + background: #e06a5e; + position: relative; + color: rgba(255,255,255,.6); +} +#cari .polygon{ + content: ""; + background: url(../img/polygon.png)repeat-x; + position: absolute; + bottom: -12px; + width: 100%; + height: 13px; + color: transparent; +} + +/*Event baru*/ +#event-baru{ + padding: 35px 0; + background: #f1f1f1 url('../img/bg-event.png'); + color: #999; +} +#event-baru h3{ + margin-top: 5px; +} +#event-baru .event-selengkapnya{ + border-radius: 50px; + width: 180px; + letter-spacing: 1px; + padding: 5px 10px; + border: 2px solid #e06a5e; + color: #e06a5e; + background: #eee; + transition: 0.3s background-color, color ease-in-out; + -moz-transition: 0.3s background-color, color ease-in-out; + -webkit-transition: 0.3s background-color, color ease-in-out; + -o-transition: 0.3s background-color, color ease-in-out; +} +#event-baru .event-selengkapnya:hover{ + color: #f0f0f0; + background-color: #e06a5e; + cursor: pointer; + transition: 0.3s background-color, color ease-in-out; + -moz-transition: 0.3s background-color, color ease-in-out; + -webkit-transition: 0.3s background-color, color ease-in-out; + -o-transition: 0.3s background-color, color ease-in-out; +} +#event-baru .event-list{ + background-color: #fff; + border-radius: 5px; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + padding: 10px; + margin-top: 15px; + position: relative; +} +#event-baru .event-list .event-img{ + border-radius: 5px; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; +} +#event-baru .event-list h5{ + letter-spacing: 0.5px; + font-size: 14.5px; +} +#event-baru .event-list .event-info{ + font-family: 'Lato'; + font-size: 12px; + color: #bbb; + margin-top: 0; + font-weight: 700; + letter-spacing: 1px; + margin-bottom: 20px; +} +#event-baru .col { + padding: 9px!important +} +#event-baru .plus h3{ + margin: 0; + font-weight: bold; + color: #ed7063; + margin-right: -5px; +} +#event-baru .plus a{ + cursor: pointer; +} +#event-baru .event-line{ + content: ""; + background: url(../img/event-line.png)repeat-x; + position: absolute; + left: -195px; + width: 100%; + top: 15px; + color: transparent; +} + +/*Footer*/ +#footer{ + background-color: #555; + color: #aaaaaa; + font-weight: 500; +} +#footer a{ + color: #aaa; +} +#footer .logo-footer{ + margin-top: -5px; +} +.footer-link li{ + list-style: none; + display: inline-table; + margin-left: 25px; +} + +/*Login form*/ +.login-form{ + width: 200px; + height: auto; + background-color: rgba(255,255,255,.9); + position: absolute; + top: 70px; + right: 290px; + z-index: 1000; + padding: 15px 20px; + border-radius: 5px; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + color: #bbb; + display: none; +} +.login-form a, .login-form a:hover, .login-form a:visited{ + color: #bbb +} +.login-form form{ + margin-top: 5px; +} +.login-form input{ + border-radius: 5px; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + border:1px solid #ccc; + margin-bottom: 5px; + padding: 10px; + background-color: #f0f0f0; + font-size: 12px; + font-weight: 500; + width: 100%; +} +.login-form input:focus{ + outline: none; + border: 1px solid #aaa; +} +.login-form input[type=submit]{ + background-color: #89dca4; + margin-top: 5px; + color: #fff; + border:0; + margin-bottom: 0; +} +.rel{ + position: relative; +} +.arrow-up { + position: absolute; + top: -21px; + left: 73px; + width: 0; + height: 0; + border-left: 7px solid transparent; + border-right: 7px solid transparent; + border-bottom: 7px solid rgba(255,255,255,.9); +} + +/*Daftar*/ +body#login{ + background: #ececec url(../img/bg-login.jpg)no-repeat!important; + background-size: cover!important; + -moz-background-size: cover!important; + -webkit-background-size: cover!important; +} +body.daftar{ + background: #ececec url(../img/bg-daftar.jpg)no-repeat; + background-size: cover; + -moz-background-size: cover; + -webkit-background-size: cover; + height: 100vh; + color: #bbb!important; +} +.daftar #header, .detail #header{ + background: #ed7063; + color: rgba(0,0,0,.3); + position: relative; +} +.daftar .navbar-nav > li > a, .detail .navbar-nav > li > a { + margin-top: 25px!important +} +.daftar .login-form, .detail .login-form{ + top: 80px; +} +.daftar nav .menu-arrow, .detail nav .menu-arrow{ + width: 46px; + height: 26px; + position: absolute; +} +.daftar .form-daftar{ + margin-top: 0px; + color: #bbb!important +} +.daftar .form-wrapper small, .daftar .form-wrapper a, .daftar .form-wrapper a:hover{ + font-size: 11px; + color: #bbb!important; +} +.daftar .form-daftar form input[type=submit]{ + background-color: #ececec; + color: #aaa; +} +.daftar .form-daftar form input[type=submit]:hover{ + background-color: #555; + color: #f0f0f0; +} +.daftar .form-daftar form input{ + color: rgba(0,0,0,.5); +} +.daftar .form-daftar form input:focus{ + border-color: rgba(0,0,0,.5); +} +.daftar p{ + color: #777; +} +.daftar #footer{ + position: absolute; + bottom: 0; + width: 100%; +} +.daftar .login-form{ + right: 180px; +} + + +/*Detail Event*/ +.detail{ + background-color: #eee; + color: #777!important; +} +.detail p{ + color: #aaa; + line-height: 1.5em +} +.detail .event-info{ + letter-spacing: 1px; + margin-bottom: 20px; + font-size: 12px; +} +.detail #event-baru{ + margin-top: 100px; + padding: 0 0 30px 0; + background: #fff!important; + color: #999; + position: relative; +} +.detail #event-baru .before{ + width: 100%; + height: 74px; + position: absolute; + top: -74px; + background: url(../img/detail-event-baru.png) no-repeat; + background-size: cover; +} +.detail #event-baru .event-list{ + box-shadow: 0 0 40px rgba(0,0,0,.1); +} +.detail .rincian-event{ + position: relative; + border: 2px solid #ddd; + border-radius: 5px; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + padding: 25px 20px 20px 20px; + margin-top: 50px; + font-size: 12px; + color: #aaa; +} +.detail .rincian-event .title{ + padding: 5px 20px; + border: 2px solid #ddd; + border-radius: 50px; + -moz-border-radius: 50px; + -webkit-border-radius: 50px; + position: absolute; + background-color: #eee; + letter-spacing: 0.5px; +} +.detail .rincian-event .title-1{ + top: -15px; + left: 20px; +} +.detail .rincian-event .title-2{ + top: -15px; + right: 20px; + width: 140px; +} +.detail .rincian-event .title-3{ + right: 20px; + bottom: -15px!important; + border:0; + padding: 5px 20px; + width: 140px; +} +.detail .rincian-event .left-border{ + position: absolute; + width: 1px; + height: 80px; + background-color: #ddd; + left: -20px; + top: 5px; +} +.detail .rincian td{ + padding: 5px; +} +.detail .rincian td:first-child{ + font-weight: bold; +} +.detail .event-line{ + position: relative; +} +.detail .event-line .seat{ + width: 50px; + height: 50px; + background-color: #f0f0f0; + border: 2px solid #ed7063; + border-radius: 100%; + -moz-border-radius: 100%; + -webkit-border-radius: 100%; + position: absolute; + right: 0; + top: -15px; +} +.detail .event-line .seat small{ + font-size: 7px; + font-weight: 700; +} +.detail .event-line .seat .number{ + font-weight: 600; + margin: -5px 0 -10px 0; +} + +/*Bootstrap Custom*/ +.navbar-default { + background-color: transparent; + border:0; +} +.nav.navbar-nav.navbar-right li a { + color: #fff!important; + font-weight: 500; + margin: 10px 0 10px 30px; + transition: 0.3s all ease-in-out; + -moz-transition: 0.3s all ease-in-out; + -webkit-transition: 0.3s all ease-in-out; + -o-transition: 0.3s all ease-in-out; +} +.nav.navbar-nav.navbar-right li a:hover { + background-color: rgba(0,0,0,.1); + border-radius: 5px; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + transition: 0.3s all ease-in-out; + -moz-transition: 0.3s all ease-in-out; + -webkit-transition: 0.3s all ease-in-out; + -o-transition: 0.3s all ease-in-out; +} +.navbar-nav > li > a { + padding-top: 10px; + padding-bottom:10px !important; +} +.navbar { + min-height:32px !important +} +.homepage .nav.navbar-nav.navbar-right { + border-bottom: 1px solid rgba(255,255,255,.3); +} +.navbar-brand{ + margin-left: -30px!important +} + +/*Carousel*/ + +#myCarousel{ + margin-top: 70px; +} +#lgn-form{ + margin-top: 10px!important +} +#myCarousel .item{ + height: 200px; +} +#myCarousel .carousel-indicators { + position: absolute; + left: 20px; + bottom: -20px; +} +#myCarousel .carousel-indicators li{ + background-color: transparent; + border-color: #999; + width: 10px; + height: 10px; + margin: 0 3px 0 0; +} +#myCarousel .carousel-indicators li.active{ + background-color: #ed7063!important; + border-color: transparent; + width: 10px; + height: 10px; + margin: 0 3px 0 0; +} + +.badge{ + padding: 5px 10px; + font-weight: 500; + background-color: rgba(0,0,0,.07); + color: #999; +} + +.cari select{ + padding: 20px!important; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + border-radius: 3px; + border:0; + background-color: rgba(255,255,255,.15)!important; +} +.cari input[type=submit]{ + background-color: #f1c40f; + float: right; + padding: 20px!important; + color: rgba(0,0,0,.5); + font-weight: 500; +} +.cari select:focus{ + background: rgba(255,255,255,.2); + outline: none; +} +.poster{ + padding: 10px; + background-color: #fff; + border-radius: 5px; + box-shadow: 0 0 30px rgba(0,0,0,.1); +} + +/*Placeholder*/ +::-webkit-input-placeholder { /* Chrome/Opera/Safari */ + color: rgba(0,0,0,.3); +} +::-moz-placeholder { /* Firefox 19+ */ + color: rgba(0,0,0,.3); +} +:-ms-input-placeholder { /* IE 10+ */ + color: rgba(0,0,0,.3); +} +:-moz-placeholder { /* Firefox 18- */ + color: rgba(0,0,0,.3); +} \ No newline at end of file diff --git a/public/assets/dashboard/css/bootstrap.min.css b/public/assets/dashboard/css/bootstrap.min.css new file mode 100644 index 0000000..d65c66b --- /dev/null +++ b/public/assets/dashboard/css/bootstrap.min.css @@ -0,0 +1,5 @@ +/*! + * Bootstrap v3.3.5 (http://getbootstrap.com) + * Copyright 2011-2015 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + *//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,:after,:before{color:#000!important;text-shadow:none!important;background:0 0!important;-webkit-box-shadow:none!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}blockquote,pre{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff2) format('woff2'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\2a"}.glyphicon-plus:before{content:"\2b"}.glyphicon-eur:before,.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.glyphicon-cd:before{content:"\e201"}.glyphicon-save-file:before{content:"\e202"}.glyphicon-open-file:before{content:"\e203"}.glyphicon-level-up:before{content:"\e204"}.glyphicon-copy:before{content:"\e205"}.glyphicon-paste:before{content:"\e206"}.glyphicon-alert:before{content:"\e209"}.glyphicon-equalizer:before{content:"\e210"}.glyphicon-king:before{content:"\e211"}.glyphicon-queen:before{content:"\e212"}.glyphicon-pawn:before{content:"\e213"}.glyphicon-bishop:before{content:"\e214"}.glyphicon-knight:before{content:"\e215"}.glyphicon-baby-formula:before{content:"\e216"}.glyphicon-tent:before{content:"\26fa"}.glyphicon-blackboard:before{content:"\e218"}.glyphicon-bed:before{content:"\e219"}.glyphicon-apple:before{content:"\f8ff"}.glyphicon-erase:before{content:"\e221"}.glyphicon-hourglass:before{content:"\231b"}.glyphicon-lamp:before{content:"\e223"}.glyphicon-duplicate:before{content:"\e224"}.glyphicon-piggy-bank:before{content:"\e225"}.glyphicon-scissors:before{content:"\e226"}.glyphicon-bitcoin:before{content:"\e227"}.glyphicon-btc:before{content:"\e227"}.glyphicon-xbt:before{content:"\e227"}.glyphicon-yen:before{content:"\00a5"}.glyphicon-jpy:before{content:"\00a5"}.glyphicon-ruble:before{content:"\20bd"}.glyphicon-rub:before{content:"\20bd"}.glyphicon-scale:before{content:"\e230"}.glyphicon-ice-lolly:before{content:"\e231"}.glyphicon-ice-lolly-tasted:before{content:"\e232"}.glyphicon-education:before{content:"\e233"}.glyphicon-option-horizontal:before{content:"\e234"}.glyphicon-option-vertical:before{content:"\e235"}.glyphicon-menu-hamburger:before{content:"\e236"}.glyphicon-modal-window:before{content:"\e237"}.glyphicon-oil:before{content:"\e238"}.glyphicon-grain:before{content:"\e239"}.glyphicon-sunglasses:before{content:"\e240"}.glyphicon-text-size:before{content:"\e241"}.glyphicon-text-color:before{content:"\e242"}.glyphicon-text-background:before{content:"\e243"}.glyphicon-object-align-top:before{content:"\e244"}.glyphicon-object-align-bottom:before{content:"\e245"}.glyphicon-object-align-horizontal:before{content:"\e246"}.glyphicon-object-align-left:before{content:"\e247"}.glyphicon-object-align-vertical:before{content:"\e248"}.glyphicon-object-align-right:before{content:"\e249"}.glyphicon-triangle-right:before{content:"\e250"}.glyphicon-triangle-left:before{content:"\e251"}.glyphicon-triangle-bottom:before{content:"\e252"}.glyphicon-triangle-top:before{content:"\e253"}.glyphicon-console:before{content:"\e254"}.glyphicon-superscript:before{content:"\e255"}.glyphicon-subscript:before{content:"\e256"}.glyphicon-menu-left:before{content:"\e257"}.glyphicon-menu-right:before{content:"\e258"}.glyphicon-menu-down:before{content:"\e259"}.glyphicon-menu-up:before{content:"\e260"}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail a>img,.thumbnail>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role=button]{cursor:pointer}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{padding:.2em;background-color:#fcf8e3}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:focus,a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:focus,a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:focus,a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:focus,a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:focus,a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:focus,a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:focus,a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:focus,a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:focus,a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:focus,a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ol,ul{margin-top:0;margin-bottom:10px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;margin-left:-5px;list-style:none}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-top:0;margin-bottom:20px}dd,dt{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child{margin-bottom:0}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote .small:before,blockquote footer:before,blockquote small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:''}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:'\00A0 \2014'}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.25);box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;-webkit-box-shadow:none;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#777;text-align:left}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table-responsive{min-height:.01%;overflow-x:auto}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px\9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=file]:focus,input[type=checkbox]:focus,input[type=radio]:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date].form-control,input[type=time].form-control,input[type=datetime-local].form-control,input[type=month].form-control{line-height:34px}.input-group-sm input[type=date],.input-group-sm input[type=time],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],input[type=date].input-sm,input[type=time].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=time],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],input[type=date].input-lg,input[type=time].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{position:absolute;margin-top:4px\9;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.checkbox-inline.disabled,.radio-inline.disabled,fieldset[disabled] .checkbox-inline,fieldset[disabled] .radio-inline{cursor:not-allowed}.checkbox.disabled label,.radio.disabled label,fieldset[disabled] .checkbox label,fieldset[disabled] .radio label{cursor:not-allowed}.form-control-static{min-height:34px;padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.form-group-sm select.form-control{height:30px;line-height:30px}.form-group-sm select[multiple].form-control,.form-group-sm textarea.form-control{height:auto}.form-group-sm .form-control-static{height:30px;min-height:32px;padding:6px 10px;font-size:12px;line-height:1.5}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.form-group-lg select.form-control{height:46px;line-height:46px}.form-group-lg select[multiple].form-control,.form-group-lg textarea.form-control{height:auto}.form-group-lg .form-control-static{height:46px;min-height:38px;padding:11px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.form-group-lg .form-control+.form-control-feedback,.input-group-lg+.form-control-feedback,.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.form-group-sm .form-control+.form-control-feedback,.input-group-sm+.form-control-feedback,.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .checkbox,.has-success .checkbox-inline,.has-success .control-label,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.checkbox label,.has-success.checkbox-inline label,.has-success.radio label,.has-success.radio-inline label{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning .control-label,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.checkbox label,.has-warning.checkbox-inline label,.has-warning.radio label,.has-warning.radio-inline label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error .control-label,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.checkbox label,.has-error.checkbox-inline label,.has-error.radio label,.has-error.radio-inline label{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:14.33px;font-size:18px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px;font-size:12px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none;opacity:.65}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.focus,.btn-default:focus{color:#333;background-color:#e6e6e6;border-color:#8c8c8c}.btn-default:hover{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active.focus,.btn-default.active:focus,.btn-default.active:hover,.btn-default:active.focus,.btn-default:active:focus,.btn-default:active:hover,.open>.dropdown-toggle.btn-default.focus,.open>.dropdown-toggle.btn-default:focus,.open>.dropdown-toggle.btn-default:hover{color:#333;background-color:#d4d4d4;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled,.btn-default.disabled.active,.btn-default.disabled.focus,.btn-default.disabled:active,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled],.btn-default[disabled].active,.btn-default[disabled].focus,.btn-default[disabled]:active,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default,fieldset[disabled] .btn-default.active,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:active,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#286090;border-color:#122b40}.btn-primary:hover{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active.focus,.btn-primary.active:focus,.btn-primary.active:hover,.btn-primary:active.focus,.btn-primary:active:focus,.btn-primary:active:hover,.open>.dropdown-toggle.btn-primary.focus,.open>.dropdown-toggle.btn-primary:focus,.open>.dropdown-toggle.btn-primary:hover{color:#fff;background-color:#204d74;border-color:#122b40}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled,.btn-primary.disabled.active,.btn-primary.disabled.focus,.btn-primary.disabled:active,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled],.btn-primary[disabled].active,.btn-primary[disabled].focus,.btn-primary[disabled]:active,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary,fieldset[disabled] .btn-primary.active,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:active,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.focus,.btn-success:focus{color:#fff;background-color:#449d44;border-color:#255625}.btn-success:hover{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active.focus,.btn-success.active:focus,.btn-success.active:hover,.btn-success:active.focus,.btn-success:active:focus,.btn-success:active:hover,.open>.dropdown-toggle.btn-success.focus,.open>.dropdown-toggle.btn-success:focus,.open>.dropdown-toggle.btn-success:hover{color:#fff;background-color:#398439;border-color:#255625}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled,.btn-success.disabled.active,.btn-success.disabled.focus,.btn-success.disabled:active,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled],.btn-success[disabled].active,.btn-success[disabled].focus,.btn-success[disabled]:active,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success,fieldset[disabled] .btn-success.active,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:active,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.focus,.btn-info:focus{color:#fff;background-color:#31b0d5;border-color:#1b6d85}.btn-info:hover{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active.focus,.btn-info.active:focus,.btn-info.active:hover,.btn-info:active.focus,.btn-info:active:focus,.btn-info:active:hover,.open>.dropdown-toggle.btn-info.focus,.open>.dropdown-toggle.btn-info:focus,.open>.dropdown-toggle.btn-info:hover{color:#fff;background-color:#269abc;border-color:#1b6d85}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled,.btn-info.disabled.active,.btn-info.disabled.focus,.btn-info.disabled:active,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled],.btn-info[disabled].active,.btn-info[disabled].focus,.btn-info[disabled]:active,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info,fieldset[disabled] .btn-info.active,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:active,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.focus,.btn-warning:focus{color:#fff;background-color:#ec971f;border-color:#985f0d}.btn-warning:hover{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active.focus,.btn-warning.active:focus,.btn-warning.active:hover,.btn-warning:active.focus,.btn-warning:active:focus,.btn-warning:active:hover,.open>.dropdown-toggle.btn-warning.focus,.open>.dropdown-toggle.btn-warning:focus,.open>.dropdown-toggle.btn-warning:hover{color:#fff;background-color:#d58512;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled,.btn-warning.disabled.active,.btn-warning.disabled.focus,.btn-warning.disabled:active,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled],.btn-warning[disabled].active,.btn-warning[disabled].focus,.btn-warning[disabled]:active,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning,fieldset[disabled] .btn-warning.active,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:active,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#c9302c;border-color:#761c19}.btn-danger:hover{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active.focus,.btn-danger.active:focus,.btn-danger.active:hover,.btn-danger:active.focus,.btn-danger:active:focus,.btn-danger:active:hover,.open>.dropdown-toggle.btn-danger.focus,.open>.dropdown-toggle.btn-danger:focus,.open>.dropdown-toggle.btn-danger:hover{color:#fff;background-color:#ac2925;border-color:#761c19}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled,.btn-danger.disabled.active,.btn-danger.disabled.focus,.btn-danger.disabled:active,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled],.btn-danger[disabled].active,.btn-danger[disabled].focus,.btn-danger[disabled]:active,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger,fieldset[disabled] .btn-danger.active,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:active,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#337ab7;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-timing-function:ease;-o-transition-timing-function:ease;transition-timing-function:ease;-webkit-transition-duration:.35s;-o-transition-duration:.35s;transition-duration:.35s;-webkit-transition-property:height,visibility;-o-transition-property:height,visibility;transition-property:height,visibility}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid\9;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown,.dropup{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{right:0;left:auto}.dropdown-menu-left{right:auto;left:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px dashed;border-bottom:4px solid\9}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn input[type=radio],[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group .form-control,.input-group-addon,.input-group-btn{display:table-cell}.input-group .form-control:not(:first-child):not(:last-child),.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{z-index:2;margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#337ab7}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;-webkit-box-shadow:none;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-right:0;padding-left:0}}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:340px}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-bottom,.navbar-fixed-top{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px 15px;font-size:18px;line-height:20px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{padding:10px 15px;margin-top:8px;margin-right:-15px;margin-bottom:8px;margin-left:-15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1)}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:768px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;-webkit-box-shadow:none;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#777}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#337ab7;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{z-index:3;color:#23527c;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:2;color:#fff;cursor:default;background-color:#337ab7;border-color:#337ab7}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px;line-height:1.3333333}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px;line-height:1.5}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:middle;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding-top:30px;padding-bottom:30px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron .h1,.jumbotron h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron,.container-fluid .jumbotron{border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron,.container-fluid .jumbotron{padding-right:60px;padding-left:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:border .2s ease-in-out;-o-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail a>img,.thumbnail>img{margin-right:auto;margin-left:auto}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#337ab7}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#337ab7;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress-bar-striped,.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;background-size:40px 40px}.progress-bar.active,.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{overflow:hidden;zoom:1}.media-body{width:10000px}.media-object{display:block}.media-object.img-thumbnail{max-width:none}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-body,.media-left,.media-right{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item,button.list-group-item{color:#555}a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover,button.list-group-item:focus,button.list-group-item:hover{color:#555;text-decoration:none;background-color:#f5f5f5}button.list-group-item{width:100%;text-align:left}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{color:#777;cursor:not-allowed;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success,button.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading,button.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover,button.list-group-item-success:focus,button.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover,button.list-group-item-success.active,button.list-group-item-success.active:focus,button.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info,button.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading,button.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover,button.list-group-item-info:focus,button.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover,button.list-group-item-info.active,button.list-group-item-info.active:focus,button.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning,button.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading,button.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover,button.list-group-item-warning:focus,button.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover,button.list-group-item-warning.active,button.list-group-item-warning.active:focus,button.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger,button.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading,button.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover,button.list-group-item-danger:focus,button.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover,button.list-group-item-danger.active,button.list-group-item-danger.active:focus,button.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.panel-heading+.panel-collapse>.list-group .list-group-item:first-child{border-top-left-radius:0;border-top-right-radius:0}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.list-group+.panel-footer{border-top-width:0}.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.panel-collapse>.table caption,.panel>.table caption,.panel>.table-responsive>.table caption{padding-right:15px;padding-left:15px}.panel>.table-responsive:first-child>.table:first-child,.panel>.table:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table:first-child>thead:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#337ab7}.panel-primary>.panel-heading{color:#fff;background-color:#337ab7;border-color:#337ab7}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#337ab7}.panel-primary>.panel-heading .badge{color:#337ab7;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#337ab7}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:0 0;border:0}.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;overflow:hidden;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);-o-transform:translate(0,-25%);transform:translate(0,-25%)}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);-o-transform:translate(0,0);transform:translate(0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-header{min-height:16.43px;padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;filter:alpha(opacity=0);opacity:0;line-break:auto}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{right:5px;bottom:0;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{bottom:0;left:5px;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;right:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;left:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);line-break:auto}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{bottom:-10px;left:1px;content:" ";border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;bottom:-10px;content:" ";border-right-width:0;border-left-color:#fff}.carousel{position:relative}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>a>img,.carousel-inner>.item>img{line-height:1}@media all and (transform-3d),(-webkit-transform-3d){.carousel-inner>.item{-webkit-transition:-webkit-transform .6s ease-in-out;-o-transition:-o-transform .6s ease-in-out;transition:transform .6s ease-in-out;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000px;perspective:1000px}.carousel-inner>.item.active.right,.carousel-inner>.item.next{left:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.carousel-inner>.item.active.left,.carousel-inner>.item.prev{left:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.carousel-inner>.item.active,.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right{left:0;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6);filter:alpha(opacity=50);opacity:.5}.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.0001)));background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.0001)),to(rgba(0,0,0,.5)));background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);background-repeat:repeat-x}.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;z-index:5;display:inline-block;margin-top:-10px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;font-family:serif;line-height:1}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000\9;background-color:rgba(0,0,0,0);border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-15px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-15px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-15px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{display:table;content:" "}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-lg,.visible-md,.visible-sm,.visible-xs{display:none!important}.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table!important}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}}@media (max-width:767px){.visible-xs-block{display:block!important}}@media (max-width:767px){.visible-xs-inline{display:inline!important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table!important}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-block{display:block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline{display:inline!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table!important}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-block{display:block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline{display:inline!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table!important}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}}@media (min-width:1200px){.visible-lg-block{display:block!important}}@media (min-width:1200px){.visible-lg-inline{display:inline!important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table!important}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}}@media print{.hidden-print{display:none!important}} \ No newline at end of file diff --git a/public/assets/dashboard/css/demo.css b/public/assets/dashboard/css/demo.css new file mode 100644 index 0000000..8d19e96 --- /dev/null +++ b/public/assets/dashboard/css/demo.css @@ -0,0 +1,243 @@ +.navbar-brand{ + font-weight: 500; + color: #aaa!important; +} +@media (min-width: 992px){ + .typo-line{ + padding-left: 140px; + margin-bottom: 40px; + position: relative; + } + + .typo-line .category{ + transform: translateY(-50%); + top: 50%; + left: 0px; + position: absolute; + } +} + +#map{ + position:relative; + width:100%; + height: calc(100% - 60px); + margin-top: 70px; +} + +.places-buttons .btn{ + margin-bottom: 30px +} + +.space-70{ + height: 70px; + display: block; +} + +.sidebar .nav > li.active-pro{ + position: absolute; + width: 100%; + bottom: 20px; +} + +.tim-row{ + margin-bottom: 20px; +} + +.tim-typo{ + padding-left: 25%; + margin-bottom: 40px; + position: relative; +} +.tim-typo .tim-note{ + bottom: 10px; + color: #c0c1c2; + display: block; + font-weight: 400; + font-size: 13px; + line-height: 13px; + left: 0; + margin-left: 20px; + position: absolute; + width: 260px; +} +.tim-row{ + padding-top: 50px; +} +.tim-row h3{ + margin-top: 0; +} + + +/*FONT WEIGHT*/ +.thin{ + font-weight: 300; +} +.normal{ + font-weight: 400; +} +.semibold{ + font-weight: 500!important; +} +.bold{ + font-weight: 600!important; +} + +/*COLOR*/ +.text-red{ + color: #ed7063!important; +} +.text-green{ + color: #66bb6a!important +} + +.item, .item-detail{ + margin: 20px 0; + color: #aaa; + font-weight: 400; +} +.item hr{ + border-top-color: #eee; + margin: 30px 0 0!important; +} + +.event-info.detail{ + font-size: 12.5px; + background-color: #f5f5f5; + padding: 15px; + margin: 25px 0 35px; + box-shadow: 0px 8px 25px rgba(0,0,0,.05); + border-radius: 5px; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; +} +.event-info td{ + border-color: #eee!important; + padding: 15px 5px!important; +} +.event-info i, .pesan-info i{ + font-size: 16px; + margin-right: 5px; + vertical-align: middle +} +.item img.poster{ + border-radius: 5px; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + border: 3px solid #eee; + box-shadow: 0 0 25px rgba(0,0,0,.15); + width: 100px; + max-width: 100%; + margin: 10px 20px 0; +} +.item:last-child hr{ + display: none; +} +.spacing-1{ + text-transform: none; + letter-spacing: 1px; + font-weight: 400; +} + + +.jml-circle{ + width: 40px; + height: 40px; + border-radius: 100%; + -moz-border-radius: 100%; + -webkit-border-radius: 100%; + text-align: center; + background-color: #eee; + color: #ed7063; + line-height: 40px; + font-weight: 500; + margin-top: 5px; +} +.jml-circle i{ + font-size: 16px; + line-height: 40px; +} + +.item-detail{ + line-height: 1.7em; +} +.item-detail img.poster{ + border-radius: 5px; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + border: 3px solid #eee; + box-shadow: 0 0 25px rgba(0,0,0,.15); + width: 200px; + max-width: 100%; + margin: 10px 5px; +} + +.divider{ + height: 40px; + display: block; +} + +.border-top{ + border-top: 1px solid #f1f1f1; +} + +.text-none{ + text-transform: none; +} + +.table-pesan td{ + color: #999; + font-weight: 400; +} +.table-pesan tr.unread{ + background-color: rgba(241, 196, 15, .08); +} +.table-pesan tr.unread td{ + font-weight: 500; + border-top-color: #f1c40f!important; +} +.profil-row{ + margin-bottom: 30px; +} +.profil-wrap{ + background-color: transparent; + /*margin-bottom: 20px;*/ +} +.profil-wrap .photos{ + width: 50px; + height: 50px; + background-color: #ddd; +} +.profil-wrap img.photos{ + border-radius: 100%; + -moz-border-radius: 100%; + -webkit-border-radius: 100%; +} +.profil-wrap td:last-child{ + padding-left: 10px; +} +.profil-wrap h6{ + text-transform: none; + margin-bottom: 0; + font-weight: 500; +} +.profil-wrap small{ + color: #c0c0c0; + font-weight: 400; +} + +.table-pemberitahuan td{ + color: #999; + font-weight: 400; +} +.table-pemberitahuan tr.unread{ + background-color: rgba(0, 188, 212, .03); +} +.table-pemberitahuan tr.unread td{ + font-weight: 500; + border-top-color: rgba(0, 188, 212, .1)!important; +} + + +.icon-small{ + font-size: 16px!important; +} \ No newline at end of file diff --git a/public/assets/dashboard/css/material-dashboard.css b/public/assets/dashboard/css/material-dashboard.css new file mode 100644 index 0000000..61b9a6e --- /dev/null +++ b/public/assets/dashboard/css/material-dashboard.css @@ -0,0 +1,5111 @@ +/*! + + ========================================================= + * Material Dashboard - v1.1.1.0 + ========================================================= + + * Product Page: http://www.creative-tim.com/product/material-dashboard + * Copyright 2017 Creative Tim (http://www.creative-tim.com) + * Licensed under MIT (https://github.com/creativetimofficial/material-dashboard/blob/master/LICENSE.md) + + ========================================================= + + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + + */ + +/* ANIMATION */ +/* SHADOWS */ +/* Shadows (from mdl http://www.getmdl.io/) */ + +@import url('https://fonts.googleapis.com/css?family=Quicksand:300,400,500,700'); + +.noUi-target, +.noUi-target * { + -webkit-touch-callout: none; + -ms-touch-action: none; + user-select: none; + box-sizing: border-box; +} + +.noUi-base { + width: 100%; + height: 100%; + position: relative; +} + +.noUi-origin { + position: absolute; + right: 0; + top: 0; + left: 0; + bottom: 0; +} + +.noUi-handle { + position: relative; + z-index: 1; + box-sizing: border-box; +} + +.noUi-stacking .noUi-handle { + z-index: 10; +} + +.noUi-state-tap .noUi-origin { + transition: left 0.3s, top 0.3s; +} + +.noUi-state-drag * { + cursor: inherit !important; +} + +.noUi-horizontal { + height: 10px; +} + +.noUi-handle { + box-sizing: border-box; + width: 14px; + height: 14px; + left: -10px; + top: -6px; + cursor: pointer; + border-radius: 100%; + transition: all 0.2s ease-out; + border: 1px solid; + background: #FFFFFF; + box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 1px 5px 0 rgba(0, 0, 0, 0.12); +} + +.noUi-vertical .noUi-handle { + margin-left: 5px; + cursor: ns-resize; +} + +.noUi-horizontal.noUi-extended { + padding: 0 15px; +} + +.noUi-horizontal.noUi-extended .noUi-origin { + right: -15px; +} + +.noUi-background { + height: 2px; + margin: 20px 0; +} + +.noUi-origin { + margin: 0; + border-radius: 0; + height: 2px; + background: #c8c8c8; +} +.noUi-origin[style^="left: 0"] .noUi-handle { + background-color: #fff; + border: 2px solid #c8c8c8; +} +.noUi-origin[style^="left: 0"] .noUi-handle.noUi-active { + border-width: 1px; +} + +.noUi-target { + border-radius: 3px; +} + +.noUi-horizontal { + height: 2px; + margin: 15px 0; +} + +.noUi-vertical { + height: 100%; + width: 2px; + margin: 0 15px; + display: inline-block; +} + +.noUi-handle.noUi-active { + transform: scale3d(2, 2, 1); +} + +[disabled].noUi-slider { + opacity: 0.5; +} + +[disabled] .noUi-handle { + cursor: not-allowed; +} + +.slider { + background: #c8c8c8; +} + +.slider.noUi-connect { + background-color: #9c27b0; +} +.slider .noUi-handle { + border-color: #9c27b0; +} +.slider.slider-info .noUi-connect, .slider.slider-info.noUi-connect { + background-color: #00bcd4; +} +.slider.slider-info .noUi-handle { + border-color: #00bcd4; +} +.slider.slider-success .noUi-connect, .slider.slider-success.noUi-connect { + background-color: #4caf50; +} +.slider.slider-success .noUi-handle { + border-color: #4caf50; +} +.slider.slider-warning .noUi-connect, .slider.slider-warning.noUi-connect { + background-color: #ff9800; +} +.slider.slider-warning .noUi-handle { + border-color: #ff9800; +} +.slider.slider-danger .noUi-connect, .slider.slider-danger.noUi-connect { + background-color: #ed7063; +} +.slider.slider-danger .noUi-handle { + border-color: #ed7063; +} + +/*! +Animate.css - http://daneden.me/animate +Licensed under the MIT license - http://opensource.org/licenses/MIT + +Copyright (c) 2015 Daniel Eden +*/ +.animated { + -webkit-animation-duration: 1s; + animation-duration: 1s; + -webkit-animation-fill-mode: both; + animation-fill-mode: both; +} + +.animated.infinite { + -webkit-animation-iteration-count: infinite; + animation-iteration-count: infinite; +} + +.animated.hinge { + -webkit-animation-duration: 2s; + animation-duration: 2s; +} + +.animated.bounceIn, +.animated.bounceOut { + -webkit-animation-duration: .75s; + animation-duration: .75s; +} + +.animated.flipOutX, +.animated.flipOutY { + -webkit-animation-duration: .75s; + animation-duration: .75s; +} + +@-webkit-keyframes shake { + from, to { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } + 10%, 30%, 50%, 70%, 90% { + -webkit-transform: translate3d(-10px, 0, 0); + transform: translate3d(-10px, 0, 0); + } + 20%, 40%, 60%, 80% { + -webkit-transform: translate3d(10px, 0, 0); + transform: translate3d(10px, 0, 0); + } +} +@keyframes shake { + from, to { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } + 10%, 30%, 50%, 70%, 90% { + -webkit-transform: translate3d(-10px, 0, 0); + transform: translate3d(-10px, 0, 0); + } + 20%, 40%, 60%, 80% { + -webkit-transform: translate3d(10px, 0, 0); + transform: translate3d(10px, 0, 0); + } +} +.shake { + -webkit-animation-name: shake; + animation-name: shake; +} + +@-webkit-keyframes fadeInDown { + from { + opacity: 0; + -webkit-transform: translate3d(0, -100%, 0); + transform: translate3d(0, -100%, 0); + } + to { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} +@keyframes fadeInDown { + from { + opacity: 0; + -webkit-transform: translate3d(0, -100%, 0); + transform: translate3d(0, -100%, 0); + } + to { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} +.fadeInDown { + -webkit-animation-name: fadeInDown; + animation-name: fadeInDown; +} + +@-webkit-keyframes fadeOut { + from { + opacity: 1; + } + to { + opacity: 0; + } +} +@keyframes fadeOut { + from { + opacity: 1; + } + to { + opacity: 0; + } +} +.fadeOut { + -webkit-animation-name: fadeOut; + animation-name: fadeOut; +} + +@-webkit-keyframes fadeOutDown { + from { + opacity: 1; + } + to { + opacity: 0; + -webkit-transform: translate3d(0, 100%, 0); + transform: translate3d(0, 100%, 0); + } +} +@keyframes fadeOutDown { + from { + opacity: 1; + } + to { + opacity: 0; + -webkit-transform: translate3d(0, 100%, 0); + transform: translate3d(0, 100%, 0); + } +} +.fadeOutDown { + -webkit-animation-name: fadeOutDown; + animation-name: fadeOutDown; +} + +@-webkit-keyframes fadeOutUp { + from { + opacity: 1; + } + to { + opacity: 0; + -webkit-transform: translate3d(0, -100%, 0); + transform: translate3d(0, -100%, 0); + } +} +@keyframes fadeOutUp { + from { + opacity: 1; + } + to { + opacity: 0; + -webkit-transform: translate3d(0, -100%, 0); + transform: translate3d(0, -100%, 0); + } +} +.fadeOutUp { + -webkit-animation-name: fadeOutUp; + animation-name: fadeOutUp; +} + +h1, .h1 { + font-size: 3.8em; + line-height: 1.15em; +} + +h2, .h2 { + font-size: 2.6em; +} + +h3, .h3 { + font-size: 1.825em; + line-height: 1.4em; + margin: 20px 0 10px; +} + +h4, .h4 { + font-size: 1.3em; + line-height: 1.4em; +} + +h5, .h5 { + font-size: 1.25em; + line-height: 1.4em; + margin-bottom: 15px; +} + +h6, .h6 { + font-size: 1em; + text-transform: uppercase; + font-weight: 500; +} + +/*.title, +.card-title, +.info-title, +.footer-brand, +.footer-big h5, +.footer-big h4, +.media .media-heading{ + font-weight: $font-weight-extra-bold; + font-family: $font-family-serif; + + &, + a{ + color: $black-color; + text-decoration: none; + } +}*/ +h2.title { + margin-bottom: 30px; +} + +.description, +.card-description, +.footer-big p { + color: #999999; +} + +.text-warning { + color: #ff9800; +} + +.text-primary { + color: #ed7063; +} + +.text-danger { + color: #ed7063; +} + +.text-success { + color: #4caf50; +} + +.text-info { + color: #00bcd4!important; +} + +.text-rose { + color: #e91e63; +} +.text-yellow{ + color: #f1c40f!important; +} + +.text-gray { + color: #999999; +} +.text-soft{ + color: #bbb; +} + +.wrapper { + position: relative; + top: 0; + height: /*100vh;*/ +} + +.sidebar, +.off-canvas-sidebar { + position: absolute; + top: 0; + bottom: 0; + left: 0; + z-index: 1; + /*box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.42), 0 4px 25px 0px rgba(0, 0, 0, 0.12), 0 8px 10px -5px rgba(0, 0, 0, 0.2);*/ + border-right: 1px solid #eaeaea; +} +.sidebar .sidebar-wrapper, +.off-canvas-sidebar .sidebar-wrapper { + position: relative; + height: calc(100vh - 75px); + overflow: auto; + width: 260px; + z-index: 4; + font-weight: 500; + background-color: #eee; +} +.fixed{ + position: fixed; +} +.sidebar .logo-tim, +.off-canvas-sidebar .logo-tim { + border-radius: 50%; + border: 1px solid #333; + display: block; + height: 61px; + width: 61px; + float: left; + overflow: hidden; +} +.sidebar .logo-tim img, +.off-canvas-sidebar .logo-tim img { + width: 60px; + height: 60px; +} +.sidebar .nav, +.off-canvas-sidebar .nav { + margin-top: 20px; +} +.sidebar .nav li > a, +.off-canvas-sidebar .nav li > a { + margin: 10px 15px; + border-radius: 3px; + color: #aaa; +} +.sidebar .nav li:hover > a, +.off-canvas-sidebar .nav li:hover > a { + background: rgba(200, 200, 200, 0.2); + color: #3C4858; +} +.sidebar .nav li.active > a, +.off-canvas-sidebar .nav li.active > a { + color: #FFFFFF; +} +.sidebar .nav li.active > a i, +.off-canvas-sidebar .nav li.active > a i { + color: #ed7063; + text-shadow: 0 0 35px #ed7063; +} +.sidebar .nav p, +.off-canvas-sidebar .nav p { + margin: 0; + line-height: 30px; + font-size: 14px; +} +.sidebar .nav i, +.off-canvas-sidebar .nav i { + font-size: 24px; + float: left; + margin-right: 15px; + line-height: 30px; + width: 30px; + text-align: center; + color: #a9afbb; +} +.sidebar .sidebar-background, +.off-canvas-sidebar .sidebar-background { + position: absolute; + z-index: 1; + height: 100%; + width: 100%; + display: block; + top: 0; + left: 0; + background-size: cover; + background-position: center center; +} +.sidebar .sidebar-background:after, +.off-canvas-sidebar .sidebar-background:after { + position: absolute; + z-index: 3; + width: 100%; + height: 100%; + content: ""; + display: block; + background: #FFFFFF; + opacity: .93; +} +.sidebar .logo, +.off-canvas-sidebar .logo { + position: relative; + padding: 15px 15px; + z-index: 4; + background-color: #eee; +} +.sidebar .logo:after, +.off-canvas-sidebar .logo:after { + content: ''; + position: absolute; + bottom: 0; + right: 10%; + height: 1px; + width: 80%; + /*background-color: rgba(180, 180, 180, 0.3);*/ +} +.sidebar .logo p, +.off-canvas-sidebar .logo p { + float: left; + font-size: 20px; + margin: 10px 10px; + /*color: #FFFFFF;*/ + line-height: 20px; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; +} +.sidebar .logo .simple-text, +.off-canvas-sidebar .logo .simple-text { + padding: 5px 0px; + display: block; + font-size: 18px; + color: #3C4858; + text-align: center; + font-weight: 400; + line-height: 30px; +} +.sidebar .logo-tim, +.off-canvas-sidebar .logo-tim { + border-radius: 50%; + border: 1px solid #333; + display: block; + height: 61px; + width: 61px; + float: left; + overflow: hidden; +} +.sidebar .logo-tim img, +.off-canvas-sidebar .logo-tim img { + width: 60px; + height: 60px; +} +.sidebar:after, .sidebar:before, +.off-canvas-sidebar:after, +.off-canvas-sidebar:before { + display: block; + content: ""; + position: absolute; + width: 100%; + height: 100%; + top: 0; + left: 0; + z-index: 2; +} +.sidebar:before, +.off-canvas-sidebar:before { + opacity: .33; +} +.sidebar:after, +.off-canvas-sidebar:after { + z-index: 3; + opacity: 1; +} +.sidebar[data-image]:after, .sidebar.has-image:after, +.off-canvas-sidebar[data-image]:after, +.off-canvas-sidebar.has-image:after { + opacity: .77; +} +.sidebar[data-color="blue"] .nav li.active a, +.off-canvas-sidebar[data-color="blue"] .nav li.active a { + background-color: #00bcd4; + box-shadow: 0 12px 20px -10px rgba(0, 188, 212, 0.28), 0 4px 20px 0px rgba(0, 0, 0, 0.12), 0 7px 8px -5px rgba(0, 188, 212, 0.2); +} +.sidebar[data-color="green"] .nav li.active a, +.off-canvas-sidebar[data-color="green"] .nav li.active a { + background-color: #4caf50; + box-shadow: 0 12px 20px -10px rgba(76, 175, 80, 0.28), 0 4px 20px 0px rgba(0, 0, 0, 0.12), 0 7px 8px -5px rgba(76, 175, 80, 0.2); +} +.sidebar[data-color="orange"] .nav li.active a, +.off-canvas-sidebar[data-color="orange"] .nav li.active a { + background-color: #ff9800; + box-shadow: 0 12px 20px -10px rgba(255, 152, 0, 0.28), 0 4px 20px 0px rgba(0, 0, 0, 0.12), 0 7px 8px -5px rgba(255, 152, 0, 0.2); +} +.sidebar[data-color="red"] .nav li.active a, +.off-canvas-sidebar[data-color="red"] .nav li.active a { + /*background-color: #ed7063;*/ + color: #ed7063; + text-shadow: 0 0 35px #ed7063; + border-right: 2px solid #ed7063; + border-radius: 0; + /*box-shadow: 0 12px 20px -10px rgba(244, 67, 54, 0.28), 0 4px 20px 0px rgba(0, 0, 0, 0.12), 0 7px 8px -5px rgba(244, 67, 54, 0.2);*/ +} +.sidebar[data-color="purple"] .nav li.active a, +.off-canvas-sidebar[data-color="purple"] .nav li.active a { + background-color: #9c27b0; + box-shadow: 0 12px 20px -10px rgba(156, 39, 176, 0.28), 0 4px 20px 0px rgba(0, 0, 0, 0.12), 0 7px 8px -5px rgba(156, 39, 176, 0.2); +} + +.off-canvas-sidebar .nav > li > a, +.off-canvas-sidebar .nav > li > a:hover { + color: #FFFFFF; +} +.off-canvas-sidebar .nav > li > a:focus { + background: rgba(200, 200, 200, 0.2); +} + +.main-panel { + position: relative; + z-index: 2; + float: right; + overflow: auto; + width: calc(100% - 260px); + min-height: 100%; + -webkit-transform: translate3d(0px, 0, 0); + -moz-transform: translate3d(0px, 0, 0); + -o-transform: translate3d(0px, 0, 0); + -ms-transform: translate3d(0px, 0, 0); + transform: translate3d(0px, 0, 0); + -webkit-transition: all 0.33s cubic-bezier(0.685, 0.0473, 0.346, 1); + -moz-transition: all 0.33s cubic-bezier(0.685, 0.0473, 0.346, 1); + -o-transition: all 0.33s cubic-bezier(0.685, 0.0473, 0.346, 1); + -ms-transition: all 0.33s cubic-bezier(0.685, 0.0473, 0.346, 1); + transition: all 0.33s cubic-bezier(0.685, 0.0473, 0.346, 1); +} +.main-panel > .content { + margin-top: 80px; + padding: 30px 15px; + min-height: calc(100% - 123px); +} +.main-panel > .footer { + border-top: 1px solid #e7e7e7; +} +.main-panel > .navbar { + margin-bottom: 0px; + padding-top: 30px; +} + +.main-panel { + max-height: 100%; + height: 100%; +} + +.sidebar, +.main-panel { + -webkit-transition-property: top,bottom; + transition-property: top,bottom; + -webkit-transition-duration: .2s,.2s; + transition-duration: .2s,.2s; + -webkit-transition-timing-function: linear,linear; + transition-timing-function: linear,linear; + -webkit-overflow-scrolling: touch; +} + +.btn, +.navbar .navbar-nav > li > a.btn { + border: none; + border-radius: 3px; + position: relative; + padding: 12px 30px; + margin: 10px 1px; + font-size: 12px; + font-weight: 400; + text-transform: uppercase; + letter-spacing: 0; + will-change: box-shadow, transform; + transition: box-shadow 0.2s cubic-bezier(0.4, 0, 1, 1), background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1); +} +.btn::-moz-focus-inner, +.navbar .navbar-nav > li > a.btn::-moz-focus-inner { + border: 0; +} +.btn, .btn.btn-default, +.navbar .navbar-nav > li > a.btn, +.navbar .navbar-nav > li > a.btn.btn-default { + box-shadow: 0 2px 2px 0 rgba(153, 153, 153, 0.14), 0 3px 1px -2px rgba(153, 153, 153, 0.2), 0 1px 5px 0 rgba(153, 153, 153, 0.12); +} +.btn, .btn:hover, .btn:focus, .btn:active, .btn.active, .btn:active:focus, .btn:active:hover, .btn.active:focus, .btn.active:hover, .open > .btn.dropdown-toggle, .open > .btn.dropdown-toggle:focus, .open > .btn.dropdown-toggle:hover, .btn.btn-default, .btn.btn-default:hover, .btn.btn-default:focus, .btn.btn-default:active, .btn.btn-default.active, .btn.btn-default:active:focus, .btn.btn-default:active:hover, .btn.btn-default.active:focus, .btn.btn-default.active:hover, .open > .btn.btn-default.dropdown-toggle, .open > .btn.btn-default.dropdown-toggle:focus, .open > .btn.btn-default.dropdown-toggle:hover, +.navbar .navbar-nav > li > a.btn, +.navbar .navbar-nav > li > a.btn:hover, +.navbar .navbar-nav > li > a.btn:focus, +.navbar .navbar-nav > li > a.btn:active, +.navbar .navbar-nav > li > a.btn.active, +.navbar .navbar-nav > li > a.btn:active:focus, +.navbar .navbar-nav > li > a.btn:active:hover, +.navbar .navbar-nav > li > a.btn.active:focus, +.navbar .navbar-nav > li > a.btn.active:hover, .open > +.navbar .navbar-nav > li > a.btn.dropdown-toggle, .open > +.navbar .navbar-nav > li > a.btn.dropdown-toggle:focus, .open > +.navbar .navbar-nav > li > a.btn.dropdown-toggle:hover, +.navbar .navbar-nav > li > a.btn.btn-default, +.navbar .navbar-nav > li > a.btn.btn-default:hover, +.navbar .navbar-nav > li > a.btn.btn-default:focus, +.navbar .navbar-nav > li > a.btn.btn-default:active, +.navbar .navbar-nav > li > a.btn.btn-default.active, +.navbar .navbar-nav > li > a.btn.btn-default:active:focus, +.navbar .navbar-nav > li > a.btn.btn-default:active:hover, +.navbar .navbar-nav > li > a.btn.btn-default.active:focus, +.navbar .navbar-nav > li > a.btn.btn-default.active:hover, .open > +.navbar .navbar-nav > li > a.btn.btn-default.dropdown-toggle, .open > +.navbar .navbar-nav > li > a.btn.btn-default.dropdown-toggle:focus, .open > +.navbar .navbar-nav > li > a.btn.btn-default.dropdown-toggle:hover { + background-color: #999999; + color: #FFFFFF; +} +.btn:focus, .btn:active, .btn:hover, .btn.btn-default:focus, .btn.btn-default:active, .btn.btn-default:hover, +.navbar .navbar-nav > li > a.btn:focus, +.navbar .navbar-nav > li > a.btn:active, +.navbar .navbar-nav > li > a.btn:hover, +.navbar .navbar-nav > li > a.btn.btn-default:focus, +.navbar .navbar-nav > li > a.btn.btn-default:active, +.navbar .navbar-nav > li > a.btn.btn-default:hover { + box-shadow: 0 14px 26px -12px rgba(153, 153, 153, 0.42), 0 4px 23px 0px rgba(0, 0, 0, 0.12), 0 8px 10px -5px rgba(153, 153, 153, 0.2); +} +.btn.disabled, .btn.disabled:hover, .btn.disabled:focus, .btn.disabled.focus, .btn.disabled:active, .btn.disabled.active, .btn:disabled, .btn:disabled:hover, .btn:disabled:focus, .btn:disabled.focus, .btn:disabled:active, .btn:disabled.active, .btn[disabled], .btn[disabled]:hover, .btn[disabled]:focus, .btn[disabled].focus, .btn[disabled]:active, .btn[disabled].active, fieldset[disabled] .btn, fieldset[disabled] .btn:hover, fieldset[disabled] .btn:focus, fieldset[disabled] .btn.focus, fieldset[disabled] .btn:active, fieldset[disabled] .btn.active, .btn.btn-default.disabled, .btn.btn-default.disabled:hover, .btn.btn-default.disabled:focus, .btn.btn-default.disabled.focus, .btn.btn-default.disabled:active, .btn.btn-default.disabled.active, .btn.btn-default:disabled, .btn.btn-default:disabled:hover, .btn.btn-default:disabled:focus, .btn.btn-default:disabled.focus, .btn.btn-default:disabled:active, .btn.btn-default:disabled.active, .btn.btn-default[disabled], .btn.btn-default[disabled]:hover, .btn.btn-default[disabled]:focus, .btn.btn-default[disabled].focus, .btn.btn-default[disabled]:active, .btn.btn-default[disabled].active, fieldset[disabled] .btn.btn-default, fieldset[disabled] .btn.btn-default:hover, fieldset[disabled] .btn.btn-default:focus, fieldset[disabled] .btn.btn-default.focus, fieldset[disabled] .btn.btn-default:active, fieldset[disabled] .btn.btn-default.active, +.navbar .navbar-nav > li > a.btn.disabled, +.navbar .navbar-nav > li > a.btn.disabled:hover, +.navbar .navbar-nav > li > a.btn.disabled:focus, +.navbar .navbar-nav > li > a.btn.disabled.focus, +.navbar .navbar-nav > li > a.btn.disabled:active, +.navbar .navbar-nav > li > a.btn.disabled.active, +.navbar .navbar-nav > li > a.btn:disabled, +.navbar .navbar-nav > li > a.btn:disabled:hover, +.navbar .navbar-nav > li > a.btn:disabled:focus, +.navbar .navbar-nav > li > a.btn:disabled.focus, +.navbar .navbar-nav > li > a.btn:disabled:active, +.navbar .navbar-nav > li > a.btn:disabled.active, +.navbar .navbar-nav > li > a.btn[disabled], +.navbar .navbar-nav > li > a.btn[disabled]:hover, +.navbar .navbar-nav > li > a.btn[disabled]:focus, +.navbar .navbar-nav > li > a.btn[disabled].focus, +.navbar .navbar-nav > li > a.btn[disabled]:active, +.navbar .navbar-nav > li > a.btn[disabled].active, fieldset[disabled] +.navbar .navbar-nav > li > a.btn, fieldset[disabled] +.navbar .navbar-nav > li > a.btn:hover, fieldset[disabled] +.navbar .navbar-nav > li > a.btn:focus, fieldset[disabled] +.navbar .navbar-nav > li > a.btn.focus, fieldset[disabled] +.navbar .navbar-nav > li > a.btn:active, fieldset[disabled] +.navbar .navbar-nav > li > a.btn.active, +.navbar .navbar-nav > li > a.btn.btn-default.disabled, +.navbar .navbar-nav > li > a.btn.btn-default.disabled:hover, +.navbar .navbar-nav > li > a.btn.btn-default.disabled:focus, +.navbar .navbar-nav > li > a.btn.btn-default.disabled.focus, +.navbar .navbar-nav > li > a.btn.btn-default.disabled:active, +.navbar .navbar-nav > li > a.btn.btn-default.disabled.active, +.navbar .navbar-nav > li > a.btn.btn-default:disabled, +.navbar .navbar-nav > li > a.btn.btn-default:disabled:hover, +.navbar .navbar-nav > li > a.btn.btn-default:disabled:focus, +.navbar .navbar-nav > li > a.btn.btn-default:disabled.focus, +.navbar .navbar-nav > li > a.btn.btn-default:disabled:active, +.navbar .navbar-nav > li > a.btn.btn-default:disabled.active, +.navbar .navbar-nav > li > a.btn.btn-default[disabled], +.navbar .navbar-nav > li > a.btn.btn-default[disabled]:hover, +.navbar .navbar-nav > li > a.btn.btn-default[disabled]:focus, +.navbar .navbar-nav > li > a.btn.btn-default[disabled].focus, +.navbar .navbar-nav > li > a.btn.btn-default[disabled]:active, +.navbar .navbar-nav > li > a.btn.btn-default[disabled].active, fieldset[disabled] +.navbar .navbar-nav > li > a.btn.btn-default, fieldset[disabled] +.navbar .navbar-nav > li > a.btn.btn-default:hover, fieldset[disabled] +.navbar .navbar-nav > li > a.btn.btn-default:focus, fieldset[disabled] +.navbar .navbar-nav > li > a.btn.btn-default.focus, fieldset[disabled] +.navbar .navbar-nav > li > a.btn.btn-default:active, fieldset[disabled] +.navbar .navbar-nav > li > a.btn.btn-default.active { + box-shadow: none; +} +.btn.btn-simple, .btn.btn-default.btn-simple, +.navbar .navbar-nav > li > a.btn.btn-simple, +.navbar .navbar-nav > li > a.btn.btn-default.btn-simple { + background-color: transparent; + color: #999999; + box-shadow: none; +} +.btn.btn-simple:hover, .btn.btn-simple:focus, .btn.btn-simple:active, .btn.btn-default.btn-simple:hover, .btn.btn-default.btn-simple:focus, .btn.btn-default.btn-simple:active, +.navbar .navbar-nav > li > a.btn.btn-simple:hover, +.navbar .navbar-nav > li > a.btn.btn-simple:focus, +.navbar .navbar-nav > li > a.btn.btn-simple:active, +.navbar .navbar-nav > li > a.btn.btn-default.btn-simple:hover, +.navbar .navbar-nav > li > a.btn.btn-default.btn-simple:focus, +.navbar .navbar-nav > li > a.btn.btn-default.btn-simple:active { + background-color: transparent; + color: #999999; +} +.btn.btn-primary, +.navbar .navbar-nav > li > a.btn.btn-primary { + box-shadow: 0 2px 2px 0 rgba(156, 39, 176, 0.14), 0 3px 1px -2px rgba(156, 39, 176, 0.2), 0 1px 5px 0 rgba(156, 39, 176, 0.12); +} +.btn.btn-primary, .btn.btn-primary:hover, .btn.btn-primary:focus, .btn.btn-primary:active, .btn.btn-primary.active, .btn.btn-primary:active:focus, .btn.btn-primary:active:hover, .btn.btn-primary.active:focus, .btn.btn-primary.active:hover, .open > .btn.btn-primary.dropdown-toggle, .open > .btn.btn-primary.dropdown-toggle:focus, .open > .btn.btn-primary.dropdown-toggle:hover, +.navbar .navbar-nav > li > a.btn.btn-primary, +.navbar .navbar-nav > li > a.btn.btn-primary:hover, +.navbar .navbar-nav > li > a.btn.btn-primary:focus, +.navbar .navbar-nav > li > a.btn.btn-primary:active, +.navbar .navbar-nav > li > a.btn.btn-primary.active, +.navbar .navbar-nav > li > a.btn.btn-primary:active:focus, +.navbar .navbar-nav > li > a.btn.btn-primary:active:hover, +.navbar .navbar-nav > li > a.btn.btn-primary.active:focus, +.navbar .navbar-nav > li > a.btn.btn-primary.active:hover, .open > +.navbar .navbar-nav > li > a.btn.btn-primary.dropdown-toggle, .open > +.navbar .navbar-nav > li > a.btn.btn-primary.dropdown-toggle:focus, .open > +.navbar .navbar-nav > li > a.btn.btn-primary.dropdown-toggle:hover { + background-color: #9c27b0; + color: #FFFFFF; +} +.btn.btn-primary:focus, .btn.btn-primary:active, .btn.btn-primary:hover, +.navbar .navbar-nav > li > a.btn.btn-primary:focus, +.navbar .navbar-nav > li > a.btn.btn-primary:active, +.navbar .navbar-nav > li > a.btn.btn-primary:hover { + box-shadow: 0 14px 26px -12px rgba(156, 39, 176, 0.42), 0 4px 23px 0px rgba(0, 0, 0, 0.12), 0 8px 10px -5px rgba(156, 39, 176, 0.2); +} +.btn.btn-primary.disabled, .btn.btn-primary.disabled:hover, .btn.btn-primary.disabled:focus, .btn.btn-primary.disabled.focus, .btn.btn-primary.disabled:active, .btn.btn-primary.disabled.active, .btn.btn-primary:disabled, .btn.btn-primary:disabled:hover, .btn.btn-primary:disabled:focus, .btn.btn-primary:disabled.focus, .btn.btn-primary:disabled:active, .btn.btn-primary:disabled.active, .btn.btn-primary[disabled], .btn.btn-primary[disabled]:hover, .btn.btn-primary[disabled]:focus, .btn.btn-primary[disabled].focus, .btn.btn-primary[disabled]:active, .btn.btn-primary[disabled].active, fieldset[disabled] .btn.btn-primary, fieldset[disabled] .btn.btn-primary:hover, fieldset[disabled] .btn.btn-primary:focus, fieldset[disabled] .btn.btn-primary.focus, fieldset[disabled] .btn.btn-primary:active, fieldset[disabled] .btn.btn-primary.active, +.navbar .navbar-nav > li > a.btn.btn-primary.disabled, +.navbar .navbar-nav > li > a.btn.btn-primary.disabled:hover, +.navbar .navbar-nav > li > a.btn.btn-primary.disabled:focus, +.navbar .navbar-nav > li > a.btn.btn-primary.disabled.focus, +.navbar .navbar-nav > li > a.btn.btn-primary.disabled:active, +.navbar .navbar-nav > li > a.btn.btn-primary.disabled.active, +.navbar .navbar-nav > li > a.btn.btn-primary:disabled, +.navbar .navbar-nav > li > a.btn.btn-primary:disabled:hover, +.navbar .navbar-nav > li > a.btn.btn-primary:disabled:focus, +.navbar .navbar-nav > li > a.btn.btn-primary:disabled.focus, +.navbar .navbar-nav > li > a.btn.btn-primary:disabled:active, +.navbar .navbar-nav > li > a.btn.btn-primary:disabled.active, +.navbar .navbar-nav > li > a.btn.btn-primary[disabled], +.navbar .navbar-nav > li > a.btn.btn-primary[disabled]:hover, +.navbar .navbar-nav > li > a.btn.btn-primary[disabled]:focus, +.navbar .navbar-nav > li > a.btn.btn-primary[disabled].focus, +.navbar .navbar-nav > li > a.btn.btn-primary[disabled]:active, +.navbar .navbar-nav > li > a.btn.btn-primary[disabled].active, fieldset[disabled] +.navbar .navbar-nav > li > a.btn.btn-primary, fieldset[disabled] +.navbar .navbar-nav > li > a.btn.btn-primary:hover, fieldset[disabled] +.navbar .navbar-nav > li > a.btn.btn-primary:focus, fieldset[disabled] +.navbar .navbar-nav > li > a.btn.btn-primary.focus, fieldset[disabled] +.navbar .navbar-nav > li > a.btn.btn-primary:active, fieldset[disabled] +.navbar .navbar-nav > li > a.btn.btn-primary.active { + box-shadow: none; +} +.btn.btn-primary.btn-simple, +.navbar .navbar-nav > li > a.btn.btn-primary.btn-simple { + background-color: transparent; + color: #ed7063; + box-shadow: none; +} +.btn.btn-primary.btn-simple:hover, .btn.btn-primary.btn-simple:focus, .btn.btn-primary.btn-simple:active, +.navbar .navbar-nav > li > a.btn.btn-primary.btn-simple:hover, +.navbar .navbar-nav > li > a.btn.btn-primary.btn-simple:focus, +.navbar .navbar-nav > li > a.btn.btn-primary.btn-simple:active { + background-color: transparent; + color: #ed7063; +} +.btn.btn-info, +.navbar .navbar-nav > li > a.btn.btn-info { + box-shadow: 0 2px 2px 0 rgba(0, 188, 212, 0.14), 0 3px 1px -2px rgba(0, 188, 212, 0.2), 0 1px 5px 0 rgba(0, 188, 212, 0.12); +} +.btn.btn-info, .btn.btn-info:hover, .btn.btn-info:focus, .btn.btn-info:active, .btn.btn-info.active, .btn.btn-info:active:focus, .btn.btn-info:active:hover, .btn.btn-info.active:focus, .btn.btn-info.active:hover, .open > .btn.btn-info.dropdown-toggle, .open > .btn.btn-info.dropdown-toggle:focus, .open > .btn.btn-info.dropdown-toggle:hover, +.navbar .navbar-nav > li > a.btn.btn-info, +.navbar .navbar-nav > li > a.btn.btn-info:hover, +.navbar .navbar-nav > li > a.btn.btn-info:focus, +.navbar .navbar-nav > li > a.btn.btn-info:active, +.navbar .navbar-nav > li > a.btn.btn-info.active, +.navbar .navbar-nav > li > a.btn.btn-info:active:focus, +.navbar .navbar-nav > li > a.btn.btn-info:active:hover, +.navbar .navbar-nav > li > a.btn.btn-info.active:focus, +.navbar .navbar-nav > li > a.btn.btn-info.active:hover, .open > +.navbar .navbar-nav > li > a.btn.btn-info.dropdown-toggle, .open > +.navbar .navbar-nav > li > a.btn.btn-info.dropdown-toggle:focus, .open > +.navbar .navbar-nav > li > a.btn.btn-info.dropdown-toggle:hover { + background-color: #00bcd4; + color: #FFFFFF; +} +.btn.btn-info:focus, .btn.btn-info:active, .btn.btn-info:hover, +.navbar .navbar-nav > li > a.btn.btn-info:focus, +.navbar .navbar-nav > li > a.btn.btn-info:active, +.navbar .navbar-nav > li > a.btn.btn-info:hover { + box-shadow: 0 14px 26px -12px rgba(0, 188, 212, 0.42), 0 4px 23px 0px rgba(0, 0, 0, 0.12), 0 8px 10px -5px rgba(0, 188, 212, 0.2); +} +.btn.btn-info.disabled, .btn.btn-info.disabled:hover, .btn.btn-info.disabled:focus, .btn.btn-info.disabled.focus, .btn.btn-info.disabled:active, .btn.btn-info.disabled.active, .btn.btn-info:disabled, .btn.btn-info:disabled:hover, .btn.btn-info:disabled:focus, .btn.btn-info:disabled.focus, .btn.btn-info:disabled:active, .btn.btn-info:disabled.active, .btn.btn-info[disabled], .btn.btn-info[disabled]:hover, .btn.btn-info[disabled]:focus, .btn.btn-info[disabled].focus, .btn.btn-info[disabled]:active, .btn.btn-info[disabled].active, fieldset[disabled] .btn.btn-info, fieldset[disabled] .btn.btn-info:hover, fieldset[disabled] .btn.btn-info:focus, fieldset[disabled] .btn.btn-info.focus, fieldset[disabled] .btn.btn-info:active, fieldset[disabled] .btn.btn-info.active, +.navbar .navbar-nav > li > a.btn.btn-info.disabled, +.navbar .navbar-nav > li > a.btn.btn-info.disabled:hover, +.navbar .navbar-nav > li > a.btn.btn-info.disabled:focus, +.navbar .navbar-nav > li > a.btn.btn-info.disabled.focus, +.navbar .navbar-nav > li > a.btn.btn-info.disabled:active, +.navbar .navbar-nav > li > a.btn.btn-info.disabled.active, +.navbar .navbar-nav > li > a.btn.btn-info:disabled, +.navbar .navbar-nav > li > a.btn.btn-info:disabled:hover, +.navbar .navbar-nav > li > a.btn.btn-info:disabled:focus, +.navbar .navbar-nav > li > a.btn.btn-info:disabled.focus, +.navbar .navbar-nav > li > a.btn.btn-info:disabled:active, +.navbar .navbar-nav > li > a.btn.btn-info:disabled.active, +.navbar .navbar-nav > li > a.btn.btn-info[disabled], +.navbar .navbar-nav > li > a.btn.btn-info[disabled]:hover, +.navbar .navbar-nav > li > a.btn.btn-info[disabled]:focus, +.navbar .navbar-nav > li > a.btn.btn-info[disabled].focus, +.navbar .navbar-nav > li > a.btn.btn-info[disabled]:active, +.navbar .navbar-nav > li > a.btn.btn-info[disabled].active, fieldset[disabled] +.navbar .navbar-nav > li > a.btn.btn-info, fieldset[disabled] +.navbar .navbar-nav > li > a.btn.btn-info:hover, fieldset[disabled] +.navbar .navbar-nav > li > a.btn.btn-info:focus, fieldset[disabled] +.navbar .navbar-nav > li > a.btn.btn-info.focus, fieldset[disabled] +.navbar .navbar-nav > li > a.btn.btn-info:active, fieldset[disabled] +.navbar .navbar-nav > li > a.btn.btn-info.active { + box-shadow: none; +} +.btn.btn-info.btn-simple, +.navbar .navbar-nav > li > a.btn.btn-info.btn-simple { + background-color: transparent; + color: #00bcd4; + box-shadow: none; +} +.btn.btn-info.btn-simple:hover, .btn.btn-info.btn-simple:focus, .btn.btn-info.btn-simple:active, +.navbar .navbar-nav > li > a.btn.btn-info.btn-simple:hover, +.navbar .navbar-nav > li > a.btn.btn-info.btn-simple:focus, +.navbar .navbar-nav > li > a.btn.btn-info.btn-simple:active { + background-color: transparent; + color: #00bcd4; +} +.btn.btn-success, +.navbar .navbar-nav > li > a.btn.btn-success { + box-shadow: 0 2px 2px 0 rgba(76, 175, 80, 0.14), 0 3px 1px -2px rgba(76, 175, 80, 0.2), 0 1px 5px 0 rgba(76, 175, 80, 0.12); +} +.btn.btn-success, .btn.btn-success:hover, .btn.btn-success:focus, .btn.btn-success:active, .btn.btn-success.active, .btn.btn-success:active:focus, .btn.btn-success:active:hover, .btn.btn-success.active:focus, .btn.btn-success.active:hover, .open > .btn.btn-success.dropdown-toggle, .open > .btn.btn-success.dropdown-toggle:focus, .open > .btn.btn-success.dropdown-toggle:hover, +.navbar .navbar-nav > li > a.btn.btn-success, +.navbar .navbar-nav > li > a.btn.btn-success:hover, +.navbar .navbar-nav > li > a.btn.btn-success:focus, +.navbar .navbar-nav > li > a.btn.btn-success:active, +.navbar .navbar-nav > li > a.btn.btn-success.active, +.navbar .navbar-nav > li > a.btn.btn-success:active:focus, +.navbar .navbar-nav > li > a.btn.btn-success:active:hover, +.navbar .navbar-nav > li > a.btn.btn-success.active:focus, +.navbar .navbar-nav > li > a.btn.btn-success.active:hover, .open > +.navbar .navbar-nav > li > a.btn.btn-success.dropdown-toggle, .open > +.navbar .navbar-nav > li > a.btn.btn-success.dropdown-toggle:focus, .open > +.navbar .navbar-nav > li > a.btn.btn-success.dropdown-toggle:hover { + background-color: #4caf50; + color: #FFFFFF; +} +.btn.btn-success:focus, .btn.btn-success:active, .btn.btn-success:hover, +.navbar .navbar-nav > li > a.btn.btn-success:focus, +.navbar .navbar-nav > li > a.btn.btn-success:active, +.navbar .navbar-nav > li > a.btn.btn-success:hover { + box-shadow: 0 14px 26px -12px rgba(76, 175, 80, 0.42), 0 4px 23px 0px rgba(0, 0, 0, 0.12), 0 8px 10px -5px rgba(76, 175, 80, 0.2); +} +.btn.btn-success.disabled, .btn.btn-success.disabled:hover, .btn.btn-success.disabled:focus, .btn.btn-success.disabled.focus, .btn.btn-success.disabled:active, .btn.btn-success.disabled.active, .btn.btn-success:disabled, .btn.btn-success:disabled:hover, .btn.btn-success:disabled:focus, .btn.btn-success:disabled.focus, .btn.btn-success:disabled:active, .btn.btn-success:disabled.active, .btn.btn-success[disabled], .btn.btn-success[disabled]:hover, .btn.btn-success[disabled]:focus, .btn.btn-success[disabled].focus, .btn.btn-success[disabled]:active, .btn.btn-success[disabled].active, fieldset[disabled] .btn.btn-success, fieldset[disabled] .btn.btn-success:hover, fieldset[disabled] .btn.btn-success:focus, fieldset[disabled] .btn.btn-success.focus, fieldset[disabled] .btn.btn-success:active, fieldset[disabled] .btn.btn-success.active, +.navbar .navbar-nav > li > a.btn.btn-success.disabled, +.navbar .navbar-nav > li > a.btn.btn-success.disabled:hover, +.navbar .navbar-nav > li > a.btn.btn-success.disabled:focus, +.navbar .navbar-nav > li > a.btn.btn-success.disabled.focus, +.navbar .navbar-nav > li > a.btn.btn-success.disabled:active, +.navbar .navbar-nav > li > a.btn.btn-success.disabled.active, +.navbar .navbar-nav > li > a.btn.btn-success:disabled, +.navbar .navbar-nav > li > a.btn.btn-success:disabled:hover, +.navbar .navbar-nav > li > a.btn.btn-success:disabled:focus, +.navbar .navbar-nav > li > a.btn.btn-success:disabled.focus, +.navbar .navbar-nav > li > a.btn.btn-success:disabled:active, +.navbar .navbar-nav > li > a.btn.btn-success:disabled.active, +.navbar .navbar-nav > li > a.btn.btn-success[disabled], +.navbar .navbar-nav > li > a.btn.btn-success[disabled]:hover, +.navbar .navbar-nav > li > a.btn.btn-success[disabled]:focus, +.navbar .navbar-nav > li > a.btn.btn-success[disabled].focus, +.navbar .navbar-nav > li > a.btn.btn-success[disabled]:active, +.navbar .navbar-nav > li > a.btn.btn-success[disabled].active, fieldset[disabled] +.navbar .navbar-nav > li > a.btn.btn-success, fieldset[disabled] +.navbar .navbar-nav > li > a.btn.btn-success:hover, fieldset[disabled] +.navbar .navbar-nav > li > a.btn.btn-success:focus, fieldset[disabled] +.navbar .navbar-nav > li > a.btn.btn-success.focus, fieldset[disabled] +.navbar .navbar-nav > li > a.btn.btn-success:active, fieldset[disabled] +.navbar .navbar-nav > li > a.btn.btn-success.active { + box-shadow: none; +} +.btn.btn-success.btn-simple, +.navbar .navbar-nav > li > a.btn.btn-success.btn-simple { + background-color: transparent; + color: #4caf50; + box-shadow: none; +} +.btn.btn-success.btn-simple:hover, .btn.btn-success.btn-simple:focus, .btn.btn-success.btn-simple:active, +.navbar .navbar-nav > li > a.btn.btn-success.btn-simple:hover, +.navbar .navbar-nav > li > a.btn.btn-success.btn-simple:focus, +.navbar .navbar-nav > li > a.btn.btn-success.btn-simple:active { + background-color: transparent; + color: #4caf50; +} +.btn.btn-warning, +.navbar .navbar-nav > li > a.btn.btn-warning { + box-shadow: 0 2px 2px 0 rgba(255, 152, 0, 0.14), 0 3px 1px -2px rgba(255, 152, 0, 0.2), 0 1px 5px 0 rgba(255, 152, 0, 0.12); +} +.btn.btn-warning, .btn.btn-warning:hover, .btn.btn-warning:focus, .btn.btn-warning:active, .btn.btn-warning.active, .btn.btn-warning:active:focus, .btn.btn-warning:active:hover, .btn.btn-warning.active:focus, .btn.btn-warning.active:hover, .open > .btn.btn-warning.dropdown-toggle, .open > .btn.btn-warning.dropdown-toggle:focus, .open > .btn.btn-warning.dropdown-toggle:hover, +.navbar .navbar-nav > li > a.btn.btn-warning, +.navbar .navbar-nav > li > a.btn.btn-warning:hover, +.navbar .navbar-nav > li > a.btn.btn-warning:focus, +.navbar .navbar-nav > li > a.btn.btn-warning:active, +.navbar .navbar-nav > li > a.btn.btn-warning.active, +.navbar .navbar-nav > li > a.btn.btn-warning:active:focus, +.navbar .navbar-nav > li > a.btn.btn-warning:active:hover, +.navbar .navbar-nav > li > a.btn.btn-warning.active:focus, +.navbar .navbar-nav > li > a.btn.btn-warning.active:hover, .open > +.navbar .navbar-nav > li > a.btn.btn-warning.dropdown-toggle, .open > +.navbar .navbar-nav > li > a.btn.btn-warning.dropdown-toggle:focus, .open > +.navbar .navbar-nav > li > a.btn.btn-warning.dropdown-toggle:hover { + background-color: #ff9800; + color: #FFFFFF; +} +.btn.btn-warning:focus, .btn.btn-warning:active, .btn.btn-warning:hover, +.navbar .navbar-nav > li > a.btn.btn-warning:focus, +.navbar .navbar-nav > li > a.btn.btn-warning:active, +.navbar .navbar-nav > li > a.btn.btn-warning:hover { + box-shadow: 0 14px 26px -12px rgba(255, 152, 0, 0.42), 0 4px 23px 0px rgba(0, 0, 0, 0.12), 0 8px 10px -5px rgba(255, 152, 0, 0.2); +} +.btn.btn-warning.disabled, .btn.btn-warning.disabled:hover, .btn.btn-warning.disabled:focus, .btn.btn-warning.disabled.focus, .btn.btn-warning.disabled:active, .btn.btn-warning.disabled.active, .btn.btn-warning:disabled, .btn.btn-warning:disabled:hover, .btn.btn-warning:disabled:focus, .btn.btn-warning:disabled.focus, .btn.btn-warning:disabled:active, .btn.btn-warning:disabled.active, .btn.btn-warning[disabled], .btn.btn-warning[disabled]:hover, .btn.btn-warning[disabled]:focus, .btn.btn-warning[disabled].focus, .btn.btn-warning[disabled]:active, .btn.btn-warning[disabled].active, fieldset[disabled] .btn.btn-warning, fieldset[disabled] .btn.btn-warning:hover, fieldset[disabled] .btn.btn-warning:focus, fieldset[disabled] .btn.btn-warning.focus, fieldset[disabled] .btn.btn-warning:active, fieldset[disabled] .btn.btn-warning.active, +.navbar .navbar-nav > li > a.btn.btn-warning.disabled, +.navbar .navbar-nav > li > a.btn.btn-warning.disabled:hover, +.navbar .navbar-nav > li > a.btn.btn-warning.disabled:focus, +.navbar .navbar-nav > li > a.btn.btn-warning.disabled.focus, +.navbar .navbar-nav > li > a.btn.btn-warning.disabled:active, +.navbar .navbar-nav > li > a.btn.btn-warning.disabled.active, +.navbar .navbar-nav > li > a.btn.btn-warning:disabled, +.navbar .navbar-nav > li > a.btn.btn-warning:disabled:hover, +.navbar .navbar-nav > li > a.btn.btn-warning:disabled:focus, +.navbar .navbar-nav > li > a.btn.btn-warning:disabled.focus, +.navbar .navbar-nav > li > a.btn.btn-warning:disabled:active, +.navbar .navbar-nav > li > a.btn.btn-warning:disabled.active, +.navbar .navbar-nav > li > a.btn.btn-warning[disabled], +.navbar .navbar-nav > li > a.btn.btn-warning[disabled]:hover, +.navbar .navbar-nav > li > a.btn.btn-warning[disabled]:focus, +.navbar .navbar-nav > li > a.btn.btn-warning[disabled].focus, +.navbar .navbar-nav > li > a.btn.btn-warning[disabled]:active, +.navbar .navbar-nav > li > a.btn.btn-warning[disabled].active, fieldset[disabled] +.navbar .navbar-nav > li > a.btn.btn-warning, fieldset[disabled] +.navbar .navbar-nav > li > a.btn.btn-warning:hover, fieldset[disabled] +.navbar .navbar-nav > li > a.btn.btn-warning:focus, fieldset[disabled] +.navbar .navbar-nav > li > a.btn.btn-warning.focus, fieldset[disabled] +.navbar .navbar-nav > li > a.btn.btn-warning:active, fieldset[disabled] +.navbar .navbar-nav > li > a.btn.btn-warning.active { + box-shadow: none; +} +.btn.btn-warning.btn-simple, +.navbar .navbar-nav > li > a.btn.btn-warning.btn-simple { + background-color: transparent; + color: #ff9800; + box-shadow: none; +} +.btn.btn-warning.btn-simple:hover, .btn.btn-warning.btn-simple:focus, .btn.btn-warning.btn-simple:active, +.navbar .navbar-nav > li > a.btn.btn-warning.btn-simple:hover, +.navbar .navbar-nav > li > a.btn.btn-warning.btn-simple:focus, +.navbar .navbar-nav > li > a.btn.btn-warning.btn-simple:active { + background-color: transparent; + color: #ff9800; +} +.btn.btn-danger, +.navbar .navbar-nav > li > a.btn.btn-danger { + box-shadow: 0 2px 2px 0 rgba(244, 67, 54, 0.14), 0 3px 1px -2px rgba(244, 67, 54, 0.2), 0 1px 5px 0 rgba(244, 67, 54, 0.12); +} +.btn.btn-danger, .btn.btn-danger:hover, .btn.btn-danger:focus, .btn.btn-danger:active, .btn.btn-danger.active, .btn.btn-danger:active:focus, .btn.btn-danger:active:hover, .btn.btn-danger.active:focus, .btn.btn-danger.active:hover, .open > .btn.btn-danger.dropdown-toggle, .open > .btn.btn-danger.dropdown-toggle:focus, .open > .btn.btn-danger.dropdown-toggle:hover, +.navbar .navbar-nav > li > a.btn.btn-danger, +.navbar .navbar-nav > li > a.btn.btn-danger:hover, +.navbar .navbar-nav > li > a.btn.btn-danger:focus, +.navbar .navbar-nav > li > a.btn.btn-danger:active, +.navbar .navbar-nav > li > a.btn.btn-danger.active, +.navbar .navbar-nav > li > a.btn.btn-danger:active:focus, +.navbar .navbar-nav > li > a.btn.btn-danger:active:hover, +.navbar .navbar-nav > li > a.btn.btn-danger.active:focus, +.navbar .navbar-nav > li > a.btn.btn-danger.active:hover, .open > +.navbar .navbar-nav > li > a.btn.btn-danger.dropdown-toggle, .open > +.navbar .navbar-nav > li > a.btn.btn-danger.dropdown-toggle:focus, .open > +.navbar .navbar-nav > li > a.btn.btn-danger.dropdown-toggle:hover { + background-color: #ed7063; + color: #FFFFFF; +} +.btn.btn-danger:focus, .btn.btn-danger:active, .btn.btn-danger:hover, +.navbar .navbar-nav > li > a.btn.btn-danger:focus, +.navbar .navbar-nav > li > a.btn.btn-danger:active, +.navbar .navbar-nav > li > a.btn.btn-danger:hover { + box-shadow: 0 14px 26px -12px rgba(244, 67, 54, 0.42), 0 4px 23px 0px rgba(0, 0, 0, 0.12), 0 8px 10px -5px rgba(244, 67, 54, 0.2); +} +.btn.btn-danger.disabled, .btn.btn-danger.disabled:hover, .btn.btn-danger.disabled:focus, .btn.btn-danger.disabled.focus, .btn.btn-danger.disabled:active, .btn.btn-danger.disabled.active, .btn.btn-danger:disabled, .btn.btn-danger:disabled:hover, .btn.btn-danger:disabled:focus, .btn.btn-danger:disabled.focus, .btn.btn-danger:disabled:active, .btn.btn-danger:disabled.active, .btn.btn-danger[disabled], .btn.btn-danger[disabled]:hover, .btn.btn-danger[disabled]:focus, .btn.btn-danger[disabled].focus, .btn.btn-danger[disabled]:active, .btn.btn-danger[disabled].active, fieldset[disabled] .btn.btn-danger, fieldset[disabled] .btn.btn-danger:hover, fieldset[disabled] .btn.btn-danger:focus, fieldset[disabled] .btn.btn-danger.focus, fieldset[disabled] .btn.btn-danger:active, fieldset[disabled] .btn.btn-danger.active, +.navbar .navbar-nav > li > a.btn.btn-danger.disabled, +.navbar .navbar-nav > li > a.btn.btn-danger.disabled:hover, +.navbar .navbar-nav > li > a.btn.btn-danger.disabled:focus, +.navbar .navbar-nav > li > a.btn.btn-danger.disabled.focus, +.navbar .navbar-nav > li > a.btn.btn-danger.disabled:active, +.navbar .navbar-nav > li > a.btn.btn-danger.disabled.active, +.navbar .navbar-nav > li > a.btn.btn-danger:disabled, +.navbar .navbar-nav > li > a.btn.btn-danger:disabled:hover, +.navbar .navbar-nav > li > a.btn.btn-danger:disabled:focus, +.navbar .navbar-nav > li > a.btn.btn-danger:disabled.focus, +.navbar .navbar-nav > li > a.btn.btn-danger:disabled:active, +.navbar .navbar-nav > li > a.btn.btn-danger:disabled.active, +.navbar .navbar-nav > li > a.btn.btn-danger[disabled], +.navbar .navbar-nav > li > a.btn.btn-danger[disabled]:hover, +.navbar .navbar-nav > li > a.btn.btn-danger[disabled]:focus, +.navbar .navbar-nav > li > a.btn.btn-danger[disabled].focus, +.navbar .navbar-nav > li > a.btn.btn-danger[disabled]:active, +.navbar .navbar-nav > li > a.btn.btn-danger[disabled].active, fieldset[disabled] +.navbar .navbar-nav > li > a.btn.btn-danger, fieldset[disabled] +.navbar .navbar-nav > li > a.btn.btn-danger:hover, fieldset[disabled] +.navbar .navbar-nav > li > a.btn.btn-danger:focus, fieldset[disabled] +.navbar .navbar-nav > li > a.btn.btn-danger.focus, fieldset[disabled] +.navbar .navbar-nav > li > a.btn.btn-danger:active, fieldset[disabled] +.navbar .navbar-nav > li > a.btn.btn-danger.active { + box-shadow: none; +} +.btn.btn-danger.btn-simple, +.navbar .navbar-nav > li > a.btn.btn-danger.btn-simple { + background-color: transparent; + color: #ed7063; + box-shadow: none; +} +.btn.btn-danger.btn-simple:hover, .btn.btn-danger.btn-simple:focus, .btn.btn-danger.btn-simple:active, +.navbar .navbar-nav > li > a.btn.btn-danger.btn-simple:hover, +.navbar .navbar-nav > li > a.btn.btn-danger.btn-simple:focus, +.navbar .navbar-nav > li > a.btn.btn-danger.btn-simple:active { + background-color: transparent; + color: #ed7063; +} +.btn.btn-white, .btn.btn-white:focus, .btn.btn-white:hover, +.navbar .navbar-nav > li > a.btn.btn-white, +.navbar .navbar-nav > li > a.btn.btn-white:focus, +.navbar .navbar-nav > li > a.btn.btn-white:hover { + background-color: #FFFFFF; + color: #999999; +} +.btn.btn-white.btn-simple, +.navbar .navbar-nav > li > a.btn.btn-white.btn-simple { + color: #FFFFFF; + background: transparent; + box-shadow: none; +} +.btn.btn-facebook, +.navbar .navbar-nav > li > a.btn.btn-facebook { + background-color: #3b5998; + color: #fff; + box-shadow: 0 2px 2px 0 rgba(59, 89, 152, 0.14), 0 3px 1px -2px rgba(59, 89, 152, 0.2), 0 1px 5px 0 rgba(59, 89, 152, 0.12); +} +.btn.btn-facebook:focus, .btn.btn-facebook:active, .btn.btn-facebook:hover, +.navbar .navbar-nav > li > a.btn.btn-facebook:focus, +.navbar .navbar-nav > li > a.btn.btn-facebook:active, +.navbar .navbar-nav > li > a.btn.btn-facebook:hover { + background-color: #3b5998; + color: #fff; + box-shadow: 0 14px 26px -12px rgba(59, 89, 152, 0.42), 0 4px 23px 0px rgba(0, 0, 0, 0.12), 0 8px 10px -5px rgba(59, 89, 152, 0.2); +} +.btn.btn-facebook.btn-simple, +.navbar .navbar-nav > li > a.btn.btn-facebook.btn-simple { + color: #3b5998; + background-color: transparent; + box-shadow: none; +} +.btn.btn-twitter, +.navbar .navbar-nav > li > a.btn.btn-twitter { + background-color: #55acee; + color: #fff; + box-shadow: 0 2px 2px 0 rgba(85, 172, 238, 0.14), 0 3px 1px -2px rgba(85, 172, 238, 0.2), 0 1px 5px 0 rgba(85, 172, 238, 0.12); +} +.btn.btn-twitter:focus, .btn.btn-twitter:active, .btn.btn-twitter:hover, +.navbar .navbar-nav > li > a.btn.btn-twitter:focus, +.navbar .navbar-nav > li > a.btn.btn-twitter:active, +.navbar .navbar-nav > li > a.btn.btn-twitter:hover { + background-color: #55acee; + color: #fff; + box-shadow: 0 14px 26px -12px rgba(85, 172, 238, 0.42), 0 4px 23px 0px rgba(0, 0, 0, 0.12), 0 8px 10px -5px rgba(85, 172, 238, 0.2); +} +.btn.btn-twitter.btn-simple, +.navbar .navbar-nav > li > a.btn.btn-twitter.btn-simple { + color: #55acee; + background-color: transparent; + box-shadow: none; +} +.btn.btn-pinterest, +.navbar .navbar-nav > li > a.btn.btn-pinterest { + background-color: #cc2127; + color: #fff; + box-shadow: 0 2px 2px 0 rgba(204, 33, 39, 0.14), 0 3px 1px -2px rgba(204, 33, 39, 0.2), 0 1px 5px 0 rgba(204, 33, 39, 0.12); +} +.btn.btn-pinterest:focus, .btn.btn-pinterest:active, .btn.btn-pinterest:hover, +.navbar .navbar-nav > li > a.btn.btn-pinterest:focus, +.navbar .navbar-nav > li > a.btn.btn-pinterest:active, +.navbar .navbar-nav > li > a.btn.btn-pinterest:hover { + background-color: #cc2127; + color: #fff; + box-shadow: 0 14px 26px -12px rgba(204, 33, 39, 0.42), 0 4px 23px 0px rgba(0, 0, 0, 0.12), 0 8px 10px -5px rgba(204, 33, 39, 0.2); +} +.btn.btn-pinterest.btn-simple, +.navbar .navbar-nav > li > a.btn.btn-pinterest.btn-simple { + color: #cc2127; + background-color: transparent; + box-shadow: none; +} +.btn.btn-google, +.navbar .navbar-nav > li > a.btn.btn-google { + background-color: #dd4b39; + color: #fff; + box-shadow: 0 2px 2px 0 rgba(221, 75, 57, 0.14), 0 3px 1px -2px rgba(221, 75, 57, 0.2), 0 1px 5px 0 rgba(221, 75, 57, 0.12); +} +.btn.btn-google:focus, .btn.btn-google:active, .btn.btn-google:hover, +.navbar .navbar-nav > li > a.btn.btn-google:focus, +.navbar .navbar-nav > li > a.btn.btn-google:active, +.navbar .navbar-nav > li > a.btn.btn-google:hover { + background-color: #dd4b39; + color: #fff; + box-shadow: 0 14px 26px -12px rgba(221, 75, 57, 0.42), 0 4px 23px 0px rgba(0, 0, 0, 0.12), 0 8px 10px -5px rgba(221, 75, 57, 0.2); +} +.btn.btn-google.btn-simple, +.navbar .navbar-nav > li > a.btn.btn-google.btn-simple { + color: #dd4b39; + background-color: transparent; + box-shadow: none; +} +.btn.btn-instagram, +.navbar .navbar-nav > li > a.btn.btn-instagram { + background-color: #125688; + color: #fff; + box-shadow: 0 2px 2px 0 rgba(18, 86, 136, 0.14), 0 3px 1px -2px rgba(18, 86, 136, 0.2), 0 1px 5px 0 rgba(18, 86, 136, 0.12); +} +.btn.btn-instagram:focus, .btn.btn-instagram:active, .btn.btn-instagram:hover, +.navbar .navbar-nav > li > a.btn.btn-instagram:focus, +.navbar .navbar-nav > li > a.btn.btn-instagram:active, +.navbar .navbar-nav > li > a.btn.btn-instagram:hover { + background-color: #125688; + color: #fff; + box-shadow: 0 14px 26px -12px rgba(18, 86, 136, 0.42), 0 4px 23px 0px rgba(0, 0, 0, 0.12), 0 8px 10px -5px rgba(18, 86, 136, 0.2); +} +.btn.btn-instagram.btn-simple, +.navbar .navbar-nav > li > a.btn.btn-instagram.btn-simple { + color: #125688; + background-color: transparent; + box-shadow: none; +} +.btn:focus, .btn:active, .btn:active:focus, +.navbar .navbar-nav > li > a.btn:focus, +.navbar .navbar-nav > li > a.btn:active, +.navbar .navbar-nav > li > a.btn:active:focus { + outline: 0; +} +.btn.btn-round, +.navbar .navbar-nav > li > a.btn.btn-round { + border-radius: 30px; +} +.btn:not(.btn-just-icon):not(.btn-fab) .fa, +.navbar .navbar-nav > li > a.btn:not(.btn-just-icon):not(.btn-fab) .fa { + font-size: 18px; + margin-top: -2px; + position: relative; + top: 2px; +} +.btn.btn-fab, +.navbar .navbar-nav > li > a.btn.btn-fab { + border-radius: 50%; + font-size: 24px; + height: 56px; + margin: auto; + min-width: 56px; + width: 56px; + padding: 0; + overflow: hidden; + position: relative; + line-height: normal; +} +.btn.btn-fab .ripple-container, +.navbar .navbar-nav > li > a.btn.btn-fab .ripple-container { + border-radius: 50%; +} +.btn.btn-fab.btn-fab-mini, .btn-group-sm .btn.btn-fab, +.navbar .navbar-nav > li > a.btn.btn-fab.btn-fab-mini, .btn-group-sm +.navbar .navbar-nav > li > a.btn.btn-fab { + height: 40px; + min-width: 40px; + width: 40px; +} +.btn.btn-fab.btn-fab-mini.material-icons, .btn-group-sm .btn.btn-fab.material-icons, +.navbar .navbar-nav > li > a.btn.btn-fab.btn-fab-mini.material-icons, .btn-group-sm +.navbar .navbar-nav > li > a.btn.btn-fab.material-icons { + top: -3.5px; + left: -3.5px; +} +.btn.btn-fab.btn-fab-mini .material-icons, .btn-group-sm .btn.btn-fab .material-icons, +.navbar .navbar-nav > li > a.btn.btn-fab.btn-fab-mini .material-icons, .btn-group-sm +.navbar .navbar-nav > li > a.btn.btn-fab .material-icons { + font-size: 17px; +} +.btn.btn-fab i.material-icons, +.navbar .navbar-nav > li > a.btn.btn-fab i.material-icons { + position: absolute; + top: 50%; + left: 50%; + transform: translate(-12px, -12px); + line-height: 24px; + width: 24px; + font-size: 24px; +} +.btn.btn-lg, .btn-group-lg .btn, +.navbar .navbar-nav > li > a.btn.btn-lg, .btn-group-lg +.navbar .navbar-nav > li > a.btn { + font-size: 14px; + padding: 18px 36px; +} +.btn.btn-sm, .btn-group-sm .btn, +.navbar .navbar-nav > li > a.btn.btn-sm, .btn-group-sm +.navbar .navbar-nav > li > a.btn { + padding: 5px 20px; + font-size: 11px; +} +.btn.btn-xs, .btn-group-xs .btn, +.navbar .navbar-nav > li > a.btn.btn-xs, .btn-group-xs +.navbar .navbar-nav > li > a.btn { + padding: 4px 15px; + font-size: 10px; +} +.btn.btn-just-icon, +.navbar .navbar-nav > li > a.btn.btn-just-icon { + font-size: 20px; + padding: 12px 12px; + line-height: 1em; +} +.btn.btn-just-icon i, +.navbar .navbar-nav > li > a.btn.btn-just-icon i { + width: 20px; +} +.btn.btn-just-icon.btn-lg, +.navbar .navbar-nav > li > a.btn.btn-just-icon.btn-lg { + font-size: 22px; + padding: 13px 18px; +} + +.btn .material-icons { + vertical-align: middle; + font-size: 17px; + top: -1px; + position: relative; +} + +.navbar .navbar-nav > li > a.btn { + margin-top: 2px; + margin-bottom: 2px; +} +.navbar .navbar-nav > li > a.btn.btn-fab { + margin: 5px 2px; +} +.navbar .navbar-nav > li > a:not(.btn) .material-icons { + margin-top: -3px; + top: 0px; + position: relative; + margin-right: 3px; +} +.navbar .navbar-nav > li > .profile-photo { + margin: 5px 2px; +} + +.navbar-default:not(.navbar-transparent) .navbar-nav > li > a.btn.btn-white.btn-simple { + color: #999; +} + +.btn-group, +.btn-group-vertical { + position: relative; + margin: 10px 1px; +} +.btn-group.open > .dropdown-toggle.btn, .btn-group.open > .dropdown-toggle.btn.btn-default, +.btn-group-vertical.open > .dropdown-toggle.btn, +.btn-group-vertical.open > .dropdown-toggle.btn.btn-default { + background-color: #FFFFFF; +} +.btn-group.open > .dropdown-toggle.btn.btn-inverse, +.btn-group-vertical.open > .dropdown-toggle.btn.btn-inverse { + background-color: #212121; +} +.btn-group.open > .dropdown-toggle.btn.btn-primary, +.btn-group-vertical.open > .dropdown-toggle.btn.btn-primary { + background-color: #9c27b0; +} +.btn-group.open > .dropdown-toggle.btn.btn-success, +.btn-group-vertical.open > .dropdown-toggle.btn.btn-success { + background-color: #4caf50; +} +.btn-group.open > .dropdown-toggle.btn.btn-info, +.btn-group-vertical.open > .dropdown-toggle.btn.btn-info { + background-color: #00bcd4; +} +.btn-group.open > .dropdown-toggle.btn.btn-warning, +.btn-group-vertical.open > .dropdown-toggle.btn.btn-warning { + background-color: #ff9800; +} +.btn-group.open > .dropdown-toggle.btn.btn-danger, +.btn-group-vertical.open > .dropdown-toggle.btn.btn-danger { + background-color: #ed7063; +} +.btn-group.open > .dropdown-toggle.btn.btn-rose, +.btn-group-vertical.open > .dropdown-toggle.btn.btn-rose { + background-color: #e91e63; +} +.btn-group .dropdown-menu, +.btn-group-vertical .dropdown-menu { + border-radius: 0 0 3px 3px; +} +.btn-group.btn-group-raised, +.btn-group-vertical.btn-group-raised { + box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 1px 5px 0 rgba(0, 0, 0, 0.12); +} +.btn-group .btn + .btn, +.btn-group .btn, +.btn-group .btn:active, +.btn-group .btn-group, +.btn-group-vertical .btn + .btn, +.btn-group-vertical .btn, +.btn-group-vertical .btn:active, +.btn-group-vertical .btn-group { + margin: 0; +} + +.close { + font-size: inherit; + color: #FFFFFF; + opacity: .9; + text-shadow: none; +} +.close:hover, .close:focus { + opacity: 1; + color: #FFFFFF; +} +.close i { + font-size: 20px; +} + +body { + background-color: #EEEEEE; + color: #3C4858; + font-family: 'Quicksand'; +} +body.inverse { + background: #333333; +} +body.inverse, body.inverse .form-control { + color: #ffffff; +} +body.inverse .modal, +body.inverse .modal .form-control, +body.inverse .panel-default, +body.inverse .panel-default .form-control, +body.inverse .card, +body.inverse .card .form-control { + background-color: initial; + color: initial; +} + +.wrapper.wrapper-full-page { + height: auto; + min-height: 100vh; +} + +blockquote p { + font-style: italic; +} + +.life-of-material-dashboard { + background: #FFFFFF; +} + +body, h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4 { + font-family: "Quicksand", "Roboto", "Helvetica", "Arial", sans-serif; + font-weight: 300; + line-height: 1.5em; +} + +.serif-font { + font-family: "Roboto Slab", "Times New Roman", serif; +} + +.page-header { + height: 60vh; + background-position: center center; + background-size: cover; + margin: 0; + padding: 0; + border: 0; + border-bottom-left-radius: 6px; + border-bottom-right-radius: 6px; +} + +a { + color: #ed7063; +} +a:hover, a:focus { + color: #9c27b0; + text-decoration: none; +} +a.text-info:hover, a.text-info:focus { + color: #9c27b0; +} +a .material-icons { + vertical-align: middle; +} + +/* Animations */ +.animation-transition-general, .sidebar .nav li > a, +.off-canvas-sidebar .nav li > a { + -webkit-transition: all 300ms linear; + -moz-transition: all 300ms linear; + -o-transition: all 300ms linear; + -ms-transition: all 300ms linear; + transition: all 300ms linear; +} + +.animation-transition-slow { + -webkit-transition: all 370ms linear; + -moz-transition: all 370ms linear; + -o-transition: all 370ms linear; + -ms-transition: all 370ms linear; + transition: all 370ms linear; +} + +.animation-transition-fast, .navbar { + -webkit-transition: all 150ms ease 0s; + -moz-transition: all 150ms ease 0s; + -o-transition: all 150ms ease 0s; + -ms-transition: all 150ms ease 0s; + transition: all 150ms ease 0s; +} + +legend { + border-bottom: 0; +} + +* { + -webkit-tap-highlight-color: rgba(255, 255, 255, 0); + -webkit-tap-highlight-color: transparent; +} +*:focus { + outline: 0; +} + +a:focus, a:active, +button:active, button:focus, button:hover, +button::-moz-focus-inner, +input[type="reset"]::-moz-focus-inner, +input[type="button"]::-moz-focus-inner, +input[type="submit"]::-moz-focus-inner, +select::-moz-focus-inner, +input[type="file"] > input[type="button"]::-moz-focus-inner { + outline: 0 !important; +} + +legend { + margin-bottom: 20px; + font-size: 21px; +} + +output { + padding-top: 8px; + font-size: 14px; + line-height: 1.42857; +} + +.form-control { + height: 36px; + padding: 7px 0; + font-size: 14px; + line-height: 1.42857; +} + +@media screen and (-webkit-min-device-pixel-ratio: 0) { + input[type="date"].form-control, + input[type="time"].form-control, + input[type="datetime-local"].form-control, + input[type="month"].form-control { + line-height: 36px; + } + input[type="date"].input-sm, .input-group-sm input[type="date"], + input[type="time"].input-sm, .input-group-sm + input[type="time"], + input[type="datetime-local"].input-sm, .input-group-sm + input[type="datetime-local"], + input[type="month"].input-sm, .input-group-sm + input[type="month"] { + line-height: 24px; + } + input[type="date"].input-lg, .input-group-lg input[type="date"], + input[type="time"].input-lg, .input-group-lg + input[type="time"], + input[type="datetime-local"].input-lg, .input-group-lg + input[type="datetime-local"], + input[type="month"].input-lg, .input-group-lg + input[type="month"] { + line-height: 44px; + } +} +.radio label, +.checkbox label { + min-height: 20px; +} + +.form-control-static { + padding-top: 8px; + padding-bottom: 8px; + min-height: 34px; +} + +.input-sm .input-sm { + height: 24px; + padding: 3px 0; + font-size: 11px; + line-height: 1.5; + border-radius: 0; +} +.input-sm select.input-sm { + height: 24px; + line-height: 24px; +} +.input-sm textarea.input-sm, +.input-sm select[multiple].input-sm { + height: auto; +} + +.form-group-sm .form-control { + height: 24px; + padding: 3px 0; + font-size: 11px; + line-height: 1.5; +} +.form-group-sm select.form-control { + height: 24px; + line-height: 24px; +} +.form-group-sm textarea.form-control, +.form-group-sm select[multiple].form-control { + height: auto; +} +.form-group-sm .form-control-static { + height: 24px; + min-height: 31px; + padding: 4px 0; + font-size: 11px; + line-height: 1.5; +} + +.input-lg .input-lg { + height: 44px; + padding: 9px 0; + font-size: 18px; + line-height: 1.33333; + border-radius: 0; +} +.input-lg select.input-lg { + height: 44px; + line-height: 44px; +} +.input-lg textarea.input-lg, +.input-lg select[multiple].input-lg { + height: auto; +} + +.form-group-lg .form-control { + height: 44px; + padding: 9px 0; + font-size: 18px; + line-height: 1.33333; +} +.form-group-lg select.form-control { + height: 44px; + line-height: 44px; +} +.form-group-lg textarea.form-control, +.form-group-lg select[multiple].form-control { + height: auto; +} +.form-group-lg .form-control-static { + height: 44px; + min-height: 38px; + padding: 10px 0; + font-size: 18px; + line-height: 1.33333; +} + +.form-horizontal .radio, +.form-horizontal .checkbox, +.form-horizontal .radio-inline, +.form-horizontal .checkbox-inline { + padding-top: 8px; +} +.form-horizontal .radio, +.form-horizontal .checkbox { + min-height: 28px; +} +@media (min-width: 768px) { + .form-horizontal .control-label { + padding-top: 8px; + } +} +@media (min-width: 768px) { + .form-horizontal .form-group-lg .control-label { + padding-top: 13.0px; + font-size: 18px; + } +} +@media (min-width: 768px) { + .form-horizontal .form-group-sm .control-label { + padding-top: 4px; + font-size: 11px; + } +} + +.label { + border-radius: 2px; +} +.label, .label.label-default { + background-color: #FFFFFF; +} +.label.label-inverse { + background-color: #212121; +} +.label.label-primary { + background-color: #9c27b0; +} +.label.label-success { + background-color: #4caf50; +} +.label.label-info { + background-color: #00bcd4; +} +.label.label-warning { + background-color: #ff9800; +} +.label.label-danger { + background-color: #ed7063; +} +.label.label-rose { + background-color: #e91e63; +} + +.form-control, +.form-group .form-control { + border: 0; + background-image: linear-gradient(#ed7063, #ed7063), linear-gradient(#D2D2D2, #D2D2D2); + background-size: 0 2px, 100% 1px; + background-repeat: no-repeat; + background-position: center bottom, center calc(100% - 1px); + background-color: transparent; + transition: background 0s ease-out; + float: none; + box-shadow: none; + border-radius: 0; + font-weight: 400; +} +.form-control::-moz-placeholder, +.form-group .form-control::-moz-placeholder { + color: #AAAAAA; + font-weight: 400; +} +.form-control:-ms-input-placeholder, +.form-group .form-control:-ms-input-placeholder { + color: #AAAAAA; + font-weight: 400; +} +.form-control::-webkit-input-placeholder, +.form-group .form-control::-webkit-input-placeholder { + color: #AAAAAA; + font-weight: 400; +} +.form-control[readonly], .form-control[disabled], fieldset[disabled] .form-control, +.form-group .form-control[readonly], +.form-group .form-control[disabled], fieldset[disabled] +.form-group .form-control { + background-color: transparent; +} +.form-control[disabled], fieldset[disabled] .form-control, +.form-group .form-control[disabled], fieldset[disabled] +.form-group .form-control { + background-image: none; + border-bottom: 1px dotted #D2D2D2; +} + +.form-group { + position: relative; +} +.form-group.label-static label.control-label, .form-group.label-placeholder label.control-label, .form-group.label-floating label.control-label { + position: absolute; + pointer-events: none; + transition: 0.3s ease all; +} +.form-group.label-floating label.control-label { + will-change: left, top, contents; +} +.form-group.label-placeholder:not(.is-empty) label.control-label { + display: none; +} +.form-group .help-block { + position: absolute; + display: none; +} +.form-group.is-focused .form-control { + outline: none; + background-image: linear-gradient(#ed7063, #ed7063), linear-gradient(#D2D2D2, #D2D2D2); + background-size: 100% 2px, 100% 1px; + box-shadow: none; + transition-duration: 0.3s; +} +.form-group.is-focused .form-control .material-input:after { + background-color: #9c27b0; +} +.form-group.is-focused.form-info .form-control { + background-image: linear-gradient(#00bcd4, #00bcd4), linear-gradient(#D2D2D2, #D2D2D2); +} +.form-group.is-focused.form-success .form-control { + background-image: linear-gradient(#4caf50, #4caf50), linear-gradient(#D2D2D2, #D2D2D2); +} +.form-group.is-focused.form-warning .form-control { + background-image: linear-gradient(#ff9800, #ff9800), linear-gradient(#D2D2D2, #D2D2D2); +} +.form-group.is-focused.form-danger .form-control { + background-image: linear-gradient(#ed7063, #ed7063), linear-gradient(#D2D2D2, #D2D2D2); +} +.form-group.is-focused.form-rose .form-control { + background-image: linear-gradient(#e91e63, #e91e63), linear-gradient(#D2D2D2, #D2D2D2); +} +.form-group.is-focused.form-white .form-control { + background-image: linear-gradient(#FFFFFF, #FFFFFF), linear-gradient(#D2D2D2, #D2D2D2); +} +.form-group.is-focused.label-placeholder label, +.form-group.is-focused.label-placeholder label.control-label { + color: #AAAAAA; +} +.form-group.is-focused .help-block { + display: block; +} +.form-group.has-warning .form-control { + box-shadow: none; +} +.form-group.has-warning.is-focused .form-control { + background-image: linear-gradient(#ff9800, #ff9800), linear-gradient(#D2D2D2, #D2D2D2); +} +.form-group.has-warning label.control-label, +.form-group.has-warning .help-block { + color: #ff9800; +} +.form-group.has-error .form-control { + box-shadow: none; +} +.form-group.has-error.is-focused .form-control { + background-image: linear-gradient(#ed7063, #ed7063), linear-gradient(#D2D2D2, #D2D2D2); +} +.form-group.has-error label.control-label, +.form-group.has-error .help-block { + color: #ed7063; +} +.form-group.has-success .form-control { + box-shadow: none; +} +.form-group.has-success.is-focused .form-control { + background-image: linear-gradient(#4caf50, #4caf50), linear-gradient(#D2D2D2, #D2D2D2); +} +.form-group.has-success label.control-label, +.form-group.has-success .help-block { + color: #4caf50; +} +.form-group.has-info .form-control { + box-shadow: none; +} +.form-group.has-info.is-focused .form-control { + background-image: linear-gradient(#00bcd4, #00bcd4), linear-gradient(#D2D2D2, #D2D2D2); +} +.form-group.has-info label.control-label, +.form-group.has-info .help-block { + color: #00bcd4; +} +.form-group textarea { + resize: none; +} +.form-group textarea ~ .form-control-highlight { + margin-top: -11px; +} +.form-group select { + appearance: none; +} +.form-group select ~ .material-input:after { + display: none; +} + +.form-control { + margin-bottom: 7px; +} +.form-control::-moz-placeholder { + font-size: 14px; + line-height: 1.42857; + color: #AAAAAA; + font-weight: 400; +} +.form-control:-ms-input-placeholder { + font-size: 14px; + line-height: 1.42857; + color: #AAAAAA; + font-weight: 400; +} +.form-control::-webkit-input-placeholder { + font-size: 14px; + line-height: 1.42857; + color: #AAAAAA; + font-weight: 400; +} + +.checkbox label, +.radio label, +label { + font-size: 14px; + line-height: 1.42857; + color: #AAAAAA; + font-weight: 400; +} + +label.control-label { + font-size: 11px; + line-height: 1.07143; + color: #AAAAAA; + font-weight: 400; + margin: 16px 0 0 0; +} + +.help-block { + margin-top: 0; + font-size: 11px; +} + +.form-group { + padding-bottom: 7px; + margin: 27px 0 0 0; +} +.form-group .form-control { + margin-bottom: 7px; +} +.form-group .form-control::-moz-placeholder { + font-size: 14px; + line-height: 1.42857; + color: #AAAAAA; + font-weight: 400; +} +.form-group .form-control:-ms-input-placeholder { + font-size: 14px; + line-height: 1.42857; + color: #AAAAAA; + font-weight: 400; +} +.form-group .form-control::-webkit-input-placeholder { + font-size: 14px; + line-height: 1.42857; + color: #AAAAAA; + font-weight: 400; +} +.form-group .checkbox label, +.form-group .radio label, +.form-group label { + font-size: 14px; + line-height: 1.42857; + color: #AAAAAA; + font-weight: 400; +} +.form-group label.control-label { + font-size: 11px; + line-height: 1.07143; + color: #AAAAAA; + font-weight: 400; + margin: 16px 0 0 0; +} +.form-group .help-block { + margin-top: 0; + font-size: 11px; +} +.form-group.label-floating label.control-label, .form-group.label-placeholder label.control-label { + top: -7px; + font-size: 14px; + line-height: 1.42857; +} +.form-group.label-static label.control-label, .form-group.label-floating.is-focused label.control-label, .form-group.label-floating:not(.is-empty) label.control-label { + top: -28px; + left: 0; + font-size: 11px; + line-height: 1.07143; +} +.form-group.label-floating input.form-control:-webkit-autofill ~ label.control-label label.control-label { + top: -28px; + left: 0; + font-size: 11px; + line-height: 1.07143; +} + +.form-group.form-group-sm { + padding-bottom: 3px; + margin: 21px 0 0 0; +} +.form-group.form-group-sm .form-control { + margin-bottom: 3px; +} +.form-group.form-group-sm .form-control::-moz-placeholder { + font-size: 11px; + line-height: 1.5; + color: #AAAAAA; + font-weight: 400; +} +.form-group.form-group-sm .form-control:-ms-input-placeholder { + font-size: 11px; + line-height: 1.5; + color: #AAAAAA; + font-weight: 400; +} +.form-group.form-group-sm .form-control::-webkit-input-placeholder { + font-size: 11px; + line-height: 1.5; + color: #AAAAAA; + font-weight: 400; +} +.form-group.form-group-sm .checkbox label, +.form-group.form-group-sm .radio label, +.form-group.form-group-sm label { + font-size: 11px; + line-height: 1.5; + color: #AAAAAA; + font-weight: 400; +} +.form-group.form-group-sm label.control-label { + font-size: 9px; + line-height: 1.125; + color: #AAAAAA; + font-weight: 400; + margin: 16px 0 0 0; +} +.form-group.form-group-sm .help-block { + margin-top: 0; + font-size: 9px; +} +.form-group.form-group-sm.label-floating label.control-label, .form-group.form-group-sm.label-placeholder label.control-label { + top: -11px; + font-size: 11px; + line-height: 1.5; +} +.form-group.form-group-sm.label-static label.control-label, .form-group.form-group-sm.label-floating.is-focused label.control-label, .form-group.form-group-sm.label-floating:not(.is-empty) label.control-label { + top: -25px; + left: 0; + font-size: 9px; + line-height: 1.125; +} +.form-group.form-group-sm.label-floating input.form-control:-webkit-autofill ~ label.control-label label.control-label { + top: -25px; + left: 0; + font-size: 9px; + line-height: 1.125; +} + +.form-group.form-group-lg { + padding-bottom: 9px; + margin: 30px 0 0 0; +} +.form-group.form-group-lg .form-control { + margin-bottom: 9px; +} +.form-group.form-group-lg .form-control::-moz-placeholder { + font-size: 18px; + line-height: 1.33333; + color: #AAAAAA; + font-weight: 400; +} +.form-group.form-group-lg .form-control:-ms-input-placeholder { + font-size: 18px; + line-height: 1.33333; + color: #AAAAAA; + font-weight: 400; +} +.form-group.form-group-lg .form-control::-webkit-input-placeholder { + font-size: 18px; + line-height: 1.33333; + color: #AAAAAA; + font-weight: 400; +} +.form-group.form-group-lg .checkbox label, +.form-group.form-group-lg .radio label, +.form-group.form-group-lg label { + font-size: 18px; + line-height: 1.33333; + color: #AAAAAA; + font-weight: 400; +} +.form-group.form-group-lg label.control-label { + font-size: 14px; + line-height: 1.0; + color: #AAAAAA; + font-weight: 400; + margin: 16px 0 0 0; +} +.form-group.form-group-lg .help-block { + margin-top: 0; + font-size: 14px; +} +.form-group.form-group-lg.label-floating label.control-label, .form-group.form-group-lg.label-placeholder label.control-label { + top: -5px; + font-size: 18px; + line-height: 1.33333; +} +.form-group.form-group-lg.label-static label.control-label, .form-group.form-group-lg.label-floating.is-focused label.control-label, .form-group.form-group-lg.label-floating:not(.is-empty) label.control-label { + top: -32px; + left: 0; + font-size: 14px; + line-height: 1.0; +} +.form-group.form-group-lg.label-floating input.form-control:-webkit-autofill ~ label.control-label label.control-label { + top: -32px; + left: 0; + font-size: 14px; + line-height: 1.0; +} + +select.form-control { + border: 0; + box-shadow: none; + border-radius: 0; +} +.form-group.is-focused select.form-control { + box-shadow: none; + border-color: #D2D2D2; +} +select.form-control[multiple], .form-group.is-focused select.form-control[multiple] { + height: 85px; +} + +.input-group-btn .btn { + margin: 0 0 7px 0; +} + +.form-group.form-group-sm .input-group-btn .btn { + margin: 0 0 3px 0; +} +.form-group.form-group-lg .input-group-btn .btn { + margin: 0 0 9px 0; +} + +.input-group .input-group-btn { + padding: 0 12px; +} +.input-group .input-group-addon { + border: 0; + background: transparent; + padding: 6px 15px 0px; +} + +.form-group input[type=file] { + opacity: 0; + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 100; +} + +.form-control-feedback { + opacity: 0; +} +.has-success .form-control-feedback { + color: #4caf50; + opacity: 1; +} +.has-error .form-control-feedback { + color: #ed7063; + opacity: 1; +} + +.form-horizontal .radio, +.form-horizontal .checkbox, +.form-horizontal .radio-inline, +.form-horizontal .checkbox-inline { + padding-top: 0; +} +.form-horizontal .radio { + margin-bottom: 10px; +} +.form-horizontal label { + text-align: right; +} +.form-horizontal label.control-label { + margin: 0; +} + +.form-newsletter .input-group, +.form-newsletter .form-group { + float: left; + width: 78%; + margin-right: 2%; + margin-top: 9px; +} +.form-newsletter .btn { + float: left; + width: 20%; + margin: 9px 0 0; +} + +.alert { + border: 0; + border-radius: 0; + position: relative; + padding: 20px 15px; + line-height: 20px; +} +.alert b { + font-weight: 500; + text-transform: uppercase; + font-size: 12px; +} +.alert, .alert.alert-default { + background-color: white; + color: #555555; + border-radius: 3px; + box-shadow: 0 12px 20px -10px rgba(255, 255, 255, 0.28), 0 4px 20px 0px rgba(0, 0, 0, 0.12), 0 7px 8px -5px rgba(255, 255, 255, 0.2); +} +.alert a, .alert .alert-link, .alert.alert-default a, .alert.alert-default .alert-link { + color: #555555; +} +.alert.alert-inverse { + background-color: #2e2e2e; + color: #fff; + border-radius: 3px; + box-shadow: 0 12px 20px -10px rgba(33, 33, 33, 0.28), 0 4px 20px 0px rgba(0, 0, 0, 0.12), 0 7px 8px -5px rgba(33, 33, 33, 0.2); +} +.alert.alert-inverse a, .alert.alert-inverse .alert-link { + color: #fff; +} +.alert.alert-primary { + background-color: #af2cc5; + color: #ffffff; + border-radius: 3px; + box-shadow: 0 12px 20px -10px rgba(156, 39, 176, 0.28), 0 4px 20px 0px rgba(0, 0, 0, 0.12), 0 7px 8px -5px rgba(156, 39, 176, 0.2); +} +.alert.alert-primary a, .alert.alert-primary .alert-link { + color: #ffffff; +} +.alert.alert-success { + background-color: #5cb860; + color: #ffffff; + border-radius: 3px; + box-shadow: 0 12px 20px -10px rgba(76, 175, 80, 0.28), 0 4px 20px 0px rgba(0, 0, 0, 0.12), 0 7px 8px -5px rgba(76, 175, 80, 0.2); +} +.alert.alert-success a, .alert.alert-success .alert-link { + color: #ffffff; +} +.alert.alert-info { + background-color: #00d3ee; + color: #ffffff; + border-radius: 3px; + box-shadow: 0 12px 20px -10px rgba(0, 188, 212, 0.28), 0 4px 20px 0px rgba(0, 0, 0, 0.12), 0 7px 8px -5px rgba(0, 188, 212, 0.2); +} +.alert.alert-info a, .alert.alert-info .alert-link { + color: #ffffff; +} +.alert.alert-warning { + background-color: #ffa21a; + color: #ffffff; + border-radius: 3px; + box-shadow: 0 12px 20px -10px rgba(255, 152, 0, 0.28), 0 4px 20px 0px rgba(0, 0, 0, 0.12), 0 7px 8px -5px rgba(255, 152, 0, 0.2); +} +.alert.alert-warning a, .alert.alert-warning .alert-link { + color: #ffffff; +} +.alert.alert-danger { + background-color: #f55a4e; + color: #ffffff; + border-radius: 3px; + box-shadow: 0 12px 20px -10px rgba(244, 67, 54, 0.28), 0 4px 20px 0px rgba(0, 0, 0, 0.12), 0 7px 8px -5px rgba(244, 67, 54, 0.2); +} +.alert.alert-danger a, .alert.alert-danger .alert-link { + color: #ffffff; +} +.alert.alert-rose { + background-color: #eb3573; + color: #ffffff; + border-radius: 3px; + box-shadow: 0 12px 20px -10px rgba(233, 30, 99, 0.28), 0 4px 20px 0px rgba(0, 0, 0, 0.12), 0 7px 8px -5px rgba(233, 30, 99, 0.2); +} +.alert.alert-rose a, .alert.alert-rose .alert-link { + color: #ffffff; +} +.alert-info, .alert-danger, .alert-warning, .alert-success { + color: #ffffff; +} +.alert-default a, .alert-default .alert-link { + color: rgba(0,0,0, 0.87); +} +.alert i[data-notify="icon"] { + font-size: 30px; + display: block; + left: 15px; + position: absolute; + top: 50%; + margin-top: -15px; +} +.alert span { + display: block; + max-width: 89%; +} +.alert .alert-icon { + display: block; + float: left; + margin-right: 15px; +} +.alert .alert-icon i { + margin-top: -7px; + top: 5px; + position: relative; +} + +.alert.alert-with-icon { + padding-left: 65px; +} + +.table > thead > tr > th { + border-bottom-width: 1px; + font-size: 1em; + font-weight: 500; + padding-bottom: 20px!important; +} +.table .radio, +.table .checkbox { + margin-top: 0; + margin-bottom: 0; + margin-left: 10px; + padding: 0; + width: 15px; +} +.table .radio .icons, +.table .checkbox .icons { + position: relative; +} +.table > thead > tr > th, +.table > tbody > tr > th, +.table > tfoot > tr > th, +.table > thead > tr > td, +.table > tbody > tr > td, +.table > tfoot > tr > td { + padding: 12px 8px; + vertical-align: middle; +} +.table > thead > tr > th { + padding-bottom: 4px; +} +.table .td-actions { + display: flex; +} +.table .td-actions .btn { + margin: 0px; + padding: 5px; +} +.table > tbody > tr { + position: relative; +} + +.checkbox label { + cursor: pointer; + padding-left: 0; + color: rgba(0,0,0, 0.26); +} +.form-group.is-focused .checkbox label { + color: rgba(0,0,0, 0.26); +} +.form-group.is-focused .checkbox label:hover, .form-group.is-focused .checkbox label:focus { + color: rgba(0,0,0, .54); +} +fieldset[disabled] .form-group.is-focused .checkbox label { + color: rgba(0,0,0, 0.26); +} +.checkbox input[type=checkbox] { + opacity: 0; + position: absolute; + margin: 0; + z-index: -1; + width: 0; + height: 0; + overflow: hidden; + left: 0; + pointer-events: none; +} +.checkbox .checkbox-material { + vertical-align: middle; + position: relative; + top: 3px; + padding-right: 5px; +} +.checkbox .checkbox-material:before { + display: block; + position: absolute; + left: 0; + content: ""; + background-color: rgba(0, 0, 0, 0.84); + height: 20px; + width: 20px; + border-radius: 100%; + z-index: 1; + opacity: 0; + margin: 0; + transform: scale3d(2.3, 2.3, 1); +} +.checkbox .checkbox-material .check { + position: relative; + display: inline-block; + width: 20px; + height: 20px; + border: 1px solid rgba(0,0,0, .54); + overflow: hidden; + z-index: 1; + border-radius: 3px; +} +.checkbox .checkbox-material .check:before { + position: absolute; + content: ""; + transform: rotate(45deg); + display: block; + margin-top: -3px; + margin-left: 7px; + width: 0; + height: 0; + background: red; + box-shadow: 0 0 0 0, 0 0 0 0, 0 0 0 0, 0 0 0 0, 0 0 0 0, 0 0 0 0, 0 0 0 0 inset; + animation: checkbox-off 0.3s forwards; +} +.checkbox input[type=checkbox]:focus + .checkbox-material .check:after { + opacity: 0.2; +} +.checkbox input[type=checkbox]:checked + .checkbox-material .check { + background: #9c27b0; +} +.checkbox input[type=checkbox]:checked + .checkbox-material .check:before { + color: #FFFFFF; + box-shadow: 0 0 0 10px, 10px -10px 0 10px, 32px 0 0 20px, 0px 32px 0 20px, -5px 5px 0 10px, 20px -12px 0 11px; + animation: checkbox-on 0.3s forwards; +} +.checkbox input[type=checkbox]:checked + .checkbox-material:before { + animation: rippleOn 500ms; +} +.checkbox input[type=checkbox]:checked + .checkbox-material .check:after { + animation: rippleOn 500ms forwards; +} +.checkbox input[type=checkbox]:not(:checked) + .checkbox-material:before { + animation: rippleOff 500ms; +} +.checkbox input[type=checkbox]:not(:checked) + .checkbox-material .check:after { + animation: rippleOff 500ms; +} +fieldset[disabled] .checkbox, fieldset[disabled] .checkbox input[type=checkbox], +.checkbox input[type=checkbox][disabled] ~ .checkbox-material .check, +.checkbox input[type=checkbox][disabled] + .circle { + opacity: 0.5; +} +.checkbox input[type=checkbox][disabled] ~ .checkbox-material .check { + border-color: #000000; + opacity: .26; +} +.checkbox input[type=checkbox][disabled] + .checkbox-material .check:after { + background-color: rgba(0,0,0, 0.87); + transform: rotate(-45deg); +} + +@keyframes checkbox-on { + 0% { + box-shadow: 0 0 0 10px, 10px -10px 0 10px, 32px 0 0 20px, 0px 32px 0 20px, -5px 5px 0 10px, 15px 2px 0 11px; + } + 50% { + box-shadow: 0 0 0 10px, 10px -10px 0 10px, 32px 0 0 20px, 0px 32px 0 20px, -5px 5px 0 10px, 20px 2px 0 11px; + } + 100% { + box-shadow: 0 0 0 10px, 10px -10px 0 10px, 32px 0 0 20px, 0px 32px 0 20px, -5px 5px 0 10px, 20px -12px 0 11px; + } +} +@keyframes rippleOn { + 0% { + opacity: 0; + } + 50% { + opacity: 0.2; + } + 100% { + opacity: 0; + } +} +@keyframes rippleOff { + 0% { + opacity: 0; + } + 50% { + opacity: 0.2; + } + 100% { + opacity: 0; + } +} +.radio label { + cursor: pointer; + padding-left: 35px; + position: relative; + color: rgba(0,0,0, 0.26); +} +.form-group.is-focused .radio label { + color: rgba(0,0,0, 0.26); +} +.form-group.is-focused .radio label:hover, .form-group.is-focused .radio label:focus { + color: rgba(0,0,0, .54); +} +fieldset[disabled] .form-group.is-focused .radio label { + color: rgba(0,0,0, 0.26); +} +.radio label span { + display: block; + position: absolute; + left: 10px; + top: 2px; + transition-duration: 0.2s; +} +.radio label .circle { + border: 1px solid rgba(0,0,0, .54); + height: 15px; + width: 15px; + border-radius: 100%; +} +.radio label .check { + height: 15px; + width: 15px; + border-radius: 100%; + background-color: #9c27b0; + transform: scale3d(0, 0, 0); +} +.radio label .check:after { + display: block; + position: absolute; + content: ""; + background-color: rgba(0,0,0, 0.87); + left: -18px; + top: -18px; + height: 50px; + width: 50px; + border-radius: 100%; + z-index: 1; + opacity: 0; + margin: 0; + transform: scale3d(1.5, 1.5, 1); +} +.radio label input[type=radio]:not(:checked) ~ .check:after { + animation: rippleOff 500ms; +} +.radio label input[type=radio]:checked ~ .check:after { + animation: rippleOn 500ms; +} +.radio input[type=radio] { + opacity: 0; + height: 0; + width: 0; + overflow: hidden; +} +.radio input[type=radio]:checked ~ .check, .radio input[type=radio]:checked ~ .circle { + opacity: 1; +} +.radio input[type=radio]:checked ~ .check { + background-color: #9c27b0; +} +.radio input[type=radio]:checked ~ .circle { + border-color: #9c27b0; +} +.radio input[type=radio]:checked ~ .check { + transform: scale3d(0.65, 0.65, 1); +} +.radio input[type=radio][disabled] ~ .check, .radio input[type=radio][disabled] ~ .circle { + opacity: 0.26; +} +.radio input[type=radio][disabled] ~ .check { + background-color: #000000; +} +.radio input[type=radio][disabled] ~ .circle { + border-color: #000000; +} + +@keyframes rippleOn { + 0% { + opacity: 0; + } + 50% { + opacity: 0.2; + } + 100% { + opacity: 0; + } +} +@keyframes rippleOff { + 0% { + opacity: 0; + } + 50% { + opacity: 0.2; + } + 100% { + opacity: 0; + } +} +.togglebutton { + vertical-align: middle; +} +.togglebutton, .togglebutton label, .togglebutton input, .togglebutton .toggle { + user-select: none; +} +.togglebutton label { + cursor: pointer; + color: rgba(0,0,0, 0.26); +} +.form-group.is-focused .togglebutton label { + color: rgba(0,0,0, 0.26); +} +.form-group.is-focused .togglebutton label:hover, .form-group.is-focused .togglebutton label:focus { + color: rgba(0,0,0, .54); +} +fieldset[disabled] .form-group.is-focused .togglebutton label { + color: rgba(0,0,0, 0.26); +} +.togglebutton label input[type=checkbox] { + opacity: 0; + width: 0; + height: 0; +} +.togglebutton label .toggle { + text-align: left; + margin-left: 5px; +} +.togglebutton label .toggle, +.togglebutton label input[type=checkbox][disabled] + .toggle { + content: ""; + display: inline-block; + width: 30px; + height: 15px; + background-color: rgba(80, 80, 80, 0.7); + border-radius: 15px; + margin-right: 15px; + transition: background 0.3s ease; + vertical-align: middle; +} +.togglebutton label .toggle:after { + content: ""; + display: inline-block; + width: 20px; + height: 20px; + background-color: #FFFFFF; + border-radius: 20px; + position: relative; + box-shadow: 0 1px 3px 1px rgba(0, 0, 0, 0.4); + left: -5px; + top: -3px; + border: 1px solid rgba(0,0,0, .54); + transition: left 0.3s ease, background 0.3s ease, box-shadow 0.1s ease; +} +.togglebutton label input[type=checkbox][disabled] + .toggle:after, .togglebutton label input[type=checkbox][disabled]:checked + .toggle:after { + background-color: #BDBDBD; +} +.togglebutton label input[type=checkbox] + .toggle:active:after, .togglebutton label input[type=checkbox][disabled] + .toggle:active:after { + box-shadow: 0 1px 3px 1px rgba(0, 0, 0, 0.4), 0 0 0 15px rgba(0, 0, 0, 0.1); +} +.togglebutton label input[type=checkbox]:checked + .toggle:after { + left: 15px; +} +.togglebutton label input[type=checkbox]:checked + .toggle { + background-color: rgba(156, 39, 176, 0.7); +} +.togglebutton label input[type=checkbox]:checked + .toggle:after { + border-color: #9c27b0; +} +.togglebutton label input[type=checkbox]:checked + .toggle:active:after { + box-shadow: 0 1px 3px 1px rgba(0, 0, 0, 0.4), 0 0 0 15px rgba(156, 39, 176, 0.1); +} + +.withripple { + position: relative; +} + +.ripple-container { + position: absolute; + top: 0; + left: 0; + z-index: 1; + width: 100%; + height: 100%; + overflow: hidden; + border-radius: inherit; + pointer-events: none; +} +.disabled .ripple-container { + display: none; +} + +.ripple { + position: absolute; + width: 20px; + height: 20px; + margin-left: -10px; + margin-top: -10px; + border-radius: 100%; + background-color: #000; + background-color: rgba(0, 0, 0, 0.05); + transform: scale(1); + transform-origin: 50%; + opacity: 0; + pointer-events: none; +} + +.ripple.ripple-on { + transition: opacity 0.15s ease-in 0s, transform 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.1s; + opacity: 0.1; +} + +.ripple.ripple-out { + transition: opacity 0.1s linear 0s !important; + opacity: 0; +} + +.section-dark .nav-pills > li > a, .section-image .nav-pills > li > a { + color: #999999; +} +.section-dark .nav-pills > li > a:hover, +.section-dark .nav-pills > li > a:focus, .section-image .nav-pills > li > a:hover, +.section-image .nav-pills > li > a:focus { + background-color: #EEEEEE; +} +.nav-pills > li > a { + line-height: 24px; + text-transform: uppercase; + font-size: 12px; + font-weight: 500; + min-width: 100px; + text-align: center; + color: #555555; + transition: all .3s; +} +.nav-pills > li > a:hover { + background-color: rgba(200, 200, 200, 0.2); +} +.nav-pills > li i { + display: block; + font-size: 30px; + padding: 15px 0; +} +.nav-pills > li.active > a, .nav-pills > li.active > a:focus, .nav-pills > li.active > a:hover { + background-color: #ed7063; + color: #FFFFFF; + box-shadow: 0 12px 20px -10px rgba(156, 39, 176, 0.28), 0 4px 20px 0px rgba(0, 0, 0, 0.12), 0 7px 8px -5px rgba(156, 39, 176, 0.2); +} +.nav-pills:not(.nav-pills-icons) > li > a { + border-radius: 30px; +} +.nav-pills.nav-stacked > li + li { + margin-top: 5px; +} +.nav-pills.nav-pills-info > li.active > a, .nav-pills.nav-pills-info > li.active > a:focus, .nav-pills.nav-pills-info > li.active > a:hover { + background-color: #00bcd4; + box-shadow: 0 12px 20px -10px rgba(0, 188, 212, 0.28), 0 4px 20px 0px rgba(0, 0, 0, 0.12), 0 7px 8px -5px rgba(0, 188, 212, 0.2); +} +.nav-pills.nav-pills-success > li.active > a, .nav-pills.nav-pills-success > li.active > a:focus, .nav-pills.nav-pills-success > li.active > a:hover { + background-color: #4caf50; + box-shadow: 0 12px 20px -10px rgba(76, 175, 80, 0.28), 0 4px 20px 0px rgba(0, 0, 0, 0.12), 0 7px 8px -5px rgba(76, 175, 80, 0.2); +} +.nav-pills.nav-pills-warning > li.active > a, .nav-pills.nav-pills-warning > li.active > a:focus, .nav-pills.nav-pills-warning > li.active > a:hover { + background-color: #ff9800; + box-shadow: 0 12px 20px -10px rgba(255, 152, 0, 0.28), 0 4px 20px 0px rgba(0, 0, 0, 0.12), 0 7px 8px -5px rgba(255, 152, 0, 0.2); +} +.nav-pills.nav-pills-danger > li.active > a, .nav-pills.nav-pills-danger > li.active > a:focus, .nav-pills.nav-pills-danger > li.active > a:hover { + background-color: #ed7063; + box-shadow: 0 12px 20px -10px rgba(255, 152, 0, 0.28), 0 4px 20px 0px rgba(0, 0, 0, 0.12), 0 7px 8px -5px rgba(255, 152, 0, 0.2); +} + +.tab-space { + padding: 20px 0 50px 0px; +} + +.modal-content { + box-shadow: 0 27px 24px 0 rgba(0, 0, 0, 0.2), 0 40px 77px 0 rgba(0, 0, 0, 0.22); + border-radius: 6px; + border: none; +} +.modal-content .modal-header { + border-bottom: none; + padding-top: 24px; + padding-right: 24px; + padding-bottom: 0; + padding-left: 24px; +} +.modal-content .modal-body { + padding-top: 24px; + padding-right: 24px; + padding-bottom: 16px; + padding-left: 24px; +} +.modal-content .modal-footer { + border-top: none; + padding: 7px; +} +.modal-content .modal-footer.text-center { + text-align: center; +} +.modal-content .modal-footer button { + margin: 0; + padding-left: 16px; + padding-right: 16px; + width: auto; +} +.modal-content .modal-footer button.pull-left { + padding-left: 5px; + padding-right: 5px; + position: relative; + left: -5px; +} +.modal-content .modal-footer button + button { + margin-bottom: 16px; +} +.modal-content .modal-body + .modal-footer { + padding-top: 0; +} + +.modal-backdrop { + background: rgba(0, 0, 0, 0.3); +} + +.modal .modal-dialog { + margin-top: 100px; +} +.modal .modal-header .close { + color: #999999; +} +.modal .modal-header .close:hover, .modal .modal-header .close:focus { + opacity: 1; +} +.modal .modal-header .close i { + font-size: 16px; +} + +.modal-notice .instruction { + margin-bottom: 25px; +} +.modal-notice .picture { + max-width: 150px; +} +.modal-notice .modal-content .btn-raised { + margin-bottom: 15px; +} + +.modal-small { + width: 300px; +} +.modal-small .modal-body { + margin-top: 20px; +} + +.navbar { + border: 0; + border-radius: 3px; + border-bottom: 1px solid #ededf3; + padding: 10px 0; +} +.navbar .navbar-brand { + position: relative; + height: 50px; + line-height: 30px; + color: inherit; + padding: 10px 15px; +} +.navbar .navbar-brand:hover, .navbar .navbar-brand:focus { + color: inherit; + background-color: transparent; +} +.navbar .notification { + position: absolute; + top: 5px; + border: 1px solid #FFF; + right: 10px; + font-size: 9px; + background: #ed7063; + color: #FFFFFF; + min-width: 20px; + padding: 0px 5px; + height: 20px; + border-radius: 10px; + text-align: center; + line-height: 19px; + vertical-align: middle; + display: block; +} +.navbar .navbar-text { + color: inherit; + margin-top: 15px; + margin-bottom: 15px; +} +.navbar .navbar-nav > li > a { + color: inherit; + padding-top: 15px; + padding-bottom: 15px; + font-weight: 400; + font-size: 12px; + text-transform: uppercase; + border-radius: 3px; +} +.navbar .navbar-nav > li > a:hover, .navbar .navbar-nav > li > a:focus { + color: inherit; + background-color: transparent; +} +.navbar .navbar-nav > li > a .material-icons, +.navbar .navbar-nav > li > a .fa { + font-size: 20px; +} +.navbar .navbar-nav > li > a.btn:not(.btn-just-icon) .fa { + position: relative; + top: 2px; + margin-top: -4px; + margin-right: 4px; +} +.navbar .navbar-nav > li > .dropdown-menu { + margin-top: -20px; +} +.navbar .navbar-nav > li.open > .dropdown-menu { + margin-top: 0; +} +.navbar .navbar-nav > .active > a, .navbar .navbar-nav > .active > a:hover, .navbar .navbar-nav > .active > a:focus { + color: inherit; + background-color: rgba(255, 255, 255, 0.1); +} +.navbar .navbar-nav > .disabled > a, .navbar .navbar-nav > .disabled > a:hover, .navbar .navbar-nav > .disabled > a:focus { + color: inherit; + background-color: transparent; + opacity: 0.9; +} +.navbar .navbar-nav .profile-photo { + padding: 0 5px 0; +} +.navbar .navbar-nav .profile-photo .profile-photo-small { + height: 40px; + width: 40px; +} +.navbar .navbar-toggle { + border: 0; +} +.navbar .navbar-toggle:hover, .navbar .navbar-toggle:focus { + background-color: transparent; +} +.navbar .navbar-toggle .icon-bar { + background-color: inherit; + border: 1px solid; +} +.navbar .navbar-default .navbar-toggle, +.navbar .navbar-inverse .navbar-toggle { + border-color: transparent; +} +.navbar .navbar-collapse, +.navbar .navbar-form { + border-top: none; + box-shadow: none; +} +.navbar .navbar-nav > .open > a, .navbar .navbar-nav > .open > a:hover, .navbar .navbar-nav > .open > a:focus { + background-color: transparent; + color: inherit; +} +@media (max-width: 767px) { + .navbar .navbar-nav .navbar-text { + color: inherit; + margin-top: 15px; + margin-bottom: 15px; + } + .navbar .navbar-nav .open .dropdown-menu > .dropdown-header { + border: 0; + color: inherit; + } + .navbar .navbar-nav .open .dropdown-menu .divider { + border-bottom: 1px solid; + opacity: 0.08; + } + .navbar .navbar-nav .open .dropdown-menu > li > a { + color: inherit; + } + .navbar .navbar-nav .open .dropdown-menu > li > a:hover, .navbar .navbar-nav .open .dropdown-menu > li > a:focus { + color: inherit; + background-color: transparent; + } + .navbar .navbar-nav .open .dropdown-menu > .active > a, .navbar .navbar-nav .open .dropdown-menu > .active > a:hover, .navbar .navbar-nav .open .dropdown-menu > .active > a:focus { + color: inherit; + background-color: transparent; + } + .navbar .navbar-nav .open .dropdown-menu > .disabled > a, .navbar .navbar-nav .open .dropdown-menu > .disabled > a:hover, .navbar .navbar-nav .open .dropdown-menu > .disabled > a:focus { + color: inherit; + background-color: transparent; + } +} +.navbar.navbar-default .logo-container .brand { + color: #555555; +} +.navbar .navbar-link { + color: inherit; +} +.navbar .navbar-link:hover { + color: inherit; +} +.navbar .btn { + margin-top: 0; + margin-bottom: 0; +} +.navbar .btn-link { + color: inherit; +} +.navbar .btn-link:hover, .navbar .btn-link:focus { + color: inherit; +} +.navbar .btn-link[disabled]:hover, .navbar .btn-link[disabled]:focus, fieldset[disabled] .navbar .btn-link:hover, fieldset[disabled] .navbar .btn-link:focus { + color: inherit; +} +.navbar .navbar-form { + margin: 4px 0 0; +} +.navbar .navbar-form .form-group { + margin: 0; + padding: 0; +} +.navbar .navbar-form .form-group .material-input:before, .navbar .navbar-form .form-group.is-focused .material-input:after { + background-color: inherit; +} +.navbar .navbar-form .form-group .form-control, +.navbar .navbar-form .form-control { + border-color: inherit; + color: inherit; + padding: 0; + margin: 0; + height: 28px; + font-size: 14px; + line-height: 1.42857; +} +.navbar, .navbar.navbar-default { + background-color: #FFFFFF; + color: #555555; +} +.navbar .navbar-form .form-group input.form-control::-moz-placeholder, +.navbar .navbar-form input.form-control::-moz-placeholder, .navbar.navbar-default .navbar-form .form-group input.form-control::-moz-placeholder, +.navbar.navbar-default .navbar-form input.form-control::-moz-placeholder { + color: #555555; +} +.navbar .navbar-form .form-group input.form-control:-ms-input-placeholder, +.navbar .navbar-form input.form-control:-ms-input-placeholder, .navbar.navbar-default .navbar-form .form-group input.form-control:-ms-input-placeholder, +.navbar.navbar-default .navbar-form input.form-control:-ms-input-placeholder { + color: #555555; +} +.navbar .navbar-form .form-group input.form-control::-webkit-input-placeholder, +.navbar .navbar-form input.form-control::-webkit-input-placeholder, .navbar.navbar-default .navbar-form .form-group input.form-control::-webkit-input-placeholder, +.navbar.navbar-default .navbar-form input.form-control::-webkit-input-placeholder { + color: #555555; +} +.navbar .dropdown-menu, .navbar.navbar-default .dropdown-menu { + border-radius: 3px !important; +} +.navbar .dropdown-menu li > a:hover, .navbar .dropdown-menu li > a:focus, .navbar.navbar-default .dropdown-menu li > a:hover, .navbar.navbar-default .dropdown-menu li > a:focus { + color: #FFFFFF; + background-color: #FFFFFF; + box-shadow: 0 12px 20px -10px rgba(255, 255, 255, 0.28), 0 4px 20px 0px rgba(0, 0, 0, 0.12), 0 7px 8px -5px rgba(255, 255, 255, 0.2); +} +.navbar .dropdown-menu .active > a, .navbar.navbar-default .dropdown-menu .active > a { + background-color: #FFFFFF; + color: #555555; + box-shadow: 0 12px 20px -10px rgba(255, 255, 255, 0.28), 0 4px 20px 0px rgba(0, 0, 0, 0.12), 0 7px 8px -5px rgba(255, 255, 255, 0.2); +} +.navbar .dropdown-menu .active > a:hover, .navbar .dropdown-menu .active > a:focus, .navbar.navbar-default .dropdown-menu .active > a:hover, .navbar.navbar-default .dropdown-menu .active > a:focus { + color: #555555; +} +.navbar.navbar-inverse { + background-color: #212121; + color: #fff; +} +.navbar.navbar-inverse .navbar-form .form-group input.form-control::-moz-placeholder, +.navbar.navbar-inverse .navbar-form input.form-control::-moz-placeholder { + color: #fff; +} +.navbar.navbar-inverse .navbar-form .form-group input.form-control:-ms-input-placeholder, +.navbar.navbar-inverse .navbar-form input.form-control:-ms-input-placeholder { + color: #fff; +} +.navbar.navbar-inverse .navbar-form .form-group input.form-control::-webkit-input-placeholder, +.navbar.navbar-inverse .navbar-form input.form-control::-webkit-input-placeholder { + color: #fff; +} +.navbar.navbar-inverse .dropdown-menu { + border-radius: 3px !important; +} +.navbar.navbar-inverse .dropdown-menu li > a:hover, .navbar.navbar-inverse .dropdown-menu li > a:focus { + color: #FFFFFF; + background-color: #212121; + box-shadow: 0 12px 20px -10px rgba(33, 33, 33, 0.28), 0 4px 20px 0px rgba(0, 0, 0, 0.12), 0 7px 8px -5px rgba(33, 33, 33, 0.2); +} +.navbar.navbar-inverse .dropdown-menu .active > a { + background-color: #212121; + color: #fff; + box-shadow: 0 12px 20px -10px rgba(33, 33, 33, 0.28), 0 4px 20px 0px rgba(0, 0, 0, 0.12), 0 7px 8px -5px rgba(33, 33, 33, 0.2); +} +.navbar.navbar-inverse .dropdown-menu .active > a:hover, .navbar.navbar-inverse .dropdown-menu .active > a:focus { + color: #fff; +} +.navbar.navbar-primary { + background-color: #9c27b0; + color: #ffffff; +} +.navbar.navbar-primary .navbar-form .form-group input.form-control::-moz-placeholder, +.navbar.navbar-primary .navbar-form input.form-control::-moz-placeholder { + color: #ffffff; +} +.navbar.navbar-primary .navbar-form .form-group input.form-control:-ms-input-placeholder, +.navbar.navbar-primary .navbar-form input.form-control:-ms-input-placeholder { + color: #ffffff; +} +.navbar.navbar-primary .navbar-form .form-group input.form-control::-webkit-input-placeholder, +.navbar.navbar-primary .navbar-form input.form-control::-webkit-input-placeholder { + color: #ffffff; +} +.navbar.navbar-primary .dropdown-menu { + border-radius: 3px !important; +} +.navbar.navbar-primary .dropdown-menu li > a:hover, .navbar.navbar-primary .dropdown-menu li > a:focus { + color: #FFFFFF; + background-color: #9c27b0; + box-shadow: 0 12px 20px -10px rgba(156, 39, 176, 0.28), 0 4px 20px 0px rgba(0, 0, 0, 0.12), 0 7px 8px -5px rgba(156, 39, 176, 0.2); +} +.navbar.navbar-primary .dropdown-menu .active > a { + background-color: #9c27b0; + color: #ffffff; + box-shadow: 0 12px 20px -10px rgba(156, 39, 176, 0.28), 0 4px 20px 0px rgba(0, 0, 0, 0.12), 0 7px 8px -5px rgba(156, 39, 176, 0.2); +} +.navbar.navbar-primary .dropdown-menu .active > a:hover, .navbar.navbar-primary .dropdown-menu .active > a:focus { + color: #ffffff; +} +.navbar.navbar-success { + background-color: #4caf50; + color: #ffffff; +} +.navbar.navbar-success .navbar-form .form-group input.form-control::-moz-placeholder, +.navbar.navbar-success .navbar-form input.form-control::-moz-placeholder { + color: #ffffff; +} +.navbar.navbar-success .navbar-form .form-group input.form-control:-ms-input-placeholder, +.navbar.navbar-success .navbar-form input.form-control:-ms-input-placeholder { + color: #ffffff; +} +.navbar.navbar-success .navbar-form .form-group input.form-control::-webkit-input-placeholder, +.navbar.navbar-success .navbar-form input.form-control::-webkit-input-placeholder { + color: #ffffff; +} +.navbar.navbar-success .dropdown-menu { + border-radius: 3px !important; +} +.navbar.navbar-success .dropdown-menu li > a:hover, .navbar.navbar-success .dropdown-menu li > a:focus { + color: #FFFFFF; + background-color: #4caf50; + box-shadow: 0 12px 20px -10px rgba(76, 175, 80, 0.28), 0 4px 20px 0px rgba(0, 0, 0, 0.12), 0 7px 8px -5px rgba(76, 175, 80, 0.2); +} +.navbar.navbar-success .dropdown-menu .active > a { + background-color: #4caf50; + color: #ffffff; + box-shadow: 0 12px 20px -10px rgba(76, 175, 80, 0.28), 0 4px 20px 0px rgba(0, 0, 0, 0.12), 0 7px 8px -5px rgba(76, 175, 80, 0.2); +} +.navbar.navbar-success .dropdown-menu .active > a:hover, .navbar.navbar-success .dropdown-menu .active > a:focus { + color: #ffffff; +} +.navbar.navbar-info { + background-color: #00bcd4; + color: #ffffff; +} +.navbar.navbar-info .navbar-form .form-group input.form-control::-moz-placeholder, +.navbar.navbar-info .navbar-form input.form-control::-moz-placeholder { + color: #ffffff; +} +.navbar.navbar-info .navbar-form .form-group input.form-control:-ms-input-placeholder, +.navbar.navbar-info .navbar-form input.form-control:-ms-input-placeholder { + color: #ffffff; +} +.navbar.navbar-info .navbar-form .form-group input.form-control::-webkit-input-placeholder, +.navbar.navbar-info .navbar-form input.form-control::-webkit-input-placeholder { + color: #ffffff; +} +.navbar.navbar-info .dropdown-menu { + border-radius: 3px !important; +} +.navbar.navbar-info .dropdown-menu li > a:hover, .navbar.navbar-info .dropdown-menu li > a:focus { + color: #FFFFFF; + background-color: #00bcd4; + box-shadow: 0 12px 20px -10px rgba(0, 188, 212, 0.28), 0 4px 20px 0px rgba(0, 0, 0, 0.12), 0 7px 8px -5px rgba(0, 188, 212, 0.2); +} +.navbar.navbar-info .dropdown-menu .active > a { + background-color: #00bcd4; + color: #ffffff; + box-shadow: 0 12px 20px -10px rgba(0, 188, 212, 0.28), 0 4px 20px 0px rgba(0, 0, 0, 0.12), 0 7px 8px -5px rgba(0, 188, 212, 0.2); +} +.navbar.navbar-info .dropdown-menu .active > a:hover, .navbar.navbar-info .dropdown-menu .active > a:focus { + color: #ffffff; +} +.navbar.navbar-warning { + background-color: #ff9800; + color: #ffffff; +} +.navbar.navbar-warning .navbar-form .form-group input.form-control::-moz-placeholder, +.navbar.navbar-warning .navbar-form input.form-control::-moz-placeholder { + color: #ffffff; +} +.navbar.navbar-warning .navbar-form .form-group input.form-control:-ms-input-placeholder, +.navbar.navbar-warning .navbar-form input.form-control:-ms-input-placeholder { + color: #ffffff; +} +.navbar.navbar-warning .navbar-form .form-group input.form-control::-webkit-input-placeholder, +.navbar.navbar-warning .navbar-form input.form-control::-webkit-input-placeholder { + color: #ffffff; +} +.navbar.navbar-warning .dropdown-menu { + border-radius: 3px !important; +} +.navbar.navbar-warning .dropdown-menu li > a:hover, .navbar.navbar-warning .dropdown-menu li > a:focus { + color: #FFFFFF; + background-color: #ff9800; + box-shadow: 0 12px 20px -10px rgba(255, 152, 0, 0.28), 0 4px 20px 0px rgba(0, 0, 0, 0.12), 0 7px 8px -5px rgba(255, 152, 0, 0.2); +} +.navbar.navbar-warning .dropdown-menu .active > a { + background-color: #ff9800; + color: #ffffff; + box-shadow: 0 12px 20px -10px rgba(255, 152, 0, 0.28), 0 4px 20px 0px rgba(0, 0, 0, 0.12), 0 7px 8px -5px rgba(255, 152, 0, 0.2); +} +.navbar.navbar-warning .dropdown-menu .active > a:hover, .navbar.navbar-warning .dropdown-menu .active > a:focus { + color: #ffffff; +} +.navbar.navbar-danger { + background-color: #ed7063; + color: #ffffff; +} +.navbar.navbar-danger .navbar-form .form-group input.form-control::-moz-placeholder, +.navbar.navbar-danger .navbar-form input.form-control::-moz-placeholder { + color: #ffffff; +} +.navbar.navbar-danger .navbar-form .form-group input.form-control:-ms-input-placeholder, +.navbar.navbar-danger .navbar-form input.form-control:-ms-input-placeholder { + color: #ffffff; +} +.navbar.navbar-danger .navbar-form .form-group input.form-control::-webkit-input-placeholder, +.navbar.navbar-danger .navbar-form input.form-control::-webkit-input-placeholder { + color: #ffffff; +} +.navbar.navbar-danger .dropdown-menu { + border-radius: 3px !important; +} +.navbar.navbar-danger .dropdown-menu li > a:hover, .navbar.navbar-danger .dropdown-menu li > a:focus { + color: #FFFFFF; + background-color: #ed7063; + box-shadow: 0 12px 20px -10px rgba(244, 67, 54, 0.28), 0 4px 20px 0px rgba(0, 0, 0, 0.12), 0 7px 8px -5px rgba(244, 67, 54, 0.2); +} +.navbar.navbar-danger .dropdown-menu .active > a { + background-color: #ed7063; + color: #ffffff; + box-shadow: 0 12px 20px -10px rgba(244, 67, 54, 0.28), 0 4px 20px 0px rgba(0, 0, 0, 0.12), 0 7px 8px -5px rgba(244, 67, 54, 0.2); +} +.navbar.navbar-danger .dropdown-menu .active > a:hover, .navbar.navbar-danger .dropdown-menu .active > a:focus { + color: #ffffff; +} +.navbar.navbar-rose { + background-color: #e91e63; + color: #ffffff; +} +.navbar.navbar-rose .navbar-form .form-group input.form-control::-moz-placeholder, +.navbar.navbar-rose .navbar-form input.form-control::-moz-placeholder { + color: #ffffff; +} +.navbar.navbar-rose .navbar-form .form-group input.form-control:-ms-input-placeholder, +.navbar.navbar-rose .navbar-form input.form-control:-ms-input-placeholder { + color: #ffffff; +} +.navbar.navbar-rose .navbar-form .form-group input.form-control::-webkit-input-placeholder, +.navbar.navbar-rose .navbar-form input.form-control::-webkit-input-placeholder { + color: #ffffff; +} +.navbar.navbar-rose .dropdown-menu { + border-radius: 3px !important; +} +.navbar.navbar-rose .dropdown-menu li > a:hover, .navbar.navbar-rose .dropdown-menu li > a:focus { + color: #FFFFFF; + background-color: #e91e63; + box-shadow: 0 12px 20px -10px rgba(233, 30, 99, 0.28), 0 4px 20px 0px rgba(0, 0, 0, 0.12), 0 7px 8px -5px rgba(233, 30, 99, 0.2); +} +.navbar.navbar-rose .dropdown-menu .active > a { + background-color: #e91e63; + color: #ffffff; + box-shadow: 0 12px 20px -10px rgba(233, 30, 99, 0.28), 0 4px 20px 0px rgba(0, 0, 0, 0.12), 0 7px 8px -5px rgba(233, 30, 99, 0.2); +} +.navbar.navbar-rose .dropdown-menu .active > a:hover, .navbar.navbar-rose .dropdown-menu .active > a:focus { + color: #ffffff; +} +.navbar-inverse { + background-color: #3f51b5; +} +.navbar.navbar-transparent { + background-color: transparent; + box-shadow: none; + border-bottom: 0; +} +.navbar.navbar-transparent .logo-container .brand { + color: #FFFFFF; +} +.navbar.navbar-transparent{ + color: #999!important +} +.navbar-fixed-top { + border-radius: 0; +} +@media (max-width: 1199px) { + .navbar { + /* + .navbar-form { + margin-top: 10px; + } + */ + } + .navbar .navbar-brand { + height: 50px; + padding: 10px 15px; + } + .navbar .navbar-nav > li > a { + padding-top: 15px; + padding-bottom: 15px; + } +} +.navbar .alert { + border-radius: 0; + left: 0; + position: absolute; + right: 0; + top: 85px; + width: 100%; + z-index: 3; + transition: all 0.3s; +} + +.nav-align-center { + text-align: center; +} +.nav-align-center .nav-pills { + display: inline-block; +} + +.navbar-absolute { + position: absolute; + width: 100%; + padding-top: 10px; + z-index: 1029; +} + +.popover, .tooltip-inner { + color: #555555; + line-height: 1.5em; + background: #FFFFFF; + border: none; + border-radius: 3px; + box-shadow: 0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 2px rgba(0, 0, 0, 0.12), 0 5px 5px -3px rgba(0, 0, 0, 0.2); +} + +.popover { + padding: 0; + box-shadow: 0 16px 24px 2px rgba(0, 0, 0, 0.14), 0 6px 30px 5px rgba(0, 0, 0, 0.12), 0 8px 10px -5px rgba(0, 0, 0, 0.2); +} +.popover.left > .arrow, .popover.right > .arrow, .popover.top > .arrow, .popover.bottom > .arrow { + border: none; +} + +.popover-title { + background-color: #FFFFFF; + border: none; + padding: 15px 15px 5px; + font-size: 1.3em; +} + +.popover-content { + padding: 10px 15px 15px; + line-height: 1.4; +} + +.tooltip.in { + opacity: 1; + -webkit-transform: translate3d(0, 0px, 0); + -moz-transform: translate3d(0, 0px, 0); + -o-transform: translate3d(0, 0px, 0); + -ms-transform: translate3d(0, 0px, 0); + transform: translate3d(0, 0px, 0); +} + +.tooltip { + opacity: 0; + transition: opacity, transform .2s ease; + -webkit-transform: translate3d(0, 5px, 0); + -moz-transform: translate3d(0, 5px, 0); + -o-transform: translate3d(0, 5px, 0); + -ms-transform: translate3d(0, 5px, 0); + transform: translate3d(0, 5px, 0); +} +.tooltip.left .tooltip-arrow { + border-left-color: #FFFFFF; +} +.tooltip.right .tooltip-arrow { + border-right-color: #FFFFFF; +} +.tooltip.top .tooltip-arrow { + border-top-color: #FFFFFF; +} +.tooltip.bottom .tooltip-arrow { + border-bottom-color: #FFFFFF; +} + +.tooltip-inner { + padding: 10px 15px; + min-width: 130px; +} + +footer { + /*margin-top: -30px;*/ + padding: 15px 0; +} +footer ul { + margin-bottom: 0; + padding: 0; + list-style: none; +} +footer ul li { + display: inline-block; +} +footer ul li a { + color: inherit; + padding: 15px; + font-weight: 500; + font-size: 12px; + text-transform: uppercase; + border-radius: 3px; + text-decoration: none; + position: relative; + display: block; + color: #aaa; +} +footer ul li a:hover { + text-decoration: none; + color: #ed7063; +} +footer .copyright { + padding: 15px 20px 15px 0; + margin: 0; + color: #aaa; + font-weight: 400; +} +footer .copyright a{ + color: #ed7063; +} +footer .copyright .material-icons { + font-size: 18px; + position: relative; + top: 3px; +} +footer .btn { + margin-top: 0; + margin-bottom: 0; +} + +.dropdown-menu { + border: 0; + box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26); +} +.dropdown-menu .divider { + background-color: rgba(0, 0, 0, 0.12); +} +.dropdown-menu li > a { + font-size: 13px; + padding: 10px 20px; + margin: 0 5px; + border-radius: 2px; + -webkit-transition: all 150ms linear; + -moz-transition: all 150ms linear; + -o-transition: all 150ms linear; + -ms-transition: all 150ms linear; + transition: all 150ms linear; +} +.dropdown-menu li > a:hover, .dropdown-menu li > a:focus { + color: #000; + box-shadow: 0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 2px rgba(0, 0, 0, 0.12), 0 5px 5px -3px rgba(0, 0, 0, 0.2); +} +.dropdown-menu.dropdown-with-icons li > a { + padding: 12px 20px 12px 12px; +} +.dropdown-menu.dropdown-with-icons li > a .material-icons { + vertical-align: middle; + font-size: 24px; + position: relative; + margin-top: -4px; + top: 1px; + margin-right: 12px; + opacity: .5; +} +.dropdown-menu li { + position: relative; +} +.dropdown-menu li a:hover, +.dropdown-menu li a:focus, +.dropdown-menu li a:active { + background-color: #f1f1f1!important; + color: #555!important; + box-shadow: 0 0 0!important +} +.dropdown-menu .divider { + margin: 5px 0; +} +.navbar .dropdown-menu li a:hover, +.navbar .dropdown-menu li a:focus, +.navbar .dropdown-menu li a:active, .navbar.navbar-default .dropdown-menu li a:hover, +.navbar.navbar-default .dropdown-menu li a:focus, +.navbar.navbar-default .dropdown-menu li a:active { + background-color: #9c27b0; + color: #FFFFFF; + box-shadow: 0 12px 20px -10px rgba(156, 39, 176, 0.28), 0 4px 20px 0px rgba(0, 0, 0, 0.12), 0 7px 8px -5px rgba(156, 39, 176, 0.2); +} + +.card { + display: inline-block; + position: relative; + width: 100%; + margin: 25px 0; + box-shadow: 0 1px 20px 0 rgba(0, 0, 0, 0.05); + border-radius: 3px; + color: rgba(0,0,0, 0.87); + background: #f5f5f5; +} +.card .card-height-indicator { + margin-top: 100%; +} +.card .title { + margin-top: 0; + margin-bottom: 5px; +} +.card .card-image { + height: 60%; + position: relative; + overflow: hidden; + margin-left: 15px; + margin-right: 15px; + margin-top: -30px; + border-radius: 6px; +} +.card .card-image img { + width: 100%; + height: 100%; + border-radius: 6px; + pointer-events: none; +} +.card .card-image .card-title { + position: absolute; + bottom: 15px; + left: 15px; + color: #fff; + font-size: 1.3em; + text-shadow: 0 2px 5px rgba(33, 33, 33, 0.5); +} +.card .category:not([class*="text-"]) { + color: #999999; +} +.card .card-content { + padding: 15px 20px; +} +.card .card-content .category { + margin-bottom: 0; +} +.card .card-header { + box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.42), 0 4px 25px 0px rgba(0, 0, 0, 0.12), 0 8px 10px -5px rgba(0, 0, 0, 0.2); + margin: -20px 15px 0; + border-radius: 3px; + padding: 15px; + background-color: #999999; +} +.card .card-header .title { + color: #FFFFFF; +} +.card .card-header .category { + margin-bottom: 0; + color: rgba(255, 255, 255, 0.62); +} +.card .card-header.card-chart { + padding: 0; + min-height: 160px; +} +.card .card-header.card-chart + .content h4 { + margin-top: 0; +} +.card .card-header .ct-label { + color: rgba(255, 255, 255, 0.7); +} +.card .card-header .ct-grid { + stroke: rgba(255, 255, 255, 0.2); +} +.card .card-header .ct-series-a .ct-point, +.card .card-header .ct-series-a .ct-line, +.card .card-header .ct-series-a .ct-bar, +.card .card-header .ct-series-a .ct-slice-donut { + stroke: rgba(255, 255, 255, 0.8); +} +.card .card-header .ct-series-a .ct-slice-pie, +.card .card-header .ct-series-a .ct-area { + fill: rgba(255, 255, 255, 0.4); +} +.card .chart-title { + position: absolute; + top: 25px; + width: 100%; + text-align: center; +} +.card .chart-title h3 { + margin: 0; + color: #FFFFFF; +} +.card .chart-title h6 { + margin: 0; + color: rgba(255, 255, 255, 0.4); +} +.card .card-footer { + margin: 0 20px 10px; + padding-top: 10px; + border-top: 1px solid #eeeeee; +} +.card .card-footer .content { + display: block; +} +.card .card-footer div { + display: inline-block; +} +.card .card-footer .author { + color: #999999; +} +.card .card-footer .stats { + line-height: 22px; + color: #999999; + font-size: 12px; +} +.card-footer .stats a{ + color: #bbb; + font-weight: 400; +} +.card .card-footer .stats .material-icons { + position: relative; + top: 4px; + font-size: 16px; +} +.card .card-footer h6 { + color: #999999; +} +.card img { + width: 100%; + height: auto; +} +.card .category .material-icons { + position: relative; + top: 6px; + line-height: 0; +} +.card .category-social .fa { + font-size: 24px; + position: relative; + margin-top: -4px; + top: 2px; + margin-right: 5px; +} +.card .author .avatar { + width: 30px; + height: 30px; + overflow: hidden; + border-radius: 50%; + margin-right: 5px; +} +.card .author a { + color: #3C4858; + text-decoration: none; +} +.card .author a .ripple-container { + display: none; +} +.card .table { + margin-bottom: 0; +} +.card .table tr:first-child td { + border-top: none; +} +.card [data-background-color="yellow"] { + background: linear-gradient(60deg, #f1c926, #f1c40f); + box-shadow: 0 12px 20px -10px rgba(241, 196, 15, 0.28), 0 4px 20px 0px rgba(0, 0, 0, 0.12), 0 7px 8px -5px rgba(241, 196, 15, 0.2); +} +.card [data-background-color="blue"] { + background: linear-gradient(60deg, #26c6da, #00acc1); + box-shadow: 0 12px 20px -10px rgba(0, 188, 212, 0.28), 0 4px 20px 0px rgba(0, 0, 0, 0.12), 0 7px 8px -5px rgba(0, 188, 212, 0.2); +} +.card [data-background-color="green"] { + background: linear-gradient(60deg, #66bb6a, #43a047); + box-shadow: 0 12px 20px -10px rgba(76, 175, 80, 0.28), 0 4px 20px 0px rgba(0, 0, 0, 0.12), 0 7px 8px -5px rgba(76, 175, 80, 0.2); +} +.card [data-background-color="orange"] { + background: linear-gradient(60deg, #ffa726, #fb8c00); + box-shadow: 0 12px 20px -10px rgba(255, 152, 0, 0.28), 0 4px 20px 0px rgba(0, 0, 0, 0.12), 0 7px 8px -5px rgba(255, 152, 0, 0.2); +} +.card [data-background-color="red"] { + background: linear-gradient(60deg, #ed7063, #ef5350); + box-shadow: 0 12px 20px -10px rgba(244, 67, 54, 0.28), 0 4px 20px 0px rgba(0, 0, 0, 0.12), 0 7px 8px -5px rgba(244, 67, 54, 0.2); +} +.card [data-background-color="white"] { + background: #f5f5f5; + box-shadow: 0 0 50px rgba(237, 112, 99, .2); +} + +.card [data-background-color] { + color: #FFFFFF; +} +.card [data-background-color] a { + color: #FFFFFF; +} + +.card-stats .title { + margin: 0; +} +.card-stats .card-header { + float: left; + text-align: center; +} +.card-stats .card-header i { + font-size: 36px; + line-height: 56px; + width: 56px; + height: 56px; + color: #ed7063; + text-shadow: 0 0 35px rgba(237, 112, 99, .5); +} +.card-stats .card-content { + text-align: right; + padding-top: 10px; +} + +.card-nav-tabs .header-raised { + margin-top: -30px; +} +.card-nav-tabs .nav-tabs { + background: transparent; + padding: 0; +} +.card-nav-tabs .nav-tabs-title { + float: left; + padding: 10px 10px 10px 0; + line-height: 24px; +} + +.card-plain { + background: transparent; + box-shadow: none; +} +.card-plain .card-header { + margin-left: 0; + margin-right: 0; +} +.card-plain .content { + padding-left: 5px; + padding-right: 5px; +} +.card-plain .card-image { + margin: 0; + border-radius: 3px; +} +.card-plain .card-image img { + border-radius: 3px; +} + +.iframe-container { + margin: 0 -20px 0; +} +.iframe-container iframe { + width: 100%; + height: 500px; + border: 0; + box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.42), 0 4px 25px 0px rgba(0, 0, 0, 0.12), 0 8px 10px -5px rgba(0, 0, 0, 0.2); +} + +.card-profile, +.card-testimonial { + margin-top: 30px; + text-align: center; +} +.card-profile .btn-just-icon.btn-raised, +.card-testimonial .btn-just-icon.btn-raised { + margin-left: 6px; + margin-right: 6px; +} +.card-profile .card-avatar, +.card-testimonial .card-avatar { + max-width: 130px; + max-height: 130px; + margin: -50px auto 0; + border-radius: 50%; + overflow: hidden; + box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.42), 0 4px 25px 0px rgba(0, 0, 0, 0.12), 0 8px 10px -5px rgba(0, 0, 0, 0.2); +} +.card-profile .card-avatar + .content, +.card-testimonial .card-avatar + .content { + margin-top: 15px; +} +.card-profile.card-plain .card-avatar, +.card-testimonial.card-plain .card-avatar { + margin-top: 0; +} + +.nav-tabs { + background: #9c27b0; + border: 0; + border-radius: 3px; + padding: 0 15px; +} +.nav-tabs > li > a { + color: #FFFFFF; + border: 0; + margin: 0; + border-radius: 3px; + line-height: 24px; + text-transform: uppercase; + font-size: 12px; +} +.nav-tabs > li > a:hover { + background-color: transparent; + border: 0; +} +.nav-tabs > li > a, .nav-tabs > li > a:hover, .nav-tabs > li > a:focus { + background-color: transparent; + border: 0 !important; + color: #FFFFFF !important; + font-weight: 500; +} +.nav-tabs > li.disabled > a, .nav-tabs > li.disabled > a:hover { + color: rgba(255, 255, 255, 0.5); +} +.nav-tabs > li .material-icons { + margin: -1px 5px 0 0; +} +.nav-tabs > li.active > a, .nav-tabs > li.active > a:hover, .nav-tabs > li.active > a:focus { + background-color: rgba(255, 255, 255, 0.2); + transition: background-color .1s .2s; +} + +.ct-label { + fill: rgba(0, 0, 0, 0.4); + color: rgba(0, 0, 0, 0.4); + font-size: 1.3rem; + line-height: 1; +} + +.ct-chart-line .ct-label, +.ct-chart-bar .ct-label { + display: block; + display: -webkit-box; + display: -moz-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; +} + +.ct-label.ct-horizontal.ct-start { + -webkit-box-align: flex-end; + -webkit-align-items: flex-end; + -ms-flex-align: flex-end; + align-items: flex-end; + -webkit-box-pack: flex-start; + -webkit-justify-content: flex-start; + -ms-flex-pack: flex-start; + justify-content: flex-start; + text-align: left; + text-anchor: start; +} + +.ct-label.ct-horizontal.ct-end { + -webkit-box-align: flex-start; + -webkit-align-items: flex-start; + -ms-flex-align: flex-start; + align-items: flex-start; + -webkit-box-pack: flex-start; + -webkit-justify-content: flex-start; + -ms-flex-pack: flex-start; + justify-content: flex-start; + text-align: left; + text-anchor: start; +} + +.ct-label.ct-vertical.ct-start { + -webkit-box-align: flex-end; + -webkit-align-items: flex-end; + -ms-flex-align: flex-end; + align-items: flex-end; + -webkit-box-pack: flex-end; + -webkit-justify-content: flex-end; + -ms-flex-pack: flex-end; + justify-content: flex-end; + text-align: right; + text-anchor: end; +} + +.ct-label.ct-vertical.ct-end { + -webkit-box-align: flex-end; + -webkit-align-items: flex-end; + -ms-flex-align: flex-end; + align-items: flex-end; + -webkit-box-pack: flex-start; + -webkit-justify-content: flex-start; + -ms-flex-pack: flex-start; + justify-content: flex-start; + text-align: left; + text-anchor: start; +} + +.ct-chart-bar .ct-label.ct-horizontal.ct-start { + -webkit-box-align: flex-end; + -webkit-align-items: flex-end; + -ms-flex-align: flex-end; + align-items: flex-end; + -webkit-box-pack: center; + -webkit-justify-content: center; + -ms-flex-pack: center; + justify-content: center; + text-align: center; + text-anchor: start; +} + +.ct-chart-bar .ct-label.ct-horizontal.ct-end { + -webkit-box-align: flex-start; + -webkit-align-items: flex-start; + -ms-flex-align: flex-start; + align-items: flex-start; + -webkit-box-pack: center; + -webkit-justify-content: center; + -ms-flex-pack: center; + justify-content: center; + text-align: center; + text-anchor: start; +} + +.ct-chart-bar.ct-horizontal-bars .ct-label.ct-horizontal.ct-start { + -webkit-box-align: flex-end; + -webkit-align-items: flex-end; + -ms-flex-align: flex-end; + align-items: flex-end; + -webkit-box-pack: flex-start; + -webkit-justify-content: flex-start; + -ms-flex-pack: flex-start; + justify-content: flex-start; + text-align: left; + text-anchor: start; +} + +.ct-chart-bar.ct-horizontal-bars .ct-label.ct-horizontal.ct-end { + -webkit-box-align: flex-start; + -webkit-align-items: flex-start; + -ms-flex-align: flex-start; + align-items: flex-start; + -webkit-box-pack: flex-start; + -webkit-justify-content: flex-start; + -ms-flex-pack: flex-start; + justify-content: flex-start; + text-align: left; + text-anchor: start; +} + +.ct-chart-bar.ct-horizontal-bars .ct-label.ct-vertical.ct-start { + -webkit-box-align: center; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; + -webkit-box-pack: flex-end; + -webkit-justify-content: flex-end; + -ms-flex-pack: flex-end; + justify-content: flex-end; + text-align: right; + text-anchor: end; +} + +.ct-chart-bar.ct-horizontal-bars .ct-label.ct-vertical.ct-end { + -webkit-box-align: center; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; + -webkit-box-pack: flex-start; + -webkit-justify-content: flex-start; + -ms-flex-pack: flex-start; + justify-content: flex-start; + text-align: left; + text-anchor: end; +} + +.ct-grid { + stroke: rgba(0, 0, 0, 0.2); + stroke-width: 1px; + stroke-dasharray: 2px; +} + +.ct-point { + stroke-width: 8px; + stroke-linecap: round; +} + +.ct-line { + fill: none; + stroke-width: 3px; +} + +.ct-area { + stroke: none; + fill-opacity: 0.8; +} + +.ct-bar { + fill: none; + stroke-width: 10px; +} + +.ct-slice-donut { + fill: none; + stroke-width: 60px; +} + +.ct-series-a .ct-point, .ct-series-a .ct-line, .ct-series-a .ct-bar, .ct-series-a .ct-slice-donut { + stroke: #00bcd4; +} +.ct-series-a .ct-slice-pie, .ct-series-a .ct-area { + fill: #00bcd4; +} + +.ct-series-b .ct-point, .ct-series-b .ct-line, .ct-series-b .ct-bar, .ct-series-b .ct-slice-donut { + stroke: #ed7063; +} +.ct-series-b .ct-slice-pie, .ct-series-b .ct-area { + fill: #ed7063; +} + +.ct-series-c .ct-point, .ct-series-c .ct-line, .ct-series-c .ct-bar, .ct-series-c .ct-slice-donut { + stroke: #ff9800; +} +.ct-series-c .ct-slice-pie, .ct-series-c .ct-area { + fill: #ff9800; +} + +.ct-series-d .ct-point, .ct-series-d .ct-line, .ct-series-d .ct-bar, .ct-series-d .ct-slice-donut { + stroke: #9c27b0; +} +.ct-series-d .ct-slice-pie, .ct-series-d .ct-area { + fill: #9c27b0; +} + +.ct-series-e .ct-point, .ct-series-e .ct-line, .ct-series-e .ct-bar, .ct-series-e .ct-slice-donut { + stroke: #4caf50; +} +.ct-series-e .ct-slice-pie, .ct-series-e .ct-area { + fill: #4caf50; +} + +.ct-series-f .ct-point, .ct-series-f .ct-line, .ct-series-f .ct-bar, .ct-series-f .ct-slice-donut { + stroke: #9C9B99; +} +.ct-series-f .ct-slice-pie, .ct-series-f .ct-area { + fill: #9C9B99; +} + +.ct-series-g .ct-point, .ct-series-g .ct-line, .ct-series-g .ct-bar, .ct-series-g .ct-slice-donut { + stroke: #999999; +} +.ct-series-g .ct-slice-pie, .ct-series-g .ct-area { + fill: #999999; +} + +.ct-series-h .ct-point, .ct-series-h .ct-line, .ct-series-h .ct-bar, .ct-series-h .ct-slice-donut { + stroke: #dd4b39; +} +.ct-series-h .ct-slice-pie, .ct-series-h .ct-area { + fill: #dd4b39; +} + +.ct-series-i .ct-point, .ct-series-i .ct-line, .ct-series-i .ct-bar, .ct-series-i .ct-slice-donut { + stroke: #35465c; +} +.ct-series-i .ct-slice-pie, .ct-series-i .ct-area { + fill: #35465c; +} + +.ct-series-j .ct-point, .ct-series-j .ct-line, .ct-series-j .ct-bar, .ct-series-j .ct-slice-donut { + stroke: #e52d27; +} +.ct-series-j .ct-slice-pie, .ct-series-j .ct-area { + fill: #e52d27; +} + +.ct-series-k .ct-point, .ct-series-k .ct-line, .ct-series-k .ct-bar, .ct-series-k .ct-slice-donut { + stroke: #55acee; +} +.ct-series-k .ct-slice-pie, .ct-series-k .ct-area { + fill: #55acee; +} + +.ct-series-l .ct-point, .ct-series-l .ct-line, .ct-series-l .ct-bar, .ct-series-l .ct-slice-donut { + stroke: #cc2127; +} +.ct-series-l .ct-slice-pie, .ct-series-l .ct-area { + fill: #cc2127; +} + +.ct-series-m .ct-point, .ct-series-m .ct-line, .ct-series-m .ct-bar, .ct-series-m .ct-slice-donut { + stroke: #1769ff; +} +.ct-series-m .ct-slice-pie, .ct-series-m .ct-area { + fill: #1769ff; +} + +.ct-series-n .ct-point, .ct-series-n .ct-line, .ct-series-n .ct-bar, .ct-series-n .ct-slice-donut { + stroke: #6188e2; +} +.ct-series-n .ct-slice-pie, .ct-series-n .ct-area { + fill: #6188e2; +} + +.ct-series-o .ct-point, .ct-series-o .ct-line, .ct-series-o .ct-bar, .ct-series-o .ct-slice-donut { + stroke: #a748ca; +} +.ct-series-o .ct-slice-pie, .ct-series-o .ct-area { + fill: #a748ca; +} + +.ct-square { + display: block; + position: relative; + width: 100%; +} +.ct-square:before { + display: block; + float: left; + content: ""; + width: 0; + height: 0; + padding-bottom: 100%; +} +.ct-square:after { + content: ""; + display: table; + clear: both; +} +.ct-square > svg { + display: block; + position: absolute; + top: 0; + left: 0; +} + +.ct-minor-second { + display: block; + position: relative; + width: 100%; +} +.ct-minor-second:before { + display: block; + float: left; + content: ""; + width: 0; + height: 0; + padding-bottom: 93.75%; +} +.ct-minor-second:after { + content: ""; + display: table; + clear: both; +} +.ct-minor-second > svg { + display: block; + position: absolute; + top: 0; + left: 0; +} + +.ct-major-second { + display: block; + position: relative; + width: 100%; +} +.ct-major-second:before { + display: block; + float: left; + content: ""; + width: 0; + height: 0; + padding-bottom: 88.88889%; +} +.ct-major-second:after { + content: ""; + display: table; + clear: both; +} +.ct-major-second > svg { + display: block; + position: absolute; + top: 0; + left: 0; +} + +.ct-minor-third { + display: block; + position: relative; + width: 100%; +} +.ct-minor-third:before { + display: block; + float: left; + content: ""; + width: 0; + height: 0; + padding-bottom: 83.33333%; +} +.ct-minor-third:after { + content: ""; + display: table; + clear: both; +} +.ct-minor-third > svg { + display: block; + position: absolute; + top: 0; + left: 0; +} + +.ct-major-third { + display: block; + position: relative; + width: 100%; +} +.ct-major-third:before { + display: block; + float: left; + content: ""; + width: 0; + height: 0; + padding-bottom: 80%; +} +.ct-major-third:after { + content: ""; + display: table; + clear: both; +} +.ct-major-third > svg { + display: block; + position: absolute; + top: 0; + left: 0; +} + +.ct-perfect-fourth { + display: block; + position: relative; + width: 100%; +} +.ct-perfect-fourth:before { + display: block; + float: left; + content: ""; + width: 0; + height: 0; + padding-bottom: 75%; +} +.ct-perfect-fourth:after { + content: ""; + display: table; + clear: both; +} +.ct-perfect-fourth > svg { + display: block; + position: absolute; + top: 0; + left: 0; +} + +.ct-perfect-fifth { + display: block; + position: relative; + width: 100%; +} +.ct-perfect-fifth:before { + display: block; + float: left; + content: ""; + width: 0; + height: 0; + padding-bottom: 66.66667%; +} +.ct-perfect-fifth:after { + content: ""; + display: table; + clear: both; +} +.ct-perfect-fifth > svg { + display: block; + position: absolute; + top: 0; + left: 0; +} + +.ct-minor-sixth { + display: block; + position: relative; + width: 100%; +} +.ct-minor-sixth:before { + display: block; + float: left; + content: ""; + width: 0; + height: 0; + padding-bottom: 62.5%; +} +.ct-minor-sixth:after { + content: ""; + display: table; + clear: both; +} +.ct-minor-sixth > svg { + display: block; + position: absolute; + top: 0; + left: 0; +} + +.ct-golden-section { + display: block; + position: relative; + width: 100%; +} +.ct-golden-section:before { + display: block; + float: left; + content: ""; + width: 0; + height: 0; + padding-bottom: 61.8047%; +} +.ct-golden-section:after { + content: ""; + display: table; + clear: both; +} +.ct-golden-section > svg { + display: block; + position: absolute; + top: 0; + left: 0; +} + +.ct-major-sixth { + display: block; + position: relative; + width: 100%; +} +.ct-major-sixth:before { + display: block; + float: left; + content: ""; + width: 0; + height: 0; + padding-bottom: 60%; +} +.ct-major-sixth:after { + content: ""; + display: table; + clear: both; +} +.ct-major-sixth > svg { + display: block; + position: absolute; + top: 0; + left: 0; +} + +.ct-minor-seventh { + display: block; + position: relative; + width: 100%; +} +.ct-minor-seventh:before { + display: block; + float: left; + content: ""; + width: 0; + height: 0; + padding-bottom: 56.25%; +} +.ct-minor-seventh:after { + content: ""; + display: table; + clear: both; +} +.ct-minor-seventh > svg { + display: block; + position: absolute; + top: 0; + left: 0; +} + +.ct-major-seventh { + display: block; + position: relative; + width: 100%; +} +.ct-major-seventh:before { + display: block; + float: left; + content: ""; + width: 0; + height: 0; + padding-bottom: 53.33333%; +} +.ct-major-seventh:after { + content: ""; + display: table; + clear: both; +} +.ct-major-seventh > svg { + display: block; + position: absolute; + top: 0; + left: 0; +} + +.ct-octave { + display: block; + position: relative; + width: 100%; +} +.ct-octave:before { + display: block; + float: left; + content: ""; + width: 0; + height: 0; + padding-bottom: 50%; +} +.ct-octave:after { + content: ""; + display: table; + clear: both; +} +.ct-octave > svg { + display: block; + position: absolute; + top: 0; + left: 0; +} + +.ct-major-tenth { + display: block; + position: relative; + width: 100%; +} +.ct-major-tenth:before { + display: block; + float: left; + content: ""; + width: 0; + height: 0; + padding-bottom: 40%; +} +.ct-major-tenth:after { + content: ""; + display: table; + clear: both; +} +.ct-major-tenth > svg { + display: block; + position: absolute; + top: 0; + left: 0; +} + +.ct-major-eleventh { + display: block; + position: relative; + width: 100%; +} +.ct-major-eleventh:before { + display: block; + float: left; + content: ""; + width: 0; + height: 0; + padding-bottom: 37.5%; +} +.ct-major-eleventh:after { + content: ""; + display: table; + clear: both; +} +.ct-major-eleventh > svg { + display: block; + position: absolute; + top: 0; + left: 0; +} + +.ct-major-twelfth { + display: block; + position: relative; + width: 100%; +} +.ct-major-twelfth:before { + display: block; + float: left; + content: ""; + width: 0; + height: 0; + padding-bottom: 33.33333%; +} +.ct-major-twelfth:after { + content: ""; + display: table; + clear: both; +} +.ct-major-twelfth > svg { + display: block; + position: absolute; + top: 0; + left: 0; +} + +.ct-double-octave { + display: block; + position: relative; + width: 100%; +} +.ct-double-octave:before { + display: block; + float: left; + content: ""; + width: 0; + height: 0; + padding-bottom: 25%; +} +.ct-double-octave:after { + content: ""; + display: table; + clear: both; +} +.ct-double-octave > svg { + display: block; + position: absolute; + top: 0; + left: 0; +} + +.ct-blue { + stroke: #9c27b0 !important; +} + +.ct-azure { + stroke: #00bcd4 !important; +} + +.ct-green { + stroke: #4caf50 !important; +} + +.ct-orange { + stroke: #ff9800 !important; +} + +.ct-red { + stroke: #ed7063 !important; +} + +.ct-white { + stroke: #FFFFFF !important; +} + +.ct-rose { + stroke: #e91e63 !important; +} + +@media (min-width: 992px) { + .navbar-form { + margin-top: 21px; + margin-bottom: 21px; + padding-left: 5px; + padding-right: 5px; + } + + .navbar-nav > li > .dropdown-menu, + .dropdown .dropdown-menu, + .dropdown-menu.bootstrap-datetimepicker-widget { + -webkit-transition: all 150ms linear; + -moz-transition: all 150ms linear; + -o-transition: all 150ms linear; + -ms-transition: all 150ms linear; + transition: all 150ms linear; + margin-top: -20px; + visibility: hidden; + display: block; + opacity: 0; + filter: alpha(opacity=0); + } + + .navbar-nav > li.open > .dropdown-menu, + .dropdown.open .dropdown-menu, + .dropdown-menu.bootstrap-datetimepicker-widget.open { + opacity: 1; + filter: alpha(opacity=100); + visibility: visible; + margin-top: 0px; + } + + /*.navbar-nav > li > .dropdown-menu:before{ + border-bottom: 11px solid rgba(0, 0, 0, 0.2); + border-left: 11px solid rgba(0, 0, 0, 0); + border-right: 11px solid rgba(0, 0, 0, 0); + content: ""; + display: inline-block; + position: absolute; + left: 12px; + top: -11px; + } + .navbar-nav > li > .dropdown-menu:after { + border-bottom: 11px solid #FFFFFF; + border-left: 11px solid rgba(0, 0, 0, 0); + border-right: 11px solid rgba(0, 0, 0, 0); + content: ""; + display: inline-block; + position: absolute; + left: 12px; + top: -10px; + }*/ + .navbar-nav.navbar-right > li > .dropdown-menu:before { + left: auto; + right: 12px; + } + + .navbar-nav.navbar-right > li > .dropdown-menu:after { + left: auto; + right: 12px; + } + + .footer:not(.footer-big) nav > ul li:first-child { + margin-left: 0; + } + + body > .navbar-collapse.collapse { + display: none !important; + } + + .card form [class*="col-"] { + padding: 6px; + } + .card form [class*="col-"]:first-child { + padding-left: 15px; + } + .card form [class*="col-"]:last-child { + padding-right: 15px; + } + + .sidebar .navbar-form { + display: none !important; + } + .sidebar .nav-mobile-menu { + display: none; + } +} +/* Changes for small display */ +@media (max-width: 991px) { + .sidebar { + display: none; + box-shadow: none; + } + .sidebar .sidebar-wrapper { + padding-bottom: 60px; + } + .sidebar .nav-mobile-menu { + margin-top: 0; + } + .sidebar .nav-mobile-menu .notification { + float: left; + line-height: 30px; + margin-right: 8px; + } + .sidebar .nav-mobile-menu .open .dropdown-menu { + position: static; + float: none; + width: auto; + margin-top: 0; + background-color: transparent; + border: 0; + -webkit-box-shadow: none; + box-shadow: none; + } + + .main-panel { + width: 100%; + } + + .navbar-transparent { + padding-top: 15px; + background-color: rgba(0, 0, 0, 0.45); + } + + body { + position: relative; + } + + .main-panel { + -webkit-transform: translate3d(0px, 0, 0); + -moz-transform: translate3d(0px, 0, 0); + -o-transform: translate3d(0px, 0, 0); + -ms-transform: translate3d(0px, 0, 0); + transform: translate3d(0px, 0, 0); + -webkit-transition: all 0.33s cubic-bezier(0.685, 0.0473, 0.346, 1); + -moz-transition: all 0.33s cubic-bezier(0.685, 0.0473, 0.346, 1); + -o-transition: all 0.33s cubic-bezier(0.685, 0.0473, 0.346, 1); + -ms-transition: all 0.33s cubic-bezier(0.685, 0.0473, 0.346, 1); + transition: all 0.33s cubic-bezier(0.685, 0.0473, 0.346, 1); + left: 0; + } + + .navbar .container { + left: 0; + width: 100%; + -webkit-transition: all 0.33s cubic-bezier(0.685, 0.0473, 0.346, 1); + -moz-transition: all 0.33s cubic-bezier(0.685, 0.0473, 0.346, 1); + -o-transition: all 0.33s cubic-bezier(0.685, 0.0473, 0.346, 1); + -ms-transition: all 0.33s cubic-bezier(0.685, 0.0473, 0.346, 1); + transition: all 0.33s cubic-bezier(0.685, 0.0473, 0.346, 1); + position: relative; + } + + .navbar .navbar-collapse.collapse, + .navbar .navbar-collapse.collapse.in, + .navbar .navbar-collapse.collapsing { + display: none !important; + } + + .navbar-nav > li { + float: none; + position: relative; + display: block; + } + + .sidebar, + .off-canvas-sidebar { + position: fixed!important; + display: block; + top: 0; + height: 100vh; + width: 260px; + right: 0; + left: auto; + z-index: 1032; + visibility: visible; + overflow-y: visible; + border-top: none; + text-align: left; + padding-right: 0px; + padding-left: 0; + -webkit-transform: translate3d(260px, 0, 0); + -moz-transform: translate3d(260px, 0, 0); + -o-transform: translate3d(260px, 0, 0); + -ms-transform: translate3d(260px, 0, 0); + transform: translate3d(260px, 0, 0); + -webkit-transition: all 0.33s cubic-bezier(0.685, 0.0473, 0.346, 1); + -moz-transition: all 0.33s cubic-bezier(0.685, 0.0473, 0.346, 1); + -o-transition: all 0.33s cubic-bezier(0.685, 0.0473, 0.346, 1); + -ms-transition: all 0.33s cubic-bezier(0.685, 0.0473, 0.346, 1); + transition: all 0.33s cubic-bezier(0.685, 0.0473, 0.346, 1); + } + .sidebar > ul, + .off-canvas-sidebar > ul { + position: relative; + z-index: 4; + overflow-y: scroll; + height: calc(100vh - 61px); + width: 100%; + } + .sidebar::before, + .off-canvas-sidebar::before { + top: 0; + left: 0; + height: 100%; + width: 100%; + position: absolute; + background-color: #282828; + display: block; + content: ""; + z-index: 1; + } + .sidebar .logo, + .off-canvas-sidebar .logo { + position: relative; + z-index: 4; + } + .sidebar .navbar-form, + .off-canvas-sidebar .navbar-form { + margin: 10px 15px; + float: none !important; + } + .sidebar .navbar-form .btn, + .off-canvas-sidebar .navbar-form .btn { + position: absolute; + top: 25px; + right: 15px; + } + .sidebar .table-responsive, + .off-canvas-sidebar .table-responsive { + width: 100%; + margin-bottom: 15px; + overflow-x: scroll; + overflow-y: hidden; + -ms-overflow-style: -ms-autohiding-scrollbar; + -webkit-overflow-scrolling: touch; + } + + .nav-open .navbar-collapse { + -webkit-transform: translate3d(0px, 0, 0); + -moz-transform: translate3d(0px, 0, 0); + -o-transform: translate3d(0px, 0, 0); + -ms-transform: translate3d(0px, 0, 0); + transform: translate3d(0px, 0, 0); + } + + .nav-open .navbar .container { + left: -250px; + } + + .nav-open .main-panel { + left: 0; + -webkit-transform: translate3d(-260px, 0, 0); + -moz-transform: translate3d(-260px, 0, 0); + -o-transform: translate3d(-260px, 0, 0); + -ms-transform: translate3d(-260px, 0, 0); + transform: translate3d(-260px, 0, 0); + } + + .nav-open .sidebar { + box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.42), 0 4px 25px 0px rgba(0, 0, 0, 0.12), 0 8px 10px -5px rgba(0, 0, 0, 0.2); + } + + .nav-open .off-canvas-sidebar, + .nav-open .sidebar { + -webkit-transform: translate3d(0, 0, 0); + -moz-transform: translate3d(0, 0, 0); + -o-transform: translate3d(0, 0, 0); + -ms-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } + + .close-layer { + height: 100%; + width: 100%; + position: absolute; + opacity: 0; + top: 0; + left: auto; + content: ""; + z-index: 9999; + overflow-x: hidden; + -webkit-transition: all 370ms ease-in; + -moz-transition: all 370ms ease-in; + -o-transition: all 370ms ease-in; + -ms-transition: all 370ms ease-in; + transition: all 370ms ease-in; + } + .close-layer.visible { + opacity: 1; + } + + .navbar-toggle .icon-bar { + display: block; + position: relative; + background: #fff; + width: 24px; + height: 2px; + border-radius: 1px; + margin: 0 auto; + } + + .navbar-header .navbar-toggle { + margin: 10px 15px 10px 0; + width: 40px; + height: 40px; + } + + .bar1, + .bar2, + .bar3 { + outline: 1px solid transparent; + } + + @-webkit-keyframes fadeIn { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } + } + @-moz-keyframes fadeIn { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } + } + @keyframes fadeIn { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } + } + .dropdown-menu .divider { + background-color: rgba(229, 229, 229, 0.15); + } + + .navbar-nav { + margin: 1px 0; + } + .navbar-nav .open .dropdown-menu > li > a { + padding: 15px 15px 5px 50px; + } + .navbar-nav .open .dropdown-menu > li:first-child > a { + padding: 5px 15px 5px 50px; + } + .navbar-nav .open .dropdown-menu > li:last-child > a { + padding: 15px 15px 25px 50px; + } + + [class*="navbar-"] .navbar-nav > li > a, + [class*="navbar-"] .navbar-nav > li > a:hover, + [class*="navbar-"] .navbar-nav > li > a:focus, + [class*="navbar-"] .navbar-nav .active > a, + [class*="navbar-"] .navbar-nav .active > a:hover, + [class*="navbar-"] .navbar-nav .active > a:focus, + [class*="navbar-"] .navbar-nav .open .dropdown-menu > li > a, + [class*="navbar-"] .navbar-nav .open .dropdown-menu > li > a:hover, + [class*="navbar-"] .navbar-nav .open .dropdown-menu > li > a:focus, + [class*="navbar-"] .navbar-nav .navbar-nav .open .dropdown-menu > li > a:active { + color: white; + } + [class*="navbar-"] .navbar-nav > li > a, + [class*="navbar-"] .navbar-nav > li > a:hover, + [class*="navbar-"] .navbar-nav > li > a:focus, + [class*="navbar-"] .navbar-nav .open .dropdown-menu > li > a, + [class*="navbar-"] .navbar-nav .open .dropdown-menu > li > a:hover, + [class*="navbar-"] .navbar-nav .open .dropdown-menu > li > a:focus { + opacity: .7; + background: transparent; + } + [class*="navbar-"] .navbar-nav.navbar-nav .open .dropdown-menu > li > a:active { + opacity: 1; + } + [class*="navbar-"] .navbar-nav .dropdown > a:hover .caret { + border-bottom-color: #777; + border-top-color: #777; + } + [class*="navbar-"] .navbar-nav .dropdown > a:active .caret { + border-bottom-color: white; + border-top-color: white; + } + + .dropdown-menu { + display: none; + } + + .navbar-fixed-top { + -webkit-backface-visibility: hidden; + } + + #bodyClick { + height: 100%; + width: 100%; + position: fixed; + opacity: 0; + top: 0; + left: auto; + right: 250px; + content: ""; + z-index: 9999; + overflow-x: hidden; + } + + .social-line .btn { + margin: 0 0 10px 0; + } + + .subscribe-line .form-control { + margin: 0 0 10px 0; + } + + .social-line.pull-right { + float: none; + } + + .footer:not(.footer-big) nav > ul li { + float: none; + } + + .social-area.pull-right { + float: none !important; + } + + .form-control + .form-control-feedback { + margin-top: -8px; + } + + .navbar-toggle:hover, .navbar-toggle:focus { + background-color: transparent !important; + } + + .btn.dropdown-toggle { + margin-bottom: 0; + } + + .media-post .author { + width: 20%; + float: none !important; + display: block; + margin: 0 auto 10px; + } + + .media-post .media-body { + width: 100%; + } + + .navbar-collapse.collapse { + height: 100% !important; + } + + .navbar-collapse.collapse.in { + display: block; + } + + .navbar-header .collapse, .navbar-toggle { + display: block !important; + } + + .navbar-header { + float: none; + } + + .navbar-collapse .nav p { + font-size: 14px; + margin: 0; + } + .navbar-collapse [class^="pe-7s-"] { + float: left; + font-size: 20px; + margin-right: 10px; + } +} +@media (min-width: 768px) { + .navbar > .container-fluid .navbar-brand { + margin-left: 0; + } +} +@media (min-width: 992px) { + .table-full-width { + margin-left: -20px; + margin-right: -20px; + } +} diff --git a/public/assets/dashboard/css/material-icons.css b/public/assets/dashboard/css/material-icons.css new file mode 100644 index 0000000..a561e97 --- /dev/null +++ b/public/assets/dashboard/css/material-icons.css @@ -0,0 +1,23 @@ +/* fallback */ +@font-face { + font-family: 'Material Icons'; + font-style: normal; + font-weight: 400; + src: local('Material Icons'), local('MaterialIcons-Regular'), url(../fonts/material-icons.woff2) format('woff2'); +} + +.material-icons { + font-family: 'Material Icons'; + font-weight: normal; + font-style: normal; + font-size: 24px; + line-height: 1; + letter-spacing: normal; + text-transform: none; + display: inline-block; + white-space: nowrap; + word-wrap: normal; + direction: ltr; + -webkit-font-feature-settings: 'liga'; + -webkit-font-smoothing: antialiased; +} diff --git a/public/assets/dashboard/fonts/material-icons.woff2 b/public/assets/dashboard/fonts/material-icons.woff2 new file mode 100644 index 0000000..74da097 Binary files /dev/null and b/public/assets/dashboard/fonts/material-icons.woff2 differ diff --git a/public/assets/dashboard/img/apple-icon.png b/public/assets/dashboard/img/apple-icon.png new file mode 100644 index 0000000..f5e1ac8 Binary files /dev/null and b/public/assets/dashboard/img/apple-icon.png differ diff --git a/public/assets/dashboard/img/cover.jpeg b/public/assets/dashboard/img/cover.jpeg new file mode 100644 index 0000000..e6d76c1 Binary files /dev/null and b/public/assets/dashboard/img/cover.jpeg differ diff --git a/public/assets/dashboard/img/faces/entrance.png b/public/assets/dashboard/img/faces/entrance.png new file mode 100644 index 0000000..eef2d8c Binary files /dev/null and b/public/assets/dashboard/img/faces/entrance.png differ diff --git a/public/assets/dashboard/img/faces/marc.jpg b/public/assets/dashboard/img/faces/marc.jpg new file mode 100644 index 0000000..af6401d Binary files /dev/null and b/public/assets/dashboard/img/faces/marc.jpg differ diff --git a/public/assets/dashboard/img/favicon.ico b/public/assets/dashboard/img/favicon.ico new file mode 100644 index 0000000..c1b0071 Binary files /dev/null and b/public/assets/dashboard/img/favicon.ico differ diff --git a/public/assets/dashboard/img/logo-dash.png b/public/assets/dashboard/img/logo-dash.png new file mode 100644 index 0000000..a6c56a9 Binary files /dev/null and b/public/assets/dashboard/img/logo-dash.png differ diff --git a/public/assets/dashboard/img/maps.png b/public/assets/dashboard/img/maps.png new file mode 100644 index 0000000..511d5bb Binary files /dev/null and b/public/assets/dashboard/img/maps.png differ diff --git a/public/assets/dashboard/img/mask.png b/public/assets/dashboard/img/mask.png new file mode 100755 index 0000000..429360d Binary files /dev/null and b/public/assets/dashboard/img/mask.png differ diff --git a/public/assets/dashboard/img/new_logo.png b/public/assets/dashboard/img/new_logo.png new file mode 100644 index 0000000..8e2192b Binary files /dev/null and b/public/assets/dashboard/img/new_logo.png differ diff --git a/public/assets/dashboard/img/poster/poster.jpg b/public/assets/dashboard/img/poster/poster.jpg new file mode 100644 index 0000000..b823d37 Binary files /dev/null and b/public/assets/dashboard/img/poster/poster.jpg differ diff --git a/public/assets/dashboard/img/poster/poster2.jpg b/public/assets/dashboard/img/poster/poster2.jpg new file mode 100644 index 0000000..a89c2ec Binary files /dev/null and b/public/assets/dashboard/img/poster/poster2.jpg differ diff --git a/public/assets/dashboard/img/poster/poster3.jpg b/public/assets/dashboard/img/poster/poster3.jpg new file mode 100644 index 0000000..3f9402b Binary files /dev/null and b/public/assets/dashboard/img/poster/poster3.jpg differ diff --git a/public/assets/dashboard/img/poster/poster4.jpg b/public/assets/dashboard/img/poster/poster4.jpg new file mode 100644 index 0000000..99cb0fd Binary files /dev/null and b/public/assets/dashboard/img/poster/poster4.jpg differ diff --git a/public/assets/dashboard/img/poster/poster5.jpg b/public/assets/dashboard/img/poster/poster5.jpg new file mode 100644 index 0000000..eeb1982 Binary files /dev/null and b/public/assets/dashboard/img/poster/poster5.jpg differ diff --git a/public/assets/dashboard/img/profil.jpg b/public/assets/dashboard/img/profil.jpg new file mode 100644 index 0000000..9e73185 Binary files /dev/null and b/public/assets/dashboard/img/profil.jpg differ diff --git a/public/assets/dashboard/img/sidebar-1.jpg b/public/assets/dashboard/img/sidebar-1.jpg new file mode 100644 index 0000000..25cfd86 Binary files /dev/null and b/public/assets/dashboard/img/sidebar-1.jpg differ diff --git a/public/assets/dashboard/img/sidebar-2.jpg b/public/assets/dashboard/img/sidebar-2.jpg new file mode 100644 index 0000000..cf297c0 Binary files /dev/null and b/public/assets/dashboard/img/sidebar-2.jpg differ diff --git a/public/assets/dashboard/img/sidebar-3.jpg b/public/assets/dashboard/img/sidebar-3.jpg new file mode 100644 index 0000000..bee4815 Binary files /dev/null and b/public/assets/dashboard/img/sidebar-3.jpg differ diff --git a/public/assets/dashboard/img/sidebar-4.jpg b/public/assets/dashboard/img/sidebar-4.jpg new file mode 100644 index 0000000..b4ea5c4 Binary files /dev/null and b/public/assets/dashboard/img/sidebar-4.jpg differ diff --git a/public/assets/dashboard/img/tim_80x80.png b/public/assets/dashboard/img/tim_80x80.png new file mode 100644 index 0000000..1f7aa0d Binary files /dev/null and b/public/assets/dashboard/img/tim_80x80.png differ diff --git a/public/assets/dashboard/js/bootstrap-notify.js b/public/assets/dashboard/js/bootstrap-notify.js new file mode 100755 index 0000000..45921a8 --- /dev/null +++ b/public/assets/dashboard/js/bootstrap-notify.js @@ -0,0 +1,404 @@ +/* + + + + Creative Tim Modifications + + Lines: 239, 240 was changed from top: 5px to top: 50% and we added margin-top: -13px. In this way the close button will be aligned vertically + Line:242 - modified when the icon is set, we add the class "alert-with-icon", so there will be enough space for the icon. + + + + +*/ + + +/* +* Project: Bootstrap Notify = v3.1.5 +* Description: Turns standard Bootstrap alerts into "Growl-like" notifications. +* Author: Mouse0270 aka Robert McIntosh +* License: MIT License +* Website: https://github.com/mouse0270/bootstrap-growl +*/ + +/* global define:false, require: false, jQuery:false */ + +(function (factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['jquery'], factory); + } else if (typeof exports === 'object') { + // Node/CommonJS + factory(require('jquery')); + } else { + // Browser globals + factory(jQuery); + } +}(function ($) { + // Create the defaults once + var defaults = { + element: 'body', + position: null, + type: "info", + allow_dismiss: true, + allow_duplicates: true, + newest_on_top: false, + showProgressbar: false, + placement: { + from: "top", + align: "right" + }, + offset: 20, + spacing: 10, + z_index: 1031, + delay: 5000, + timer: 1000, + url_target: '_blank', + mouse_over: null, + animate: { + enter: 'animated fadeInDown', + exit: 'animated fadeOutUp' + }, + onShow: null, + onShown: null, + onClose: null, + onClosed: null, + icon_type: 'class', + template: '' + }; + + String.format = function () { + var str = arguments[0]; + for (var i = 1; i < arguments.length; i++) { + str = str.replace(RegExp("\\{" + (i - 1) + "\\}", "gm"), arguments[i]); + } + return str; + }; + + function isDuplicateNotification(notification) { + var isDupe = false; + + $('[data-notify="container"]').each(function (i, el) { + var $el = $(el); + var title = $el.find('[data-notify="title"]').text().trim(); + var message = $el.find('[data-notify="message"]').html().trim(); + + // The input string might be different than the actual parsed HTML string! + // (
vs
for example) + // So we have to force-parse this as HTML here! + var isSameTitle = title === $("
" + notification.settings.content.title + "
").html().trim(); + var isSameMsg = message === $("
" + notification.settings.content.message + "
").html().trim(); + var isSameType = $el.hasClass('alert-' + notification.settings.type); + + if (isSameTitle && isSameMsg && isSameType) { + //we found the dupe. Set the var and stop checking. + isDupe = true; + } + return !isDupe; + }); + + return isDupe; + } + + function Notify(element, content, options) { + // Setup Content of Notify + var contentObj = { + content: { + message: typeof content === 'object' ? content.message : content, + title: content.title ? content.title : '', + icon: content.icon ? content.icon : '', + url: content.url ? content.url : '#', + target: content.target ? content.target : '-' + } + }; + + options = $.extend(true, {}, contentObj, options); + this.settings = $.extend(true, {}, defaults, options); + this._defaults = defaults; + if (this.settings.content.target === "-") { + this.settings.content.target = this.settings.url_target; + } + this.animations = { + start: 'webkitAnimationStart oanimationstart MSAnimationStart animationstart', + end: 'webkitAnimationEnd oanimationend MSAnimationEnd animationend' + }; + + if (typeof this.settings.offset === 'number') { + this.settings.offset = { + x: this.settings.offset, + y: this.settings.offset + }; + } + + //if duplicate messages are not allowed, then only continue if this new message is not a duplicate of one that it already showing + if (this.settings.allow_duplicates || (!this.settings.allow_duplicates && !isDuplicateNotification(this))) { + this.init(); + } + } + + $.extend(Notify.prototype, { + init: function () { + var self = this; + + this.buildNotify(); + if (this.settings.content.icon) { + this.setIcon(); + } + if (this.settings.content.url != "#") { + this.styleURL(); + } + this.styleDismiss(); + this.placement(); + this.bind(); + + this.notify = { + $ele: this.$ele, + update: function (command, update) { + var commands = {}; + if (typeof command === "string") { + commands[command] = update; + } else { + commands = command; + } + for (var cmd in commands) { + switch (cmd) { + case "type": + this.$ele.removeClass('alert-' + self.settings.type); + this.$ele.find('[data-notify="progressbar"] > .progress-bar').removeClass('progress-bar-' + self.settings.type); + self.settings.type = commands[cmd]; + this.$ele.addClass('alert-' + commands[cmd]).find('[data-notify="progressbar"] > .progress-bar').addClass('progress-bar-' + commands[cmd]); + break; + case "icon": + var $icon = this.$ele.find('[data-notify="icon"]'); + if (self.settings.icon_type.toLowerCase() === 'class') { + $icon.html(commands[cmd]); + } else { + if (!$icon.is('img')) { + $icon.find('img'); + } + $icon.attr('src', commands[cmd]); + } + break; + case "progress": + var newDelay = self.settings.delay - (self.settings.delay * (commands[cmd] / 100)); + this.$ele.data('notify-delay', newDelay); + this.$ele.find('[data-notify="progressbar"] > div').attr('aria-valuenow', commands[cmd]).css('width', commands[cmd] + '%'); + break; + case "url": + this.$ele.find('[data-notify="url"]').attr('href', commands[cmd]); + break; + case "target": + this.$ele.find('[data-notify="url"]').attr('target', commands[cmd]); + break; + default: + this.$ele.find('[data-notify="' + cmd + '"]').html(commands[cmd]); + } + } + var posX = this.$ele.outerHeight() + parseInt(self.settings.spacing) + parseInt(self.settings.offset.y); + self.reposition(posX); + }, + close: function () { + self.close(); + } + }; + + }, + buildNotify: function () { + var content = this.settings.content; + this.$ele = $(String.format(this.settings.template, this.settings.type, content.title, content.message, content.url, content.target)); + this.$ele.attr('data-notify-position', this.settings.placement.from + '-' + this.settings.placement.align); + if (!this.settings.allow_dismiss) { + this.$ele.find('[data-notify="dismiss"]').css('display', 'none'); + } + if ((this.settings.delay <= 0 && !this.settings.showProgressbar) || !this.settings.showProgressbar) { + this.$ele.find('[data-notify="progressbar"]').remove(); + } + }, + setIcon: function () { + + this.$ele.addClass('alert-with-icon'); + + if (this.settings.icon_type.toLowerCase() === 'class') { + this.$ele.find('[data-notify="icon"]').html(this.settings.content.icon); + } else { + if (this.$ele.find('[data-notify="icon"]').is('img')) { + this.$ele.find('[data-notify="icon"]').attr('src', this.settings.content.icon); + } else { + this.$ele.find('[data-notify="icon"]').append('Notify Icon'); + } + } + }, + styleDismiss: function () { + this.$ele.find('[data-notify="dismiss"]').css({ + position: 'absolute', + right: '10px', + top: '50%', + marginTop: '-13px', + zIndex: this.settings.z_index + 2 + }); + }, + styleURL: function () { + this.$ele.find('[data-notify="url"]').css({ + backgroundImage: 'url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)', + height: '100%', + left: 0, + position: 'absolute', + top: 0, + width: '100%', + zIndex: this.settings.z_index + 1 + }); + }, + placement: function () { + var self = this, + offsetAmt = this.settings.offset.y, + css = { + display: 'inline-block', + margin: '0px auto', + position: this.settings.position ? this.settings.position : (this.settings.element === 'body' ? 'fixed' : 'absolute'), + transition: 'all .5s ease-in-out', + zIndex: this.settings.z_index + }, + hasAnimation = false, + settings = this.settings; + + $('[data-notify-position="' + this.settings.placement.from + '-' + this.settings.placement.align + '"]:not([data-closing="true"])').each(function () { + offsetAmt = Math.max(offsetAmt, parseInt($(this).css(settings.placement.from)) + parseInt($(this).outerHeight()) + parseInt(settings.spacing)); + }); + if (this.settings.newest_on_top === true) { + offsetAmt = this.settings.offset.y; + } + css[this.settings.placement.from] = offsetAmt + 'px'; + + switch (this.settings.placement.align) { + case "left": + case "right": + css[this.settings.placement.align] = this.settings.offset.x + 'px'; + break; + case "center": + css.left = 0; + css.right = 0; + break; + } + this.$ele.css(css).addClass(this.settings.animate.enter); + $.each(Array('webkit-', 'moz-', 'o-', 'ms-', ''), function (index, prefix) { + self.$ele[0].style[prefix + 'AnimationIterationCount'] = 1; + }); + + $(this.settings.element).append(this.$ele); + + if (this.settings.newest_on_top === true) { + offsetAmt = (parseInt(offsetAmt) + parseInt(this.settings.spacing)) + this.$ele.outerHeight(); + this.reposition(offsetAmt); + } + + if ($.isFunction(self.settings.onShow)) { + self.settings.onShow.call(this.$ele); + } + + this.$ele.one(this.animations.start, function () { + hasAnimation = true; + }).one(this.animations.end, function () { + if ($.isFunction(self.settings.onShown)) { + self.settings.onShown.call(this); + } + }); + + setTimeout(function () { + if (!hasAnimation) { + if ($.isFunction(self.settings.onShown)) { + self.settings.onShown.call(this); + } + } + }, 600); + }, + bind: function () { + var self = this; + + this.$ele.find('[data-notify="dismiss"]').on('click', function () { + self.close(); + }); + + this.$ele.mouseover(function () { + $(this).data('data-hover', "true"); + }).mouseout(function () { + $(this).data('data-hover', "false"); + }); + this.$ele.data('data-hover', "false"); + + if (this.settings.delay > 0) { + self.$ele.data('notify-delay', self.settings.delay); + var timer = setInterval(function () { + var delay = parseInt(self.$ele.data('notify-delay')) - self.settings.timer; + if ((self.$ele.data('data-hover') === 'false' && self.settings.mouse_over === "pause") || self.settings.mouse_over != "pause") { + var percent = ((self.settings.delay - delay) / self.settings.delay) * 100; + self.$ele.data('notify-delay', delay); + self.$ele.find('[data-notify="progressbar"] > div').attr('aria-valuenow', percent).css('width', percent + '%'); + } + if (delay <= -(self.settings.timer)) { + clearInterval(timer); + self.close(); + } + }, self.settings.timer); + } + }, + close: function () { + var self = this, + posX = parseInt(this.$ele.css(this.settings.placement.from)), + hasAnimation = false; + + this.$ele.data('closing', 'true').addClass(this.settings.animate.exit); + self.reposition(posX); + + if ($.isFunction(self.settings.onClose)) { + self.settings.onClose.call(this.$ele); + } + + this.$ele.one(this.animations.start, function () { + hasAnimation = true; + }).one(this.animations.end, function () { + $(this).remove(); + if ($.isFunction(self.settings.onClosed)) { + self.settings.onClosed.call(this); + } + }); + + setTimeout(function () { + if (!hasAnimation) { + self.$ele.remove(); + if (self.settings.onClosed) { + self.settings.onClosed(self.$ele); + } + } + }, 600); + }, + reposition: function (posX) { + var self = this, + notifies = '[data-notify-position="' + this.settings.placement.from + '-' + this.settings.placement.align + '"]:not([data-closing="true"])', + $elements = this.$ele.nextAll(notifies); + if (this.settings.newest_on_top === true) { + $elements = this.$ele.prevAll(notifies); + } + $elements.each(function () { + $(this).css(self.settings.placement.from, posX); + posX = (parseInt(posX) + parseInt(self.settings.spacing)) + $(this).outerHeight(); + }); + } + }); + + $.notify = function (content, options) { + var plugin = new Notify(this, content, options); + return plugin.notify; + }; + $.notifyDefaults = function (options) { + defaults = $.extend(true, {}, defaults, options); + return defaults; + }; + $.notifyClose = function (command) { + if (typeof command === "undefined" || command === "all") { + $('[data-notify]').find('[data-notify="dismiss"]').trigger('click'); + } else { + $('[data-notify-position="' + command + '"]').find('[data-notify="dismiss"]').trigger('click'); + } + }; + +})); diff --git a/public/assets/dashboard/js/bootstrap.min.js b/public/assets/dashboard/js/bootstrap.min.js new file mode 100644 index 0000000..133aeec --- /dev/null +++ b/public/assets/dashboard/js/bootstrap.min.js @@ -0,0 +1,7 @@ +/*! + * Bootstrap v3.3.5 (http://getbootstrap.com) + * Copyright 2011-2015 Twitter, Inc. + * Licensed under the MIT license + */ +if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.5",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.5",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),a(c.target).is('input[type="radio"]')||a(c.target).is('input[type="checkbox"]')||c.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.5",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));return a>this.$items.length-1||0>a?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.5",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger("hidden.bs.dropdown",f))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.5",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger("shown.bs.dropdown",h)}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdown-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&jdocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth
',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),c.isInStateTrue()?void 0:(clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide())},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-mo.width?"left":"left"==h&&k.left-lg.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;jg.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.5",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.5",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b=e[a]&&(void 0===e[a+1]||b .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.5",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=e?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery); \ No newline at end of file diff --git a/public/assets/dashboard/js/chartist.min.js b/public/assets/dashboard/js/chartist.min.js new file mode 100755 index 0000000..b69e484 --- /dev/null +++ b/public/assets/dashboard/js/chartist.min.js @@ -0,0 +1,9 @@ +/* Chartist.js 0.9.4 + * Copyright © 2015 Gion Kunz + * Free to use under the WTFPL license. + * http://www.wtfpl.net/ + */ + +!function(a,b){"function"==typeof define&&define.amd?define([],function(){return a.Chartist=b()}):"object"==typeof exports?module.exports=b():a.Chartist=b()}(this,function(){var a={version:"0.9.4"};return function(a,b,c){"use strict";c.noop=function(a){return a},c.alphaNumerate=function(a){return String.fromCharCode(97+a%26)},c.extend=function(a){a=a||{};var b=Array.prototype.slice.call(arguments,1);return b.forEach(function(b){for(var d in b)"object"!=typeof b[d]||null===b[d]||b[d]instanceof Array?a[d]=b[d]:a[d]=c.extend({},a[d],b[d])}),a},c.replaceAll=function(a,b,c){return a.replace(new RegExp(b,"g"),c)},c.stripUnit=function(a){return"string"==typeof a&&(a=a.replace(/[^0-9\+-\.]/g,"")),+a},c.ensureUnit=function(a,b){return"number"==typeof a&&(a+=b),a},c.querySelector=function(a){return a instanceof Node?a:b.querySelector(a)},c.times=function(a){return Array.apply(null,new Array(a))},c.sum=function(a,b){return a+(b?b:0)},c.mapMultiply=function(a){return function(b){return b*a}},c.mapAdd=function(a){return function(b){return b+a}},c.serialMap=function(a,b){var d=[],e=Math.max.apply(null,a.map(function(a){return a.length}));return c.times(e).forEach(function(c,e){var f=a.map(function(a){return a[e]});d[e]=b.apply(null,f)}),d},c.roundWithPrecision=function(a,b){var d=Math.pow(10,b||c.precision);return Math.round(a*d)/d},c.precision=8,c.escapingMap={"&":"&","<":"<",">":">",'"':""","'":"'"},c.serialize=function(a){return null===a||void 0===a?a:("number"==typeof a?a=""+a:"object"==typeof a&&(a=JSON.stringify({data:a})),Object.keys(c.escapingMap).reduce(function(a,b){return c.replaceAll(a,b,c.escapingMap[b])},a))},c.deserialize=function(a){if("string"!=typeof a)return a;a=Object.keys(c.escapingMap).reduce(function(a,b){return c.replaceAll(a,c.escapingMap[b],b)},a);try{a=JSON.parse(a),a=void 0!==a.data?a.data:a}catch(b){}return a},c.createSvg=function(a,b,d,e){var f;return b=b||"100%",d=d||"100%",Array.prototype.slice.call(a.querySelectorAll("svg")).filter(function(a){return a.getAttributeNS("http://www.w3.org/2000/xmlns/",c.xmlNs.prefix)}).forEach(function(b){a.removeChild(b)}),f=new c.Svg("svg").attr({width:b,height:d}).addClass(e).attr({style:"width: "+b+"; height: "+d+";"}),a.appendChild(f._node),f},c.reverseData=function(a){a.labels.reverse(),a.series.reverse();for(var b=0;bf.high&&(f.high=c),h&&ck,m=e?c.rho(j.range):0;if(e&&c.projectLength(a,1,j)>=d)j.step=1;else if(e&&m=d)j.step=m;else for(;;){if(l&&c.projectLength(a,j.step,j)<=d)j.step*=2;else{if(l||!(c.projectLength(a,j.step/2,j)>=d))break;if(j.step/=2,e&&j.step%1!==0){j.step*=2;break}}if(i++>1e3)throw new Error("Exceeded maximum number of iterations while optimizing scale step!")}for(g=j.min,h=j.max;g+j.step<=j.low;)g+=j.step;for(;h-j.step>=j.high;)h-=j.step;for(j.min=g,j.max=h,j.range=j.max-j.min,j.values=[],f=j.min;f<=j.max;f+=j.step)j.values.push(c.roundWithPrecision(f));return j},c.polarToCartesian=function(a,b,c,d){var e=(d-90)*Math.PI/180;return{x:a+c*Math.cos(e),y:b+c*Math.sin(e)}},c.createChartRect=function(a,b,d){var e=!(!b.axisX&&!b.axisY),f=e?b.axisY.offset:0,g=e?b.axisX.offset:0,h=a.width()||c.stripUnit(b.width)||0,i=a.height()||c.stripUnit(b.height)||0,j=c.normalizePadding(b.chartPadding,d);h=Math.max(h,f+j.left+j.right),i=Math.max(i,g+j.top+j.bottom);var k={padding:j,width:function(){return this.x2-this.x1},height:function(){return this.y1-this.y2}};return e?("start"===b.axisX.position?(k.y2=j.top+g,k.y1=Math.max(i-j.bottom,k.y2+1)):(k.y2=j.top,k.y1=Math.max(i-j.bottom-g,k.y2+1)),"start"===b.axisY.position?(k.x1=j.left+f,k.x2=Math.max(h-j.right,k.x1+1)):(k.x1=j.left,k.x2=Math.max(h-j.right-f,k.x1+1))):(k.x1=j.left,k.x2=Math.max(h-j.right,k.x1+1),k.y2=j.top,k.y1=Math.max(i-j.bottom,k.y2+1)),k},c.createGrid=function(a,b,d,e,f,g,h,i){var j={};j[d.units.pos+"1"]=a,j[d.units.pos+"2"]=a,j[d.counterUnits.pos+"1"]=e,j[d.counterUnits.pos+"2"]=e+f;var k=g.elem("line",j,h.join(" "));i.emit("draw",c.extend({type:"grid",axis:d,index:b,group:g,element:k},j))},c.createLabel=function(a,b,d,e,f,g,h,i,j,k,l){var m,n={};if(n[f.units.pos]=a+h[f.units.pos],n[f.counterUnits.pos]=h[f.counterUnits.pos],n[f.units.len]=b,n[f.counterUnits.len]=g-10,k){var o=''+e[d]+"";m=i.foreignObject(o,c.extend({style:"overflow: visible;"},n))}else m=i.elem("text",n,j.join(" ")).text(e[d]);l.emit("draw",c.extend({type:"label",axis:f,index:d,group:i,element:m,text:e[d]},n))},c.getSeriesOption=function(a,b,c){if(a.name&&b.series&&b.series[a.name]){var d=b.series[a.name];return d.hasOwnProperty(c)?d[c]:b[c]}return b[c]},c.optionsProvider=function(b,d,e){function f(b){var f=h;if(h=c.extend({},j),d)for(i=0;i1){var i=[];return h.forEach(function(a){i.push(g(a.pathCoordinates,a.valueData))}),c.Svg.Path.join(i)}if(a=h[0].pathCoordinates,d=h[0].valueData,a.length<=4)return c.Interpolation.none()(a,d);for(var j,k=(new c.Svg.Path).move(a[0],a[1],!1,d[0]),l=0,m=a.length;m-2*!j>l;l+=2){var n=[{x:+a[l-2],y:+a[l-1]},{x:+a[l],y:+a[l+1]},{x:+a[l+2],y:+a[l+3]},{x:+a[l+4],y:+a[l+5]}];j?l?m-4===l?n[3]={x:+a[0],y:+a[1]}:m-2===l&&(n[2]={x:+a[0],y:+a[1]},n[3]={x:+a[2],y:+a[3]}):n[0]={x:+a[m-2],y:+a[m-1]}:m-4===l?n[3]=n[2]:l||(n[0]={x:+a[l],y:+a[l+1]}),k.curve(e*(-n[0].x+6*n[1].x+n[2].x)/6+f*n[2].x,e*(-n[0].y+6*n[1].y+n[2].y)/6+f*n[2].y,e*(n[1].x+6*n[2].x-n[3].x)/6+f*n[2].x,e*(n[1].y+6*n[2].y-n[3].y)/6+f*n[2].y,n[2].x,n[2].y,!1,d[(l+2)/2])}return k}},c.Interpolation.step=function(a){var b={postpone:!0};return a=c.extend({},b,a),function(b,d){for(var e=new c.Svg.Path,f=!0,g=2;g1}).map(function(a){var b=a.pathElements[0],c=a.pathElements[a.pathElements.length-1];return a.clone(!0).position(0).remove(1).move(b.x,r).line(b.x,b.y).position(a.pathElements.length+1).line(c.x,r)}).forEach(function(h){var k=i.elem("path",{d:h.stringify()},a.classNames.area,!0).attr({values:b.normalized[g]},c.xmlNs.uri);this.eventEmitter.emit("draw",{type:"area",values:b.normalized[g],path:h.clone(),series:f,seriesIndex:g,axisX:d,axisY:e,chartRect:j,index:g,group:i,element:k})}.bind(this))}}.bind(this)),this.eventEmitter.emit("created",{bounds:e.bounds,chartRect:j,axisX:d,axisY:e,svg:this.svg,options:a})}function e(a,b,d,e){c.Line["super"].constructor.call(this,a,b,f,c.extend({},f,d),e)}var f={axisX:{offset:30,position:"end",labelOffset:{x:0,y:0},showLabel:!0,showGrid:!0,labelInterpolationFnc:c.noop,type:void 0},axisY:{offset:40,position:"start",labelOffset:{x:0,y:0},showLabel:!0,showGrid:!0,labelInterpolationFnc:c.noop,type:void 0,scaleMinSpace:20,onlyInteger:!1},width:void 0,height:void 0,showLine:!0,showPoint:!0,showArea:!1,areaBase:0,lineSmooth:!0,low:void 0,high:void 0,chartPadding:{top:15,right:15,bottom:5,left:10},fullWidth:!1,reverseData:!1,classNames:{chart:"ct-chart-line",label:"ct-label",labelGroup:"ct-labels",series:"ct-series",line:"ct-line",point:"ct-point",area:"ct-area",grid:"ct-grid",gridGroup:"ct-grids",vertical:"ct-vertical",horizontal:"ct-horizontal",start:"ct-start",end:"ct-end"}};c.Line=c.Base.extend({constructor:e,createChart:d})}(window,document,a),function(a,b,c){"use strict";function d(a){var b,d={raw:this.data,normalized:a.distributeSeries?c.getDataArray(this.data,a.reverseData,a.horizontalBars?"x":"y").map(function(a){return[a]}):c.getDataArray(this.data,a.reverseData,a.horizontalBars?"x":"y")};this.svg=c.createSvg(this.container,a.width,a.height,a.classNames.chart+(a.horizontalBars?" "+a.classNames.horizontalBars:""));var e=this.svg.elem("g").addClass(a.classNames.gridGroup),g=this.svg.elem("g"),h=this.svg.elem("g").addClass(a.classNames.labelGroup);if(a.stackBars){var i=c.serialMap(d.normalized,function(){return Array.prototype.slice.call(arguments).map(function(a){return a}).reduce(function(a,b){return{x:a.x+b.x||0,y:a.y+b.y||0}},{x:0,y:0})});b=c.getHighLow([i],c.extend({},a,{referenceValue:0}),a.horizontalBars?"x":"y")}else b=c.getHighLow(d.normalized,c.extend({},a,{referenceValue:0}),a.horizontalBars?"x":"y");b.high=+a.high||(0===a.high?0:b.high),b.low=+a.low||(0===a.low?0:b.low);var j,k,l,m,n,o=c.createChartRect(this.svg,a,f.padding);k=a.distributeSeries&&a.stackBars?d.raw.labels.slice(0,1):d.raw.labels,a.horizontalBars?(j=m=void 0===a.axisX.type?new c.AutoScaleAxis(c.Axis.units.x,d,o,c.extend({},a.axisX,{highLow:b,referenceValue:0})):a.axisX.type.call(c,c.Axis.units.x,d,o,c.extend({},a.axisX,{highLow:b,referenceValue:0})),l=n=void 0===a.axisY.type?new c.StepAxis(c.Axis.units.y,d,o,{ticks:k}):a.axisY.type.call(c,c.Axis.units.y,d,o,a.axisY)):(l=m=void 0===a.axisX.type?new c.StepAxis(c.Axis.units.x,d,o,{ticks:k}):a.axisX.type.call(c,c.Axis.units.x,d,o,a.axisX),j=n=void 0===a.axisY.type?new c.AutoScaleAxis(c.Axis.units.y,d,o,c.extend({},a.axisY,{highLow:b,referenceValue:0})):a.axisY.type.call(c,c.Axis.units.y,d,o,c.extend({},a.axisY,{highLow:b,referenceValue:0})));var p=a.horizontalBars?o.x1+j.projectValue(0):o.y1-j.projectValue(0),q=[];l.createGridAndLabels(e,h,this.supportsForeignObject,a,this.eventEmitter),j.createGridAndLabels(e,h,this.supportsForeignObject,a,this.eventEmitter),d.raw.series.forEach(function(b,e){var f,h,i=e-(d.raw.series.length-1)/2;f=a.distributeSeries&&!a.stackBars?l.axisLength/d.normalized.length/2:a.distributeSeries&&a.stackBars?l.axisLength/2:l.axisLength/d.normalized[e].length/2,h=g.elem("g"),h.attr({"series-name":b.name,meta:c.serialize(b.meta)},c.xmlNs.uri),h.addClass([a.classNames.series,b.className||a.classNames.series+"-"+c.alphaNumerate(e)].join(" ")),d.normalized[e].forEach(function(g,k){var r,s,t,u;if(u=a.distributeSeries&&!a.stackBars?e:a.distributeSeries&&a.stackBars?0:k,r=a.horizontalBars?{x:o.x1+j.projectValue(g&&g.x?g.x:0,k,d.normalized[e]),y:o.y1-l.projectValue(g&&g.y?g.y:0,u,d.normalized[e])}:{x:o.x1+l.projectValue(g&&g.x?g.x:0,u,d.normalized[e]),y:o.y1-j.projectValue(g&&g.y?g.y:0,k,d.normalized[e])},l instanceof c.StepAxis&&(l.options.stretch||(r[l.units.pos]+=f*(a.horizontalBars?-1:1)),r[l.units.pos]+=a.stackBars||a.distributeSeries?0:i*a.seriesBarDistance*(a.horizontalBars?-1:1)),t=q[k]||p,q[k]=t-(p-r[l.counterUnits.pos]),void 0!==g){var v={};v[l.units.pos+"1"]=r[l.units.pos],v[l.units.pos+"2"]=r[l.units.pos],v[l.counterUnits.pos+"1"]=a.stackBars?t:p,v[l.counterUnits.pos+"2"]=a.stackBars?q[k]:r[l.counterUnits.pos],v.x1=Math.min(Math.max(v.x1,o.x1),o.x2),v.x2=Math.min(Math.max(v.x2,o.x1),o.x2),v.y1=Math.min(Math.max(v.y1,o.y2),o.y1),v.y2=Math.min(Math.max(v.y2,o.y2),o.y1),s=h.elem("line",v,a.classNames.bar).attr({value:[g.x,g.y].filter(function(a){return a}).join(","),meta:c.getMetaData(b,k)},c.xmlNs.uri), +this.eventEmitter.emit("draw",c.extend({type:"bar",value:g,index:k,meta:c.getMetaData(b,k),series:b,seriesIndex:e,axisX:m,axisY:n,chartRect:o,group:h,element:s},v))}}.bind(this))}.bind(this)),this.eventEmitter.emit("created",{bounds:j.bounds,chartRect:o,axisX:m,axisY:n,svg:this.svg,options:a})}function e(a,b,d,e){c.Bar["super"].constructor.call(this,a,b,f,c.extend({},f,d),e)}var f={axisX:{offset:30,position:"end",labelOffset:{x:0,y:0},showLabel:!0,showGrid:!0,labelInterpolationFnc:c.noop,scaleMinSpace:30,onlyInteger:!1},axisY:{offset:40,position:"start",labelOffset:{x:0,y:0},showLabel:!0,showGrid:!0,labelInterpolationFnc:c.noop,scaleMinSpace:20,onlyInteger:!1},width:void 0,height:void 0,high:void 0,low:void 0,onlyInteger:!1,chartPadding:{top:15,right:15,bottom:5,left:10},seriesBarDistance:15,stackBars:!1,horizontalBars:!1,distributeSeries:!1,reverseData:!1,classNames:{chart:"ct-chart-bar",horizontalBars:"ct-horizontal-bars",label:"ct-label",labelGroup:"ct-labels",series:"ct-series",bar:"ct-bar",grid:"ct-grid",gridGroup:"ct-grids",vertical:"ct-vertical",horizontal:"ct-horizontal",start:"ct-start",end:"ct-end"}};c.Bar=c.Base.extend({constructor:e,createChart:d})}(window,document,a),function(a,b,c){"use strict";function d(a,b,c){var d=b.x>a.x;return d&&"explode"===c||!d&&"implode"===c?"start":d&&"implode"===c||!d&&"explode"===c?"end":"middle"}function e(a){var b,e,f,h,i,j=[],k=a.startAngle,l=c.getDataArray(this.data,a.reverseData);this.svg=c.createSvg(this.container,a.width,a.height,a.donut?a.classNames.chartDonut:a.classNames.chartPie),e=c.createChartRect(this.svg,a,g.padding),f=Math.min(e.width()/2,e.height()/2),i=a.total||l.reduce(function(a,b){return a+b},0),f-=a.donut?a.donutWidth/2:0,h="outside"===a.labelPosition||a.donut?f:"center"===a.labelPosition?0:f/2,h+=a.labelOffset;var m={x:e.x1+e.width()/2,y:e.y2+e.height()/2},n=1===this.data.series.filter(function(a){return a.hasOwnProperty("value")?0!==a.value:0!==a}).length;a.showLabel&&(b=this.svg.elem("g",null,null,!0));for(var o=0;o180,0,r.x,r.y);a.donut||t.line(m.x,m.y);var u=j[o].elem("path",{d:t.stringify()},a.donut?a.classNames.sliceDonut:a.classNames.slicePie);if(u.attr({value:l[o],meta:c.serialize(p.meta)},c.xmlNs.uri),a.donut&&u.attr({style:"stroke-width: "+ +a.donutWidth+"px"}),this.eventEmitter.emit("draw",{type:"slice",value:l[o],totalDataSum:i,index:o,meta:p.meta,series:p,group:j[o],element:u,path:t.clone(),center:m,radius:f,startAngle:k,endAngle:q}),a.showLabel){var v=c.polarToCartesian(m.x,m.y,h,k+(q-k)/2),w=a.labelInterpolationFnc(this.data.labels?this.data.labels[o]:l[o],o);if(w||0===w){var x=b.elem("text",{dx:v.x,dy:v.y,"text-anchor":d(m,v,a.labelDirection)},a.classNames.label).text(""+w);this.eventEmitter.emit("draw",{type:"label",index:o,group:b,element:x,text:""+w,x:v.x,y:v.y})}}k=q}this.eventEmitter.emit("created",{chartRect:e,svg:this.svg,options:a})}function f(a,b,d,e){c.Pie["super"].constructor.call(this,a,b,g,c.extend({},g,d),e)}var g={width:void 0,height:void 0,chartPadding:5,classNames:{chartPie:"ct-chart-pie",chartDonut:"ct-chart-donut",series:"ct-series",slicePie:"ct-slice-pie",sliceDonut:"ct-slice-donut",label:"ct-label"},startAngle:0,total:void 0,donut:!1,donutWidth:60,showLabel:!0,labelOffset:0,labelPosition:"inside",labelInterpolationFnc:c.noop,labelDirection:"neutral",reverseData:!1};c.Pie=c.Base.extend({constructor:f,createChart:e,determineAnchorPosition:d})}(window,document,a),a}); +//# sourceMappingURL=chartist.min.js.map \ No newline at end of file diff --git a/public/assets/dashboard/js/demo.js b/public/assets/dashboard/js/demo.js new file mode 100755 index 0000000..46c99eb --- /dev/null +++ b/public/assets/dashboard/js/demo.js @@ -0,0 +1,183 @@ +type = ['','info','success','warning','danger']; + + +demo = { + initPickColor: function(){ + $('.pick-class-label').click(function(){ + var new_class = $(this).attr('new-class'); + var old_class = $('#display-buttons').attr('data-class'); + var display_div = $('#display-buttons'); + if(display_div.length) { + var display_buttons = display_div.find('.btn'); + display_buttons.removeClass(old_class); + display_buttons.addClass(new_class); + display_div.attr('data-class', new_class); + } + }); + }, + + initFormExtendedDatetimepickers: function(){ + $('.datetimepicker').datetimepicker({ + icons: { + time: "fa fa-clock-o", + date: "fa fa-calendar", + up: "fa fa-chevron-up", + down: "fa fa-chevron-down", + previous: 'fa fa-chevron-left', + next: 'fa fa-chevron-right', + today: 'fa fa-screenshot', + clear: 'fa fa-trash', + close: 'fa fa-remove' + } + }); + }, + + initDocumentationCharts: function(){ + /* ----------========== Daily Sales Chart initialization For Documentation ==========---------- */ + + dataDailySalesChart = { + labels: ['M', 'T', 'W', 'T', 'F', 'S', 'S'], + series: [ + [12, 17, 7, 17, 23, 18, 38] + ] + }; + + optionsDailySalesChart = { + lineSmooth: Chartist.Interpolation.cardinal({ + tension: 0 + }), + low: 0, + high: 50, // creative tim: we recommend you to set the high sa the biggest value + something for a better look + chartPadding: { top: 0, right: 0, bottom: 0, left: 0}, + } + + var dailySalesChart = new Chartist.Line('#dailySalesChart', dataDailySalesChart, optionsDailySalesChart); + + md.startAnimationForLineChart(dailySalesChart); + }, + + initDashboardPageCharts: function(){ + + /* ----------========== Daily Sales Chart initialization ==========---------- */ + + dataDailySalesChart = { + labels: ['M', 'T', 'W', 'T', 'F', 'S', 'S'], + series: [ + [12, 17, 7, 17, 23, 18, 38] + ] + }; + + optionsDailySalesChart = { + lineSmooth: Chartist.Interpolation.cardinal({ + tension: 0 + }), + low: 0, + high: 50, // creative tim: we recommend you to set the high sa the biggest value + something for a better look + chartPadding: { top: 0, right: 0, bottom: 0, left: 0}, + } + + var dailySalesChart = new Chartist.Line('#dailySalesChart', dataDailySalesChart, optionsDailySalesChart); + + md.startAnimationForLineChart(dailySalesChart); + + + + /* ----------========== Completed Tasks Chart initialization ==========---------- */ + + dataCompletedTasksChart = { + labels: ['12am', '3pm', '6pm', '9pm', '12pm', '3am', '6am', '9am'], + series: [ + [230, 750, 450, 300, 280, 240, 200, 190] + ] + }; + + optionsCompletedTasksChart = { + lineSmooth: Chartist.Interpolation.cardinal({ + tension: 0 + }), + low: 0, + high: 1000, // creative tim: we recommend you to set the high sa the biggest value + something for a better look + chartPadding: { top: 0, right: 0, bottom: 0, left: 0} + } + + var completedTasksChart = new Chartist.Line('#completedTasksChart', dataCompletedTasksChart, optionsCompletedTasksChart); + + // start animation for the Completed Tasks Chart - Line Chart + md.startAnimationForLineChart(completedTasksChart); + + + + /* ----------========== Emails Subscription Chart initialization ==========---------- */ + + var dataEmailsSubscriptionChart = { + labels: ['Jan', 'Feb', 'Mar', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], + series: [ + [542, 443, 320, 780, 553, 453, 326, 434, 568, 610, 756, 895] + + ] + }; + var optionsEmailsSubscriptionChart = { + axisX: { + showGrid: false + }, + low: 0, + high: 1000, + chartPadding: { top: 0, right: 5, bottom: 0, left: 0} + }; + var responsiveOptions = [ + ['screen and (max-width: 640px)', { + seriesBarDistance: 5, + axisX: { + labelInterpolationFnc: function (value) { + return value[0]; + } + } + }] + ]; + var emailsSubscriptionChart = Chartist.Bar('#emailsSubscriptionChart', dataEmailsSubscriptionChart, optionsEmailsSubscriptionChart, responsiveOptions); + + //start animation for the Emails Subscription Chart + md.startAnimationForBarChart(emailsSubscriptionChart); + + }, + + initGoogleMaps: function(){ + var myLatlng = new google.maps.LatLng(40.748817, -73.985428); + var mapOptions = { + zoom: 13, + center: myLatlng, + scrollwheel: false, //we disable de scroll over the map, it is a really annoing when you scroll through page + styles: [{"featureType":"water","stylers":[{"saturation":43},{"lightness":-11},{"hue":"#0088ff"}]},{"featureType":"road","elementType":"geometry.fill","stylers":[{"hue":"#ff0000"},{"saturation":-100},{"lightness":99}]},{"featureType":"road","elementType":"geometry.stroke","stylers":[{"color":"#808080"},{"lightness":54}]},{"featureType":"landscape.man_made","elementType":"geometry.fill","stylers":[{"color":"#ece2d9"}]},{"featureType":"poi.park","elementType":"geometry.fill","stylers":[{"color":"#ccdca1"}]},{"featureType":"road","elementType":"labels.text.fill","stylers":[{"color":"#767676"}]},{"featureType":"road","elementType":"labels.text.stroke","stylers":[{"color":"#ffffff"}]},{"featureType":"poi","stylers":[{"visibility":"off"}]},{"featureType":"landscape.natural","elementType":"geometry.fill","stylers":[{"visibility":"on"},{"color":"#b8cb93"}]},{"featureType":"poi.park","stylers":[{"visibility":"on"}]},{"featureType":"poi.sports_complex","stylers":[{"visibility":"on"}]},{"featureType":"poi.medical","stylers":[{"visibility":"on"}]},{"featureType":"poi.business","stylers":[{"visibility":"simplified"}]}] + + } + var map = new google.maps.Map(document.getElementById("map"), mapOptions); + + var marker = new google.maps.Marker({ + position: myLatlng, + title:"Hello World!" + }); + + // To add the marker to the map, call setMap(); + marker.setMap(map); + }, + + showNotification: function(from, align){ + color = Math.floor((Math.random() * 4) + 1); + + $.notify({ + icon: "notifications", + message: "Welcome to Material Dashboard - a beautiful freebie for every web developer." + + },{ + type: type[color], + timer: 4000, + placement: { + from: from, + align: align + } + }); + } + + + +} diff --git a/public/assets/dashboard/js/jquery-3.1.0.min.js b/public/assets/dashboard/js/jquery-3.1.0.min.js new file mode 100644 index 0000000..f6a6a99 --- /dev/null +++ b/public/assets/dashboard/js/jquery-3.1.0.min.js @@ -0,0 +1,4 @@ +/*! jQuery v3.1.0 | (c) jQuery Foundation | jquery.org/license */ +!function(a,b){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){"use strict";var c=[],d=a.document,e=Object.getPrototypeOf,f=c.slice,g=c.concat,h=c.push,i=c.indexOf,j={},k=j.toString,l=j.hasOwnProperty,m=l.toString,n=m.call(Object),o={};function p(a,b){b=b||d;var c=b.createElement("script");c.text=a,b.head.appendChild(c).parentNode.removeChild(c)}var q="3.1.0",r=function(a,b){return new r.fn.init(a,b)},s=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,t=/^-ms-/,u=/-([a-z])/g,v=function(a,b){return b.toUpperCase()};r.fn=r.prototype={jquery:q,constructor:r,length:0,toArray:function(){return f.call(this)},get:function(a){return null!=a?a<0?this[a+this.length]:this[a]:f.call(this)},pushStack:function(a){var b=r.merge(this.constructor(),a);return b.prevObject=this,b},each:function(a){return r.each(this,a)},map:function(a){return this.pushStack(r.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(f.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(a<0?b:0);return this.pushStack(c>=0&&c0&&b-1 in a)}var x=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=function(a,b){for(var c=0,d=a.length;c+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(N),U=new RegExp("^"+L+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L+"|[*])"),ATTR:new RegExp("^"+M),PSEUDO:new RegExp("^"+N),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),aa=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:d<0?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ba=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,ca=function(a,b){return b?"\0"===a?"\ufffd":a.slice(0,-1)+"\\"+a.charCodeAt(a.length-1).toString(16)+" ":"\\"+a},da=function(){m()},ea=ta(function(a){return a.disabled===!0},{dir:"parentNode",next:"legend"});try{G.apply(D=H.call(v.childNodes),v.childNodes),D[v.childNodes.length].nodeType}catch(fa){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s=b&&b.ownerDocument,w=b?b.nodeType:9;if(d=d||[],"string"!=typeof a||!a||1!==w&&9!==w&&11!==w)return d;if(!e&&((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,p)){if(11!==w&&(l=Z.exec(a)))if(f=l[1]){if(9===w){if(!(j=b.getElementById(f)))return d;if(j.id===f)return d.push(j),d}else if(s&&(j=s.getElementById(f))&&t(b,j)&&j.id===f)return d.push(j),d}else{if(l[2])return G.apply(d,b.getElementsByTagName(a)),d;if((f=l[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(f)),d}if(c.qsa&&!A[a+" "]&&(!q||!q.test(a))){if(1!==w)s=b,r=a;else if("object"!==b.nodeName.toLowerCase()){(k=b.getAttribute("id"))?k=k.replace(ba,ca):b.setAttribute("id",k=u),o=g(a),h=o.length;while(h--)o[h]="#"+k+" "+sa(o[h]);r=o.join(","),s=$.test(a)&&qa(b.parentNode)||b}if(r)try{return G.apply(d,s.querySelectorAll(r)),d}catch(x){}finally{k===u&&b.removeAttribute("id")}}}return i(a.replace(P,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("fieldset");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&a.sourceIndex-b.sourceIndex;if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return function(b){return"label"in b&&b.disabled===a||"form"in b&&b.disabled===a||"form"in b&&b.disabled===!1&&(b.isDisabled===a||b.isDisabled!==!a&&("label"in b||!ea(b))!==a)}}function pa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function qa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return!!b&&"HTML"!==b.nodeName},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=n.documentElement,p=!f(n),v!==n&&(e=n.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",da,!1):e.attachEvent&&e.attachEvent("onunload",da)),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(n.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(n.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!n.getElementsByName||!n.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c?[c]:[]}},d.filter.ID=function(a){var b=a.replace(_,aa);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(_,aa);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){if("undefined"!=typeof b.getElementsByClassName&&p)return b.getElementsByClassName(a)},r=[],q=[],(c.qsa=Y.test(n.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){a.innerHTML="";var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+K+"*[*^$|!~]?="),2!==a.querySelectorAll(":enabled").length&&q.push(":enabled",":disabled"),o.appendChild(a).disabled=!0,2!==a.querySelectorAll(":disabled").length&&q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Y.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"*"),s.call(a,"[s!='']:x"),r.push("!=",N)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Y.test(o.compareDocumentPosition),t=b||Y.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===n||a.ownerDocument===v&&t(v,a)?-1:b===n||b.ownerDocument===v&&t(v,b)?1:k?I(k,a)-I(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===n?-1:b===n?1:e?-1:f?1:k?I(k,a)-I(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)g.unshift(c);c=b;while(c=c.parentNode)h.unshift(c);while(g[d]===h[d])d++;return d?la(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(S,"='$1']"),c.matchesSelector&&p&&!A[b+" "]&&(!r||!r.test(b))&&(!q||!q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.escape=function(a){return(a+"").replace(ba,ca)},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(_,aa),a[3]=(a[3]||a[4]||a[5]||"").replace(_,aa),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return V.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&T.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(_,aa).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:!b||(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(O," ")+" ").indexOf(c)>-1:"|="===b&&(e===c||e.slice(0,c.length+1)===c+"-"))}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){while(p){m=b;while(m=m[p])if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){m=q,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n&&j[2],m=n&&q.childNodes[n];while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if(1===m.nodeType&&++t&&m===b){k[a]=[w,n,t];break}}else if(s&&(m=b,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n),t===!1)while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if((h?m.nodeName.toLowerCase()===r:1===m.nodeType)&&++t&&(s&&(l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[w,t]),m===b))break;return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(P,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(_,aa),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return U.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(_,aa).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:oa(!1),disabled:oa(!0),checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:pa(function(){return[0]}),last:pa(function(a,b){return[b-1]}),eq:pa(function(a,b,c){return[c<0?c+b:c]}),even:pa(function(a,b){for(var c=0;c=0;)a.push(d);return a}),gt:pa(function(a,b,c){for(var d=c<0?c+b:c;++d1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function va(a,b,c){for(var d=0,e=b.length;d-1&&(f[j]=!(g[j]=l))}}else r=wa(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ya(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ta(function(a){return a===b},h,!0),l=ta(function(a){return I(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];i1&&ua(m),i>1&&sa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(P,"$1"),c,i0,e=a.length>0,f=function(f,g,h,i,k){var l,o,q,r=0,s="0",t=f&&[],u=[],v=j,x=f||e&&d.find.TAG("*",k),y=w+=null==v?1:Math.random()||.1,z=x.length;for(k&&(j=g===n||g||k);s!==z&&null!=(l=x[s]);s++){if(e&&l){o=0,g||l.ownerDocument===n||(m(l),h=!p);while(q=a[o++])if(q(l,g||n,h)){i.push(l);break}k&&(w=y)}c&&((l=!q&&l)&&r--,f&&t.push(l))}if(r+=s,c&&s!==r){o=0;while(q=b[o++])q(t,u,g,h);if(f){if(r>0)while(s--)t[s]||u[s]||(u[s]=E.call(i));u=wa(u)}G.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&ga.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=ya(b[c]),f[u]?d.push(f):e.push(f);f=A(a,za(e,d)),f.selector=a}return f},i=ga.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(_,aa),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=V.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(_,aa),$.test(j[0].type)&&qa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&sa(j),!a)return G.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,!b||$.test(a)&&qa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("fieldset"))}),ja(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){if(!c)return a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){if(!c&&"input"===a.nodeName.toLowerCase())return a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(J,function(a,b,c){var d;if(!c)return a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);r.find=x,r.expr=x.selectors,r.expr[":"]=r.expr.pseudos,r.uniqueSort=r.unique=x.uniqueSort,r.text=x.getText,r.isXMLDoc=x.isXML,r.contains=x.contains,r.escapeSelector=x.escape;var y=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&r(a).is(c))break;d.push(a)}return d},z=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},A=r.expr.match.needsContext,B=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,C=/^.[^:#\[\.,]*$/;function D(a,b,c){if(r.isFunction(b))return r.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return r.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(C.test(b))return r.filter(b,a,c);b=r.filter(b,a)}return r.grep(a,function(a){return i.call(b,a)>-1!==c&&1===a.nodeType})}r.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?r.find.matchesSelector(d,a)?[d]:[]:r.find.matches(a,r.grep(b,function(a){return 1===a.nodeType}))},r.fn.extend({find:function(a){var b,c,d=this.length,e=this;if("string"!=typeof a)return this.pushStack(r(a).filter(function(){for(b=0;b1?r.uniqueSort(c):c},filter:function(a){return this.pushStack(D(this,a||[],!1))},not:function(a){return this.pushStack(D(this,a||[],!0))},is:function(a){return!!D(this,"string"==typeof a&&A.test(a)?r(a):a||[],!1).length}});var E,F=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,G=r.fn.init=function(a,b,c){var e,f;if(!a)return this;if(c=c||E,"string"==typeof a){if(e="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:F.exec(a),!e||!e[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof r?b[0]:b,r.merge(this,r.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),B.test(e[1])&&r.isPlainObject(b))for(e in b)r.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}return f=d.getElementById(e[2]),f&&(this[0]=f,this.length=1),this}return a.nodeType?(this[0]=a,this.length=1,this):r.isFunction(a)?void 0!==c.ready?c.ready(a):a(r):r.makeArray(a,this)};G.prototype=r.fn,E=r(d);var H=/^(?:parents|prev(?:Until|All))/,I={children:!0,contents:!0,next:!0,prev:!0};r.fn.extend({has:function(a){var b=r(a,this),c=b.length;return this.filter(function(){for(var a=0;a-1:1===c.nodeType&&r.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?r.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?i.call(r(a),this[0]):i.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(r.uniqueSort(r.merge(this.get(),r(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function J(a,b){while((a=a[b])&&1!==a.nodeType);return a}r.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return y(a,"parentNode")},parentsUntil:function(a,b,c){return y(a,"parentNode",c)},next:function(a){return J(a,"nextSibling")},prev:function(a){return J(a,"previousSibling")},nextAll:function(a){return y(a,"nextSibling")},prevAll:function(a){return y(a,"previousSibling")},nextUntil:function(a,b,c){return y(a,"nextSibling",c)},prevUntil:function(a,b,c){return y(a,"previousSibling",c)},siblings:function(a){return z((a.parentNode||{}).firstChild,a)},children:function(a){return z(a.firstChild)},contents:function(a){return a.contentDocument||r.merge([],a.childNodes)}},function(a,b){r.fn[a]=function(c,d){var e=r.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=r.filter(d,e)),this.length>1&&(I[a]||r.uniqueSort(e),H.test(a)&&e.reverse()),this.pushStack(e)}});var K=/\S+/g;function L(a){var b={};return r.each(a.match(K)||[],function(a,c){b[c]=!0}),b}r.Callbacks=function(a){a="string"==typeof a?L(a):r.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h-1)f.splice(c,1),c<=h&&h--}),this},has:function(a){return a?r.inArray(a,f)>-1:f.length>0},empty:function(){return f&&(f=[]),this},disable:function(){return e=g=[],f=c="",this},disabled:function(){return!f},lock:function(){return e=g=[],c||b||(f=c=""),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],g.push(c),b||i()),this},fire:function(){return j.fireWith(this,arguments),this},fired:function(){return!!d}};return j};function M(a){return a}function N(a){throw a}function O(a,b,c){var d;try{a&&r.isFunction(d=a.promise)?d.call(a).done(b).fail(c):a&&r.isFunction(d=a.then)?d.call(a,b,c):b.call(void 0,a)}catch(a){c.call(void 0,a)}}r.extend({Deferred:function(b){var c=[["notify","progress",r.Callbacks("memory"),r.Callbacks("memory"),2],["resolve","done",r.Callbacks("once memory"),r.Callbacks("once memory"),0,"resolved"],["reject","fail",r.Callbacks("once memory"),r.Callbacks("once memory"),1,"rejected"]],d="pending",e={state:function(){return d},always:function(){return f.done(arguments).fail(arguments),this},"catch":function(a){return e.then(null,a)},pipe:function(){var a=arguments;return r.Deferred(function(b){r.each(c,function(c,d){var e=r.isFunction(a[d[4]])&&a[d[4]];f[d[1]](function(){var a=e&&e.apply(this,arguments);a&&r.isFunction(a.promise)?a.promise().progress(b.notify).done(b.resolve).fail(b.reject):b[d[0]+"With"](this,e?[a]:arguments)})}),a=null}).promise()},then:function(b,d,e){var f=0;function g(b,c,d,e){return function(){var h=this,i=arguments,j=function(){var a,j;if(!(b=f&&(d!==N&&(h=void 0,i=[a]),c.rejectWith(h,i))}};b?k():(r.Deferred.getStackHook&&(k.stackTrace=r.Deferred.getStackHook()),a.setTimeout(k))}}return r.Deferred(function(a){c[0][3].add(g(0,a,r.isFunction(e)?e:M,a.notifyWith)),c[1][3].add(g(0,a,r.isFunction(b)?b:M)),c[2][3].add(g(0,a,r.isFunction(d)?d:N))}).promise()},promise:function(a){return null!=a?r.extend(a,e):e}},f={};return r.each(c,function(a,b){var g=b[2],h=b[5];e[b[1]]=g.add,h&&g.add(function(){d=h},c[3-a][2].disable,c[0][2].lock),g.add(b[3].fire),f[b[0]]=function(){return f[b[0]+"With"](this===f?void 0:this,arguments),this},f[b[0]+"With"]=g.fireWith}),e.promise(f),b&&b.call(f,f),f},when:function(a){var b=arguments.length,c=b,d=Array(c),e=f.call(arguments),g=r.Deferred(),h=function(a){return function(c){d[a]=this,e[a]=arguments.length>1?f.call(arguments):c,--b||g.resolveWith(d,e)}};if(b<=1&&(O(a,g.done(h(c)).resolve,g.reject),"pending"===g.state()||r.isFunction(e[c]&&e[c].then)))return g.then();while(c--)O(e[c],h(c),g.reject);return g.promise()}});var P=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;r.Deferred.exceptionHook=function(b,c){a.console&&a.console.warn&&b&&P.test(b.name)&&a.console.warn("jQuery.Deferred exception: "+b.message,b.stack,c)},r.readyException=function(b){a.setTimeout(function(){throw b})};var Q=r.Deferred();r.fn.ready=function(a){return Q.then(a)["catch"](function(a){r.readyException(a)}),this},r.extend({isReady:!1,readyWait:1,holdReady:function(a){a?r.readyWait++:r.ready(!0)},ready:function(a){(a===!0?--r.readyWait:r.isReady)||(r.isReady=!0,a!==!0&&--r.readyWait>0||Q.resolveWith(d,[r]))}}),r.ready.then=Q.then;function R(){d.removeEventListener("DOMContentLoaded",R),a.removeEventListener("load",R),r.ready()}"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll?a.setTimeout(r.ready):(d.addEventListener("DOMContentLoaded",R),a.addEventListener("load",R));var S=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===r.type(c)){e=!0;for(h in c)S(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0, +r.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(r(a),c)})),b))for(;h1,null,!0)},removeData:function(a){return this.each(function(){W.remove(this,a)})}}),r.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=V.get(a,b),c&&(!d||r.isArray(c)?d=V.access(a,b,r.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=r.queue(a,b),d=c.length,e=c.shift(),f=r._queueHooks(a,b),g=function(){r.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return V.get(a,c)||V.access(a,c,{empty:r.Callbacks("once memory").add(function(){V.remove(a,[b+"queue",c])})})}}),r.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length\x20\t\r\n\f]+)/i,ja=/^$|\/(?:java|ecma)script/i,ka={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};ka.optgroup=ka.option,ka.tbody=ka.tfoot=ka.colgroup=ka.caption=ka.thead,ka.th=ka.td;function la(a,b){var c="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&r.nodeName(a,b)?r.merge([a],c):c}function ma(a,b){for(var c=0,d=a.length;c-1)e&&e.push(f);else if(j=r.contains(f.ownerDocument,f),g=la(l.appendChild(f),"script"),j&&ma(g),c){k=0;while(f=g[k++])ja.test(f.type||"")&&c.push(f)}return l}!function(){var a=d.createDocumentFragment(),b=a.appendChild(d.createElement("div")),c=d.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),o.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="",o.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var pa=d.documentElement,qa=/^key/,ra=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,sa=/^([^.]*)(?:\.(.+)|)/;function ta(){return!0}function ua(){return!1}function va(){try{return d.activeElement}catch(a){}}function wa(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)wa(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=ua;else if(!e)return a;return 1===f&&(g=e,e=function(a){return r().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=r.guid++)),a.each(function(){r.event.add(this,b,e,d,c)})}r.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=V.get(a);if(q){c.handler&&(f=c,c=f.handler,e=f.selector),e&&r.find.matchesSelector(pa,e),c.guid||(c.guid=r.guid++),(i=q.events)||(i=q.events={}),(g=q.handle)||(g=q.handle=function(b){return"undefined"!=typeof r&&r.event.triggered!==b.type?r.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(K)||[""],j=b.length;while(j--)h=sa.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n&&(l=r.event.special[n]||{},n=(e?l.delegateType:l.bindType)||n,l=r.event.special[n]||{},k=r.extend({type:n,origType:p,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&r.expr.match.needsContext.test(e),namespace:o.join(".")},f),(m=i[n])||(m=i[n]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,o,g)!==!1||a.addEventListener&&a.addEventListener(n,g)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),r.event.global[n]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=V.hasData(a)&&V.get(a);if(q&&(i=q.events)){b=(b||"").match(K)||[""],j=b.length;while(j--)if(h=sa.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n){l=r.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=i[n]||[],h=h[2]&&new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&p!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,o,q.handle)!==!1||r.removeEvent(a,n,q.handle),delete i[n])}else for(n in i)r.event.remove(a,n+b[j],c,d,!0);r.isEmptyObject(i)&&V.remove(a,"handle events")}},dispatch:function(a){var b=r.event.fix(a),c,d,e,f,g,h,i=new Array(arguments.length),j=(V.get(this,"events")||{})[b.type]||[],k=r.event.special[b.type]||{};for(i[0]=b,c=1;c-1:r.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h\x20\t\r\n\f]*)[^>]*)\/>/gi,ya=/\s*$/g;function Ca(a,b){return r.nodeName(a,"table")&&r.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a:a}function Da(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function Ea(a){var b=Aa.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Fa(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(V.hasData(a)&&(f=V.access(a),g=V.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;c1&&"string"==typeof q&&!o.checkClone&&za.test(q))return a.each(function(e){var f=a.eq(e);s&&(b[0]=q.call(this,e,f.html())),Ha(f,b,c,d)});if(m&&(e=oa(b,a[0].ownerDocument,!1,a,d),f=e.firstChild,1===e.childNodes.length&&(e=f),f||d)){for(h=r.map(la(e,"script"),Da),i=h.length;l")},clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=r.contains(a.ownerDocument,a);if(!(o.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||r.isXMLDoc(a)))for(g=la(h),f=la(a),d=0,e=f.length;d0&&ma(g,!i&&la(a,"script")),h},cleanData:function(a){for(var b,c,d,e=r.event.special,f=0;void 0!==(c=a[f]);f++)if(T(c)){if(b=c[V.expando]){if(b.events)for(d in b.events)e[d]?r.event.remove(c,d):r.removeEvent(c,d,b.handle);c[V.expando]=void 0}c[W.expando]&&(c[W.expando]=void 0)}}}),r.fn.extend({detach:function(a){return Ia(this,a,!0)},remove:function(a){return Ia(this,a)},text:function(a){return S(this,function(a){return void 0===a?r.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=a)})},null,a,arguments.length)},append:function(){return Ha(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ca(this,a);b.appendChild(a)}})},prepend:function(){return Ha(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ca(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return Ha(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return Ha(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(r.cleanData(la(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null!=a&&a,b=null==b?a:b,this.map(function(){return r.clone(this,a,b)})},html:function(a){return S(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!ya.test(a)&&!ka[(ia.exec(a)||["",""])[1].toLowerCase()]){a=r.htmlPrefilter(a);try{for(;c1)}});function Xa(a,b,c,d,e){return new Xa.prototype.init(a,b,c,d,e)}r.Tween=Xa,Xa.prototype={constructor:Xa,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||r.easing._default,this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(r.cssNumber[c]?"":"px")},cur:function(){var a=Xa.propHooks[this.prop];return a&&a.get?a.get(this):Xa.propHooks._default.get(this)},run:function(a){var b,c=Xa.propHooks[this.prop];return this.options.duration?this.pos=b=r.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Xa.propHooks._default.set(this),this}},Xa.prototype.init.prototype=Xa.prototype,Xa.propHooks={_default:{get:function(a){var b;return 1!==a.elem.nodeType||null!=a.elem[a.prop]&&null==a.elem.style[a.prop]?a.elem[a.prop]:(b=r.css(a.elem,a.prop,""),b&&"auto"!==b?b:0)},set:function(a){r.fx.step[a.prop]?r.fx.step[a.prop](a):1!==a.elem.nodeType||null==a.elem.style[r.cssProps[a.prop]]&&!r.cssHooks[a.prop]?a.elem[a.prop]=a.now:r.style(a.elem,a.prop,a.now+a.unit)}}},Xa.propHooks.scrollTop=Xa.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},r.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2},_default:"swing"},r.fx=Xa.prototype.init,r.fx.step={};var Ya,Za,$a=/^(?:toggle|show|hide)$/,_a=/queueHooks$/;function ab(){Za&&(a.requestAnimationFrame(ab),r.fx.tick())}function bb(){return a.setTimeout(function(){Ya=void 0}),Ya=r.now()}function cb(a,b){var c,d=0,e={height:a};for(b=b?1:0;d<4;d+=2-b)c=aa[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function db(a,b,c){for(var d,e=(gb.tweeners[b]||[]).concat(gb.tweeners["*"]),f=0,g=e.length;f1)},removeAttr:function(a){return this.each(function(){r.removeAttr(this,a)})}}),r.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return"undefined"==typeof a.getAttribute?r.prop(a,b,c):(1===f&&r.isXMLDoc(a)||(e=r.attrHooks[b.toLowerCase()]||(r.expr.match.bool.test(b)?hb:void 0)),void 0!==c?null===c?void r.removeAttr(a,b):e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:(a.setAttribute(b,c+""),c):e&&"get"in e&&null!==(d=e.get(a,b))?d:(d=r.find.attr(a,b),null==d?void 0:d))},attrHooks:{type:{set:function(a,b){if(!o.radioValue&&"radio"===b&&r.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},removeAttr:function(a,b){var c,d=0,e=b&&b.match(K); +if(e&&1===a.nodeType)while(c=e[d++])a.removeAttribute(c)}}),hb={set:function(a,b,c){return b===!1?r.removeAttr(a,c):a.setAttribute(c,c),c}},r.each(r.expr.match.bool.source.match(/\w+/g),function(a,b){var c=ib[b]||r.find.attr;ib[b]=function(a,b,d){var e,f,g=b.toLowerCase();return d||(f=ib[g],ib[g]=e,e=null!=c(a,b,d)?g:null,ib[g]=f),e}});var jb=/^(?:input|select|textarea|button)$/i,kb=/^(?:a|area)$/i;r.fn.extend({prop:function(a,b){return S(this,r.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[r.propFix[a]||a]})}}),r.extend({prop:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return 1===f&&r.isXMLDoc(a)||(b=r.propFix[b]||b,e=r.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=r.find.attr(a,"tabindex");return b?parseInt(b,10):jb.test(a.nodeName)||kb.test(a.nodeName)&&a.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),o.optSelected||(r.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null},set:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}}),r.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){r.propFix[this.toLowerCase()]=this});var lb=/[\t\r\n\f]/g;function mb(a){return a.getAttribute&&a.getAttribute("class")||""}r.fn.extend({addClass:function(a){var b,c,d,e,f,g,h,i=0;if(r.isFunction(a))return this.each(function(b){r(this).addClass(a.call(this,b,mb(this)))});if("string"==typeof a&&a){b=a.match(K)||[];while(c=this[i++])if(e=mb(c),d=1===c.nodeType&&(" "+e+" ").replace(lb," ")){g=0;while(f=b[g++])d.indexOf(" "+f+" ")<0&&(d+=f+" ");h=r.trim(d),e!==h&&c.setAttribute("class",h)}}return this},removeClass:function(a){var b,c,d,e,f,g,h,i=0;if(r.isFunction(a))return this.each(function(b){r(this).removeClass(a.call(this,b,mb(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof a&&a){b=a.match(K)||[];while(c=this[i++])if(e=mb(c),d=1===c.nodeType&&(" "+e+" ").replace(lb," ")){g=0;while(f=b[g++])while(d.indexOf(" "+f+" ")>-1)d=d.replace(" "+f+" "," ");h=r.trim(d),e!==h&&c.setAttribute("class",h)}}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):r.isFunction(a)?this.each(function(c){r(this).toggleClass(a.call(this,c,mb(this),b),b)}):this.each(function(){var b,d,e,f;if("string"===c){d=0,e=r(this),f=a.match(K)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else void 0!==a&&"boolean"!==c||(b=mb(this),b&&V.set(this,"__className__",b),this.setAttribute&&this.setAttribute("class",b||a===!1?"":V.get(this,"__className__")||""))})},hasClass:function(a){var b,c,d=0;b=" "+a+" ";while(c=this[d++])if(1===c.nodeType&&(" "+mb(c)+" ").replace(lb," ").indexOf(b)>-1)return!0;return!1}});var nb=/\r/g,ob=/[\x20\t\r\n\f]+/g;r.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=r.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,r(this).val()):a,null==e?e="":"number"==typeof e?e+="":r.isArray(e)&&(e=r.map(e,function(a){return null==a?"":a+""})),b=r.valHooks[this.type]||r.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=r.valHooks[e.type]||r.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(nb,""):null==c?"":c)}}}),r.extend({valHooks:{option:{get:function(a){var b=r.find.attr(a,"value");return null!=b?b:r.trim(r.text(a)).replace(ob," ")}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type,g=f?null:[],h=f?e+1:d.length,i=e<0?h:f?e:0;i-1)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),r.each(["radio","checkbox"],function(){r.valHooks[this]={set:function(a,b){if(r.isArray(b))return a.checked=r.inArray(r(a).val(),b)>-1}},o.checkOn||(r.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var pb=/^(?:focusinfocus|focusoutblur)$/;r.extend(r.event,{trigger:function(b,c,e,f){var g,h,i,j,k,m,n,o=[e||d],p=l.call(b,"type")?b.type:b,q=l.call(b,"namespace")?b.namespace.split("."):[];if(h=i=e=e||d,3!==e.nodeType&&8!==e.nodeType&&!pb.test(p+r.event.triggered)&&(p.indexOf(".")>-1&&(q=p.split("."),p=q.shift(),q.sort()),k=p.indexOf(":")<0&&"on"+p,b=b[r.expando]?b:new r.Event(p,"object"==typeof b&&b),b.isTrigger=f?2:3,b.namespace=q.join("."),b.rnamespace=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=e),c=null==c?[b]:r.makeArray(c,[b]),n=r.event.special[p]||{},f||!n.trigger||n.trigger.apply(e,c)!==!1)){if(!f&&!n.noBubble&&!r.isWindow(e)){for(j=n.delegateType||p,pb.test(j+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),i=h;i===(e.ownerDocument||d)&&o.push(i.defaultView||i.parentWindow||a)}g=0;while((h=o[g++])&&!b.isPropagationStopped())b.type=g>1?j:n.bindType||p,m=(V.get(h,"events")||{})[b.type]&&V.get(h,"handle"),m&&m.apply(h,c),m=k&&h[k],m&&m.apply&&T(h)&&(b.result=m.apply(h,c),b.result===!1&&b.preventDefault());return b.type=p,f||b.isDefaultPrevented()||n._default&&n._default.apply(o.pop(),c)!==!1||!T(e)||k&&r.isFunction(e[p])&&!r.isWindow(e)&&(i=e[k],i&&(e[k]=null),r.event.triggered=p,e[p](),r.event.triggered=void 0,i&&(e[k]=i)),b.result}},simulate:function(a,b,c){var d=r.extend(new r.Event,c,{type:a,isSimulated:!0});r.event.trigger(d,null,b)}}),r.fn.extend({trigger:function(a,b){return this.each(function(){r.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];if(c)return r.event.trigger(a,b,c,!0)}}),r.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(a,b){r.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),r.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),o.focusin="onfocusin"in a,o.focusin||r.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){r.event.simulate(b,a.target,r.event.fix(a))};r.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=V.access(d,b);e||d.addEventListener(a,c,!0),V.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=V.access(d,b)-1;e?V.access(d,b,e):(d.removeEventListener(a,c,!0),V.remove(d,b))}}});var qb=a.location,rb=r.now(),sb=/\?/;r.parseXML=function(b){var c;if(!b||"string"!=typeof b)return null;try{c=(new a.DOMParser).parseFromString(b,"text/xml")}catch(d){c=void 0}return c&&!c.getElementsByTagName("parsererror").length||r.error("Invalid XML: "+b),c};var tb=/\[\]$/,ub=/\r?\n/g,vb=/^(?:submit|button|image|reset|file)$/i,wb=/^(?:input|select|textarea|keygen)/i;function xb(a,b,c,d){var e;if(r.isArray(b))r.each(b,function(b,e){c||tb.test(a)?d(a,e):xb(a+"["+("object"==typeof e&&null!=e?b:"")+"]",e,c,d)});else if(c||"object"!==r.type(b))d(a,b);else for(e in b)xb(a+"["+e+"]",b[e],c,d)}r.param=function(a,b){var c,d=[],e=function(a,b){var c=r.isFunction(b)?b():b;d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(null==c?"":c)};if(r.isArray(a)||a.jquery&&!r.isPlainObject(a))r.each(a,function(){e(this.name,this.value)});else for(c in a)xb(c,a[c],b,e);return d.join("&")},r.fn.extend({serialize:function(){return r.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=r.prop(this,"elements");return a?r.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!r(this).is(":disabled")&&wb.test(this.nodeName)&&!vb.test(a)&&(this.checked||!ha.test(a))}).map(function(a,b){var c=r(this).val();return null==c?null:r.isArray(c)?r.map(c,function(a){return{name:b.name,value:a.replace(ub,"\r\n")}}):{name:b.name,value:c.replace(ub,"\r\n")}}).get()}});var yb=/%20/g,zb=/#.*$/,Ab=/([?&])_=[^&]*/,Bb=/^(.*?):[ \t]*([^\r\n]*)$/gm,Cb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Db=/^(?:GET|HEAD)$/,Eb=/^\/\//,Fb={},Gb={},Hb="*/".concat("*"),Ib=d.createElement("a");Ib.href=qb.href;function Jb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(K)||[];if(r.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Kb(a,b,c,d){var e={},f=a===Gb;function g(h){var i;return e[h]=!0,r.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Lb(a,b){var c,d,e=r.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&r.extend(!0,a,d),a}function Mb(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}if(f)return f!==i[0]&&i.unshift(f),c[f]}function Nb(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}r.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:qb.href,type:"GET",isLocal:Cb.test(qb.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Hb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":r.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Lb(Lb(a,r.ajaxSettings),b):Lb(r.ajaxSettings,a)},ajaxPrefilter:Jb(Fb),ajaxTransport:Jb(Gb),ajax:function(b,c){"object"==typeof b&&(c=b,b=void 0),c=c||{};var e,f,g,h,i,j,k,l,m,n,o=r.ajaxSetup({},c),p=o.context||o,q=o.context&&(p.nodeType||p.jquery)?r(p):r.event,s=r.Deferred(),t=r.Callbacks("once memory"),u=o.statusCode||{},v={},w={},x="canceled",y={readyState:0,getResponseHeader:function(a){var b;if(k){if(!h){h={};while(b=Bb.exec(g))h[b[1].toLowerCase()]=b[2]}b=h[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return k?g:null},setRequestHeader:function(a,b){return null==k&&(a=w[a.toLowerCase()]=w[a.toLowerCase()]||a,v[a]=b),this},overrideMimeType:function(a){return null==k&&(o.mimeType=a),this},statusCode:function(a){var b;if(a)if(k)y.always(a[y.status]);else for(b in a)u[b]=[u[b],a[b]];return this},abort:function(a){var b=a||x;return e&&e.abort(b),A(0,b),this}};if(s.promise(y),o.url=((b||o.url||qb.href)+"").replace(Eb,qb.protocol+"//"),o.type=c.method||c.type||o.method||o.type,o.dataTypes=(o.dataType||"*").toLowerCase().match(K)||[""],null==o.crossDomain){j=d.createElement("a");try{j.href=o.url,j.href=j.href,o.crossDomain=Ib.protocol+"//"+Ib.host!=j.protocol+"//"+j.host}catch(z){o.crossDomain=!0}}if(o.data&&o.processData&&"string"!=typeof o.data&&(o.data=r.param(o.data,o.traditional)),Kb(Fb,o,c,y),k)return y;l=r.event&&o.global,l&&0===r.active++&&r.event.trigger("ajaxStart"),o.type=o.type.toUpperCase(),o.hasContent=!Db.test(o.type),f=o.url.replace(zb,""),o.hasContent?o.data&&o.processData&&0===(o.contentType||"").indexOf("application/x-www-form-urlencoded")&&(o.data=o.data.replace(yb,"+")):(n=o.url.slice(f.length),o.data&&(f+=(sb.test(f)?"&":"?")+o.data,delete o.data),o.cache===!1&&(f=f.replace(Ab,""),n=(sb.test(f)?"&":"?")+"_="+rb++ +n),o.url=f+n),o.ifModified&&(r.lastModified[f]&&y.setRequestHeader("If-Modified-Since",r.lastModified[f]),r.etag[f]&&y.setRequestHeader("If-None-Match",r.etag[f])),(o.data&&o.hasContent&&o.contentType!==!1||c.contentType)&&y.setRequestHeader("Content-Type",o.contentType),y.setRequestHeader("Accept",o.dataTypes[0]&&o.accepts[o.dataTypes[0]]?o.accepts[o.dataTypes[0]]+("*"!==o.dataTypes[0]?", "+Hb+"; q=0.01":""):o.accepts["*"]);for(m in o.headers)y.setRequestHeader(m,o.headers[m]);if(o.beforeSend&&(o.beforeSend.call(p,y,o)===!1||k))return y.abort();if(x="abort",t.add(o.complete),y.done(o.success),y.fail(o.error),e=Kb(Gb,o,c,y)){if(y.readyState=1,l&&q.trigger("ajaxSend",[y,o]),k)return y;o.async&&o.timeout>0&&(i=a.setTimeout(function(){y.abort("timeout")},o.timeout));try{k=!1,e.send(v,A)}catch(z){if(k)throw z;A(-1,z)}}else A(-1,"No Transport");function A(b,c,d,h){var j,m,n,v,w,x=c;k||(k=!0,i&&a.clearTimeout(i),e=void 0,g=h||"",y.readyState=b>0?4:0,j=b>=200&&b<300||304===b,d&&(v=Mb(o,y,d)),v=Nb(o,v,y,j),j?(o.ifModified&&(w=y.getResponseHeader("Last-Modified"),w&&(r.lastModified[f]=w),w=y.getResponseHeader("etag"),w&&(r.etag[f]=w)),204===b||"HEAD"===o.type?x="nocontent":304===b?x="notmodified":(x=v.state,m=v.data,n=v.error,j=!n)):(n=x,!b&&x||(x="error",b<0&&(b=0))),y.status=b,y.statusText=(c||x)+"",j?s.resolveWith(p,[m,x,y]):s.rejectWith(p,[y,x,n]),y.statusCode(u),u=void 0,l&&q.trigger(j?"ajaxSuccess":"ajaxError",[y,o,j?m:n]),t.fireWith(p,[y,x]),l&&(q.trigger("ajaxComplete",[y,o]),--r.active||r.event.trigger("ajaxStop")))}return y},getJSON:function(a,b,c){return r.get(a,b,c,"json")},getScript:function(a,b){return r.get(a,void 0,b,"script")}}),r.each(["get","post"],function(a,b){r[b]=function(a,c,d,e){return r.isFunction(c)&&(e=e||d,d=c,c=void 0),r.ajax(r.extend({url:a,type:b,dataType:e,data:c,success:d},r.isPlainObject(a)&&a))}}),r._evalUrl=function(a){return r.ajax({url:a,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},r.fn.extend({wrapAll:function(a){var b;return this[0]&&(r.isFunction(a)&&(a=a.call(this[0])),b=r(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this},wrapInner:function(a){return r.isFunction(a)?this.each(function(b){r(this).wrapInner(a.call(this,b))}):this.each(function(){var b=r(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=r.isFunction(a);return this.each(function(c){r(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(a){return this.parent(a).not("body").each(function(){r(this).replaceWith(this.childNodes)}),this}}),r.expr.pseudos.hidden=function(a){return!r.expr.pseudos.visible(a)},r.expr.pseudos.visible=function(a){return!!(a.offsetWidth||a.offsetHeight||a.getClientRects().length)},r.ajaxSettings.xhr=function(){try{return new a.XMLHttpRequest}catch(b){}};var Ob={0:200,1223:204},Pb=r.ajaxSettings.xhr();o.cors=!!Pb&&"withCredentials"in Pb,o.ajax=Pb=!!Pb,r.ajaxTransport(function(b){var c,d;if(o.cors||Pb&&!b.crossDomain)return{send:function(e,f){var g,h=b.xhr();if(h.open(b.type,b.url,b.async,b.username,b.password),b.xhrFields)for(g in b.xhrFields)h[g]=b.xhrFields[g];b.mimeType&&h.overrideMimeType&&h.overrideMimeType(b.mimeType),b.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest");for(g in e)h.setRequestHeader(g,e[g]);c=function(a){return function(){c&&(c=d=h.onload=h.onerror=h.onabort=h.onreadystatechange=null,"abort"===a?h.abort():"error"===a?"number"!=typeof h.status?f(0,"error"):f(h.status,h.statusText):f(Ob[h.status]||h.status,h.statusText,"text"!==(h.responseType||"text")||"string"!=typeof h.responseText?{binary:h.response}:{text:h.responseText},h.getAllResponseHeaders()))}},h.onload=c(),d=h.onerror=c("error"),void 0!==h.onabort?h.onabort=d:h.onreadystatechange=function(){4===h.readyState&&a.setTimeout(function(){c&&d()})},c=c("abort");try{h.send(b.hasContent&&b.data||null)}catch(i){if(c)throw i}},abort:function(){c&&c()}}}),r.ajaxPrefilter(function(a){a.crossDomain&&(a.contents.script=!1)}),r.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(a){return r.globalEval(a),a}}}),r.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),r.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(e,f){b=r(" Ivent - Some Rights Reserved +

+ + + + + + + + + + + + + + + + + diff --git a/resources/views/admeen/template/header.blade.php b/resources/views/admeen/template/header.blade.php new file mode 100644 index 0000000..a4b4d82 --- /dev/null +++ b/resources/views/admeen/template/header.blade.php @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/views/admeen/template/navbar.blade.php b/resources/views/admeen/template/navbar.blade.php new file mode 100644 index 0000000..8ed05e4 --- /dev/null +++ b/resources/views/admeen/template/navbar.blade.php @@ -0,0 +1,55 @@ + \ No newline at end of file diff --git a/resources/views/admeen/template/sidebar-2.blade.php b/resources/views/admeen/template/sidebar-2.blade.php new file mode 100644 index 0000000..ea73d72 --- /dev/null +++ b/resources/views/admeen/template/sidebar-2.blade.php @@ -0,0 +1,59 @@ + \ No newline at end of file diff --git a/resources/views/admeen/template/sidebar-3.blade.php b/resources/views/admeen/template/sidebar-3.blade.php new file mode 100644 index 0000000..b61b91c --- /dev/null +++ b/resources/views/admeen/template/sidebar-3.blade.php @@ -0,0 +1,59 @@ + \ No newline at end of file diff --git a/resources/views/admeen/template/sidebar-4.blade.php b/resources/views/admeen/template/sidebar-4.blade.php new file mode 100644 index 0000000..c76ebe8 --- /dev/null +++ b/resources/views/admeen/template/sidebar-4.blade.php @@ -0,0 +1,59 @@ + \ No newline at end of file diff --git a/resources/views/admeen/template/sidebar-5.blade.php b/resources/views/admeen/template/sidebar-5.blade.php new file mode 100644 index 0000000..489f32a --- /dev/null +++ b/resources/views/admeen/template/sidebar-5.blade.php @@ -0,0 +1,59 @@ + \ No newline at end of file diff --git a/resources/views/admeen/template/sidebar.blade.php b/resources/views/admeen/template/sidebar.blade.php new file mode 100644 index 0000000..0a5034d --- /dev/null +++ b/resources/views/admeen/template/sidebar.blade.php @@ -0,0 +1,71 @@ + \ No newline at end of file diff --git a/resources/views/admeen/tiket.blade.php b/resources/views/admeen/tiket.blade.php new file mode 100644 index 0000000..160871b --- /dev/null +++ b/resources/views/admeen/tiket.blade.php @@ -0,0 +1,102 @@ + @include('dash/template/header') + + Tiket - Ivent Dashboard + + +
+ + + @include('dash/template/sidebar-3') + + +
+ + + @include('dash/template/navbar') + + +
+
+
+
+
+
+
+
+

Tiket

+

Tiket event yang anda ikuti

+
+
+
+ 2 +
+
+
+
+
+
+
+ +
+
+

Discovery 3 : Hack Your City

+
+
+ event 23 Maret 2017 +
+
+ access_time 08:00 AM - 04:00 PM +
+
+ location_on Gd. Mas Soerachman Lt. 3 Universitas Jember +
+
+
+ Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt. +
+
+ +
+ +
+
+ +
+
+

Seminar Nasional : Build Your Future Business Today

+
+
+ event 23 Maret 2017 +
+
+ access_time 08:00 AM - 04:00 PM +
+
+ location_on Gd. Mas Soerachman Lt. 3 Universitas Jember +
+
+
+ Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt. +
+
+ +
+
+
+
+
+
+
+ + + + @include('dash/template/footer') + \ No newline at end of file diff --git a/resources/views/daftar.blade.php b/resources/views/daftar.blade.php new file mode 100644 index 0000000..0411164 --- /dev/null +++ b/resources/views/daftar.blade.php @@ -0,0 +1,113 @@ + @include('template/header') + + Daftar - Ivent + + + + + + + + + + +
+
+ +
+
+ + + +
+
+
+ + +
+
+
+

Daftar - Lengkapi formulir dibawah ini

+
+ + + + + + +
+
+ Sudah punya akun? Masuk +
+
+
+ + + + @include('template/footer') \ No newline at end of file diff --git a/resources/views/dash/detail-event.blade.php b/resources/views/dash/detail-event.blade.php new file mode 100644 index 0000000..4a6e646 --- /dev/null +++ b/resources/views/dash/detail-event.blade.php @@ -0,0 +1,166 @@ + @include('dash/template/header') + + Event - Ivent Dashboard + + +
+ + + @include('dash/template/sidebar-2') + + +
+ + + @include('dash/template/navbar') + + +
+
+
+
+
+
+
+ +
+

Discovery 3 : Hack Your City

+
+ + + + + + + + + + + + + + + +
event 23 Mar 2017local_activity Rp. 130.000,-mail_outline discovery@gmail.com
access_time 08:00 AM - 04:00 AMaccount_box 53/150 Pesertapublic http://discovery.com
phone +628 291-1239-0239location_on Gd. Mas Soerachman Lt. 3 Universitas Jember
+
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod + tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, + quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo + consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse + cillum dolore eu fugiat nulla pariatur.

Excepteur sint occaecat cupidatat non + proident, sunt in culpa qui officia deserunt mollit anim id est laborum. + Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod + tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, + quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo + consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse + cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non + proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod + tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, + quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo + consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse + cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non + proident, sunt in culpa qui officia deserunt mollit anim id est laborum. + +
+
+
+
+
+
+
+ +
+
+
+
+
+
+

Peserta

+

Daftar peserta event Discovery 3 : Hack Your City

+
+
+
+ 53 +
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NoNama PesertaEmailNo. TelpTanggal DaftarAksi
1Nigerniger@gmail.com+62 8728-9282-12323 Maret 2017 - 08:13 AM + + + +
2Minerva Hooperniger@gmail.com+62 8728-9282-12323 Maret 2017 - 08:13 AM + + + +
3Sage Rodriguezniger@gmail.com+62 8728-9282-12323 Maret 2017 - 08:13 AM + + + +
4Philip Chaneyniger@gmail.com+62 8728-9282-12323 Maret 2017 - 08:13 AM + + + +
+
+
+
+
+
+
+ + + + @include('dash/template/footer') + \ No newline at end of file diff --git a/resources/views/dash/detail-pesan.blade.php b/resources/views/dash/detail-pesan.blade.php new file mode 100644 index 0000000..d4bcf92 --- /dev/null +++ b/resources/views/dash/detail-pesan.blade.php @@ -0,0 +1,75 @@ + @include('dash/template/header') + + Detail Pesan - Ivent Dashboard + + +
+ + + @include('dash/template/sidebar-4') + + +
+ + + @include('dash/template/navbar') + + +
+
+
+
+
+
+
+
+

Lupa Passord akun

+

Muhammad Huda

+
+
+
+
+
+
+ mail_outline huda@students.cs +
+
+ mail_outline+618 1234-1244-1288 +
+
+ access_time23 Mar 2017 - 08:37 AM +
+
+
+
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod + tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, + quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo + consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse + cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non + proident, sunt in culpa qui officia deserunt mollit anim id est laborum. + +

+ + Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod + tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, + quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo + consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse + cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non + proident, sunt in culpa qui officia deserunt mollit anim id est laborum. +

+ + + +
+
+
+
+
+
+
+ + + + @include('dash/template/footer') + \ No newline at end of file diff --git a/resources/views/dash/detail-tiket.blade.php b/resources/views/dash/detail-tiket.blade.php new file mode 100644 index 0000000..f9d25ff --- /dev/null +++ b/resources/views/dash/detail-tiket.blade.php @@ -0,0 +1,106 @@ + @include('dash/template/header') + + Event - Ivent Dashboard + + +
+ + + @include('dash/template/sidebar-3') + + +
+ + + @include('dash/template/navbar') + + +
+
+
+
+
+
+
+ +
+

Seminar Nasional : Build Your Future Business Today

+
+ + + + + + + + + + + + + + +
event 23 Mar 2017local_activity Rp. 130.000,-mail_outline discovery@gmail.com
access_time 08:00 AM - 04:00 AMphone +628 291-1239-0239public http://discovery.com
location_on Gd. Mas Soerachman Lt. 3 Universitas Jember
+
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod + tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, + quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo + consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse + cillum dolore eu fugiat nulla pariatur.

Excepteur sint occaecat cupidatat non + proident, sunt in culpa qui officia deserunt mollit anim id est laborum. + Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod + tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, + quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo + consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse + cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non + proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod + tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, + quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo + consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse + cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non + proident, sunt in culpa qui officia deserunt mollit anim id est laborum. + +
+
+
+
+
+
+
+ +
+
+
+
+
+
+

Peta

+

Peta lokasi kegiatan berlangsung

+
+
+
+ location_on +
+
+
+
+
+ +
+
+
+
+
+
+ + + + @include('dash/template/footer') + \ No newline at end of file diff --git a/resources/views/dash/event.blade.php b/resources/views/dash/event.blade.php new file mode 100644 index 0000000..aed9851 --- /dev/null +++ b/resources/views/dash/event.blade.php @@ -0,0 +1,130 @@ + @include('dash/template/header') + + Event - Ivent Dashboard + + +
+ + + @include('dash/template/sidebar-2') + + +
+ + + @include('dash/template/navbar') + + +
+
+
+
+
+
+
+
+

Event

+

Daftar event yang anda kelola

+
+
+
+ 3 +
+
+
+
+
+
+
+ +
+
+

Discovery 3 : Hack Your City

+
+
+ event 23 Maret 2017 +
+
+ access_time 08:00 AM - 04:00 PM +
+
+ location_on Gd. Mas Soerachman Lt. 3 Universitas Jember +
+
+
+ Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt. +
+
+ +
+ +
+
+ +
+
+

Seminar Nasional : Build Your Future Business Today

+
+
+ event 23 Maret 2017 +
+
+ access_time 08:00 AM - 04:00 PM +
+
+ location_on Gd. Mas Soerachman Lt. 3 Universitas Jember +
+
+
+ Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt. +
+
+ +
+ +
+
+ +
+
+

Olimpiade TI 2017 - First Step to Change The World

+
+
+ event 23 Maret 2017 +
+
+ access_time 08:00 AM - 04:00 PM +
+
+ location_on Gd. Mas Soerachman Lt. 3 Universitas Jember +
+
+
+ Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt. +
+
+ +
+
+
+
+
+
+
+ + + + @include('dash/template/footer') + \ No newline at end of file diff --git a/resources/views/dash/homepage.blade.php b/resources/views/dash/homepage.blade.php new file mode 100644 index 0000000..7e7f320 --- /dev/null +++ b/resources/views/dash/homepage.blade.php @@ -0,0 +1,149 @@ + @include('dash/template/header') + + Ivent Dashboard + + +
+ + + @include('dash/template/sidebar') + + +
+ + + @include('dash/template/navbar') + + +
+
+
+
+
+
+ event +
+
+

Event

+

150

+
+ +
+
+
+
+
+ event_seat +
+
+

Tiket

+

36

+
+ +
+
+
+
+
+ mail_outline +
+
+

Pesan Masuk

+

327

+
+ +
+
+
+ +
+
+
+
+

Event Terakhir

+

Daftar 10 event terakhir yang anda kelola

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NoNama EventWaktu PelaksanaanTempat PelaksanaanHTMAksi
1Niger23 Maret 2017 - 09:00 AMOud-Turnhout$36,738 + + + +
2Minerva Hooper30 April 2017 - 09:00 AMSinaai-Waas$23,789 + + + +
3Sage Rodriguez11 Mei 2017 - 09:30 AMBaileux$56,142 + + + +
4Philip Chaney3 Juni 2017 - 08:00 AMKorea, South$38,735 + + + +
+
+
+
+
+
+
+ + + + @include('dash/template/footer') + \ No newline at end of file diff --git a/resources/views/dash/pemberitahuan.blade.php b/resources/views/dash/pemberitahuan.blade.php new file mode 100644 index 0000000..e39d5ee --- /dev/null +++ b/resources/views/dash/pemberitahuan.blade.php @@ -0,0 +1,103 @@ + @include('dash/template/header') + + Pesan - Ivent Dashboard + + +
+ + + @include('dash/template/sidebar') + + +
+ + + @include('dash/template/navbar') + + +
+
+
+
+
+
+
+
+

Pemberitahuan

+

Kelola pemberitahuan akun anda

+
+
+
+ 6 +
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
TanggalPemberitahuan
3 Maret 2017Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod + tempor incididunt ut labore et dolore magna aliqua... + + + + delete + +
3 Maret 2017Ut enim ad minim veniam, + quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo + consequat. Duis aute irure dolor in reprehenderit in... + + check + + + + delete + +
3 Maret 2017Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod + tempor incididunt ut labore et dolore magna aliqua... + + + + delete + +
+
+
+
+
+
+
+ + + + @include('dash/template/footer') + \ No newline at end of file diff --git a/resources/views/dash/pengaturan.blade.php b/resources/views/dash/pengaturan.blade.php new file mode 100644 index 0000000..58a6425 --- /dev/null +++ b/resources/views/dash/pengaturan.blade.php @@ -0,0 +1,121 @@ + @include('dash/template/header') + + Pengaturan - Ivent Dashboard + + +
+ + + @include('dash/template/sidebar-5') + + +
+ + + @include('dash/template/navbar') + + +
+
+
+
+
+
+
+
+

Pengaturan

+

Atur Profil Anda

+
+
+
+
+ +
+ +
+
Profil
+
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+
+ +
+
+
+
+ + +
+
Password
+
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+
+
+ + +
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+
+
+
+ + + + @include('dash/template/footer') + \ No newline at end of file diff --git a/resources/views/dash/pesan.blade.php b/resources/views/dash/pesan.blade.php new file mode 100644 index 0000000..e585fe4 --- /dev/null +++ b/resources/views/dash/pesan.blade.php @@ -0,0 +1,107 @@ + @include('dash/template/header') + + Pesan - Ivent Dashboard + + +
+ + + @include('dash/template/sidebar-4') + + +
+ + + @include('dash/template/navbar') + + +
+
+
+
+
+
+
+
+

Pesan

+

Kelola pesan masuk anda

+
+
+
+ 6 +
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NoNama PengirimIsi PesanTanggalAksi
1NigerLorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod + tempor incididunt ut labore et dolore magna aliqua...3 Maret 2017 + + + +
2Minerva HooperUt enim ad minim veniam, + quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo + consequat. Duis aute irure dolor in reprehenderit in...3 Maret 2017 + + + +
3Sage Rodriguezvoluptate velit esse + cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non + proident...3 Maret 2017 + + + +
4Philip Chaneysunt in culpa qui officia deserunt mollit anim id est laborum.3 Maret 2017 + + + +
+
+
+
+
+
+
+ + + + @include('dash/template/footer') + \ No newline at end of file diff --git a/resources/views/dash/template/footer.blade.php b/resources/views/dash/template/footer.blade.php new file mode 100644 index 0000000..cd0fe7f --- /dev/null +++ b/resources/views/dash/template/footer.blade.php @@ -0,0 +1,53 @@ + +
+
+ + + + + + + + + + + + + diff --git a/resources/views/dash/template/header.blade.php b/resources/views/dash/template/header.blade.php new file mode 100644 index 0000000..a4b4d82 --- /dev/null +++ b/resources/views/dash/template/header.blade.php @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/views/dash/template/navbar.blade.php b/resources/views/dash/template/navbar.blade.php new file mode 100644 index 0000000..8ed05e4 --- /dev/null +++ b/resources/views/dash/template/navbar.blade.php @@ -0,0 +1,55 @@ + \ No newline at end of file diff --git a/resources/views/dash/template/sidebar-2.blade.php b/resources/views/dash/template/sidebar-2.blade.php new file mode 100644 index 0000000..ea73d72 --- /dev/null +++ b/resources/views/dash/template/sidebar-2.blade.php @@ -0,0 +1,59 @@ + \ No newline at end of file diff --git a/resources/views/dash/template/sidebar-3.blade.php b/resources/views/dash/template/sidebar-3.blade.php new file mode 100644 index 0000000..b61b91c --- /dev/null +++ b/resources/views/dash/template/sidebar-3.blade.php @@ -0,0 +1,59 @@ + \ No newline at end of file diff --git a/resources/views/dash/template/sidebar-4.blade.php b/resources/views/dash/template/sidebar-4.blade.php new file mode 100644 index 0000000..c76ebe8 --- /dev/null +++ b/resources/views/dash/template/sidebar-4.blade.php @@ -0,0 +1,59 @@ + \ No newline at end of file diff --git a/resources/views/dash/template/sidebar-5.blade.php b/resources/views/dash/template/sidebar-5.blade.php new file mode 100644 index 0000000..489f32a --- /dev/null +++ b/resources/views/dash/template/sidebar-5.blade.php @@ -0,0 +1,59 @@ + \ No newline at end of file diff --git a/resources/views/dash/template/sidebar.blade.php b/resources/views/dash/template/sidebar.blade.php new file mode 100644 index 0000000..fc7aca4 --- /dev/null +++ b/resources/views/dash/template/sidebar.blade.php @@ -0,0 +1,59 @@ + \ No newline at end of file diff --git a/resources/views/dash/tiket.blade.php b/resources/views/dash/tiket.blade.php new file mode 100644 index 0000000..160871b --- /dev/null +++ b/resources/views/dash/tiket.blade.php @@ -0,0 +1,102 @@ + @include('dash/template/header') + + Tiket - Ivent Dashboard + + +
+ + + @include('dash/template/sidebar-3') + + +
+ + + @include('dash/template/navbar') + + +
+
+
+
+
+
+
+
+

Tiket

+

Tiket event yang anda ikuti

+
+
+
+ 2 +
+
+
+
+
+
+
+ +
+
+

Discovery 3 : Hack Your City

+
+
+ event 23 Maret 2017 +
+
+ access_time 08:00 AM - 04:00 PM +
+
+ location_on Gd. Mas Soerachman Lt. 3 Universitas Jember +
+
+
+ Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt. +
+
+ +
+ +
+
+ +
+
+

Seminar Nasional : Build Your Future Business Today

+
+
+ event 23 Maret 2017 +
+
+ access_time 08:00 AM - 04:00 PM +
+
+ location_on Gd. Mas Soerachman Lt. 3 Universitas Jember +
+
+
+ Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt. +
+
+ +
+
+
+
+
+
+
+ + + + @include('dash/template/footer') + \ No newline at end of file diff --git a/resources/views/detail-event.blade.php b/resources/views/detail-event.blade.php new file mode 100644 index 0000000..b5b0ea9 --- /dev/null +++ b/resources/views/detail-event.blade.php @@ -0,0 +1,261 @@ + @include('template/header') + Detail - Ivent + + + + + + + + + + +
+
+ +
+
+ + +
+
+
+
+ +
+
+

Discovery 5 - Build Your Future Today

+ +
+ +
+ sisa
+
42
+ tiket
+
+
+ + +
+
+
+ 30 Oktober 2016 +
+
+ 07:00 - selesai +
+
+ Jember, Jawa Timur +
+
+
+ + + +

Discovery adalah Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod + tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, + quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo

+ +

Dolor sit amet, consectetur adipisicing elit, sed do eiusmod + tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, + quis nostrud exercitation ullamco id est laborum.

+ + +
+
+ Rincian Event +
+
+ Rp 150.000 +
+ +
+ +
+
+
+
+ + + + + + + + + + + + + + + + + +
Tempat: Gedung CDAST Universitas Jember
Kontak: 0872-9299-9182
Email: contact@discovery.com
Website: http://discovery.com
+
+
+
+ Bagikan event

+ Salin tautan event +
+
+
+ +
+
+
+
+ + + +
+
+
+
+
+

Event lainnya

+
+
+
+
+
+ +
Lorem ipsum dolor sit
+
+
+ 30-6-2015 +
+
+ Gratis +
+
+
+
+ +
+
+

+
+
+
+
+
+
+ +
Summer Sounds Festival
+
+
+ 30-6-2016 +
+
+ Rp 50.000 +
+
+
+
+ +
+
+

+
+
+
+
+
+
+ +
British Academy Film Awards
+
+
+ 30-6-2015 +
+
+ Gratis +
+
+
+
+ +
+
+

+
+
+
+
+
+
+ +
Qontinent - The Last Resort
+
+
+ 30-6-2015 +
+
+ RP. 30.000 +
+
+
+
+ +
+
+

+
+
+
+
+
+
+
+ + + @include('template/footer') \ No newline at end of file diff --git a/resources/views/homepage.blade.php b/resources/views/homepage.blade.php new file mode 100644 index 0000000..e02eef1 --- /dev/null +++ b/resources/views/homepage.blade.php @@ -0,0 +1,235 @@ + @include('template/header') + + Ivent - Bikin Event Gak Pake Ribet + + + + + + + + + + + + +
+ +
+
+
+
+

Cari event berdasarkan...

+
+
+ +
+
+ +
+
+ +
+
+ +
+ +
+
+
+ + + +
+
+
+
+

Event terbaru

+
+ +
+
+
+
+ +
Lorem ipsum dolor sit
+
+
+ 30-6-2015 +
+
+ Gratis +
+
+
+
+ +
+
+

+
+
+
+
+
+
+ +
Summer Sounds Festival
+
+
+ 30-6-2016 +
+
+ Rp 50.000 +
+
+
+
+ +
+
+

+
+
+
+
+
+
+ +
British Academy Film Awards
+
+
+ 30-6-2015 +
+
+ Gratis +
+
+
+
+ +
+
+

+
+
+
+
+
+
+ +
Qontinent - The Last Resort
+
+
+ 30-6-2015 +
+
+ RP. 30.000 +
+
+
+
+ +
+
+

+
+
+
+
+
+
+
+ + @include('template/footer') \ No newline at end of file diff --git a/resources/views/login.blade.php b/resources/views/login.blade.php new file mode 100644 index 0000000..417f34a --- /dev/null +++ b/resources/views/login.blade.php @@ -0,0 +1,112 @@ + @include('template/header') + + Daftar - Ivent + + + + + + + + + + +
+
+ +
+
+ + + +
+
+
+ + +
+
+


+
+

Login - Masukkan email dan password

+
+ + + +
+
+ Belum punya akun? Daftar +
+
+
+ + + + + @include('template/footer') \ No newline at end of file diff --git a/resources/views/template/footer.blade.php b/resources/views/template/footer.blade.php new file mode 100644 index 0000000..c313fea --- /dev/null +++ b/resources/views/template/footer.blade.php @@ -0,0 +1,34 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/views/template/header.blade.php b/resources/views/template/header.blade.php new file mode 100644 index 0000000..843539a --- /dev/null +++ b/resources/views/template/header.blade.php @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/views/welcome.blade.php b/resources/views/welcome.blade.php new file mode 100644 index 0000000..44b7e72 --- /dev/null +++ b/resources/views/welcome.blade.php @@ -0,0 +1,95 @@ + + + + + + + + Laravel + + + + + + + + +
+ @if (Route::has('login')) + + @endif + +
+
+ Laravel +
+ + +
+
+ + diff --git a/routes/api.php b/routes/api.php new file mode 100644 index 0000000..c641ca5 --- /dev/null +++ b/routes/api.php @@ -0,0 +1,18 @@ +get('/user', function (Request $request) { + return $request->user(); +}); diff --git a/routes/channels.php b/routes/channels.php new file mode 100644 index 0000000..f16a20b --- /dev/null +++ b/routes/channels.php @@ -0,0 +1,16 @@ +id === (int) $id; +}); diff --git a/routes/console.php b/routes/console.php new file mode 100644 index 0000000..75dd0cd --- /dev/null +++ b/routes/console.php @@ -0,0 +1,18 @@ +comment(Inspiring::quote()); +})->describe('Display an inspiring quote'); diff --git a/routes/web.php b/routes/web.php new file mode 100644 index 0000000..61fd478 --- /dev/null +++ b/routes/web.php @@ -0,0 +1,85 @@ + + */ + +$uri = urldecode( + parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) +); + +// This file allows us to emulate Apache's "mod_rewrite" functionality from the +// built-in PHP web server. This provides a convenient way to test a Laravel +// application without having installed a "real" web server software here. +if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) { + return false; +} + +require_once __DIR__.'/public/index.php'; diff --git a/storage/app/.gitignore b/storage/app/.gitignore new file mode 100644 index 0000000..8f4803c --- /dev/null +++ b/storage/app/.gitignore @@ -0,0 +1,3 @@ +* +!public/ +!.gitignore diff --git a/storage/app/public/.gitignore b/storage/app/public/.gitignore new file mode 100644 index 0000000..d6b7ef3 --- /dev/null +++ b/storage/app/public/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/storage/framework/.gitignore b/storage/framework/.gitignore new file mode 100644 index 0000000..b02b700 --- /dev/null +++ b/storage/framework/.gitignore @@ -0,0 +1,8 @@ +config.php +routes.php +schedule-* +compiled.php +services.json +events.scanned.php +routes.scanned.php +down diff --git a/storage/framework/cache/.gitignore b/storage/framework/cache/.gitignore new file mode 100644 index 0000000..d6b7ef3 --- /dev/null +++ b/storage/framework/cache/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/storage/framework/sessions/.gitignore b/storage/framework/sessions/.gitignore new file mode 100644 index 0000000..d6b7ef3 --- /dev/null +++ b/storage/framework/sessions/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/storage/framework/testing/.gitignore b/storage/framework/testing/.gitignore new file mode 100644 index 0000000..d6b7ef3 --- /dev/null +++ b/storage/framework/testing/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/storage/framework/views/.gitignore b/storage/framework/views/.gitignore new file mode 100644 index 0000000..d6b7ef3 --- /dev/null +++ b/storage/framework/views/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/storage/logs/.gitignore b/storage/logs/.gitignore new file mode 100644 index 0000000..d6b7ef3 --- /dev/null +++ b/storage/logs/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/tests/CreatesApplication.php b/tests/CreatesApplication.php new file mode 100644 index 0000000..547152f --- /dev/null +++ b/tests/CreatesApplication.php @@ -0,0 +1,22 @@ +make(Kernel::class)->bootstrap(); + + return $app; + } +} diff --git a/tests/Feature/ExampleTest.php b/tests/Feature/ExampleTest.php new file mode 100644 index 0000000..486dc27 --- /dev/null +++ b/tests/Feature/ExampleTest.php @@ -0,0 +1,23 @@ +get('/'); + + $response->assertStatus(200); + } +} diff --git a/tests/TestCase.php b/tests/TestCase.php new file mode 100644 index 0000000..2932d4a --- /dev/null +++ b/tests/TestCase.php @@ -0,0 +1,10 @@ +assertTrue(true); + } +} diff --git a/vendor/autoload.php b/vendor/autoload.php new file mode 100644 index 0000000..a203723 --- /dev/null +++ b/vendor/autoload.php @@ -0,0 +1,7 @@ + + * Jordi Boggiano + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Composer\Autoload; + +/** + * ClassLoader implements a PSR-0, PSR-4 and classmap class loader. + * + * $loader = new \Composer\Autoload\ClassLoader(); + * + * // register classes with namespaces + * $loader->add('Symfony\Component', __DIR__.'/component'); + * $loader->add('Symfony', __DIR__.'/framework'); + * + * // activate the autoloader + * $loader->register(); + * + * // to enable searching the include path (eg. for PEAR packages) + * $loader->setUseIncludePath(true); + * + * In this example, if you try to use a class in the Symfony\Component + * namespace or one of its children (Symfony\Component\Console for instance), + * the autoloader will first look for the class under the component/ + * directory, and it will then fallback to the framework/ directory if not + * found before giving up. + * + * This class is loosely based on the Symfony UniversalClassLoader. + * + * @author Fabien Potencier + * @author Jordi Boggiano + * @see http://www.php-fig.org/psr/psr-0/ + * @see http://www.php-fig.org/psr/psr-4/ + */ +class ClassLoader +{ + // PSR-4 + private $prefixLengthsPsr4 = array(); + private $prefixDirsPsr4 = array(); + private $fallbackDirsPsr4 = array(); + + // PSR-0 + private $prefixesPsr0 = array(); + private $fallbackDirsPsr0 = array(); + + private $useIncludePath = false; + private $classMap = array(); + private $classMapAuthoritative = false; + private $missingClasses = array(); + + public function getPrefixes() + { + if (!empty($this->prefixesPsr0)) { + return call_user_func_array('array_merge', $this->prefixesPsr0); + } + + return array(); + } + + public function getPrefixesPsr4() + { + return $this->prefixDirsPsr4; + } + + public function getFallbackDirs() + { + return $this->fallbackDirsPsr0; + } + + public function getFallbackDirsPsr4() + { + return $this->fallbackDirsPsr4; + } + + public function getClassMap() + { + return $this->classMap; + } + + /** + * @param array $classMap Class to filename map + */ + public function addClassMap(array $classMap) + { + if ($this->classMap) { + $this->classMap = array_merge($this->classMap, $classMap); + } else { + $this->classMap = $classMap; + } + } + + /** + * 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 + */ + public function add($prefix, $paths, $prepend = false) + { + if (!$prefix) { + if ($prepend) { + $this->fallbackDirsPsr0 = array_merge( + (array) $paths, + $this->fallbackDirsPsr0 + ); + } else { + $this->fallbackDirsPsr0 = array_merge( + $this->fallbackDirsPsr0, + (array) $paths + ); + } + + return; + } + + $first = $prefix[0]; + if (!isset($this->prefixesPsr0[$first][$prefix])) { + $this->prefixesPsr0[$first][$prefix] = (array) $paths; + + return; + } + if ($prepend) { + $this->prefixesPsr0[$first][$prefix] = array_merge( + (array) $paths, + $this->prefixesPsr0[$first][$prefix] + ); + } else { + $this->prefixesPsr0[$first][$prefix] = array_merge( + $this->prefixesPsr0[$first][$prefix], + (array) $paths + ); + } + } + + /** + * 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 + * + * @throws \InvalidArgumentException + */ + public function addPsr4($prefix, $paths, $prepend = false) + { + if (!$prefix) { + // Register directories for the root namespace. + if ($prepend) { + $this->fallbackDirsPsr4 = array_merge( + (array) $paths, + $this->fallbackDirsPsr4 + ); + } else { + $this->fallbackDirsPsr4 = array_merge( + $this->fallbackDirsPsr4, + (array) $paths + ); + } + } elseif (!isset($this->prefixDirsPsr4[$prefix])) { + // Register directories for a new namespace. + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = (array) $paths; + } elseif ($prepend) { + // Prepend directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( + (array) $paths, + $this->prefixDirsPsr4[$prefix] + ); + } else { + // Append directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( + $this->prefixDirsPsr4[$prefix], + (array) $paths + ); + } + } + + /** + * 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 + */ + public function set($prefix, $paths) + { + if (!$prefix) { + $this->fallbackDirsPsr0 = (array) $paths; + } else { + $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths; + } + } + + /** + * 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 + * + * @throws \InvalidArgumentException + */ + public function setPsr4($prefix, $paths) + { + if (!$prefix) { + $this->fallbackDirsPsr4 = (array) $paths; + } else { + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = (array) $paths; + } + } + + /** + * Turns on searching the include path for class files. + * + * @param bool $useIncludePath + */ + public function setUseIncludePath($useIncludePath) + { + $this->useIncludePath = $useIncludePath; + } + + /** + * Can be used to check if the autoloader uses the include path to check + * for classes. + * + * @return bool + */ + public function getUseIncludePath() + { + return $this->useIncludePath; + } + + /** + * Turns off searching the prefix and fallback directories for classes + * that have not been registered with the class map. + * + * @param bool $classMapAuthoritative + */ + public function setClassMapAuthoritative($classMapAuthoritative) + { + $this->classMapAuthoritative = $classMapAuthoritative; + } + + /** + * Should class lookup fail if not found in the current class map? + * + * @return bool + */ + public function isClassMapAuthoritative() + { + return $this->classMapAuthoritative; + } + + /** + * Registers this instance as an autoloader. + * + * @param bool $prepend Whether to prepend the autoloader or not + */ + public function register($prepend = false) + { + spl_autoload_register(array($this, 'loadClass'), true, $prepend); + } + + /** + * Unregisters this instance as an autoloader. + */ + public function unregister() + { + spl_autoload_unregister(array($this, 'loadClass')); + } + + /** + * Loads the given class or interface. + * + * @param string $class The name of the class + * @return bool|null True if loaded, null otherwise + */ + public function loadClass($class) + { + if ($file = $this->findFile($class)) { + includeFile($file); + + return true; + } + } + + /** + * Finds the path to the file where the class is defined. + * + * @param string $class The name of the class + * + * @return string|false The path if found, false otherwise + */ + public function findFile($class) + { + // work around for PHP 5.3.0 - 5.3.2 https://bugs.php.net/50731 + if ('\\' == $class[0]) { + $class = substr($class, 1); + } + + // class map lookup + if (isset($this->classMap[$class])) { + return $this->classMap[$class]; + } + if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) { + return false; + } + + $file = $this->findFileWithExtension($class, '.php'); + + // Search for Hack files if we are running on HHVM + if (false === $file && defined('HHVM_VERSION')) { + $file = $this->findFileWithExtension($class, '.hh'); + } + + if (false === $file) { + // Remember that this class does not exist. + $this->missingClasses[$class] = true; + } + + return $file; + } + + private function findFileWithExtension($class, $ext) + { + // PSR-4 lookup + $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; + + $first = $class[0]; + if (isset($this->prefixLengthsPsr4[$first])) { + foreach ($this->prefixLengthsPsr4[$first] as $prefix => $length) { + if (0 === strpos($class, $prefix)) { + foreach ($this->prefixDirsPsr4[$prefix] as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) { + return $file; + } + } + } + } + } + + // PSR-4 fallback dirs + foreach ($this->fallbackDirsPsr4 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { + return $file; + } + } + + // PSR-0 lookup + if (false !== $pos = strrpos($class, '\\')) { + // namespaced class name + $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1) + . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); + } else { + // PEAR-like class name + $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; + } + + if (isset($this->prefixesPsr0[$first])) { + foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { + if (0 === strpos($class, $prefix)) { + foreach ($dirs as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + } + } + } + + // PSR-0 fallback dirs + foreach ($this->fallbackDirsPsr0 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + + // PSR-0 include paths. + if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { + return $file; + } + + return false; + } +} + +/** + * Scope isolated include. + * + * Prevents access to $this/self from included files. + */ +function includeFile($file) +{ + include $file; +} diff --git a/vendor/composer/LICENSE b/vendor/composer/LICENSE new file mode 100644 index 0000000..1a28124 --- /dev/null +++ b/vendor/composer/LICENSE @@ -0,0 +1,21 @@ + +Copyright (c) 2016 Nils Adermann, Jordi Boggiano + +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/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php new file mode 100644 index 0000000..183f4f7 --- /dev/null +++ b/vendor/composer/autoload_classmap.php @@ -0,0 +1,2967 @@ + $baseDir . '/app/Console/Kernel.php', + 'App\\Exceptions\\Handler' => $baseDir . '/app/Exceptions/Handler.php', + 'App\\Http\\Controllers\\Auth\\ForgotPasswordController' => $baseDir . '/app/Http/Controllers/Auth/ForgotPasswordController.php', + 'App\\Http\\Controllers\\Auth\\LoginController' => $baseDir . '/app/Http/Controllers/Auth/LoginController.php', + 'App\\Http\\Controllers\\Auth\\RegisterController' => $baseDir . '/app/Http/Controllers/Auth/RegisterController.php', + 'App\\Http\\Controllers\\Auth\\ResetPasswordController' => $baseDir . '/app/Http/Controllers/Auth/ResetPasswordController.php', + 'App\\Http\\Controllers\\Controller' => $baseDir . '/app/Http/Controllers/Controller.php', + 'App\\Http\\Kernel' => $baseDir . '/app/Http/Kernel.php', + 'App\\Http\\Middleware\\EncryptCookies' => $baseDir . '/app/Http/Middleware/EncryptCookies.php', + 'App\\Http\\Middleware\\RedirectIfAuthenticated' => $baseDir . '/app/Http/Middleware/RedirectIfAuthenticated.php', + 'App\\Http\\Middleware\\TrimStrings' => $baseDir . '/app/Http/Middleware/TrimStrings.php', + 'App\\Http\\Middleware\\VerifyCsrfToken' => $baseDir . '/app/Http/Middleware/VerifyCsrfToken.php', + 'App\\Providers\\AppServiceProvider' => $baseDir . '/app/Providers/AppServiceProvider.php', + 'App\\Providers\\AuthServiceProvider' => $baseDir . '/app/Providers/AuthServiceProvider.php', + 'App\\Providers\\BroadcastServiceProvider' => $baseDir . '/app/Providers/BroadcastServiceProvider.php', + 'App\\Providers\\EventServiceProvider' => $baseDir . '/app/Providers/EventServiceProvider.php', + 'App\\Providers\\RouteServiceProvider' => $baseDir . '/app/Providers/RouteServiceProvider.php', + 'App\\User' => $baseDir . '/app/User.php', + 'Carbon\\Carbon' => $vendorDir . '/nesbot/carbon/src/Carbon/Carbon.php', + 'Carbon\\CarbonInterval' => $vendorDir . '/nesbot/carbon/src/Carbon/CarbonInterval.php', + 'Carbon\\Exceptions\\InvalidDateException' => $vendorDir . '/nesbot/carbon/src/Carbon/Exceptions/InvalidDateException.php', + 'CreatePasswordResetsTable' => $baseDir . '/database/migrations/2014_10_12_100000_create_password_resets_table.php', + 'CreateUsersTable' => $baseDir . '/database/migrations/2014_10_12_000000_create_users_table.php', + 'Cron\\AbstractField' => $vendorDir . '/mtdowling/cron-expression/src/Cron/AbstractField.php', + 'Cron\\CronExpression' => $vendorDir . '/mtdowling/cron-expression/src/Cron/CronExpression.php', + 'Cron\\DayOfMonthField' => $vendorDir . '/mtdowling/cron-expression/src/Cron/DayOfMonthField.php', + 'Cron\\DayOfWeekField' => $vendorDir . '/mtdowling/cron-expression/src/Cron/DayOfWeekField.php', + 'Cron\\FieldFactory' => $vendorDir . '/mtdowling/cron-expression/src/Cron/FieldFactory.php', + 'Cron\\FieldInterface' => $vendorDir . '/mtdowling/cron-expression/src/Cron/FieldInterface.php', + 'Cron\\HoursField' => $vendorDir . '/mtdowling/cron-expression/src/Cron/HoursField.php', + 'Cron\\MinutesField' => $vendorDir . '/mtdowling/cron-expression/src/Cron/MinutesField.php', + 'Cron\\MonthField' => $vendorDir . '/mtdowling/cron-expression/src/Cron/MonthField.php', + 'Cron\\YearField' => $vendorDir . '/mtdowling/cron-expression/src/Cron/YearField.php', + 'DatabaseSeeder' => $baseDir . '/database/seeds/DatabaseSeeder.php', + 'DeepCopy\\DeepCopy' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/DeepCopy.php', + 'DeepCopy\\Exception\\CloneException' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/Exception/CloneException.php', + 'DeepCopy\\Filter\\Doctrine\\DoctrineCollectionFilter' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineCollectionFilter.php', + 'DeepCopy\\Filter\\Doctrine\\DoctrineEmptyCollectionFilter' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineEmptyCollectionFilter.php', + 'DeepCopy\\Filter\\Doctrine\\DoctrineProxyFilter' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineProxyFilter.php', + 'DeepCopy\\Filter\\Filter' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/Filter/Filter.php', + 'DeepCopy\\Filter\\KeepFilter' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/Filter/KeepFilter.php', + 'DeepCopy\\Filter\\ReplaceFilter' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/Filter/ReplaceFilter.php', + 'DeepCopy\\Filter\\SetNullFilter' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/Filter/SetNullFilter.php', + 'DeepCopy\\Matcher\\Doctrine\\DoctrineProxyMatcher' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/Matcher/Doctrine/DoctrineProxyMatcher.php', + 'DeepCopy\\Matcher\\Matcher' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/Matcher/Matcher.php', + 'DeepCopy\\Matcher\\PropertyMatcher' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyMatcher.php', + 'DeepCopy\\Matcher\\PropertyNameMatcher' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyNameMatcher.php', + 'DeepCopy\\Matcher\\PropertyTypeMatcher' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyTypeMatcher.php', + 'DeepCopy\\Reflection\\ReflectionHelper' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/Reflection/ReflectionHelper.php', + 'DeepCopy\\TypeFilter\\ReplaceFilter' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/TypeFilter/ReplaceFilter.php', + 'DeepCopy\\TypeFilter\\ShallowCopyFilter' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/TypeFilter/ShallowCopyFilter.php', + 'DeepCopy\\TypeFilter\\Spl\\SplDoublyLinkedList' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/TypeFilter/Spl/SplDoublyLinkedList.php', + 'DeepCopy\\TypeFilter\\TypeFilter' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/TypeFilter/TypeFilter.php', + 'DeepCopy\\TypeMatcher\\TypeMatcher' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/TypeMatcher/TypeMatcher.php', + 'Doctrine\\Common\\Inflector\\Inflector' => $vendorDir . '/doctrine/inflector/lib/Doctrine/Common/Inflector/Inflector.php', + 'Doctrine\\Instantiator\\Exception\\ExceptionInterface' => $vendorDir . '/doctrine/instantiator/src/Doctrine/Instantiator/Exception/ExceptionInterface.php', + 'Doctrine\\Instantiator\\Exception\\InvalidArgumentException' => $vendorDir . '/doctrine/instantiator/src/Doctrine/Instantiator/Exception/InvalidArgumentException.php', + 'Doctrine\\Instantiator\\Exception\\UnexpectedValueException' => $vendorDir . '/doctrine/instantiator/src/Doctrine/Instantiator/Exception/UnexpectedValueException.php', + 'Doctrine\\Instantiator\\Instantiator' => $vendorDir . '/doctrine/instantiator/src/Doctrine/Instantiator/Instantiator.php', + 'Doctrine\\Instantiator\\InstantiatorInterface' => $vendorDir . '/doctrine/instantiator/src/Doctrine/Instantiator/InstantiatorInterface.php', + 'Dotenv\\Dotenv' => $vendorDir . '/vlucas/phpdotenv/src/Dotenv.php', + 'Dotenv\\Exception\\ExceptionInterface' => $vendorDir . '/vlucas/phpdotenv/src/Exception/ExceptionInterface.php', + 'Dotenv\\Exception\\InvalidCallbackException' => $vendorDir . '/vlucas/phpdotenv/src/Exception/InvalidCallbackException.php', + 'Dotenv\\Exception\\InvalidFileException' => $vendorDir . '/vlucas/phpdotenv/src/Exception/InvalidFileException.php', + 'Dotenv\\Exception\\InvalidPathException' => $vendorDir . '/vlucas/phpdotenv/src/Exception/InvalidPathException.php', + 'Dotenv\\Exception\\ValidationException' => $vendorDir . '/vlucas/phpdotenv/src/Exception/ValidationException.php', + 'Dotenv\\Loader' => $vendorDir . '/vlucas/phpdotenv/src/Loader.php', + 'Dotenv\\Validator' => $vendorDir . '/vlucas/phpdotenv/src/Validator.php', + 'Faker\\Calculator\\Iban' => $vendorDir . '/fzaninotto/faker/src/Faker/Calculator/Iban.php', + 'Faker\\Calculator\\Luhn' => $vendorDir . '/fzaninotto/faker/src/Faker/Calculator/Luhn.php', + 'Faker\\DefaultGenerator' => $vendorDir . '/fzaninotto/faker/src/Faker/DefaultGenerator.php', + 'Faker\\Documentor' => $vendorDir . '/fzaninotto/faker/src/Faker/Documentor.php', + 'Faker\\Factory' => $vendorDir . '/fzaninotto/faker/src/Faker/Factory.php', + 'Faker\\Generator' => $vendorDir . '/fzaninotto/faker/src/Faker/Generator.php', + 'Faker\\Guesser\\Name' => $vendorDir . '/fzaninotto/faker/src/Faker/Guesser/Name.php', + 'Faker\\ORM\\CakePHP\\ColumnTypeGuesser' => $vendorDir . '/fzaninotto/faker/src/Faker/ORM/CakePHP/ColumnTypeGuesser.php', + 'Faker\\ORM\\CakePHP\\EntityPopulator' => $vendorDir . '/fzaninotto/faker/src/Faker/ORM/CakePHP/EntityPopulator.php', + 'Faker\\ORM\\CakePHP\\Populator' => $vendorDir . '/fzaninotto/faker/src/Faker/ORM/CakePHP/Populator.php', + 'Faker\\ORM\\Doctrine\\ColumnTypeGuesser' => $vendorDir . '/fzaninotto/faker/src/Faker/ORM/Doctrine/ColumnTypeGuesser.php', + 'Faker\\ORM\\Doctrine\\EntityPopulator' => $vendorDir . '/fzaninotto/faker/src/Faker/ORM/Doctrine/EntityPopulator.php', + 'Faker\\ORM\\Doctrine\\Populator' => $vendorDir . '/fzaninotto/faker/src/Faker/ORM/Doctrine/Populator.php', + 'Faker\\ORM\\Mandango\\ColumnTypeGuesser' => $vendorDir . '/fzaninotto/faker/src/Faker/ORM/Mandango/ColumnTypeGuesser.php', + 'Faker\\ORM\\Mandango\\EntityPopulator' => $vendorDir . '/fzaninotto/faker/src/Faker/ORM/Mandango/EntityPopulator.php', + 'Faker\\ORM\\Mandango\\Populator' => $vendorDir . '/fzaninotto/faker/src/Faker/ORM/Mandango/Populator.php', + 'Faker\\ORM\\Propel2\\ColumnTypeGuesser' => $vendorDir . '/fzaninotto/faker/src/Faker/ORM/Propel2/ColumnTypeGuesser.php', + 'Faker\\ORM\\Propel2\\EntityPopulator' => $vendorDir . '/fzaninotto/faker/src/Faker/ORM/Propel2/EntityPopulator.php', + 'Faker\\ORM\\Propel2\\Populator' => $vendorDir . '/fzaninotto/faker/src/Faker/ORM/Propel2/Populator.php', + 'Faker\\ORM\\Propel\\ColumnTypeGuesser' => $vendorDir . '/fzaninotto/faker/src/Faker/ORM/Propel/ColumnTypeGuesser.php', + 'Faker\\ORM\\Propel\\EntityPopulator' => $vendorDir . '/fzaninotto/faker/src/Faker/ORM/Propel/EntityPopulator.php', + 'Faker\\ORM\\Propel\\Populator' => $vendorDir . '/fzaninotto/faker/src/Faker/ORM/Propel/Populator.php', + 'Faker\\ORM\\Spot\\ColumnTypeGuesser' => $vendorDir . '/fzaninotto/faker/src/Faker/ORM/Spot/ColumnTypeGuesser.php', + 'Faker\\ORM\\Spot\\EntityPopulator' => $vendorDir . '/fzaninotto/faker/src/Faker/ORM/Spot/EntityPopulator.php', + 'Faker\\ORM\\Spot\\Populator' => $vendorDir . '/fzaninotto/faker/src/Faker/ORM/Spot/Populator.php', + 'Faker\\Provider\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/Address.php', + 'Faker\\Provider\\Barcode' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/Barcode.php', + 'Faker\\Provider\\Base' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/Base.php', + 'Faker\\Provider\\Biased' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/Biased.php', + 'Faker\\Provider\\Color' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/Color.php', + 'Faker\\Provider\\Company' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/Company.php', + 'Faker\\Provider\\DateTime' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/DateTime.php', + 'Faker\\Provider\\File' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/File.php', + 'Faker\\Provider\\Image' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/Image.php', + 'Faker\\Provider\\Internet' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/Internet.php', + 'Faker\\Provider\\Lorem' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/Lorem.php', + 'Faker\\Provider\\Miscellaneous' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/Miscellaneous.php', + 'Faker\\Provider\\Payment' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/Payment.php', + 'Faker\\Provider\\Person' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/Person.php', + 'Faker\\Provider\\PhoneNumber' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/PhoneNumber.php', + 'Faker\\Provider\\Text' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/Text.php', + 'Faker\\Provider\\UserAgent' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/UserAgent.php', + 'Faker\\Provider\\Uuid' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/Uuid.php', + 'Faker\\Provider\\ar_JO\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/ar_JO/Address.php', + 'Faker\\Provider\\ar_JO\\Company' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/ar_JO/Company.php', + 'Faker\\Provider\\ar_JO\\Internet' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/ar_JO/Internet.php', + 'Faker\\Provider\\ar_JO\\Person' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/ar_JO/Person.php', + 'Faker\\Provider\\ar_JO\\Text' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/ar_JO/Text.php', + 'Faker\\Provider\\ar_SA\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/ar_SA/Address.php', + 'Faker\\Provider\\ar_SA\\Company' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/ar_SA/Company.php', + 'Faker\\Provider\\ar_SA\\Internet' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/ar_SA/Internet.php', + 'Faker\\Provider\\ar_SA\\Person' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/ar_SA/Person.php', + 'Faker\\Provider\\ar_SA\\Text' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/ar_SA/Text.php', + 'Faker\\Provider\\at_AT\\Payment' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/at_AT/Payment.php', + 'Faker\\Provider\\bg_BG\\Internet' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/bg_BG/Internet.php', + 'Faker\\Provider\\bg_BG\\Payment' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/bg_BG/Payment.php', + 'Faker\\Provider\\bg_BG\\Person' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/bg_BG/Person.php', + 'Faker\\Provider\\bg_BG\\PhoneNumber' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/bg_BG/PhoneNumber.php', + 'Faker\\Provider\\bn_BD\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/bn_BD/Address.php', + 'Faker\\Provider\\bn_BD\\Company' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/bn_BD/Company.php', + 'Faker\\Provider\\bn_BD\\Person' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/bn_BD/Person.php', + 'Faker\\Provider\\bn_BD\\PhoneNumber' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/bn_BD/PhoneNumber.php', + 'Faker\\Provider\\bn_BD\\Utils' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/bn_BD/Utils.php', + 'Faker\\Provider\\cs_CZ\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/cs_CZ/Address.php', + 'Faker\\Provider\\cs_CZ\\Company' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/cs_CZ/Company.php', + 'Faker\\Provider\\cs_CZ\\DateTime' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/cs_CZ/DateTime.php', + 'Faker\\Provider\\cs_CZ\\Internet' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/cs_CZ/Internet.php', + 'Faker\\Provider\\cs_CZ\\Payment' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/cs_CZ/Payment.php', + 'Faker\\Provider\\cs_CZ\\Person' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/cs_CZ/Person.php', + 'Faker\\Provider\\cs_CZ\\PhoneNumber' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/cs_CZ/PhoneNumber.php', + 'Faker\\Provider\\cs_CZ\\Text' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/cs_CZ/Text.php', + 'Faker\\Provider\\da_DK\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/da_DK/Address.php', + 'Faker\\Provider\\da_DK\\Company' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/da_DK/Company.php', + 'Faker\\Provider\\da_DK\\Internet' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/da_DK/Internet.php', + 'Faker\\Provider\\da_DK\\Payment' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/da_DK/Payment.php', + 'Faker\\Provider\\da_DK\\Person' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/da_DK/Person.php', + 'Faker\\Provider\\da_DK\\PhoneNumber' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/da_DK/PhoneNumber.php', + 'Faker\\Provider\\de_AT\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/de_AT/Address.php', + 'Faker\\Provider\\de_AT\\Company' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/de_AT/Company.php', + 'Faker\\Provider\\de_AT\\Internet' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/de_AT/Internet.php', + 'Faker\\Provider\\de_AT\\Payment' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/de_AT/Payment.php', + 'Faker\\Provider\\de_AT\\Person' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/de_AT/Person.php', + 'Faker\\Provider\\de_AT\\PhoneNumber' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/de_AT/PhoneNumber.php', + 'Faker\\Provider\\de_AT\\Text' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/de_AT/Text.php', + 'Faker\\Provider\\de_CH\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/de_CH/Address.php', + 'Faker\\Provider\\de_CH\\Company' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/de_CH/Company.php', + 'Faker\\Provider\\de_CH\\Internet' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/de_CH/Internet.php', + 'Faker\\Provider\\de_CH\\Payment' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/de_CH/Payment.php', + 'Faker\\Provider\\de_CH\\Person' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/de_CH/Person.php', + 'Faker\\Provider\\de_CH\\PhoneNumber' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/de_CH/PhoneNumber.php', + 'Faker\\Provider\\de_CH\\Text' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/de_CH/Text.php', + 'Faker\\Provider\\de_DE\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/de_DE/Address.php', + 'Faker\\Provider\\de_DE\\Company' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/de_DE/Company.php', + 'Faker\\Provider\\de_DE\\Internet' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/de_DE/Internet.php', + 'Faker\\Provider\\de_DE\\Payment' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/de_DE/Payment.php', + 'Faker\\Provider\\de_DE\\Person' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/de_DE/Person.php', + 'Faker\\Provider\\de_DE\\PhoneNumber' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/de_DE/PhoneNumber.php', + 'Faker\\Provider\\de_DE\\Text' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/de_DE/Text.php', + 'Faker\\Provider\\el_GR\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/el_GR/Address.php', + 'Faker\\Provider\\el_GR\\Company' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/el_GR/Company.php', + 'Faker\\Provider\\el_GR\\Payment' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/el_GR/Payment.php', + 'Faker\\Provider\\el_GR\\Person' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/el_GR/Person.php', + 'Faker\\Provider\\el_GR\\PhoneNumber' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/el_GR/PhoneNumber.php', + 'Faker\\Provider\\el_GR\\Text' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/el_GR/Text.php', + 'Faker\\Provider\\en_AU\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/en_AU/Address.php', + 'Faker\\Provider\\en_AU\\Internet' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/en_AU/Internet.php', + 'Faker\\Provider\\en_AU\\PhoneNumber' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/en_AU/PhoneNumber.php', + 'Faker\\Provider\\en_CA\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/en_CA/Address.php', + 'Faker\\Provider\\en_CA\\PhoneNumber' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/en_CA/PhoneNumber.php', + 'Faker\\Provider\\en_GB\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/en_GB/Address.php', + 'Faker\\Provider\\en_GB\\Internet' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/en_GB/Internet.php', + 'Faker\\Provider\\en_GB\\Payment' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/en_GB/Payment.php', + 'Faker\\Provider\\en_GB\\Person' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/en_GB/Person.php', + 'Faker\\Provider\\en_GB\\PhoneNumber' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/en_GB/PhoneNumber.php', + 'Faker\\Provider\\en_IN\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/en_IN/Address.php', + 'Faker\\Provider\\en_IN\\Internet' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/en_IN/Internet.php', + 'Faker\\Provider\\en_IN\\Person' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/en_IN/Person.php', + 'Faker\\Provider\\en_IN\\PhoneNumber' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/en_IN/PhoneNumber.php', + 'Faker\\Provider\\en_NZ\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/en_NZ/Address.php', + 'Faker\\Provider\\en_NZ\\Internet' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/en_NZ/Internet.php', + 'Faker\\Provider\\en_NZ\\PhoneNumber' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/en_NZ/PhoneNumber.php', + 'Faker\\Provider\\en_PH\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/en_PH/Address.php', + 'Faker\\Provider\\en_PH\\PhoneNumber' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/en_PH/PhoneNumber.php', + 'Faker\\Provider\\en_SG\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/en_SG/Address.php', + 'Faker\\Provider\\en_SG\\PhoneNumber' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/en_SG/PhoneNumber.php', + 'Faker\\Provider\\en_UG\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/en_UG/Address.php', + 'Faker\\Provider\\en_UG\\Internet' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/en_UG/Internet.php', + 'Faker\\Provider\\en_UG\\Person' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/en_UG/Person.php', + 'Faker\\Provider\\en_UG\\PhoneNumber' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/en_UG/PhoneNumber.php', + 'Faker\\Provider\\en_US\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/en_US/Address.php', + 'Faker\\Provider\\en_US\\Company' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/en_US/Company.php', + 'Faker\\Provider\\en_US\\Payment' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/en_US/Payment.php', + 'Faker\\Provider\\en_US\\Person' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/en_US/Person.php', + 'Faker\\Provider\\en_US\\PhoneNumber' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/en_US/PhoneNumber.php', + 'Faker\\Provider\\en_US\\Text' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/en_US/Text.php', + 'Faker\\Provider\\en_ZA\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/en_ZA/Address.php', + 'Faker\\Provider\\en_ZA\\Company' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/en_ZA/Company.php', + 'Faker\\Provider\\en_ZA\\Internet' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/en_ZA/Internet.php', + 'Faker\\Provider\\en_ZA\\Person' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/en_ZA/Person.php', + 'Faker\\Provider\\en_ZA\\PhoneNumber' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/en_ZA/PhoneNumber.php', + 'Faker\\Provider\\es_AR\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/es_AR/Address.php', + 'Faker\\Provider\\es_AR\\Company' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/es_AR/Company.php', + 'Faker\\Provider\\es_AR\\Person' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/es_AR/Person.php', + 'Faker\\Provider\\es_AR\\PhoneNumber' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/es_AR/PhoneNumber.php', + 'Faker\\Provider\\es_ES\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/es_ES/Address.php', + 'Faker\\Provider\\es_ES\\Company' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/es_ES/Company.php', + 'Faker\\Provider\\es_ES\\Internet' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/es_ES/Internet.php', + 'Faker\\Provider\\es_ES\\Payment' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/es_ES/Payment.php', + 'Faker\\Provider\\es_ES\\Person' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/es_ES/Person.php', + 'Faker\\Provider\\es_ES\\PhoneNumber' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/es_ES/PhoneNumber.php', + 'Faker\\Provider\\es_PE\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/es_PE/Address.php', + 'Faker\\Provider\\es_PE\\Company' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/es_PE/Company.php', + 'Faker\\Provider\\es_PE\\Person' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/es_PE/Person.php', + 'Faker\\Provider\\es_PE\\PhoneNumber' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/es_PE/PhoneNumber.php', + 'Faker\\Provider\\es_VE\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/es_VE/Address.php', + 'Faker\\Provider\\es_VE\\Company' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/es_VE/Company.php', + 'Faker\\Provider\\es_VE\\Internet' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/es_VE/Internet.php', + 'Faker\\Provider\\es_VE\\Person' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/es_VE/Person.php', + 'Faker\\Provider\\es_VE\\PhoneNumber' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/es_VE/PhoneNumber.php', + 'Faker\\Provider\\fa_IR\\Internet' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/fa_IR/Internet.php', + 'Faker\\Provider\\fa_IR\\Person' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/fa_IR/Person.php', + 'Faker\\Provider\\fa_IR\\PhoneNumber' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/fa_IR/PhoneNumber.php', + 'Faker\\Provider\\fa_IR\\Text' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/fa_IR/Text.php', + 'Faker\\Provider\\fi_FI\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/fi_FI/Address.php', + 'Faker\\Provider\\fi_FI\\Company' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/fi_FI/Company.php', + 'Faker\\Provider\\fi_FI\\Internet' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/fi_FI/Internet.php', + 'Faker\\Provider\\fi_FI\\Person' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/fi_FI/Person.php', + 'Faker\\Provider\\fi_FI\\PhoneNumber' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/fi_FI/PhoneNumber.php', + 'Faker\\Provider\\fr_BE\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/fr_BE/Address.php', + 'Faker\\Provider\\fr_BE\\Company' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/fr_BE/Company.php', + 'Faker\\Provider\\fr_BE\\Internet' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/fr_BE/Internet.php', + 'Faker\\Provider\\fr_BE\\Payment' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/fr_BE/Payment.php', + 'Faker\\Provider\\fr_BE\\Person' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/fr_BE/Person.php', + 'Faker\\Provider\\fr_BE\\PhoneNumber' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/fr_BE/PhoneNumber.php', + 'Faker\\Provider\\fr_CA\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/fr_CA/Address.php', + 'Faker\\Provider\\fr_CA\\Person' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/fr_CA/Person.php', + 'Faker\\Provider\\fr_CH\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/fr_CH/Address.php', + 'Faker\\Provider\\fr_CH\\Company' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/fr_CH/Company.php', + 'Faker\\Provider\\fr_CH\\Internet' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/fr_CH/Internet.php', + 'Faker\\Provider\\fr_CH\\Payment' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/fr_CH/Payment.php', + 'Faker\\Provider\\fr_CH\\Person' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/fr_CH/Person.php', + 'Faker\\Provider\\fr_CH\\PhoneNumber' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/fr_CH/PhoneNumber.php', + 'Faker\\Provider\\fr_CH\\Text' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/fr_CH/Text.php', + 'Faker\\Provider\\fr_FR\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/fr_FR/Address.php', + 'Faker\\Provider\\fr_FR\\Company' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/fr_FR/Company.php', + 'Faker\\Provider\\fr_FR\\Internet' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/fr_FR/Internet.php', + 'Faker\\Provider\\fr_FR\\Payment' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/fr_FR/Payment.php', + 'Faker\\Provider\\fr_FR\\Person' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/fr_FR/Person.php', + 'Faker\\Provider\\fr_FR\\PhoneNumber' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/fr_FR/PhoneNumber.php', + 'Faker\\Provider\\fr_FR\\Text' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/fr_FR/Text.php', + 'Faker\\Provider\\he_IL\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/he_IL/Address.php', + 'Faker\\Provider\\he_IL\\Company' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/he_IL/Company.php', + 'Faker\\Provider\\he_IL\\Person' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/he_IL/Person.php', + 'Faker\\Provider\\he_IL\\PhoneNumber' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/he_IL/PhoneNumber.php', + 'Faker\\Provider\\hr_HR\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/hr_HR/Address.php', + 'Faker\\Provider\\hr_HR\\Company' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/hr_HR/Company.php', + 'Faker\\Provider\\hr_HR\\Person' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/hr_HR/Person.php', + 'Faker\\Provider\\hr_HR\\PhoneNumber' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/hr_HR/PhoneNumber.php', + 'Faker\\Provider\\hu_HU\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/hu_HU/Address.php', + 'Faker\\Provider\\hu_HU\\Company' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/hu_HU/Company.php', + 'Faker\\Provider\\hu_HU\\Payment' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/hu_HU/Payment.php', + 'Faker\\Provider\\hu_HU\\Person' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/hu_HU/Person.php', + 'Faker\\Provider\\hu_HU\\PhoneNumber' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/hu_HU/PhoneNumber.php', + 'Faker\\Provider\\hu_HU\\Text' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/hu_HU/Text.php', + 'Faker\\Provider\\hy_AM\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/hy_AM/Address.php', + 'Faker\\Provider\\hy_AM\\Color' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/hy_AM/Color.php', + 'Faker\\Provider\\hy_AM\\Company' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/hy_AM/Company.php', + 'Faker\\Provider\\hy_AM\\Internet' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/hy_AM/Internet.php', + 'Faker\\Provider\\hy_AM\\Person' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/hy_AM/Person.php', + 'Faker\\Provider\\hy_AM\\PhoneNumber' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/hy_AM/PhoneNumber.php', + 'Faker\\Provider\\id_ID\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/id_ID/Address.php', + 'Faker\\Provider\\id_ID\\Company' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/id_ID/Company.php', + 'Faker\\Provider\\id_ID\\Internet' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/id_ID/Internet.php', + 'Faker\\Provider\\id_ID\\Person' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/id_ID/Person.php', + 'Faker\\Provider\\id_ID\\PhoneNumber' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/id_ID/PhoneNumber.php', + 'Faker\\Provider\\is_IS\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/is_IS/Address.php', + 'Faker\\Provider\\is_IS\\Company' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/is_IS/Company.php', + 'Faker\\Provider\\is_IS\\Internet' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/is_IS/Internet.php', + 'Faker\\Provider\\is_IS\\Payment' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/is_IS/Payment.php', + 'Faker\\Provider\\is_IS\\Person' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/is_IS/Person.php', + 'Faker\\Provider\\is_IS\\PhoneNumber' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/is_IS/PhoneNumber.php', + 'Faker\\Provider\\it_CH\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/it_CH/Address.php', + 'Faker\\Provider\\it_CH\\Company' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/it_CH/Company.php', + 'Faker\\Provider\\it_CH\\Internet' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/it_CH/Internet.php', + 'Faker\\Provider\\it_CH\\Payment' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/it_CH/Payment.php', + 'Faker\\Provider\\it_CH\\Person' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/it_CH/Person.php', + 'Faker\\Provider\\it_CH\\PhoneNumber' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/it_CH/PhoneNumber.php', + 'Faker\\Provider\\it_CH\\Text' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/it_CH/Text.php', + 'Faker\\Provider\\it_IT\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/it_IT/Address.php', + 'Faker\\Provider\\it_IT\\Company' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/it_IT/Company.php', + 'Faker\\Provider\\it_IT\\Internet' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/it_IT/Internet.php', + 'Faker\\Provider\\it_IT\\Payment' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/it_IT/Payment.php', + 'Faker\\Provider\\it_IT\\Person' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/it_IT/Person.php', + 'Faker\\Provider\\it_IT\\PhoneNumber' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/it_IT/PhoneNumber.php', + 'Faker\\Provider\\it_IT\\Text' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/it_IT/Text.php', + 'Faker\\Provider\\ja_JP\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/ja_JP/Address.php', + 'Faker\\Provider\\ja_JP\\Company' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/ja_JP/Company.php', + 'Faker\\Provider\\ja_JP\\Internet' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/ja_JP/Internet.php', + 'Faker\\Provider\\ja_JP\\Person' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/ja_JP/Person.php', + 'Faker\\Provider\\ja_JP\\PhoneNumber' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/ja_JP/PhoneNumber.php', + 'Faker\\Provider\\ja_JP\\Text' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/ja_JP/Text.php', + 'Faker\\Provider\\ka_GE\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/ka_GE/Address.php', + 'Faker\\Provider\\ka_GE\\Color' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/ka_GE/Color.php', + 'Faker\\Provider\\ka_GE\\DateTime' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/ka_GE/DateTime.php', + 'Faker\\Provider\\ka_GE\\Internet' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/ka_GE/Internet.php', + 'Faker\\Provider\\ka_GE\\Payment' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/ka_GE/Payment.php', + 'Faker\\Provider\\ka_GE\\Person' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/ka_GE/Person.php', + 'Faker\\Provider\\ka_GE\\PhoneNumber' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/ka_GE/PhoneNumber.php', + 'Faker\\Provider\\ka_GE\\Text' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/ka_GE/Text.php', + 'Faker\\Provider\\kk_KZ\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/kk_KZ/Address.php', + 'Faker\\Provider\\kk_KZ\\Color' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/kk_KZ/Color.php', + 'Faker\\Provider\\kk_KZ\\Company' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/kk_KZ/Company.php', + 'Faker\\Provider\\kk_KZ\\Internet' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/kk_KZ/Internet.php', + 'Faker\\Provider\\kk_KZ\\Payment' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/kk_KZ/Payment.php', + 'Faker\\Provider\\kk_KZ\\Person' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/kk_KZ/Person.php', + 'Faker\\Provider\\kk_KZ\\PhoneNumber' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/kk_KZ/PhoneNumber.php', + 'Faker\\Provider\\kk_KZ\\Text' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/kk_KZ/Text.php', + 'Faker\\Provider\\ko_KR\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/ko_KR/Address.php', + 'Faker\\Provider\\ko_KR\\Company' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/ko_KR/Company.php', + 'Faker\\Provider\\ko_KR\\Internet' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/ko_KR/Internet.php', + 'Faker\\Provider\\ko_KR\\Person' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/ko_KR/Person.php', + 'Faker\\Provider\\ko_KR\\PhoneNumber' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/ko_KR/PhoneNumber.php', + 'Faker\\Provider\\ko_KR\\Text' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/ko_KR/Text.php', + 'Faker\\Provider\\lt_LT\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/lt_LT/Address.php', + 'Faker\\Provider\\lt_LT\\Company' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/lt_LT/Company.php', + 'Faker\\Provider\\lt_LT\\Internet' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/lt_LT/Internet.php', + 'Faker\\Provider\\lt_LT\\Person' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/lt_LT/Person.php', + 'Faker\\Provider\\lt_LT\\PhoneNumber' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/lt_LT/PhoneNumber.php', + 'Faker\\Provider\\lv_LV\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/lv_LV/Address.php', + 'Faker\\Provider\\lv_LV\\Color' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/lv_LV/Color.php', + 'Faker\\Provider\\lv_LV\\Internet' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/lv_LV/Internet.php', + 'Faker\\Provider\\lv_LV\\Payment' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/lv_LV/Payment.php', + 'Faker\\Provider\\lv_LV\\Person' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/lv_LV/Person.php', + 'Faker\\Provider\\lv_LV\\PhoneNumber' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/lv_LV/PhoneNumber.php', + 'Faker\\Provider\\me_ME\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/me_ME/Address.php', + 'Faker\\Provider\\me_ME\\Company' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/me_ME/Company.php', + 'Faker\\Provider\\me_ME\\Payment' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/me_ME/Payment.php', + 'Faker\\Provider\\me_ME\\Person' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/me_ME/Person.php', + 'Faker\\Provider\\me_ME\\PhoneNumber' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/me_ME/PhoneNumber.php', + 'Faker\\Provider\\mn_MN\\Person' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/mn_MN/Person.php', + 'Faker\\Provider\\mn_MN\\PhoneNumber' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/mn_MN/PhoneNumber.php', + 'Faker\\Provider\\nb_NO\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/nb_NO/Address.php', + 'Faker\\Provider\\nb_NO\\Company' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/nb_NO/Company.php', + 'Faker\\Provider\\nb_NO\\Payment' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/nb_NO/Payment.php', + 'Faker\\Provider\\nb_NO\\Person' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/nb_NO/Person.php', + 'Faker\\Provider\\nb_NO\\PhoneNumber' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/nb_NO/PhoneNumber.php', + 'Faker\\Provider\\ne_NP\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/ne_NP/Address.php', + 'Faker\\Provider\\ne_NP\\Internet' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/ne_NP/Internet.php', + 'Faker\\Provider\\ne_NP\\Person' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/ne_NP/Person.php', + 'Faker\\Provider\\ne_NP\\PhoneNumber' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/ne_NP/PhoneNumber.php', + 'Faker\\Provider\\nl_BE\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/nl_BE/Address.php', + 'Faker\\Provider\\nl_BE\\Company' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/nl_BE/Company.php', + 'Faker\\Provider\\nl_BE\\Internet' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/nl_BE/Internet.php', + 'Faker\\Provider\\nl_BE\\Payment' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/nl_BE/Payment.php', + 'Faker\\Provider\\nl_BE\\Person' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/nl_BE/Person.php', + 'Faker\\Provider\\nl_BE\\PhoneNumber' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/nl_BE/PhoneNumber.php', + 'Faker\\Provider\\nl_NL\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/nl_NL/Address.php', + 'Faker\\Provider\\nl_NL\\Color' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/nl_NL/Color.php', + 'Faker\\Provider\\nl_NL\\Company' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/nl_NL/Company.php', + 'Faker\\Provider\\nl_NL\\Internet' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/nl_NL/Internet.php', + 'Faker\\Provider\\nl_NL\\Payment' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/nl_NL/Payment.php', + 'Faker\\Provider\\nl_NL\\Person' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/nl_NL/Person.php', + 'Faker\\Provider\\nl_NL\\PhoneNumber' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/nl_NL/PhoneNumber.php', + 'Faker\\Provider\\nl_NL\\Text' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/nl_NL/Text.php', + 'Faker\\Provider\\pl_PL\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/pl_PL/Address.php', + 'Faker\\Provider\\pl_PL\\Company' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/pl_PL/Company.php', + 'Faker\\Provider\\pl_PL\\Internet' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/pl_PL/Internet.php', + 'Faker\\Provider\\pl_PL\\Payment' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/pl_PL/Payment.php', + 'Faker\\Provider\\pl_PL\\Person' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/pl_PL/Person.php', + 'Faker\\Provider\\pl_PL\\PhoneNumber' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/pl_PL/PhoneNumber.php', + 'Faker\\Provider\\pl_PL\\Text' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/pl_PL/Text.php', + 'Faker\\Provider\\pt_BR\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/pt_BR/Address.php', + 'Faker\\Provider\\pt_BR\\Company' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/pt_BR/Company.php', + 'Faker\\Provider\\pt_BR\\Internet' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/pt_BR/Internet.php', + 'Faker\\Provider\\pt_BR\\Payment' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/pt_BR/Payment.php', + 'Faker\\Provider\\pt_BR\\Person' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/pt_BR/Person.php', + 'Faker\\Provider\\pt_BR\\PhoneNumber' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/pt_BR/PhoneNumber.php', + 'Faker\\Provider\\pt_PT\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/pt_PT/Address.php', + 'Faker\\Provider\\pt_PT\\Payment' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/pt_PT/Payment.php', + 'Faker\\Provider\\pt_PT\\Person' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/pt_PT/Person.php', + 'Faker\\Provider\\pt_PT\\PhoneNumber' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/pt_PT/PhoneNumber.php', + 'Faker\\Provider\\ro_MD\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/ro_MD/Address.php', + 'Faker\\Provider\\ro_MD\\Payment' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/ro_MD/Payment.php', + 'Faker\\Provider\\ro_MD\\Person' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/ro_MD/Person.php', + 'Faker\\Provider\\ro_MD\\PhoneNumber' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/ro_MD/PhoneNumber.php', + 'Faker\\Provider\\ro_RO\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/ro_RO/Address.php', + 'Faker\\Provider\\ro_RO\\Payment' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/ro_RO/Payment.php', + 'Faker\\Provider\\ro_RO\\Person' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/ro_RO/Person.php', + 'Faker\\Provider\\ro_RO\\PhoneNumber' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/ro_RO/PhoneNumber.php', + 'Faker\\Provider\\ru_RU\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/ru_RU/Address.php', + 'Faker\\Provider\\ru_RU\\Color' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/ru_RU/Color.php', + 'Faker\\Provider\\ru_RU\\Company' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/ru_RU/Company.php', + 'Faker\\Provider\\ru_RU\\Internet' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/ru_RU/Internet.php', + 'Faker\\Provider\\ru_RU\\Payment' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/ru_RU/Payment.php', + 'Faker\\Provider\\ru_RU\\Person' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/ru_RU/Person.php', + 'Faker\\Provider\\ru_RU\\PhoneNumber' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/ru_RU/PhoneNumber.php', + 'Faker\\Provider\\ru_RU\\Text' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/ru_RU/Text.php', + 'Faker\\Provider\\sk_SK\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/sk_SK/Address.php', + 'Faker\\Provider\\sk_SK\\Company' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/sk_SK/Company.php', + 'Faker\\Provider\\sk_SK\\Internet' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/sk_SK/Internet.php', + 'Faker\\Provider\\sk_SK\\Payment' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/sk_SK/Payment.php', + 'Faker\\Provider\\sk_SK\\Person' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/sk_SK/Person.php', + 'Faker\\Provider\\sk_SK\\PhoneNumber' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/sk_SK/PhoneNumber.php', + 'Faker\\Provider\\sl_SI\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/sl_SI/Address.php', + 'Faker\\Provider\\sl_SI\\Internet' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/sl_SI/Internet.php', + 'Faker\\Provider\\sl_SI\\Payment' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/sl_SI/Payment.php', + 'Faker\\Provider\\sl_SI\\Person' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/sl_SI/Person.php', + 'Faker\\Provider\\sl_SI\\PhoneNumber' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/sl_SI/PhoneNumber.php', + 'Faker\\Provider\\sr_Cyrl_RS\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/sr_Cyrl_RS/Address.php', + 'Faker\\Provider\\sr_Cyrl_RS\\Payment' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/sr_Cyrl_RS/Payment.php', + 'Faker\\Provider\\sr_Cyrl_RS\\Person' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/sr_Cyrl_RS/Person.php', + 'Faker\\Provider\\sr_Latn_RS\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/sr_Latn_RS/Address.php', + 'Faker\\Provider\\sr_Latn_RS\\Payment' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/sr_Latn_RS/Payment.php', + 'Faker\\Provider\\sr_Latn_RS\\Person' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/sr_Latn_RS/Person.php', + 'Faker\\Provider\\sr_RS\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/sr_RS/Address.php', + 'Faker\\Provider\\sr_RS\\Payment' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/sr_RS/Payment.php', + 'Faker\\Provider\\sr_RS\\Person' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/sr_RS/Person.php', + 'Faker\\Provider\\sv_SE\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/sv_SE/Address.php', + 'Faker\\Provider\\sv_SE\\Company' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/sv_SE/Company.php', + 'Faker\\Provider\\sv_SE\\Payment' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/sv_SE/Payment.php', + 'Faker\\Provider\\sv_SE\\Person' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/sv_SE/Person.php', + 'Faker\\Provider\\sv_SE\\PhoneNumber' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/sv_SE/PhoneNumber.php', + 'Faker\\Provider\\tr_TR\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/tr_TR/Address.php', + 'Faker\\Provider\\tr_TR\\Color' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/tr_TR/Color.php', + 'Faker\\Provider\\tr_TR\\DateTime' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/tr_TR/DateTime.php', + 'Faker\\Provider\\tr_TR\\Internet' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/tr_TR/Internet.php', + 'Faker\\Provider\\tr_TR\\Payment' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/tr_TR/Payment.php', + 'Faker\\Provider\\tr_TR\\Person' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/tr_TR/Person.php', + 'Faker\\Provider\\tr_TR\\PhoneNumber' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/tr_TR/PhoneNumber.php', + 'Faker\\Provider\\uk_UA\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/uk_UA/Address.php', + 'Faker\\Provider\\uk_UA\\Color' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/uk_UA/Color.php', + 'Faker\\Provider\\uk_UA\\Company' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/uk_UA/Company.php', + 'Faker\\Provider\\uk_UA\\Internet' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/uk_UA/Internet.php', + 'Faker\\Provider\\uk_UA\\Person' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/uk_UA/Person.php', + 'Faker\\Provider\\uk_UA\\PhoneNumber' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/uk_UA/PhoneNumber.php', + 'Faker\\Provider\\uk_UA\\Text' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/uk_UA/Text.php', + 'Faker\\Provider\\vi_VN\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/vi_VN/Address.php', + 'Faker\\Provider\\vi_VN\\Color' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/vi_VN/Color.php', + 'Faker\\Provider\\vi_VN\\Internet' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/vi_VN/Internet.php', + 'Faker\\Provider\\vi_VN\\Person' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/vi_VN/Person.php', + 'Faker\\Provider\\vi_VN\\PhoneNumber' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/vi_VN/PhoneNumber.php', + 'Faker\\Provider\\zh_CN\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/zh_CN/Address.php', + 'Faker\\Provider\\zh_CN\\Color' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/zh_CN/Color.php', + 'Faker\\Provider\\zh_CN\\Company' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/zh_CN/Company.php', + 'Faker\\Provider\\zh_CN\\DateTime' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/zh_CN/DateTime.php', + 'Faker\\Provider\\zh_CN\\Internet' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/zh_CN/Internet.php', + 'Faker\\Provider\\zh_CN\\Payment' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/zh_CN/Payment.php', + 'Faker\\Provider\\zh_CN\\Person' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/zh_CN/Person.php', + 'Faker\\Provider\\zh_CN\\PhoneNumber' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/zh_CN/PhoneNumber.php', + 'Faker\\Provider\\zh_TW\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/zh_TW/Address.php', + 'Faker\\Provider\\zh_TW\\Color' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/zh_TW/Color.php', + 'Faker\\Provider\\zh_TW\\Company' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/zh_TW/Company.php', + 'Faker\\Provider\\zh_TW\\DateTime' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/zh_TW/DateTime.php', + 'Faker\\Provider\\zh_TW\\Internet' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/zh_TW/Internet.php', + 'Faker\\Provider\\zh_TW\\Payment' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/zh_TW/Payment.php', + 'Faker\\Provider\\zh_TW\\Person' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/zh_TW/Person.php', + 'Faker\\Provider\\zh_TW\\PhoneNumber' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/zh_TW/PhoneNumber.php', + 'Faker\\Provider\\zh_TW\\Text' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/zh_TW/Text.php', + 'Faker\\UniqueGenerator' => $vendorDir . '/fzaninotto/faker/src/Faker/UniqueGenerator.php', + 'Faker\\ValidGenerator' => $vendorDir . '/fzaninotto/faker/src/Faker/ValidGenerator.php', + 'File_Iterator' => $vendorDir . '/phpunit/php-file-iterator/src/Iterator.php', + 'File_Iterator_Facade' => $vendorDir . '/phpunit/php-file-iterator/src/Facade.php', + 'File_Iterator_Factory' => $vendorDir . '/phpunit/php-file-iterator/src/Factory.php', + 'Hamcrest\\Arrays\\IsArray' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArray.php', + 'Hamcrest\\Arrays\\IsArrayContaining' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContaining.php', + 'Hamcrest\\Arrays\\IsArrayContainingInAnyOrder' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingInAnyOrder.php', + 'Hamcrest\\Arrays\\IsArrayContainingInOrder' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingInOrder.php', + 'Hamcrest\\Arrays\\IsArrayContainingKey' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingKey.php', + 'Hamcrest\\Arrays\\IsArrayContainingKeyValuePair' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingKeyValuePair.php', + 'Hamcrest\\Arrays\\IsArrayWithSize' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayWithSize.php', + 'Hamcrest\\Arrays\\MatchingOnce' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/MatchingOnce.php', + 'Hamcrest\\Arrays\\SeriesMatchingOnce' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/SeriesMatchingOnce.php', + 'Hamcrest\\AssertionError' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/AssertionError.php', + 'Hamcrest\\BaseDescription' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/BaseDescription.php', + 'Hamcrest\\BaseMatcher' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/BaseMatcher.php', + 'Hamcrest\\Collection\\IsEmptyTraversable' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Collection/IsEmptyTraversable.php', + 'Hamcrest\\Collection\\IsTraversableWithSize' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Collection/IsTraversableWithSize.php', + 'Hamcrest\\Core\\AllOf' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/AllOf.php', + 'Hamcrest\\Core\\AnyOf' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/AnyOf.php', + 'Hamcrest\\Core\\CombinableMatcher' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/CombinableMatcher.php', + 'Hamcrest\\Core\\DescribedAs' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/DescribedAs.php', + 'Hamcrest\\Core\\Every' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Every.php', + 'Hamcrest\\Core\\HasToString' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/HasToString.php', + 'Hamcrest\\Core\\Is' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Is.php', + 'Hamcrest\\Core\\IsAnything' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsAnything.php', + 'Hamcrest\\Core\\IsCollectionContaining' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsCollectionContaining.php', + 'Hamcrest\\Core\\IsEqual' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsEqual.php', + 'Hamcrest\\Core\\IsIdentical' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsIdentical.php', + 'Hamcrest\\Core\\IsInstanceOf' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsInstanceOf.php', + 'Hamcrest\\Core\\IsNot' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsNot.php', + 'Hamcrest\\Core\\IsNull' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsNull.php', + 'Hamcrest\\Core\\IsSame' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsSame.php', + 'Hamcrest\\Core\\IsTypeOf' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsTypeOf.php', + 'Hamcrest\\Core\\Set' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Set.php', + 'Hamcrest\\Core\\ShortcutCombination' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/ShortcutCombination.php', + 'Hamcrest\\Description' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Description.php', + 'Hamcrest\\DiagnosingMatcher' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/DiagnosingMatcher.php', + 'Hamcrest\\FeatureMatcher' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/FeatureMatcher.php', + 'Hamcrest\\Internal\\SelfDescribingValue' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Internal/SelfDescribingValue.php', + 'Hamcrest\\Matcher' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Matcher.php', + 'Hamcrest\\MatcherAssert' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/MatcherAssert.php', + 'Hamcrest\\Matchers' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Matchers.php', + 'Hamcrest\\NullDescription' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/NullDescription.php', + 'Hamcrest\\Number\\IsCloseTo' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Number/IsCloseTo.php', + 'Hamcrest\\Number\\OrderingComparison' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Number/OrderingComparison.php', + 'Hamcrest\\SelfDescribing' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/SelfDescribing.php', + 'Hamcrest\\StringDescription' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/StringDescription.php', + 'Hamcrest\\Text\\IsEmptyString' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEmptyString.php', + 'Hamcrest\\Text\\IsEqualIgnoringCase' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEqualIgnoringCase.php', + 'Hamcrest\\Text\\IsEqualIgnoringWhiteSpace' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEqualIgnoringWhiteSpace.php', + 'Hamcrest\\Text\\MatchesPattern' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/MatchesPattern.php', + 'Hamcrest\\Text\\StringContains' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContains.php', + 'Hamcrest\\Text\\StringContainsIgnoringCase' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContainsIgnoringCase.php', + 'Hamcrest\\Text\\StringContainsInOrder' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContainsInOrder.php', + 'Hamcrest\\Text\\StringEndsWith' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringEndsWith.php', + 'Hamcrest\\Text\\StringStartsWith' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringStartsWith.php', + 'Hamcrest\\Text\\SubstringMatcher' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/SubstringMatcher.php', + 'Hamcrest\\TypeSafeDiagnosingMatcher' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/TypeSafeDiagnosingMatcher.php', + 'Hamcrest\\TypeSafeMatcher' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/TypeSafeMatcher.php', + 'Hamcrest\\Type\\IsArray' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsArray.php', + 'Hamcrest\\Type\\IsBoolean' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsBoolean.php', + 'Hamcrest\\Type\\IsCallable' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsCallable.php', + 'Hamcrest\\Type\\IsDouble' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsDouble.php', + 'Hamcrest\\Type\\IsInteger' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsInteger.php', + 'Hamcrest\\Type\\IsNumeric' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsNumeric.php', + 'Hamcrest\\Type\\IsObject' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsObject.php', + 'Hamcrest\\Type\\IsResource' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsResource.php', + 'Hamcrest\\Type\\IsScalar' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsScalar.php', + 'Hamcrest\\Type\\IsString' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsString.php', + 'Hamcrest\\Util' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Util.php', + 'Hamcrest\\Xml\\HasXPath' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Xml/HasXPath.php', + 'Illuminate\\Auth\\Access\\AuthorizationException' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/Access/AuthorizationException.php', + 'Illuminate\\Auth\\Access\\Gate' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/Access/Gate.php', + 'Illuminate\\Auth\\Access\\HandlesAuthorization' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/Access/HandlesAuthorization.php', + 'Illuminate\\Auth\\Access\\Response' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/Access/Response.php', + 'Illuminate\\Auth\\AuthManager' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/AuthManager.php', + 'Illuminate\\Auth\\AuthServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/AuthServiceProvider.php', + 'Illuminate\\Auth\\Authenticatable' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/Authenticatable.php', + 'Illuminate\\Auth\\AuthenticationException' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/AuthenticationException.php', + 'Illuminate\\Auth\\Console\\ClearResetsCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/Console/ClearResetsCommand.php', + 'Illuminate\\Auth\\Console\\MakeAuthCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/Console/MakeAuthCommand.php', + 'Illuminate\\Auth\\CreatesUserProviders' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/CreatesUserProviders.php', + 'Illuminate\\Auth\\DatabaseUserProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/DatabaseUserProvider.php', + 'Illuminate\\Auth\\EloquentUserProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/EloquentUserProvider.php', + 'Illuminate\\Auth\\Events\\Attempting' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/Events/Attempting.php', + 'Illuminate\\Auth\\Events\\Authenticated' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/Events/Authenticated.php', + 'Illuminate\\Auth\\Events\\Failed' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/Events/Failed.php', + 'Illuminate\\Auth\\Events\\Lockout' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/Events/Lockout.php', + 'Illuminate\\Auth\\Events\\Login' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/Events/Login.php', + 'Illuminate\\Auth\\Events\\Logout' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/Events/Logout.php', + 'Illuminate\\Auth\\Events\\Registered' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/Events/Registered.php', + 'Illuminate\\Auth\\GenericUser' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/GenericUser.php', + 'Illuminate\\Auth\\GuardHelpers' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/GuardHelpers.php', + 'Illuminate\\Auth\\Middleware\\Authenticate' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/Middleware/Authenticate.php', + 'Illuminate\\Auth\\Middleware\\AuthenticateWithBasicAuth' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/Middleware/AuthenticateWithBasicAuth.php', + 'Illuminate\\Auth\\Middleware\\Authorize' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/Middleware/Authorize.php', + 'Illuminate\\Auth\\Notifications\\ResetPassword' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/Notifications/ResetPassword.php', + 'Illuminate\\Auth\\Passwords\\CanResetPassword' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/Passwords/CanResetPassword.php', + 'Illuminate\\Auth\\Passwords\\DatabaseTokenRepository' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/Passwords/DatabaseTokenRepository.php', + 'Illuminate\\Auth\\Passwords\\PasswordBroker' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/Passwords/PasswordBroker.php', + 'Illuminate\\Auth\\Passwords\\PasswordBrokerManager' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/Passwords/PasswordBrokerManager.php', + 'Illuminate\\Auth\\Passwords\\PasswordResetServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/Passwords/PasswordResetServiceProvider.php', + 'Illuminate\\Auth\\Passwords\\TokenRepositoryInterface' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/Passwords/TokenRepositoryInterface.php', + 'Illuminate\\Auth\\Recaller' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/Recaller.php', + 'Illuminate\\Auth\\RequestGuard' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/RequestGuard.php', + 'Illuminate\\Auth\\SessionGuard' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/SessionGuard.php', + 'Illuminate\\Auth\\TokenGuard' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/TokenGuard.php', + 'Illuminate\\Broadcasting\\BroadcastController' => $vendorDir . '/laravel/framework/src/Illuminate/Broadcasting/BroadcastController.php', + 'Illuminate\\Broadcasting\\BroadcastEvent' => $vendorDir . '/laravel/framework/src/Illuminate/Broadcasting/BroadcastEvent.php', + 'Illuminate\\Broadcasting\\BroadcastException' => $vendorDir . '/laravel/framework/src/Illuminate/Broadcasting/BroadcastException.php', + 'Illuminate\\Broadcasting\\BroadcastManager' => $vendorDir . '/laravel/framework/src/Illuminate/Broadcasting/BroadcastManager.php', + 'Illuminate\\Broadcasting\\BroadcastServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Broadcasting/BroadcastServiceProvider.php', + 'Illuminate\\Broadcasting\\Broadcasters\\Broadcaster' => $vendorDir . '/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/Broadcaster.php', + 'Illuminate\\Broadcasting\\Broadcasters\\LogBroadcaster' => $vendorDir . '/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/LogBroadcaster.php', + 'Illuminate\\Broadcasting\\Broadcasters\\NullBroadcaster' => $vendorDir . '/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/NullBroadcaster.php', + 'Illuminate\\Broadcasting\\Broadcasters\\PusherBroadcaster' => $vendorDir . '/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/PusherBroadcaster.php', + 'Illuminate\\Broadcasting\\Broadcasters\\RedisBroadcaster' => $vendorDir . '/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/RedisBroadcaster.php', + 'Illuminate\\Broadcasting\\Channel' => $vendorDir . '/laravel/framework/src/Illuminate/Broadcasting/Channel.php', + 'Illuminate\\Broadcasting\\InteractsWithSockets' => $vendorDir . '/laravel/framework/src/Illuminate/Broadcasting/InteractsWithSockets.php', + 'Illuminate\\Broadcasting\\PendingBroadcast' => $vendorDir . '/laravel/framework/src/Illuminate/Broadcasting/PendingBroadcast.php', + 'Illuminate\\Broadcasting\\PresenceChannel' => $vendorDir . '/laravel/framework/src/Illuminate/Broadcasting/PresenceChannel.php', + 'Illuminate\\Broadcasting\\PrivateChannel' => $vendorDir . '/laravel/framework/src/Illuminate/Broadcasting/PrivateChannel.php', + 'Illuminate\\Bus\\BusServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Bus/BusServiceProvider.php', + 'Illuminate\\Bus\\Dispatcher' => $vendorDir . '/laravel/framework/src/Illuminate/Bus/Dispatcher.php', + 'Illuminate\\Bus\\Queueable' => $vendorDir . '/laravel/framework/src/Illuminate/Bus/Queueable.php', + 'Illuminate\\Cache\\ApcStore' => $vendorDir . '/laravel/framework/src/Illuminate/Cache/ApcStore.php', + 'Illuminate\\Cache\\ApcWrapper' => $vendorDir . '/laravel/framework/src/Illuminate/Cache/ApcWrapper.php', + 'Illuminate\\Cache\\ArrayStore' => $vendorDir . '/laravel/framework/src/Illuminate/Cache/ArrayStore.php', + 'Illuminate\\Cache\\CacheManager' => $vendorDir . '/laravel/framework/src/Illuminate/Cache/CacheManager.php', + 'Illuminate\\Cache\\CacheServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Cache/CacheServiceProvider.php', + 'Illuminate\\Cache\\Console\\CacheTableCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Cache/Console/CacheTableCommand.php', + 'Illuminate\\Cache\\Console\\ClearCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Cache/Console/ClearCommand.php', + 'Illuminate\\Cache\\Console\\ForgetCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Cache/Console/ForgetCommand.php', + 'Illuminate\\Cache\\DatabaseStore' => $vendorDir . '/laravel/framework/src/Illuminate/Cache/DatabaseStore.php', + 'Illuminate\\Cache\\Events\\CacheEvent' => $vendorDir . '/laravel/framework/src/Illuminate/Cache/Events/CacheEvent.php', + 'Illuminate\\Cache\\Events\\CacheHit' => $vendorDir . '/laravel/framework/src/Illuminate/Cache/Events/CacheHit.php', + 'Illuminate\\Cache\\Events\\CacheMissed' => $vendorDir . '/laravel/framework/src/Illuminate/Cache/Events/CacheMissed.php', + 'Illuminate\\Cache\\Events\\KeyForgotten' => $vendorDir . '/laravel/framework/src/Illuminate/Cache/Events/KeyForgotten.php', + 'Illuminate\\Cache\\Events\\KeyWritten' => $vendorDir . '/laravel/framework/src/Illuminate/Cache/Events/KeyWritten.php', + 'Illuminate\\Cache\\FileStore' => $vendorDir . '/laravel/framework/src/Illuminate/Cache/FileStore.php', + 'Illuminate\\Cache\\MemcachedConnector' => $vendorDir . '/laravel/framework/src/Illuminate/Cache/MemcachedConnector.php', + 'Illuminate\\Cache\\MemcachedStore' => $vendorDir . '/laravel/framework/src/Illuminate/Cache/MemcachedStore.php', + 'Illuminate\\Cache\\NullStore' => $vendorDir . '/laravel/framework/src/Illuminate/Cache/NullStore.php', + 'Illuminate\\Cache\\RateLimiter' => $vendorDir . '/laravel/framework/src/Illuminate/Cache/RateLimiter.php', + 'Illuminate\\Cache\\RedisStore' => $vendorDir . '/laravel/framework/src/Illuminate/Cache/RedisStore.php', + 'Illuminate\\Cache\\RedisTaggedCache' => $vendorDir . '/laravel/framework/src/Illuminate/Cache/RedisTaggedCache.php', + 'Illuminate\\Cache\\Repository' => $vendorDir . '/laravel/framework/src/Illuminate/Cache/Repository.php', + 'Illuminate\\Cache\\RetrievesMultipleKeys' => $vendorDir . '/laravel/framework/src/Illuminate/Cache/RetrievesMultipleKeys.php', + 'Illuminate\\Cache\\TagSet' => $vendorDir . '/laravel/framework/src/Illuminate/Cache/TagSet.php', + 'Illuminate\\Cache\\TaggableStore' => $vendorDir . '/laravel/framework/src/Illuminate/Cache/TaggableStore.php', + 'Illuminate\\Cache\\TaggedCache' => $vendorDir . '/laravel/framework/src/Illuminate/Cache/TaggedCache.php', + 'Illuminate\\Config\\Repository' => $vendorDir . '/laravel/framework/src/Illuminate/Config/Repository.php', + 'Illuminate\\Console\\Application' => $vendorDir . '/laravel/framework/src/Illuminate/Console/Application.php', + 'Illuminate\\Console\\Command' => $vendorDir . '/laravel/framework/src/Illuminate/Console/Command.php', + 'Illuminate\\Console\\ConfirmableTrait' => $vendorDir . '/laravel/framework/src/Illuminate/Console/ConfirmableTrait.php', + 'Illuminate\\Console\\DetectsApplicationNamespace' => $vendorDir . '/laravel/framework/src/Illuminate/Console/DetectsApplicationNamespace.php', + 'Illuminate\\Console\\Events\\ArtisanStarting' => $vendorDir . '/laravel/framework/src/Illuminate/Console/Events/ArtisanStarting.php', + 'Illuminate\\Console\\GeneratorCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Console/GeneratorCommand.php', + 'Illuminate\\Console\\OutputStyle' => $vendorDir . '/laravel/framework/src/Illuminate/Console/OutputStyle.php', + 'Illuminate\\Console\\Parser' => $vendorDir . '/laravel/framework/src/Illuminate/Console/Parser.php', + 'Illuminate\\Console\\Scheduling\\CacheMutex' => $vendorDir . '/laravel/framework/src/Illuminate/Console/Scheduling/CacheMutex.php', + 'Illuminate\\Console\\Scheduling\\CallbackEvent' => $vendorDir . '/laravel/framework/src/Illuminate/Console/Scheduling/CallbackEvent.php', + 'Illuminate\\Console\\Scheduling\\CommandBuilder' => $vendorDir . '/laravel/framework/src/Illuminate/Console/Scheduling/CommandBuilder.php', + 'Illuminate\\Console\\Scheduling\\Event' => $vendorDir . '/laravel/framework/src/Illuminate/Console/Scheduling/Event.php', + 'Illuminate\\Console\\Scheduling\\ManagesFrequencies' => $vendorDir . '/laravel/framework/src/Illuminate/Console/Scheduling/ManagesFrequencies.php', + 'Illuminate\\Console\\Scheduling\\Mutex' => $vendorDir . '/laravel/framework/src/Illuminate/Console/Scheduling/Mutex.php', + 'Illuminate\\Console\\Scheduling\\Schedule' => $vendorDir . '/laravel/framework/src/Illuminate/Console/Scheduling/Schedule.php', + 'Illuminate\\Console\\Scheduling\\ScheduleFinishCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Console/Scheduling/ScheduleFinishCommand.php', + 'Illuminate\\Console\\Scheduling\\ScheduleRunCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Console/Scheduling/ScheduleRunCommand.php', + 'Illuminate\\Container\\BoundMethod' => $vendorDir . '/laravel/framework/src/Illuminate/Container/BoundMethod.php', + 'Illuminate\\Container\\Container' => $vendorDir . '/laravel/framework/src/Illuminate/Container/Container.php', + 'Illuminate\\Container\\ContextualBindingBuilder' => $vendorDir . '/laravel/framework/src/Illuminate/Container/ContextualBindingBuilder.php', + 'Illuminate\\Contracts\\Auth\\Access\\Authorizable' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Auth/Access/Authorizable.php', + 'Illuminate\\Contracts\\Auth\\Access\\Gate' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Auth/Access/Gate.php', + 'Illuminate\\Contracts\\Auth\\Authenticatable' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Auth/Authenticatable.php', + 'Illuminate\\Contracts\\Auth\\CanResetPassword' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Auth/CanResetPassword.php', + 'Illuminate\\Contracts\\Auth\\Factory' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Auth/Factory.php', + 'Illuminate\\Contracts\\Auth\\Guard' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Auth/Guard.php', + 'Illuminate\\Contracts\\Auth\\PasswordBroker' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Auth/PasswordBroker.php', + 'Illuminate\\Contracts\\Auth\\PasswordBrokerFactory' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Auth/PasswordBrokerFactory.php', + 'Illuminate\\Contracts\\Auth\\StatefulGuard' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Auth/StatefulGuard.php', + 'Illuminate\\Contracts\\Auth\\SupportsBasicAuth' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Auth/SupportsBasicAuth.php', + 'Illuminate\\Contracts\\Auth\\UserProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Auth/UserProvider.php', + 'Illuminate\\Contracts\\Broadcasting\\Broadcaster' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Broadcasting/Broadcaster.php', + 'Illuminate\\Contracts\\Broadcasting\\Factory' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Broadcasting/Factory.php', + 'Illuminate\\Contracts\\Broadcasting\\ShouldBroadcast' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Broadcasting/ShouldBroadcast.php', + 'Illuminate\\Contracts\\Broadcasting\\ShouldBroadcastNow' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Broadcasting/ShouldBroadcastNow.php', + 'Illuminate\\Contracts\\Bus\\Dispatcher' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Bus/Dispatcher.php', + 'Illuminate\\Contracts\\Bus\\QueueingDispatcher' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Bus/QueueingDispatcher.php', + 'Illuminate\\Contracts\\Cache\\Factory' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Cache/Factory.php', + 'Illuminate\\Contracts\\Cache\\Repository' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Cache/Repository.php', + 'Illuminate\\Contracts\\Cache\\Store' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Cache/Store.php', + 'Illuminate\\Contracts\\Config\\Repository' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Config/Repository.php', + 'Illuminate\\Contracts\\Console\\Application' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Console/Application.php', + 'Illuminate\\Contracts\\Console\\Kernel' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Console/Kernel.php', + 'Illuminate\\Contracts\\Container\\BindingResolutionException' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Container/BindingResolutionException.php', + 'Illuminate\\Contracts\\Container\\Container' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Container/Container.php', + 'Illuminate\\Contracts\\Container\\ContextualBindingBuilder' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Container/ContextualBindingBuilder.php', + 'Illuminate\\Contracts\\Cookie\\Factory' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Cookie/Factory.php', + 'Illuminate\\Contracts\\Cookie\\QueueingFactory' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Cookie/QueueingFactory.php', + 'Illuminate\\Contracts\\Database\\ModelIdentifier' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Database/ModelIdentifier.php', + 'Illuminate\\Contracts\\Debug\\ExceptionHandler' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Debug/ExceptionHandler.php', + 'Illuminate\\Contracts\\Encryption\\DecryptException' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Encryption/DecryptException.php', + 'Illuminate\\Contracts\\Encryption\\EncryptException' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Encryption/EncryptException.php', + 'Illuminate\\Contracts\\Encryption\\Encrypter' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Encryption/Encrypter.php', + 'Illuminate\\Contracts\\Events\\Dispatcher' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Events/Dispatcher.php', + 'Illuminate\\Contracts\\Filesystem\\Cloud' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Filesystem/Cloud.php', + 'Illuminate\\Contracts\\Filesystem\\Factory' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Filesystem/Factory.php', + 'Illuminate\\Contracts\\Filesystem\\FileNotFoundException' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Filesystem/FileNotFoundException.php', + 'Illuminate\\Contracts\\Filesystem\\Filesystem' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Filesystem/Filesystem.php', + 'Illuminate\\Contracts\\Foundation\\Application' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Foundation/Application.php', + 'Illuminate\\Contracts\\Hashing\\Hasher' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Hashing/Hasher.php', + 'Illuminate\\Contracts\\Http\\Kernel' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Http/Kernel.php', + 'Illuminate\\Contracts\\Logging\\Log' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Logging/Log.php', + 'Illuminate\\Contracts\\Mail\\MailQueue' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Mail/MailQueue.php', + 'Illuminate\\Contracts\\Mail\\Mailable' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Mail/Mailable.php', + 'Illuminate\\Contracts\\Mail\\Mailer' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Mail/Mailer.php', + 'Illuminate\\Contracts\\Notifications\\Dispatcher' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Notifications/Dispatcher.php', + 'Illuminate\\Contracts\\Notifications\\Factory' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Notifications/Factory.php', + 'Illuminate\\Contracts\\Pagination\\LengthAwarePaginator' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Pagination/LengthAwarePaginator.php', + 'Illuminate\\Contracts\\Pagination\\Paginator' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Pagination/Paginator.php', + 'Illuminate\\Contracts\\Pipeline\\Hub' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Pipeline/Hub.php', + 'Illuminate\\Contracts\\Pipeline\\Pipeline' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Pipeline/Pipeline.php', + 'Illuminate\\Contracts\\Queue\\EntityNotFoundException' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Queue/EntityNotFoundException.php', + 'Illuminate\\Contracts\\Queue\\EntityResolver' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Queue/EntityResolver.php', + 'Illuminate\\Contracts\\Queue\\Factory' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Queue/Factory.php', + 'Illuminate\\Contracts\\Queue\\Job' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Queue/Job.php', + 'Illuminate\\Contracts\\Queue\\Monitor' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Queue/Monitor.php', + 'Illuminate\\Contracts\\Queue\\Queue' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Queue/Queue.php', + 'Illuminate\\Contracts\\Queue\\QueueableCollection' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Queue/QueueableCollection.php', + 'Illuminate\\Contracts\\Queue\\QueueableEntity' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Queue/QueueableEntity.php', + 'Illuminate\\Contracts\\Queue\\ShouldQueue' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Queue/ShouldQueue.php', + 'Illuminate\\Contracts\\Redis\\Factory' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Redis/Factory.php', + 'Illuminate\\Contracts\\Routing\\BindingRegistrar' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Routing/BindingRegistrar.php', + 'Illuminate\\Contracts\\Routing\\Registrar' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Routing/Registrar.php', + 'Illuminate\\Contracts\\Routing\\ResponseFactory' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Routing/ResponseFactory.php', + 'Illuminate\\Contracts\\Routing\\UrlGenerator' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Routing/UrlGenerator.php', + 'Illuminate\\Contracts\\Routing\\UrlRoutable' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Routing/UrlRoutable.php', + 'Illuminate\\Contracts\\Session\\Session' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Session/Session.php', + 'Illuminate\\Contracts\\Support\\Arrayable' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Support/Arrayable.php', + 'Illuminate\\Contracts\\Support\\Htmlable' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Support/Htmlable.php', + 'Illuminate\\Contracts\\Support\\Jsonable' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Support/Jsonable.php', + 'Illuminate\\Contracts\\Support\\MessageBag' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Support/MessageBag.php', + 'Illuminate\\Contracts\\Support\\MessageProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Support/MessageProvider.php', + 'Illuminate\\Contracts\\Support\\Renderable' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Support/Renderable.php', + 'Illuminate\\Contracts\\Translation\\Translator' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Translation/Translator.php', + 'Illuminate\\Contracts\\Validation\\Factory' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Validation/Factory.php', + 'Illuminate\\Contracts\\Validation\\ValidatesWhenResolved' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Validation/ValidatesWhenResolved.php', + 'Illuminate\\Contracts\\Validation\\Validator' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/Validation/Validator.php', + 'Illuminate\\Contracts\\View\\Factory' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/View/Factory.php', + 'Illuminate\\Contracts\\View\\View' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/View/View.php', + 'Illuminate\\Cookie\\CookieJar' => $vendorDir . '/laravel/framework/src/Illuminate/Cookie/CookieJar.php', + 'Illuminate\\Cookie\\CookieServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Cookie/CookieServiceProvider.php', + 'Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse' => $vendorDir . '/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php', + 'Illuminate\\Cookie\\Middleware\\EncryptCookies' => $vendorDir . '/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php', + 'Illuminate\\Database\\Capsule\\Manager' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Capsule/Manager.php', + 'Illuminate\\Database\\Concerns\\BuildsQueries' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Concerns/BuildsQueries.php', + 'Illuminate\\Database\\Concerns\\ManagesTransactions' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Concerns/ManagesTransactions.php', + 'Illuminate\\Database\\Connection' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Connection.php', + 'Illuminate\\Database\\ConnectionInterface' => $vendorDir . '/laravel/framework/src/Illuminate/Database/ConnectionInterface.php', + 'Illuminate\\Database\\ConnectionResolver' => $vendorDir . '/laravel/framework/src/Illuminate/Database/ConnectionResolver.php', + 'Illuminate\\Database\\ConnectionResolverInterface' => $vendorDir . '/laravel/framework/src/Illuminate/Database/ConnectionResolverInterface.php', + 'Illuminate\\Database\\Connectors\\ConnectionFactory' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php', + 'Illuminate\\Database\\Connectors\\Connector' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Connectors/Connector.php', + 'Illuminate\\Database\\Connectors\\ConnectorInterface' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Connectors/ConnectorInterface.php', + 'Illuminate\\Database\\Connectors\\MySqlConnector' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Connectors/MySqlConnector.php', + 'Illuminate\\Database\\Connectors\\PostgresConnector' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Connectors/PostgresConnector.php', + 'Illuminate\\Database\\Connectors\\SQLiteConnector' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Connectors/SQLiteConnector.php', + 'Illuminate\\Database\\Connectors\\SqlServerConnector' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Connectors/SqlServerConnector.php', + 'Illuminate\\Database\\Console\\Migrations\\BaseCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Console/Migrations/BaseCommand.php', + 'Illuminate\\Database\\Console\\Migrations\\InstallCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Console/Migrations/InstallCommand.php', + 'Illuminate\\Database\\Console\\Migrations\\MigrateCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php', + 'Illuminate\\Database\\Console\\Migrations\\MigrateMakeCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateMakeCommand.php', + 'Illuminate\\Database\\Console\\Migrations\\RefreshCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Console/Migrations/RefreshCommand.php', + 'Illuminate\\Database\\Console\\Migrations\\ResetCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Console/Migrations/ResetCommand.php', + 'Illuminate\\Database\\Console\\Migrations\\RollbackCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Console/Migrations/RollbackCommand.php', + 'Illuminate\\Database\\Console\\Migrations\\StatusCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Console/Migrations/StatusCommand.php', + 'Illuminate\\Database\\Console\\Seeds\\SeedCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Console/Seeds/SeedCommand.php', + 'Illuminate\\Database\\Console\\Seeds\\SeederMakeCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Console/Seeds/SeederMakeCommand.php', + 'Illuminate\\Database\\DatabaseManager' => $vendorDir . '/laravel/framework/src/Illuminate/Database/DatabaseManager.php', + 'Illuminate\\Database\\DatabaseServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Database/DatabaseServiceProvider.php', + 'Illuminate\\Database\\DetectsDeadlocks' => $vendorDir . '/laravel/framework/src/Illuminate/Database/DetectsDeadlocks.php', + 'Illuminate\\Database\\DetectsLostConnections' => $vendorDir . '/laravel/framework/src/Illuminate/Database/DetectsLostConnections.php', + 'Illuminate\\Database\\Eloquent\\Builder' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php', + 'Illuminate\\Database\\Eloquent\\Collection' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/Collection.php', + 'Illuminate\\Database\\Eloquent\\Concerns\\GuardsAttributes' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/GuardsAttributes.php', + 'Illuminate\\Database\\Eloquent\\Concerns\\HasAttributes' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php', + 'Illuminate\\Database\\Eloquent\\Concerns\\HasEvents' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasEvents.php', + 'Illuminate\\Database\\Eloquent\\Concerns\\HasGlobalScopes' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasGlobalScopes.php', + 'Illuminate\\Database\\Eloquent\\Concerns\\HasRelationships' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasRelationships.php', + 'Illuminate\\Database\\Eloquent\\Concerns\\HasTimestamps' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasTimestamps.php', + 'Illuminate\\Database\\Eloquent\\Concerns\\HidesAttributes' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HidesAttributes.php', + 'Illuminate\\Database\\Eloquent\\Concerns\\QueriesRelationships' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/QueriesRelationships.php', + 'Illuminate\\Database\\Eloquent\\Factory' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/Factory.php', + 'Illuminate\\Database\\Eloquent\\FactoryBuilder' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/FactoryBuilder.php', + 'Illuminate\\Database\\Eloquent\\JsonEncodingException' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/JsonEncodingException.php', + 'Illuminate\\Database\\Eloquent\\MassAssignmentException' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/MassAssignmentException.php', + 'Illuminate\\Database\\Eloquent\\Model' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/Model.php', + 'Illuminate\\Database\\Eloquent\\ModelNotFoundException' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/ModelNotFoundException.php', + 'Illuminate\\Database\\Eloquent\\QueueEntityResolver' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/QueueEntityResolver.php', + 'Illuminate\\Database\\Eloquent\\RelationNotFoundException' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/RelationNotFoundException.php', + 'Illuminate\\Database\\Eloquent\\Relations\\BelongsTo' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/Relations/BelongsTo.php', + 'Illuminate\\Database\\Eloquent\\Relations\\BelongsToMany' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/Relations/BelongsToMany.php', + 'Illuminate\\Database\\Eloquent\\Relations\\Concerns\\InteractsWithPivotTable' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Concerns/InteractsWithPivotTable.php', + 'Illuminate\\Database\\Eloquent\\Relations\\HasMany' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasMany.php', + 'Illuminate\\Database\\Eloquent\\Relations\\HasManyThrough' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasManyThrough.php', + 'Illuminate\\Database\\Eloquent\\Relations\\HasOne' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOne.php', + 'Illuminate\\Database\\Eloquent\\Relations\\HasOneOrMany' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOneOrMany.php', + 'Illuminate\\Database\\Eloquent\\Relations\\MorphMany' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphMany.php', + 'Illuminate\\Database\\Eloquent\\Relations\\MorphOne' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphOne.php', + 'Illuminate\\Database\\Eloquent\\Relations\\MorphOneOrMany' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphOneOrMany.php', + 'Illuminate\\Database\\Eloquent\\Relations\\MorphPivot' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphPivot.php', + 'Illuminate\\Database\\Eloquent\\Relations\\MorphTo' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphTo.php', + 'Illuminate\\Database\\Eloquent\\Relations\\MorphToMany' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphToMany.php', + 'Illuminate\\Database\\Eloquent\\Relations\\Pivot' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Pivot.php', + 'Illuminate\\Database\\Eloquent\\Relations\\Relation' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Relation.php', + 'Illuminate\\Database\\Eloquent\\Scope' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/Scope.php', + 'Illuminate\\Database\\Eloquent\\SoftDeletes' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/SoftDeletes.php', + 'Illuminate\\Database\\Eloquent\\SoftDeletingScope' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/SoftDeletingScope.php', + 'Illuminate\\Database\\Events\\ConnectionEvent' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Events/ConnectionEvent.php', + 'Illuminate\\Database\\Events\\QueryExecuted' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Events/QueryExecuted.php', + 'Illuminate\\Database\\Events\\StatementPrepared' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Events/StatementPrepared.php', + 'Illuminate\\Database\\Events\\TransactionBeginning' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Events/TransactionBeginning.php', + 'Illuminate\\Database\\Events\\TransactionCommitted' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Events/TransactionCommitted.php', + 'Illuminate\\Database\\Events\\TransactionRolledBack' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Events/TransactionRolledBack.php', + 'Illuminate\\Database\\Grammar' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Grammar.php', + 'Illuminate\\Database\\MigrationServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Database/MigrationServiceProvider.php', + 'Illuminate\\Database\\Migrations\\DatabaseMigrationRepository' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Migrations/DatabaseMigrationRepository.php', + 'Illuminate\\Database\\Migrations\\Migration' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Migrations/Migration.php', + 'Illuminate\\Database\\Migrations\\MigrationCreator' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Migrations/MigrationCreator.php', + 'Illuminate\\Database\\Migrations\\MigrationRepositoryInterface' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Migrations/MigrationRepositoryInterface.php', + 'Illuminate\\Database\\Migrations\\Migrator' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php', + 'Illuminate\\Database\\MySqlConnection' => $vendorDir . '/laravel/framework/src/Illuminate/Database/MySqlConnection.php', + 'Illuminate\\Database\\PostgresConnection' => $vendorDir . '/laravel/framework/src/Illuminate/Database/PostgresConnection.php', + 'Illuminate\\Database\\QueryException' => $vendorDir . '/laravel/framework/src/Illuminate/Database/QueryException.php', + 'Illuminate\\Database\\Query\\Builder' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Query/Builder.php', + 'Illuminate\\Database\\Query\\Expression' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Query/Expression.php', + 'Illuminate\\Database\\Query\\Grammars\\Grammar' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Query/Grammars/Grammar.php', + 'Illuminate\\Database\\Query\\Grammars\\MySqlGrammar' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Query/Grammars/MySqlGrammar.php', + 'Illuminate\\Database\\Query\\Grammars\\PostgresGrammar' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Query/Grammars/PostgresGrammar.php', + 'Illuminate\\Database\\Query\\Grammars\\SQLiteGrammar' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Query/Grammars/SQLiteGrammar.php', + 'Illuminate\\Database\\Query\\Grammars\\SqlServerGrammar' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Query/Grammars/SqlServerGrammar.php', + 'Illuminate\\Database\\Query\\JoinClause' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Query/JoinClause.php', + 'Illuminate\\Database\\Query\\JsonExpression' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Query/JsonExpression.php', + 'Illuminate\\Database\\Query\\Processors\\MySqlProcessor' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Query/Processors/MySqlProcessor.php', + 'Illuminate\\Database\\Query\\Processors\\PostgresProcessor' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Query/Processors/PostgresProcessor.php', + 'Illuminate\\Database\\Query\\Processors\\Processor' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Query/Processors/Processor.php', + 'Illuminate\\Database\\Query\\Processors\\SQLiteProcessor' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Query/Processors/SQLiteProcessor.php', + 'Illuminate\\Database\\Query\\Processors\\SqlServerProcessor' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Query/Processors/SqlServerProcessor.php', + 'Illuminate\\Database\\SQLiteConnection' => $vendorDir . '/laravel/framework/src/Illuminate/Database/SQLiteConnection.php', + 'Illuminate\\Database\\Schema\\Blueprint' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Schema/Blueprint.php', + 'Illuminate\\Database\\Schema\\Builder' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Schema/Builder.php', + 'Illuminate\\Database\\Schema\\Grammars\\ChangeColumn' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Schema/Grammars/ChangeColumn.php', + 'Illuminate\\Database\\Schema\\Grammars\\Grammar' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Schema/Grammars/Grammar.php', + 'Illuminate\\Database\\Schema\\Grammars\\MySqlGrammar' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php', + 'Illuminate\\Database\\Schema\\Grammars\\PostgresGrammar' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php', + 'Illuminate\\Database\\Schema\\Grammars\\RenameColumn' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Schema/Grammars/RenameColumn.php', + 'Illuminate\\Database\\Schema\\Grammars\\SQLiteGrammar' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Schema/Grammars/SQLiteGrammar.php', + 'Illuminate\\Database\\Schema\\Grammars\\SqlServerGrammar' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Schema/Grammars/SqlServerGrammar.php', + 'Illuminate\\Database\\Schema\\MySqlBuilder' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Schema/MySqlBuilder.php', + 'Illuminate\\Database\\Schema\\PostgresBuilder' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Schema/PostgresBuilder.php', + 'Illuminate\\Database\\Seeder' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Seeder.php', + 'Illuminate\\Database\\SqlServerConnection' => $vendorDir . '/laravel/framework/src/Illuminate/Database/SqlServerConnection.php', + 'Illuminate\\Encryption\\Encrypter' => $vendorDir . '/laravel/framework/src/Illuminate/Encryption/Encrypter.php', + 'Illuminate\\Encryption\\EncryptionServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Encryption/EncryptionServiceProvider.php', + 'Illuminate\\Events\\CallQueuedHandler' => $vendorDir . '/laravel/framework/src/Illuminate/Events/CallQueuedHandler.php', + 'Illuminate\\Events\\CallQueuedListener' => $vendorDir . '/laravel/framework/src/Illuminate/Events/CallQueuedListener.php', + 'Illuminate\\Events\\Dispatcher' => $vendorDir . '/laravel/framework/src/Illuminate/Events/Dispatcher.php', + 'Illuminate\\Events\\EventServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Events/EventServiceProvider.php', + 'Illuminate\\Filesystem\\Filesystem' => $vendorDir . '/laravel/framework/src/Illuminate/Filesystem/Filesystem.php', + 'Illuminate\\Filesystem\\FilesystemAdapter' => $vendorDir . '/laravel/framework/src/Illuminate/Filesystem/FilesystemAdapter.php', + 'Illuminate\\Filesystem\\FilesystemManager' => $vendorDir . '/laravel/framework/src/Illuminate/Filesystem/FilesystemManager.php', + 'Illuminate\\Filesystem\\FilesystemServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Filesystem/FilesystemServiceProvider.php', + 'Illuminate\\Foundation\\AliasLoader' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/AliasLoader.php', + 'Illuminate\\Foundation\\Application' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Application.php', + 'Illuminate\\Foundation\\Auth\\Access\\Authorizable' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Auth/Access/Authorizable.php', + 'Illuminate\\Foundation\\Auth\\Access\\AuthorizesRequests' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Auth/Access/AuthorizesRequests.php', + 'Illuminate\\Foundation\\Auth\\AuthenticatesUsers' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Auth/AuthenticatesUsers.php', + 'Illuminate\\Foundation\\Auth\\RedirectsUsers' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Auth/RedirectsUsers.php', + 'Illuminate\\Foundation\\Auth\\RegistersUsers' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Auth/RegistersUsers.php', + 'Illuminate\\Foundation\\Auth\\ResetsPasswords' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Auth/ResetsPasswords.php', + 'Illuminate\\Foundation\\Auth\\SendsPasswordResetEmails' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Auth/SendsPasswordResetEmails.php', + 'Illuminate\\Foundation\\Auth\\ThrottlesLogins' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Auth/ThrottlesLogins.php', + 'Illuminate\\Foundation\\Auth\\User' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Auth/User.php', + 'Illuminate\\Foundation\\Bootstrap\\BootProviders' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Bootstrap/BootProviders.php', + 'Illuminate\\Foundation\\Bootstrap\\HandleExceptions' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php', + 'Illuminate\\Foundation\\Bootstrap\\LoadConfiguration' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Bootstrap/LoadConfiguration.php', + 'Illuminate\\Foundation\\Bootstrap\\LoadEnvironmentVariables' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Bootstrap/LoadEnvironmentVariables.php', + 'Illuminate\\Foundation\\Bootstrap\\RegisterFacades' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Bootstrap/RegisterFacades.php', + 'Illuminate\\Foundation\\Bootstrap\\RegisterProviders' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Bootstrap/RegisterProviders.php', + 'Illuminate\\Foundation\\Bootstrap\\SetRequestForConsole' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Bootstrap/SetRequestForConsole.php', + 'Illuminate\\Foundation\\Bus\\Dispatchable' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Bus/Dispatchable.php', + 'Illuminate\\Foundation\\Bus\\DispatchesJobs' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Bus/DispatchesJobs.php', + 'Illuminate\\Foundation\\Bus\\PendingDispatch' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Bus/PendingDispatch.php', + 'Illuminate\\Foundation\\ComposerScripts' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/ComposerScripts.php', + 'Illuminate\\Foundation\\Console\\AppNameCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Console/AppNameCommand.php', + 'Illuminate\\Foundation\\Console\\ClearCompiledCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Console/ClearCompiledCommand.php', + 'Illuminate\\Foundation\\Console\\ClosureCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Console/ClosureCommand.php', + 'Illuminate\\Foundation\\Console\\ConfigCacheCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Console/ConfigCacheCommand.php', + 'Illuminate\\Foundation\\Console\\ConfigClearCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Console/ConfigClearCommand.php', + 'Illuminate\\Foundation\\Console\\ConsoleMakeCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Console/ConsoleMakeCommand.php', + 'Illuminate\\Foundation\\Console\\DownCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Console/DownCommand.php', + 'Illuminate\\Foundation\\Console\\EnvironmentCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Console/EnvironmentCommand.php', + 'Illuminate\\Foundation\\Console\\EventGenerateCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Console/EventGenerateCommand.php', + 'Illuminate\\Foundation\\Console\\EventMakeCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Console/EventMakeCommand.php', + 'Illuminate\\Foundation\\Console\\JobMakeCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Console/JobMakeCommand.php', + 'Illuminate\\Foundation\\Console\\Kernel' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php', + 'Illuminate\\Foundation\\Console\\KeyGenerateCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Console/KeyGenerateCommand.php', + 'Illuminate\\Foundation\\Console\\ListenerMakeCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Console/ListenerMakeCommand.php', + 'Illuminate\\Foundation\\Console\\MailMakeCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Console/MailMakeCommand.php', + 'Illuminate\\Foundation\\Console\\ModelMakeCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Console/ModelMakeCommand.php', + 'Illuminate\\Foundation\\Console\\NotificationMakeCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Console/NotificationMakeCommand.php', + 'Illuminate\\Foundation\\Console\\OptimizeCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Console/OptimizeCommand.php', + 'Illuminate\\Foundation\\Console\\PolicyMakeCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Console/PolicyMakeCommand.php', + 'Illuminate\\Foundation\\Console\\ProviderMakeCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Console/ProviderMakeCommand.php', + 'Illuminate\\Foundation\\Console\\QueuedCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Console/QueuedCommand.php', + 'Illuminate\\Foundation\\Console\\RequestMakeCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Console/RequestMakeCommand.php', + 'Illuminate\\Foundation\\Console\\RouteCacheCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Console/RouteCacheCommand.php', + 'Illuminate\\Foundation\\Console\\RouteClearCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Console/RouteClearCommand.php', + 'Illuminate\\Foundation\\Console\\RouteListCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Console/RouteListCommand.php', + 'Illuminate\\Foundation\\Console\\ServeCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Console/ServeCommand.php', + 'Illuminate\\Foundation\\Console\\StorageLinkCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Console/StorageLinkCommand.php', + 'Illuminate\\Foundation\\Console\\TestMakeCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Console/TestMakeCommand.php', + 'Illuminate\\Foundation\\Console\\UpCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Console/UpCommand.php', + 'Illuminate\\Foundation\\Console\\VendorPublishCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Console/VendorPublishCommand.php', + 'Illuminate\\Foundation\\Console\\ViewClearCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Console/ViewClearCommand.php', + 'Illuminate\\Foundation\\EnvironmentDetector' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/EnvironmentDetector.php', + 'Illuminate\\Foundation\\Events\\Dispatchable' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Events/Dispatchable.php', + 'Illuminate\\Foundation\\Events\\LocaleUpdated' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Events/LocaleUpdated.php', + 'Illuminate\\Foundation\\Exceptions\\Handler' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php', + 'Illuminate\\Foundation\\Http\\Events\\RequestHandled' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Http/Events/RequestHandled.php', + 'Illuminate\\Foundation\\Http\\Exceptions\\MaintenanceModeException' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Http/Exceptions/MaintenanceModeException.php', + 'Illuminate\\Foundation\\Http\\FormRequest' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Http/FormRequest.php', + 'Illuminate\\Foundation\\Http\\Kernel' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php', + 'Illuminate\\Foundation\\Http\\Middleware\\CheckForMaintenanceMode' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php', + 'Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php', + 'Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php', + 'Illuminate\\Foundation\\Http\\Middleware\\TrimStrings' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php', + 'Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php', + 'Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php', + 'Illuminate\\Foundation\\Inspiring' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Inspiring.php', + 'Illuminate\\Foundation\\ProviderRepository' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php', + 'Illuminate\\Foundation\\Providers\\ArtisanServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Providers/ArtisanServiceProvider.php', + 'Illuminate\\Foundation\\Providers\\ComposerServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Providers/ComposerServiceProvider.php', + 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Providers/ConsoleSupportServiceProvider.php', + 'Illuminate\\Foundation\\Providers\\FormRequestServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Providers/FormRequestServiceProvider.php', + 'Illuminate\\Foundation\\Providers\\FoundationServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Providers/FoundationServiceProvider.php', + 'Illuminate\\Foundation\\Support\\Providers\\AuthServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Support/Providers/AuthServiceProvider.php', + 'Illuminate\\Foundation\\Support\\Providers\\EventServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Support/Providers/EventServiceProvider.php', + 'Illuminate\\Foundation\\Support\\Providers\\RouteServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Support/Providers/RouteServiceProvider.php', + 'Illuminate\\Foundation\\Testing\\Concerns\\InteractsWithAuthentication' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithAuthentication.php', + 'Illuminate\\Foundation\\Testing\\Concerns\\InteractsWithConsole' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithConsole.php', + 'Illuminate\\Foundation\\Testing\\Concerns\\InteractsWithContainer' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithContainer.php', + 'Illuminate\\Foundation\\Testing\\Concerns\\InteractsWithDatabase' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithDatabase.php', + 'Illuminate\\Foundation\\Testing\\Concerns\\InteractsWithSession' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithSession.php', + 'Illuminate\\Foundation\\Testing\\Concerns\\MakesHttpRequests' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/MakesHttpRequests.php', + 'Illuminate\\Foundation\\Testing\\Concerns\\MocksApplicationServices' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/MocksApplicationServices.php', + 'Illuminate\\Foundation\\Testing\\Constraints\\HasInDatabase' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Testing/Constraints/HasInDatabase.php', + 'Illuminate\\Foundation\\Testing\\Constraints\\SoftDeletedInDatabase' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Testing/Constraints/SoftDeletedInDatabase.php', + 'Illuminate\\Foundation\\Testing\\DatabaseMigrations' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Testing/DatabaseMigrations.php', + 'Illuminate\\Foundation\\Testing\\DatabaseTransactions' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Testing/DatabaseTransactions.php', + 'Illuminate\\Foundation\\Testing\\HttpException' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Testing/HttpException.php', + 'Illuminate\\Foundation\\Testing\\TestCase' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Testing/TestCase.php', + 'Illuminate\\Foundation\\Testing\\TestResponse' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Testing/TestResponse.php', + 'Illuminate\\Foundation\\Testing\\WithoutEvents' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Testing/WithoutEvents.php', + 'Illuminate\\Foundation\\Testing\\WithoutMiddleware' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Testing/WithoutMiddleware.php', + 'Illuminate\\Foundation\\Validation\\ValidatesRequests' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Validation/ValidatesRequests.php', + 'Illuminate\\Hashing\\BcryptHasher' => $vendorDir . '/laravel/framework/src/Illuminate/Hashing/BcryptHasher.php', + 'Illuminate\\Hashing\\HashServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Hashing/HashServiceProvider.php', + 'Illuminate\\Http\\Concerns\\InteractsWithContentTypes' => $vendorDir . '/laravel/framework/src/Illuminate/Http/Concerns/InteractsWithContentTypes.php', + 'Illuminate\\Http\\Concerns\\InteractsWithFlashData' => $vendorDir . '/laravel/framework/src/Illuminate/Http/Concerns/InteractsWithFlashData.php', + 'Illuminate\\Http\\Concerns\\InteractsWithInput' => $vendorDir . '/laravel/framework/src/Illuminate/Http/Concerns/InteractsWithInput.php', + 'Illuminate\\Http\\Exceptions\\HttpResponseException' => $vendorDir . '/laravel/framework/src/Illuminate/Http/Exceptions/HttpResponseException.php', + 'Illuminate\\Http\\Exceptions\\PostTooLargeException' => $vendorDir . '/laravel/framework/src/Illuminate/Http/Exceptions/PostTooLargeException.php', + 'Illuminate\\Http\\File' => $vendorDir . '/laravel/framework/src/Illuminate/Http/File.php', + 'Illuminate\\Http\\FileHelpers' => $vendorDir . '/laravel/framework/src/Illuminate/Http/FileHelpers.php', + 'Illuminate\\Http\\JsonResponse' => $vendorDir . '/laravel/framework/src/Illuminate/Http/JsonResponse.php', + 'Illuminate\\Http\\Middleware\\CheckResponseForModifications' => $vendorDir . '/laravel/framework/src/Illuminate/Http/Middleware/CheckResponseForModifications.php', + 'Illuminate\\Http\\Middleware\\FrameGuard' => $vendorDir . '/laravel/framework/src/Illuminate/Http/Middleware/FrameGuard.php', + 'Illuminate\\Http\\RedirectResponse' => $vendorDir . '/laravel/framework/src/Illuminate/Http/RedirectResponse.php', + 'Illuminate\\Http\\Request' => $vendorDir . '/laravel/framework/src/Illuminate/Http/Request.php', + 'Illuminate\\Http\\Response' => $vendorDir . '/laravel/framework/src/Illuminate/Http/Response.php', + 'Illuminate\\Http\\ResponseTrait' => $vendorDir . '/laravel/framework/src/Illuminate/Http/ResponseTrait.php', + 'Illuminate\\Http\\Testing\\File' => $vendorDir . '/laravel/framework/src/Illuminate/Http/Testing/File.php', + 'Illuminate\\Http\\Testing\\FileFactory' => $vendorDir . '/laravel/framework/src/Illuminate/Http/Testing/FileFactory.php', + 'Illuminate\\Http\\Testing\\MimeType' => $vendorDir . '/laravel/framework/src/Illuminate/Http/Testing/MimeType.php', + 'Illuminate\\Http\\UploadedFile' => $vendorDir . '/laravel/framework/src/Illuminate/Http/UploadedFile.php', + 'Illuminate\\Log\\Events\\MessageLogged' => $vendorDir . '/laravel/framework/src/Illuminate/Log/Events/MessageLogged.php', + 'Illuminate\\Log\\LogServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Log/LogServiceProvider.php', + 'Illuminate\\Log\\Writer' => $vendorDir . '/laravel/framework/src/Illuminate/Log/Writer.php', + 'Illuminate\\Mail\\Events\\MessageSending' => $vendorDir . '/laravel/framework/src/Illuminate/Mail/Events/MessageSending.php', + 'Illuminate\\Mail\\Events\\MessageSent' => $vendorDir . '/laravel/framework/src/Illuminate/Mail/Events/MessageSent.php', + 'Illuminate\\Mail\\MailServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Mail/MailServiceProvider.php', + 'Illuminate\\Mail\\Mailable' => $vendorDir . '/laravel/framework/src/Illuminate/Mail/Mailable.php', + 'Illuminate\\Mail\\Mailer' => $vendorDir . '/laravel/framework/src/Illuminate/Mail/Mailer.php', + 'Illuminate\\Mail\\Markdown' => $vendorDir . '/laravel/framework/src/Illuminate/Mail/Markdown.php', + 'Illuminate\\Mail\\Message' => $vendorDir . '/laravel/framework/src/Illuminate/Mail/Message.php', + 'Illuminate\\Mail\\PendingMail' => $vendorDir . '/laravel/framework/src/Illuminate/Mail/PendingMail.php', + 'Illuminate\\Mail\\SendQueuedMailable' => $vendorDir . '/laravel/framework/src/Illuminate/Mail/SendQueuedMailable.php', + 'Illuminate\\Mail\\TransportManager' => $vendorDir . '/laravel/framework/src/Illuminate/Mail/TransportManager.php', + 'Illuminate\\Mail\\Transport\\ArrayTransport' => $vendorDir . '/laravel/framework/src/Illuminate/Mail/Transport/ArrayTransport.php', + 'Illuminate\\Mail\\Transport\\LogTransport' => $vendorDir . '/laravel/framework/src/Illuminate/Mail/Transport/LogTransport.php', + 'Illuminate\\Mail\\Transport\\MailgunTransport' => $vendorDir . '/laravel/framework/src/Illuminate/Mail/Transport/MailgunTransport.php', + 'Illuminate\\Mail\\Transport\\MandrillTransport' => $vendorDir . '/laravel/framework/src/Illuminate/Mail/Transport/MandrillTransport.php', + 'Illuminate\\Mail\\Transport\\SesTransport' => $vendorDir . '/laravel/framework/src/Illuminate/Mail/Transport/SesTransport.php', + 'Illuminate\\Mail\\Transport\\SparkPostTransport' => $vendorDir . '/laravel/framework/src/Illuminate/Mail/Transport/SparkPostTransport.php', + 'Illuminate\\Mail\\Transport\\Transport' => $vendorDir . '/laravel/framework/src/Illuminate/Mail/Transport/Transport.php', + 'Illuminate\\Notifications\\Action' => $vendorDir . '/laravel/framework/src/Illuminate/Notifications/Action.php', + 'Illuminate\\Notifications\\ChannelManager' => $vendorDir . '/laravel/framework/src/Illuminate/Notifications/ChannelManager.php', + 'Illuminate\\Notifications\\Channels\\BroadcastChannel' => $vendorDir . '/laravel/framework/src/Illuminate/Notifications/Channels/BroadcastChannel.php', + 'Illuminate\\Notifications\\Channels\\DatabaseChannel' => $vendorDir . '/laravel/framework/src/Illuminate/Notifications/Channels/DatabaseChannel.php', + 'Illuminate\\Notifications\\Channels\\MailChannel' => $vendorDir . '/laravel/framework/src/Illuminate/Notifications/Channels/MailChannel.php', + 'Illuminate\\Notifications\\Channels\\NexmoSmsChannel' => $vendorDir . '/laravel/framework/src/Illuminate/Notifications/Channels/NexmoSmsChannel.php', + 'Illuminate\\Notifications\\Channels\\SlackWebhookChannel' => $vendorDir . '/laravel/framework/src/Illuminate/Notifications/Channels/SlackWebhookChannel.php', + 'Illuminate\\Notifications\\Console\\NotificationTableCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Notifications/Console/NotificationTableCommand.php', + 'Illuminate\\Notifications\\DatabaseNotification' => $vendorDir . '/laravel/framework/src/Illuminate/Notifications/DatabaseNotification.php', + 'Illuminate\\Notifications\\DatabaseNotificationCollection' => $vendorDir . '/laravel/framework/src/Illuminate/Notifications/DatabaseNotificationCollection.php', + 'Illuminate\\Notifications\\Events\\BroadcastNotificationCreated' => $vendorDir . '/laravel/framework/src/Illuminate/Notifications/Events/BroadcastNotificationCreated.php', + 'Illuminate\\Notifications\\Events\\NotificationFailed' => $vendorDir . '/laravel/framework/src/Illuminate/Notifications/Events/NotificationFailed.php', + 'Illuminate\\Notifications\\Events\\NotificationSending' => $vendorDir . '/laravel/framework/src/Illuminate/Notifications/Events/NotificationSending.php', + 'Illuminate\\Notifications\\Events\\NotificationSent' => $vendorDir . '/laravel/framework/src/Illuminate/Notifications/Events/NotificationSent.php', + 'Illuminate\\Notifications\\HasDatabaseNotifications' => $vendorDir . '/laravel/framework/src/Illuminate/Notifications/HasDatabaseNotifications.php', + 'Illuminate\\Notifications\\Messages\\BroadcastMessage' => $vendorDir . '/laravel/framework/src/Illuminate/Notifications/Messages/BroadcastMessage.php', + 'Illuminate\\Notifications\\Messages\\DatabaseMessage' => $vendorDir . '/laravel/framework/src/Illuminate/Notifications/Messages/DatabaseMessage.php', + 'Illuminate\\Notifications\\Messages\\MailMessage' => $vendorDir . '/laravel/framework/src/Illuminate/Notifications/Messages/MailMessage.php', + 'Illuminate\\Notifications\\Messages\\NexmoMessage' => $vendorDir . '/laravel/framework/src/Illuminate/Notifications/Messages/NexmoMessage.php', + 'Illuminate\\Notifications\\Messages\\SimpleMessage' => $vendorDir . '/laravel/framework/src/Illuminate/Notifications/Messages/SimpleMessage.php', + 'Illuminate\\Notifications\\Messages\\SlackAttachment' => $vendorDir . '/laravel/framework/src/Illuminate/Notifications/Messages/SlackAttachment.php', + 'Illuminate\\Notifications\\Messages\\SlackAttachmentField' => $vendorDir . '/laravel/framework/src/Illuminate/Notifications/Messages/SlackAttachmentField.php', + 'Illuminate\\Notifications\\Messages\\SlackMessage' => $vendorDir . '/laravel/framework/src/Illuminate/Notifications/Messages/SlackMessage.php', + 'Illuminate\\Notifications\\Notifiable' => $vendorDir . '/laravel/framework/src/Illuminate/Notifications/Notifiable.php', + 'Illuminate\\Notifications\\Notification' => $vendorDir . '/laravel/framework/src/Illuminate/Notifications/Notification.php', + 'Illuminate\\Notifications\\NotificationSender' => $vendorDir . '/laravel/framework/src/Illuminate/Notifications/NotificationSender.php', + 'Illuminate\\Notifications\\NotificationServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Notifications/NotificationServiceProvider.php', + 'Illuminate\\Notifications\\RoutesNotifications' => $vendorDir . '/laravel/framework/src/Illuminate/Notifications/RoutesNotifications.php', + 'Illuminate\\Notifications\\SendQueuedNotifications' => $vendorDir . '/laravel/framework/src/Illuminate/Notifications/SendQueuedNotifications.php', + 'Illuminate\\Pagination\\AbstractPaginator' => $vendorDir . '/laravel/framework/src/Illuminate/Pagination/AbstractPaginator.php', + 'Illuminate\\Pagination\\LengthAwarePaginator' => $vendorDir . '/laravel/framework/src/Illuminate/Pagination/LengthAwarePaginator.php', + 'Illuminate\\Pagination\\PaginationServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Pagination/PaginationServiceProvider.php', + 'Illuminate\\Pagination\\Paginator' => $vendorDir . '/laravel/framework/src/Illuminate/Pagination/Paginator.php', + 'Illuminate\\Pagination\\UrlWindow' => $vendorDir . '/laravel/framework/src/Illuminate/Pagination/UrlWindow.php', + 'Illuminate\\Pipeline\\Hub' => $vendorDir . '/laravel/framework/src/Illuminate/Pipeline/Hub.php', + 'Illuminate\\Pipeline\\Pipeline' => $vendorDir . '/laravel/framework/src/Illuminate/Pipeline/Pipeline.php', + 'Illuminate\\Pipeline\\PipelineServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Pipeline/PipelineServiceProvider.php', + 'Illuminate\\Queue\\BeanstalkdQueue' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/BeanstalkdQueue.php', + 'Illuminate\\Queue\\CallQueuedHandler' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php', + 'Illuminate\\Queue\\Capsule\\Manager' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/Capsule/Manager.php', + 'Illuminate\\Queue\\Connectors\\BeanstalkdConnector' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/Connectors/BeanstalkdConnector.php', + 'Illuminate\\Queue\\Connectors\\ConnectorInterface' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/Connectors/ConnectorInterface.php', + 'Illuminate\\Queue\\Connectors\\DatabaseConnector' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/Connectors/DatabaseConnector.php', + 'Illuminate\\Queue\\Connectors\\NullConnector' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/Connectors/NullConnector.php', + 'Illuminate\\Queue\\Connectors\\RedisConnector' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/Connectors/RedisConnector.php', + 'Illuminate\\Queue\\Connectors\\SqsConnector' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/Connectors/SqsConnector.php', + 'Illuminate\\Queue\\Connectors\\SyncConnector' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/Connectors/SyncConnector.php', + 'Illuminate\\Queue\\Console\\FailedTableCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/Console/FailedTableCommand.php', + 'Illuminate\\Queue\\Console\\FlushFailedCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/Console/FlushFailedCommand.php', + 'Illuminate\\Queue\\Console\\ForgetFailedCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/Console/ForgetFailedCommand.php', + 'Illuminate\\Queue\\Console\\ListFailedCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/Console/ListFailedCommand.php', + 'Illuminate\\Queue\\Console\\ListenCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/Console/ListenCommand.php', + 'Illuminate\\Queue\\Console\\RestartCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/Console/RestartCommand.php', + 'Illuminate\\Queue\\Console\\RetryCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/Console/RetryCommand.php', + 'Illuminate\\Queue\\Console\\TableCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/Console/TableCommand.php', + 'Illuminate\\Queue\\Console\\WorkCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php', + 'Illuminate\\Queue\\DatabaseQueue' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/DatabaseQueue.php', + 'Illuminate\\Queue\\Events\\JobExceptionOccurred' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/Events/JobExceptionOccurred.php', + 'Illuminate\\Queue\\Events\\JobFailed' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/Events/JobFailed.php', + 'Illuminate\\Queue\\Events\\JobProcessed' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/Events/JobProcessed.php', + 'Illuminate\\Queue\\Events\\JobProcessing' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/Events/JobProcessing.php', + 'Illuminate\\Queue\\Events\\Looping' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/Events/Looping.php', + 'Illuminate\\Queue\\Events\\WorkerStopping' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/Events/WorkerStopping.php', + 'Illuminate\\Queue\\Failed\\DatabaseFailedJobProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/Failed/DatabaseFailedJobProvider.php', + 'Illuminate\\Queue\\Failed\\FailedJobProviderInterface' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/Failed/FailedJobProviderInterface.php', + 'Illuminate\\Queue\\Failed\\NullFailedJobProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/Failed/NullFailedJobProvider.php', + 'Illuminate\\Queue\\FailingJob' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/FailingJob.php', + 'Illuminate\\Queue\\InteractsWithQueue' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/InteractsWithQueue.php', + 'Illuminate\\Queue\\InteractsWithTime' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/InteractsWithTime.php', + 'Illuminate\\Queue\\InvalidPayloadException' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/InvalidPayloadException.php', + 'Illuminate\\Queue\\Jobs\\BeanstalkdJob' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/Jobs/BeanstalkdJob.php', + 'Illuminate\\Queue\\Jobs\\DatabaseJob' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/Jobs/DatabaseJob.php', + 'Illuminate\\Queue\\Jobs\\DatabaseJobRecord' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/Jobs/DatabaseJobRecord.php', + 'Illuminate\\Queue\\Jobs\\Job' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/Jobs/Job.php', + 'Illuminate\\Queue\\Jobs\\JobName' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/Jobs/JobName.php', + 'Illuminate\\Queue\\Jobs\\RedisJob' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/Jobs/RedisJob.php', + 'Illuminate\\Queue\\Jobs\\SqsJob' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/Jobs/SqsJob.php', + 'Illuminate\\Queue\\Jobs\\SyncJob' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/Jobs/SyncJob.php', + 'Illuminate\\Queue\\Listener' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/Listener.php', + 'Illuminate\\Queue\\ListenerOptions' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/ListenerOptions.php', + 'Illuminate\\Queue\\LuaScripts' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/LuaScripts.php', + 'Illuminate\\Queue\\ManuallyFailedException' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/ManuallyFailedException.php', + 'Illuminate\\Queue\\MaxAttemptsExceededException' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/MaxAttemptsExceededException.php', + 'Illuminate\\Queue\\NullQueue' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/NullQueue.php', + 'Illuminate\\Queue\\Queue' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/Queue.php', + 'Illuminate\\Queue\\QueueManager' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/QueueManager.php', + 'Illuminate\\Queue\\QueueServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/QueueServiceProvider.php', + 'Illuminate\\Queue\\RedisQueue' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/RedisQueue.php', + 'Illuminate\\Queue\\SerializesAndRestoresModelIdentifiers' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/SerializesAndRestoresModelIdentifiers.php', + 'Illuminate\\Queue\\SerializesModels' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/SerializesModels.php', + 'Illuminate\\Queue\\SqsQueue' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/SqsQueue.php', + 'Illuminate\\Queue\\SyncQueue' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/SyncQueue.php', + 'Illuminate\\Queue\\Worker' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/Worker.php', + 'Illuminate\\Queue\\WorkerOptions' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/WorkerOptions.php', + 'Illuminate\\Redis\\Connections\\Connection' => $vendorDir . '/laravel/framework/src/Illuminate/Redis/Connections/Connection.php', + 'Illuminate\\Redis\\Connections\\PhpRedisClusterConnection' => $vendorDir . '/laravel/framework/src/Illuminate/Redis/Connections/PhpRedisClusterConnection.php', + 'Illuminate\\Redis\\Connections\\PhpRedisConnection' => $vendorDir . '/laravel/framework/src/Illuminate/Redis/Connections/PhpRedisConnection.php', + 'Illuminate\\Redis\\Connections\\PredisClusterConnection' => $vendorDir . '/laravel/framework/src/Illuminate/Redis/Connections/PredisClusterConnection.php', + 'Illuminate\\Redis\\Connections\\PredisConnection' => $vendorDir . '/laravel/framework/src/Illuminate/Redis/Connections/PredisConnection.php', + 'Illuminate\\Redis\\Connectors\\PhpRedisConnector' => $vendorDir . '/laravel/framework/src/Illuminate/Redis/Connectors/PhpRedisConnector.php', + 'Illuminate\\Redis\\Connectors\\PredisConnector' => $vendorDir . '/laravel/framework/src/Illuminate/Redis/Connectors/PredisConnector.php', + 'Illuminate\\Redis\\RedisManager' => $vendorDir . '/laravel/framework/src/Illuminate/Redis/RedisManager.php', + 'Illuminate\\Redis\\RedisServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Redis/RedisServiceProvider.php', + 'Illuminate\\Routing\\Console\\ControllerMakeCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Routing/Console/ControllerMakeCommand.php', + 'Illuminate\\Routing\\Console\\MiddlewareMakeCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Routing/Console/MiddlewareMakeCommand.php', + 'Illuminate\\Routing\\Controller' => $vendorDir . '/laravel/framework/src/Illuminate/Routing/Controller.php', + 'Illuminate\\Routing\\ControllerDispatcher' => $vendorDir . '/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php', + 'Illuminate\\Routing\\ControllerMiddlewareOptions' => $vendorDir . '/laravel/framework/src/Illuminate/Routing/ControllerMiddlewareOptions.php', + 'Illuminate\\Routing\\Events\\RouteMatched' => $vendorDir . '/laravel/framework/src/Illuminate/Routing/Events/RouteMatched.php', + 'Illuminate\\Routing\\Exceptions\\UrlGenerationException' => $vendorDir . '/laravel/framework/src/Illuminate/Routing/Exceptions/UrlGenerationException.php', + 'Illuminate\\Routing\\ImplicitRouteBinding' => $vendorDir . '/laravel/framework/src/Illuminate/Routing/ImplicitRouteBinding.php', + 'Illuminate\\Routing\\Matching\\HostValidator' => $vendorDir . '/laravel/framework/src/Illuminate/Routing/Matching/HostValidator.php', + 'Illuminate\\Routing\\Matching\\MethodValidator' => $vendorDir . '/laravel/framework/src/Illuminate/Routing/Matching/MethodValidator.php', + 'Illuminate\\Routing\\Matching\\SchemeValidator' => $vendorDir . '/laravel/framework/src/Illuminate/Routing/Matching/SchemeValidator.php', + 'Illuminate\\Routing\\Matching\\UriValidator' => $vendorDir . '/laravel/framework/src/Illuminate/Routing/Matching/UriValidator.php', + 'Illuminate\\Routing\\Matching\\ValidatorInterface' => $vendorDir . '/laravel/framework/src/Illuminate/Routing/Matching/ValidatorInterface.php', + 'Illuminate\\Routing\\MiddlewareNameResolver' => $vendorDir . '/laravel/framework/src/Illuminate/Routing/MiddlewareNameResolver.php', + 'Illuminate\\Routing\\Middleware\\SubstituteBindings' => $vendorDir . '/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php', + 'Illuminate\\Routing\\Middleware\\ThrottleRequests' => $vendorDir . '/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php', + 'Illuminate\\Routing\\Pipeline' => $vendorDir . '/laravel/framework/src/Illuminate/Routing/Pipeline.php', + 'Illuminate\\Routing\\Redirector' => $vendorDir . '/laravel/framework/src/Illuminate/Routing/Redirector.php', + 'Illuminate\\Routing\\ResourceRegistrar' => $vendorDir . '/laravel/framework/src/Illuminate/Routing/ResourceRegistrar.php', + 'Illuminate\\Routing\\ResponseFactory' => $vendorDir . '/laravel/framework/src/Illuminate/Routing/ResponseFactory.php', + 'Illuminate\\Routing\\Route' => $vendorDir . '/laravel/framework/src/Illuminate/Routing/Route.php', + 'Illuminate\\Routing\\RouteAction' => $vendorDir . '/laravel/framework/src/Illuminate/Routing/RouteAction.php', + 'Illuminate\\Routing\\RouteBinding' => $vendorDir . '/laravel/framework/src/Illuminate/Routing/RouteBinding.php', + 'Illuminate\\Routing\\RouteCollection' => $vendorDir . '/laravel/framework/src/Illuminate/Routing/RouteCollection.php', + 'Illuminate\\Routing\\RouteCompiler' => $vendorDir . '/laravel/framework/src/Illuminate/Routing/RouteCompiler.php', + 'Illuminate\\Routing\\RouteDependencyResolverTrait' => $vendorDir . '/laravel/framework/src/Illuminate/Routing/RouteDependencyResolverTrait.php', + 'Illuminate\\Routing\\RouteGroup' => $vendorDir . '/laravel/framework/src/Illuminate/Routing/RouteGroup.php', + 'Illuminate\\Routing\\RouteParameterBinder' => $vendorDir . '/laravel/framework/src/Illuminate/Routing/RouteParameterBinder.php', + 'Illuminate\\Routing\\RouteRegistrar' => $vendorDir . '/laravel/framework/src/Illuminate/Routing/RouteRegistrar.php', + 'Illuminate\\Routing\\RouteSignatureParameters' => $vendorDir . '/laravel/framework/src/Illuminate/Routing/RouteSignatureParameters.php', + 'Illuminate\\Routing\\RouteUrlGenerator' => $vendorDir . '/laravel/framework/src/Illuminate/Routing/RouteUrlGenerator.php', + 'Illuminate\\Routing\\Router' => $vendorDir . '/laravel/framework/src/Illuminate/Routing/Router.php', + 'Illuminate\\Routing\\RoutingServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Routing/RoutingServiceProvider.php', + 'Illuminate\\Routing\\SortedMiddleware' => $vendorDir . '/laravel/framework/src/Illuminate/Routing/SortedMiddleware.php', + 'Illuminate\\Routing\\UrlGenerator' => $vendorDir . '/laravel/framework/src/Illuminate/Routing/UrlGenerator.php', + 'Illuminate\\Session\\CacheBasedSessionHandler' => $vendorDir . '/laravel/framework/src/Illuminate/Session/CacheBasedSessionHandler.php', + 'Illuminate\\Session\\Console\\SessionTableCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Session/Console/SessionTableCommand.php', + 'Illuminate\\Session\\CookieSessionHandler' => $vendorDir . '/laravel/framework/src/Illuminate/Session/CookieSessionHandler.php', + 'Illuminate\\Session\\DatabaseSessionHandler' => $vendorDir . '/laravel/framework/src/Illuminate/Session/DatabaseSessionHandler.php', + 'Illuminate\\Session\\EncryptedStore' => $vendorDir . '/laravel/framework/src/Illuminate/Session/EncryptedStore.php', + 'Illuminate\\Session\\ExistenceAwareInterface' => $vendorDir . '/laravel/framework/src/Illuminate/Session/ExistenceAwareInterface.php', + 'Illuminate\\Session\\FileSessionHandler' => $vendorDir . '/laravel/framework/src/Illuminate/Session/FileSessionHandler.php', + 'Illuminate\\Session\\Middleware\\AuthenticateSession' => $vendorDir . '/laravel/framework/src/Illuminate/Session/Middleware/AuthenticateSession.php', + 'Illuminate\\Session\\Middleware\\StartSession' => $vendorDir . '/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php', + 'Illuminate\\Session\\SessionManager' => $vendorDir . '/laravel/framework/src/Illuminate/Session/SessionManager.php', + 'Illuminate\\Session\\SessionServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Session/SessionServiceProvider.php', + 'Illuminate\\Session\\Store' => $vendorDir . '/laravel/framework/src/Illuminate/Session/Store.php', + 'Illuminate\\Session\\TokenMismatchException' => $vendorDir . '/laravel/framework/src/Illuminate/Session/TokenMismatchException.php', + 'Illuminate\\Support\\AggregateServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Support/AggregateServiceProvider.php', + 'Illuminate\\Support\\Arr' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Arr.php', + 'Illuminate\\Support\\Collection' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Collection.php', + 'Illuminate\\Support\\Composer' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Composer.php', + 'Illuminate\\Support\\Debug\\Dumper' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Debug/Dumper.php', + 'Illuminate\\Support\\Debug\\HtmlDumper' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Debug/HtmlDumper.php', + 'Illuminate\\Support\\Facades\\App' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Facades/App.php', + 'Illuminate\\Support\\Facades\\Artisan' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Facades/Artisan.php', + 'Illuminate\\Support\\Facades\\Auth' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Facades/Auth.php', + 'Illuminate\\Support\\Facades\\Blade' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Facades/Blade.php', + 'Illuminate\\Support\\Facades\\Broadcast' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Facades/Broadcast.php', + 'Illuminate\\Support\\Facades\\Bus' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Facades/Bus.php', + 'Illuminate\\Support\\Facades\\Cache' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Facades/Cache.php', + 'Illuminate\\Support\\Facades\\Config' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Facades/Config.php', + 'Illuminate\\Support\\Facades\\Cookie' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Facades/Cookie.php', + 'Illuminate\\Support\\Facades\\Crypt' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Facades/Crypt.php', + 'Illuminate\\Support\\Facades\\DB' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Facades/DB.php', + 'Illuminate\\Support\\Facades\\Event' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Facades/Event.php', + 'Illuminate\\Support\\Facades\\Facade' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Facades/Facade.php', + 'Illuminate\\Support\\Facades\\File' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Facades/File.php', + 'Illuminate\\Support\\Facades\\Gate' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Facades/Gate.php', + 'Illuminate\\Support\\Facades\\Hash' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Facades/Hash.php', + 'Illuminate\\Support\\Facades\\Input' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Facades/Input.php', + 'Illuminate\\Support\\Facades\\Lang' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Facades/Lang.php', + 'Illuminate\\Support\\Facades\\Log' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Facades/Log.php', + 'Illuminate\\Support\\Facades\\Mail' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Facades/Mail.php', + 'Illuminate\\Support\\Facades\\Notification' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Facades/Notification.php', + 'Illuminate\\Support\\Facades\\Password' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Facades/Password.php', + 'Illuminate\\Support\\Facades\\Queue' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Facades/Queue.php', + 'Illuminate\\Support\\Facades\\Redirect' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Facades/Redirect.php', + 'Illuminate\\Support\\Facades\\Redis' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Facades/Redis.php', + 'Illuminate\\Support\\Facades\\Request' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Facades/Request.php', + 'Illuminate\\Support\\Facades\\Response' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Facades/Response.php', + 'Illuminate\\Support\\Facades\\Route' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Facades/Route.php', + 'Illuminate\\Support\\Facades\\Schema' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Facades/Schema.php', + 'Illuminate\\Support\\Facades\\Session' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Facades/Session.php', + 'Illuminate\\Support\\Facades\\Storage' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Facades/Storage.php', + 'Illuminate\\Support\\Facades\\URL' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Facades/URL.php', + 'Illuminate\\Support\\Facades\\Validator' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Facades/Validator.php', + 'Illuminate\\Support\\Facades\\View' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Facades/View.php', + 'Illuminate\\Support\\Fluent' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Fluent.php', + 'Illuminate\\Support\\HigherOrderCollectionProxy' => $vendorDir . '/laravel/framework/src/Illuminate/Support/HigherOrderCollectionProxy.php', + 'Illuminate\\Support\\HtmlString' => $vendorDir . '/laravel/framework/src/Illuminate/Support/HtmlString.php', + 'Illuminate\\Support\\Manager' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Manager.php', + 'Illuminate\\Support\\MessageBag' => $vendorDir . '/laravel/framework/src/Illuminate/Support/MessageBag.php', + 'Illuminate\\Support\\NamespacedItemResolver' => $vendorDir . '/laravel/framework/src/Illuminate/Support/NamespacedItemResolver.php', + 'Illuminate\\Support\\Pluralizer' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Pluralizer.php', + 'Illuminate\\Support\\ServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Support/ServiceProvider.php', + 'Illuminate\\Support\\Str' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Str.php', + 'Illuminate\\Support\\Testing\\Fakes\\BusFake' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Testing/Fakes/BusFake.php', + 'Illuminate\\Support\\Testing\\Fakes\\EventFake' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Testing/Fakes/EventFake.php', + 'Illuminate\\Support\\Testing\\Fakes\\MailFake' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Testing/Fakes/MailFake.php', + 'Illuminate\\Support\\Testing\\Fakes\\NotificationFake' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Testing/Fakes/NotificationFake.php', + 'Illuminate\\Support\\Testing\\Fakes\\PendingMailFake' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Testing/Fakes/PendingMailFake.php', + 'Illuminate\\Support\\Testing\\Fakes\\QueueFake' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Testing/Fakes/QueueFake.php', + 'Illuminate\\Support\\Traits\\CapsuleManagerTrait' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Traits/CapsuleManagerTrait.php', + 'Illuminate\\Support\\Traits\\Macroable' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Traits/Macroable.php', + 'Illuminate\\Support\\ViewErrorBag' => $vendorDir . '/laravel/framework/src/Illuminate/Support/ViewErrorBag.php', + 'Illuminate\\Translation\\ArrayLoader' => $vendorDir . '/laravel/framework/src/Illuminate/Translation/ArrayLoader.php', + 'Illuminate\\Translation\\FileLoader' => $vendorDir . '/laravel/framework/src/Illuminate/Translation/FileLoader.php', + 'Illuminate\\Translation\\LoaderInterface' => $vendorDir . '/laravel/framework/src/Illuminate/Translation/LoaderInterface.php', + 'Illuminate\\Translation\\MessageSelector' => $vendorDir . '/laravel/framework/src/Illuminate/Translation/MessageSelector.php', + 'Illuminate\\Translation\\TranslationServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Translation/TranslationServiceProvider.php', + 'Illuminate\\Translation\\Translator' => $vendorDir . '/laravel/framework/src/Illuminate/Translation/Translator.php', + 'Illuminate\\Validation\\Concerns\\FormatsMessages' => $vendorDir . '/laravel/framework/src/Illuminate/Validation/Concerns/FormatsMessages.php', + 'Illuminate\\Validation\\Concerns\\ReplacesAttributes' => $vendorDir . '/laravel/framework/src/Illuminate/Validation/Concerns/ReplacesAttributes.php', + 'Illuminate\\Validation\\Concerns\\ValidatesAttributes' => $vendorDir . '/laravel/framework/src/Illuminate/Validation/Concerns/ValidatesAttributes.php', + 'Illuminate\\Validation\\DatabasePresenceVerifier' => $vendorDir . '/laravel/framework/src/Illuminate/Validation/DatabasePresenceVerifier.php', + 'Illuminate\\Validation\\Factory' => $vendorDir . '/laravel/framework/src/Illuminate/Validation/Factory.php', + 'Illuminate\\Validation\\PresenceVerifierInterface' => $vendorDir . '/laravel/framework/src/Illuminate/Validation/PresenceVerifierInterface.php', + 'Illuminate\\Validation\\Rule' => $vendorDir . '/laravel/framework/src/Illuminate/Validation/Rule.php', + 'Illuminate\\Validation\\Rules\\Dimensions' => $vendorDir . '/laravel/framework/src/Illuminate/Validation/Rules/Dimensions.php', + 'Illuminate\\Validation\\Rules\\Exists' => $vendorDir . '/laravel/framework/src/Illuminate/Validation/Rules/Exists.php', + 'Illuminate\\Validation\\Rules\\In' => $vendorDir . '/laravel/framework/src/Illuminate/Validation/Rules/In.php', + 'Illuminate\\Validation\\Rules\\NotIn' => $vendorDir . '/laravel/framework/src/Illuminate/Validation/Rules/NotIn.php', + 'Illuminate\\Validation\\Rules\\Unique' => $vendorDir . '/laravel/framework/src/Illuminate/Validation/Rules/Unique.php', + 'Illuminate\\Validation\\UnauthorizedException' => $vendorDir . '/laravel/framework/src/Illuminate/Validation/UnauthorizedException.php', + 'Illuminate\\Validation\\ValidatesWhenResolvedTrait' => $vendorDir . '/laravel/framework/src/Illuminate/Validation/ValidatesWhenResolvedTrait.php', + 'Illuminate\\Validation\\ValidationData' => $vendorDir . '/laravel/framework/src/Illuminate/Validation/ValidationData.php', + 'Illuminate\\Validation\\ValidationException' => $vendorDir . '/laravel/framework/src/Illuminate/Validation/ValidationException.php', + 'Illuminate\\Validation\\ValidationRuleParser' => $vendorDir . '/laravel/framework/src/Illuminate/Validation/ValidationRuleParser.php', + 'Illuminate\\Validation\\ValidationServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Validation/ValidationServiceProvider.php', + 'Illuminate\\Validation\\Validator' => $vendorDir . '/laravel/framework/src/Illuminate/Validation/Validator.php', + 'Illuminate\\View\\Compilers\\BladeCompiler' => $vendorDir . '/laravel/framework/src/Illuminate/View/Compilers/BladeCompiler.php', + 'Illuminate\\View\\Compilers\\Compiler' => $vendorDir . '/laravel/framework/src/Illuminate/View/Compilers/Compiler.php', + 'Illuminate\\View\\Compilers\\CompilerInterface' => $vendorDir . '/laravel/framework/src/Illuminate/View/Compilers/CompilerInterface.php', + 'Illuminate\\View\\Compilers\\Concerns\\CompilesAuthorizations' => $vendorDir . '/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesAuthorizations.php', + 'Illuminate\\View\\Compilers\\Concerns\\CompilesComments' => $vendorDir . '/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesComments.php', + 'Illuminate\\View\\Compilers\\Concerns\\CompilesComponents' => $vendorDir . '/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesComponents.php', + 'Illuminate\\View\\Compilers\\Concerns\\CompilesConditionals' => $vendorDir . '/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesConditionals.php', + 'Illuminate\\View\\Compilers\\Concerns\\CompilesEchos' => $vendorDir . '/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesEchos.php', + 'Illuminate\\View\\Compilers\\Concerns\\CompilesIncludes' => $vendorDir . '/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesIncludes.php', + 'Illuminate\\View\\Compilers\\Concerns\\CompilesInjections' => $vendorDir . '/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesInjections.php', + 'Illuminate\\View\\Compilers\\Concerns\\CompilesLayouts' => $vendorDir . '/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesLayouts.php', + 'Illuminate\\View\\Compilers\\Concerns\\CompilesLoops' => $vendorDir . '/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesLoops.php', + 'Illuminate\\View\\Compilers\\Concerns\\CompilesRawPhp' => $vendorDir . '/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesRawPhp.php', + 'Illuminate\\View\\Compilers\\Concerns\\CompilesStacks' => $vendorDir . '/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesStacks.php', + 'Illuminate\\View\\Compilers\\Concerns\\CompilesTranslations' => $vendorDir . '/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesTranslations.php', + 'Illuminate\\View\\Concerns\\ManagesComponents' => $vendorDir . '/laravel/framework/src/Illuminate/View/Concerns/ManagesComponents.php', + 'Illuminate\\View\\Concerns\\ManagesEvents' => $vendorDir . '/laravel/framework/src/Illuminate/View/Concerns/ManagesEvents.php', + 'Illuminate\\View\\Concerns\\ManagesLayouts' => $vendorDir . '/laravel/framework/src/Illuminate/View/Concerns/ManagesLayouts.php', + 'Illuminate\\View\\Concerns\\ManagesLoops' => $vendorDir . '/laravel/framework/src/Illuminate/View/Concerns/ManagesLoops.php', + 'Illuminate\\View\\Concerns\\ManagesStacks' => $vendorDir . '/laravel/framework/src/Illuminate/View/Concerns/ManagesStacks.php', + 'Illuminate\\View\\Concerns\\ManagesTranslations' => $vendorDir . '/laravel/framework/src/Illuminate/View/Concerns/ManagesTranslations.php', + 'Illuminate\\View\\Engines\\CompilerEngine' => $vendorDir . '/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php', + 'Illuminate\\View\\Engines\\Engine' => $vendorDir . '/laravel/framework/src/Illuminate/View/Engines/Engine.php', + 'Illuminate\\View\\Engines\\EngineInterface' => $vendorDir . '/laravel/framework/src/Illuminate/View/Engines/EngineInterface.php', + 'Illuminate\\View\\Engines\\EngineResolver' => $vendorDir . '/laravel/framework/src/Illuminate/View/Engines/EngineResolver.php', + 'Illuminate\\View\\Engines\\FileEngine' => $vendorDir . '/laravel/framework/src/Illuminate/View/Engines/FileEngine.php', + 'Illuminate\\View\\Engines\\PhpEngine' => $vendorDir . '/laravel/framework/src/Illuminate/View/Engines/PhpEngine.php', + 'Illuminate\\View\\Factory' => $vendorDir . '/laravel/framework/src/Illuminate/View/Factory.php', + 'Illuminate\\View\\FileViewFinder' => $vendorDir . '/laravel/framework/src/Illuminate/View/FileViewFinder.php', + 'Illuminate\\View\\Middleware\\ShareErrorsFromSession' => $vendorDir . '/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php', + 'Illuminate\\View\\View' => $vendorDir . '/laravel/framework/src/Illuminate/View/View.php', + 'Illuminate\\View\\ViewFinderInterface' => $vendorDir . '/laravel/framework/src/Illuminate/View/ViewFinderInterface.php', + 'Illuminate\\View\\ViewName' => $vendorDir . '/laravel/framework/src/Illuminate/View/ViewName.php', + 'Illuminate\\View\\ViewServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/View/ViewServiceProvider.php', + 'JakubOnderka\\PhpConsoleColor\\ConsoleColor' => $vendorDir . '/jakub-onderka/php-console-color/src/JakubOnderka/PhpConsoleColor/ConsoleColor.php', + 'JakubOnderka\\PhpConsoleColor\\InvalidStyleException' => $vendorDir . '/jakub-onderka/php-console-color/src/JakubOnderka/PhpConsoleColor/InvalidStyleException.php', + 'JakubOnderka\\PhpConsoleHighlighter\\Highlighter' => $vendorDir . '/jakub-onderka/php-console-highlighter/src/JakubOnderka/PhpConsoleHighlighter/Highlighter.php', + 'Laravel\\Tinker\\Console\\TinkerCommand' => $vendorDir . '/laravel/tinker/src/Console/TinkerCommand.php', + 'Laravel\\Tinker\\TinkerCaster' => $vendorDir . '/laravel/tinker/src/TinkerCaster.php', + 'Laravel\\Tinker\\TinkerServiceProvider' => $vendorDir . '/laravel/tinker/src/TinkerServiceProvider.php', + 'League\\Flysystem\\AdapterInterface' => $vendorDir . '/league/flysystem/src/AdapterInterface.php', + 'League\\Flysystem\\Adapter\\AbstractAdapter' => $vendorDir . '/league/flysystem/src/Adapter/AbstractAdapter.php', + 'League\\Flysystem\\Adapter\\AbstractFtpAdapter' => $vendorDir . '/league/flysystem/src/Adapter/AbstractFtpAdapter.php', + 'League\\Flysystem\\Adapter\\Ftp' => $vendorDir . '/league/flysystem/src/Adapter/Ftp.php', + 'League\\Flysystem\\Adapter\\Ftpd' => $vendorDir . '/league/flysystem/src/Adapter/Ftpd.php', + 'League\\Flysystem\\Adapter\\Local' => $vendorDir . '/league/flysystem/src/Adapter/Local.php', + 'League\\Flysystem\\Adapter\\NullAdapter' => $vendorDir . '/league/flysystem/src/Adapter/NullAdapter.php', + 'League\\Flysystem\\Adapter\\Polyfill\\NotSupportingVisibilityTrait' => $vendorDir . '/league/flysystem/src/Adapter/Polyfill/NotSupportingVisibilityTrait.php', + 'League\\Flysystem\\Adapter\\Polyfill\\StreamedCopyTrait' => $vendorDir . '/league/flysystem/src/Adapter/Polyfill/StreamedCopyTrait.php', + 'League\\Flysystem\\Adapter\\Polyfill\\StreamedReadingTrait' => $vendorDir . '/league/flysystem/src/Adapter/Polyfill/StreamedReadingTrait.php', + 'League\\Flysystem\\Adapter\\Polyfill\\StreamedTrait' => $vendorDir . '/league/flysystem/src/Adapter/Polyfill/StreamedTrait.php', + 'League\\Flysystem\\Adapter\\Polyfill\\StreamedWritingTrait' => $vendorDir . '/league/flysystem/src/Adapter/Polyfill/StreamedWritingTrait.php', + 'League\\Flysystem\\Adapter\\SynologyFtp' => $vendorDir . '/league/flysystem/src/Adapter/SynologyFtp.php', + 'League\\Flysystem\\Config' => $vendorDir . '/league/flysystem/src/Config.php', + 'League\\Flysystem\\ConfigAwareTrait' => $vendorDir . '/league/flysystem/src/ConfigAwareTrait.php', + 'League\\Flysystem\\Directory' => $vendorDir . '/league/flysystem/src/Directory.php', + 'League\\Flysystem\\Exception' => $vendorDir . '/league/flysystem/src/Exception.php', + 'League\\Flysystem\\File' => $vendorDir . '/league/flysystem/src/File.php', + 'League\\Flysystem\\FileExistsException' => $vendorDir . '/league/flysystem/src/FileExistsException.php', + 'League\\Flysystem\\FileNotFoundException' => $vendorDir . '/league/flysystem/src/FileNotFoundException.php', + 'League\\Flysystem\\Filesystem' => $vendorDir . '/league/flysystem/src/Filesystem.php', + 'League\\Flysystem\\FilesystemInterface' => $vendorDir . '/league/flysystem/src/FilesystemInterface.php', + 'League\\Flysystem\\FilesystemNotFoundException' => $vendorDir . '/league/flysystem/src/FilesystemNotFoundException.php', + 'League\\Flysystem\\Handler' => $vendorDir . '/league/flysystem/src/Handler.php', + 'League\\Flysystem\\MountManager' => $vendorDir . '/league/flysystem/src/MountManager.php', + 'League\\Flysystem\\NotSupportedException' => $vendorDir . '/league/flysystem/src/NotSupportedException.php', + 'League\\Flysystem\\PluginInterface' => $vendorDir . '/league/flysystem/src/PluginInterface.php', + 'League\\Flysystem\\Plugin\\AbstractPlugin' => $vendorDir . '/league/flysystem/src/Plugin/AbstractPlugin.php', + 'League\\Flysystem\\Plugin\\EmptyDir' => $vendorDir . '/league/flysystem/src/Plugin/EmptyDir.php', + 'League\\Flysystem\\Plugin\\ForcedCopy' => $vendorDir . '/league/flysystem/src/Plugin/ForcedCopy.php', + 'League\\Flysystem\\Plugin\\ForcedRename' => $vendorDir . '/league/flysystem/src/Plugin/ForcedRename.php', + 'League\\Flysystem\\Plugin\\GetWithMetadata' => $vendorDir . '/league/flysystem/src/Plugin/GetWithMetadata.php', + 'League\\Flysystem\\Plugin\\ListFiles' => $vendorDir . '/league/flysystem/src/Plugin/ListFiles.php', + 'League\\Flysystem\\Plugin\\ListPaths' => $vendorDir . '/league/flysystem/src/Plugin/ListPaths.php', + 'League\\Flysystem\\Plugin\\ListWith' => $vendorDir . '/league/flysystem/src/Plugin/ListWith.php', + 'League\\Flysystem\\Plugin\\PluggableTrait' => $vendorDir . '/league/flysystem/src/Plugin/PluggableTrait.php', + 'League\\Flysystem\\Plugin\\PluginNotFoundException' => $vendorDir . '/league/flysystem/src/Plugin/PluginNotFoundException.php', + 'League\\Flysystem\\ReadInterface' => $vendorDir . '/league/flysystem/src/ReadInterface.php', + 'League\\Flysystem\\RootViolationException' => $vendorDir . '/league/flysystem/src/RootViolationException.php', + 'League\\Flysystem\\SafeStorage' => $vendorDir . '/league/flysystem/src/SafeStorage.php', + 'League\\Flysystem\\UnreadableFileException' => $vendorDir . '/league/flysystem/src/UnreadableFileException.php', + 'League\\Flysystem\\Util' => $vendorDir . '/league/flysystem/src/Util.php', + 'League\\Flysystem\\Util\\ContentListingFormatter' => $vendorDir . '/league/flysystem/src/Util/ContentListingFormatter.php', + 'League\\Flysystem\\Util\\MimeType' => $vendorDir . '/league/flysystem/src/Util/MimeType.php', + 'League\\Flysystem\\Util\\StreamHasher' => $vendorDir . '/league/flysystem/src/Util/StreamHasher.php', + 'Mockery' => $vendorDir . '/mockery/mockery/library/Mockery.php', + 'Mockery\\Adapter\\Phpunit\\MockeryPHPUnitIntegration' => $vendorDir . '/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryPHPUnitIntegration.php', + 'Mockery\\Adapter\\Phpunit\\MockeryTestCase' => $vendorDir . '/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryTestCase.php', + 'Mockery\\Adapter\\Phpunit\\TestListener' => $vendorDir . '/mockery/mockery/library/Mockery/Adapter/Phpunit/TestListener.php', + 'Mockery\\CompositeExpectation' => $vendorDir . '/mockery/mockery/library/Mockery/CompositeExpectation.php', + 'Mockery\\Configuration' => $vendorDir . '/mockery/mockery/library/Mockery/Configuration.php', + 'Mockery\\Container' => $vendorDir . '/mockery/mockery/library/Mockery/Container.php', + 'Mockery\\CountValidator\\AtLeast' => $vendorDir . '/mockery/mockery/library/Mockery/CountValidator/AtLeast.php', + 'Mockery\\CountValidator\\AtMost' => $vendorDir . '/mockery/mockery/library/Mockery/CountValidator/AtMost.php', + 'Mockery\\CountValidator\\CountValidatorAbstract' => $vendorDir . '/mockery/mockery/library/Mockery/CountValidator/CountValidatorAbstract.php', + 'Mockery\\CountValidator\\Exact' => $vendorDir . '/mockery/mockery/library/Mockery/CountValidator/Exact.php', + 'Mockery\\CountValidator\\Exception' => $vendorDir . '/mockery/mockery/library/Mockery/CountValidator/Exception.php', + 'Mockery\\Exception' => $vendorDir . '/mockery/mockery/library/Mockery/Exception.php', + 'Mockery\\Exception\\InvalidCountException' => $vendorDir . '/mockery/mockery/library/Mockery/Exception/InvalidCountException.php', + 'Mockery\\Exception\\InvalidOrderException' => $vendorDir . '/mockery/mockery/library/Mockery/Exception/InvalidOrderException.php', + 'Mockery\\Exception\\NoMatchingExpectationException' => $vendorDir . '/mockery/mockery/library/Mockery/Exception/NoMatchingExpectationException.php', + 'Mockery\\Exception\\RuntimeException' => $vendorDir . '/mockery/mockery/library/Mockery/Exception/RuntimeException.php', + 'Mockery\\Expectation' => $vendorDir . '/mockery/mockery/library/Mockery/Expectation.php', + 'Mockery\\ExpectationDirector' => $vendorDir . '/mockery/mockery/library/Mockery/ExpectationDirector.php', + 'Mockery\\ExpectationInterface' => $vendorDir . '/mockery/mockery/library/Mockery/ExpectationInterface.php', + 'Mockery\\Generator\\CachingGenerator' => $vendorDir . '/mockery/mockery/library/Mockery/Generator/CachingGenerator.php', + 'Mockery\\Generator\\DefinedTargetClass' => $vendorDir . '/mockery/mockery/library/Mockery/Generator/DefinedTargetClass.php', + 'Mockery\\Generator\\Generator' => $vendorDir . '/mockery/mockery/library/Mockery/Generator/Generator.php', + 'Mockery\\Generator\\Method' => $vendorDir . '/mockery/mockery/library/Mockery/Generator/Method.php', + 'Mockery\\Generator\\MockConfiguration' => $vendorDir . '/mockery/mockery/library/Mockery/Generator/MockConfiguration.php', + 'Mockery\\Generator\\MockConfigurationBuilder' => $vendorDir . '/mockery/mockery/library/Mockery/Generator/MockConfigurationBuilder.php', + 'Mockery\\Generator\\MockDefinition' => $vendorDir . '/mockery/mockery/library/Mockery/Generator/MockDefinition.php', + 'Mockery\\Generator\\Parameter' => $vendorDir . '/mockery/mockery/library/Mockery/Generator/Parameter.php', + 'Mockery\\Generator\\StringManipulationGenerator' => $vendorDir . '/mockery/mockery/library/Mockery/Generator/StringManipulationGenerator.php', + 'Mockery\\Generator\\StringManipulation\\Pass\\CallTypeHintPass' => $vendorDir . '/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/CallTypeHintPass.php', + 'Mockery\\Generator\\StringManipulation\\Pass\\ClassNamePass' => $vendorDir . '/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/ClassNamePass.php', + 'Mockery\\Generator\\StringManipulation\\Pass\\ClassPass' => $vendorDir . '/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/ClassPass.php', + 'Mockery\\Generator\\StringManipulation\\Pass\\InstanceMockPass' => $vendorDir . '/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/InstanceMockPass.php', + 'Mockery\\Generator\\StringManipulation\\Pass\\InterfacePass' => $vendorDir . '/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/InterfacePass.php', + 'Mockery\\Generator\\StringManipulation\\Pass\\MethodDefinitionPass' => $vendorDir . '/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/MethodDefinitionPass.php', + 'Mockery\\Generator\\StringManipulation\\Pass\\Pass' => $vendorDir . '/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/Pass.php', + 'Mockery\\Generator\\StringManipulation\\Pass\\RemoveBuiltinMethodsThatAreFinalPass' => $vendorDir . '/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/RemoveBuiltinMethodsThatAreFinalPass.php', + 'Mockery\\Generator\\StringManipulation\\Pass\\RemoveUnserializeForInternalSerializableClassesPass' => $vendorDir . '/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/RemoveUnserializeForInternalSerializableClassesPass.php', + 'Mockery\\Generator\\TargetClass' => $vendorDir . '/mockery/mockery/library/Mockery/Generator/TargetClass.php', + 'Mockery\\Generator\\UndefinedTargetClass' => $vendorDir . '/mockery/mockery/library/Mockery/Generator/UndefinedTargetClass.php', + 'Mockery\\Instantiator' => $vendorDir . '/mockery/mockery/library/Mockery/Instantiator.php', + 'Mockery\\Loader' => $vendorDir . '/mockery/mockery/library/Mockery/Loader.php', + 'Mockery\\Loader\\EvalLoader' => $vendorDir . '/mockery/mockery/library/Mockery/Loader/EvalLoader.php', + 'Mockery\\Loader\\Loader' => $vendorDir . '/mockery/mockery/library/Mockery/Loader/Loader.php', + 'Mockery\\Loader\\RequireLoader' => $vendorDir . '/mockery/mockery/library/Mockery/Loader/RequireLoader.php', + 'Mockery\\Matcher\\Any' => $vendorDir . '/mockery/mockery/library/Mockery/Matcher/Any.php', + 'Mockery\\Matcher\\AnyOf' => $vendorDir . '/mockery/mockery/library/Mockery/Matcher/AnyOf.php', + 'Mockery\\Matcher\\Closure' => $vendorDir . '/mockery/mockery/library/Mockery/Matcher/Closure.php', + 'Mockery\\Matcher\\Contains' => $vendorDir . '/mockery/mockery/library/Mockery/Matcher/Contains.php', + 'Mockery\\Matcher\\Ducktype' => $vendorDir . '/mockery/mockery/library/Mockery/Matcher/Ducktype.php', + 'Mockery\\Matcher\\HasKey' => $vendorDir . '/mockery/mockery/library/Mockery/Matcher/HasKey.php', + 'Mockery\\Matcher\\HasValue' => $vendorDir . '/mockery/mockery/library/Mockery/Matcher/HasValue.php', + 'Mockery\\Matcher\\MatcherAbstract' => $vendorDir . '/mockery/mockery/library/Mockery/Matcher/MatcherAbstract.php', + 'Mockery\\Matcher\\MustBe' => $vendorDir . '/mockery/mockery/library/Mockery/Matcher/MustBe.php', + 'Mockery\\Matcher\\Not' => $vendorDir . '/mockery/mockery/library/Mockery/Matcher/Not.php', + 'Mockery\\Matcher\\NotAnyOf' => $vendorDir . '/mockery/mockery/library/Mockery/Matcher/NotAnyOf.php', + 'Mockery\\Matcher\\Subset' => $vendorDir . '/mockery/mockery/library/Mockery/Matcher/Subset.php', + 'Mockery\\Matcher\\Type' => $vendorDir . '/mockery/mockery/library/Mockery/Matcher/Type.php', + 'Mockery\\MethodCall' => $vendorDir . '/mockery/mockery/library/Mockery/MethodCall.php', + 'Mockery\\Mock' => $vendorDir . '/mockery/mockery/library/Mockery/Mock.php', + 'Mockery\\MockInterface' => $vendorDir . '/mockery/mockery/library/Mockery/MockInterface.php', + 'Mockery\\ReceivedMethodCalls' => $vendorDir . '/mockery/mockery/library/Mockery/ReceivedMethodCalls.php', + 'Mockery\\Recorder' => $vendorDir . '/mockery/mockery/library/Mockery/Recorder.php', + 'Mockery\\Undefined' => $vendorDir . '/mockery/mockery/library/Mockery/Undefined.php', + 'Mockery\\VerificationDirector' => $vendorDir . '/mockery/mockery/library/Mockery/VerificationDirector.php', + 'Mockery\\VerificationExpectation' => $vendorDir . '/mockery/mockery/library/Mockery/VerificationExpectation.php', + 'Monolog\\ErrorHandler' => $vendorDir . '/monolog/monolog/src/Monolog/ErrorHandler.php', + 'Monolog\\Formatter\\ChromePHPFormatter' => $vendorDir . '/monolog/monolog/src/Monolog/Formatter/ChromePHPFormatter.php', + 'Monolog\\Formatter\\ElasticaFormatter' => $vendorDir . '/monolog/monolog/src/Monolog/Formatter/ElasticaFormatter.php', + 'Monolog\\Formatter\\FlowdockFormatter' => $vendorDir . '/monolog/monolog/src/Monolog/Formatter/FlowdockFormatter.php', + 'Monolog\\Formatter\\FluentdFormatter' => $vendorDir . '/monolog/monolog/src/Monolog/Formatter/FluentdFormatter.php', + 'Monolog\\Formatter\\FormatterInterface' => $vendorDir . '/monolog/monolog/src/Monolog/Formatter/FormatterInterface.php', + 'Monolog\\Formatter\\GelfMessageFormatter' => $vendorDir . '/monolog/monolog/src/Monolog/Formatter/GelfMessageFormatter.php', + 'Monolog\\Formatter\\HtmlFormatter' => $vendorDir . '/monolog/monolog/src/Monolog/Formatter/HtmlFormatter.php', + 'Monolog\\Formatter\\JsonFormatter' => $vendorDir . '/monolog/monolog/src/Monolog/Formatter/JsonFormatter.php', + 'Monolog\\Formatter\\LineFormatter' => $vendorDir . '/monolog/monolog/src/Monolog/Formatter/LineFormatter.php', + 'Monolog\\Formatter\\LogglyFormatter' => $vendorDir . '/monolog/monolog/src/Monolog/Formatter/LogglyFormatter.php', + 'Monolog\\Formatter\\LogstashFormatter' => $vendorDir . '/monolog/monolog/src/Monolog/Formatter/LogstashFormatter.php', + 'Monolog\\Formatter\\MongoDBFormatter' => $vendorDir . '/monolog/monolog/src/Monolog/Formatter/MongoDBFormatter.php', + 'Monolog\\Formatter\\NormalizerFormatter' => $vendorDir . '/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php', + 'Monolog\\Formatter\\ScalarFormatter' => $vendorDir . '/monolog/monolog/src/Monolog/Formatter/ScalarFormatter.php', + 'Monolog\\Formatter\\WildfireFormatter' => $vendorDir . '/monolog/monolog/src/Monolog/Formatter/WildfireFormatter.php', + 'Monolog\\Handler\\AbstractHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/AbstractHandler.php', + 'Monolog\\Handler\\AbstractProcessingHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php', + 'Monolog\\Handler\\AbstractSyslogHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/AbstractSyslogHandler.php', + 'Monolog\\Handler\\AmqpHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/AmqpHandler.php', + 'Monolog\\Handler\\BrowserConsoleHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/BrowserConsoleHandler.php', + 'Monolog\\Handler\\BufferHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/BufferHandler.php', + 'Monolog\\Handler\\ChromePHPHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/ChromePHPHandler.php', + 'Monolog\\Handler\\CouchDBHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/CouchDBHandler.php', + 'Monolog\\Handler\\CubeHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/CubeHandler.php', + 'Monolog\\Handler\\Curl\\Util' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/Curl/Util.php', + 'Monolog\\Handler\\DeduplicationHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/DeduplicationHandler.php', + 'Monolog\\Handler\\DoctrineCouchDBHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/DoctrineCouchDBHandler.php', + 'Monolog\\Handler\\DynamoDbHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/DynamoDbHandler.php', + 'Monolog\\Handler\\ElasticSearchHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/ElasticSearchHandler.php', + 'Monolog\\Handler\\ErrorLogHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/ErrorLogHandler.php', + 'Monolog\\Handler\\FilterHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/FilterHandler.php', + 'Monolog\\Handler\\FingersCrossedHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/FingersCrossedHandler.php', + 'Monolog\\Handler\\FingersCrossed\\ActivationStrategyInterface' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/FingersCrossed/ActivationStrategyInterface.php', + 'Monolog\\Handler\\FingersCrossed\\ChannelLevelActivationStrategy' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/FingersCrossed/ChannelLevelActivationStrategy.php', + 'Monolog\\Handler\\FingersCrossed\\ErrorLevelActivationStrategy' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/FingersCrossed/ErrorLevelActivationStrategy.php', + 'Monolog\\Handler\\FirePHPHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/FirePHPHandler.php', + 'Monolog\\Handler\\FleepHookHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/FleepHookHandler.php', + 'Monolog\\Handler\\FlowdockHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/FlowdockHandler.php', + 'Monolog\\Handler\\GelfHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/GelfHandler.php', + 'Monolog\\Handler\\GroupHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/GroupHandler.php', + 'Monolog\\Handler\\HandlerInterface' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/HandlerInterface.php', + 'Monolog\\Handler\\HandlerWrapper' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/HandlerWrapper.php', + 'Monolog\\Handler\\HipChatHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/HipChatHandler.php', + 'Monolog\\Handler\\IFTTTHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/IFTTTHandler.php', + 'Monolog\\Handler\\LogEntriesHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/LogEntriesHandler.php', + 'Monolog\\Handler\\LogglyHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/LogglyHandler.php', + 'Monolog\\Handler\\MailHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/MailHandler.php', + 'Monolog\\Handler\\MandrillHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/MandrillHandler.php', + 'Monolog\\Handler\\MissingExtensionException' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/MissingExtensionException.php', + 'Monolog\\Handler\\MongoDBHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/MongoDBHandler.php', + 'Monolog\\Handler\\NativeMailerHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/NativeMailerHandler.php', + 'Monolog\\Handler\\NewRelicHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/NewRelicHandler.php', + 'Monolog\\Handler\\NullHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/NullHandler.php', + 'Monolog\\Handler\\PHPConsoleHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/PHPConsoleHandler.php', + 'Monolog\\Handler\\PsrHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/PsrHandler.php', + 'Monolog\\Handler\\PushoverHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/PushoverHandler.php', + 'Monolog\\Handler\\RavenHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/RavenHandler.php', + 'Monolog\\Handler\\RedisHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/RedisHandler.php', + 'Monolog\\Handler\\RollbarHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/RollbarHandler.php', + 'Monolog\\Handler\\RotatingFileHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php', + 'Monolog\\Handler\\SamplingHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/SamplingHandler.php', + 'Monolog\\Handler\\SlackHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/SlackHandler.php', + 'Monolog\\Handler\\SlackWebhookHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/SlackWebhookHandler.php', + 'Monolog\\Handler\\Slack\\SlackRecord' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/Slack/SlackRecord.php', + 'Monolog\\Handler\\SlackbotHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/SlackbotHandler.php', + 'Monolog\\Handler\\SocketHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/SocketHandler.php', + 'Monolog\\Handler\\StreamHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/StreamHandler.php', + 'Monolog\\Handler\\SwiftMailerHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/SwiftMailerHandler.php', + 'Monolog\\Handler\\SyslogHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/SyslogHandler.php', + 'Monolog\\Handler\\SyslogUdpHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/SyslogUdpHandler.php', + 'Monolog\\Handler\\SyslogUdp\\UdpSocket' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/SyslogUdp/UdpSocket.php', + 'Monolog\\Handler\\TestHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/TestHandler.php', + 'Monolog\\Handler\\WhatFailureGroupHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/WhatFailureGroupHandler.php', + 'Monolog\\Handler\\ZendMonitorHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/ZendMonitorHandler.php', + 'Monolog\\Logger' => $vendorDir . '/monolog/monolog/src/Monolog/Logger.php', + 'Monolog\\Processor\\GitProcessor' => $vendorDir . '/monolog/monolog/src/Monolog/Processor/GitProcessor.php', + 'Monolog\\Processor\\IntrospectionProcessor' => $vendorDir . '/monolog/monolog/src/Monolog/Processor/IntrospectionProcessor.php', + 'Monolog\\Processor\\MemoryPeakUsageProcessor' => $vendorDir . '/monolog/monolog/src/Monolog/Processor/MemoryPeakUsageProcessor.php', + 'Monolog\\Processor\\MemoryProcessor' => $vendorDir . '/monolog/monolog/src/Monolog/Processor/MemoryProcessor.php', + 'Monolog\\Processor\\MemoryUsageProcessor' => $vendorDir . '/monolog/monolog/src/Monolog/Processor/MemoryUsageProcessor.php', + 'Monolog\\Processor\\MercurialProcessor' => $vendorDir . '/monolog/monolog/src/Monolog/Processor/MercurialProcessor.php', + 'Monolog\\Processor\\ProcessIdProcessor' => $vendorDir . '/monolog/monolog/src/Monolog/Processor/ProcessIdProcessor.php', + 'Monolog\\Processor\\PsrLogMessageProcessor' => $vendorDir . '/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php', + 'Monolog\\Processor\\TagProcessor' => $vendorDir . '/monolog/monolog/src/Monolog/Processor/TagProcessor.php', + 'Monolog\\Processor\\UidProcessor' => $vendorDir . '/monolog/monolog/src/Monolog/Processor/UidProcessor.php', + 'Monolog\\Processor\\WebProcessor' => $vendorDir . '/monolog/monolog/src/Monolog/Processor/WebProcessor.php', + 'Monolog\\Registry' => $vendorDir . '/monolog/monolog/src/Monolog/Registry.php', + 'PHPUnit\\Framework\\Assert' => $vendorDir . '/phpunit/phpunit/src/ForwardCompatibility/Assert.php', + 'PHPUnit\\Framework\\BaseTestListener' => $vendorDir . '/phpunit/phpunit/src/ForwardCompatibility/BaseTestListener.php', + 'PHPUnit\\Framework\\TestCase' => $vendorDir . '/phpunit/phpunit/src/ForwardCompatibility/TestCase.php', + 'PHPUnit\\Framework\\TestListener' => $vendorDir . '/phpunit/phpunit/src/ForwardCompatibility/TestListener.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', + 'PHPUnit_Extensions_PhptTestSuite' => $vendorDir . '/phpunit/phpunit/src/Extensions/PhptTestSuite.php', + 'PHPUnit_Extensions_RepeatedTest' => $vendorDir . '/phpunit/phpunit/src/Extensions/RepeatedTest.php', + 'PHPUnit_Extensions_TestDecorator' => $vendorDir . '/phpunit/phpunit/src/Extensions/TestDecorator.php', + 'PHPUnit_Extensions_TicketListener' => $vendorDir . '/phpunit/phpunit/src/Extensions/TicketListener.php', + 'PHPUnit_Framework_Assert' => $vendorDir . '/phpunit/phpunit/src/Framework/Assert.php', + 'PHPUnit_Framework_AssertionFailedError' => $vendorDir . '/phpunit/phpunit/src/Framework/AssertionFailedError.php', + 'PHPUnit_Framework_BaseTestListener' => $vendorDir . '/phpunit/phpunit/src/Framework/BaseTestListener.php', + 'PHPUnit_Framework_CodeCoverageException' => $vendorDir . '/phpunit/phpunit/src/Framework/CodeCoverageException.php', + 'PHPUnit_Framework_Constraint' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint.php', + 'PHPUnit_Framework_Constraint_And' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/And.php', + 'PHPUnit_Framework_Constraint_ArrayHasKey' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ArrayHasKey.php', + 'PHPUnit_Framework_Constraint_ArraySubset' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ArraySubset.php', + 'PHPUnit_Framework_Constraint_Attribute' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Attribute.php', + 'PHPUnit_Framework_Constraint_Callback' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Callback.php', + 'PHPUnit_Framework_Constraint_ClassHasAttribute' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ClassHasAttribute.php', + 'PHPUnit_Framework_Constraint_ClassHasStaticAttribute' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ClassHasStaticAttribute.php', + 'PHPUnit_Framework_Constraint_Composite' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Composite.php', + 'PHPUnit_Framework_Constraint_Count' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Count.php', + 'PHPUnit_Framework_Constraint_DirectoryExists' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/DirectoryExists.php', + 'PHPUnit_Framework_Constraint_Exception' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Exception.php', + 'PHPUnit_Framework_Constraint_ExceptionCode' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ExceptionCode.php', + 'PHPUnit_Framework_Constraint_ExceptionMessage' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ExceptionMessage.php', + 'PHPUnit_Framework_Constraint_ExceptionMessageRegExp' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ExceptionMessageRegExp.php', + 'PHPUnit_Framework_Constraint_FileExists' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/FileExists.php', + 'PHPUnit_Framework_Constraint_GreaterThan' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/GreaterThan.php', + 'PHPUnit_Framework_Constraint_IsAnything' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsAnything.php', + 'PHPUnit_Framework_Constraint_IsEmpty' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsEmpty.php', + 'PHPUnit_Framework_Constraint_IsEqual' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsEqual.php', + 'PHPUnit_Framework_Constraint_IsFalse' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsFalse.php', + 'PHPUnit_Framework_Constraint_IsFinite' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsFinite.php', + 'PHPUnit_Framework_Constraint_IsIdentical' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php', + 'PHPUnit_Framework_Constraint_IsInfinite' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsInfinite.php', + 'PHPUnit_Framework_Constraint_IsInstanceOf' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsInstanceOf.php', + 'PHPUnit_Framework_Constraint_IsJson' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsJson.php', + 'PHPUnit_Framework_Constraint_IsNan' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsNan.php', + 'PHPUnit_Framework_Constraint_IsNull' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsNull.php', + 'PHPUnit_Framework_Constraint_IsReadable' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsReadable.php', + 'PHPUnit_Framework_Constraint_IsTrue' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsTrue.php', + 'PHPUnit_Framework_Constraint_IsType' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsType.php', + 'PHPUnit_Framework_Constraint_IsWritable' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsWritable.php', + 'PHPUnit_Framework_Constraint_JsonMatches' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/JsonMatches.php', + 'PHPUnit_Framework_Constraint_JsonMatches_ErrorMessageProvider' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/JsonMatches/ErrorMessageProvider.php', + 'PHPUnit_Framework_Constraint_LessThan' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/LessThan.php', + 'PHPUnit_Framework_Constraint_Not' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Not.php', + 'PHPUnit_Framework_Constraint_ObjectHasAttribute' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ObjectHasAttribute.php', + 'PHPUnit_Framework_Constraint_Or' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Or.php', + 'PHPUnit_Framework_Constraint_PCREMatch' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/PCREMatch.php', + 'PHPUnit_Framework_Constraint_SameSize' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/SameSize.php', + 'PHPUnit_Framework_Constraint_StringContains' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/StringContains.php', + 'PHPUnit_Framework_Constraint_StringEndsWith' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/StringEndsWith.php', + 'PHPUnit_Framework_Constraint_StringMatches' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/StringMatches.php', + 'PHPUnit_Framework_Constraint_StringStartsWith' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/StringStartsWith.php', + 'PHPUnit_Framework_Constraint_TraversableContains' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/TraversableContains.php', + 'PHPUnit_Framework_Constraint_TraversableContainsOnly' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/TraversableContainsOnly.php', + 'PHPUnit_Framework_Constraint_Xor' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Xor.php', + 'PHPUnit_Framework_CoveredCodeNotExecutedException' => $vendorDir . '/phpunit/phpunit/src/Framework/CoveredCodeNotExecutedException.php', + 'PHPUnit_Framework_Error' => $vendorDir . '/phpunit/phpunit/src/Framework/Error.php', + 'PHPUnit_Framework_Error_Deprecated' => $vendorDir . '/phpunit/phpunit/src/Framework/Error/Deprecated.php', + 'PHPUnit_Framework_Error_Notice' => $vendorDir . '/phpunit/phpunit/src/Framework/Error/Notice.php', + 'PHPUnit_Framework_Error_Warning' => $vendorDir . '/phpunit/phpunit/src/Framework/Error/Warning.php', + 'PHPUnit_Framework_Exception' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception.php', + 'PHPUnit_Framework_ExceptionWrapper' => $vendorDir . '/phpunit/phpunit/src/Framework/ExceptionWrapper.php', + 'PHPUnit_Framework_ExpectationFailedException' => $vendorDir . '/phpunit/phpunit/src/Framework/ExpectationFailedException.php', + 'PHPUnit_Framework_IncompleteTest' => $vendorDir . '/phpunit/phpunit/src/Framework/IncompleteTest.php', + 'PHPUnit_Framework_IncompleteTestCase' => $vendorDir . '/phpunit/phpunit/src/Framework/IncompleteTestCase.php', + 'PHPUnit_Framework_IncompleteTestError' => $vendorDir . '/phpunit/phpunit/src/Framework/IncompleteTestError.php', + 'PHPUnit_Framework_InvalidCoversTargetException' => $vendorDir . '/phpunit/phpunit/src/Framework/InvalidCoversTargetException.php', + 'PHPUnit_Framework_MissingCoversAnnotationException' => $vendorDir . '/phpunit/phpunit/src/Framework/MissingCoversAnnotationException.php', + 'PHPUnit_Framework_MockObject_BadMethodCallException' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/BadMethodCallException.php', + 'PHPUnit_Framework_MockObject_Builder_Identity' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Identity.php', + 'PHPUnit_Framework_MockObject_Builder_InvocationMocker' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/InvocationMocker.php', + 'PHPUnit_Framework_MockObject_Builder_Match' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Match.php', + 'PHPUnit_Framework_MockObject_Builder_MethodNameMatch' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/MethodNameMatch.php', + 'PHPUnit_Framework_MockObject_Builder_Namespace' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Namespace.php', + 'PHPUnit_Framework_MockObject_Builder_ParametersMatch' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/ParametersMatch.php', + 'PHPUnit_Framework_MockObject_Builder_Stub' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Stub.php', + 'PHPUnit_Framework_MockObject_Exception' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/Exception.php', + 'PHPUnit_Framework_MockObject_Generator' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator.php', + 'PHPUnit_Framework_MockObject_Invocation' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation.php', + 'PHPUnit_Framework_MockObject_InvocationMocker' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/InvocationMocker.php', + 'PHPUnit_Framework_MockObject_Invocation_Object' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation/Object.php', + 'PHPUnit_Framework_MockObject_Invocation_Static' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation/Static.php', + 'PHPUnit_Framework_MockObject_Invokable' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invokable.php', + 'PHPUnit_Framework_MockObject_Matcher' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher.php', + 'PHPUnit_Framework_MockObject_Matcher_AnyInvokedCount' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/AnyInvokedCount.php', + 'PHPUnit_Framework_MockObject_Matcher_AnyParameters' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/AnyParameters.php', + 'PHPUnit_Framework_MockObject_Matcher_ConsecutiveParameters' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/ConsecutiveParameters.php', + 'PHPUnit_Framework_MockObject_Matcher_Invocation' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/Invocation.php', + 'PHPUnit_Framework_MockObject_Matcher_InvokedAtIndex' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtIndex.php', + 'PHPUnit_Framework_MockObject_Matcher_InvokedAtLeastCount' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtLeastCount.php', + 'PHPUnit_Framework_MockObject_Matcher_InvokedAtLeastOnce' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtLeastOnce.php', + 'PHPUnit_Framework_MockObject_Matcher_InvokedAtMostCount' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtMostCount.php', + 'PHPUnit_Framework_MockObject_Matcher_InvokedCount' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedCount.php', + 'PHPUnit_Framework_MockObject_Matcher_InvokedRecorder' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedRecorder.php', + 'PHPUnit_Framework_MockObject_Matcher_MethodName' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/MethodName.php', + 'PHPUnit_Framework_MockObject_Matcher_Parameters' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/Parameters.php', + 'PHPUnit_Framework_MockObject_Matcher_StatelessInvocation' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/StatelessInvocation.php', + 'PHPUnit_Framework_MockObject_MockBuilder' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/MockBuilder.php', + 'PHPUnit_Framework_MockObject_MockObject' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/MockObject.php', + 'PHPUnit_Framework_MockObject_RuntimeException' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/RuntimeException.php', + 'PHPUnit_Framework_MockObject_Stub' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub.php', + 'PHPUnit_Framework_MockObject_Stub_ConsecutiveCalls' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ConsecutiveCalls.php', + 'PHPUnit_Framework_MockObject_Stub_Exception' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/Exception.php', + 'PHPUnit_Framework_MockObject_Stub_MatcherCollection' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/MatcherCollection.php', + 'PHPUnit_Framework_MockObject_Stub_Return' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/Return.php', + 'PHPUnit_Framework_MockObject_Stub_ReturnArgument' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnArgument.php', + 'PHPUnit_Framework_MockObject_Stub_ReturnCallback' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnCallback.php', + 'PHPUnit_Framework_MockObject_Stub_ReturnReference' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnReference.php', + 'PHPUnit_Framework_MockObject_Stub_ReturnSelf' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnSelf.php', + 'PHPUnit_Framework_MockObject_Stub_ReturnValueMap' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnValueMap.php', + 'PHPUnit_Framework_MockObject_Verifiable' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Verifiable.php', + 'PHPUnit_Framework_OutputError' => $vendorDir . '/phpunit/phpunit/src/Framework/OutputError.php', + 'PHPUnit_Framework_RiskyTest' => $vendorDir . '/phpunit/phpunit/src/Framework/RiskyTest.php', + 'PHPUnit_Framework_RiskyTestError' => $vendorDir . '/phpunit/phpunit/src/Framework/RiskyTestError.php', + 'PHPUnit_Framework_SelfDescribing' => $vendorDir . '/phpunit/phpunit/src/Framework/SelfDescribing.php', + 'PHPUnit_Framework_SkippedTest' => $vendorDir . '/phpunit/phpunit/src/Framework/SkippedTest.php', + 'PHPUnit_Framework_SkippedTestCase' => $vendorDir . '/phpunit/phpunit/src/Framework/SkippedTestCase.php', + 'PHPUnit_Framework_SkippedTestError' => $vendorDir . '/phpunit/phpunit/src/Framework/SkippedTestError.php', + 'PHPUnit_Framework_SkippedTestSuiteError' => $vendorDir . '/phpunit/phpunit/src/Framework/SkippedTestSuiteError.php', + 'PHPUnit_Framework_SyntheticError' => $vendorDir . '/phpunit/phpunit/src/Framework/SyntheticError.php', + 'PHPUnit_Framework_Test' => $vendorDir . '/phpunit/phpunit/src/Framework/Test.php', + 'PHPUnit_Framework_TestCase' => $vendorDir . '/phpunit/phpunit/src/Framework/TestCase.php', + 'PHPUnit_Framework_TestFailure' => $vendorDir . '/phpunit/phpunit/src/Framework/TestFailure.php', + 'PHPUnit_Framework_TestListener' => $vendorDir . '/phpunit/phpunit/src/Framework/TestListener.php', + 'PHPUnit_Framework_TestResult' => $vendorDir . '/phpunit/phpunit/src/Framework/TestResult.php', + 'PHPUnit_Framework_TestSuite' => $vendorDir . '/phpunit/phpunit/src/Framework/TestSuite.php', + 'PHPUnit_Framework_TestSuite_DataProvider' => $vendorDir . '/phpunit/phpunit/src/Framework/TestSuite/DataProvider.php', + 'PHPUnit_Framework_UnintentionallyCoveredCodeError' => $vendorDir . '/phpunit/phpunit/src/Framework/UnintentionallyCoveredCodeError.php', + 'PHPUnit_Framework_Warning' => $vendorDir . '/phpunit/phpunit/src/Framework/Warning.php', + 'PHPUnit_Framework_WarningTestCase' => $vendorDir . '/phpunit/phpunit/src/Framework/WarningTestCase.php', + 'PHPUnit_Runner_BaseTestRunner' => $vendorDir . '/phpunit/phpunit/src/Runner/BaseTestRunner.php', + 'PHPUnit_Runner_Exception' => $vendorDir . '/phpunit/phpunit/src/Runner/Exception.php', + 'PHPUnit_Runner_Filter_Factory' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/Factory.php', + 'PHPUnit_Runner_Filter_GroupFilterIterator' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/Group.php', + 'PHPUnit_Runner_Filter_Group_Exclude' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/Group/Exclude.php', + 'PHPUnit_Runner_Filter_Group_Include' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/Group/Include.php', + 'PHPUnit_Runner_Filter_Test' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/Test.php', + 'PHPUnit_Runner_StandardTestSuiteLoader' => $vendorDir . '/phpunit/phpunit/src/Runner/StandardTestSuiteLoader.php', + 'PHPUnit_Runner_TestSuiteLoader' => $vendorDir . '/phpunit/phpunit/src/Runner/TestSuiteLoader.php', + 'PHPUnit_Runner_Version' => $vendorDir . '/phpunit/phpunit/src/Runner/Version.php', + 'PHPUnit_TextUI_Command' => $vendorDir . '/phpunit/phpunit/src/TextUI/Command.php', + 'PHPUnit_TextUI_ResultPrinter' => $vendorDir . '/phpunit/phpunit/src/TextUI/ResultPrinter.php', + 'PHPUnit_TextUI_TestRunner' => $vendorDir . '/phpunit/phpunit/src/TextUI/TestRunner.php', + 'PHPUnit_Util_Blacklist' => $vendorDir . '/phpunit/phpunit/src/Util/Blacklist.php', + 'PHPUnit_Util_Configuration' => $vendorDir . '/phpunit/phpunit/src/Util/Configuration.php', + 'PHPUnit_Util_ConfigurationGenerator' => $vendorDir . '/phpunit/phpunit/src/Util/ConfigurationGenerator.php', + 'PHPUnit_Util_ErrorHandler' => $vendorDir . '/phpunit/phpunit/src/Util/ErrorHandler.php', + 'PHPUnit_Util_Fileloader' => $vendorDir . '/phpunit/phpunit/src/Util/Fileloader.php', + 'PHPUnit_Util_Filesystem' => $vendorDir . '/phpunit/phpunit/src/Util/Filesystem.php', + 'PHPUnit_Util_Filter' => $vendorDir . '/phpunit/phpunit/src/Util/Filter.php', + 'PHPUnit_Util_Getopt' => $vendorDir . '/phpunit/phpunit/src/Util/Getopt.php', + 'PHPUnit_Util_GlobalState' => $vendorDir . '/phpunit/phpunit/src/Util/GlobalState.php', + 'PHPUnit_Util_InvalidArgumentHelper' => $vendorDir . '/phpunit/phpunit/src/Util/InvalidArgumentHelper.php', + 'PHPUnit_Util_Log_JSON' => $vendorDir . '/phpunit/phpunit/src/Util/Log/JSON.php', + 'PHPUnit_Util_Log_JUnit' => $vendorDir . '/phpunit/phpunit/src/Util/Log/JUnit.php', + 'PHPUnit_Util_Log_TAP' => $vendorDir . '/phpunit/phpunit/src/Util/Log/TAP.php', + 'PHPUnit_Util_Log_TeamCity' => $vendorDir . '/phpunit/phpunit/src/Util/Log/TeamCity.php', + 'PHPUnit_Util_PHP' => $vendorDir . '/phpunit/phpunit/src/Util/PHP.php', + 'PHPUnit_Util_PHP_Default' => $vendorDir . '/phpunit/phpunit/src/Util/PHP/Default.php', + 'PHPUnit_Util_PHP_Windows' => $vendorDir . '/phpunit/phpunit/src/Util/PHP/Windows.php', + 'PHPUnit_Util_Printer' => $vendorDir . '/phpunit/phpunit/src/Util/Printer.php', + 'PHPUnit_Util_Regex' => $vendorDir . '/phpunit/phpunit/src/Util/Regex.php', + 'PHPUnit_Util_String' => $vendorDir . '/phpunit/phpunit/src/Util/String.php', + 'PHPUnit_Util_Test' => $vendorDir . '/phpunit/phpunit/src/Util/Test.php', + 'PHPUnit_Util_TestDox_NamePrettifier' => $vendorDir . '/phpunit/phpunit/src/Util/TestDox/NamePrettifier.php', + 'PHPUnit_Util_TestDox_ResultPrinter' => $vendorDir . '/phpunit/phpunit/src/Util/TestDox/ResultPrinter.php', + 'PHPUnit_Util_TestDox_ResultPrinter_HTML' => $vendorDir . '/phpunit/phpunit/src/Util/TestDox/ResultPrinter/HTML.php', + 'PHPUnit_Util_TestDox_ResultPrinter_Text' => $vendorDir . '/phpunit/phpunit/src/Util/TestDox/ResultPrinter/Text.php', + 'PHPUnit_Util_TestDox_ResultPrinter_XML' => $vendorDir . '/phpunit/phpunit/src/Util/TestDox/ResultPrinter/XML.php', + 'PHPUnit_Util_TestSuiteIterator' => $vendorDir . '/phpunit/phpunit/src/Util/TestSuiteIterator.php', + 'PHPUnit_Util_Type' => $vendorDir . '/phpunit/phpunit/src/Util/Type.php', + 'PHPUnit_Util_XML' => $vendorDir . '/phpunit/phpunit/src/Util/XML.php', + 'PHP_Timer' => $vendorDir . '/phpunit/php-timer/src/Timer.php', + 'PHP_Token' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_TokenWithScope' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_TokenWithScopeAndVisibility' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ABSTRACT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_AMPERSAND' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_AND_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ARRAY' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ARRAY_CAST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_AS' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ASYNC' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_AT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_AWAIT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_BACKTICK' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_BAD_CHARACTER' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_BOOLEAN_AND' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_BOOLEAN_OR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_BOOL_CAST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_BREAK' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CALLABLE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CARET' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CASE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CATCH' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CHARACTER' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CLASS' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CLASS_C' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CLASS_NAME_CONSTANT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CLONE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CLOSE_BRACKET' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CLOSE_CURLY' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CLOSE_SQUARE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CLOSE_TAG' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_COALESCE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_COLON' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_COMMA' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_COMMENT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_COMPILER_HALT_OFFSET' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CONCAT_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CONST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CONSTANT_ENCAPSED_STRING' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CONTINUE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CURLY_OPEN' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_DEC' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_DECLARE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_DEFAULT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_DIR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_DIV' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_DIV_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_DNUMBER' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_DO' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_DOC_COMMENT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_DOLLAR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_DOLLAR_OPEN_CURLY_BRACES' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_DOT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_DOUBLE_ARROW' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_DOUBLE_CAST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_DOUBLE_COLON' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_DOUBLE_QUOTES' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ECHO' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ELLIPSIS' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ELSE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ELSEIF' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_EMPTY' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ENCAPSED_AND_WHITESPACE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ENDDECLARE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ENDFOR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ENDFOREACH' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ENDIF' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ENDSWITCH' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ENDWHILE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_END_HEREDOC' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ENUM' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_EQUALS' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_EVAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_EXCLAMATION_MARK' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_EXIT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_EXTENDS' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_FILE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_FINAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_FINALLY' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_FOR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_FOREACH' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_FUNCTION' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_FUNC_C' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_GLOBAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_GOTO' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_GT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_HALT_COMPILER' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_IF' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_IMPLEMENTS' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_IN' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_INC' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_INCLUDE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_INCLUDE_ONCE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_INLINE_HTML' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_INSTANCEOF' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_INSTEADOF' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_INTERFACE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_INT_CAST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ISSET' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_IS_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_IS_GREATER_OR_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_IS_IDENTICAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_IS_NOT_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_IS_NOT_IDENTICAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_IS_SMALLER_OR_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_Includes' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_JOIN' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_LAMBDA_ARROW' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_LAMBDA_CP' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_LAMBDA_OP' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_LINE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_LIST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_LNUMBER' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_LOGICAL_AND' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_LOGICAL_OR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_LOGICAL_XOR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_LT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_METHOD_C' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_MINUS' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_MINUS_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_MOD_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_MULT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_MUL_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_NAMESPACE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_NEW' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_NS_C' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_NS_SEPARATOR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_NULLSAFE_OBJECT_OPERATOR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_NUM_STRING' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_OBJECT_CAST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_OBJECT_OPERATOR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ONUMBER' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_OPEN_BRACKET' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_OPEN_CURLY' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_OPEN_SQUARE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_OPEN_TAG' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_OPEN_TAG_WITH_ECHO' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_OR_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_PAAMAYIM_NEKUDOTAYIM' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_PERCENT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_PIPE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_PLUS' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_PLUS_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_POW' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_POW_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_PRINT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_PRIVATE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_PROTECTED' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_PUBLIC' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_QUESTION_MARK' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_REQUIRE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_REQUIRE_ONCE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_RETURN' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_SEMICOLON' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_SHAPE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_SL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_SL_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_SPACESHIP' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_SR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_SR_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_START_HEREDOC' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_STATIC' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_STRING' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_STRING_CAST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_STRING_VARNAME' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_SUPER' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_SWITCH' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_Stream' => $vendorDir . '/phpunit/php-token-stream/src/Token/Stream.php', + 'PHP_Token_Stream_CachingFactory' => $vendorDir . '/phpunit/php-token-stream/src/Token/Stream/CachingFactory.php', + 'PHP_Token_THROW' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_TILDE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_TRAIT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_TRAIT_C' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_TRY' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_TYPE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_TYPELIST_GT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_TYPELIST_LT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_UNSET' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_UNSET_CAST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_USE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_USE_FUNCTION' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_VAR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_VARIABLE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_WHERE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_WHILE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_WHITESPACE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_XHP_ATTRIBUTE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_XHP_CATEGORY' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_XHP_CATEGORY_LABEL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_XHP_CHILDREN' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_XHP_LABEL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_XHP_REQUIRED' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_XHP_TAG_GT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_XHP_TAG_LT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_XHP_TEXT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + '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', + 'Parsedown' => $vendorDir . '/erusev/parsedown/Parsedown.php', + 'ParsedownTest' => $vendorDir . '/erusev/parsedown/test/ParsedownTest.php', + 'PhpParser\\Autoloader' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Autoloader.php', + 'PhpParser\\Builder' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder.php', + 'PhpParser\\BuilderAbstract' => $vendorDir . '/nikic/php-parser/lib/PhpParser/BuilderAbstract.php', + 'PhpParser\\BuilderFactory' => $vendorDir . '/nikic/php-parser/lib/PhpParser/BuilderFactory.php', + 'PhpParser\\Builder\\Class_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/Class_.php', + 'PhpParser\\Builder\\Declaration' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/Declaration.php', + 'PhpParser\\Builder\\FunctionLike' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php', + 'PhpParser\\Builder\\Function_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/Function_.php', + 'PhpParser\\Builder\\Interface_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/Interface_.php', + 'PhpParser\\Builder\\Method' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/Method.php', + 'PhpParser\\Builder\\Namespace_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/Namespace_.php', + 'PhpParser\\Builder\\Param' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/Param.php', + 'PhpParser\\Builder\\Property' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/Property.php', + 'PhpParser\\Builder\\Trait_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/Trait_.php', + 'PhpParser\\Builder\\Use_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/Use_.php', + 'PhpParser\\Comment' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Comment.php', + 'PhpParser\\Comment\\Doc' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Comment/Doc.php', + 'PhpParser\\Error' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Error.php', + 'PhpParser\\ErrorHandler' => $vendorDir . '/nikic/php-parser/lib/PhpParser/ErrorHandler.php', + 'PhpParser\\ErrorHandler\\Collecting' => $vendorDir . '/nikic/php-parser/lib/PhpParser/ErrorHandler/Collecting.php', + 'PhpParser\\ErrorHandler\\Throwing' => $vendorDir . '/nikic/php-parser/lib/PhpParser/ErrorHandler/Throwing.php', + 'PhpParser\\Lexer' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer.php', + 'PhpParser\\Lexer\\Emulative' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php', + 'PhpParser\\Node' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node.php', + 'PhpParser\\NodeAbstract' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeAbstract.php', + 'PhpParser\\NodeDumper' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeDumper.php', + 'PhpParser\\NodeTraverser' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeTraverser.php', + 'PhpParser\\NodeTraverserInterface' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeTraverserInterface.php', + 'PhpParser\\NodeVisitor' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeVisitor.php', + 'PhpParser\\NodeVisitorAbstract' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeVisitorAbstract.php', + 'PhpParser\\NodeVisitor\\NameResolver' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php', + 'PhpParser\\Node\\Arg' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Arg.php', + 'PhpParser\\Node\\Const_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Const_.php', + 'PhpParser\\Node\\Expr' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr.php', + 'PhpParser\\Node\\Expr\\ArrayDimFetch' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayDimFetch.php', + 'PhpParser\\Node\\Expr\\ArrayItem' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php', + 'PhpParser\\Node\\Expr\\Array_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Array_.php', + 'PhpParser\\Node\\Expr\\Assign' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php', + 'PhpParser\\Node\\Expr\\AssignOp' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php', + 'PhpParser\\Node\\Expr\\AssignOp\\BitwiseAnd' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php', + 'PhpParser\\Node\\Expr\\AssignOp\\BitwiseOr' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseOr.php', + 'PhpParser\\Node\\Expr\\AssignOp\\BitwiseXor' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseXor.php', + 'PhpParser\\Node\\Expr\\AssignOp\\Concat' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Concat.php', + 'PhpParser\\Node\\Expr\\AssignOp\\Div' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Div.php', + 'PhpParser\\Node\\Expr\\AssignOp\\Minus' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Minus.php', + 'PhpParser\\Node\\Expr\\AssignOp\\Mod' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mod.php', + 'PhpParser\\Node\\Expr\\AssignOp\\Mul' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mul.php', + 'PhpParser\\Node\\Expr\\AssignOp\\Plus' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Plus.php', + 'PhpParser\\Node\\Expr\\AssignOp\\Pow' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Pow.php', + 'PhpParser\\Node\\Expr\\AssignOp\\ShiftLeft' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftLeft.php', + 'PhpParser\\Node\\Expr\\AssignOp\\ShiftRight' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftRight.php', + 'PhpParser\\Node\\Expr\\AssignRef' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignRef.php', + 'PhpParser\\Node\\Expr\\BinaryOp' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\BitwiseAnd' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\BitwiseOr' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseOr.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\BitwiseXor' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseXor.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\BooleanAnd' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanAnd.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\BooleanOr' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanOr.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\Coalesce' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Coalesce.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\Concat' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Concat.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\Div' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Div.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\Equal' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Equal.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\Greater' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Greater.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\GreaterOrEqual' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\Identical' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Identical.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\LogicalAnd' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalAnd.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\LogicalOr' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalOr.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\LogicalXor' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalXor.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\Minus' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Minus.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\Mod' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mod.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\Mul' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mul.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\NotEqual' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotEqual.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\NotIdentical' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotIdentical.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\Plus' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Plus.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\Pow' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Pow.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\ShiftLeft' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftLeft.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\ShiftRight' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftRight.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\Smaller' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Smaller.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\SmallerOrEqual' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/SmallerOrEqual.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\Spaceship' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Spaceship.php', + 'PhpParser\\Node\\Expr\\BitwiseNot' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BitwiseNot.php', + 'PhpParser\\Node\\Expr\\BooleanNot' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php', + 'PhpParser\\Node\\Expr\\Cast' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast.php', + 'PhpParser\\Node\\Expr\\Cast\\Array_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Array_.php', + 'PhpParser\\Node\\Expr\\Cast\\Bool_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Bool_.php', + 'PhpParser\\Node\\Expr\\Cast\\Double' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Double.php', + 'PhpParser\\Node\\Expr\\Cast\\Int_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Int_.php', + 'PhpParser\\Node\\Expr\\Cast\\Object_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Object_.php', + 'PhpParser\\Node\\Expr\\Cast\\String_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/String_.php', + 'PhpParser\\Node\\Expr\\Cast\\Unset_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Unset_.php', + 'PhpParser\\Node\\Expr\\ClassConstFetch' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/ClassConstFetch.php', + 'PhpParser\\Node\\Expr\\Clone_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php', + 'PhpParser\\Node\\Expr\\Closure' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php', + 'PhpParser\\Node\\Expr\\ClosureUse' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php', + 'PhpParser\\Node\\Expr\\ConstFetch' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/ConstFetch.php', + 'PhpParser\\Node\\Expr\\Empty_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php', + 'PhpParser\\Node\\Expr\\Error' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php', + 'PhpParser\\Node\\Expr\\ErrorSuppress' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/ErrorSuppress.php', + 'PhpParser\\Node\\Expr\\Eval_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Eval_.php', + 'PhpParser\\Node\\Expr\\Exit_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Exit_.php', + 'PhpParser\\Node\\Expr\\FuncCall' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php', + 'PhpParser\\Node\\Expr\\Include_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Include_.php', + 'PhpParser\\Node\\Expr\\Instanceof_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Instanceof_.php', + 'PhpParser\\Node\\Expr\\Isset_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Isset_.php', + 'PhpParser\\Node\\Expr\\List_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/List_.php', + 'PhpParser\\Node\\Expr\\MethodCall' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php', + 'PhpParser\\Node\\Expr\\New_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php', + 'PhpParser\\Node\\Expr\\PostDec' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/PostDec.php', + 'PhpParser\\Node\\Expr\\PostInc' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/PostInc.php', + 'PhpParser\\Node\\Expr\\PreDec' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/PreDec.php', + 'PhpParser\\Node\\Expr\\PreInc' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/PreInc.php', + 'PhpParser\\Node\\Expr\\Print_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Print_.php', + 'PhpParser\\Node\\Expr\\PropertyFetch' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/PropertyFetch.php', + 'PhpParser\\Node\\Expr\\ShellExec' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/ShellExec.php', + 'PhpParser\\Node\\Expr\\StaticCall' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php', + 'PhpParser\\Node\\Expr\\StaticPropertyFetch' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.php', + 'PhpParser\\Node\\Expr\\Ternary' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Ternary.php', + 'PhpParser\\Node\\Expr\\UnaryMinus' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryMinus.php', + 'PhpParser\\Node\\Expr\\UnaryPlus' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryPlus.php', + 'PhpParser\\Node\\Expr\\Variable' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Variable.php', + 'PhpParser\\Node\\Expr\\YieldFrom' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/YieldFrom.php', + 'PhpParser\\Node\\Expr\\Yield_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php', + 'PhpParser\\Node\\FunctionLike' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php', + 'PhpParser\\Node\\Name' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Name.php', + 'PhpParser\\Node\\Name\\FullyQualified' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Name/FullyQualified.php', + 'PhpParser\\Node\\Name\\Relative' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Name/Relative.php', + 'PhpParser\\Node\\NullableType' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/NullableType.php', + 'PhpParser\\Node\\Param' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Param.php', + 'PhpParser\\Node\\Scalar' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar.php', + 'PhpParser\\Node\\Scalar\\DNumber' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/DNumber.php', + 'PhpParser\\Node\\Scalar\\Encapsed' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/Encapsed.php', + 'PhpParser\\Node\\Scalar\\EncapsedStringPart' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/EncapsedStringPart.php', + 'PhpParser\\Node\\Scalar\\LNumber' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php', + 'PhpParser\\Node\\Scalar\\MagicConst' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst.php', + 'PhpParser\\Node\\Scalar\\MagicConst\\Class_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Class_.php', + 'PhpParser\\Node\\Scalar\\MagicConst\\Dir' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Dir.php', + 'PhpParser\\Node\\Scalar\\MagicConst\\File' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/File.php', + 'PhpParser\\Node\\Scalar\\MagicConst\\Function_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Function_.php', + 'PhpParser\\Node\\Scalar\\MagicConst\\Line' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Line.php', + 'PhpParser\\Node\\Scalar\\MagicConst\\Method' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Method.php', + 'PhpParser\\Node\\Scalar\\MagicConst\\Namespace_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Namespace_.php', + 'PhpParser\\Node\\Scalar\\MagicConst\\Trait_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Trait_.php', + 'PhpParser\\Node\\Scalar\\String_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/String_.php', + 'PhpParser\\Node\\Stmt' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt.php', + 'PhpParser\\Node\\Stmt\\Break_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Break_.php', + 'PhpParser\\Node\\Stmt\\Case_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php', + 'PhpParser\\Node\\Stmt\\Catch_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php', + 'PhpParser\\Node\\Stmt\\ClassConst' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassConst.php', + 'PhpParser\\Node\\Stmt\\ClassLike' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php', + 'PhpParser\\Node\\Stmt\\ClassMethod' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php', + 'PhpParser\\Node\\Stmt\\Class_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php', + 'PhpParser\\Node\\Stmt\\Const_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php', + 'PhpParser\\Node\\Stmt\\Continue_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php', + 'PhpParser\\Node\\Stmt\\DeclareDeclare' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php', + 'PhpParser\\Node\\Stmt\\Declare_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Declare_.php', + 'PhpParser\\Node\\Stmt\\Do_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php', + 'PhpParser\\Node\\Stmt\\Echo_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php', + 'PhpParser\\Node\\Stmt\\ElseIf_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/ElseIf_.php', + 'PhpParser\\Node\\Stmt\\Else_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Else_.php', + 'PhpParser\\Node\\Stmt\\Finally_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Finally_.php', + 'PhpParser\\Node\\Stmt\\For_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/For_.php', + 'PhpParser\\Node\\Stmt\\Foreach_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Foreach_.php', + 'PhpParser\\Node\\Stmt\\Function_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php', + 'PhpParser\\Node\\Stmt\\Global_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Global_.php', + 'PhpParser\\Node\\Stmt\\Goto_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Goto_.php', + 'PhpParser\\Node\\Stmt\\GroupUse' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/GroupUse.php', + 'PhpParser\\Node\\Stmt\\HaltCompiler' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/HaltCompiler.php', + 'PhpParser\\Node\\Stmt\\If_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php', + 'PhpParser\\Node\\Stmt\\InlineHTML' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/InlineHTML.php', + 'PhpParser\\Node\\Stmt\\Interface_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php', + 'PhpParser\\Node\\Stmt\\Label' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Label.php', + 'PhpParser\\Node\\Stmt\\Namespace_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php', + 'PhpParser\\Node\\Stmt\\Nop' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Nop.php', + 'PhpParser\\Node\\Stmt\\Property' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Property.php', + 'PhpParser\\Node\\Stmt\\PropertyProperty' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php', + 'PhpParser\\Node\\Stmt\\Return_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Return_.php', + 'PhpParser\\Node\\Stmt\\StaticVar' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php', + 'PhpParser\\Node\\Stmt\\Static_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Static_.php', + 'PhpParser\\Node\\Stmt\\Switch_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php', + 'PhpParser\\Node\\Stmt\\Throw_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Throw_.php', + 'PhpParser\\Node\\Stmt\\TraitUse' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php', + 'PhpParser\\Node\\Stmt\\TraitUseAdaptation' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php', + 'PhpParser\\Node\\Stmt\\TraitUseAdaptation\\Alias' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php', + 'PhpParser\\Node\\Stmt\\TraitUseAdaptation\\Precedence' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php', + 'PhpParser\\Node\\Stmt\\Trait_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php', + 'PhpParser\\Node\\Stmt\\TryCatch' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php', + 'PhpParser\\Node\\Stmt\\Unset_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php', + 'PhpParser\\Node\\Stmt\\UseUse' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/UseUse.php', + 'PhpParser\\Node\\Stmt\\Use_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Use_.php', + 'PhpParser\\Node\\Stmt\\While_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php', + 'PhpParser\\Parser' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Parser.php', + 'PhpParser\\ParserAbstract' => $vendorDir . '/nikic/php-parser/lib/PhpParser/ParserAbstract.php', + 'PhpParser\\ParserFactory' => $vendorDir . '/nikic/php-parser/lib/PhpParser/ParserFactory.php', + 'PhpParser\\Parser\\Multiple' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Parser/Multiple.php', + 'PhpParser\\Parser\\Php5' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Parser/Php5.php', + 'PhpParser\\Parser\\Php7' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Parser/Php7.php', + 'PhpParser\\Parser\\Tokens' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Parser/Tokens.php', + 'PhpParser\\PrettyPrinterAbstract' => $vendorDir . '/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php', + 'PhpParser\\PrettyPrinter\\Standard' => $vendorDir . '/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php', + 'PhpParser\\Serializer' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Serializer.php', + 'PhpParser\\Serializer\\XML' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Serializer/XML.php', + 'PhpParser\\Unserializer' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Unserializer.php', + 'PhpParser\\Unserializer\\XML' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Unserializer/XML.php', + 'Prophecy\\Argument' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Argument.php', + 'Prophecy\\Argument\\ArgumentsWildcard' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Argument/ArgumentsWildcard.php', + 'Prophecy\\Argument\\Token\\AnyValueToken' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Argument/Token/AnyValueToken.php', + 'Prophecy\\Argument\\Token\\AnyValuesToken' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Argument/Token/AnyValuesToken.php', + 'Prophecy\\Argument\\Token\\ApproximateValueToken' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Argument/Token/ApproximateValueToken.php', + 'Prophecy\\Argument\\Token\\ArrayCountToken' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayCountToken.php', + 'Prophecy\\Argument\\Token\\ArrayEntryToken' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayEntryToken.php', + 'Prophecy\\Argument\\Token\\ArrayEveryEntryToken' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayEveryEntryToken.php', + 'Prophecy\\Argument\\Token\\CallbackToken' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Argument/Token/CallbackToken.php', + 'Prophecy\\Argument\\Token\\ExactValueToken' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Argument/Token/ExactValueToken.php', + 'Prophecy\\Argument\\Token\\IdenticalValueToken' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Argument/Token/IdenticalValueToken.php', + 'Prophecy\\Argument\\Token\\LogicalAndToken' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Argument/Token/LogicalAndToken.php', + 'Prophecy\\Argument\\Token\\LogicalNotToken' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Argument/Token/LogicalNotToken.php', + 'Prophecy\\Argument\\Token\\ObjectStateToken' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Argument/Token/ObjectStateToken.php', + 'Prophecy\\Argument\\Token\\StringContainsToken' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Argument/Token/StringContainsToken.php', + 'Prophecy\\Argument\\Token\\TokenInterface' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Argument/Token/TokenInterface.php', + 'Prophecy\\Argument\\Token\\TypeToken' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Argument/Token/TypeToken.php', + 'Prophecy\\Call\\Call' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Call/Call.php', + 'Prophecy\\Call\\CallCenter' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Call/CallCenter.php', + 'Prophecy\\Comparator\\ClosureComparator' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Comparator/ClosureComparator.php', + 'Prophecy\\Comparator\\Factory' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Comparator/Factory.php', + 'Prophecy\\Comparator\\ProphecyComparator' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Comparator/ProphecyComparator.php', + 'Prophecy\\Doubler\\CachedDoubler' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Doubler/CachedDoubler.php', + 'Prophecy\\Doubler\\ClassPatch\\ClassPatchInterface' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ClassPatchInterface.php', + 'Prophecy\\Doubler\\ClassPatch\\DisableConstructorPatch' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/DisableConstructorPatch.php', + 'Prophecy\\Doubler\\ClassPatch\\HhvmExceptionPatch' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/HhvmExceptionPatch.php', + 'Prophecy\\Doubler\\ClassPatch\\KeywordPatch' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/KeywordPatch.php', + 'Prophecy\\Doubler\\ClassPatch\\MagicCallPatch' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/MagicCallPatch.php', + 'Prophecy\\Doubler\\ClassPatch\\ProphecySubjectPatch' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ProphecySubjectPatch.php', + 'Prophecy\\Doubler\\ClassPatch\\ReflectionClassNewInstancePatch' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ReflectionClassNewInstancePatch.php', + 'Prophecy\\Doubler\\ClassPatch\\SplFileInfoPatch' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/SplFileInfoPatch.php', + 'Prophecy\\Doubler\\ClassPatch\\TraversablePatch' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/TraversablePatch.php', + 'Prophecy\\Doubler\\DoubleInterface' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Doubler/DoubleInterface.php', + 'Prophecy\\Doubler\\Doubler' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Doubler/Doubler.php', + 'Prophecy\\Doubler\\Generator\\ClassCodeGenerator' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassCodeGenerator.php', + 'Prophecy\\Doubler\\Generator\\ClassCreator' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassCreator.php', + 'Prophecy\\Doubler\\Generator\\ClassMirror' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassMirror.php', + 'Prophecy\\Doubler\\Generator\\Node\\ArgumentNode' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ArgumentNode.php', + 'Prophecy\\Doubler\\Generator\\Node\\ClassNode' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ClassNode.php', + 'Prophecy\\Doubler\\Generator\\Node\\MethodNode' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/MethodNode.php', + 'Prophecy\\Doubler\\Generator\\ReflectionInterface' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Doubler/Generator/ReflectionInterface.php', + 'Prophecy\\Doubler\\LazyDouble' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Doubler/LazyDouble.php', + 'Prophecy\\Doubler\\NameGenerator' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Doubler/NameGenerator.php', + 'Prophecy\\Exception\\Call\\UnexpectedCallException' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Exception/Call/UnexpectedCallException.php', + 'Prophecy\\Exception\\Doubler\\ClassCreatorException' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassCreatorException.php', + 'Prophecy\\Exception\\Doubler\\ClassMirrorException' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassMirrorException.php', + 'Prophecy\\Exception\\Doubler\\ClassNotFoundException' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassNotFoundException.php', + 'Prophecy\\Exception\\Doubler\\DoubleException' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Exception/Doubler/DoubleException.php', + 'Prophecy\\Exception\\Doubler\\DoublerException' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Exception/Doubler/DoublerException.php', + 'Prophecy\\Exception\\Doubler\\InterfaceNotFoundException' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Exception/Doubler/InterfaceNotFoundException.php', + 'Prophecy\\Exception\\Doubler\\MethodNotExtendableException' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Exception/Doubler/MethodNotExtendableException.php', + 'Prophecy\\Exception\\Doubler\\MethodNotFoundException' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Exception/Doubler/MethodNotFoundException.php', + 'Prophecy\\Exception\\Doubler\\ReturnByReferenceException' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Exception/Doubler/ReturnByReferenceException.php', + 'Prophecy\\Exception\\Exception' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Exception/Exception.php', + 'Prophecy\\Exception\\InvalidArgumentException' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Exception/InvalidArgumentException.php', + 'Prophecy\\Exception\\Prediction\\AggregateException' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Exception/Prediction/AggregateException.php', + 'Prophecy\\Exception\\Prediction\\FailedPredictionException' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Exception/Prediction/FailedPredictionException.php', + 'Prophecy\\Exception\\Prediction\\NoCallsException' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Exception/Prediction/NoCallsException.php', + 'Prophecy\\Exception\\Prediction\\PredictionException' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Exception/Prediction/PredictionException.php', + 'Prophecy\\Exception\\Prediction\\UnexpectedCallsCountException' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Exception/Prediction/UnexpectedCallsCountException.php', + 'Prophecy\\Exception\\Prediction\\UnexpectedCallsException' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Exception/Prediction/UnexpectedCallsException.php', + 'Prophecy\\Exception\\Prophecy\\MethodProphecyException' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Exception/Prophecy/MethodProphecyException.php', + 'Prophecy\\Exception\\Prophecy\\ObjectProphecyException' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Exception/Prophecy/ObjectProphecyException.php', + 'Prophecy\\Exception\\Prophecy\\ProphecyException' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Exception/Prophecy/ProphecyException.php', + 'Prophecy\\PhpDocumentor\\ClassAndInterfaceTagRetriever' => $vendorDir . '/phpspec/prophecy/src/Prophecy/PhpDocumentor/ClassAndInterfaceTagRetriever.php', + 'Prophecy\\PhpDocumentor\\ClassTagRetriever' => $vendorDir . '/phpspec/prophecy/src/Prophecy/PhpDocumentor/ClassTagRetriever.php', + 'Prophecy\\PhpDocumentor\\LegacyClassTagRetriever' => $vendorDir . '/phpspec/prophecy/src/Prophecy/PhpDocumentor/LegacyClassTagRetriever.php', + 'Prophecy\\PhpDocumentor\\MethodTagRetrieverInterface' => $vendorDir . '/phpspec/prophecy/src/Prophecy/PhpDocumentor/MethodTagRetrieverInterface.php', + 'Prophecy\\Prediction\\CallPrediction' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Prediction/CallPrediction.php', + 'Prophecy\\Prediction\\CallTimesPrediction' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Prediction/CallTimesPrediction.php', + 'Prophecy\\Prediction\\CallbackPrediction' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Prediction/CallbackPrediction.php', + 'Prophecy\\Prediction\\NoCallsPrediction' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Prediction/NoCallsPrediction.php', + 'Prophecy\\Prediction\\PredictionInterface' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Prediction/PredictionInterface.php', + 'Prophecy\\Promise\\CallbackPromise' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Promise/CallbackPromise.php', + 'Prophecy\\Promise\\PromiseInterface' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Promise/PromiseInterface.php', + 'Prophecy\\Promise\\ReturnArgumentPromise' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Promise/ReturnArgumentPromise.php', + 'Prophecy\\Promise\\ReturnPromise' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Promise/ReturnPromise.php', + 'Prophecy\\Promise\\ThrowPromise' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Promise/ThrowPromise.php', + 'Prophecy\\Prophecy\\MethodProphecy' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Prophecy/MethodProphecy.php', + 'Prophecy\\Prophecy\\ObjectProphecy' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Prophecy/ObjectProphecy.php', + 'Prophecy\\Prophecy\\ProphecyInterface' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Prophecy/ProphecyInterface.php', + 'Prophecy\\Prophecy\\ProphecySubjectInterface' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Prophecy/ProphecySubjectInterface.php', + 'Prophecy\\Prophecy\\Revealer' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Prophecy/Revealer.php', + 'Prophecy\\Prophecy\\RevealerInterface' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Prophecy/RevealerInterface.php', + 'Prophecy\\Prophet' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Prophet.php', + 'Prophecy\\Util\\ExportUtil' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Util/ExportUtil.php', + 'Prophecy\\Util\\StringUtil' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Util/StringUtil.php', + 'Psr\\Log\\AbstractLogger' => $vendorDir . '/psr/log/Psr/Log/AbstractLogger.php', + 'Psr\\Log\\InvalidArgumentException' => $vendorDir . '/psr/log/Psr/Log/InvalidArgumentException.php', + 'Psr\\Log\\LogLevel' => $vendorDir . '/psr/log/Psr/Log/LogLevel.php', + 'Psr\\Log\\LoggerAwareInterface' => $vendorDir . '/psr/log/Psr/Log/LoggerAwareInterface.php', + 'Psr\\Log\\LoggerAwareTrait' => $vendorDir . '/psr/log/Psr/Log/LoggerAwareTrait.php', + 'Psr\\Log\\LoggerInterface' => $vendorDir . '/psr/log/Psr/Log/LoggerInterface.php', + 'Psr\\Log\\LoggerTrait' => $vendorDir . '/psr/log/Psr/Log/LoggerTrait.php', + 'Psr\\Log\\NullLogger' => $vendorDir . '/psr/log/Psr/Log/NullLogger.php', + 'Psr\\Log\\Test\\DummyTest' => $vendorDir . '/psr/log/Psr/Log/Test/LoggerInterfaceTest.php', + 'Psr\\Log\\Test\\LoggerInterfaceTest' => $vendorDir . '/psr/log/Psr/Log/Test/LoggerInterfaceTest.php', + 'Psy\\Autoloader' => $vendorDir . '/psy/psysh/src/Psy/Autoloader.php', + 'Psy\\CodeCleaner' => $vendorDir . '/psy/psysh/src/Psy/CodeCleaner.php', + 'Psy\\CodeCleaner\\AbstractClassPass' => $vendorDir . '/psy/psysh/src/Psy/CodeCleaner/AbstractClassPass.php', + 'Psy\\CodeCleaner\\AssignThisVariablePass' => $vendorDir . '/psy/psysh/src/Psy/CodeCleaner/AssignThisVariablePass.php', + 'Psy\\CodeCleaner\\CallTimePassByReferencePass' => $vendorDir . '/psy/psysh/src/Psy/CodeCleaner/CallTimePassByReferencePass.php', + 'Psy\\CodeCleaner\\CalledClassPass' => $vendorDir . '/psy/psysh/src/Psy/CodeCleaner/CalledClassPass.php', + 'Psy\\CodeCleaner\\CodeCleanerPass' => $vendorDir . '/psy/psysh/src/Psy/CodeCleaner/CodeCleanerPass.php', + 'Psy\\CodeCleaner\\ExitPass' => $vendorDir . '/psy/psysh/src/Psy/CodeCleaner/ExitPass.php', + 'Psy\\CodeCleaner\\FinalClassPass' => $vendorDir . '/psy/psysh/src/Psy/CodeCleaner/FinalClassPass.php', + 'Psy\\CodeCleaner\\FunctionReturnInWriteContextPass' => $vendorDir . '/psy/psysh/src/Psy/CodeCleaner/FunctionReturnInWriteContextPass.php', + 'Psy\\CodeCleaner\\ImplicitReturnPass' => $vendorDir . '/psy/psysh/src/Psy/CodeCleaner/ImplicitReturnPass.php', + 'Psy\\CodeCleaner\\InstanceOfPass' => $vendorDir . '/psy/psysh/src/Psy/CodeCleaner/InstanceOfPass.php', + 'Psy\\CodeCleaner\\LeavePsyshAlonePass' => $vendorDir . '/psy/psysh/src/Psy/CodeCleaner/LeavePsyshAlonePass.php', + 'Psy\\CodeCleaner\\LegacyEmptyPass' => $vendorDir . '/psy/psysh/src/Psy/CodeCleaner/LegacyEmptyPass.php', + 'Psy\\CodeCleaner\\MagicConstantsPass' => $vendorDir . '/psy/psysh/src/Psy/CodeCleaner/MagicConstantsPass.php', + 'Psy\\CodeCleaner\\NamespaceAwarePass' => $vendorDir . '/psy/psysh/src/Psy/CodeCleaner/NamespaceAwarePass.php', + 'Psy\\CodeCleaner\\NamespacePass' => $vendorDir . '/psy/psysh/src/Psy/CodeCleaner/NamespacePass.php', + 'Psy\\CodeCleaner\\PassableByReferencePass' => $vendorDir . '/psy/psysh/src/Psy/CodeCleaner/PassableByReferencePass.php', + 'Psy\\CodeCleaner\\StaticConstructorPass' => $vendorDir . '/psy/psysh/src/Psy/CodeCleaner/StaticConstructorPass.php', + 'Psy\\CodeCleaner\\StrictTypesPass' => $vendorDir . '/psy/psysh/src/Psy/CodeCleaner/StrictTypesPass.php', + 'Psy\\CodeCleaner\\UseStatementPass' => $vendorDir . '/psy/psysh/src/Psy/CodeCleaner/UseStatementPass.php', + 'Psy\\CodeCleaner\\ValidClassNamePass' => $vendorDir . '/psy/psysh/src/Psy/CodeCleaner/ValidClassNamePass.php', + 'Psy\\CodeCleaner\\ValidConstantPass' => $vendorDir . '/psy/psysh/src/Psy/CodeCleaner/ValidConstantPass.php', + 'Psy\\CodeCleaner\\ValidFunctionNamePass' => $vendorDir . '/psy/psysh/src/Psy/CodeCleaner/ValidFunctionNamePass.php', + 'Psy\\Command\\BufferCommand' => $vendorDir . '/psy/psysh/src/Psy/Command/BufferCommand.php', + 'Psy\\Command\\ClearCommand' => $vendorDir . '/psy/psysh/src/Psy/Command/ClearCommand.php', + 'Psy\\Command\\Command' => $vendorDir . '/psy/psysh/src/Psy/Command/Command.php', + 'Psy\\Command\\DocCommand' => $vendorDir . '/psy/psysh/src/Psy/Command/DocCommand.php', + 'Psy\\Command\\DumpCommand' => $vendorDir . '/psy/psysh/src/Psy/Command/DumpCommand.php', + 'Psy\\Command\\ExitCommand' => $vendorDir . '/psy/psysh/src/Psy/Command/ExitCommand.php', + 'Psy\\Command\\HelpCommand' => $vendorDir . '/psy/psysh/src/Psy/Command/HelpCommand.php', + 'Psy\\Command\\HistoryCommand' => $vendorDir . '/psy/psysh/src/Psy/Command/HistoryCommand.php', + 'Psy\\Command\\ListCommand' => $vendorDir . '/psy/psysh/src/Psy/Command/ListCommand.php', + 'Psy\\Command\\ListCommand\\ClassConstantEnumerator' => $vendorDir . '/psy/psysh/src/Psy/Command/ListCommand/ClassConstantEnumerator.php', + 'Psy\\Command\\ListCommand\\ClassEnumerator' => $vendorDir . '/psy/psysh/src/Psy/Command/ListCommand/ClassEnumerator.php', + 'Psy\\Command\\ListCommand\\ConstantEnumerator' => $vendorDir . '/psy/psysh/src/Psy/Command/ListCommand/ConstantEnumerator.php', + 'Psy\\Command\\ListCommand\\Enumerator' => $vendorDir . '/psy/psysh/src/Psy/Command/ListCommand/Enumerator.php', + 'Psy\\Command\\ListCommand\\FunctionEnumerator' => $vendorDir . '/psy/psysh/src/Psy/Command/ListCommand/FunctionEnumerator.php', + 'Psy\\Command\\ListCommand\\GlobalVariableEnumerator' => $vendorDir . '/psy/psysh/src/Psy/Command/ListCommand/GlobalVariableEnumerator.php', + 'Psy\\Command\\ListCommand\\InterfaceEnumerator' => $vendorDir . '/psy/psysh/src/Psy/Command/ListCommand/InterfaceEnumerator.php', + 'Psy\\Command\\ListCommand\\MethodEnumerator' => $vendorDir . '/psy/psysh/src/Psy/Command/ListCommand/MethodEnumerator.php', + 'Psy\\Command\\ListCommand\\PropertyEnumerator' => $vendorDir . '/psy/psysh/src/Psy/Command/ListCommand/PropertyEnumerator.php', + 'Psy\\Command\\ListCommand\\TraitEnumerator' => $vendorDir . '/psy/psysh/src/Psy/Command/ListCommand/TraitEnumerator.php', + 'Psy\\Command\\ListCommand\\VariableEnumerator' => $vendorDir . '/psy/psysh/src/Psy/Command/ListCommand/VariableEnumerator.php', + 'Psy\\Command\\ParseCommand' => $vendorDir . '/psy/psysh/src/Psy/Command/ParseCommand.php', + 'Psy\\Command\\PsyVersionCommand' => $vendorDir . '/psy/psysh/src/Psy/Command/PsyVersionCommand.php', + 'Psy\\Command\\ReflectingCommand' => $vendorDir . '/psy/psysh/src/Psy/Command/ReflectingCommand.php', + 'Psy\\Command\\ShowCommand' => $vendorDir . '/psy/psysh/src/Psy/Command/ShowCommand.php', + 'Psy\\Command\\ThrowUpCommand' => $vendorDir . '/psy/psysh/src/Psy/Command/ThrowUpCommand.php', + 'Psy\\Command\\TraceCommand' => $vendorDir . '/psy/psysh/src/Psy/Command/TraceCommand.php', + 'Psy\\Command\\WhereamiCommand' => $vendorDir . '/psy/psysh/src/Psy/Command/WhereamiCommand.php', + 'Psy\\Command\\WtfCommand' => $vendorDir . '/psy/psysh/src/Psy/Command/WtfCommand.php', + 'Psy\\Compiler' => $vendorDir . '/psy/psysh/src/Psy/Compiler.php', + 'Psy\\ConfigPaths' => $vendorDir . '/psy/psysh/src/Psy/ConfigPaths.php', + 'Psy\\Configuration' => $vendorDir . '/psy/psysh/src/Psy/Configuration.php', + 'Psy\\ConsoleColorFactory' => $vendorDir . '/psy/psysh/src/Psy/ConsoleColorFactory.php', + 'Psy\\Context' => $vendorDir . '/psy/psysh/src/Psy/Context.php', + 'Psy\\ContextAware' => $vendorDir . '/psy/psysh/src/Psy/ContextAware.php', + 'Psy\\Exception\\BreakException' => $vendorDir . '/psy/psysh/src/Psy/Exception/BreakException.php', + 'Psy\\Exception\\DeprecatedException' => $vendorDir . '/psy/psysh/src/Psy/Exception/DeprecatedException.php', + 'Psy\\Exception\\ErrorException' => $vendorDir . '/psy/psysh/src/Psy/Exception/ErrorException.php', + 'Psy\\Exception\\Exception' => $vendorDir . '/psy/psysh/src/Psy/Exception/Exception.php', + 'Psy\\Exception\\FatalErrorException' => $vendorDir . '/psy/psysh/src/Psy/Exception/FatalErrorException.php', + 'Psy\\Exception\\ParseErrorException' => $vendorDir . '/psy/psysh/src/Psy/Exception/ParseErrorException.php', + 'Psy\\Exception\\RuntimeException' => $vendorDir . '/psy/psysh/src/Psy/Exception/RuntimeException.php', + 'Psy\\Exception\\ThrowUpException' => $vendorDir . '/psy/psysh/src/Psy/Exception/ThrowUpException.php', + 'Psy\\Exception\\TypeErrorException' => $vendorDir . '/psy/psysh/src/Psy/Exception/TypeErrorException.php', + 'Psy\\ExecutionLoop\\ForkingLoop' => $vendorDir . '/psy/psysh/src/Psy/ExecutionLoop/ForkingLoop.php', + 'Psy\\ExecutionLoop\\Loop' => $vendorDir . '/psy/psysh/src/Psy/ExecutionLoop/Loop.php', + 'Psy\\Formatter\\CodeFormatter' => $vendorDir . '/psy/psysh/src/Psy/Formatter/CodeFormatter.php', + 'Psy\\Formatter\\DocblockFormatter' => $vendorDir . '/psy/psysh/src/Psy/Formatter/DocblockFormatter.php', + 'Psy\\Formatter\\Formatter' => $vendorDir . '/psy/psysh/src/Psy/Formatter/Formatter.php', + 'Psy\\Formatter\\SignatureFormatter' => $vendorDir . '/psy/psysh/src/Psy/Formatter/SignatureFormatter.php', + 'Psy\\Output\\OutputPager' => $vendorDir . '/psy/psysh/src/Psy/Output/OutputPager.php', + 'Psy\\Output\\PassthruPager' => $vendorDir . '/psy/psysh/src/Psy/Output/PassthruPager.php', + 'Psy\\Output\\ProcOutputPager' => $vendorDir . '/psy/psysh/src/Psy/Output/ProcOutputPager.php', + 'Psy\\Output\\ShellOutput' => $vendorDir . '/psy/psysh/src/Psy/Output/ShellOutput.php', + 'Psy\\ParserFactory' => $vendorDir . '/psy/psysh/src/Psy/ParserFactory.php', + 'Psy\\Readline\\GNUReadline' => $vendorDir . '/psy/psysh/src/Psy/Readline/GNUReadline.php', + 'Psy\\Readline\\HoaConsole' => $vendorDir . '/psy/psysh/src/Psy/Readline/HoaConsole.php', + 'Psy\\Readline\\Libedit' => $vendorDir . '/psy/psysh/src/Psy/Readline/Libedit.php', + 'Psy\\Readline\\Readline' => $vendorDir . '/psy/psysh/src/Psy/Readline/Readline.php', + 'Psy\\Readline\\Transient' => $vendorDir . '/psy/psysh/src/Psy/Readline/Transient.php', + 'Psy\\Reflection\\ReflectionConstant' => $vendorDir . '/psy/psysh/src/Psy/Reflection/ReflectionConstant.php', + 'Psy\\Reflection\\ReflectionLanguageConstruct' => $vendorDir . '/psy/psysh/src/Psy/Reflection/ReflectionLanguageConstruct.php', + 'Psy\\Reflection\\ReflectionLanguageConstructParameter' => $vendorDir . '/psy/psysh/src/Psy/Reflection/ReflectionLanguageConstructParameter.php', + 'Psy\\Shell' => $vendorDir . '/psy/psysh/src/Psy/Shell.php', + 'Psy\\TabCompletion\\AutoCompleter' => $vendorDir . '/psy/psysh/src/Psy/TabCompletion/AutoCompleter.php', + 'Psy\\TabCompletion\\Matcher\\AbstractContextAwareMatcher' => $vendorDir . '/psy/psysh/src/Psy/TabCompletion/Matcher/AbstractContextAwareMatcher.php', + 'Psy\\TabCompletion\\Matcher\\AbstractMatcher' => $vendorDir . '/psy/psysh/src/Psy/TabCompletion/Matcher/AbstractMatcher.php', + 'Psy\\TabCompletion\\Matcher\\ClassAttributesMatcher' => $vendorDir . '/psy/psysh/src/Psy/TabCompletion/Matcher/ClassAttributesMatcher.php', + 'Psy\\TabCompletion\\Matcher\\ClassMethodsMatcher' => $vendorDir . '/psy/psysh/src/Psy/TabCompletion/Matcher/ClassMethodsMatcher.php', + 'Psy\\TabCompletion\\Matcher\\ClassNamesMatcher' => $vendorDir . '/psy/psysh/src/Psy/TabCompletion/Matcher/ClassNamesMatcher.php', + 'Psy\\TabCompletion\\Matcher\\CommandsMatcher' => $vendorDir . '/psy/psysh/src/Psy/TabCompletion/Matcher/CommandsMatcher.php', + 'Psy\\TabCompletion\\Matcher\\ConstantsMatcher' => $vendorDir . '/psy/psysh/src/Psy/TabCompletion/Matcher/ConstantsMatcher.php', + 'Psy\\TabCompletion\\Matcher\\FunctionsMatcher' => $vendorDir . '/psy/psysh/src/Psy/TabCompletion/Matcher/FunctionsMatcher.php', + 'Psy\\TabCompletion\\Matcher\\KeywordsMatcher' => $vendorDir . '/psy/psysh/src/Psy/TabCompletion/Matcher/KeywordsMatcher.php', + 'Psy\\TabCompletion\\Matcher\\MongoClientMatcher' => $vendorDir . '/psy/psysh/src/Psy/TabCompletion/Matcher/MongoClientMatcher.php', + 'Psy\\TabCompletion\\Matcher\\MongoDatabaseMatcher' => $vendorDir . '/psy/psysh/src/Psy/TabCompletion/Matcher/MongoDatabaseMatcher.php', + 'Psy\\TabCompletion\\Matcher\\ObjectAttributesMatcher' => $vendorDir . '/psy/psysh/src/Psy/TabCompletion/Matcher/ObjectAttributesMatcher.php', + 'Psy\\TabCompletion\\Matcher\\ObjectMethodsMatcher' => $vendorDir . '/psy/psysh/src/Psy/TabCompletion/Matcher/ObjectMethodsMatcher.php', + 'Psy\\TabCompletion\\Matcher\\VariablesMatcher' => $vendorDir . '/psy/psysh/src/Psy/TabCompletion/Matcher/VariablesMatcher.php', + 'Psy\\Util\\Docblock' => $vendorDir . '/psy/psysh/src/Psy/Util/Docblock.php', + 'Psy\\Util\\Json' => $vendorDir . '/psy/psysh/src/Psy/Util/Json.php', + 'Psy\\Util\\Mirror' => $vendorDir . '/psy/psysh/src/Psy/Util/Mirror.php', + 'Psy\\Util\\Str' => $vendorDir . '/psy/psysh/src/Psy/Util/Str.php', + 'Psy\\VarDumper\\Cloner' => $vendorDir . '/psy/psysh/src/Psy/VarDumper/Cloner.php', + 'Psy\\VarDumper\\Dumper' => $vendorDir . '/psy/psysh/src/Psy/VarDumper/Dumper.php', + 'Psy\\VarDumper\\Presenter' => $vendorDir . '/psy/psysh/src/Psy/VarDumper/Presenter.php', + 'Psy\\VarDumper\\PresenterAware' => $vendorDir . '/psy/psysh/src/Psy/VarDumper/PresenterAware.php', + 'Psy\\VersionUpdater\\Checker' => $vendorDir . '/psy/psysh/src/Psy/VersionUpdater/Checker.php', + 'Psy\\VersionUpdater\\GitHubChecker' => $vendorDir . '/psy/psysh/src/Psy/VersionUpdater/GitHubChecker.php', + 'Psy\\VersionUpdater\\IntervalChecker' => $vendorDir . '/psy/psysh/src/Psy/VersionUpdater/IntervalChecker.php', + 'Psy\\VersionUpdater\\NoopChecker' => $vendorDir . '/psy/psysh/src/Psy/VersionUpdater/NoopChecker.php', + 'Ramsey\\Uuid\\BinaryUtils' => $vendorDir . '/ramsey/uuid/src/BinaryUtils.php', + 'Ramsey\\Uuid\\Builder\\DefaultUuidBuilder' => $vendorDir . '/ramsey/uuid/src/Builder/DefaultUuidBuilder.php', + 'Ramsey\\Uuid\\Builder\\DegradedUuidBuilder' => $vendorDir . '/ramsey/uuid/src/Builder/DegradedUuidBuilder.php', + 'Ramsey\\Uuid\\Builder\\UuidBuilderInterface' => $vendorDir . '/ramsey/uuid/src/Builder/UuidBuilderInterface.php', + 'Ramsey\\Uuid\\Codec\\CodecInterface' => $vendorDir . '/ramsey/uuid/src/Codec/CodecInterface.php', + 'Ramsey\\Uuid\\Codec\\GuidStringCodec' => $vendorDir . '/ramsey/uuid/src/Codec/GuidStringCodec.php', + 'Ramsey\\Uuid\\Codec\\OrderedTimeCodec' => $vendorDir . '/ramsey/uuid/src/Codec/OrderedTimeCodec.php', + 'Ramsey\\Uuid\\Codec\\StringCodec' => $vendorDir . '/ramsey/uuid/src/Codec/StringCodec.php', + 'Ramsey\\Uuid\\Codec\\TimestampFirstCombCodec' => $vendorDir . '/ramsey/uuid/src/Codec/TimestampFirstCombCodec.php', + 'Ramsey\\Uuid\\Codec\\TimestampLastCombCodec' => $vendorDir . '/ramsey/uuid/src/Codec/TimestampLastCombCodec.php', + 'Ramsey\\Uuid\\Converter\\NumberConverterInterface' => $vendorDir . '/ramsey/uuid/src/Converter/NumberConverterInterface.php', + 'Ramsey\\Uuid\\Converter\\Number\\BigNumberConverter' => $vendorDir . '/ramsey/uuid/src/Converter/Number/BigNumberConverter.php', + 'Ramsey\\Uuid\\Converter\\Number\\DegradedNumberConverter' => $vendorDir . '/ramsey/uuid/src/Converter/Number/DegradedNumberConverter.php', + 'Ramsey\\Uuid\\Converter\\TimeConverterInterface' => $vendorDir . '/ramsey/uuid/src/Converter/TimeConverterInterface.php', + 'Ramsey\\Uuid\\Converter\\Time\\BigNumberTimeConverter' => $vendorDir . '/ramsey/uuid/src/Converter/Time/BigNumberTimeConverter.php', + 'Ramsey\\Uuid\\Converter\\Time\\DegradedTimeConverter' => $vendorDir . '/ramsey/uuid/src/Converter/Time/DegradedTimeConverter.php', + 'Ramsey\\Uuid\\Converter\\Time\\PhpTimeConverter' => $vendorDir . '/ramsey/uuid/src/Converter/Time/PhpTimeConverter.php', + 'Ramsey\\Uuid\\DegradedUuid' => $vendorDir . '/ramsey/uuid/src/DegradedUuid.php', + 'Ramsey\\Uuid\\Exception\\InvalidUuidStringException' => $vendorDir . '/ramsey/uuid/src/Exception/InvalidUuidStringException.php', + 'Ramsey\\Uuid\\Exception\\UnsatisfiedDependencyException' => $vendorDir . '/ramsey/uuid/src/Exception/UnsatisfiedDependencyException.php', + 'Ramsey\\Uuid\\Exception\\UnsupportedOperationException' => $vendorDir . '/ramsey/uuid/src/Exception/UnsupportedOperationException.php', + 'Ramsey\\Uuid\\FeatureSet' => $vendorDir . '/ramsey/uuid/src/FeatureSet.php', + 'Ramsey\\Uuid\\Generator\\CombGenerator' => $vendorDir . '/ramsey/uuid/src/Generator/CombGenerator.php', + 'Ramsey\\Uuid\\Generator\\DefaultTimeGenerator' => $vendorDir . '/ramsey/uuid/src/Generator/DefaultTimeGenerator.php', + 'Ramsey\\Uuid\\Generator\\MtRandGenerator' => $vendorDir . '/ramsey/uuid/src/Generator/MtRandGenerator.php', + 'Ramsey\\Uuid\\Generator\\OpenSslGenerator' => $vendorDir . '/ramsey/uuid/src/Generator/OpenSslGenerator.php', + 'Ramsey\\Uuid\\Generator\\PeclUuidRandomGenerator' => $vendorDir . '/ramsey/uuid/src/Generator/PeclUuidRandomGenerator.php', + 'Ramsey\\Uuid\\Generator\\PeclUuidTimeGenerator' => $vendorDir . '/ramsey/uuid/src/Generator/PeclUuidTimeGenerator.php', + 'Ramsey\\Uuid\\Generator\\RandomBytesGenerator' => $vendorDir . '/ramsey/uuid/src/Generator/RandomBytesGenerator.php', + 'Ramsey\\Uuid\\Generator\\RandomGeneratorFactory' => $vendorDir . '/ramsey/uuid/src/Generator/RandomGeneratorFactory.php', + 'Ramsey\\Uuid\\Generator\\RandomGeneratorInterface' => $vendorDir . '/ramsey/uuid/src/Generator/RandomGeneratorInterface.php', + 'Ramsey\\Uuid\\Generator\\RandomLibAdapter' => $vendorDir . '/ramsey/uuid/src/Generator/RandomLibAdapter.php', + 'Ramsey\\Uuid\\Generator\\SodiumRandomGenerator' => $vendorDir . '/ramsey/uuid/src/Generator/SodiumRandomGenerator.php', + 'Ramsey\\Uuid\\Generator\\TimeGeneratorFactory' => $vendorDir . '/ramsey/uuid/src/Generator/TimeGeneratorFactory.php', + 'Ramsey\\Uuid\\Generator\\TimeGeneratorInterface' => $vendorDir . '/ramsey/uuid/src/Generator/TimeGeneratorInterface.php', + 'Ramsey\\Uuid\\Provider\\NodeProviderInterface' => $vendorDir . '/ramsey/uuid/src/Provider/NodeProviderInterface.php', + 'Ramsey\\Uuid\\Provider\\Node\\FallbackNodeProvider' => $vendorDir . '/ramsey/uuid/src/Provider/Node/FallbackNodeProvider.php', + 'Ramsey\\Uuid\\Provider\\Node\\RandomNodeProvider' => $vendorDir . '/ramsey/uuid/src/Provider/Node/RandomNodeProvider.php', + 'Ramsey\\Uuid\\Provider\\Node\\SystemNodeProvider' => $vendorDir . '/ramsey/uuid/src/Provider/Node/SystemNodeProvider.php', + 'Ramsey\\Uuid\\Provider\\TimeProviderInterface' => $vendorDir . '/ramsey/uuid/src/Provider/TimeProviderInterface.php', + 'Ramsey\\Uuid\\Provider\\Time\\FixedTimeProvider' => $vendorDir . '/ramsey/uuid/src/Provider/Time/FixedTimeProvider.php', + 'Ramsey\\Uuid\\Provider\\Time\\SystemTimeProvider' => $vendorDir . '/ramsey/uuid/src/Provider/Time/SystemTimeProvider.php', + 'Ramsey\\Uuid\\Uuid' => $vendorDir . '/ramsey/uuid/src/Uuid.php', + 'Ramsey\\Uuid\\UuidFactory' => $vendorDir . '/ramsey/uuid/src/UuidFactory.php', + 'Ramsey\\Uuid\\UuidFactoryInterface' => $vendorDir . '/ramsey/uuid/src/UuidFactoryInterface.php', + 'Ramsey\\Uuid\\UuidInterface' => $vendorDir . '/ramsey/uuid/src/UuidInterface.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', + 'SebastianBergmann\\CodeCoverage\\Driver\\HHVM' => $vendorDir . '/phpunit/php-code-coverage/src/Driver/HHVM.php', + 'SebastianBergmann\\CodeCoverage\\Driver\\PHPDBG' => $vendorDir . '/phpunit/php-code-coverage/src/Driver/PHPDBG.php', + 'SebastianBergmann\\CodeCoverage\\Driver\\Xdebug' => $vendorDir . '/phpunit/php-code-coverage/src/Driver/Xdebug.php', + 'SebastianBergmann\\CodeCoverage\\Exception' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/Exception.php', + 'SebastianBergmann\\CodeCoverage\\Filter' => $vendorDir . '/phpunit/php-code-coverage/src/Filter.php', + 'SebastianBergmann\\CodeCoverage\\InvalidArgumentException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/InvalidArgumentException.php', + 'SebastianBergmann\\CodeCoverage\\MissingCoversAnnotationException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/MissingCoversAnnotationException.php', + 'SebastianBergmann\\CodeCoverage\\Node\\AbstractNode' => $vendorDir . '/phpunit/php-code-coverage/src/Node/AbstractNode.php', + 'SebastianBergmann\\CodeCoverage\\Node\\Builder' => $vendorDir . '/phpunit/php-code-coverage/src/Node/Builder.php', + 'SebastianBergmann\\CodeCoverage\\Node\\Directory' => $vendorDir . '/phpunit/php-code-coverage/src/Node/Directory.php', + 'SebastianBergmann\\CodeCoverage\\Node\\File' => $vendorDir . '/phpunit/php-code-coverage/src/Node/File.php', + 'SebastianBergmann\\CodeCoverage\\Node\\Iterator' => $vendorDir . '/phpunit/php-code-coverage/src/Node/Iterator.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Clover' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Clover.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Crap4j' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Crap4j.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Html\\Dashboard' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Html/Renderer/Dashboard.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Html\\Directory' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Html/Renderer/Directory.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Html\\Facade' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Html/Facade.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Html\\File' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Html/Renderer/File.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Html\\Renderer' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Html/Renderer.php', + 'SebastianBergmann\\CodeCoverage\\Report\\PHP' => $vendorDir . '/phpunit/php-code-coverage/src/Report/PHP.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Text' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Text.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Coverage' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Coverage.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Directory' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Directory.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Facade' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Facade.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\File' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/File.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Method' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Method.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Node' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Node.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Project' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Project.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Report' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Report.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Tests' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Tests.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Totals' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Totals.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Unit' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Unit.php', + 'SebastianBergmann\\CodeCoverage\\RuntimeException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/RuntimeException.php', + 'SebastianBergmann\\CodeCoverage\\UnintentionallyCoveredCodeException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/UnintentionallyCoveredCodeException.php', + 'SebastianBergmann\\CodeCoverage\\Util' => $vendorDir . '/phpunit/php-code-coverage/src/Util.php', + 'SebastianBergmann\\CodeUnitReverseLookup\\Wizard' => $vendorDir . '/sebastian/code-unit-reverse-lookup/src/Wizard.php', + 'SebastianBergmann\\Comparator\\ArrayComparator' => $vendorDir . '/sebastian/comparator/src/ArrayComparator.php', + 'SebastianBergmann\\Comparator\\Comparator' => $vendorDir . '/sebastian/comparator/src/Comparator.php', + 'SebastianBergmann\\Comparator\\ComparisonFailure' => $vendorDir . '/sebastian/comparator/src/ComparisonFailure.php', + 'SebastianBergmann\\Comparator\\DOMNodeComparator' => $vendorDir . '/sebastian/comparator/src/DOMNodeComparator.php', + 'SebastianBergmann\\Comparator\\DateTimeComparator' => $vendorDir . '/sebastian/comparator/src/DateTimeComparator.php', + 'SebastianBergmann\\Comparator\\DoubleComparator' => $vendorDir . '/sebastian/comparator/src/DoubleComparator.php', + 'SebastianBergmann\\Comparator\\ExceptionComparator' => $vendorDir . '/sebastian/comparator/src/ExceptionComparator.php', + 'SebastianBergmann\\Comparator\\Factory' => $vendorDir . '/sebastian/comparator/src/Factory.php', + 'SebastianBergmann\\Comparator\\MockObjectComparator' => $vendorDir . '/sebastian/comparator/src/MockObjectComparator.php', + 'SebastianBergmann\\Comparator\\NumericComparator' => $vendorDir . '/sebastian/comparator/src/NumericComparator.php', + 'SebastianBergmann\\Comparator\\ObjectComparator' => $vendorDir . '/sebastian/comparator/src/ObjectComparator.php', + 'SebastianBergmann\\Comparator\\ResourceComparator' => $vendorDir . '/sebastian/comparator/src/ResourceComparator.php', + 'SebastianBergmann\\Comparator\\ScalarComparator' => $vendorDir . '/sebastian/comparator/src/ScalarComparator.php', + 'SebastianBergmann\\Comparator\\SplObjectStorageComparator' => $vendorDir . '/sebastian/comparator/src/SplObjectStorageComparator.php', + 'SebastianBergmann\\Comparator\\TypeComparator' => $vendorDir . '/sebastian/comparator/src/TypeComparator.php', + 'SebastianBergmann\\Diff\\Chunk' => $vendorDir . '/sebastian/diff/src/Chunk.php', + 'SebastianBergmann\\Diff\\Diff' => $vendorDir . '/sebastian/diff/src/Diff.php', + 'SebastianBergmann\\Diff\\Differ' => $vendorDir . '/sebastian/diff/src/Differ.php', + 'SebastianBergmann\\Diff\\LCS\\LongestCommonSubsequence' => $vendorDir . '/sebastian/diff/src/LCS/LongestCommonSubsequence.php', + 'SebastianBergmann\\Diff\\LCS\\MemoryEfficientImplementation' => $vendorDir . '/sebastian/diff/src/LCS/MemoryEfficientLongestCommonSubsequenceImplementation.php', + 'SebastianBergmann\\Diff\\LCS\\TimeEfficientImplementation' => $vendorDir . '/sebastian/diff/src/LCS/TimeEfficientLongestCommonSubsequenceImplementation.php', + 'SebastianBergmann\\Diff\\Line' => $vendorDir . '/sebastian/diff/src/Line.php', + 'SebastianBergmann\\Diff\\Parser' => $vendorDir . '/sebastian/diff/src/Parser.php', + 'SebastianBergmann\\Environment\\Console' => $vendorDir . '/sebastian/environment/src/Console.php', + 'SebastianBergmann\\Environment\\Runtime' => $vendorDir . '/sebastian/environment/src/Runtime.php', + 'SebastianBergmann\\Exporter\\Exporter' => $vendorDir . '/sebastian/exporter/src/Exporter.php', + 'SebastianBergmann\\GlobalState\\Blacklist' => $vendorDir . '/sebastian/global-state/src/Blacklist.php', + 'SebastianBergmann\\GlobalState\\CodeExporter' => $vendorDir . '/sebastian/global-state/src/CodeExporter.php', + 'SebastianBergmann\\GlobalState\\Exception' => $vendorDir . '/sebastian/global-state/src/Exception.php', + 'SebastianBergmann\\GlobalState\\Restorer' => $vendorDir . '/sebastian/global-state/src/Restorer.php', + 'SebastianBergmann\\GlobalState\\RuntimeException' => $vendorDir . '/sebastian/global-state/src/RuntimeException.php', + 'SebastianBergmann\\GlobalState\\Snapshot' => $vendorDir . '/sebastian/global-state/src/Snapshot.php', + 'SebastianBergmann\\ObjectEnumerator\\Enumerator' => $vendorDir . '/sebastian/object-enumerator/src/Enumerator.php', + 'SebastianBergmann\\ObjectEnumerator\\Exception' => $vendorDir . '/sebastian/object-enumerator/src/Exception.php', + 'SebastianBergmann\\ObjectEnumerator\\InvalidArgumentException' => $vendorDir . '/sebastian/object-enumerator/src/InvalidArgumentException.php', + 'SebastianBergmann\\RecursionContext\\Context' => $vendorDir . '/sebastian/recursion-context/src/Context.php', + 'SebastianBergmann\\RecursionContext\\Exception' => $vendorDir . '/sebastian/recursion-context/src/Exception.php', + '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', + 'Symfony\\Component\\Console\\Application' => $vendorDir . '/symfony/console/Application.php', + 'Symfony\\Component\\Console\\Command\\Command' => $vendorDir . '/symfony/console/Command/Command.php', + 'Symfony\\Component\\Console\\Command\\HelpCommand' => $vendorDir . '/symfony/console/Command/HelpCommand.php', + 'Symfony\\Component\\Console\\Command\\ListCommand' => $vendorDir . '/symfony/console/Command/ListCommand.php', + 'Symfony\\Component\\Console\\Command\\LockableTrait' => $vendorDir . '/symfony/console/Command/LockableTrait.php', + 'Symfony\\Component\\Console\\ConsoleEvents' => $vendorDir . '/symfony/console/ConsoleEvents.php', + 'Symfony\\Component\\Console\\Descriptor\\ApplicationDescription' => $vendorDir . '/symfony/console/Descriptor/ApplicationDescription.php', + 'Symfony\\Component\\Console\\Descriptor\\Descriptor' => $vendorDir . '/symfony/console/Descriptor/Descriptor.php', + 'Symfony\\Component\\Console\\Descriptor\\DescriptorInterface' => $vendorDir . '/symfony/console/Descriptor/DescriptorInterface.php', + 'Symfony\\Component\\Console\\Descriptor\\JsonDescriptor' => $vendorDir . '/symfony/console/Descriptor/JsonDescriptor.php', + 'Symfony\\Component\\Console\\Descriptor\\MarkdownDescriptor' => $vendorDir . '/symfony/console/Descriptor/MarkdownDescriptor.php', + 'Symfony\\Component\\Console\\Descriptor\\TextDescriptor' => $vendorDir . '/symfony/console/Descriptor/TextDescriptor.php', + 'Symfony\\Component\\Console\\Descriptor\\XmlDescriptor' => $vendorDir . '/symfony/console/Descriptor/XmlDescriptor.php', + 'Symfony\\Component\\Console\\Event\\ConsoleCommandEvent' => $vendorDir . '/symfony/console/Event/ConsoleCommandEvent.php', + 'Symfony\\Component\\Console\\Event\\ConsoleEvent' => $vendorDir . '/symfony/console/Event/ConsoleEvent.php', + 'Symfony\\Component\\Console\\Event\\ConsoleExceptionEvent' => $vendorDir . '/symfony/console/Event/ConsoleExceptionEvent.php', + 'Symfony\\Component\\Console\\Event\\ConsoleTerminateEvent' => $vendorDir . '/symfony/console/Event/ConsoleTerminateEvent.php', + 'Symfony\\Component\\Console\\Exception\\CommandNotFoundException' => $vendorDir . '/symfony/console/Exception/CommandNotFoundException.php', + 'Symfony\\Component\\Console\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/console/Exception/ExceptionInterface.php', + 'Symfony\\Component\\Console\\Exception\\InvalidArgumentException' => $vendorDir . '/symfony/console/Exception/InvalidArgumentException.php', + 'Symfony\\Component\\Console\\Exception\\InvalidOptionException' => $vendorDir . '/symfony/console/Exception/InvalidOptionException.php', + 'Symfony\\Component\\Console\\Exception\\LogicException' => $vendorDir . '/symfony/console/Exception/LogicException.php', + 'Symfony\\Component\\Console\\Exception\\RuntimeException' => $vendorDir . '/symfony/console/Exception/RuntimeException.php', + 'Symfony\\Component\\Console\\Formatter\\OutputFormatter' => $vendorDir . '/symfony/console/Formatter/OutputFormatter.php', + 'Symfony\\Component\\Console\\Formatter\\OutputFormatterInterface' => $vendorDir . '/symfony/console/Formatter/OutputFormatterInterface.php', + 'Symfony\\Component\\Console\\Formatter\\OutputFormatterStyle' => $vendorDir . '/symfony/console/Formatter/OutputFormatterStyle.php', + 'Symfony\\Component\\Console\\Formatter\\OutputFormatterStyleInterface' => $vendorDir . '/symfony/console/Formatter/OutputFormatterStyleInterface.php', + 'Symfony\\Component\\Console\\Formatter\\OutputFormatterStyleStack' => $vendorDir . '/symfony/console/Formatter/OutputFormatterStyleStack.php', + 'Symfony\\Component\\Console\\Helper\\DebugFormatterHelper' => $vendorDir . '/symfony/console/Helper/DebugFormatterHelper.php', + 'Symfony\\Component\\Console\\Helper\\DescriptorHelper' => $vendorDir . '/symfony/console/Helper/DescriptorHelper.php', + 'Symfony\\Component\\Console\\Helper\\FormatterHelper' => $vendorDir . '/symfony/console/Helper/FormatterHelper.php', + 'Symfony\\Component\\Console\\Helper\\Helper' => $vendorDir . '/symfony/console/Helper/Helper.php', + 'Symfony\\Component\\Console\\Helper\\HelperInterface' => $vendorDir . '/symfony/console/Helper/HelperInterface.php', + 'Symfony\\Component\\Console\\Helper\\HelperSet' => $vendorDir . '/symfony/console/Helper/HelperSet.php', + 'Symfony\\Component\\Console\\Helper\\InputAwareHelper' => $vendorDir . '/symfony/console/Helper/InputAwareHelper.php', + 'Symfony\\Component\\Console\\Helper\\ProcessHelper' => $vendorDir . '/symfony/console/Helper/ProcessHelper.php', + 'Symfony\\Component\\Console\\Helper\\ProgressBar' => $vendorDir . '/symfony/console/Helper/ProgressBar.php', + 'Symfony\\Component\\Console\\Helper\\ProgressIndicator' => $vendorDir . '/symfony/console/Helper/ProgressIndicator.php', + 'Symfony\\Component\\Console\\Helper\\QuestionHelper' => $vendorDir . '/symfony/console/Helper/QuestionHelper.php', + 'Symfony\\Component\\Console\\Helper\\SymfonyQuestionHelper' => $vendorDir . '/symfony/console/Helper/SymfonyQuestionHelper.php', + 'Symfony\\Component\\Console\\Helper\\Table' => $vendorDir . '/symfony/console/Helper/Table.php', + 'Symfony\\Component\\Console\\Helper\\TableCell' => $vendorDir . '/symfony/console/Helper/TableCell.php', + 'Symfony\\Component\\Console\\Helper\\TableSeparator' => $vendorDir . '/symfony/console/Helper/TableSeparator.php', + 'Symfony\\Component\\Console\\Helper\\TableStyle' => $vendorDir . '/symfony/console/Helper/TableStyle.php', + 'Symfony\\Component\\Console\\Input\\ArgvInput' => $vendorDir . '/symfony/console/Input/ArgvInput.php', + 'Symfony\\Component\\Console\\Input\\ArrayInput' => $vendorDir . '/symfony/console/Input/ArrayInput.php', + 'Symfony\\Component\\Console\\Input\\Input' => $vendorDir . '/symfony/console/Input/Input.php', + 'Symfony\\Component\\Console\\Input\\InputArgument' => $vendorDir . '/symfony/console/Input/InputArgument.php', + 'Symfony\\Component\\Console\\Input\\InputAwareInterface' => $vendorDir . '/symfony/console/Input/InputAwareInterface.php', + 'Symfony\\Component\\Console\\Input\\InputDefinition' => $vendorDir . '/symfony/console/Input/InputDefinition.php', + 'Symfony\\Component\\Console\\Input\\InputInterface' => $vendorDir . '/symfony/console/Input/InputInterface.php', + 'Symfony\\Component\\Console\\Input\\InputOption' => $vendorDir . '/symfony/console/Input/InputOption.php', + 'Symfony\\Component\\Console\\Input\\StreamableInputInterface' => $vendorDir . '/symfony/console/Input/StreamableInputInterface.php', + 'Symfony\\Component\\Console\\Input\\StringInput' => $vendorDir . '/symfony/console/Input/StringInput.php', + 'Symfony\\Component\\Console\\Logger\\ConsoleLogger' => $vendorDir . '/symfony/console/Logger/ConsoleLogger.php', + 'Symfony\\Component\\Console\\Output\\BufferedOutput' => $vendorDir . '/symfony/console/Output/BufferedOutput.php', + 'Symfony\\Component\\Console\\Output\\ConsoleOutput' => $vendorDir . '/symfony/console/Output/ConsoleOutput.php', + 'Symfony\\Component\\Console\\Output\\ConsoleOutputInterface' => $vendorDir . '/symfony/console/Output/ConsoleOutputInterface.php', + 'Symfony\\Component\\Console\\Output\\NullOutput' => $vendorDir . '/symfony/console/Output/NullOutput.php', + 'Symfony\\Component\\Console\\Output\\Output' => $vendorDir . '/symfony/console/Output/Output.php', + 'Symfony\\Component\\Console\\Output\\OutputInterface' => $vendorDir . '/symfony/console/Output/OutputInterface.php', + 'Symfony\\Component\\Console\\Output\\StreamOutput' => $vendorDir . '/symfony/console/Output/StreamOutput.php', + 'Symfony\\Component\\Console\\Question\\ChoiceQuestion' => $vendorDir . '/symfony/console/Question/ChoiceQuestion.php', + 'Symfony\\Component\\Console\\Question\\ConfirmationQuestion' => $vendorDir . '/symfony/console/Question/ConfirmationQuestion.php', + 'Symfony\\Component\\Console\\Question\\Question' => $vendorDir . '/symfony/console/Question/Question.php', + 'Symfony\\Component\\Console\\Style\\OutputStyle' => $vendorDir . '/symfony/console/Style/OutputStyle.php', + 'Symfony\\Component\\Console\\Style\\StyleInterface' => $vendorDir . '/symfony/console/Style/StyleInterface.php', + 'Symfony\\Component\\Console\\Style\\SymfonyStyle' => $vendorDir . '/symfony/console/Style/SymfonyStyle.php', + 'Symfony\\Component\\Console\\Terminal' => $vendorDir . '/symfony/console/Terminal.php', + 'Symfony\\Component\\Console\\Tester\\ApplicationTester' => $vendorDir . '/symfony/console/Tester/ApplicationTester.php', + 'Symfony\\Component\\Console\\Tester\\CommandTester' => $vendorDir . '/symfony/console/Tester/CommandTester.php', + 'Symfony\\Component\\CssSelector\\CssSelectorConverter' => $vendorDir . '/symfony/css-selector/CssSelectorConverter.php', + 'Symfony\\Component\\CssSelector\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/css-selector/Exception/ExceptionInterface.php', + 'Symfony\\Component\\CssSelector\\Exception\\ExpressionErrorException' => $vendorDir . '/symfony/css-selector/Exception/ExpressionErrorException.php', + 'Symfony\\Component\\CssSelector\\Exception\\InternalErrorException' => $vendorDir . '/symfony/css-selector/Exception/InternalErrorException.php', + 'Symfony\\Component\\CssSelector\\Exception\\ParseException' => $vendorDir . '/symfony/css-selector/Exception/ParseException.php', + 'Symfony\\Component\\CssSelector\\Exception\\SyntaxErrorException' => $vendorDir . '/symfony/css-selector/Exception/SyntaxErrorException.php', + 'Symfony\\Component\\CssSelector\\Node\\AbstractNode' => $vendorDir . '/symfony/css-selector/Node/AbstractNode.php', + 'Symfony\\Component\\CssSelector\\Node\\AttributeNode' => $vendorDir . '/symfony/css-selector/Node/AttributeNode.php', + 'Symfony\\Component\\CssSelector\\Node\\ClassNode' => $vendorDir . '/symfony/css-selector/Node/ClassNode.php', + 'Symfony\\Component\\CssSelector\\Node\\CombinedSelectorNode' => $vendorDir . '/symfony/css-selector/Node/CombinedSelectorNode.php', + 'Symfony\\Component\\CssSelector\\Node\\ElementNode' => $vendorDir . '/symfony/css-selector/Node/ElementNode.php', + 'Symfony\\Component\\CssSelector\\Node\\FunctionNode' => $vendorDir . '/symfony/css-selector/Node/FunctionNode.php', + 'Symfony\\Component\\CssSelector\\Node\\HashNode' => $vendorDir . '/symfony/css-selector/Node/HashNode.php', + 'Symfony\\Component\\CssSelector\\Node\\NegationNode' => $vendorDir . '/symfony/css-selector/Node/NegationNode.php', + 'Symfony\\Component\\CssSelector\\Node\\NodeInterface' => $vendorDir . '/symfony/css-selector/Node/NodeInterface.php', + 'Symfony\\Component\\CssSelector\\Node\\PseudoNode' => $vendorDir . '/symfony/css-selector/Node/PseudoNode.php', + 'Symfony\\Component\\CssSelector\\Node\\SelectorNode' => $vendorDir . '/symfony/css-selector/Node/SelectorNode.php', + 'Symfony\\Component\\CssSelector\\Node\\Specificity' => $vendorDir . '/symfony/css-selector/Node/Specificity.php', + 'Symfony\\Component\\CssSelector\\Parser\\Handler\\CommentHandler' => $vendorDir . '/symfony/css-selector/Parser/Handler/CommentHandler.php', + 'Symfony\\Component\\CssSelector\\Parser\\Handler\\HandlerInterface' => $vendorDir . '/symfony/css-selector/Parser/Handler/HandlerInterface.php', + 'Symfony\\Component\\CssSelector\\Parser\\Handler\\HashHandler' => $vendorDir . '/symfony/css-selector/Parser/Handler/HashHandler.php', + 'Symfony\\Component\\CssSelector\\Parser\\Handler\\IdentifierHandler' => $vendorDir . '/symfony/css-selector/Parser/Handler/IdentifierHandler.php', + 'Symfony\\Component\\CssSelector\\Parser\\Handler\\NumberHandler' => $vendorDir . '/symfony/css-selector/Parser/Handler/NumberHandler.php', + 'Symfony\\Component\\CssSelector\\Parser\\Handler\\StringHandler' => $vendorDir . '/symfony/css-selector/Parser/Handler/StringHandler.php', + 'Symfony\\Component\\CssSelector\\Parser\\Handler\\WhitespaceHandler' => $vendorDir . '/symfony/css-selector/Parser/Handler/WhitespaceHandler.php', + 'Symfony\\Component\\CssSelector\\Parser\\Parser' => $vendorDir . '/symfony/css-selector/Parser/Parser.php', + 'Symfony\\Component\\CssSelector\\Parser\\ParserInterface' => $vendorDir . '/symfony/css-selector/Parser/ParserInterface.php', + 'Symfony\\Component\\CssSelector\\Parser\\Reader' => $vendorDir . '/symfony/css-selector/Parser/Reader.php', + 'Symfony\\Component\\CssSelector\\Parser\\Shortcut\\ClassParser' => $vendorDir . '/symfony/css-selector/Parser/Shortcut/ClassParser.php', + 'Symfony\\Component\\CssSelector\\Parser\\Shortcut\\ElementParser' => $vendorDir . '/symfony/css-selector/Parser/Shortcut/ElementParser.php', + 'Symfony\\Component\\CssSelector\\Parser\\Shortcut\\EmptyStringParser' => $vendorDir . '/symfony/css-selector/Parser/Shortcut/EmptyStringParser.php', + 'Symfony\\Component\\CssSelector\\Parser\\Shortcut\\HashParser' => $vendorDir . '/symfony/css-selector/Parser/Shortcut/HashParser.php', + 'Symfony\\Component\\CssSelector\\Parser\\Token' => $vendorDir . '/symfony/css-selector/Parser/Token.php', + 'Symfony\\Component\\CssSelector\\Parser\\TokenStream' => $vendorDir . '/symfony/css-selector/Parser/TokenStream.php', + 'Symfony\\Component\\CssSelector\\Parser\\Tokenizer\\Tokenizer' => $vendorDir . '/symfony/css-selector/Parser/Tokenizer/Tokenizer.php', + 'Symfony\\Component\\CssSelector\\Parser\\Tokenizer\\TokenizerEscaping' => $vendorDir . '/symfony/css-selector/Parser/Tokenizer/TokenizerEscaping.php', + 'Symfony\\Component\\CssSelector\\Parser\\Tokenizer\\TokenizerPatterns' => $vendorDir . '/symfony/css-selector/Parser/Tokenizer/TokenizerPatterns.php', + 'Symfony\\Component\\CssSelector\\XPath\\Extension\\AbstractExtension' => $vendorDir . '/symfony/css-selector/XPath/Extension/AbstractExtension.php', + 'Symfony\\Component\\CssSelector\\XPath\\Extension\\AttributeMatchingExtension' => $vendorDir . '/symfony/css-selector/XPath/Extension/AttributeMatchingExtension.php', + 'Symfony\\Component\\CssSelector\\XPath\\Extension\\CombinationExtension' => $vendorDir . '/symfony/css-selector/XPath/Extension/CombinationExtension.php', + 'Symfony\\Component\\CssSelector\\XPath\\Extension\\ExtensionInterface' => $vendorDir . '/symfony/css-selector/XPath/Extension/ExtensionInterface.php', + 'Symfony\\Component\\CssSelector\\XPath\\Extension\\FunctionExtension' => $vendorDir . '/symfony/css-selector/XPath/Extension/FunctionExtension.php', + 'Symfony\\Component\\CssSelector\\XPath\\Extension\\HtmlExtension' => $vendorDir . '/symfony/css-selector/XPath/Extension/HtmlExtension.php', + 'Symfony\\Component\\CssSelector\\XPath\\Extension\\NodeExtension' => $vendorDir . '/symfony/css-selector/XPath/Extension/NodeExtension.php', + 'Symfony\\Component\\CssSelector\\XPath\\Extension\\PseudoClassExtension' => $vendorDir . '/symfony/css-selector/XPath/Extension/PseudoClassExtension.php', + 'Symfony\\Component\\CssSelector\\XPath\\Translator' => $vendorDir . '/symfony/css-selector/XPath/Translator.php', + 'Symfony\\Component\\CssSelector\\XPath\\TranslatorInterface' => $vendorDir . '/symfony/css-selector/XPath/TranslatorInterface.php', + 'Symfony\\Component\\CssSelector\\XPath\\XPathExpr' => $vendorDir . '/symfony/css-selector/XPath/XPathExpr.php', + 'Symfony\\Component\\Debug\\BufferingLogger' => $vendorDir . '/symfony/debug/BufferingLogger.php', + 'Symfony\\Component\\Debug\\Debug' => $vendorDir . '/symfony/debug/Debug.php', + 'Symfony\\Component\\Debug\\DebugClassLoader' => $vendorDir . '/symfony/debug/DebugClassLoader.php', + 'Symfony\\Component\\Debug\\ErrorHandler' => $vendorDir . '/symfony/debug/ErrorHandler.php', + 'Symfony\\Component\\Debug\\ExceptionHandler' => $vendorDir . '/symfony/debug/ExceptionHandler.php', + 'Symfony\\Component\\Debug\\Exception\\ClassNotFoundException' => $vendorDir . '/symfony/debug/Exception/ClassNotFoundException.php', + 'Symfony\\Component\\Debug\\Exception\\ContextErrorException' => $vendorDir . '/symfony/debug/Exception/ContextErrorException.php', + 'Symfony\\Component\\Debug\\Exception\\FatalErrorException' => $vendorDir . '/symfony/debug/Exception/FatalErrorException.php', + 'Symfony\\Component\\Debug\\Exception\\FatalThrowableError' => $vendorDir . '/symfony/debug/Exception/FatalThrowableError.php', + 'Symfony\\Component\\Debug\\Exception\\FlattenException' => $vendorDir . '/symfony/debug/Exception/FlattenException.php', + 'Symfony\\Component\\Debug\\Exception\\OutOfMemoryException' => $vendorDir . '/symfony/debug/Exception/OutOfMemoryException.php', + 'Symfony\\Component\\Debug\\Exception\\SilencedErrorContext' => $vendorDir . '/symfony/debug/Exception/SilencedErrorContext.php', + 'Symfony\\Component\\Debug\\Exception\\UndefinedFunctionException' => $vendorDir . '/symfony/debug/Exception/UndefinedFunctionException.php', + 'Symfony\\Component\\Debug\\Exception\\UndefinedMethodException' => $vendorDir . '/symfony/debug/Exception/UndefinedMethodException.php', + 'Symfony\\Component\\Debug\\FatalErrorHandler\\ClassNotFoundFatalErrorHandler' => $vendorDir . '/symfony/debug/FatalErrorHandler/ClassNotFoundFatalErrorHandler.php', + 'Symfony\\Component\\Debug\\FatalErrorHandler\\FatalErrorHandlerInterface' => $vendorDir . '/symfony/debug/FatalErrorHandler/FatalErrorHandlerInterface.php', + 'Symfony\\Component\\Debug\\FatalErrorHandler\\UndefinedFunctionFatalErrorHandler' => $vendorDir . '/symfony/debug/FatalErrorHandler/UndefinedFunctionFatalErrorHandler.php', + 'Symfony\\Component\\Debug\\FatalErrorHandler\\UndefinedMethodFatalErrorHandler' => $vendorDir . '/symfony/debug/FatalErrorHandler/UndefinedMethodFatalErrorHandler.php', + 'Symfony\\Component\\EventDispatcher\\ContainerAwareEventDispatcher' => $vendorDir . '/symfony/event-dispatcher/ContainerAwareEventDispatcher.php', + 'Symfony\\Component\\EventDispatcher\\Debug\\TraceableEventDispatcher' => $vendorDir . '/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php', + 'Symfony\\Component\\EventDispatcher\\Debug\\TraceableEventDispatcherInterface' => $vendorDir . '/symfony/event-dispatcher/Debug/TraceableEventDispatcherInterface.php', + 'Symfony\\Component\\EventDispatcher\\Debug\\WrappedListener' => $vendorDir . '/symfony/event-dispatcher/Debug/WrappedListener.php', + 'Symfony\\Component\\EventDispatcher\\DependencyInjection\\RegisterListenersPass' => $vendorDir . '/symfony/event-dispatcher/DependencyInjection/RegisterListenersPass.php', + 'Symfony\\Component\\EventDispatcher\\Event' => $vendorDir . '/symfony/event-dispatcher/Event.php', + 'Symfony\\Component\\EventDispatcher\\EventDispatcher' => $vendorDir . '/symfony/event-dispatcher/EventDispatcher.php', + 'Symfony\\Component\\EventDispatcher\\EventDispatcherInterface' => $vendorDir . '/symfony/event-dispatcher/EventDispatcherInterface.php', + 'Symfony\\Component\\EventDispatcher\\EventSubscriberInterface' => $vendorDir . '/symfony/event-dispatcher/EventSubscriberInterface.php', + 'Symfony\\Component\\EventDispatcher\\GenericEvent' => $vendorDir . '/symfony/event-dispatcher/GenericEvent.php', + 'Symfony\\Component\\EventDispatcher\\ImmutableEventDispatcher' => $vendorDir . '/symfony/event-dispatcher/ImmutableEventDispatcher.php', + 'Symfony\\Component\\Finder\\Comparator\\Comparator' => $vendorDir . '/symfony/finder/Comparator/Comparator.php', + 'Symfony\\Component\\Finder\\Comparator\\DateComparator' => $vendorDir . '/symfony/finder/Comparator/DateComparator.php', + 'Symfony\\Component\\Finder\\Comparator\\NumberComparator' => $vendorDir . '/symfony/finder/Comparator/NumberComparator.php', + 'Symfony\\Component\\Finder\\Exception\\AccessDeniedException' => $vendorDir . '/symfony/finder/Exception/AccessDeniedException.php', + 'Symfony\\Component\\Finder\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/finder/Exception/ExceptionInterface.php', + 'Symfony\\Component\\Finder\\Finder' => $vendorDir . '/symfony/finder/Finder.php', + 'Symfony\\Component\\Finder\\Glob' => $vendorDir . '/symfony/finder/Glob.php', + 'Symfony\\Component\\Finder\\Iterator\\CustomFilterIterator' => $vendorDir . '/symfony/finder/Iterator/CustomFilterIterator.php', + 'Symfony\\Component\\Finder\\Iterator\\DateRangeFilterIterator' => $vendorDir . '/symfony/finder/Iterator/DateRangeFilterIterator.php', + 'Symfony\\Component\\Finder\\Iterator\\DepthRangeFilterIterator' => $vendorDir . '/symfony/finder/Iterator/DepthRangeFilterIterator.php', + 'Symfony\\Component\\Finder\\Iterator\\ExcludeDirectoryFilterIterator' => $vendorDir . '/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php', + 'Symfony\\Component\\Finder\\Iterator\\FileTypeFilterIterator' => $vendorDir . '/symfony/finder/Iterator/FileTypeFilterIterator.php', + 'Symfony\\Component\\Finder\\Iterator\\FilecontentFilterIterator' => $vendorDir . '/symfony/finder/Iterator/FilecontentFilterIterator.php', + 'Symfony\\Component\\Finder\\Iterator\\FilenameFilterIterator' => $vendorDir . '/symfony/finder/Iterator/FilenameFilterIterator.php', + 'Symfony\\Component\\Finder\\Iterator\\FilterIterator' => $vendorDir . '/symfony/finder/Iterator/FilterIterator.php', + 'Symfony\\Component\\Finder\\Iterator\\MultiplePcreFilterIterator' => $vendorDir . '/symfony/finder/Iterator/MultiplePcreFilterIterator.php', + 'Symfony\\Component\\Finder\\Iterator\\PathFilterIterator' => $vendorDir . '/symfony/finder/Iterator/PathFilterIterator.php', + 'Symfony\\Component\\Finder\\Iterator\\RecursiveDirectoryIterator' => $vendorDir . '/symfony/finder/Iterator/RecursiveDirectoryIterator.php', + 'Symfony\\Component\\Finder\\Iterator\\SizeRangeFilterIterator' => $vendorDir . '/symfony/finder/Iterator/SizeRangeFilterIterator.php', + 'Symfony\\Component\\Finder\\Iterator\\SortableIterator' => $vendorDir . '/symfony/finder/Iterator/SortableIterator.php', + 'Symfony\\Component\\Finder\\SplFileInfo' => $vendorDir . '/symfony/finder/SplFileInfo.php', + 'Symfony\\Component\\HttpFoundation\\AcceptHeader' => $vendorDir . '/symfony/http-foundation/AcceptHeader.php', + 'Symfony\\Component\\HttpFoundation\\AcceptHeaderItem' => $vendorDir . '/symfony/http-foundation/AcceptHeaderItem.php', + 'Symfony\\Component\\HttpFoundation\\ApacheRequest' => $vendorDir . '/symfony/http-foundation/ApacheRequest.php', + 'Symfony\\Component\\HttpFoundation\\BinaryFileResponse' => $vendorDir . '/symfony/http-foundation/BinaryFileResponse.php', + 'Symfony\\Component\\HttpFoundation\\Cookie' => $vendorDir . '/symfony/http-foundation/Cookie.php', + 'Symfony\\Component\\HttpFoundation\\Exception\\ConflictingHeadersException' => $vendorDir . '/symfony/http-foundation/Exception/ConflictingHeadersException.php', + 'Symfony\\Component\\HttpFoundation\\ExpressionRequestMatcher' => $vendorDir . '/symfony/http-foundation/ExpressionRequestMatcher.php', + 'Symfony\\Component\\HttpFoundation\\FileBag' => $vendorDir . '/symfony/http-foundation/FileBag.php', + 'Symfony\\Component\\HttpFoundation\\File\\Exception\\AccessDeniedException' => $vendorDir . '/symfony/http-foundation/File/Exception/AccessDeniedException.php', + 'Symfony\\Component\\HttpFoundation\\File\\Exception\\FileException' => $vendorDir . '/symfony/http-foundation/File/Exception/FileException.php', + 'Symfony\\Component\\HttpFoundation\\File\\Exception\\FileNotFoundException' => $vendorDir . '/symfony/http-foundation/File/Exception/FileNotFoundException.php', + 'Symfony\\Component\\HttpFoundation\\File\\Exception\\UnexpectedTypeException' => $vendorDir . '/symfony/http-foundation/File/Exception/UnexpectedTypeException.php', + 'Symfony\\Component\\HttpFoundation\\File\\Exception\\UploadException' => $vendorDir . '/symfony/http-foundation/File/Exception/UploadException.php', + 'Symfony\\Component\\HttpFoundation\\File\\File' => $vendorDir . '/symfony/http-foundation/File/File.php', + 'Symfony\\Component\\HttpFoundation\\File\\MimeType\\ExtensionGuesser' => $vendorDir . '/symfony/http-foundation/File/MimeType/ExtensionGuesser.php', + 'Symfony\\Component\\HttpFoundation\\File\\MimeType\\ExtensionGuesserInterface' => $vendorDir . '/symfony/http-foundation/File/MimeType/ExtensionGuesserInterface.php', + 'Symfony\\Component\\HttpFoundation\\File\\MimeType\\FileBinaryMimeTypeGuesser' => $vendorDir . '/symfony/http-foundation/File/MimeType/FileBinaryMimeTypeGuesser.php', + 'Symfony\\Component\\HttpFoundation\\File\\MimeType\\FileinfoMimeTypeGuesser' => $vendorDir . '/symfony/http-foundation/File/MimeType/FileinfoMimeTypeGuesser.php', + 'Symfony\\Component\\HttpFoundation\\File\\MimeType\\MimeTypeExtensionGuesser' => $vendorDir . '/symfony/http-foundation/File/MimeType/MimeTypeExtensionGuesser.php', + 'Symfony\\Component\\HttpFoundation\\File\\MimeType\\MimeTypeGuesser' => $vendorDir . '/symfony/http-foundation/File/MimeType/MimeTypeGuesser.php', + 'Symfony\\Component\\HttpFoundation\\File\\MimeType\\MimeTypeGuesserInterface' => $vendorDir . '/symfony/http-foundation/File/MimeType/MimeTypeGuesserInterface.php', + 'Symfony\\Component\\HttpFoundation\\File\\UploadedFile' => $vendorDir . '/symfony/http-foundation/File/UploadedFile.php', + 'Symfony\\Component\\HttpFoundation\\HeaderBag' => $vendorDir . '/symfony/http-foundation/HeaderBag.php', + 'Symfony\\Component\\HttpFoundation\\IpUtils' => $vendorDir . '/symfony/http-foundation/IpUtils.php', + 'Symfony\\Component\\HttpFoundation\\JsonResponse' => $vendorDir . '/symfony/http-foundation/JsonResponse.php', + 'Symfony\\Component\\HttpFoundation\\ParameterBag' => $vendorDir . '/symfony/http-foundation/ParameterBag.php', + 'Symfony\\Component\\HttpFoundation\\RedirectResponse' => $vendorDir . '/symfony/http-foundation/RedirectResponse.php', + 'Symfony\\Component\\HttpFoundation\\Request' => $vendorDir . '/symfony/http-foundation/Request.php', + 'Symfony\\Component\\HttpFoundation\\RequestMatcher' => $vendorDir . '/symfony/http-foundation/RequestMatcher.php', + 'Symfony\\Component\\HttpFoundation\\RequestMatcherInterface' => $vendorDir . '/symfony/http-foundation/RequestMatcherInterface.php', + 'Symfony\\Component\\HttpFoundation\\RequestStack' => $vendorDir . '/symfony/http-foundation/RequestStack.php', + 'Symfony\\Component\\HttpFoundation\\Response' => $vendorDir . '/symfony/http-foundation/Response.php', + 'Symfony\\Component\\HttpFoundation\\ResponseHeaderBag' => $vendorDir . '/symfony/http-foundation/ResponseHeaderBag.php', + 'Symfony\\Component\\HttpFoundation\\ServerBag' => $vendorDir . '/symfony/http-foundation/ServerBag.php', + 'Symfony\\Component\\HttpFoundation\\Session\\Attribute\\AttributeBag' => $vendorDir . '/symfony/http-foundation/Session/Attribute/AttributeBag.php', + 'Symfony\\Component\\HttpFoundation\\Session\\Attribute\\AttributeBagInterface' => $vendorDir . '/symfony/http-foundation/Session/Attribute/AttributeBagInterface.php', + 'Symfony\\Component\\HttpFoundation\\Session\\Attribute\\NamespacedAttributeBag' => $vendorDir . '/symfony/http-foundation/Session/Attribute/NamespacedAttributeBag.php', + 'Symfony\\Component\\HttpFoundation\\Session\\Flash\\AutoExpireFlashBag' => $vendorDir . '/symfony/http-foundation/Session/Flash/AutoExpireFlashBag.php', + 'Symfony\\Component\\HttpFoundation\\Session\\Flash\\FlashBag' => $vendorDir . '/symfony/http-foundation/Session/Flash/FlashBag.php', + 'Symfony\\Component\\HttpFoundation\\Session\\Flash\\FlashBagInterface' => $vendorDir . '/symfony/http-foundation/Session/Flash/FlashBagInterface.php', + 'Symfony\\Component\\HttpFoundation\\Session\\Session' => $vendorDir . '/symfony/http-foundation/Session/Session.php', + 'Symfony\\Component\\HttpFoundation\\Session\\SessionBagInterface' => $vendorDir . '/symfony/http-foundation/Session/SessionBagInterface.php', + 'Symfony\\Component\\HttpFoundation\\Session\\SessionInterface' => $vendorDir . '/symfony/http-foundation/Session/SessionInterface.php', + 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\MemcacheSessionHandler' => $vendorDir . '/symfony/http-foundation/Session/Storage/Handler/MemcacheSessionHandler.php', + 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\MemcachedSessionHandler' => $vendorDir . '/symfony/http-foundation/Session/Storage/Handler/MemcachedSessionHandler.php', + 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\MongoDbSessionHandler' => $vendorDir . '/symfony/http-foundation/Session/Storage/Handler/MongoDbSessionHandler.php', + 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\NativeFileSessionHandler' => $vendorDir . '/symfony/http-foundation/Session/Storage/Handler/NativeFileSessionHandler.php', + 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\NativeSessionHandler' => $vendorDir . '/symfony/http-foundation/Session/Storage/Handler/NativeSessionHandler.php', + 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\NullSessionHandler' => $vendorDir . '/symfony/http-foundation/Session/Storage/Handler/NullSessionHandler.php', + 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\PdoSessionHandler' => $vendorDir . '/symfony/http-foundation/Session/Storage/Handler/PdoSessionHandler.php', + 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\WriteCheckSessionHandler' => $vendorDir . '/symfony/http-foundation/Session/Storage/Handler/WriteCheckSessionHandler.php', + 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\MetadataBag' => $vendorDir . '/symfony/http-foundation/Session/Storage/MetadataBag.php', + 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\MockArraySessionStorage' => $vendorDir . '/symfony/http-foundation/Session/Storage/MockArraySessionStorage.php', + 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\MockFileSessionStorage' => $vendorDir . '/symfony/http-foundation/Session/Storage/MockFileSessionStorage.php', + 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\NativeSessionStorage' => $vendorDir . '/symfony/http-foundation/Session/Storage/NativeSessionStorage.php', + 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\PhpBridgeSessionStorage' => $vendorDir . '/symfony/http-foundation/Session/Storage/PhpBridgeSessionStorage.php', + 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Proxy\\AbstractProxy' => $vendorDir . '/symfony/http-foundation/Session/Storage/Proxy/AbstractProxy.php', + 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Proxy\\NativeProxy' => $vendorDir . '/symfony/http-foundation/Session/Storage/Proxy/NativeProxy.php', + 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Proxy\\SessionHandlerProxy' => $vendorDir . '/symfony/http-foundation/Session/Storage/Proxy/SessionHandlerProxy.php', + 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\SessionStorageInterface' => $vendorDir . '/symfony/http-foundation/Session/Storage/SessionStorageInterface.php', + 'Symfony\\Component\\HttpFoundation\\StreamedResponse' => $vendorDir . '/symfony/http-foundation/StreamedResponse.php', + 'Symfony\\Component\\HttpKernel\\Bundle\\Bundle' => $vendorDir . '/symfony/http-kernel/Bundle/Bundle.php', + 'Symfony\\Component\\HttpKernel\\Bundle\\BundleInterface' => $vendorDir . '/symfony/http-kernel/Bundle/BundleInterface.php', + 'Symfony\\Component\\HttpKernel\\CacheClearer\\CacheClearerInterface' => $vendorDir . '/symfony/http-kernel/CacheClearer/CacheClearerInterface.php', + 'Symfony\\Component\\HttpKernel\\CacheClearer\\ChainCacheClearer' => $vendorDir . '/symfony/http-kernel/CacheClearer/ChainCacheClearer.php', + 'Symfony\\Component\\HttpKernel\\CacheClearer\\Psr6CacheClearer' => $vendorDir . '/symfony/http-kernel/CacheClearer/Psr6CacheClearer.php', + 'Symfony\\Component\\HttpKernel\\CacheWarmer\\CacheWarmer' => $vendorDir . '/symfony/http-kernel/CacheWarmer/CacheWarmer.php', + 'Symfony\\Component\\HttpKernel\\CacheWarmer\\CacheWarmerAggregate' => $vendorDir . '/symfony/http-kernel/CacheWarmer/CacheWarmerAggregate.php', + 'Symfony\\Component\\HttpKernel\\CacheWarmer\\CacheWarmerInterface' => $vendorDir . '/symfony/http-kernel/CacheWarmer/CacheWarmerInterface.php', + 'Symfony\\Component\\HttpKernel\\CacheWarmer\\WarmableInterface' => $vendorDir . '/symfony/http-kernel/CacheWarmer/WarmableInterface.php', + 'Symfony\\Component\\HttpKernel\\Client' => $vendorDir . '/symfony/http-kernel/Client.php', + 'Symfony\\Component\\HttpKernel\\Config\\EnvParametersResource' => $vendorDir . '/symfony/http-kernel/Config/EnvParametersResource.php', + 'Symfony\\Component\\HttpKernel\\Config\\FileLocator' => $vendorDir . '/symfony/http-kernel/Config/FileLocator.php', + 'Symfony\\Component\\HttpKernel\\ControllerMetadata\\ArgumentMetadata' => $vendorDir . '/symfony/http-kernel/ControllerMetadata/ArgumentMetadata.php', + 'Symfony\\Component\\HttpKernel\\ControllerMetadata\\ArgumentMetadataFactory' => $vendorDir . '/symfony/http-kernel/ControllerMetadata/ArgumentMetadataFactory.php', + 'Symfony\\Component\\HttpKernel\\ControllerMetadata\\ArgumentMetadataFactoryInterface' => $vendorDir . '/symfony/http-kernel/ControllerMetadata/ArgumentMetadataFactoryInterface.php', + 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver' => $vendorDir . '/symfony/http-kernel/Controller/ArgumentResolver.php', + 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolverInterface' => $vendorDir . '/symfony/http-kernel/Controller/ArgumentResolverInterface.php', + 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\DefaultValueResolver' => $vendorDir . '/symfony/http-kernel/Controller/ArgumentResolver/DefaultValueResolver.php', + 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\RequestAttributeValueResolver' => $vendorDir . '/symfony/http-kernel/Controller/ArgumentResolver/RequestAttributeValueResolver.php', + 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\RequestValueResolver' => $vendorDir . '/symfony/http-kernel/Controller/ArgumentResolver/RequestValueResolver.php', + 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\VariadicValueResolver' => $vendorDir . '/symfony/http-kernel/Controller/ArgumentResolver/VariadicValueResolver.php', + 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentValueResolverInterface' => $vendorDir . '/symfony/http-kernel/Controller/ArgumentValueResolverInterface.php', + 'Symfony\\Component\\HttpKernel\\Controller\\ControllerReference' => $vendorDir . '/symfony/http-kernel/Controller/ControllerReference.php', + 'Symfony\\Component\\HttpKernel\\Controller\\ControllerResolver' => $vendorDir . '/symfony/http-kernel/Controller/ControllerResolver.php', + 'Symfony\\Component\\HttpKernel\\Controller\\ControllerResolverInterface' => $vendorDir . '/symfony/http-kernel/Controller/ControllerResolverInterface.php', + 'Symfony\\Component\\HttpKernel\\Controller\\TraceableArgumentResolver' => $vendorDir . '/symfony/http-kernel/Controller/TraceableArgumentResolver.php', + 'Symfony\\Component\\HttpKernel\\Controller\\TraceableControllerResolver' => $vendorDir . '/symfony/http-kernel/Controller/TraceableControllerResolver.php', + 'Symfony\\Component\\HttpKernel\\DataCollector\\AjaxDataCollector' => $vendorDir . '/symfony/http-kernel/DataCollector/AjaxDataCollector.php', + 'Symfony\\Component\\HttpKernel\\DataCollector\\ConfigDataCollector' => $vendorDir . '/symfony/http-kernel/DataCollector/ConfigDataCollector.php', + 'Symfony\\Component\\HttpKernel\\DataCollector\\DataCollector' => $vendorDir . '/symfony/http-kernel/DataCollector/DataCollector.php', + 'Symfony\\Component\\HttpKernel\\DataCollector\\DataCollectorInterface' => $vendorDir . '/symfony/http-kernel/DataCollector/DataCollectorInterface.php', + 'Symfony\\Component\\HttpKernel\\DataCollector\\DumpDataCollector' => $vendorDir . '/symfony/http-kernel/DataCollector/DumpDataCollector.php', + 'Symfony\\Component\\HttpKernel\\DataCollector\\EventDataCollector' => $vendorDir . '/symfony/http-kernel/DataCollector/EventDataCollector.php', + 'Symfony\\Component\\HttpKernel\\DataCollector\\ExceptionDataCollector' => $vendorDir . '/symfony/http-kernel/DataCollector/ExceptionDataCollector.php', + 'Symfony\\Component\\HttpKernel\\DataCollector\\LateDataCollectorInterface' => $vendorDir . '/symfony/http-kernel/DataCollector/LateDataCollectorInterface.php', + 'Symfony\\Component\\HttpKernel\\DataCollector\\LoggerDataCollector' => $vendorDir . '/symfony/http-kernel/DataCollector/LoggerDataCollector.php', + 'Symfony\\Component\\HttpKernel\\DataCollector\\MemoryDataCollector' => $vendorDir . '/symfony/http-kernel/DataCollector/MemoryDataCollector.php', + 'Symfony\\Component\\HttpKernel\\DataCollector\\RequestDataCollector' => $vendorDir . '/symfony/http-kernel/DataCollector/RequestDataCollector.php', + 'Symfony\\Component\\HttpKernel\\DataCollector\\RouterDataCollector' => $vendorDir . '/symfony/http-kernel/DataCollector/RouterDataCollector.php', + 'Symfony\\Component\\HttpKernel\\DataCollector\\TimeDataCollector' => $vendorDir . '/symfony/http-kernel/DataCollector/TimeDataCollector.php', + 'Symfony\\Component\\HttpKernel\\DataCollector\\Util\\ValueExporter' => $vendorDir . '/symfony/http-kernel/DataCollector/Util/ValueExporter.php', + 'Symfony\\Component\\HttpKernel\\Debug\\FileLinkFormatter' => $vendorDir . '/symfony/http-kernel/Debug/FileLinkFormatter.php', + 'Symfony\\Component\\HttpKernel\\Debug\\TraceableEventDispatcher' => $vendorDir . '/symfony/http-kernel/Debug/TraceableEventDispatcher.php', + 'Symfony\\Component\\HttpKernel\\DependencyInjection\\AddClassesToCachePass' => $vendorDir . '/symfony/http-kernel/DependencyInjection/AddClassesToCachePass.php', + 'Symfony\\Component\\HttpKernel\\DependencyInjection\\ConfigurableExtension' => $vendorDir . '/symfony/http-kernel/DependencyInjection/ConfigurableExtension.php', + 'Symfony\\Component\\HttpKernel\\DependencyInjection\\Extension' => $vendorDir . '/symfony/http-kernel/DependencyInjection/Extension.php', + 'Symfony\\Component\\HttpKernel\\DependencyInjection\\FragmentRendererPass' => $vendorDir . '/symfony/http-kernel/DependencyInjection/FragmentRendererPass.php', + 'Symfony\\Component\\HttpKernel\\DependencyInjection\\LazyLoadingFragmentHandler' => $vendorDir . '/symfony/http-kernel/DependencyInjection/LazyLoadingFragmentHandler.php', + 'Symfony\\Component\\HttpKernel\\DependencyInjection\\MergeExtensionConfigurationPass' => $vendorDir . '/symfony/http-kernel/DependencyInjection/MergeExtensionConfigurationPass.php', + 'Symfony\\Component\\HttpKernel\\EventListener\\AddRequestFormatsListener' => $vendorDir . '/symfony/http-kernel/EventListener/AddRequestFormatsListener.php', + 'Symfony\\Component\\HttpKernel\\EventListener\\DebugHandlersListener' => $vendorDir . '/symfony/http-kernel/EventListener/DebugHandlersListener.php', + 'Symfony\\Component\\HttpKernel\\EventListener\\DumpListener' => $vendorDir . '/symfony/http-kernel/EventListener/DumpListener.php', + 'Symfony\\Component\\HttpKernel\\EventListener\\ExceptionListener' => $vendorDir . '/symfony/http-kernel/EventListener/ExceptionListener.php', + 'Symfony\\Component\\HttpKernel\\EventListener\\FragmentListener' => $vendorDir . '/symfony/http-kernel/EventListener/FragmentListener.php', + 'Symfony\\Component\\HttpKernel\\EventListener\\LocaleListener' => $vendorDir . '/symfony/http-kernel/EventListener/LocaleListener.php', + 'Symfony\\Component\\HttpKernel\\EventListener\\ProfilerListener' => $vendorDir . '/symfony/http-kernel/EventListener/ProfilerListener.php', + 'Symfony\\Component\\HttpKernel\\EventListener\\ResponseListener' => $vendorDir . '/symfony/http-kernel/EventListener/ResponseListener.php', + 'Symfony\\Component\\HttpKernel\\EventListener\\RouterListener' => $vendorDir . '/symfony/http-kernel/EventListener/RouterListener.php', + 'Symfony\\Component\\HttpKernel\\EventListener\\SaveSessionListener' => $vendorDir . '/symfony/http-kernel/EventListener/SaveSessionListener.php', + 'Symfony\\Component\\HttpKernel\\EventListener\\SessionListener' => $vendorDir . '/symfony/http-kernel/EventListener/SessionListener.php', + 'Symfony\\Component\\HttpKernel\\EventListener\\StreamedResponseListener' => $vendorDir . '/symfony/http-kernel/EventListener/StreamedResponseListener.php', + 'Symfony\\Component\\HttpKernel\\EventListener\\SurrogateListener' => $vendorDir . '/symfony/http-kernel/EventListener/SurrogateListener.php', + 'Symfony\\Component\\HttpKernel\\EventListener\\TestSessionListener' => $vendorDir . '/symfony/http-kernel/EventListener/TestSessionListener.php', + 'Symfony\\Component\\HttpKernel\\EventListener\\TranslatorListener' => $vendorDir . '/symfony/http-kernel/EventListener/TranslatorListener.php', + 'Symfony\\Component\\HttpKernel\\EventListener\\ValidateRequestListener' => $vendorDir . '/symfony/http-kernel/EventListener/ValidateRequestListener.php', + 'Symfony\\Component\\HttpKernel\\Event\\FilterControllerArgumentsEvent' => $vendorDir . '/symfony/http-kernel/Event/FilterControllerArgumentsEvent.php', + 'Symfony\\Component\\HttpKernel\\Event\\FilterControllerEvent' => $vendorDir . '/symfony/http-kernel/Event/FilterControllerEvent.php', + 'Symfony\\Component\\HttpKernel\\Event\\FilterResponseEvent' => $vendorDir . '/symfony/http-kernel/Event/FilterResponseEvent.php', + 'Symfony\\Component\\HttpKernel\\Event\\FinishRequestEvent' => $vendorDir . '/symfony/http-kernel/Event/FinishRequestEvent.php', + 'Symfony\\Component\\HttpKernel\\Event\\GetResponseEvent' => $vendorDir . '/symfony/http-kernel/Event/GetResponseEvent.php', + 'Symfony\\Component\\HttpKernel\\Event\\GetResponseForControllerResultEvent' => $vendorDir . '/symfony/http-kernel/Event/GetResponseForControllerResultEvent.php', + 'Symfony\\Component\\HttpKernel\\Event\\GetResponseForExceptionEvent' => $vendorDir . '/symfony/http-kernel/Event/GetResponseForExceptionEvent.php', + 'Symfony\\Component\\HttpKernel\\Event\\KernelEvent' => $vendorDir . '/symfony/http-kernel/Event/KernelEvent.php', + 'Symfony\\Component\\HttpKernel\\Event\\PostResponseEvent' => $vendorDir . '/symfony/http-kernel/Event/PostResponseEvent.php', + 'Symfony\\Component\\HttpKernel\\Exception\\AccessDeniedHttpException' => $vendorDir . '/symfony/http-kernel/Exception/AccessDeniedHttpException.php', + 'Symfony\\Component\\HttpKernel\\Exception\\BadRequestHttpException' => $vendorDir . '/symfony/http-kernel/Exception/BadRequestHttpException.php', + 'Symfony\\Component\\HttpKernel\\Exception\\ConflictHttpException' => $vendorDir . '/symfony/http-kernel/Exception/ConflictHttpException.php', + 'Symfony\\Component\\HttpKernel\\Exception\\GoneHttpException' => $vendorDir . '/symfony/http-kernel/Exception/GoneHttpException.php', + 'Symfony\\Component\\HttpKernel\\Exception\\HttpException' => $vendorDir . '/symfony/http-kernel/Exception/HttpException.php', + 'Symfony\\Component\\HttpKernel\\Exception\\HttpExceptionInterface' => $vendorDir . '/symfony/http-kernel/Exception/HttpExceptionInterface.php', + 'Symfony\\Component\\HttpKernel\\Exception\\LengthRequiredHttpException' => $vendorDir . '/symfony/http-kernel/Exception/LengthRequiredHttpException.php', + 'Symfony\\Component\\HttpKernel\\Exception\\MethodNotAllowedHttpException' => $vendorDir . '/symfony/http-kernel/Exception/MethodNotAllowedHttpException.php', + 'Symfony\\Component\\HttpKernel\\Exception\\NotAcceptableHttpException' => $vendorDir . '/symfony/http-kernel/Exception/NotAcceptableHttpException.php', + 'Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException' => $vendorDir . '/symfony/http-kernel/Exception/NotFoundHttpException.php', + 'Symfony\\Component\\HttpKernel\\Exception\\PreconditionFailedHttpException' => $vendorDir . '/symfony/http-kernel/Exception/PreconditionFailedHttpException.php', + 'Symfony\\Component\\HttpKernel\\Exception\\PreconditionRequiredHttpException' => $vendorDir . '/symfony/http-kernel/Exception/PreconditionRequiredHttpException.php', + 'Symfony\\Component\\HttpKernel\\Exception\\ServiceUnavailableHttpException' => $vendorDir . '/symfony/http-kernel/Exception/ServiceUnavailableHttpException.php', + 'Symfony\\Component\\HttpKernel\\Exception\\TooManyRequestsHttpException' => $vendorDir . '/symfony/http-kernel/Exception/TooManyRequestsHttpException.php', + 'Symfony\\Component\\HttpKernel\\Exception\\UnauthorizedHttpException' => $vendorDir . '/symfony/http-kernel/Exception/UnauthorizedHttpException.php', + 'Symfony\\Component\\HttpKernel\\Exception\\UnprocessableEntityHttpException' => $vendorDir . '/symfony/http-kernel/Exception/UnprocessableEntityHttpException.php', + 'Symfony\\Component\\HttpKernel\\Exception\\UnsupportedMediaTypeHttpException' => $vendorDir . '/symfony/http-kernel/Exception/UnsupportedMediaTypeHttpException.php', + 'Symfony\\Component\\HttpKernel\\Fragment\\AbstractSurrogateFragmentRenderer' => $vendorDir . '/symfony/http-kernel/Fragment/AbstractSurrogateFragmentRenderer.php', + 'Symfony\\Component\\HttpKernel\\Fragment\\EsiFragmentRenderer' => $vendorDir . '/symfony/http-kernel/Fragment/EsiFragmentRenderer.php', + 'Symfony\\Component\\HttpKernel\\Fragment\\FragmentHandler' => $vendorDir . '/symfony/http-kernel/Fragment/FragmentHandler.php', + 'Symfony\\Component\\HttpKernel\\Fragment\\FragmentRendererInterface' => $vendorDir . '/symfony/http-kernel/Fragment/FragmentRendererInterface.php', + 'Symfony\\Component\\HttpKernel\\Fragment\\HIncludeFragmentRenderer' => $vendorDir . '/symfony/http-kernel/Fragment/HIncludeFragmentRenderer.php', + 'Symfony\\Component\\HttpKernel\\Fragment\\InlineFragmentRenderer' => $vendorDir . '/symfony/http-kernel/Fragment/InlineFragmentRenderer.php', + 'Symfony\\Component\\HttpKernel\\Fragment\\RoutableFragmentRenderer' => $vendorDir . '/symfony/http-kernel/Fragment/RoutableFragmentRenderer.php', + 'Symfony\\Component\\HttpKernel\\Fragment\\SsiFragmentRenderer' => $vendorDir . '/symfony/http-kernel/Fragment/SsiFragmentRenderer.php', + 'Symfony\\Component\\HttpKernel\\HttpCache\\AbstractSurrogate' => $vendorDir . '/symfony/http-kernel/HttpCache/AbstractSurrogate.php', + 'Symfony\\Component\\HttpKernel\\HttpCache\\Esi' => $vendorDir . '/symfony/http-kernel/HttpCache/Esi.php', + 'Symfony\\Component\\HttpKernel\\HttpCache\\HttpCache' => $vendorDir . '/symfony/http-kernel/HttpCache/HttpCache.php', + 'Symfony\\Component\\HttpKernel\\HttpCache\\ResponseCacheStrategy' => $vendorDir . '/symfony/http-kernel/HttpCache/ResponseCacheStrategy.php', + 'Symfony\\Component\\HttpKernel\\HttpCache\\ResponseCacheStrategyInterface' => $vendorDir . '/symfony/http-kernel/HttpCache/ResponseCacheStrategyInterface.php', + 'Symfony\\Component\\HttpKernel\\HttpCache\\Ssi' => $vendorDir . '/symfony/http-kernel/HttpCache/Ssi.php', + 'Symfony\\Component\\HttpKernel\\HttpCache\\Store' => $vendorDir . '/symfony/http-kernel/HttpCache/Store.php', + 'Symfony\\Component\\HttpKernel\\HttpCache\\StoreInterface' => $vendorDir . '/symfony/http-kernel/HttpCache/StoreInterface.php', + 'Symfony\\Component\\HttpKernel\\HttpCache\\SurrogateInterface' => $vendorDir . '/symfony/http-kernel/HttpCache/SurrogateInterface.php', + 'Symfony\\Component\\HttpKernel\\HttpKernel' => $vendorDir . '/symfony/http-kernel/HttpKernel.php', + 'Symfony\\Component\\HttpKernel\\HttpKernelInterface' => $vendorDir . '/symfony/http-kernel/HttpKernelInterface.php', + 'Symfony\\Component\\HttpKernel\\Kernel' => $vendorDir . '/symfony/http-kernel/Kernel.php', + 'Symfony\\Component\\HttpKernel\\KernelEvents' => $vendorDir . '/symfony/http-kernel/KernelEvents.php', + 'Symfony\\Component\\HttpKernel\\KernelInterface' => $vendorDir . '/symfony/http-kernel/KernelInterface.php', + 'Symfony\\Component\\HttpKernel\\Log\\DebugLoggerInterface' => $vendorDir . '/symfony/http-kernel/Log/DebugLoggerInterface.php', + 'Symfony\\Component\\HttpKernel\\Profiler\\FileProfilerStorage' => $vendorDir . '/symfony/http-kernel/Profiler/FileProfilerStorage.php', + 'Symfony\\Component\\HttpKernel\\Profiler\\Profile' => $vendorDir . '/symfony/http-kernel/Profiler/Profile.php', + 'Symfony\\Component\\HttpKernel\\Profiler\\Profiler' => $vendorDir . '/symfony/http-kernel/Profiler/Profiler.php', + 'Symfony\\Component\\HttpKernel\\Profiler\\ProfilerStorageInterface' => $vendorDir . '/symfony/http-kernel/Profiler/ProfilerStorageInterface.php', + 'Symfony\\Component\\HttpKernel\\TerminableInterface' => $vendorDir . '/symfony/http-kernel/TerminableInterface.php', + 'Symfony\\Component\\HttpKernel\\UriSigner' => $vendorDir . '/symfony/http-kernel/UriSigner.php', + 'Symfony\\Component\\Process\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/process/Exception/ExceptionInterface.php', + 'Symfony\\Component\\Process\\Exception\\InvalidArgumentException' => $vendorDir . '/symfony/process/Exception/InvalidArgumentException.php', + 'Symfony\\Component\\Process\\Exception\\LogicException' => $vendorDir . '/symfony/process/Exception/LogicException.php', + 'Symfony\\Component\\Process\\Exception\\ProcessFailedException' => $vendorDir . '/symfony/process/Exception/ProcessFailedException.php', + 'Symfony\\Component\\Process\\Exception\\ProcessTimedOutException' => $vendorDir . '/symfony/process/Exception/ProcessTimedOutException.php', + 'Symfony\\Component\\Process\\Exception\\RuntimeException' => $vendorDir . '/symfony/process/Exception/RuntimeException.php', + 'Symfony\\Component\\Process\\ExecutableFinder' => $vendorDir . '/symfony/process/ExecutableFinder.php', + 'Symfony\\Component\\Process\\InputStream' => $vendorDir . '/symfony/process/InputStream.php', + 'Symfony\\Component\\Process\\PhpExecutableFinder' => $vendorDir . '/symfony/process/PhpExecutableFinder.php', + 'Symfony\\Component\\Process\\PhpProcess' => $vendorDir . '/symfony/process/PhpProcess.php', + 'Symfony\\Component\\Process\\Pipes\\AbstractPipes' => $vendorDir . '/symfony/process/Pipes/AbstractPipes.php', + 'Symfony\\Component\\Process\\Pipes\\PipesInterface' => $vendorDir . '/symfony/process/Pipes/PipesInterface.php', + 'Symfony\\Component\\Process\\Pipes\\UnixPipes' => $vendorDir . '/symfony/process/Pipes/UnixPipes.php', + 'Symfony\\Component\\Process\\Pipes\\WindowsPipes' => $vendorDir . '/symfony/process/Pipes/WindowsPipes.php', + 'Symfony\\Component\\Process\\Process' => $vendorDir . '/symfony/process/Process.php', + 'Symfony\\Component\\Process\\ProcessBuilder' => $vendorDir . '/symfony/process/ProcessBuilder.php', + 'Symfony\\Component\\Process\\ProcessUtils' => $vendorDir . '/symfony/process/ProcessUtils.php', + 'Symfony\\Component\\Routing\\Annotation\\Route' => $vendorDir . '/symfony/routing/Annotation/Route.php', + 'Symfony\\Component\\Routing\\CompiledRoute' => $vendorDir . '/symfony/routing/CompiledRoute.php', + 'Symfony\\Component\\Routing\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/routing/Exception/ExceptionInterface.php', + 'Symfony\\Component\\Routing\\Exception\\InvalidParameterException' => $vendorDir . '/symfony/routing/Exception/InvalidParameterException.php', + 'Symfony\\Component\\Routing\\Exception\\MethodNotAllowedException' => $vendorDir . '/symfony/routing/Exception/MethodNotAllowedException.php', + 'Symfony\\Component\\Routing\\Exception\\MissingMandatoryParametersException' => $vendorDir . '/symfony/routing/Exception/MissingMandatoryParametersException.php', + 'Symfony\\Component\\Routing\\Exception\\ResourceNotFoundException' => $vendorDir . '/symfony/routing/Exception/ResourceNotFoundException.php', + 'Symfony\\Component\\Routing\\Exception\\RouteNotFoundException' => $vendorDir . '/symfony/routing/Exception/RouteNotFoundException.php', + 'Symfony\\Component\\Routing\\Generator\\ConfigurableRequirementsInterface' => $vendorDir . '/symfony/routing/Generator/ConfigurableRequirementsInterface.php', + 'Symfony\\Component\\Routing\\Generator\\Dumper\\GeneratorDumper' => $vendorDir . '/symfony/routing/Generator/Dumper/GeneratorDumper.php', + 'Symfony\\Component\\Routing\\Generator\\Dumper\\GeneratorDumperInterface' => $vendorDir . '/symfony/routing/Generator/Dumper/GeneratorDumperInterface.php', + 'Symfony\\Component\\Routing\\Generator\\Dumper\\PhpGeneratorDumper' => $vendorDir . '/symfony/routing/Generator/Dumper/PhpGeneratorDumper.php', + 'Symfony\\Component\\Routing\\Generator\\UrlGenerator' => $vendorDir . '/symfony/routing/Generator/UrlGenerator.php', + 'Symfony\\Component\\Routing\\Generator\\UrlGeneratorInterface' => $vendorDir . '/symfony/routing/Generator/UrlGeneratorInterface.php', + 'Symfony\\Component\\Routing\\Loader\\AnnotationClassLoader' => $vendorDir . '/symfony/routing/Loader/AnnotationClassLoader.php', + 'Symfony\\Component\\Routing\\Loader\\AnnotationDirectoryLoader' => $vendorDir . '/symfony/routing/Loader/AnnotationDirectoryLoader.php', + 'Symfony\\Component\\Routing\\Loader\\AnnotationFileLoader' => $vendorDir . '/symfony/routing/Loader/AnnotationFileLoader.php', + 'Symfony\\Component\\Routing\\Loader\\ClosureLoader' => $vendorDir . '/symfony/routing/Loader/ClosureLoader.php', + 'Symfony\\Component\\Routing\\Loader\\DependencyInjection\\ServiceRouterLoader' => $vendorDir . '/symfony/routing/Loader/DependencyInjection/ServiceRouterLoader.php', + 'Symfony\\Component\\Routing\\Loader\\DirectoryLoader' => $vendorDir . '/symfony/routing/Loader/DirectoryLoader.php', + 'Symfony\\Component\\Routing\\Loader\\ObjectRouteLoader' => $vendorDir . '/symfony/routing/Loader/ObjectRouteLoader.php', + 'Symfony\\Component\\Routing\\Loader\\PhpFileLoader' => $vendorDir . '/symfony/routing/Loader/PhpFileLoader.php', + 'Symfony\\Component\\Routing\\Loader\\XmlFileLoader' => $vendorDir . '/symfony/routing/Loader/XmlFileLoader.php', + 'Symfony\\Component\\Routing\\Loader\\YamlFileLoader' => $vendorDir . '/symfony/routing/Loader/YamlFileLoader.php', + 'Symfony\\Component\\Routing\\Matcher\\Dumper\\DumperCollection' => $vendorDir . '/symfony/routing/Matcher/Dumper/DumperCollection.php', + 'Symfony\\Component\\Routing\\Matcher\\Dumper\\DumperPrefixCollection' => $vendorDir . '/symfony/routing/Matcher/Dumper/DumperPrefixCollection.php', + 'Symfony\\Component\\Routing\\Matcher\\Dumper\\DumperRoute' => $vendorDir . '/symfony/routing/Matcher/Dumper/DumperRoute.php', + 'Symfony\\Component\\Routing\\Matcher\\Dumper\\MatcherDumper' => $vendorDir . '/symfony/routing/Matcher/Dumper/MatcherDumper.php', + 'Symfony\\Component\\Routing\\Matcher\\Dumper\\MatcherDumperInterface' => $vendorDir . '/symfony/routing/Matcher/Dumper/MatcherDumperInterface.php', + 'Symfony\\Component\\Routing\\Matcher\\Dumper\\PhpMatcherDumper' => $vendorDir . '/symfony/routing/Matcher/Dumper/PhpMatcherDumper.php', + 'Symfony\\Component\\Routing\\Matcher\\RedirectableUrlMatcher' => $vendorDir . '/symfony/routing/Matcher/RedirectableUrlMatcher.php', + 'Symfony\\Component\\Routing\\Matcher\\RedirectableUrlMatcherInterface' => $vendorDir . '/symfony/routing/Matcher/RedirectableUrlMatcherInterface.php', + 'Symfony\\Component\\Routing\\Matcher\\RequestMatcherInterface' => $vendorDir . '/symfony/routing/Matcher/RequestMatcherInterface.php', + 'Symfony\\Component\\Routing\\Matcher\\TraceableUrlMatcher' => $vendorDir . '/symfony/routing/Matcher/TraceableUrlMatcher.php', + 'Symfony\\Component\\Routing\\Matcher\\UrlMatcher' => $vendorDir . '/symfony/routing/Matcher/UrlMatcher.php', + 'Symfony\\Component\\Routing\\Matcher\\UrlMatcherInterface' => $vendorDir . '/symfony/routing/Matcher/UrlMatcherInterface.php', + 'Symfony\\Component\\Routing\\RequestContext' => $vendorDir . '/symfony/routing/RequestContext.php', + 'Symfony\\Component\\Routing\\RequestContextAwareInterface' => $vendorDir . '/symfony/routing/RequestContextAwareInterface.php', + 'Symfony\\Component\\Routing\\Route' => $vendorDir . '/symfony/routing/Route.php', + 'Symfony\\Component\\Routing\\RouteCollection' => $vendorDir . '/symfony/routing/RouteCollection.php', + 'Symfony\\Component\\Routing\\RouteCollectionBuilder' => $vendorDir . '/symfony/routing/RouteCollectionBuilder.php', + 'Symfony\\Component\\Routing\\RouteCompiler' => $vendorDir . '/symfony/routing/RouteCompiler.php', + 'Symfony\\Component\\Routing\\RouteCompilerInterface' => $vendorDir . '/symfony/routing/RouteCompilerInterface.php', + 'Symfony\\Component\\Routing\\Router' => $vendorDir . '/symfony/routing/Router.php', + 'Symfony\\Component\\Routing\\RouterInterface' => $vendorDir . '/symfony/routing/RouterInterface.php', + 'Symfony\\Component\\Translation\\Catalogue\\AbstractOperation' => $vendorDir . '/symfony/translation/Catalogue/AbstractOperation.php', + 'Symfony\\Component\\Translation\\Catalogue\\MergeOperation' => $vendorDir . '/symfony/translation/Catalogue/MergeOperation.php', + 'Symfony\\Component\\Translation\\Catalogue\\OperationInterface' => $vendorDir . '/symfony/translation/Catalogue/OperationInterface.php', + 'Symfony\\Component\\Translation\\Catalogue\\TargetOperation' => $vendorDir . '/symfony/translation/Catalogue/TargetOperation.php', + 'Symfony\\Component\\Translation\\DataCollectorTranslator' => $vendorDir . '/symfony/translation/DataCollectorTranslator.php', + 'Symfony\\Component\\Translation\\DataCollector\\TranslationDataCollector' => $vendorDir . '/symfony/translation/DataCollector/TranslationDataCollector.php', + 'Symfony\\Component\\Translation\\Dumper\\CsvFileDumper' => $vendorDir . '/symfony/translation/Dumper/CsvFileDumper.php', + 'Symfony\\Component\\Translation\\Dumper\\DumperInterface' => $vendorDir . '/symfony/translation/Dumper/DumperInterface.php', + 'Symfony\\Component\\Translation\\Dumper\\FileDumper' => $vendorDir . '/symfony/translation/Dumper/FileDumper.php', + 'Symfony\\Component\\Translation\\Dumper\\IcuResFileDumper' => $vendorDir . '/symfony/translation/Dumper/IcuResFileDumper.php', + 'Symfony\\Component\\Translation\\Dumper\\IniFileDumper' => $vendorDir . '/symfony/translation/Dumper/IniFileDumper.php', + 'Symfony\\Component\\Translation\\Dumper\\JsonFileDumper' => $vendorDir . '/symfony/translation/Dumper/JsonFileDumper.php', + 'Symfony\\Component\\Translation\\Dumper\\MoFileDumper' => $vendorDir . '/symfony/translation/Dumper/MoFileDumper.php', + 'Symfony\\Component\\Translation\\Dumper\\PhpFileDumper' => $vendorDir . '/symfony/translation/Dumper/PhpFileDumper.php', + 'Symfony\\Component\\Translation\\Dumper\\PoFileDumper' => $vendorDir . '/symfony/translation/Dumper/PoFileDumper.php', + 'Symfony\\Component\\Translation\\Dumper\\QtFileDumper' => $vendorDir . '/symfony/translation/Dumper/QtFileDumper.php', + 'Symfony\\Component\\Translation\\Dumper\\XliffFileDumper' => $vendorDir . '/symfony/translation/Dumper/XliffFileDumper.php', + 'Symfony\\Component\\Translation\\Dumper\\YamlFileDumper' => $vendorDir . '/symfony/translation/Dumper/YamlFileDumper.php', + 'Symfony\\Component\\Translation\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/translation/Exception/ExceptionInterface.php', + 'Symfony\\Component\\Translation\\Exception\\InvalidArgumentException' => $vendorDir . '/symfony/translation/Exception/InvalidArgumentException.php', + 'Symfony\\Component\\Translation\\Exception\\InvalidResourceException' => $vendorDir . '/symfony/translation/Exception/InvalidResourceException.php', + 'Symfony\\Component\\Translation\\Exception\\LogicException' => $vendorDir . '/symfony/translation/Exception/LogicException.php', + 'Symfony\\Component\\Translation\\Exception\\NotFoundResourceException' => $vendorDir . '/symfony/translation/Exception/NotFoundResourceException.php', + 'Symfony\\Component\\Translation\\Exception\\RuntimeException' => $vendorDir . '/symfony/translation/Exception/RuntimeException.php', + 'Symfony\\Component\\Translation\\Extractor\\AbstractFileExtractor' => $vendorDir . '/symfony/translation/Extractor/AbstractFileExtractor.php', + 'Symfony\\Component\\Translation\\Extractor\\ChainExtractor' => $vendorDir . '/symfony/translation/Extractor/ChainExtractor.php', + 'Symfony\\Component\\Translation\\Extractor\\ExtractorInterface' => $vendorDir . '/symfony/translation/Extractor/ExtractorInterface.php', + 'Symfony\\Component\\Translation\\IdentityTranslator' => $vendorDir . '/symfony/translation/IdentityTranslator.php', + 'Symfony\\Component\\Translation\\Interval' => $vendorDir . '/symfony/translation/Interval.php', + 'Symfony\\Component\\Translation\\Loader\\ArrayLoader' => $vendorDir . '/symfony/translation/Loader/ArrayLoader.php', + 'Symfony\\Component\\Translation\\Loader\\CsvFileLoader' => $vendorDir . '/symfony/translation/Loader/CsvFileLoader.php', + 'Symfony\\Component\\Translation\\Loader\\FileLoader' => $vendorDir . '/symfony/translation/Loader/FileLoader.php', + 'Symfony\\Component\\Translation\\Loader\\IcuDatFileLoader' => $vendorDir . '/symfony/translation/Loader/IcuDatFileLoader.php', + 'Symfony\\Component\\Translation\\Loader\\IcuResFileLoader' => $vendorDir . '/symfony/translation/Loader/IcuResFileLoader.php', + 'Symfony\\Component\\Translation\\Loader\\IniFileLoader' => $vendorDir . '/symfony/translation/Loader/IniFileLoader.php', + 'Symfony\\Component\\Translation\\Loader\\JsonFileLoader' => $vendorDir . '/symfony/translation/Loader/JsonFileLoader.php', + 'Symfony\\Component\\Translation\\Loader\\LoaderInterface' => $vendorDir . '/symfony/translation/Loader/LoaderInterface.php', + 'Symfony\\Component\\Translation\\Loader\\MoFileLoader' => $vendorDir . '/symfony/translation/Loader/MoFileLoader.php', + 'Symfony\\Component\\Translation\\Loader\\PhpFileLoader' => $vendorDir . '/symfony/translation/Loader/PhpFileLoader.php', + 'Symfony\\Component\\Translation\\Loader\\PoFileLoader' => $vendorDir . '/symfony/translation/Loader/PoFileLoader.php', + 'Symfony\\Component\\Translation\\Loader\\QtFileLoader' => $vendorDir . '/symfony/translation/Loader/QtFileLoader.php', + 'Symfony\\Component\\Translation\\Loader\\XliffFileLoader' => $vendorDir . '/symfony/translation/Loader/XliffFileLoader.php', + 'Symfony\\Component\\Translation\\Loader\\YamlFileLoader' => $vendorDir . '/symfony/translation/Loader/YamlFileLoader.php', + 'Symfony\\Component\\Translation\\LoggingTranslator' => $vendorDir . '/symfony/translation/LoggingTranslator.php', + 'Symfony\\Component\\Translation\\MessageCatalogue' => $vendorDir . '/symfony/translation/MessageCatalogue.php', + 'Symfony\\Component\\Translation\\MessageCatalogueInterface' => $vendorDir . '/symfony/translation/MessageCatalogueInterface.php', + 'Symfony\\Component\\Translation\\MessageSelector' => $vendorDir . '/symfony/translation/MessageSelector.php', + 'Symfony\\Component\\Translation\\MetadataAwareInterface' => $vendorDir . '/symfony/translation/MetadataAwareInterface.php', + 'Symfony\\Component\\Translation\\PluralizationRules' => $vendorDir . '/symfony/translation/PluralizationRules.php', + 'Symfony\\Component\\Translation\\Translator' => $vendorDir . '/symfony/translation/Translator.php', + 'Symfony\\Component\\Translation\\TranslatorBagInterface' => $vendorDir . '/symfony/translation/TranslatorBagInterface.php', + 'Symfony\\Component\\Translation\\TranslatorInterface' => $vendorDir . '/symfony/translation/TranslatorInterface.php', + 'Symfony\\Component\\Translation\\Util\\ArrayConverter' => $vendorDir . '/symfony/translation/Util/ArrayConverter.php', + 'Symfony\\Component\\Translation\\Writer\\TranslationWriter' => $vendorDir . '/symfony/translation/Writer/TranslationWriter.php', + 'Symfony\\Component\\VarDumper\\Caster\\AmqpCaster' => $vendorDir . '/symfony/var-dumper/Caster/AmqpCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\ArgsStub' => $vendorDir . '/symfony/var-dumper/Caster/ArgsStub.php', + 'Symfony\\Component\\VarDumper\\Caster\\Caster' => $vendorDir . '/symfony/var-dumper/Caster/Caster.php', + 'Symfony\\Component\\VarDumper\\Caster\\ClassStub' => $vendorDir . '/symfony/var-dumper/Caster/ClassStub.php', + 'Symfony\\Component\\VarDumper\\Caster\\ConstStub' => $vendorDir . '/symfony/var-dumper/Caster/ConstStub.php', + 'Symfony\\Component\\VarDumper\\Caster\\CutArrayStub' => $vendorDir . '/symfony/var-dumper/Caster/CutArrayStub.php', + 'Symfony\\Component\\VarDumper\\Caster\\CutStub' => $vendorDir . '/symfony/var-dumper/Caster/CutStub.php', + 'Symfony\\Component\\VarDumper\\Caster\\DOMCaster' => $vendorDir . '/symfony/var-dumper/Caster/DOMCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\DoctrineCaster' => $vendorDir . '/symfony/var-dumper/Caster/DoctrineCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\EnumStub' => $vendorDir . '/symfony/var-dumper/Caster/EnumStub.php', + 'Symfony\\Component\\VarDumper\\Caster\\ExceptionCaster' => $vendorDir . '/symfony/var-dumper/Caster/ExceptionCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\FrameStub' => $vendorDir . '/symfony/var-dumper/Caster/FrameStub.php', + 'Symfony\\Component\\VarDumper\\Caster\\LinkStub' => $vendorDir . '/symfony/var-dumper/Caster/LinkStub.php', + 'Symfony\\Component\\VarDumper\\Caster\\MongoCaster' => $vendorDir . '/symfony/var-dumper/Caster/MongoCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\PdoCaster' => $vendorDir . '/symfony/var-dumper/Caster/PdoCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\PgSqlCaster' => $vendorDir . '/symfony/var-dumper/Caster/PgSqlCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\RedisCaster' => $vendorDir . '/symfony/var-dumper/Caster/RedisCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\ReflectionCaster' => $vendorDir . '/symfony/var-dumper/Caster/ReflectionCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\ResourceCaster' => $vendorDir . '/symfony/var-dumper/Caster/ResourceCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\SplCaster' => $vendorDir . '/symfony/var-dumper/Caster/SplCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\StubCaster' => $vendorDir . '/symfony/var-dumper/Caster/StubCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\TraceStub' => $vendorDir . '/symfony/var-dumper/Caster/TraceStub.php', + 'Symfony\\Component\\VarDumper\\Caster\\XmlReaderCaster' => $vendorDir . '/symfony/var-dumper/Caster/XmlReaderCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\XmlResourceCaster' => $vendorDir . '/symfony/var-dumper/Caster/XmlResourceCaster.php', + 'Symfony\\Component\\VarDumper\\Cloner\\AbstractCloner' => $vendorDir . '/symfony/var-dumper/Cloner/AbstractCloner.php', + 'Symfony\\Component\\VarDumper\\Cloner\\ClonerInterface' => $vendorDir . '/symfony/var-dumper/Cloner/ClonerInterface.php', + 'Symfony\\Component\\VarDumper\\Cloner\\Cursor' => $vendorDir . '/symfony/var-dumper/Cloner/Cursor.php', + 'Symfony\\Component\\VarDumper\\Cloner\\Data' => $vendorDir . '/symfony/var-dumper/Cloner/Data.php', + 'Symfony\\Component\\VarDumper\\Cloner\\DumperInterface' => $vendorDir . '/symfony/var-dumper/Cloner/DumperInterface.php', + 'Symfony\\Component\\VarDumper\\Cloner\\Stub' => $vendorDir . '/symfony/var-dumper/Cloner/Stub.php', + 'Symfony\\Component\\VarDumper\\Cloner\\VarCloner' => $vendorDir . '/symfony/var-dumper/Cloner/VarCloner.php', + 'Symfony\\Component\\VarDumper\\Dumper\\AbstractDumper' => $vendorDir . '/symfony/var-dumper/Dumper/AbstractDumper.php', + 'Symfony\\Component\\VarDumper\\Dumper\\CliDumper' => $vendorDir . '/symfony/var-dumper/Dumper/CliDumper.php', + 'Symfony\\Component\\VarDumper\\Dumper\\DataDumperInterface' => $vendorDir . '/symfony/var-dumper/Dumper/DataDumperInterface.php', + 'Symfony\\Component\\VarDumper\\Dumper\\HtmlDumper' => $vendorDir . '/symfony/var-dumper/Dumper/HtmlDumper.php', + 'Symfony\\Component\\VarDumper\\Exception\\ThrowingCasterException' => $vendorDir . '/symfony/var-dumper/Exception/ThrowingCasterException.php', + 'Symfony\\Component\\VarDumper\\Test\\VarDumperTestTrait' => $vendorDir . '/symfony/var-dumper/Test/VarDumperTestTrait.php', + 'Symfony\\Component\\VarDumper\\VarDumper' => $vendorDir . '/symfony/var-dumper/VarDumper.php', + 'Symfony\\Component\\Yaml\\Command\\LintCommand' => $vendorDir . '/symfony/yaml/Command/LintCommand.php', + 'Symfony\\Component\\Yaml\\Dumper' => $vendorDir . '/symfony/yaml/Dumper.php', + 'Symfony\\Component\\Yaml\\Escaper' => $vendorDir . '/symfony/yaml/Escaper.php', + 'Symfony\\Component\\Yaml\\Exception\\DumpException' => $vendorDir . '/symfony/yaml/Exception/DumpException.php', + 'Symfony\\Component\\Yaml\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/yaml/Exception/ExceptionInterface.php', + 'Symfony\\Component\\Yaml\\Exception\\ParseException' => $vendorDir . '/symfony/yaml/Exception/ParseException.php', + 'Symfony\\Component\\Yaml\\Exception\\RuntimeException' => $vendorDir . '/symfony/yaml/Exception/RuntimeException.php', + 'Symfony\\Component\\Yaml\\Inline' => $vendorDir . '/symfony/yaml/Inline.php', + 'Symfony\\Component\\Yaml\\Parser' => $vendorDir . '/symfony/yaml/Parser.php', + 'Symfony\\Component\\Yaml\\Unescaper' => $vendorDir . '/symfony/yaml/Unescaper.php', + 'Symfony\\Component\\Yaml\\Yaml' => $vendorDir . '/symfony/yaml/Yaml.php', + 'Symfony\\Polyfill\\Mbstring\\Mbstring' => $vendorDir . '/symfony/polyfill-mbstring/Mbstring.php', + 'Tests\\CreatesApplication' => $baseDir . '/tests/CreatesApplication.php', + 'Tests\\Feature\\ExampleTest' => $baseDir . '/tests/Feature/ExampleTest.php', + 'Tests\\TestCase' => $baseDir . '/tests/TestCase.php', + 'Tests\\Unit\\ExampleTest' => $baseDir . '/tests/Unit/ExampleTest.php', + 'Text_Template' => $vendorDir . '/phpunit/php-text-template/src/Template.php', + 'TijsVerkoyen\\CssToInlineStyles\\CssToInlineStyles' => $vendorDir . '/tijsverkoyen/css-to-inline-styles/src/CssToInlineStyles.php', + 'TijsVerkoyen\\CssToInlineStyles\\Css\\Processor' => $vendorDir . '/tijsverkoyen/css-to-inline-styles/src/Css/Processor.php', + 'TijsVerkoyen\\CssToInlineStyles\\Css\\Property\\Processor' => $vendorDir . '/tijsverkoyen/css-to-inline-styles/src/Css/Property/Processor.php', + 'TijsVerkoyen\\CssToInlineStyles\\Css\\Property\\Property' => $vendorDir . '/tijsverkoyen/css-to-inline-styles/src/Css/Property/Property.php', + 'TijsVerkoyen\\CssToInlineStyles\\Css\\Rule\\Processor' => $vendorDir . '/tijsverkoyen/css-to-inline-styles/src/Css/Rule/Processor.php', + 'TijsVerkoyen\\CssToInlineStyles\\Css\\Rule\\Rule' => $vendorDir . '/tijsverkoyen/css-to-inline-styles/src/Css/Rule/Rule.php', + 'Webmozart\\Assert\\Assert' => $vendorDir . '/webmozart/assert/src/Assert.php', + 'XdgBaseDir\\Xdg' => $vendorDir . '/dnoegel/php-xdg-base-dir/src/Xdg.php', + 'phpDocumentor\\Reflection\\DocBlock' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock.php', + 'phpDocumentor\\Reflection\\DocBlockFactory' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlockFactory.php', + 'phpDocumentor\\Reflection\\DocBlockFactoryInterface' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlockFactoryInterface.php', + 'phpDocumentor\\Reflection\\DocBlock\\Description' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock/Description.php', + 'phpDocumentor\\Reflection\\DocBlock\\DescriptionFactory' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock/DescriptionFactory.php', + 'phpDocumentor\\Reflection\\DocBlock\\Serializer' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock/Serializer.php', + 'phpDocumentor\\Reflection\\DocBlock\\StandardTagFactory' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock/StandardTagFactory.php', + 'phpDocumentor\\Reflection\\DocBlock\\Tag' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock/Tag.php', + 'phpDocumentor\\Reflection\\DocBlock\\TagFactory' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock/TagFactory.php', + 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Author' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Author.php', + 'phpDocumentor\\Reflection\\DocBlock\\Tags\\BaseTag' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/BaseTag.php', + 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Covers' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Covers.php', + 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Deprecated' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Deprecated.php', + 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Example' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Example.php', + 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Factory\\StaticMethod' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Factory/StaticMethod.php', + 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Factory\\Strategy' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Factory/Strategy.php', + 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Formatter' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Formatter.php', + 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Formatter\\PassthroughFormatter' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Formatter/PassthroughFormatter.php', + 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Generic' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Generic.php', + 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Link' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Link.php', + 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Method' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Method.php', + 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Param' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Param.php', + 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Property' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Property.php', + 'phpDocumentor\\Reflection\\DocBlock\\Tags\\PropertyRead' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/PropertyRead.php', + 'phpDocumentor\\Reflection\\DocBlock\\Tags\\PropertyWrite' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/PropertyWrite.php', + 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Return_' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Return_.php', + 'phpDocumentor\\Reflection\\DocBlock\\Tags\\See' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/See.php', + 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Since' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Since.php', + 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Source' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Source.php', + 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Throws' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Throws.php', + 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Uses' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Uses.php', + 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Var_' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Var_.php', + 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Version' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Version.php', + 'phpDocumentor\\Reflection\\Element' => $vendorDir . '/phpdocumentor/reflection-common/src/Element.php', + 'phpDocumentor\\Reflection\\ExampleFinder' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock/ExampleFinder.php', + 'phpDocumentor\\Reflection\\File' => $vendorDir . '/phpdocumentor/reflection-common/src/File.php', + 'phpDocumentor\\Reflection\\Fqsen' => $vendorDir . '/phpdocumentor/reflection-common/src/Fqsen.php', + 'phpDocumentor\\Reflection\\FqsenResolver' => $vendorDir . '/phpdocumentor/type-resolver/src/FqsenResolver.php', + 'phpDocumentor\\Reflection\\Location' => $vendorDir . '/phpdocumentor/reflection-common/src/Location.php', + 'phpDocumentor\\Reflection\\Project' => $vendorDir . '/phpdocumentor/reflection-common/src/Project.php', + 'phpDocumentor\\Reflection\\ProjectFactory' => $vendorDir . '/phpdocumentor/reflection-common/src/ProjectFactory.php', + 'phpDocumentor\\Reflection\\Type' => $vendorDir . '/phpdocumentor/type-resolver/src/Type.php', + 'phpDocumentor\\Reflection\\TypeResolver' => $vendorDir . '/phpdocumentor/type-resolver/src/TypeResolver.php', + 'phpDocumentor\\Reflection\\Types\\Array_' => $vendorDir . '/phpdocumentor/type-resolver/src/Types/Array_.php', + 'phpDocumentor\\Reflection\\Types\\Boolean' => $vendorDir . '/phpdocumentor/type-resolver/src/Types/Boolean.php', + 'phpDocumentor\\Reflection\\Types\\Callable_' => $vendorDir . '/phpdocumentor/type-resolver/src/Types/Callable_.php', + 'phpDocumentor\\Reflection\\Types\\Compound' => $vendorDir . '/phpdocumentor/type-resolver/src/Types/Compound.php', + 'phpDocumentor\\Reflection\\Types\\Context' => $vendorDir . '/phpdocumentor/type-resolver/src/Types/Context.php', + 'phpDocumentor\\Reflection\\Types\\ContextFactory' => $vendorDir . '/phpdocumentor/type-resolver/src/Types/ContextFactory.php', + 'phpDocumentor\\Reflection\\Types\\Float_' => $vendorDir . '/phpdocumentor/type-resolver/src/Types/Float_.php', + 'phpDocumentor\\Reflection\\Types\\Integer' => $vendorDir . '/phpdocumentor/type-resolver/src/Types/Integer.php', + 'phpDocumentor\\Reflection\\Types\\Mixed' => $vendorDir . '/phpdocumentor/type-resolver/src/Types/Mixed.php', + 'phpDocumentor\\Reflection\\Types\\Null_' => $vendorDir . '/phpdocumentor/type-resolver/src/Types/Null_.php', + 'phpDocumentor\\Reflection\\Types\\Object_' => $vendorDir . '/phpdocumentor/type-resolver/src/Types/Object_.php', + 'phpDocumentor\\Reflection\\Types\\Resource' => $vendorDir . '/phpdocumentor/type-resolver/src/Types/Resource.php', + 'phpDocumentor\\Reflection\\Types\\Scalar' => $vendorDir . '/phpdocumentor/type-resolver/src/Types/Scalar.php', + 'phpDocumentor\\Reflection\\Types\\Self_' => $vendorDir . '/phpdocumentor/type-resolver/src/Types/Self_.php', + 'phpDocumentor\\Reflection\\Types\\Static_' => $vendorDir . '/phpdocumentor/type-resolver/src/Types/Static_.php', + 'phpDocumentor\\Reflection\\Types\\String_' => $vendorDir . '/phpdocumentor/type-resolver/src/Types/String_.php', + 'phpDocumentor\\Reflection\\Types\\This' => $vendorDir . '/phpdocumentor/type-resolver/src/Types/This.php', + 'phpDocumentor\\Reflection\\Types\\Void_' => $vendorDir . '/phpdocumentor/type-resolver/src/Types/Void_.php', +); diff --git a/vendor/composer/autoload_files.php b/vendor/composer/autoload_files.php new file mode 100644 index 0000000..71ffb11 --- /dev/null +++ b/vendor/composer/autoload_files.php @@ -0,0 +1,17 @@ + $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php', + '667aeda72477189d0494fecd327c3641' => $vendorDir . '/symfony/var-dumper/Resources/functions/dump.php', + '1d1b89d124cc9cb8219922c9d5569199' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest.php', + '2c102faa651ef8ea5874edb585946bce' => $vendorDir . '/swiftmailer/swiftmailer/lib/swift_required.php', + '5255c38a0faeba867671b61dfda6d864' => $vendorDir . '/paragonie/random_compat/lib/random.php', + 'e7223560d890eab89cda23685e711e2c' => $vendorDir . '/psy/psysh/src/Psy/functions.php', + 'f0906e6318348a765ffb6eb24e0d0938' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/helpers.php', + '58571171fd5812e6e447dce228f52f4d' => $vendorDir . '/laravel/framework/src/Illuminate/Support/helpers.php', +); diff --git a/vendor/composer/autoload_namespaces.php b/vendor/composer/autoload_namespaces.php new file mode 100644 index 0000000..ad0de59 --- /dev/null +++ b/vendor/composer/autoload_namespaces.php @@ -0,0 +1,15 @@ + array($vendorDir . '/phpspec/prophecy/src'), + 'Parsedown' => array($vendorDir . '/erusev/parsedown'), + 'Mockery' => array($vendorDir . '/mockery/mockery/library'), + 'JakubOnderka\\PhpConsoleHighlighter' => array($vendorDir . '/jakub-onderka/php-console-highlighter/src'), + 'JakubOnderka\\PhpConsoleColor' => array($vendorDir . '/jakub-onderka/php-console-color/src'), + 'Doctrine\\Common\\Inflector\\' => array($vendorDir . '/doctrine/inflector/lib'), +); diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php new file mode 100644 index 0000000..cc0e0bc --- /dev/null +++ b/vendor/composer/autoload_psr4.php @@ -0,0 +1,42 @@ + array($vendorDir . '/phpdocumentor/reflection-common/src', $vendorDir . '/phpdocumentor/type-resolver/src', $vendorDir . '/phpdocumentor/reflection-docblock/src'), + 'XdgBaseDir\\' => array($vendorDir . '/dnoegel/php-xdg-base-dir/src'), + 'Webmozart\\Assert\\' => array($vendorDir . '/webmozart/assert/src'), + 'TijsVerkoyen\\CssToInlineStyles\\' => array($vendorDir . '/tijsverkoyen/css-to-inline-styles/src'), + 'Tests\\' => array($baseDir . '/tests'), + 'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'), + 'Symfony\\Component\\Yaml\\' => array($vendorDir . '/symfony/yaml'), + 'Symfony\\Component\\VarDumper\\' => array($vendorDir . '/symfony/var-dumper'), + 'Symfony\\Component\\Translation\\' => array($vendorDir . '/symfony/translation'), + 'Symfony\\Component\\Routing\\' => array($vendorDir . '/symfony/routing'), + 'Symfony\\Component\\Process\\' => array($vendorDir . '/symfony/process'), + 'Symfony\\Component\\HttpKernel\\' => array($vendorDir . '/symfony/http-kernel'), + 'Symfony\\Component\\HttpFoundation\\' => array($vendorDir . '/symfony/http-foundation'), + 'Symfony\\Component\\Finder\\' => array($vendorDir . '/symfony/finder'), + 'Symfony\\Component\\EventDispatcher\\' => array($vendorDir . '/symfony/event-dispatcher'), + 'Symfony\\Component\\Debug\\' => array($vendorDir . '/symfony/debug'), + 'Symfony\\Component\\CssSelector\\' => array($vendorDir . '/symfony/css-selector'), + 'Symfony\\Component\\Console\\' => array($vendorDir . '/symfony/console'), + 'Ramsey\\Uuid\\' => array($vendorDir . '/ramsey/uuid/src'), + 'Psy\\' => array($vendorDir . '/psy/psysh/src/Psy'), + 'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'), + 'PhpParser\\' => array($vendorDir . '/nikic/php-parser/lib/PhpParser'), + 'Monolog\\' => array($vendorDir . '/monolog/monolog/src/Monolog'), + 'League\\Flysystem\\' => array($vendorDir . '/league/flysystem/src'), + 'Laravel\\Tinker\\' => array($vendorDir . '/laravel/tinker/src'), + 'Illuminate\\' => array($vendorDir . '/laravel/framework/src/Illuminate'), + 'Faker\\' => array($vendorDir . '/fzaninotto/faker/src/Faker'), + 'Dotenv\\' => array($vendorDir . '/vlucas/phpdotenv/src'), + 'Doctrine\\Instantiator\\' => array($vendorDir . '/doctrine/instantiator/src/Doctrine/Instantiator'), + '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'), +); diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php new file mode 100644 index 0000000..2770fe3 --- /dev/null +++ b/vendor/composer/autoload_real.php @@ -0,0 +1,70 @@ += 50600 && !defined('HHVM_VERSION'); + if ($useStaticLoader) { + require_once __DIR__ . '/autoload_static.php'; + + call_user_func(\Composer\Autoload\ComposerStaticInit9e0cab994f5c6c83d1dfb6de0c194887::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); + } + } + + $loader->register(true); + + if ($useStaticLoader) { + $includeFiles = Composer\Autoload\ComposerStaticInit9e0cab994f5c6c83d1dfb6de0c194887::$files; + } else { + $includeFiles = require __DIR__ . '/autoload_files.php'; + } + foreach ($includeFiles as $fileIdentifier => $file) { + composerRequire9e0cab994f5c6c83d1dfb6de0c194887($fileIdentifier, $file); + } + + return $loader; + } +} + +function composerRequire9e0cab994f5c6c83d1dfb6de0c194887($fileIdentifier, $file) +{ + if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { + require $file; + + $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; + } +} diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php new file mode 100644 index 0000000..1b6de13 --- /dev/null +++ b/vendor/composer/autoload_static.php @@ -0,0 +1,3245 @@ + __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php', + '667aeda72477189d0494fecd327c3641' => __DIR__ . '/..' . '/symfony/var-dumper/Resources/functions/dump.php', + '1d1b89d124cc9cb8219922c9d5569199' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest.php', + '2c102faa651ef8ea5874edb585946bce' => __DIR__ . '/..' . '/swiftmailer/swiftmailer/lib/swift_required.php', + '5255c38a0faeba867671b61dfda6d864' => __DIR__ . '/..' . '/paragonie/random_compat/lib/random.php', + 'e7223560d890eab89cda23685e711e2c' => __DIR__ . '/..' . '/psy/psysh/src/Psy/functions.php', + 'f0906e6318348a765ffb6eb24e0d0938' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/helpers.php', + '58571171fd5812e6e447dce228f52f4d' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/helpers.php', + ); + + public static $prefixLengthsPsr4 = array ( + 'p' => + array ( + 'phpDocumentor\\Reflection\\' => 25, + ), + 'X' => + array ( + 'XdgBaseDir\\' => 11, + ), + 'W' => + array ( + 'Webmozart\\Assert\\' => 17, + ), + 'T' => + array ( + 'TijsVerkoyen\\CssToInlineStyles\\' => 31, + 'Tests\\' => 6, + ), + 'S' => + array ( + 'Symfony\\Polyfill\\Mbstring\\' => 26, + 'Symfony\\Component\\Yaml\\' => 23, + 'Symfony\\Component\\VarDumper\\' => 28, + 'Symfony\\Component\\Translation\\' => 30, + 'Symfony\\Component\\Routing\\' => 26, + 'Symfony\\Component\\Process\\' => 26, + 'Symfony\\Component\\HttpKernel\\' => 29, + 'Symfony\\Component\\HttpFoundation\\' => 33, + 'Symfony\\Component\\Finder\\' => 25, + 'Symfony\\Component\\EventDispatcher\\' => 34, + 'Symfony\\Component\\Debug\\' => 24, + 'Symfony\\Component\\CssSelector\\' => 30, + 'Symfony\\Component\\Console\\' => 26, + ), + 'R' => + array ( + 'Ramsey\\Uuid\\' => 12, + ), + 'P' => + array ( + 'Psy\\' => 4, + 'Psr\\Log\\' => 8, + 'PhpParser\\' => 10, + ), + 'M' => + array ( + 'Monolog\\' => 8, + ), + 'L' => + array ( + 'League\\Flysystem\\' => 17, + 'Laravel\\Tinker\\' => 15, + ), + 'I' => + array ( + 'Illuminate\\' => 11, + ), + 'F' => + array ( + 'Faker\\' => 6, + ), + 'D' => + array ( + 'Dotenv\\' => 7, + 'Doctrine\\Instantiator\\' => 22, + 'DeepCopy\\' => 9, + ), + 'C' => + array ( + 'Cron\\' => 5, + 'Carbon\\' => 7, + ), + 'A' => + array ( + 'App\\' => 4, + ), + ); + + public static $prefixDirsPsr4 = array ( + 'phpDocumentor\\Reflection\\' => + array ( + 0 => __DIR__ . '/..' . '/phpdocumentor/reflection-common/src', + 1 => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src', + 2 => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src', + ), + 'XdgBaseDir\\' => + array ( + 0 => __DIR__ . '/..' . '/dnoegel/php-xdg-base-dir/src', + ), + 'Webmozart\\Assert\\' => + array ( + 0 => __DIR__ . '/..' . '/webmozart/assert/src', + ), + 'TijsVerkoyen\\CssToInlineStyles\\' => + array ( + 0 => __DIR__ . '/..' . '/tijsverkoyen/css-to-inline-styles/src', + ), + 'Tests\\' => + array ( + 0 => __DIR__ . '/../..' . '/tests', + ), + 'Symfony\\Polyfill\\Mbstring\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/polyfill-mbstring', + ), + 'Symfony\\Component\\Yaml\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/yaml', + ), + 'Symfony\\Component\\VarDumper\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/var-dumper', + ), + 'Symfony\\Component\\Translation\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/translation', + ), + 'Symfony\\Component\\Routing\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/routing', + ), + 'Symfony\\Component\\Process\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/process', + ), + 'Symfony\\Component\\HttpKernel\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/http-kernel', + ), + 'Symfony\\Component\\HttpFoundation\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/http-foundation', + ), + 'Symfony\\Component\\Finder\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/finder', + ), + 'Symfony\\Component\\EventDispatcher\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/event-dispatcher', + ), + 'Symfony\\Component\\Debug\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/debug', + ), + 'Symfony\\Component\\CssSelector\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/css-selector', + ), + 'Symfony\\Component\\Console\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/console', + ), + 'Ramsey\\Uuid\\' => + array ( + 0 => __DIR__ . '/..' . '/ramsey/uuid/src', + ), + 'Psy\\' => + array ( + 0 => __DIR__ . '/..' . '/psy/psysh/src/Psy', + ), + 'Psr\\Log\\' => + array ( + 0 => __DIR__ . '/..' . '/psr/log/Psr/Log', + ), + 'PhpParser\\' => + array ( + 0 => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser', + ), + 'Monolog\\' => + array ( + 0 => __DIR__ . '/..' . '/monolog/monolog/src/Monolog', + ), + 'League\\Flysystem\\' => + array ( + 0 => __DIR__ . '/..' . '/league/flysystem/src', + ), + 'Laravel\\Tinker\\' => + array ( + 0 => __DIR__ . '/..' . '/laravel/tinker/src', + ), + 'Illuminate\\' => + array ( + 0 => __DIR__ . '/..' . '/laravel/framework/src/Illuminate', + ), + 'Faker\\' => + array ( + 0 => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker', + ), + 'Dotenv\\' => + array ( + 0 => __DIR__ . '/..' . '/vlucas/phpdotenv/src', + ), + 'Doctrine\\Instantiator\\' => + array ( + 0 => __DIR__ . '/..' . '/doctrine/instantiator/src/Doctrine/Instantiator', + ), + 'DeepCopy\\' => + array ( + 0 => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy', + ), + 'Cron\\' => + array ( + 0 => __DIR__ . '/..' . '/mtdowling/cron-expression/src/Cron', + ), + 'Carbon\\' => + array ( + 0 => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon', + ), + 'App\\' => + array ( + 0 => __DIR__ . '/../..' . '/app', + ), + ); + + public static $prefixesPsr0 = array ( + 'P' => + array ( + 'Prophecy\\' => + array ( + 0 => __DIR__ . '/..' . '/phpspec/prophecy/src', + ), + 'Parsedown' => + array ( + 0 => __DIR__ . '/..' . '/erusev/parsedown', + ), + ), + 'M' => + array ( + 'Mockery' => + array ( + 0 => __DIR__ . '/..' . '/mockery/mockery/library', + ), + ), + 'J' => + array ( + 'JakubOnderka\\PhpConsoleHighlighter' => + array ( + 0 => __DIR__ . '/..' . '/jakub-onderka/php-console-highlighter/src', + ), + 'JakubOnderka\\PhpConsoleColor' => + array ( + 0 => __DIR__ . '/..' . '/jakub-onderka/php-console-color/src', + ), + ), + 'D' => + array ( + 'Doctrine\\Common\\Inflector\\' => + array ( + 0 => __DIR__ . '/..' . '/doctrine/inflector/lib', + ), + ), + ); + + public static $classMap = array ( + 'App\\Console\\Kernel' => __DIR__ . '/../..' . '/app/Console/Kernel.php', + 'App\\Exceptions\\Handler' => __DIR__ . '/../..' . '/app/Exceptions/Handler.php', + 'App\\Http\\Controllers\\Auth\\ForgotPasswordController' => __DIR__ . '/../..' . '/app/Http/Controllers/Auth/ForgotPasswordController.php', + 'App\\Http\\Controllers\\Auth\\LoginController' => __DIR__ . '/../..' . '/app/Http/Controllers/Auth/LoginController.php', + 'App\\Http\\Controllers\\Auth\\RegisterController' => __DIR__ . '/../..' . '/app/Http/Controllers/Auth/RegisterController.php', + 'App\\Http\\Controllers\\Auth\\ResetPasswordController' => __DIR__ . '/../..' . '/app/Http/Controllers/Auth/ResetPasswordController.php', + 'App\\Http\\Controllers\\Controller' => __DIR__ . '/../..' . '/app/Http/Controllers/Controller.php', + 'App\\Http\\Kernel' => __DIR__ . '/../..' . '/app/Http/Kernel.php', + 'App\\Http\\Middleware\\EncryptCookies' => __DIR__ . '/../..' . '/app/Http/Middleware/EncryptCookies.php', + 'App\\Http\\Middleware\\RedirectIfAuthenticated' => __DIR__ . '/../..' . '/app/Http/Middleware/RedirectIfAuthenticated.php', + 'App\\Http\\Middleware\\TrimStrings' => __DIR__ . '/../..' . '/app/Http/Middleware/TrimStrings.php', + 'App\\Http\\Middleware\\VerifyCsrfToken' => __DIR__ . '/../..' . '/app/Http/Middleware/VerifyCsrfToken.php', + 'App\\Providers\\AppServiceProvider' => __DIR__ . '/../..' . '/app/Providers/AppServiceProvider.php', + 'App\\Providers\\AuthServiceProvider' => __DIR__ . '/../..' . '/app/Providers/AuthServiceProvider.php', + 'App\\Providers\\BroadcastServiceProvider' => __DIR__ . '/../..' . '/app/Providers/BroadcastServiceProvider.php', + 'App\\Providers\\EventServiceProvider' => __DIR__ . '/../..' . '/app/Providers/EventServiceProvider.php', + 'App\\Providers\\RouteServiceProvider' => __DIR__ . '/../..' . '/app/Providers/RouteServiceProvider.php', + 'App\\User' => __DIR__ . '/../..' . '/app/User.php', + 'Carbon\\Carbon' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Carbon.php', + 'Carbon\\CarbonInterval' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/CarbonInterval.php', + 'Carbon\\Exceptions\\InvalidDateException' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Exceptions/InvalidDateException.php', + 'CreatePasswordResetsTable' => __DIR__ . '/../..' . '/database/migrations/2014_10_12_100000_create_password_resets_table.php', + 'CreateUsersTable' => __DIR__ . '/../..' . '/database/migrations/2014_10_12_000000_create_users_table.php', + 'Cron\\AbstractField' => __DIR__ . '/..' . '/mtdowling/cron-expression/src/Cron/AbstractField.php', + 'Cron\\CronExpression' => __DIR__ . '/..' . '/mtdowling/cron-expression/src/Cron/CronExpression.php', + 'Cron\\DayOfMonthField' => __DIR__ . '/..' . '/mtdowling/cron-expression/src/Cron/DayOfMonthField.php', + 'Cron\\DayOfWeekField' => __DIR__ . '/..' . '/mtdowling/cron-expression/src/Cron/DayOfWeekField.php', + 'Cron\\FieldFactory' => __DIR__ . '/..' . '/mtdowling/cron-expression/src/Cron/FieldFactory.php', + 'Cron\\FieldInterface' => __DIR__ . '/..' . '/mtdowling/cron-expression/src/Cron/FieldInterface.php', + 'Cron\\HoursField' => __DIR__ . '/..' . '/mtdowling/cron-expression/src/Cron/HoursField.php', + 'Cron\\MinutesField' => __DIR__ . '/..' . '/mtdowling/cron-expression/src/Cron/MinutesField.php', + 'Cron\\MonthField' => __DIR__ . '/..' . '/mtdowling/cron-expression/src/Cron/MonthField.php', + 'Cron\\YearField' => __DIR__ . '/..' . '/mtdowling/cron-expression/src/Cron/YearField.php', + 'DatabaseSeeder' => __DIR__ . '/../..' . '/database/seeds/DatabaseSeeder.php', + 'DeepCopy\\DeepCopy' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/DeepCopy.php', + 'DeepCopy\\Exception\\CloneException' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/Exception/CloneException.php', + 'DeepCopy\\Filter\\Doctrine\\DoctrineCollectionFilter' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineCollectionFilter.php', + 'DeepCopy\\Filter\\Doctrine\\DoctrineEmptyCollectionFilter' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineEmptyCollectionFilter.php', + 'DeepCopy\\Filter\\Doctrine\\DoctrineProxyFilter' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineProxyFilter.php', + 'DeepCopy\\Filter\\Filter' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/Filter/Filter.php', + 'DeepCopy\\Filter\\KeepFilter' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/Filter/KeepFilter.php', + 'DeepCopy\\Filter\\ReplaceFilter' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/Filter/ReplaceFilter.php', + 'DeepCopy\\Filter\\SetNullFilter' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/Filter/SetNullFilter.php', + 'DeepCopy\\Matcher\\Doctrine\\DoctrineProxyMatcher' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/Matcher/Doctrine/DoctrineProxyMatcher.php', + 'DeepCopy\\Matcher\\Matcher' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/Matcher/Matcher.php', + 'DeepCopy\\Matcher\\PropertyMatcher' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyMatcher.php', + 'DeepCopy\\Matcher\\PropertyNameMatcher' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyNameMatcher.php', + 'DeepCopy\\Matcher\\PropertyTypeMatcher' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyTypeMatcher.php', + 'DeepCopy\\Reflection\\ReflectionHelper' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/Reflection/ReflectionHelper.php', + 'DeepCopy\\TypeFilter\\ReplaceFilter' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/TypeFilter/ReplaceFilter.php', + 'DeepCopy\\TypeFilter\\ShallowCopyFilter' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/TypeFilter/ShallowCopyFilter.php', + 'DeepCopy\\TypeFilter\\Spl\\SplDoublyLinkedList' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/TypeFilter/Spl/SplDoublyLinkedList.php', + 'DeepCopy\\TypeFilter\\TypeFilter' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/TypeFilter/TypeFilter.php', + 'DeepCopy\\TypeMatcher\\TypeMatcher' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/TypeMatcher/TypeMatcher.php', + 'Doctrine\\Common\\Inflector\\Inflector' => __DIR__ . '/..' . '/doctrine/inflector/lib/Doctrine/Common/Inflector/Inflector.php', + 'Doctrine\\Instantiator\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/doctrine/instantiator/src/Doctrine/Instantiator/Exception/ExceptionInterface.php', + 'Doctrine\\Instantiator\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/doctrine/instantiator/src/Doctrine/Instantiator/Exception/InvalidArgumentException.php', + 'Doctrine\\Instantiator\\Exception\\UnexpectedValueException' => __DIR__ . '/..' . '/doctrine/instantiator/src/Doctrine/Instantiator/Exception/UnexpectedValueException.php', + 'Doctrine\\Instantiator\\Instantiator' => __DIR__ . '/..' . '/doctrine/instantiator/src/Doctrine/Instantiator/Instantiator.php', + 'Doctrine\\Instantiator\\InstantiatorInterface' => __DIR__ . '/..' . '/doctrine/instantiator/src/Doctrine/Instantiator/InstantiatorInterface.php', + 'Dotenv\\Dotenv' => __DIR__ . '/..' . '/vlucas/phpdotenv/src/Dotenv.php', + 'Dotenv\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/vlucas/phpdotenv/src/Exception/ExceptionInterface.php', + 'Dotenv\\Exception\\InvalidCallbackException' => __DIR__ . '/..' . '/vlucas/phpdotenv/src/Exception/InvalidCallbackException.php', + 'Dotenv\\Exception\\InvalidFileException' => __DIR__ . '/..' . '/vlucas/phpdotenv/src/Exception/InvalidFileException.php', + 'Dotenv\\Exception\\InvalidPathException' => __DIR__ . '/..' . '/vlucas/phpdotenv/src/Exception/InvalidPathException.php', + 'Dotenv\\Exception\\ValidationException' => __DIR__ . '/..' . '/vlucas/phpdotenv/src/Exception/ValidationException.php', + 'Dotenv\\Loader' => __DIR__ . '/..' . '/vlucas/phpdotenv/src/Loader.php', + 'Dotenv\\Validator' => __DIR__ . '/..' . '/vlucas/phpdotenv/src/Validator.php', + 'Faker\\Calculator\\Iban' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Calculator/Iban.php', + 'Faker\\Calculator\\Luhn' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Calculator/Luhn.php', + 'Faker\\DefaultGenerator' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/DefaultGenerator.php', + 'Faker\\Documentor' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Documentor.php', + 'Faker\\Factory' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Factory.php', + 'Faker\\Generator' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Generator.php', + 'Faker\\Guesser\\Name' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Guesser/Name.php', + 'Faker\\ORM\\CakePHP\\ColumnTypeGuesser' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/ORM/CakePHP/ColumnTypeGuesser.php', + 'Faker\\ORM\\CakePHP\\EntityPopulator' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/ORM/CakePHP/EntityPopulator.php', + 'Faker\\ORM\\CakePHP\\Populator' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/ORM/CakePHP/Populator.php', + 'Faker\\ORM\\Doctrine\\ColumnTypeGuesser' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/ORM/Doctrine/ColumnTypeGuesser.php', + 'Faker\\ORM\\Doctrine\\EntityPopulator' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/ORM/Doctrine/EntityPopulator.php', + 'Faker\\ORM\\Doctrine\\Populator' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/ORM/Doctrine/Populator.php', + 'Faker\\ORM\\Mandango\\ColumnTypeGuesser' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/ORM/Mandango/ColumnTypeGuesser.php', + 'Faker\\ORM\\Mandango\\EntityPopulator' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/ORM/Mandango/EntityPopulator.php', + 'Faker\\ORM\\Mandango\\Populator' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/ORM/Mandango/Populator.php', + 'Faker\\ORM\\Propel2\\ColumnTypeGuesser' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/ORM/Propel2/ColumnTypeGuesser.php', + 'Faker\\ORM\\Propel2\\EntityPopulator' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/ORM/Propel2/EntityPopulator.php', + 'Faker\\ORM\\Propel2\\Populator' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/ORM/Propel2/Populator.php', + 'Faker\\ORM\\Propel\\ColumnTypeGuesser' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/ORM/Propel/ColumnTypeGuesser.php', + 'Faker\\ORM\\Propel\\EntityPopulator' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/ORM/Propel/EntityPopulator.php', + 'Faker\\ORM\\Propel\\Populator' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/ORM/Propel/Populator.php', + 'Faker\\ORM\\Spot\\ColumnTypeGuesser' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/ORM/Spot/ColumnTypeGuesser.php', + 'Faker\\ORM\\Spot\\EntityPopulator' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/ORM/Spot/EntityPopulator.php', + 'Faker\\ORM\\Spot\\Populator' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/ORM/Spot/Populator.php', + 'Faker\\Provider\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/Address.php', + 'Faker\\Provider\\Barcode' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/Barcode.php', + 'Faker\\Provider\\Base' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/Base.php', + 'Faker\\Provider\\Biased' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/Biased.php', + 'Faker\\Provider\\Color' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/Color.php', + 'Faker\\Provider\\Company' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/Company.php', + 'Faker\\Provider\\DateTime' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/DateTime.php', + 'Faker\\Provider\\File' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/File.php', + 'Faker\\Provider\\Image' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/Image.php', + 'Faker\\Provider\\Internet' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/Internet.php', + 'Faker\\Provider\\Lorem' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/Lorem.php', + 'Faker\\Provider\\Miscellaneous' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/Miscellaneous.php', + 'Faker\\Provider\\Payment' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/Payment.php', + 'Faker\\Provider\\Person' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/Person.php', + 'Faker\\Provider\\PhoneNumber' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/PhoneNumber.php', + 'Faker\\Provider\\Text' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/Text.php', + 'Faker\\Provider\\UserAgent' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/UserAgent.php', + 'Faker\\Provider\\Uuid' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/Uuid.php', + 'Faker\\Provider\\ar_JO\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/ar_JO/Address.php', + 'Faker\\Provider\\ar_JO\\Company' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/ar_JO/Company.php', + 'Faker\\Provider\\ar_JO\\Internet' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/ar_JO/Internet.php', + 'Faker\\Provider\\ar_JO\\Person' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/ar_JO/Person.php', + 'Faker\\Provider\\ar_JO\\Text' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/ar_JO/Text.php', + 'Faker\\Provider\\ar_SA\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/ar_SA/Address.php', + 'Faker\\Provider\\ar_SA\\Company' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/ar_SA/Company.php', + 'Faker\\Provider\\ar_SA\\Internet' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/ar_SA/Internet.php', + 'Faker\\Provider\\ar_SA\\Person' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/ar_SA/Person.php', + 'Faker\\Provider\\ar_SA\\Text' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/ar_SA/Text.php', + 'Faker\\Provider\\at_AT\\Payment' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/at_AT/Payment.php', + 'Faker\\Provider\\bg_BG\\Internet' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/bg_BG/Internet.php', + 'Faker\\Provider\\bg_BG\\Payment' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/bg_BG/Payment.php', + 'Faker\\Provider\\bg_BG\\Person' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/bg_BG/Person.php', + 'Faker\\Provider\\bg_BG\\PhoneNumber' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/bg_BG/PhoneNumber.php', + 'Faker\\Provider\\bn_BD\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/bn_BD/Address.php', + 'Faker\\Provider\\bn_BD\\Company' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/bn_BD/Company.php', + 'Faker\\Provider\\bn_BD\\Person' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/bn_BD/Person.php', + 'Faker\\Provider\\bn_BD\\PhoneNumber' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/bn_BD/PhoneNumber.php', + 'Faker\\Provider\\bn_BD\\Utils' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/bn_BD/Utils.php', + 'Faker\\Provider\\cs_CZ\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/cs_CZ/Address.php', + 'Faker\\Provider\\cs_CZ\\Company' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/cs_CZ/Company.php', + 'Faker\\Provider\\cs_CZ\\DateTime' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/cs_CZ/DateTime.php', + 'Faker\\Provider\\cs_CZ\\Internet' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/cs_CZ/Internet.php', + 'Faker\\Provider\\cs_CZ\\Payment' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/cs_CZ/Payment.php', + 'Faker\\Provider\\cs_CZ\\Person' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/cs_CZ/Person.php', + 'Faker\\Provider\\cs_CZ\\PhoneNumber' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/cs_CZ/PhoneNumber.php', + 'Faker\\Provider\\cs_CZ\\Text' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/cs_CZ/Text.php', + 'Faker\\Provider\\da_DK\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/da_DK/Address.php', + 'Faker\\Provider\\da_DK\\Company' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/da_DK/Company.php', + 'Faker\\Provider\\da_DK\\Internet' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/da_DK/Internet.php', + 'Faker\\Provider\\da_DK\\Payment' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/da_DK/Payment.php', + 'Faker\\Provider\\da_DK\\Person' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/da_DK/Person.php', + 'Faker\\Provider\\da_DK\\PhoneNumber' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/da_DK/PhoneNumber.php', + 'Faker\\Provider\\de_AT\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/de_AT/Address.php', + 'Faker\\Provider\\de_AT\\Company' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/de_AT/Company.php', + 'Faker\\Provider\\de_AT\\Internet' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/de_AT/Internet.php', + 'Faker\\Provider\\de_AT\\Payment' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/de_AT/Payment.php', + 'Faker\\Provider\\de_AT\\Person' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/de_AT/Person.php', + 'Faker\\Provider\\de_AT\\PhoneNumber' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/de_AT/PhoneNumber.php', + 'Faker\\Provider\\de_AT\\Text' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/de_AT/Text.php', + 'Faker\\Provider\\de_CH\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/de_CH/Address.php', + 'Faker\\Provider\\de_CH\\Company' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/de_CH/Company.php', + 'Faker\\Provider\\de_CH\\Internet' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/de_CH/Internet.php', + 'Faker\\Provider\\de_CH\\Payment' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/de_CH/Payment.php', + 'Faker\\Provider\\de_CH\\Person' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/de_CH/Person.php', + 'Faker\\Provider\\de_CH\\PhoneNumber' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/de_CH/PhoneNumber.php', + 'Faker\\Provider\\de_CH\\Text' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/de_CH/Text.php', + 'Faker\\Provider\\de_DE\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/de_DE/Address.php', + 'Faker\\Provider\\de_DE\\Company' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/de_DE/Company.php', + 'Faker\\Provider\\de_DE\\Internet' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/de_DE/Internet.php', + 'Faker\\Provider\\de_DE\\Payment' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/de_DE/Payment.php', + 'Faker\\Provider\\de_DE\\Person' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/de_DE/Person.php', + 'Faker\\Provider\\de_DE\\PhoneNumber' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/de_DE/PhoneNumber.php', + 'Faker\\Provider\\de_DE\\Text' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/de_DE/Text.php', + 'Faker\\Provider\\el_GR\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/el_GR/Address.php', + 'Faker\\Provider\\el_GR\\Company' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/el_GR/Company.php', + 'Faker\\Provider\\el_GR\\Payment' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/el_GR/Payment.php', + 'Faker\\Provider\\el_GR\\Person' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/el_GR/Person.php', + 'Faker\\Provider\\el_GR\\PhoneNumber' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/el_GR/PhoneNumber.php', + 'Faker\\Provider\\el_GR\\Text' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/el_GR/Text.php', + 'Faker\\Provider\\en_AU\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/en_AU/Address.php', + 'Faker\\Provider\\en_AU\\Internet' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/en_AU/Internet.php', + 'Faker\\Provider\\en_AU\\PhoneNumber' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/en_AU/PhoneNumber.php', + 'Faker\\Provider\\en_CA\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/en_CA/Address.php', + 'Faker\\Provider\\en_CA\\PhoneNumber' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/en_CA/PhoneNumber.php', + 'Faker\\Provider\\en_GB\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/en_GB/Address.php', + 'Faker\\Provider\\en_GB\\Internet' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/en_GB/Internet.php', + 'Faker\\Provider\\en_GB\\Payment' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/en_GB/Payment.php', + 'Faker\\Provider\\en_GB\\Person' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/en_GB/Person.php', + 'Faker\\Provider\\en_GB\\PhoneNumber' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/en_GB/PhoneNumber.php', + 'Faker\\Provider\\en_IN\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/en_IN/Address.php', + 'Faker\\Provider\\en_IN\\Internet' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/en_IN/Internet.php', + 'Faker\\Provider\\en_IN\\Person' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/en_IN/Person.php', + 'Faker\\Provider\\en_IN\\PhoneNumber' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/en_IN/PhoneNumber.php', + 'Faker\\Provider\\en_NZ\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/en_NZ/Address.php', + 'Faker\\Provider\\en_NZ\\Internet' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/en_NZ/Internet.php', + 'Faker\\Provider\\en_NZ\\PhoneNumber' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/en_NZ/PhoneNumber.php', + 'Faker\\Provider\\en_PH\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/en_PH/Address.php', + 'Faker\\Provider\\en_PH\\PhoneNumber' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/en_PH/PhoneNumber.php', + 'Faker\\Provider\\en_SG\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/en_SG/Address.php', + 'Faker\\Provider\\en_SG\\PhoneNumber' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/en_SG/PhoneNumber.php', + 'Faker\\Provider\\en_UG\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/en_UG/Address.php', + 'Faker\\Provider\\en_UG\\Internet' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/en_UG/Internet.php', + 'Faker\\Provider\\en_UG\\Person' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/en_UG/Person.php', + 'Faker\\Provider\\en_UG\\PhoneNumber' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/en_UG/PhoneNumber.php', + 'Faker\\Provider\\en_US\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/en_US/Address.php', + 'Faker\\Provider\\en_US\\Company' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/en_US/Company.php', + 'Faker\\Provider\\en_US\\Payment' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/en_US/Payment.php', + 'Faker\\Provider\\en_US\\Person' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/en_US/Person.php', + 'Faker\\Provider\\en_US\\PhoneNumber' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/en_US/PhoneNumber.php', + 'Faker\\Provider\\en_US\\Text' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/en_US/Text.php', + 'Faker\\Provider\\en_ZA\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/en_ZA/Address.php', + 'Faker\\Provider\\en_ZA\\Company' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/en_ZA/Company.php', + 'Faker\\Provider\\en_ZA\\Internet' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/en_ZA/Internet.php', + 'Faker\\Provider\\en_ZA\\Person' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/en_ZA/Person.php', + 'Faker\\Provider\\en_ZA\\PhoneNumber' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/en_ZA/PhoneNumber.php', + 'Faker\\Provider\\es_AR\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/es_AR/Address.php', + 'Faker\\Provider\\es_AR\\Company' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/es_AR/Company.php', + 'Faker\\Provider\\es_AR\\Person' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/es_AR/Person.php', + 'Faker\\Provider\\es_AR\\PhoneNumber' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/es_AR/PhoneNumber.php', + 'Faker\\Provider\\es_ES\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/es_ES/Address.php', + 'Faker\\Provider\\es_ES\\Company' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/es_ES/Company.php', + 'Faker\\Provider\\es_ES\\Internet' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/es_ES/Internet.php', + 'Faker\\Provider\\es_ES\\Payment' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/es_ES/Payment.php', + 'Faker\\Provider\\es_ES\\Person' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/es_ES/Person.php', + 'Faker\\Provider\\es_ES\\PhoneNumber' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/es_ES/PhoneNumber.php', + 'Faker\\Provider\\es_PE\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/es_PE/Address.php', + 'Faker\\Provider\\es_PE\\Company' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/es_PE/Company.php', + 'Faker\\Provider\\es_PE\\Person' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/es_PE/Person.php', + 'Faker\\Provider\\es_PE\\PhoneNumber' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/es_PE/PhoneNumber.php', + 'Faker\\Provider\\es_VE\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/es_VE/Address.php', + 'Faker\\Provider\\es_VE\\Company' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/es_VE/Company.php', + 'Faker\\Provider\\es_VE\\Internet' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/es_VE/Internet.php', + 'Faker\\Provider\\es_VE\\Person' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/es_VE/Person.php', + 'Faker\\Provider\\es_VE\\PhoneNumber' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/es_VE/PhoneNumber.php', + 'Faker\\Provider\\fa_IR\\Internet' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/fa_IR/Internet.php', + 'Faker\\Provider\\fa_IR\\Person' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/fa_IR/Person.php', + 'Faker\\Provider\\fa_IR\\PhoneNumber' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/fa_IR/PhoneNumber.php', + 'Faker\\Provider\\fa_IR\\Text' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/fa_IR/Text.php', + 'Faker\\Provider\\fi_FI\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/fi_FI/Address.php', + 'Faker\\Provider\\fi_FI\\Company' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/fi_FI/Company.php', + 'Faker\\Provider\\fi_FI\\Internet' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/fi_FI/Internet.php', + 'Faker\\Provider\\fi_FI\\Person' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/fi_FI/Person.php', + 'Faker\\Provider\\fi_FI\\PhoneNumber' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/fi_FI/PhoneNumber.php', + 'Faker\\Provider\\fr_BE\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/fr_BE/Address.php', + 'Faker\\Provider\\fr_BE\\Company' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/fr_BE/Company.php', + 'Faker\\Provider\\fr_BE\\Internet' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/fr_BE/Internet.php', + 'Faker\\Provider\\fr_BE\\Payment' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/fr_BE/Payment.php', + 'Faker\\Provider\\fr_BE\\Person' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/fr_BE/Person.php', + 'Faker\\Provider\\fr_BE\\PhoneNumber' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/fr_BE/PhoneNumber.php', + 'Faker\\Provider\\fr_CA\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/fr_CA/Address.php', + 'Faker\\Provider\\fr_CA\\Person' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/fr_CA/Person.php', + 'Faker\\Provider\\fr_CH\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/fr_CH/Address.php', + 'Faker\\Provider\\fr_CH\\Company' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/fr_CH/Company.php', + 'Faker\\Provider\\fr_CH\\Internet' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/fr_CH/Internet.php', + 'Faker\\Provider\\fr_CH\\Payment' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/fr_CH/Payment.php', + 'Faker\\Provider\\fr_CH\\Person' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/fr_CH/Person.php', + 'Faker\\Provider\\fr_CH\\PhoneNumber' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/fr_CH/PhoneNumber.php', + 'Faker\\Provider\\fr_CH\\Text' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/fr_CH/Text.php', + 'Faker\\Provider\\fr_FR\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/fr_FR/Address.php', + 'Faker\\Provider\\fr_FR\\Company' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/fr_FR/Company.php', + 'Faker\\Provider\\fr_FR\\Internet' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/fr_FR/Internet.php', + 'Faker\\Provider\\fr_FR\\Payment' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/fr_FR/Payment.php', + 'Faker\\Provider\\fr_FR\\Person' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/fr_FR/Person.php', + 'Faker\\Provider\\fr_FR\\PhoneNumber' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/fr_FR/PhoneNumber.php', + 'Faker\\Provider\\fr_FR\\Text' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/fr_FR/Text.php', + 'Faker\\Provider\\he_IL\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/he_IL/Address.php', + 'Faker\\Provider\\he_IL\\Company' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/he_IL/Company.php', + 'Faker\\Provider\\he_IL\\Person' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/he_IL/Person.php', + 'Faker\\Provider\\he_IL\\PhoneNumber' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/he_IL/PhoneNumber.php', + 'Faker\\Provider\\hr_HR\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/hr_HR/Address.php', + 'Faker\\Provider\\hr_HR\\Company' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/hr_HR/Company.php', + 'Faker\\Provider\\hr_HR\\Person' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/hr_HR/Person.php', + 'Faker\\Provider\\hr_HR\\PhoneNumber' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/hr_HR/PhoneNumber.php', + 'Faker\\Provider\\hu_HU\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/hu_HU/Address.php', + 'Faker\\Provider\\hu_HU\\Company' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/hu_HU/Company.php', + 'Faker\\Provider\\hu_HU\\Payment' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/hu_HU/Payment.php', + 'Faker\\Provider\\hu_HU\\Person' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/hu_HU/Person.php', + 'Faker\\Provider\\hu_HU\\PhoneNumber' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/hu_HU/PhoneNumber.php', + 'Faker\\Provider\\hu_HU\\Text' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/hu_HU/Text.php', + 'Faker\\Provider\\hy_AM\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/hy_AM/Address.php', + 'Faker\\Provider\\hy_AM\\Color' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/hy_AM/Color.php', + 'Faker\\Provider\\hy_AM\\Company' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/hy_AM/Company.php', + 'Faker\\Provider\\hy_AM\\Internet' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/hy_AM/Internet.php', + 'Faker\\Provider\\hy_AM\\Person' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/hy_AM/Person.php', + 'Faker\\Provider\\hy_AM\\PhoneNumber' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/hy_AM/PhoneNumber.php', + 'Faker\\Provider\\id_ID\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/id_ID/Address.php', + 'Faker\\Provider\\id_ID\\Company' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/id_ID/Company.php', + 'Faker\\Provider\\id_ID\\Internet' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/id_ID/Internet.php', + 'Faker\\Provider\\id_ID\\Person' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/id_ID/Person.php', + 'Faker\\Provider\\id_ID\\PhoneNumber' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/id_ID/PhoneNumber.php', + 'Faker\\Provider\\is_IS\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/is_IS/Address.php', + 'Faker\\Provider\\is_IS\\Company' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/is_IS/Company.php', + 'Faker\\Provider\\is_IS\\Internet' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/is_IS/Internet.php', + 'Faker\\Provider\\is_IS\\Payment' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/is_IS/Payment.php', + 'Faker\\Provider\\is_IS\\Person' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/is_IS/Person.php', + 'Faker\\Provider\\is_IS\\PhoneNumber' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/is_IS/PhoneNumber.php', + 'Faker\\Provider\\it_CH\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/it_CH/Address.php', + 'Faker\\Provider\\it_CH\\Company' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/it_CH/Company.php', + 'Faker\\Provider\\it_CH\\Internet' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/it_CH/Internet.php', + 'Faker\\Provider\\it_CH\\Payment' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/it_CH/Payment.php', + 'Faker\\Provider\\it_CH\\Person' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/it_CH/Person.php', + 'Faker\\Provider\\it_CH\\PhoneNumber' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/it_CH/PhoneNumber.php', + 'Faker\\Provider\\it_CH\\Text' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/it_CH/Text.php', + 'Faker\\Provider\\it_IT\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/it_IT/Address.php', + 'Faker\\Provider\\it_IT\\Company' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/it_IT/Company.php', + 'Faker\\Provider\\it_IT\\Internet' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/it_IT/Internet.php', + 'Faker\\Provider\\it_IT\\Payment' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/it_IT/Payment.php', + 'Faker\\Provider\\it_IT\\Person' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/it_IT/Person.php', + 'Faker\\Provider\\it_IT\\PhoneNumber' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/it_IT/PhoneNumber.php', + 'Faker\\Provider\\it_IT\\Text' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/it_IT/Text.php', + 'Faker\\Provider\\ja_JP\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/ja_JP/Address.php', + 'Faker\\Provider\\ja_JP\\Company' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/ja_JP/Company.php', + 'Faker\\Provider\\ja_JP\\Internet' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/ja_JP/Internet.php', + 'Faker\\Provider\\ja_JP\\Person' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/ja_JP/Person.php', + 'Faker\\Provider\\ja_JP\\PhoneNumber' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/ja_JP/PhoneNumber.php', + 'Faker\\Provider\\ja_JP\\Text' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/ja_JP/Text.php', + 'Faker\\Provider\\ka_GE\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/ka_GE/Address.php', + 'Faker\\Provider\\ka_GE\\Color' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/ka_GE/Color.php', + 'Faker\\Provider\\ka_GE\\DateTime' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/ka_GE/DateTime.php', + 'Faker\\Provider\\ka_GE\\Internet' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/ka_GE/Internet.php', + 'Faker\\Provider\\ka_GE\\Payment' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/ka_GE/Payment.php', + 'Faker\\Provider\\ka_GE\\Person' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/ka_GE/Person.php', + 'Faker\\Provider\\ka_GE\\PhoneNumber' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/ka_GE/PhoneNumber.php', + 'Faker\\Provider\\ka_GE\\Text' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/ka_GE/Text.php', + 'Faker\\Provider\\kk_KZ\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/kk_KZ/Address.php', + 'Faker\\Provider\\kk_KZ\\Color' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/kk_KZ/Color.php', + 'Faker\\Provider\\kk_KZ\\Company' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/kk_KZ/Company.php', + 'Faker\\Provider\\kk_KZ\\Internet' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/kk_KZ/Internet.php', + 'Faker\\Provider\\kk_KZ\\Payment' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/kk_KZ/Payment.php', + 'Faker\\Provider\\kk_KZ\\Person' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/kk_KZ/Person.php', + 'Faker\\Provider\\kk_KZ\\PhoneNumber' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/kk_KZ/PhoneNumber.php', + 'Faker\\Provider\\kk_KZ\\Text' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/kk_KZ/Text.php', + 'Faker\\Provider\\ko_KR\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/ko_KR/Address.php', + 'Faker\\Provider\\ko_KR\\Company' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/ko_KR/Company.php', + 'Faker\\Provider\\ko_KR\\Internet' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/ko_KR/Internet.php', + 'Faker\\Provider\\ko_KR\\Person' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/ko_KR/Person.php', + 'Faker\\Provider\\ko_KR\\PhoneNumber' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/ko_KR/PhoneNumber.php', + 'Faker\\Provider\\ko_KR\\Text' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/ko_KR/Text.php', + 'Faker\\Provider\\lt_LT\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/lt_LT/Address.php', + 'Faker\\Provider\\lt_LT\\Company' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/lt_LT/Company.php', + 'Faker\\Provider\\lt_LT\\Internet' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/lt_LT/Internet.php', + 'Faker\\Provider\\lt_LT\\Person' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/lt_LT/Person.php', + 'Faker\\Provider\\lt_LT\\PhoneNumber' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/lt_LT/PhoneNumber.php', + 'Faker\\Provider\\lv_LV\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/lv_LV/Address.php', + 'Faker\\Provider\\lv_LV\\Color' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/lv_LV/Color.php', + 'Faker\\Provider\\lv_LV\\Internet' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/lv_LV/Internet.php', + 'Faker\\Provider\\lv_LV\\Payment' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/lv_LV/Payment.php', + 'Faker\\Provider\\lv_LV\\Person' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/lv_LV/Person.php', + 'Faker\\Provider\\lv_LV\\PhoneNumber' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/lv_LV/PhoneNumber.php', + 'Faker\\Provider\\me_ME\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/me_ME/Address.php', + 'Faker\\Provider\\me_ME\\Company' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/me_ME/Company.php', + 'Faker\\Provider\\me_ME\\Payment' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/me_ME/Payment.php', + 'Faker\\Provider\\me_ME\\Person' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/me_ME/Person.php', + 'Faker\\Provider\\me_ME\\PhoneNumber' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/me_ME/PhoneNumber.php', + 'Faker\\Provider\\mn_MN\\Person' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/mn_MN/Person.php', + 'Faker\\Provider\\mn_MN\\PhoneNumber' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/mn_MN/PhoneNumber.php', + 'Faker\\Provider\\nb_NO\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/nb_NO/Address.php', + 'Faker\\Provider\\nb_NO\\Company' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/nb_NO/Company.php', + 'Faker\\Provider\\nb_NO\\Payment' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/nb_NO/Payment.php', + 'Faker\\Provider\\nb_NO\\Person' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/nb_NO/Person.php', + 'Faker\\Provider\\nb_NO\\PhoneNumber' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/nb_NO/PhoneNumber.php', + 'Faker\\Provider\\ne_NP\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/ne_NP/Address.php', + 'Faker\\Provider\\ne_NP\\Internet' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/ne_NP/Internet.php', + 'Faker\\Provider\\ne_NP\\Person' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/ne_NP/Person.php', + 'Faker\\Provider\\ne_NP\\PhoneNumber' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/ne_NP/PhoneNumber.php', + 'Faker\\Provider\\nl_BE\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/nl_BE/Address.php', + 'Faker\\Provider\\nl_BE\\Company' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/nl_BE/Company.php', + 'Faker\\Provider\\nl_BE\\Internet' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/nl_BE/Internet.php', + 'Faker\\Provider\\nl_BE\\Payment' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/nl_BE/Payment.php', + 'Faker\\Provider\\nl_BE\\Person' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/nl_BE/Person.php', + 'Faker\\Provider\\nl_BE\\PhoneNumber' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/nl_BE/PhoneNumber.php', + 'Faker\\Provider\\nl_NL\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/nl_NL/Address.php', + 'Faker\\Provider\\nl_NL\\Color' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/nl_NL/Color.php', + 'Faker\\Provider\\nl_NL\\Company' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/nl_NL/Company.php', + 'Faker\\Provider\\nl_NL\\Internet' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/nl_NL/Internet.php', + 'Faker\\Provider\\nl_NL\\Payment' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/nl_NL/Payment.php', + 'Faker\\Provider\\nl_NL\\Person' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/nl_NL/Person.php', + 'Faker\\Provider\\nl_NL\\PhoneNumber' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/nl_NL/PhoneNumber.php', + 'Faker\\Provider\\nl_NL\\Text' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/nl_NL/Text.php', + 'Faker\\Provider\\pl_PL\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/pl_PL/Address.php', + 'Faker\\Provider\\pl_PL\\Company' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/pl_PL/Company.php', + 'Faker\\Provider\\pl_PL\\Internet' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/pl_PL/Internet.php', + 'Faker\\Provider\\pl_PL\\Payment' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/pl_PL/Payment.php', + 'Faker\\Provider\\pl_PL\\Person' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/pl_PL/Person.php', + 'Faker\\Provider\\pl_PL\\PhoneNumber' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/pl_PL/PhoneNumber.php', + 'Faker\\Provider\\pl_PL\\Text' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/pl_PL/Text.php', + 'Faker\\Provider\\pt_BR\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/pt_BR/Address.php', + 'Faker\\Provider\\pt_BR\\Company' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/pt_BR/Company.php', + 'Faker\\Provider\\pt_BR\\Internet' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/pt_BR/Internet.php', + 'Faker\\Provider\\pt_BR\\Payment' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/pt_BR/Payment.php', + 'Faker\\Provider\\pt_BR\\Person' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/pt_BR/Person.php', + 'Faker\\Provider\\pt_BR\\PhoneNumber' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/pt_BR/PhoneNumber.php', + 'Faker\\Provider\\pt_PT\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/pt_PT/Address.php', + 'Faker\\Provider\\pt_PT\\Payment' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/pt_PT/Payment.php', + 'Faker\\Provider\\pt_PT\\Person' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/pt_PT/Person.php', + 'Faker\\Provider\\pt_PT\\PhoneNumber' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/pt_PT/PhoneNumber.php', + 'Faker\\Provider\\ro_MD\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/ro_MD/Address.php', + 'Faker\\Provider\\ro_MD\\Payment' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/ro_MD/Payment.php', + 'Faker\\Provider\\ro_MD\\Person' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/ro_MD/Person.php', + 'Faker\\Provider\\ro_MD\\PhoneNumber' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/ro_MD/PhoneNumber.php', + 'Faker\\Provider\\ro_RO\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/ro_RO/Address.php', + 'Faker\\Provider\\ro_RO\\Payment' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/ro_RO/Payment.php', + 'Faker\\Provider\\ro_RO\\Person' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/ro_RO/Person.php', + 'Faker\\Provider\\ro_RO\\PhoneNumber' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/ro_RO/PhoneNumber.php', + 'Faker\\Provider\\ru_RU\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/ru_RU/Address.php', + 'Faker\\Provider\\ru_RU\\Color' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/ru_RU/Color.php', + 'Faker\\Provider\\ru_RU\\Company' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/ru_RU/Company.php', + 'Faker\\Provider\\ru_RU\\Internet' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/ru_RU/Internet.php', + 'Faker\\Provider\\ru_RU\\Payment' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/ru_RU/Payment.php', + 'Faker\\Provider\\ru_RU\\Person' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/ru_RU/Person.php', + 'Faker\\Provider\\ru_RU\\PhoneNumber' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/ru_RU/PhoneNumber.php', + 'Faker\\Provider\\ru_RU\\Text' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/ru_RU/Text.php', + 'Faker\\Provider\\sk_SK\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/sk_SK/Address.php', + 'Faker\\Provider\\sk_SK\\Company' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/sk_SK/Company.php', + 'Faker\\Provider\\sk_SK\\Internet' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/sk_SK/Internet.php', + 'Faker\\Provider\\sk_SK\\Payment' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/sk_SK/Payment.php', + 'Faker\\Provider\\sk_SK\\Person' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/sk_SK/Person.php', + 'Faker\\Provider\\sk_SK\\PhoneNumber' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/sk_SK/PhoneNumber.php', + 'Faker\\Provider\\sl_SI\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/sl_SI/Address.php', + 'Faker\\Provider\\sl_SI\\Internet' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/sl_SI/Internet.php', + 'Faker\\Provider\\sl_SI\\Payment' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/sl_SI/Payment.php', + 'Faker\\Provider\\sl_SI\\Person' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/sl_SI/Person.php', + 'Faker\\Provider\\sl_SI\\PhoneNumber' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/sl_SI/PhoneNumber.php', + 'Faker\\Provider\\sr_Cyrl_RS\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/sr_Cyrl_RS/Address.php', + 'Faker\\Provider\\sr_Cyrl_RS\\Payment' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/sr_Cyrl_RS/Payment.php', + 'Faker\\Provider\\sr_Cyrl_RS\\Person' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/sr_Cyrl_RS/Person.php', + 'Faker\\Provider\\sr_Latn_RS\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/sr_Latn_RS/Address.php', + 'Faker\\Provider\\sr_Latn_RS\\Payment' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/sr_Latn_RS/Payment.php', + 'Faker\\Provider\\sr_Latn_RS\\Person' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/sr_Latn_RS/Person.php', + 'Faker\\Provider\\sr_RS\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/sr_RS/Address.php', + 'Faker\\Provider\\sr_RS\\Payment' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/sr_RS/Payment.php', + 'Faker\\Provider\\sr_RS\\Person' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/sr_RS/Person.php', + 'Faker\\Provider\\sv_SE\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/sv_SE/Address.php', + 'Faker\\Provider\\sv_SE\\Company' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/sv_SE/Company.php', + 'Faker\\Provider\\sv_SE\\Payment' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/sv_SE/Payment.php', + 'Faker\\Provider\\sv_SE\\Person' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/sv_SE/Person.php', + 'Faker\\Provider\\sv_SE\\PhoneNumber' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/sv_SE/PhoneNumber.php', + 'Faker\\Provider\\tr_TR\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/tr_TR/Address.php', + 'Faker\\Provider\\tr_TR\\Color' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/tr_TR/Color.php', + 'Faker\\Provider\\tr_TR\\DateTime' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/tr_TR/DateTime.php', + 'Faker\\Provider\\tr_TR\\Internet' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/tr_TR/Internet.php', + 'Faker\\Provider\\tr_TR\\Payment' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/tr_TR/Payment.php', + 'Faker\\Provider\\tr_TR\\Person' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/tr_TR/Person.php', + 'Faker\\Provider\\tr_TR\\PhoneNumber' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/tr_TR/PhoneNumber.php', + 'Faker\\Provider\\uk_UA\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/uk_UA/Address.php', + 'Faker\\Provider\\uk_UA\\Color' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/uk_UA/Color.php', + 'Faker\\Provider\\uk_UA\\Company' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/uk_UA/Company.php', + 'Faker\\Provider\\uk_UA\\Internet' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/uk_UA/Internet.php', + 'Faker\\Provider\\uk_UA\\Person' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/uk_UA/Person.php', + 'Faker\\Provider\\uk_UA\\PhoneNumber' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/uk_UA/PhoneNumber.php', + 'Faker\\Provider\\uk_UA\\Text' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/uk_UA/Text.php', + 'Faker\\Provider\\vi_VN\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/vi_VN/Address.php', + 'Faker\\Provider\\vi_VN\\Color' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/vi_VN/Color.php', + 'Faker\\Provider\\vi_VN\\Internet' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/vi_VN/Internet.php', + 'Faker\\Provider\\vi_VN\\Person' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/vi_VN/Person.php', + 'Faker\\Provider\\vi_VN\\PhoneNumber' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/vi_VN/PhoneNumber.php', + 'Faker\\Provider\\zh_CN\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/zh_CN/Address.php', + 'Faker\\Provider\\zh_CN\\Color' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/zh_CN/Color.php', + 'Faker\\Provider\\zh_CN\\Company' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/zh_CN/Company.php', + 'Faker\\Provider\\zh_CN\\DateTime' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/zh_CN/DateTime.php', + 'Faker\\Provider\\zh_CN\\Internet' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/zh_CN/Internet.php', + 'Faker\\Provider\\zh_CN\\Payment' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/zh_CN/Payment.php', + 'Faker\\Provider\\zh_CN\\Person' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/zh_CN/Person.php', + 'Faker\\Provider\\zh_CN\\PhoneNumber' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/zh_CN/PhoneNumber.php', + 'Faker\\Provider\\zh_TW\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/zh_TW/Address.php', + 'Faker\\Provider\\zh_TW\\Color' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/zh_TW/Color.php', + 'Faker\\Provider\\zh_TW\\Company' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/zh_TW/Company.php', + 'Faker\\Provider\\zh_TW\\DateTime' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/zh_TW/DateTime.php', + 'Faker\\Provider\\zh_TW\\Internet' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/zh_TW/Internet.php', + 'Faker\\Provider\\zh_TW\\Payment' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/zh_TW/Payment.php', + 'Faker\\Provider\\zh_TW\\Person' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/zh_TW/Person.php', + 'Faker\\Provider\\zh_TW\\PhoneNumber' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/zh_TW/PhoneNumber.php', + 'Faker\\Provider\\zh_TW\\Text' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/zh_TW/Text.php', + 'Faker\\UniqueGenerator' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/UniqueGenerator.php', + 'Faker\\ValidGenerator' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/ValidGenerator.php', + 'File_Iterator' => __DIR__ . '/..' . '/phpunit/php-file-iterator/src/Iterator.php', + 'File_Iterator_Facade' => __DIR__ . '/..' . '/phpunit/php-file-iterator/src/Facade.php', + 'File_Iterator_Factory' => __DIR__ . '/..' . '/phpunit/php-file-iterator/src/Factory.php', + 'Hamcrest\\Arrays\\IsArray' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArray.php', + 'Hamcrest\\Arrays\\IsArrayContaining' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContaining.php', + 'Hamcrest\\Arrays\\IsArrayContainingInAnyOrder' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingInAnyOrder.php', + 'Hamcrest\\Arrays\\IsArrayContainingInOrder' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingInOrder.php', + 'Hamcrest\\Arrays\\IsArrayContainingKey' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingKey.php', + 'Hamcrest\\Arrays\\IsArrayContainingKeyValuePair' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingKeyValuePair.php', + 'Hamcrest\\Arrays\\IsArrayWithSize' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayWithSize.php', + 'Hamcrest\\Arrays\\MatchingOnce' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/MatchingOnce.php', + 'Hamcrest\\Arrays\\SeriesMatchingOnce' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/SeriesMatchingOnce.php', + 'Hamcrest\\AssertionError' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/AssertionError.php', + 'Hamcrest\\BaseDescription' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/BaseDescription.php', + 'Hamcrest\\BaseMatcher' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/BaseMatcher.php', + 'Hamcrest\\Collection\\IsEmptyTraversable' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Collection/IsEmptyTraversable.php', + 'Hamcrest\\Collection\\IsTraversableWithSize' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Collection/IsTraversableWithSize.php', + 'Hamcrest\\Core\\AllOf' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/AllOf.php', + 'Hamcrest\\Core\\AnyOf' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/AnyOf.php', + 'Hamcrest\\Core\\CombinableMatcher' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/CombinableMatcher.php', + 'Hamcrest\\Core\\DescribedAs' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/DescribedAs.php', + 'Hamcrest\\Core\\Every' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Every.php', + 'Hamcrest\\Core\\HasToString' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/HasToString.php', + 'Hamcrest\\Core\\Is' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Is.php', + 'Hamcrest\\Core\\IsAnything' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsAnything.php', + 'Hamcrest\\Core\\IsCollectionContaining' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsCollectionContaining.php', + 'Hamcrest\\Core\\IsEqual' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsEqual.php', + 'Hamcrest\\Core\\IsIdentical' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsIdentical.php', + 'Hamcrest\\Core\\IsInstanceOf' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsInstanceOf.php', + 'Hamcrest\\Core\\IsNot' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsNot.php', + 'Hamcrest\\Core\\IsNull' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsNull.php', + 'Hamcrest\\Core\\IsSame' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsSame.php', + 'Hamcrest\\Core\\IsTypeOf' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsTypeOf.php', + 'Hamcrest\\Core\\Set' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Set.php', + 'Hamcrest\\Core\\ShortcutCombination' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/ShortcutCombination.php', + 'Hamcrest\\Description' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Description.php', + 'Hamcrest\\DiagnosingMatcher' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/DiagnosingMatcher.php', + 'Hamcrest\\FeatureMatcher' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/FeatureMatcher.php', + 'Hamcrest\\Internal\\SelfDescribingValue' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Internal/SelfDescribingValue.php', + 'Hamcrest\\Matcher' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Matcher.php', + 'Hamcrest\\MatcherAssert' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/MatcherAssert.php', + 'Hamcrest\\Matchers' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Matchers.php', + 'Hamcrest\\NullDescription' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/NullDescription.php', + 'Hamcrest\\Number\\IsCloseTo' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Number/IsCloseTo.php', + 'Hamcrest\\Number\\OrderingComparison' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Number/OrderingComparison.php', + 'Hamcrest\\SelfDescribing' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/SelfDescribing.php', + 'Hamcrest\\StringDescription' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/StringDescription.php', + 'Hamcrest\\Text\\IsEmptyString' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEmptyString.php', + 'Hamcrest\\Text\\IsEqualIgnoringCase' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEqualIgnoringCase.php', + 'Hamcrest\\Text\\IsEqualIgnoringWhiteSpace' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEqualIgnoringWhiteSpace.php', + 'Hamcrest\\Text\\MatchesPattern' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/MatchesPattern.php', + 'Hamcrest\\Text\\StringContains' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContains.php', + 'Hamcrest\\Text\\StringContainsIgnoringCase' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContainsIgnoringCase.php', + 'Hamcrest\\Text\\StringContainsInOrder' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContainsInOrder.php', + 'Hamcrest\\Text\\StringEndsWith' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringEndsWith.php', + 'Hamcrest\\Text\\StringStartsWith' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringStartsWith.php', + 'Hamcrest\\Text\\SubstringMatcher' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/SubstringMatcher.php', + 'Hamcrest\\TypeSafeDiagnosingMatcher' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/TypeSafeDiagnosingMatcher.php', + 'Hamcrest\\TypeSafeMatcher' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/TypeSafeMatcher.php', + 'Hamcrest\\Type\\IsArray' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsArray.php', + 'Hamcrest\\Type\\IsBoolean' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsBoolean.php', + 'Hamcrest\\Type\\IsCallable' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsCallable.php', + 'Hamcrest\\Type\\IsDouble' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsDouble.php', + 'Hamcrest\\Type\\IsInteger' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsInteger.php', + 'Hamcrest\\Type\\IsNumeric' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsNumeric.php', + 'Hamcrest\\Type\\IsObject' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsObject.php', + 'Hamcrest\\Type\\IsResource' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsResource.php', + 'Hamcrest\\Type\\IsScalar' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsScalar.php', + 'Hamcrest\\Type\\IsString' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsString.php', + 'Hamcrest\\Util' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Util.php', + 'Hamcrest\\Xml\\HasXPath' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Xml/HasXPath.php', + 'Illuminate\\Auth\\Access\\AuthorizationException' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Auth/Access/AuthorizationException.php', + 'Illuminate\\Auth\\Access\\Gate' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Auth/Access/Gate.php', + 'Illuminate\\Auth\\Access\\HandlesAuthorization' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Auth/Access/HandlesAuthorization.php', + 'Illuminate\\Auth\\Access\\Response' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Auth/Access/Response.php', + 'Illuminate\\Auth\\AuthManager' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Auth/AuthManager.php', + 'Illuminate\\Auth\\AuthServiceProvider' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Auth/AuthServiceProvider.php', + 'Illuminate\\Auth\\Authenticatable' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Auth/Authenticatable.php', + 'Illuminate\\Auth\\AuthenticationException' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Auth/AuthenticationException.php', + 'Illuminate\\Auth\\Console\\ClearResetsCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Auth/Console/ClearResetsCommand.php', + 'Illuminate\\Auth\\Console\\MakeAuthCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Auth/Console/MakeAuthCommand.php', + 'Illuminate\\Auth\\CreatesUserProviders' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Auth/CreatesUserProviders.php', + 'Illuminate\\Auth\\DatabaseUserProvider' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Auth/DatabaseUserProvider.php', + 'Illuminate\\Auth\\EloquentUserProvider' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Auth/EloquentUserProvider.php', + 'Illuminate\\Auth\\Events\\Attempting' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Auth/Events/Attempting.php', + 'Illuminate\\Auth\\Events\\Authenticated' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Auth/Events/Authenticated.php', + 'Illuminate\\Auth\\Events\\Failed' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Auth/Events/Failed.php', + 'Illuminate\\Auth\\Events\\Lockout' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Auth/Events/Lockout.php', + 'Illuminate\\Auth\\Events\\Login' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Auth/Events/Login.php', + 'Illuminate\\Auth\\Events\\Logout' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Auth/Events/Logout.php', + 'Illuminate\\Auth\\Events\\Registered' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Auth/Events/Registered.php', + 'Illuminate\\Auth\\GenericUser' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Auth/GenericUser.php', + 'Illuminate\\Auth\\GuardHelpers' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Auth/GuardHelpers.php', + 'Illuminate\\Auth\\Middleware\\Authenticate' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Auth/Middleware/Authenticate.php', + 'Illuminate\\Auth\\Middleware\\AuthenticateWithBasicAuth' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Auth/Middleware/AuthenticateWithBasicAuth.php', + 'Illuminate\\Auth\\Middleware\\Authorize' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Auth/Middleware/Authorize.php', + 'Illuminate\\Auth\\Notifications\\ResetPassword' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Auth/Notifications/ResetPassword.php', + 'Illuminate\\Auth\\Passwords\\CanResetPassword' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Auth/Passwords/CanResetPassword.php', + 'Illuminate\\Auth\\Passwords\\DatabaseTokenRepository' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Auth/Passwords/DatabaseTokenRepository.php', + 'Illuminate\\Auth\\Passwords\\PasswordBroker' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Auth/Passwords/PasswordBroker.php', + 'Illuminate\\Auth\\Passwords\\PasswordBrokerManager' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Auth/Passwords/PasswordBrokerManager.php', + 'Illuminate\\Auth\\Passwords\\PasswordResetServiceProvider' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Auth/Passwords/PasswordResetServiceProvider.php', + 'Illuminate\\Auth\\Passwords\\TokenRepositoryInterface' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Auth/Passwords/TokenRepositoryInterface.php', + 'Illuminate\\Auth\\Recaller' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Auth/Recaller.php', + 'Illuminate\\Auth\\RequestGuard' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Auth/RequestGuard.php', + 'Illuminate\\Auth\\SessionGuard' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Auth/SessionGuard.php', + 'Illuminate\\Auth\\TokenGuard' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Auth/TokenGuard.php', + 'Illuminate\\Broadcasting\\BroadcastController' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Broadcasting/BroadcastController.php', + 'Illuminate\\Broadcasting\\BroadcastEvent' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Broadcasting/BroadcastEvent.php', + 'Illuminate\\Broadcasting\\BroadcastException' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Broadcasting/BroadcastException.php', + 'Illuminate\\Broadcasting\\BroadcastManager' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Broadcasting/BroadcastManager.php', + 'Illuminate\\Broadcasting\\BroadcastServiceProvider' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Broadcasting/BroadcastServiceProvider.php', + 'Illuminate\\Broadcasting\\Broadcasters\\Broadcaster' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/Broadcaster.php', + 'Illuminate\\Broadcasting\\Broadcasters\\LogBroadcaster' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/LogBroadcaster.php', + 'Illuminate\\Broadcasting\\Broadcasters\\NullBroadcaster' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/NullBroadcaster.php', + 'Illuminate\\Broadcasting\\Broadcasters\\PusherBroadcaster' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/PusherBroadcaster.php', + 'Illuminate\\Broadcasting\\Broadcasters\\RedisBroadcaster' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/RedisBroadcaster.php', + 'Illuminate\\Broadcasting\\Channel' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Broadcasting/Channel.php', + 'Illuminate\\Broadcasting\\InteractsWithSockets' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Broadcasting/InteractsWithSockets.php', + 'Illuminate\\Broadcasting\\PendingBroadcast' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Broadcasting/PendingBroadcast.php', + 'Illuminate\\Broadcasting\\PresenceChannel' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Broadcasting/PresenceChannel.php', + 'Illuminate\\Broadcasting\\PrivateChannel' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Broadcasting/PrivateChannel.php', + 'Illuminate\\Bus\\BusServiceProvider' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Bus/BusServiceProvider.php', + 'Illuminate\\Bus\\Dispatcher' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Bus/Dispatcher.php', + 'Illuminate\\Bus\\Queueable' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Bus/Queueable.php', + 'Illuminate\\Cache\\ApcStore' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Cache/ApcStore.php', + 'Illuminate\\Cache\\ApcWrapper' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Cache/ApcWrapper.php', + 'Illuminate\\Cache\\ArrayStore' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Cache/ArrayStore.php', + 'Illuminate\\Cache\\CacheManager' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Cache/CacheManager.php', + 'Illuminate\\Cache\\CacheServiceProvider' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Cache/CacheServiceProvider.php', + 'Illuminate\\Cache\\Console\\CacheTableCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Cache/Console/CacheTableCommand.php', + 'Illuminate\\Cache\\Console\\ClearCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Cache/Console/ClearCommand.php', + 'Illuminate\\Cache\\Console\\ForgetCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Cache/Console/ForgetCommand.php', + 'Illuminate\\Cache\\DatabaseStore' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Cache/DatabaseStore.php', + 'Illuminate\\Cache\\Events\\CacheEvent' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Cache/Events/CacheEvent.php', + 'Illuminate\\Cache\\Events\\CacheHit' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Cache/Events/CacheHit.php', + 'Illuminate\\Cache\\Events\\CacheMissed' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Cache/Events/CacheMissed.php', + 'Illuminate\\Cache\\Events\\KeyForgotten' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Cache/Events/KeyForgotten.php', + 'Illuminate\\Cache\\Events\\KeyWritten' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Cache/Events/KeyWritten.php', + 'Illuminate\\Cache\\FileStore' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Cache/FileStore.php', + 'Illuminate\\Cache\\MemcachedConnector' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Cache/MemcachedConnector.php', + 'Illuminate\\Cache\\MemcachedStore' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Cache/MemcachedStore.php', + 'Illuminate\\Cache\\NullStore' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Cache/NullStore.php', + 'Illuminate\\Cache\\RateLimiter' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Cache/RateLimiter.php', + 'Illuminate\\Cache\\RedisStore' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Cache/RedisStore.php', + 'Illuminate\\Cache\\RedisTaggedCache' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Cache/RedisTaggedCache.php', + 'Illuminate\\Cache\\Repository' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Cache/Repository.php', + 'Illuminate\\Cache\\RetrievesMultipleKeys' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Cache/RetrievesMultipleKeys.php', + 'Illuminate\\Cache\\TagSet' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Cache/TagSet.php', + 'Illuminate\\Cache\\TaggableStore' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Cache/TaggableStore.php', + 'Illuminate\\Cache\\TaggedCache' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Cache/TaggedCache.php', + 'Illuminate\\Config\\Repository' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Config/Repository.php', + 'Illuminate\\Console\\Application' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Console/Application.php', + 'Illuminate\\Console\\Command' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Console/Command.php', + 'Illuminate\\Console\\ConfirmableTrait' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Console/ConfirmableTrait.php', + 'Illuminate\\Console\\DetectsApplicationNamespace' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Console/DetectsApplicationNamespace.php', + 'Illuminate\\Console\\Events\\ArtisanStarting' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Console/Events/ArtisanStarting.php', + 'Illuminate\\Console\\GeneratorCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Console/GeneratorCommand.php', + 'Illuminate\\Console\\OutputStyle' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Console/OutputStyle.php', + 'Illuminate\\Console\\Parser' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Console/Parser.php', + 'Illuminate\\Console\\Scheduling\\CacheMutex' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Console/Scheduling/CacheMutex.php', + 'Illuminate\\Console\\Scheduling\\CallbackEvent' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Console/Scheduling/CallbackEvent.php', + 'Illuminate\\Console\\Scheduling\\CommandBuilder' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Console/Scheduling/CommandBuilder.php', + 'Illuminate\\Console\\Scheduling\\Event' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Console/Scheduling/Event.php', + 'Illuminate\\Console\\Scheduling\\ManagesFrequencies' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Console/Scheduling/ManagesFrequencies.php', + 'Illuminate\\Console\\Scheduling\\Mutex' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Console/Scheduling/Mutex.php', + 'Illuminate\\Console\\Scheduling\\Schedule' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Console/Scheduling/Schedule.php', + 'Illuminate\\Console\\Scheduling\\ScheduleFinishCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Console/Scheduling/ScheduleFinishCommand.php', + 'Illuminate\\Console\\Scheduling\\ScheduleRunCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Console/Scheduling/ScheduleRunCommand.php', + 'Illuminate\\Container\\BoundMethod' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Container/BoundMethod.php', + 'Illuminate\\Container\\Container' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Container/Container.php', + 'Illuminate\\Container\\ContextualBindingBuilder' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Container/ContextualBindingBuilder.php', + 'Illuminate\\Contracts\\Auth\\Access\\Authorizable' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Auth/Access/Authorizable.php', + 'Illuminate\\Contracts\\Auth\\Access\\Gate' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Auth/Access/Gate.php', + 'Illuminate\\Contracts\\Auth\\Authenticatable' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Auth/Authenticatable.php', + 'Illuminate\\Contracts\\Auth\\CanResetPassword' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Auth/CanResetPassword.php', + 'Illuminate\\Contracts\\Auth\\Factory' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Auth/Factory.php', + 'Illuminate\\Contracts\\Auth\\Guard' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Auth/Guard.php', + 'Illuminate\\Contracts\\Auth\\PasswordBroker' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Auth/PasswordBroker.php', + 'Illuminate\\Contracts\\Auth\\PasswordBrokerFactory' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Auth/PasswordBrokerFactory.php', + 'Illuminate\\Contracts\\Auth\\StatefulGuard' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Auth/StatefulGuard.php', + 'Illuminate\\Contracts\\Auth\\SupportsBasicAuth' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Auth/SupportsBasicAuth.php', + 'Illuminate\\Contracts\\Auth\\UserProvider' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Auth/UserProvider.php', + 'Illuminate\\Contracts\\Broadcasting\\Broadcaster' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Broadcasting/Broadcaster.php', + 'Illuminate\\Contracts\\Broadcasting\\Factory' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Broadcasting/Factory.php', + 'Illuminate\\Contracts\\Broadcasting\\ShouldBroadcast' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Broadcasting/ShouldBroadcast.php', + 'Illuminate\\Contracts\\Broadcasting\\ShouldBroadcastNow' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Broadcasting/ShouldBroadcastNow.php', + 'Illuminate\\Contracts\\Bus\\Dispatcher' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Bus/Dispatcher.php', + 'Illuminate\\Contracts\\Bus\\QueueingDispatcher' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Bus/QueueingDispatcher.php', + 'Illuminate\\Contracts\\Cache\\Factory' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Cache/Factory.php', + 'Illuminate\\Contracts\\Cache\\Repository' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Cache/Repository.php', + 'Illuminate\\Contracts\\Cache\\Store' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Cache/Store.php', + 'Illuminate\\Contracts\\Config\\Repository' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Config/Repository.php', + 'Illuminate\\Contracts\\Console\\Application' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Console/Application.php', + 'Illuminate\\Contracts\\Console\\Kernel' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Console/Kernel.php', + 'Illuminate\\Contracts\\Container\\BindingResolutionException' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Container/BindingResolutionException.php', + 'Illuminate\\Contracts\\Container\\Container' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Container/Container.php', + 'Illuminate\\Contracts\\Container\\ContextualBindingBuilder' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Container/ContextualBindingBuilder.php', + 'Illuminate\\Contracts\\Cookie\\Factory' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Cookie/Factory.php', + 'Illuminate\\Contracts\\Cookie\\QueueingFactory' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Cookie/QueueingFactory.php', + 'Illuminate\\Contracts\\Database\\ModelIdentifier' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Database/ModelIdentifier.php', + 'Illuminate\\Contracts\\Debug\\ExceptionHandler' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Debug/ExceptionHandler.php', + 'Illuminate\\Contracts\\Encryption\\DecryptException' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Encryption/DecryptException.php', + 'Illuminate\\Contracts\\Encryption\\EncryptException' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Encryption/EncryptException.php', + 'Illuminate\\Contracts\\Encryption\\Encrypter' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Encryption/Encrypter.php', + 'Illuminate\\Contracts\\Events\\Dispatcher' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Events/Dispatcher.php', + 'Illuminate\\Contracts\\Filesystem\\Cloud' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Filesystem/Cloud.php', + 'Illuminate\\Contracts\\Filesystem\\Factory' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Filesystem/Factory.php', + 'Illuminate\\Contracts\\Filesystem\\FileNotFoundException' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Filesystem/FileNotFoundException.php', + 'Illuminate\\Contracts\\Filesystem\\Filesystem' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Filesystem/Filesystem.php', + 'Illuminate\\Contracts\\Foundation\\Application' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Foundation/Application.php', + 'Illuminate\\Contracts\\Hashing\\Hasher' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Hashing/Hasher.php', + 'Illuminate\\Contracts\\Http\\Kernel' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Http/Kernel.php', + 'Illuminate\\Contracts\\Logging\\Log' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Logging/Log.php', + 'Illuminate\\Contracts\\Mail\\MailQueue' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Mail/MailQueue.php', + 'Illuminate\\Contracts\\Mail\\Mailable' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Mail/Mailable.php', + 'Illuminate\\Contracts\\Mail\\Mailer' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Mail/Mailer.php', + 'Illuminate\\Contracts\\Notifications\\Dispatcher' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Notifications/Dispatcher.php', + 'Illuminate\\Contracts\\Notifications\\Factory' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Notifications/Factory.php', + 'Illuminate\\Contracts\\Pagination\\LengthAwarePaginator' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Pagination/LengthAwarePaginator.php', + 'Illuminate\\Contracts\\Pagination\\Paginator' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Pagination/Paginator.php', + 'Illuminate\\Contracts\\Pipeline\\Hub' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Pipeline/Hub.php', + 'Illuminate\\Contracts\\Pipeline\\Pipeline' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Pipeline/Pipeline.php', + 'Illuminate\\Contracts\\Queue\\EntityNotFoundException' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Queue/EntityNotFoundException.php', + 'Illuminate\\Contracts\\Queue\\EntityResolver' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Queue/EntityResolver.php', + 'Illuminate\\Contracts\\Queue\\Factory' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Queue/Factory.php', + 'Illuminate\\Contracts\\Queue\\Job' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Queue/Job.php', + 'Illuminate\\Contracts\\Queue\\Monitor' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Queue/Monitor.php', + 'Illuminate\\Contracts\\Queue\\Queue' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Queue/Queue.php', + 'Illuminate\\Contracts\\Queue\\QueueableCollection' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Queue/QueueableCollection.php', + 'Illuminate\\Contracts\\Queue\\QueueableEntity' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Queue/QueueableEntity.php', + 'Illuminate\\Contracts\\Queue\\ShouldQueue' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Queue/ShouldQueue.php', + 'Illuminate\\Contracts\\Redis\\Factory' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Redis/Factory.php', + 'Illuminate\\Contracts\\Routing\\BindingRegistrar' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Routing/BindingRegistrar.php', + 'Illuminate\\Contracts\\Routing\\Registrar' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Routing/Registrar.php', + 'Illuminate\\Contracts\\Routing\\ResponseFactory' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Routing/ResponseFactory.php', + 'Illuminate\\Contracts\\Routing\\UrlGenerator' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Routing/UrlGenerator.php', + 'Illuminate\\Contracts\\Routing\\UrlRoutable' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Routing/UrlRoutable.php', + 'Illuminate\\Contracts\\Session\\Session' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Session/Session.php', + 'Illuminate\\Contracts\\Support\\Arrayable' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Support/Arrayable.php', + 'Illuminate\\Contracts\\Support\\Htmlable' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Support/Htmlable.php', + 'Illuminate\\Contracts\\Support\\Jsonable' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Support/Jsonable.php', + 'Illuminate\\Contracts\\Support\\MessageBag' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Support/MessageBag.php', + 'Illuminate\\Contracts\\Support\\MessageProvider' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Support/MessageProvider.php', + 'Illuminate\\Contracts\\Support\\Renderable' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Support/Renderable.php', + 'Illuminate\\Contracts\\Translation\\Translator' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Translation/Translator.php', + 'Illuminate\\Contracts\\Validation\\Factory' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Validation/Factory.php', + 'Illuminate\\Contracts\\Validation\\ValidatesWhenResolved' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Validation/ValidatesWhenResolved.php', + 'Illuminate\\Contracts\\Validation\\Validator' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/Validation/Validator.php', + 'Illuminate\\Contracts\\View\\Factory' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/View/Factory.php', + 'Illuminate\\Contracts\\View\\View' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/View/View.php', + 'Illuminate\\Cookie\\CookieJar' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Cookie/CookieJar.php', + 'Illuminate\\Cookie\\CookieServiceProvider' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Cookie/CookieServiceProvider.php', + 'Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php', + 'Illuminate\\Cookie\\Middleware\\EncryptCookies' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php', + 'Illuminate\\Database\\Capsule\\Manager' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Capsule/Manager.php', + 'Illuminate\\Database\\Concerns\\BuildsQueries' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Concerns/BuildsQueries.php', + 'Illuminate\\Database\\Concerns\\ManagesTransactions' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Concerns/ManagesTransactions.php', + 'Illuminate\\Database\\Connection' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Connection.php', + 'Illuminate\\Database\\ConnectionInterface' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/ConnectionInterface.php', + 'Illuminate\\Database\\ConnectionResolver' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/ConnectionResolver.php', + 'Illuminate\\Database\\ConnectionResolverInterface' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/ConnectionResolverInterface.php', + 'Illuminate\\Database\\Connectors\\ConnectionFactory' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php', + 'Illuminate\\Database\\Connectors\\Connector' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Connectors/Connector.php', + 'Illuminate\\Database\\Connectors\\ConnectorInterface' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Connectors/ConnectorInterface.php', + 'Illuminate\\Database\\Connectors\\MySqlConnector' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Connectors/MySqlConnector.php', + 'Illuminate\\Database\\Connectors\\PostgresConnector' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Connectors/PostgresConnector.php', + 'Illuminate\\Database\\Connectors\\SQLiteConnector' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Connectors/SQLiteConnector.php', + 'Illuminate\\Database\\Connectors\\SqlServerConnector' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Connectors/SqlServerConnector.php', + 'Illuminate\\Database\\Console\\Migrations\\BaseCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Console/Migrations/BaseCommand.php', + 'Illuminate\\Database\\Console\\Migrations\\InstallCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Console/Migrations/InstallCommand.php', + 'Illuminate\\Database\\Console\\Migrations\\MigrateCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php', + 'Illuminate\\Database\\Console\\Migrations\\MigrateMakeCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateMakeCommand.php', + 'Illuminate\\Database\\Console\\Migrations\\RefreshCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Console/Migrations/RefreshCommand.php', + 'Illuminate\\Database\\Console\\Migrations\\ResetCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Console/Migrations/ResetCommand.php', + 'Illuminate\\Database\\Console\\Migrations\\RollbackCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Console/Migrations/RollbackCommand.php', + 'Illuminate\\Database\\Console\\Migrations\\StatusCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Console/Migrations/StatusCommand.php', + 'Illuminate\\Database\\Console\\Seeds\\SeedCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Console/Seeds/SeedCommand.php', + 'Illuminate\\Database\\Console\\Seeds\\SeederMakeCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Console/Seeds/SeederMakeCommand.php', + 'Illuminate\\Database\\DatabaseManager' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/DatabaseManager.php', + 'Illuminate\\Database\\DatabaseServiceProvider' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/DatabaseServiceProvider.php', + 'Illuminate\\Database\\DetectsDeadlocks' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/DetectsDeadlocks.php', + 'Illuminate\\Database\\DetectsLostConnections' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/DetectsLostConnections.php', + 'Illuminate\\Database\\Eloquent\\Builder' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php', + 'Illuminate\\Database\\Eloquent\\Collection' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/Collection.php', + 'Illuminate\\Database\\Eloquent\\Concerns\\GuardsAttributes' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/GuardsAttributes.php', + 'Illuminate\\Database\\Eloquent\\Concerns\\HasAttributes' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php', + 'Illuminate\\Database\\Eloquent\\Concerns\\HasEvents' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasEvents.php', + 'Illuminate\\Database\\Eloquent\\Concerns\\HasGlobalScopes' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasGlobalScopes.php', + 'Illuminate\\Database\\Eloquent\\Concerns\\HasRelationships' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasRelationships.php', + 'Illuminate\\Database\\Eloquent\\Concerns\\HasTimestamps' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasTimestamps.php', + 'Illuminate\\Database\\Eloquent\\Concerns\\HidesAttributes' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HidesAttributes.php', + 'Illuminate\\Database\\Eloquent\\Concerns\\QueriesRelationships' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/QueriesRelationships.php', + 'Illuminate\\Database\\Eloquent\\Factory' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/Factory.php', + 'Illuminate\\Database\\Eloquent\\FactoryBuilder' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/FactoryBuilder.php', + 'Illuminate\\Database\\Eloquent\\JsonEncodingException' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/JsonEncodingException.php', + 'Illuminate\\Database\\Eloquent\\MassAssignmentException' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/MassAssignmentException.php', + 'Illuminate\\Database\\Eloquent\\Model' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/Model.php', + 'Illuminate\\Database\\Eloquent\\ModelNotFoundException' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/ModelNotFoundException.php', + 'Illuminate\\Database\\Eloquent\\QueueEntityResolver' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/QueueEntityResolver.php', + 'Illuminate\\Database\\Eloquent\\RelationNotFoundException' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/RelationNotFoundException.php', + 'Illuminate\\Database\\Eloquent\\Relations\\BelongsTo' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/Relations/BelongsTo.php', + 'Illuminate\\Database\\Eloquent\\Relations\\BelongsToMany' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/Relations/BelongsToMany.php', + 'Illuminate\\Database\\Eloquent\\Relations\\Concerns\\InteractsWithPivotTable' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Concerns/InteractsWithPivotTable.php', + 'Illuminate\\Database\\Eloquent\\Relations\\HasMany' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasMany.php', + 'Illuminate\\Database\\Eloquent\\Relations\\HasManyThrough' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasManyThrough.php', + 'Illuminate\\Database\\Eloquent\\Relations\\HasOne' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOne.php', + 'Illuminate\\Database\\Eloquent\\Relations\\HasOneOrMany' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOneOrMany.php', + 'Illuminate\\Database\\Eloquent\\Relations\\MorphMany' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphMany.php', + 'Illuminate\\Database\\Eloquent\\Relations\\MorphOne' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphOne.php', + 'Illuminate\\Database\\Eloquent\\Relations\\MorphOneOrMany' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphOneOrMany.php', + 'Illuminate\\Database\\Eloquent\\Relations\\MorphPivot' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphPivot.php', + 'Illuminate\\Database\\Eloquent\\Relations\\MorphTo' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphTo.php', + 'Illuminate\\Database\\Eloquent\\Relations\\MorphToMany' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphToMany.php', + 'Illuminate\\Database\\Eloquent\\Relations\\Pivot' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Pivot.php', + 'Illuminate\\Database\\Eloquent\\Relations\\Relation' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Relation.php', + 'Illuminate\\Database\\Eloquent\\Scope' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/Scope.php', + 'Illuminate\\Database\\Eloquent\\SoftDeletes' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/SoftDeletes.php', + 'Illuminate\\Database\\Eloquent\\SoftDeletingScope' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/SoftDeletingScope.php', + 'Illuminate\\Database\\Events\\ConnectionEvent' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Events/ConnectionEvent.php', + 'Illuminate\\Database\\Events\\QueryExecuted' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Events/QueryExecuted.php', + 'Illuminate\\Database\\Events\\StatementPrepared' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Events/StatementPrepared.php', + 'Illuminate\\Database\\Events\\TransactionBeginning' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Events/TransactionBeginning.php', + 'Illuminate\\Database\\Events\\TransactionCommitted' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Events/TransactionCommitted.php', + 'Illuminate\\Database\\Events\\TransactionRolledBack' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Events/TransactionRolledBack.php', + 'Illuminate\\Database\\Grammar' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Grammar.php', + 'Illuminate\\Database\\MigrationServiceProvider' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/MigrationServiceProvider.php', + 'Illuminate\\Database\\Migrations\\DatabaseMigrationRepository' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Migrations/DatabaseMigrationRepository.php', + 'Illuminate\\Database\\Migrations\\Migration' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Migrations/Migration.php', + 'Illuminate\\Database\\Migrations\\MigrationCreator' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Migrations/MigrationCreator.php', + 'Illuminate\\Database\\Migrations\\MigrationRepositoryInterface' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Migrations/MigrationRepositoryInterface.php', + 'Illuminate\\Database\\Migrations\\Migrator' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php', + 'Illuminate\\Database\\MySqlConnection' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/MySqlConnection.php', + 'Illuminate\\Database\\PostgresConnection' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/PostgresConnection.php', + 'Illuminate\\Database\\QueryException' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/QueryException.php', + 'Illuminate\\Database\\Query\\Builder' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Query/Builder.php', + 'Illuminate\\Database\\Query\\Expression' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Query/Expression.php', + 'Illuminate\\Database\\Query\\Grammars\\Grammar' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Query/Grammars/Grammar.php', + 'Illuminate\\Database\\Query\\Grammars\\MySqlGrammar' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Query/Grammars/MySqlGrammar.php', + 'Illuminate\\Database\\Query\\Grammars\\PostgresGrammar' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Query/Grammars/PostgresGrammar.php', + 'Illuminate\\Database\\Query\\Grammars\\SQLiteGrammar' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Query/Grammars/SQLiteGrammar.php', + 'Illuminate\\Database\\Query\\Grammars\\SqlServerGrammar' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Query/Grammars/SqlServerGrammar.php', + 'Illuminate\\Database\\Query\\JoinClause' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Query/JoinClause.php', + 'Illuminate\\Database\\Query\\JsonExpression' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Query/JsonExpression.php', + 'Illuminate\\Database\\Query\\Processors\\MySqlProcessor' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Query/Processors/MySqlProcessor.php', + 'Illuminate\\Database\\Query\\Processors\\PostgresProcessor' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Query/Processors/PostgresProcessor.php', + 'Illuminate\\Database\\Query\\Processors\\Processor' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Query/Processors/Processor.php', + 'Illuminate\\Database\\Query\\Processors\\SQLiteProcessor' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Query/Processors/SQLiteProcessor.php', + 'Illuminate\\Database\\Query\\Processors\\SqlServerProcessor' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Query/Processors/SqlServerProcessor.php', + 'Illuminate\\Database\\SQLiteConnection' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/SQLiteConnection.php', + 'Illuminate\\Database\\Schema\\Blueprint' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Schema/Blueprint.php', + 'Illuminate\\Database\\Schema\\Builder' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Schema/Builder.php', + 'Illuminate\\Database\\Schema\\Grammars\\ChangeColumn' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Schema/Grammars/ChangeColumn.php', + 'Illuminate\\Database\\Schema\\Grammars\\Grammar' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Schema/Grammars/Grammar.php', + 'Illuminate\\Database\\Schema\\Grammars\\MySqlGrammar' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php', + 'Illuminate\\Database\\Schema\\Grammars\\PostgresGrammar' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php', + 'Illuminate\\Database\\Schema\\Grammars\\RenameColumn' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Schema/Grammars/RenameColumn.php', + 'Illuminate\\Database\\Schema\\Grammars\\SQLiteGrammar' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Schema/Grammars/SQLiteGrammar.php', + 'Illuminate\\Database\\Schema\\Grammars\\SqlServerGrammar' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Schema/Grammars/SqlServerGrammar.php', + 'Illuminate\\Database\\Schema\\MySqlBuilder' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Schema/MySqlBuilder.php', + 'Illuminate\\Database\\Schema\\PostgresBuilder' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Schema/PostgresBuilder.php', + 'Illuminate\\Database\\Seeder' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Seeder.php', + 'Illuminate\\Database\\SqlServerConnection' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/SqlServerConnection.php', + 'Illuminate\\Encryption\\Encrypter' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Encryption/Encrypter.php', + 'Illuminate\\Encryption\\EncryptionServiceProvider' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Encryption/EncryptionServiceProvider.php', + 'Illuminate\\Events\\CallQueuedHandler' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Events/CallQueuedHandler.php', + 'Illuminate\\Events\\CallQueuedListener' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Events/CallQueuedListener.php', + 'Illuminate\\Events\\Dispatcher' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Events/Dispatcher.php', + 'Illuminate\\Events\\EventServiceProvider' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Events/EventServiceProvider.php', + 'Illuminate\\Filesystem\\Filesystem' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Filesystem/Filesystem.php', + 'Illuminate\\Filesystem\\FilesystemAdapter' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Filesystem/FilesystemAdapter.php', + 'Illuminate\\Filesystem\\FilesystemManager' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Filesystem/FilesystemManager.php', + 'Illuminate\\Filesystem\\FilesystemServiceProvider' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Filesystem/FilesystemServiceProvider.php', + 'Illuminate\\Foundation\\AliasLoader' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/AliasLoader.php', + 'Illuminate\\Foundation\\Application' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Application.php', + 'Illuminate\\Foundation\\Auth\\Access\\Authorizable' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Auth/Access/Authorizable.php', + 'Illuminate\\Foundation\\Auth\\Access\\AuthorizesRequests' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Auth/Access/AuthorizesRequests.php', + 'Illuminate\\Foundation\\Auth\\AuthenticatesUsers' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Auth/AuthenticatesUsers.php', + 'Illuminate\\Foundation\\Auth\\RedirectsUsers' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Auth/RedirectsUsers.php', + 'Illuminate\\Foundation\\Auth\\RegistersUsers' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Auth/RegistersUsers.php', + 'Illuminate\\Foundation\\Auth\\ResetsPasswords' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Auth/ResetsPasswords.php', + 'Illuminate\\Foundation\\Auth\\SendsPasswordResetEmails' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Auth/SendsPasswordResetEmails.php', + 'Illuminate\\Foundation\\Auth\\ThrottlesLogins' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Auth/ThrottlesLogins.php', + 'Illuminate\\Foundation\\Auth\\User' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Auth/User.php', + 'Illuminate\\Foundation\\Bootstrap\\BootProviders' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Bootstrap/BootProviders.php', + 'Illuminate\\Foundation\\Bootstrap\\HandleExceptions' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php', + 'Illuminate\\Foundation\\Bootstrap\\LoadConfiguration' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Bootstrap/LoadConfiguration.php', + 'Illuminate\\Foundation\\Bootstrap\\LoadEnvironmentVariables' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Bootstrap/LoadEnvironmentVariables.php', + 'Illuminate\\Foundation\\Bootstrap\\RegisterFacades' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Bootstrap/RegisterFacades.php', + 'Illuminate\\Foundation\\Bootstrap\\RegisterProviders' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Bootstrap/RegisterProviders.php', + 'Illuminate\\Foundation\\Bootstrap\\SetRequestForConsole' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Bootstrap/SetRequestForConsole.php', + 'Illuminate\\Foundation\\Bus\\Dispatchable' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Bus/Dispatchable.php', + 'Illuminate\\Foundation\\Bus\\DispatchesJobs' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Bus/DispatchesJobs.php', + 'Illuminate\\Foundation\\Bus\\PendingDispatch' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Bus/PendingDispatch.php', + 'Illuminate\\Foundation\\ComposerScripts' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/ComposerScripts.php', + 'Illuminate\\Foundation\\Console\\AppNameCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Console/AppNameCommand.php', + 'Illuminate\\Foundation\\Console\\ClearCompiledCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Console/ClearCompiledCommand.php', + 'Illuminate\\Foundation\\Console\\ClosureCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Console/ClosureCommand.php', + 'Illuminate\\Foundation\\Console\\ConfigCacheCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Console/ConfigCacheCommand.php', + 'Illuminate\\Foundation\\Console\\ConfigClearCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Console/ConfigClearCommand.php', + 'Illuminate\\Foundation\\Console\\ConsoleMakeCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Console/ConsoleMakeCommand.php', + 'Illuminate\\Foundation\\Console\\DownCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Console/DownCommand.php', + 'Illuminate\\Foundation\\Console\\EnvironmentCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Console/EnvironmentCommand.php', + 'Illuminate\\Foundation\\Console\\EventGenerateCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Console/EventGenerateCommand.php', + 'Illuminate\\Foundation\\Console\\EventMakeCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Console/EventMakeCommand.php', + 'Illuminate\\Foundation\\Console\\JobMakeCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Console/JobMakeCommand.php', + 'Illuminate\\Foundation\\Console\\Kernel' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php', + 'Illuminate\\Foundation\\Console\\KeyGenerateCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Console/KeyGenerateCommand.php', + 'Illuminate\\Foundation\\Console\\ListenerMakeCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Console/ListenerMakeCommand.php', + 'Illuminate\\Foundation\\Console\\MailMakeCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Console/MailMakeCommand.php', + 'Illuminate\\Foundation\\Console\\ModelMakeCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Console/ModelMakeCommand.php', + 'Illuminate\\Foundation\\Console\\NotificationMakeCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Console/NotificationMakeCommand.php', + 'Illuminate\\Foundation\\Console\\OptimizeCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Console/OptimizeCommand.php', + 'Illuminate\\Foundation\\Console\\PolicyMakeCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Console/PolicyMakeCommand.php', + 'Illuminate\\Foundation\\Console\\ProviderMakeCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Console/ProviderMakeCommand.php', + 'Illuminate\\Foundation\\Console\\QueuedCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Console/QueuedCommand.php', + 'Illuminate\\Foundation\\Console\\RequestMakeCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Console/RequestMakeCommand.php', + 'Illuminate\\Foundation\\Console\\RouteCacheCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Console/RouteCacheCommand.php', + 'Illuminate\\Foundation\\Console\\RouteClearCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Console/RouteClearCommand.php', + 'Illuminate\\Foundation\\Console\\RouteListCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Console/RouteListCommand.php', + 'Illuminate\\Foundation\\Console\\ServeCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Console/ServeCommand.php', + 'Illuminate\\Foundation\\Console\\StorageLinkCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Console/StorageLinkCommand.php', + 'Illuminate\\Foundation\\Console\\TestMakeCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Console/TestMakeCommand.php', + 'Illuminate\\Foundation\\Console\\UpCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Console/UpCommand.php', + 'Illuminate\\Foundation\\Console\\VendorPublishCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Console/VendorPublishCommand.php', + 'Illuminate\\Foundation\\Console\\ViewClearCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Console/ViewClearCommand.php', + 'Illuminate\\Foundation\\EnvironmentDetector' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/EnvironmentDetector.php', + 'Illuminate\\Foundation\\Events\\Dispatchable' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Events/Dispatchable.php', + 'Illuminate\\Foundation\\Events\\LocaleUpdated' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Events/LocaleUpdated.php', + 'Illuminate\\Foundation\\Exceptions\\Handler' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php', + 'Illuminate\\Foundation\\Http\\Events\\RequestHandled' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Http/Events/RequestHandled.php', + 'Illuminate\\Foundation\\Http\\Exceptions\\MaintenanceModeException' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Http/Exceptions/MaintenanceModeException.php', + 'Illuminate\\Foundation\\Http\\FormRequest' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Http/FormRequest.php', + 'Illuminate\\Foundation\\Http\\Kernel' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php', + 'Illuminate\\Foundation\\Http\\Middleware\\CheckForMaintenanceMode' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php', + 'Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php', + 'Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php', + 'Illuminate\\Foundation\\Http\\Middleware\\TrimStrings' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php', + 'Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php', + 'Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php', + 'Illuminate\\Foundation\\Inspiring' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Inspiring.php', + 'Illuminate\\Foundation\\ProviderRepository' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php', + 'Illuminate\\Foundation\\Providers\\ArtisanServiceProvider' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Providers/ArtisanServiceProvider.php', + 'Illuminate\\Foundation\\Providers\\ComposerServiceProvider' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Providers/ComposerServiceProvider.php', + 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Providers/ConsoleSupportServiceProvider.php', + 'Illuminate\\Foundation\\Providers\\FormRequestServiceProvider' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Providers/FormRequestServiceProvider.php', + 'Illuminate\\Foundation\\Providers\\FoundationServiceProvider' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Providers/FoundationServiceProvider.php', + 'Illuminate\\Foundation\\Support\\Providers\\AuthServiceProvider' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Support/Providers/AuthServiceProvider.php', + 'Illuminate\\Foundation\\Support\\Providers\\EventServiceProvider' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Support/Providers/EventServiceProvider.php', + 'Illuminate\\Foundation\\Support\\Providers\\RouteServiceProvider' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Support/Providers/RouteServiceProvider.php', + 'Illuminate\\Foundation\\Testing\\Concerns\\InteractsWithAuthentication' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithAuthentication.php', + 'Illuminate\\Foundation\\Testing\\Concerns\\InteractsWithConsole' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithConsole.php', + 'Illuminate\\Foundation\\Testing\\Concerns\\InteractsWithContainer' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithContainer.php', + 'Illuminate\\Foundation\\Testing\\Concerns\\InteractsWithDatabase' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithDatabase.php', + 'Illuminate\\Foundation\\Testing\\Concerns\\InteractsWithSession' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithSession.php', + 'Illuminate\\Foundation\\Testing\\Concerns\\MakesHttpRequests' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/MakesHttpRequests.php', + 'Illuminate\\Foundation\\Testing\\Concerns\\MocksApplicationServices' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/MocksApplicationServices.php', + 'Illuminate\\Foundation\\Testing\\Constraints\\HasInDatabase' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Testing/Constraints/HasInDatabase.php', + 'Illuminate\\Foundation\\Testing\\Constraints\\SoftDeletedInDatabase' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Testing/Constraints/SoftDeletedInDatabase.php', + 'Illuminate\\Foundation\\Testing\\DatabaseMigrations' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Testing/DatabaseMigrations.php', + 'Illuminate\\Foundation\\Testing\\DatabaseTransactions' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Testing/DatabaseTransactions.php', + 'Illuminate\\Foundation\\Testing\\HttpException' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Testing/HttpException.php', + 'Illuminate\\Foundation\\Testing\\TestCase' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Testing/TestCase.php', + 'Illuminate\\Foundation\\Testing\\TestResponse' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Testing/TestResponse.php', + 'Illuminate\\Foundation\\Testing\\WithoutEvents' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Testing/WithoutEvents.php', + 'Illuminate\\Foundation\\Testing\\WithoutMiddleware' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Testing/WithoutMiddleware.php', + 'Illuminate\\Foundation\\Validation\\ValidatesRequests' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Validation/ValidatesRequests.php', + 'Illuminate\\Hashing\\BcryptHasher' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Hashing/BcryptHasher.php', + 'Illuminate\\Hashing\\HashServiceProvider' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Hashing/HashServiceProvider.php', + 'Illuminate\\Http\\Concerns\\InteractsWithContentTypes' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Http/Concerns/InteractsWithContentTypes.php', + 'Illuminate\\Http\\Concerns\\InteractsWithFlashData' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Http/Concerns/InteractsWithFlashData.php', + 'Illuminate\\Http\\Concerns\\InteractsWithInput' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Http/Concerns/InteractsWithInput.php', + 'Illuminate\\Http\\Exceptions\\HttpResponseException' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Http/Exceptions/HttpResponseException.php', + 'Illuminate\\Http\\Exceptions\\PostTooLargeException' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Http/Exceptions/PostTooLargeException.php', + 'Illuminate\\Http\\File' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Http/File.php', + 'Illuminate\\Http\\FileHelpers' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Http/FileHelpers.php', + 'Illuminate\\Http\\JsonResponse' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Http/JsonResponse.php', + 'Illuminate\\Http\\Middleware\\CheckResponseForModifications' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Http/Middleware/CheckResponseForModifications.php', + 'Illuminate\\Http\\Middleware\\FrameGuard' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Http/Middleware/FrameGuard.php', + 'Illuminate\\Http\\RedirectResponse' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Http/RedirectResponse.php', + 'Illuminate\\Http\\Request' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Http/Request.php', + 'Illuminate\\Http\\Response' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Http/Response.php', + 'Illuminate\\Http\\ResponseTrait' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Http/ResponseTrait.php', + 'Illuminate\\Http\\Testing\\File' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Http/Testing/File.php', + 'Illuminate\\Http\\Testing\\FileFactory' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Http/Testing/FileFactory.php', + 'Illuminate\\Http\\Testing\\MimeType' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Http/Testing/MimeType.php', + 'Illuminate\\Http\\UploadedFile' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Http/UploadedFile.php', + 'Illuminate\\Log\\Events\\MessageLogged' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Log/Events/MessageLogged.php', + 'Illuminate\\Log\\LogServiceProvider' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Log/LogServiceProvider.php', + 'Illuminate\\Log\\Writer' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Log/Writer.php', + 'Illuminate\\Mail\\Events\\MessageSending' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Mail/Events/MessageSending.php', + 'Illuminate\\Mail\\Events\\MessageSent' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Mail/Events/MessageSent.php', + 'Illuminate\\Mail\\MailServiceProvider' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Mail/MailServiceProvider.php', + 'Illuminate\\Mail\\Mailable' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Mail/Mailable.php', + 'Illuminate\\Mail\\Mailer' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Mail/Mailer.php', + 'Illuminate\\Mail\\Markdown' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Mail/Markdown.php', + 'Illuminate\\Mail\\Message' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Mail/Message.php', + 'Illuminate\\Mail\\PendingMail' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Mail/PendingMail.php', + 'Illuminate\\Mail\\SendQueuedMailable' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Mail/SendQueuedMailable.php', + 'Illuminate\\Mail\\TransportManager' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Mail/TransportManager.php', + 'Illuminate\\Mail\\Transport\\ArrayTransport' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Mail/Transport/ArrayTransport.php', + 'Illuminate\\Mail\\Transport\\LogTransport' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Mail/Transport/LogTransport.php', + 'Illuminate\\Mail\\Transport\\MailgunTransport' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Mail/Transport/MailgunTransport.php', + 'Illuminate\\Mail\\Transport\\MandrillTransport' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Mail/Transport/MandrillTransport.php', + 'Illuminate\\Mail\\Transport\\SesTransport' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Mail/Transport/SesTransport.php', + 'Illuminate\\Mail\\Transport\\SparkPostTransport' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Mail/Transport/SparkPostTransport.php', + 'Illuminate\\Mail\\Transport\\Transport' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Mail/Transport/Transport.php', + 'Illuminate\\Notifications\\Action' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Notifications/Action.php', + 'Illuminate\\Notifications\\ChannelManager' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Notifications/ChannelManager.php', + 'Illuminate\\Notifications\\Channels\\BroadcastChannel' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Notifications/Channels/BroadcastChannel.php', + 'Illuminate\\Notifications\\Channels\\DatabaseChannel' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Notifications/Channels/DatabaseChannel.php', + 'Illuminate\\Notifications\\Channels\\MailChannel' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Notifications/Channels/MailChannel.php', + 'Illuminate\\Notifications\\Channels\\NexmoSmsChannel' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Notifications/Channels/NexmoSmsChannel.php', + 'Illuminate\\Notifications\\Channels\\SlackWebhookChannel' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Notifications/Channels/SlackWebhookChannel.php', + 'Illuminate\\Notifications\\Console\\NotificationTableCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Notifications/Console/NotificationTableCommand.php', + 'Illuminate\\Notifications\\DatabaseNotification' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Notifications/DatabaseNotification.php', + 'Illuminate\\Notifications\\DatabaseNotificationCollection' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Notifications/DatabaseNotificationCollection.php', + 'Illuminate\\Notifications\\Events\\BroadcastNotificationCreated' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Notifications/Events/BroadcastNotificationCreated.php', + 'Illuminate\\Notifications\\Events\\NotificationFailed' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Notifications/Events/NotificationFailed.php', + 'Illuminate\\Notifications\\Events\\NotificationSending' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Notifications/Events/NotificationSending.php', + 'Illuminate\\Notifications\\Events\\NotificationSent' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Notifications/Events/NotificationSent.php', + 'Illuminate\\Notifications\\HasDatabaseNotifications' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Notifications/HasDatabaseNotifications.php', + 'Illuminate\\Notifications\\Messages\\BroadcastMessage' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Notifications/Messages/BroadcastMessage.php', + 'Illuminate\\Notifications\\Messages\\DatabaseMessage' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Notifications/Messages/DatabaseMessage.php', + 'Illuminate\\Notifications\\Messages\\MailMessage' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Notifications/Messages/MailMessage.php', + 'Illuminate\\Notifications\\Messages\\NexmoMessage' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Notifications/Messages/NexmoMessage.php', + 'Illuminate\\Notifications\\Messages\\SimpleMessage' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Notifications/Messages/SimpleMessage.php', + 'Illuminate\\Notifications\\Messages\\SlackAttachment' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Notifications/Messages/SlackAttachment.php', + 'Illuminate\\Notifications\\Messages\\SlackAttachmentField' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Notifications/Messages/SlackAttachmentField.php', + 'Illuminate\\Notifications\\Messages\\SlackMessage' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Notifications/Messages/SlackMessage.php', + 'Illuminate\\Notifications\\Notifiable' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Notifications/Notifiable.php', + 'Illuminate\\Notifications\\Notification' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Notifications/Notification.php', + 'Illuminate\\Notifications\\NotificationSender' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Notifications/NotificationSender.php', + 'Illuminate\\Notifications\\NotificationServiceProvider' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Notifications/NotificationServiceProvider.php', + 'Illuminate\\Notifications\\RoutesNotifications' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Notifications/RoutesNotifications.php', + 'Illuminate\\Notifications\\SendQueuedNotifications' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Notifications/SendQueuedNotifications.php', + 'Illuminate\\Pagination\\AbstractPaginator' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Pagination/AbstractPaginator.php', + 'Illuminate\\Pagination\\LengthAwarePaginator' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Pagination/LengthAwarePaginator.php', + 'Illuminate\\Pagination\\PaginationServiceProvider' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Pagination/PaginationServiceProvider.php', + 'Illuminate\\Pagination\\Paginator' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Pagination/Paginator.php', + 'Illuminate\\Pagination\\UrlWindow' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Pagination/UrlWindow.php', + 'Illuminate\\Pipeline\\Hub' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Pipeline/Hub.php', + 'Illuminate\\Pipeline\\Pipeline' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Pipeline/Pipeline.php', + 'Illuminate\\Pipeline\\PipelineServiceProvider' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Pipeline/PipelineServiceProvider.php', + 'Illuminate\\Queue\\BeanstalkdQueue' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Queue/BeanstalkdQueue.php', + 'Illuminate\\Queue\\CallQueuedHandler' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php', + 'Illuminate\\Queue\\Capsule\\Manager' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Queue/Capsule/Manager.php', + 'Illuminate\\Queue\\Connectors\\BeanstalkdConnector' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Queue/Connectors/BeanstalkdConnector.php', + 'Illuminate\\Queue\\Connectors\\ConnectorInterface' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Queue/Connectors/ConnectorInterface.php', + 'Illuminate\\Queue\\Connectors\\DatabaseConnector' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Queue/Connectors/DatabaseConnector.php', + 'Illuminate\\Queue\\Connectors\\NullConnector' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Queue/Connectors/NullConnector.php', + 'Illuminate\\Queue\\Connectors\\RedisConnector' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Queue/Connectors/RedisConnector.php', + 'Illuminate\\Queue\\Connectors\\SqsConnector' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Queue/Connectors/SqsConnector.php', + 'Illuminate\\Queue\\Connectors\\SyncConnector' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Queue/Connectors/SyncConnector.php', + 'Illuminate\\Queue\\Console\\FailedTableCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Queue/Console/FailedTableCommand.php', + 'Illuminate\\Queue\\Console\\FlushFailedCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Queue/Console/FlushFailedCommand.php', + 'Illuminate\\Queue\\Console\\ForgetFailedCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Queue/Console/ForgetFailedCommand.php', + 'Illuminate\\Queue\\Console\\ListFailedCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Queue/Console/ListFailedCommand.php', + 'Illuminate\\Queue\\Console\\ListenCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Queue/Console/ListenCommand.php', + 'Illuminate\\Queue\\Console\\RestartCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Queue/Console/RestartCommand.php', + 'Illuminate\\Queue\\Console\\RetryCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Queue/Console/RetryCommand.php', + 'Illuminate\\Queue\\Console\\TableCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Queue/Console/TableCommand.php', + 'Illuminate\\Queue\\Console\\WorkCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php', + 'Illuminate\\Queue\\DatabaseQueue' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Queue/DatabaseQueue.php', + 'Illuminate\\Queue\\Events\\JobExceptionOccurred' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Queue/Events/JobExceptionOccurred.php', + 'Illuminate\\Queue\\Events\\JobFailed' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Queue/Events/JobFailed.php', + 'Illuminate\\Queue\\Events\\JobProcessed' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Queue/Events/JobProcessed.php', + 'Illuminate\\Queue\\Events\\JobProcessing' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Queue/Events/JobProcessing.php', + 'Illuminate\\Queue\\Events\\Looping' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Queue/Events/Looping.php', + 'Illuminate\\Queue\\Events\\WorkerStopping' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Queue/Events/WorkerStopping.php', + 'Illuminate\\Queue\\Failed\\DatabaseFailedJobProvider' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Queue/Failed/DatabaseFailedJobProvider.php', + 'Illuminate\\Queue\\Failed\\FailedJobProviderInterface' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Queue/Failed/FailedJobProviderInterface.php', + 'Illuminate\\Queue\\Failed\\NullFailedJobProvider' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Queue/Failed/NullFailedJobProvider.php', + 'Illuminate\\Queue\\FailingJob' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Queue/FailingJob.php', + 'Illuminate\\Queue\\InteractsWithQueue' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Queue/InteractsWithQueue.php', + 'Illuminate\\Queue\\InteractsWithTime' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Queue/InteractsWithTime.php', + 'Illuminate\\Queue\\InvalidPayloadException' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Queue/InvalidPayloadException.php', + 'Illuminate\\Queue\\Jobs\\BeanstalkdJob' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Queue/Jobs/BeanstalkdJob.php', + 'Illuminate\\Queue\\Jobs\\DatabaseJob' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Queue/Jobs/DatabaseJob.php', + 'Illuminate\\Queue\\Jobs\\DatabaseJobRecord' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Queue/Jobs/DatabaseJobRecord.php', + 'Illuminate\\Queue\\Jobs\\Job' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Queue/Jobs/Job.php', + 'Illuminate\\Queue\\Jobs\\JobName' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Queue/Jobs/JobName.php', + 'Illuminate\\Queue\\Jobs\\RedisJob' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Queue/Jobs/RedisJob.php', + 'Illuminate\\Queue\\Jobs\\SqsJob' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Queue/Jobs/SqsJob.php', + 'Illuminate\\Queue\\Jobs\\SyncJob' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Queue/Jobs/SyncJob.php', + 'Illuminate\\Queue\\Listener' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Queue/Listener.php', + 'Illuminate\\Queue\\ListenerOptions' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Queue/ListenerOptions.php', + 'Illuminate\\Queue\\LuaScripts' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Queue/LuaScripts.php', + 'Illuminate\\Queue\\ManuallyFailedException' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Queue/ManuallyFailedException.php', + 'Illuminate\\Queue\\MaxAttemptsExceededException' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Queue/MaxAttemptsExceededException.php', + 'Illuminate\\Queue\\NullQueue' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Queue/NullQueue.php', + 'Illuminate\\Queue\\Queue' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Queue/Queue.php', + 'Illuminate\\Queue\\QueueManager' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Queue/QueueManager.php', + 'Illuminate\\Queue\\QueueServiceProvider' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Queue/QueueServiceProvider.php', + 'Illuminate\\Queue\\RedisQueue' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Queue/RedisQueue.php', + 'Illuminate\\Queue\\SerializesAndRestoresModelIdentifiers' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Queue/SerializesAndRestoresModelIdentifiers.php', + 'Illuminate\\Queue\\SerializesModels' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Queue/SerializesModels.php', + 'Illuminate\\Queue\\SqsQueue' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Queue/SqsQueue.php', + 'Illuminate\\Queue\\SyncQueue' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Queue/SyncQueue.php', + 'Illuminate\\Queue\\Worker' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Queue/Worker.php', + 'Illuminate\\Queue\\WorkerOptions' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Queue/WorkerOptions.php', + 'Illuminate\\Redis\\Connections\\Connection' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Redis/Connections/Connection.php', + 'Illuminate\\Redis\\Connections\\PhpRedisClusterConnection' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Redis/Connections/PhpRedisClusterConnection.php', + 'Illuminate\\Redis\\Connections\\PhpRedisConnection' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Redis/Connections/PhpRedisConnection.php', + 'Illuminate\\Redis\\Connections\\PredisClusterConnection' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Redis/Connections/PredisClusterConnection.php', + 'Illuminate\\Redis\\Connections\\PredisConnection' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Redis/Connections/PredisConnection.php', + 'Illuminate\\Redis\\Connectors\\PhpRedisConnector' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Redis/Connectors/PhpRedisConnector.php', + 'Illuminate\\Redis\\Connectors\\PredisConnector' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Redis/Connectors/PredisConnector.php', + 'Illuminate\\Redis\\RedisManager' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Redis/RedisManager.php', + 'Illuminate\\Redis\\RedisServiceProvider' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Redis/RedisServiceProvider.php', + 'Illuminate\\Routing\\Console\\ControllerMakeCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Routing/Console/ControllerMakeCommand.php', + 'Illuminate\\Routing\\Console\\MiddlewareMakeCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Routing/Console/MiddlewareMakeCommand.php', + 'Illuminate\\Routing\\Controller' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Routing/Controller.php', + 'Illuminate\\Routing\\ControllerDispatcher' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php', + 'Illuminate\\Routing\\ControllerMiddlewareOptions' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Routing/ControllerMiddlewareOptions.php', + 'Illuminate\\Routing\\Events\\RouteMatched' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Routing/Events/RouteMatched.php', + 'Illuminate\\Routing\\Exceptions\\UrlGenerationException' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Routing/Exceptions/UrlGenerationException.php', + 'Illuminate\\Routing\\ImplicitRouteBinding' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Routing/ImplicitRouteBinding.php', + 'Illuminate\\Routing\\Matching\\HostValidator' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Routing/Matching/HostValidator.php', + 'Illuminate\\Routing\\Matching\\MethodValidator' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Routing/Matching/MethodValidator.php', + 'Illuminate\\Routing\\Matching\\SchemeValidator' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Routing/Matching/SchemeValidator.php', + 'Illuminate\\Routing\\Matching\\UriValidator' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Routing/Matching/UriValidator.php', + 'Illuminate\\Routing\\Matching\\ValidatorInterface' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Routing/Matching/ValidatorInterface.php', + 'Illuminate\\Routing\\MiddlewareNameResolver' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Routing/MiddlewareNameResolver.php', + 'Illuminate\\Routing\\Middleware\\SubstituteBindings' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php', + 'Illuminate\\Routing\\Middleware\\ThrottleRequests' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php', + 'Illuminate\\Routing\\Pipeline' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Routing/Pipeline.php', + 'Illuminate\\Routing\\Redirector' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Routing/Redirector.php', + 'Illuminate\\Routing\\ResourceRegistrar' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Routing/ResourceRegistrar.php', + 'Illuminate\\Routing\\ResponseFactory' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Routing/ResponseFactory.php', + 'Illuminate\\Routing\\Route' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Routing/Route.php', + 'Illuminate\\Routing\\RouteAction' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Routing/RouteAction.php', + 'Illuminate\\Routing\\RouteBinding' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Routing/RouteBinding.php', + 'Illuminate\\Routing\\RouteCollection' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Routing/RouteCollection.php', + 'Illuminate\\Routing\\RouteCompiler' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Routing/RouteCompiler.php', + 'Illuminate\\Routing\\RouteDependencyResolverTrait' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Routing/RouteDependencyResolverTrait.php', + 'Illuminate\\Routing\\RouteGroup' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Routing/RouteGroup.php', + 'Illuminate\\Routing\\RouteParameterBinder' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Routing/RouteParameterBinder.php', + 'Illuminate\\Routing\\RouteRegistrar' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Routing/RouteRegistrar.php', + 'Illuminate\\Routing\\RouteSignatureParameters' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Routing/RouteSignatureParameters.php', + 'Illuminate\\Routing\\RouteUrlGenerator' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Routing/RouteUrlGenerator.php', + 'Illuminate\\Routing\\Router' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Routing/Router.php', + 'Illuminate\\Routing\\RoutingServiceProvider' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Routing/RoutingServiceProvider.php', + 'Illuminate\\Routing\\SortedMiddleware' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Routing/SortedMiddleware.php', + 'Illuminate\\Routing\\UrlGenerator' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Routing/UrlGenerator.php', + 'Illuminate\\Session\\CacheBasedSessionHandler' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Session/CacheBasedSessionHandler.php', + 'Illuminate\\Session\\Console\\SessionTableCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Session/Console/SessionTableCommand.php', + 'Illuminate\\Session\\CookieSessionHandler' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Session/CookieSessionHandler.php', + 'Illuminate\\Session\\DatabaseSessionHandler' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Session/DatabaseSessionHandler.php', + 'Illuminate\\Session\\EncryptedStore' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Session/EncryptedStore.php', + 'Illuminate\\Session\\ExistenceAwareInterface' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Session/ExistenceAwareInterface.php', + 'Illuminate\\Session\\FileSessionHandler' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Session/FileSessionHandler.php', + 'Illuminate\\Session\\Middleware\\AuthenticateSession' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Session/Middleware/AuthenticateSession.php', + 'Illuminate\\Session\\Middleware\\StartSession' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php', + 'Illuminate\\Session\\SessionManager' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Session/SessionManager.php', + 'Illuminate\\Session\\SessionServiceProvider' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Session/SessionServiceProvider.php', + 'Illuminate\\Session\\Store' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Session/Store.php', + 'Illuminate\\Session\\TokenMismatchException' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Session/TokenMismatchException.php', + 'Illuminate\\Support\\AggregateServiceProvider' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/AggregateServiceProvider.php', + 'Illuminate\\Support\\Arr' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/Arr.php', + 'Illuminate\\Support\\Collection' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/Collection.php', + 'Illuminate\\Support\\Composer' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/Composer.php', + 'Illuminate\\Support\\Debug\\Dumper' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/Debug/Dumper.php', + 'Illuminate\\Support\\Debug\\HtmlDumper' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/Debug/HtmlDumper.php', + 'Illuminate\\Support\\Facades\\App' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/Facades/App.php', + 'Illuminate\\Support\\Facades\\Artisan' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/Facades/Artisan.php', + 'Illuminate\\Support\\Facades\\Auth' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/Facades/Auth.php', + 'Illuminate\\Support\\Facades\\Blade' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/Facades/Blade.php', + 'Illuminate\\Support\\Facades\\Broadcast' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/Facades/Broadcast.php', + 'Illuminate\\Support\\Facades\\Bus' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/Facades/Bus.php', + 'Illuminate\\Support\\Facades\\Cache' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/Facades/Cache.php', + 'Illuminate\\Support\\Facades\\Config' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/Facades/Config.php', + 'Illuminate\\Support\\Facades\\Cookie' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/Facades/Cookie.php', + 'Illuminate\\Support\\Facades\\Crypt' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/Facades/Crypt.php', + 'Illuminate\\Support\\Facades\\DB' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/Facades/DB.php', + 'Illuminate\\Support\\Facades\\Event' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/Facades/Event.php', + 'Illuminate\\Support\\Facades\\Facade' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/Facades/Facade.php', + 'Illuminate\\Support\\Facades\\File' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/Facades/File.php', + 'Illuminate\\Support\\Facades\\Gate' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/Facades/Gate.php', + 'Illuminate\\Support\\Facades\\Hash' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/Facades/Hash.php', + 'Illuminate\\Support\\Facades\\Input' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/Facades/Input.php', + 'Illuminate\\Support\\Facades\\Lang' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/Facades/Lang.php', + 'Illuminate\\Support\\Facades\\Log' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/Facades/Log.php', + 'Illuminate\\Support\\Facades\\Mail' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/Facades/Mail.php', + 'Illuminate\\Support\\Facades\\Notification' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/Facades/Notification.php', + 'Illuminate\\Support\\Facades\\Password' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/Facades/Password.php', + 'Illuminate\\Support\\Facades\\Queue' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/Facades/Queue.php', + 'Illuminate\\Support\\Facades\\Redirect' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/Facades/Redirect.php', + 'Illuminate\\Support\\Facades\\Redis' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/Facades/Redis.php', + 'Illuminate\\Support\\Facades\\Request' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/Facades/Request.php', + 'Illuminate\\Support\\Facades\\Response' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/Facades/Response.php', + 'Illuminate\\Support\\Facades\\Route' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/Facades/Route.php', + 'Illuminate\\Support\\Facades\\Schema' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/Facades/Schema.php', + 'Illuminate\\Support\\Facades\\Session' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/Facades/Session.php', + 'Illuminate\\Support\\Facades\\Storage' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/Facades/Storage.php', + 'Illuminate\\Support\\Facades\\URL' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/Facades/URL.php', + 'Illuminate\\Support\\Facades\\Validator' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/Facades/Validator.php', + 'Illuminate\\Support\\Facades\\View' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/Facades/View.php', + 'Illuminate\\Support\\Fluent' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/Fluent.php', + 'Illuminate\\Support\\HigherOrderCollectionProxy' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/HigherOrderCollectionProxy.php', + 'Illuminate\\Support\\HtmlString' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/HtmlString.php', + 'Illuminate\\Support\\Manager' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/Manager.php', + 'Illuminate\\Support\\MessageBag' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/MessageBag.php', + 'Illuminate\\Support\\NamespacedItemResolver' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/NamespacedItemResolver.php', + 'Illuminate\\Support\\Pluralizer' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/Pluralizer.php', + 'Illuminate\\Support\\ServiceProvider' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/ServiceProvider.php', + 'Illuminate\\Support\\Str' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/Str.php', + 'Illuminate\\Support\\Testing\\Fakes\\BusFake' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/Testing/Fakes/BusFake.php', + 'Illuminate\\Support\\Testing\\Fakes\\EventFake' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/Testing/Fakes/EventFake.php', + 'Illuminate\\Support\\Testing\\Fakes\\MailFake' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/Testing/Fakes/MailFake.php', + 'Illuminate\\Support\\Testing\\Fakes\\NotificationFake' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/Testing/Fakes/NotificationFake.php', + 'Illuminate\\Support\\Testing\\Fakes\\PendingMailFake' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/Testing/Fakes/PendingMailFake.php', + 'Illuminate\\Support\\Testing\\Fakes\\QueueFake' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/Testing/Fakes/QueueFake.php', + 'Illuminate\\Support\\Traits\\CapsuleManagerTrait' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/Traits/CapsuleManagerTrait.php', + 'Illuminate\\Support\\Traits\\Macroable' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/Traits/Macroable.php', + 'Illuminate\\Support\\ViewErrorBag' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/ViewErrorBag.php', + 'Illuminate\\Translation\\ArrayLoader' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Translation/ArrayLoader.php', + 'Illuminate\\Translation\\FileLoader' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Translation/FileLoader.php', + 'Illuminate\\Translation\\LoaderInterface' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Translation/LoaderInterface.php', + 'Illuminate\\Translation\\MessageSelector' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Translation/MessageSelector.php', + 'Illuminate\\Translation\\TranslationServiceProvider' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Translation/TranslationServiceProvider.php', + 'Illuminate\\Translation\\Translator' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Translation/Translator.php', + 'Illuminate\\Validation\\Concerns\\FormatsMessages' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Validation/Concerns/FormatsMessages.php', + 'Illuminate\\Validation\\Concerns\\ReplacesAttributes' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Validation/Concerns/ReplacesAttributes.php', + 'Illuminate\\Validation\\Concerns\\ValidatesAttributes' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Validation/Concerns/ValidatesAttributes.php', + 'Illuminate\\Validation\\DatabasePresenceVerifier' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Validation/DatabasePresenceVerifier.php', + 'Illuminate\\Validation\\Factory' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Validation/Factory.php', + 'Illuminate\\Validation\\PresenceVerifierInterface' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Validation/PresenceVerifierInterface.php', + 'Illuminate\\Validation\\Rule' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Validation/Rule.php', + 'Illuminate\\Validation\\Rules\\Dimensions' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Validation/Rules/Dimensions.php', + 'Illuminate\\Validation\\Rules\\Exists' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Validation/Rules/Exists.php', + 'Illuminate\\Validation\\Rules\\In' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Validation/Rules/In.php', + 'Illuminate\\Validation\\Rules\\NotIn' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Validation/Rules/NotIn.php', + 'Illuminate\\Validation\\Rules\\Unique' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Validation/Rules/Unique.php', + 'Illuminate\\Validation\\UnauthorizedException' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Validation/UnauthorizedException.php', + 'Illuminate\\Validation\\ValidatesWhenResolvedTrait' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Validation/ValidatesWhenResolvedTrait.php', + 'Illuminate\\Validation\\ValidationData' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Validation/ValidationData.php', + 'Illuminate\\Validation\\ValidationException' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Validation/ValidationException.php', + 'Illuminate\\Validation\\ValidationRuleParser' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Validation/ValidationRuleParser.php', + 'Illuminate\\Validation\\ValidationServiceProvider' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Validation/ValidationServiceProvider.php', + 'Illuminate\\Validation\\Validator' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Validation/Validator.php', + 'Illuminate\\View\\Compilers\\BladeCompiler' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/View/Compilers/BladeCompiler.php', + 'Illuminate\\View\\Compilers\\Compiler' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/View/Compilers/Compiler.php', + 'Illuminate\\View\\Compilers\\CompilerInterface' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/View/Compilers/CompilerInterface.php', + 'Illuminate\\View\\Compilers\\Concerns\\CompilesAuthorizations' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesAuthorizations.php', + 'Illuminate\\View\\Compilers\\Concerns\\CompilesComments' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesComments.php', + 'Illuminate\\View\\Compilers\\Concerns\\CompilesComponents' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesComponents.php', + 'Illuminate\\View\\Compilers\\Concerns\\CompilesConditionals' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesConditionals.php', + 'Illuminate\\View\\Compilers\\Concerns\\CompilesEchos' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesEchos.php', + 'Illuminate\\View\\Compilers\\Concerns\\CompilesIncludes' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesIncludes.php', + 'Illuminate\\View\\Compilers\\Concerns\\CompilesInjections' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesInjections.php', + 'Illuminate\\View\\Compilers\\Concerns\\CompilesLayouts' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesLayouts.php', + 'Illuminate\\View\\Compilers\\Concerns\\CompilesLoops' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesLoops.php', + 'Illuminate\\View\\Compilers\\Concerns\\CompilesRawPhp' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesRawPhp.php', + 'Illuminate\\View\\Compilers\\Concerns\\CompilesStacks' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesStacks.php', + 'Illuminate\\View\\Compilers\\Concerns\\CompilesTranslations' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesTranslations.php', + 'Illuminate\\View\\Concerns\\ManagesComponents' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/View/Concerns/ManagesComponents.php', + 'Illuminate\\View\\Concerns\\ManagesEvents' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/View/Concerns/ManagesEvents.php', + 'Illuminate\\View\\Concerns\\ManagesLayouts' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/View/Concerns/ManagesLayouts.php', + 'Illuminate\\View\\Concerns\\ManagesLoops' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/View/Concerns/ManagesLoops.php', + 'Illuminate\\View\\Concerns\\ManagesStacks' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/View/Concerns/ManagesStacks.php', + 'Illuminate\\View\\Concerns\\ManagesTranslations' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/View/Concerns/ManagesTranslations.php', + 'Illuminate\\View\\Engines\\CompilerEngine' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php', + 'Illuminate\\View\\Engines\\Engine' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/View/Engines/Engine.php', + 'Illuminate\\View\\Engines\\EngineInterface' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/View/Engines/EngineInterface.php', + 'Illuminate\\View\\Engines\\EngineResolver' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/View/Engines/EngineResolver.php', + 'Illuminate\\View\\Engines\\FileEngine' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/View/Engines/FileEngine.php', + 'Illuminate\\View\\Engines\\PhpEngine' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/View/Engines/PhpEngine.php', + 'Illuminate\\View\\Factory' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/View/Factory.php', + 'Illuminate\\View\\FileViewFinder' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/View/FileViewFinder.php', + 'Illuminate\\View\\Middleware\\ShareErrorsFromSession' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php', + 'Illuminate\\View\\View' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/View/View.php', + 'Illuminate\\View\\ViewFinderInterface' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/View/ViewFinderInterface.php', + 'Illuminate\\View\\ViewName' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/View/ViewName.php', + 'Illuminate\\View\\ViewServiceProvider' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/View/ViewServiceProvider.php', + 'JakubOnderka\\PhpConsoleColor\\ConsoleColor' => __DIR__ . '/..' . '/jakub-onderka/php-console-color/src/JakubOnderka/PhpConsoleColor/ConsoleColor.php', + 'JakubOnderka\\PhpConsoleColor\\InvalidStyleException' => __DIR__ . '/..' . '/jakub-onderka/php-console-color/src/JakubOnderka/PhpConsoleColor/InvalidStyleException.php', + 'JakubOnderka\\PhpConsoleHighlighter\\Highlighter' => __DIR__ . '/..' . '/jakub-onderka/php-console-highlighter/src/JakubOnderka/PhpConsoleHighlighter/Highlighter.php', + 'Laravel\\Tinker\\Console\\TinkerCommand' => __DIR__ . '/..' . '/laravel/tinker/src/Console/TinkerCommand.php', + 'Laravel\\Tinker\\TinkerCaster' => __DIR__ . '/..' . '/laravel/tinker/src/TinkerCaster.php', + 'Laravel\\Tinker\\TinkerServiceProvider' => __DIR__ . '/..' . '/laravel/tinker/src/TinkerServiceProvider.php', + 'League\\Flysystem\\AdapterInterface' => __DIR__ . '/..' . '/league/flysystem/src/AdapterInterface.php', + 'League\\Flysystem\\Adapter\\AbstractAdapter' => __DIR__ . '/..' . '/league/flysystem/src/Adapter/AbstractAdapter.php', + 'League\\Flysystem\\Adapter\\AbstractFtpAdapter' => __DIR__ . '/..' . '/league/flysystem/src/Adapter/AbstractFtpAdapter.php', + 'League\\Flysystem\\Adapter\\Ftp' => __DIR__ . '/..' . '/league/flysystem/src/Adapter/Ftp.php', + 'League\\Flysystem\\Adapter\\Ftpd' => __DIR__ . '/..' . '/league/flysystem/src/Adapter/Ftpd.php', + 'League\\Flysystem\\Adapter\\Local' => __DIR__ . '/..' . '/league/flysystem/src/Adapter/Local.php', + 'League\\Flysystem\\Adapter\\NullAdapter' => __DIR__ . '/..' . '/league/flysystem/src/Adapter/NullAdapter.php', + 'League\\Flysystem\\Adapter\\Polyfill\\NotSupportingVisibilityTrait' => __DIR__ . '/..' . '/league/flysystem/src/Adapter/Polyfill/NotSupportingVisibilityTrait.php', + 'League\\Flysystem\\Adapter\\Polyfill\\StreamedCopyTrait' => __DIR__ . '/..' . '/league/flysystem/src/Adapter/Polyfill/StreamedCopyTrait.php', + 'League\\Flysystem\\Adapter\\Polyfill\\StreamedReadingTrait' => __DIR__ . '/..' . '/league/flysystem/src/Adapter/Polyfill/StreamedReadingTrait.php', + 'League\\Flysystem\\Adapter\\Polyfill\\StreamedTrait' => __DIR__ . '/..' . '/league/flysystem/src/Adapter/Polyfill/StreamedTrait.php', + 'League\\Flysystem\\Adapter\\Polyfill\\StreamedWritingTrait' => __DIR__ . '/..' . '/league/flysystem/src/Adapter/Polyfill/StreamedWritingTrait.php', + 'League\\Flysystem\\Adapter\\SynologyFtp' => __DIR__ . '/..' . '/league/flysystem/src/Adapter/SynologyFtp.php', + 'League\\Flysystem\\Config' => __DIR__ . '/..' . '/league/flysystem/src/Config.php', + 'League\\Flysystem\\ConfigAwareTrait' => __DIR__ . '/..' . '/league/flysystem/src/ConfigAwareTrait.php', + 'League\\Flysystem\\Directory' => __DIR__ . '/..' . '/league/flysystem/src/Directory.php', + 'League\\Flysystem\\Exception' => __DIR__ . '/..' . '/league/flysystem/src/Exception.php', + 'League\\Flysystem\\File' => __DIR__ . '/..' . '/league/flysystem/src/File.php', + 'League\\Flysystem\\FileExistsException' => __DIR__ . '/..' . '/league/flysystem/src/FileExistsException.php', + 'League\\Flysystem\\FileNotFoundException' => __DIR__ . '/..' . '/league/flysystem/src/FileNotFoundException.php', + 'League\\Flysystem\\Filesystem' => __DIR__ . '/..' . '/league/flysystem/src/Filesystem.php', + 'League\\Flysystem\\FilesystemInterface' => __DIR__ . '/..' . '/league/flysystem/src/FilesystemInterface.php', + 'League\\Flysystem\\FilesystemNotFoundException' => __DIR__ . '/..' . '/league/flysystem/src/FilesystemNotFoundException.php', + 'League\\Flysystem\\Handler' => __DIR__ . '/..' . '/league/flysystem/src/Handler.php', + 'League\\Flysystem\\MountManager' => __DIR__ . '/..' . '/league/flysystem/src/MountManager.php', + 'League\\Flysystem\\NotSupportedException' => __DIR__ . '/..' . '/league/flysystem/src/NotSupportedException.php', + 'League\\Flysystem\\PluginInterface' => __DIR__ . '/..' . '/league/flysystem/src/PluginInterface.php', + 'League\\Flysystem\\Plugin\\AbstractPlugin' => __DIR__ . '/..' . '/league/flysystem/src/Plugin/AbstractPlugin.php', + 'League\\Flysystem\\Plugin\\EmptyDir' => __DIR__ . '/..' . '/league/flysystem/src/Plugin/EmptyDir.php', + 'League\\Flysystem\\Plugin\\ForcedCopy' => __DIR__ . '/..' . '/league/flysystem/src/Plugin/ForcedCopy.php', + 'League\\Flysystem\\Plugin\\ForcedRename' => __DIR__ . '/..' . '/league/flysystem/src/Plugin/ForcedRename.php', + 'League\\Flysystem\\Plugin\\GetWithMetadata' => __DIR__ . '/..' . '/league/flysystem/src/Plugin/GetWithMetadata.php', + 'League\\Flysystem\\Plugin\\ListFiles' => __DIR__ . '/..' . '/league/flysystem/src/Plugin/ListFiles.php', + 'League\\Flysystem\\Plugin\\ListPaths' => __DIR__ . '/..' . '/league/flysystem/src/Plugin/ListPaths.php', + 'League\\Flysystem\\Plugin\\ListWith' => __DIR__ . '/..' . '/league/flysystem/src/Plugin/ListWith.php', + 'League\\Flysystem\\Plugin\\PluggableTrait' => __DIR__ . '/..' . '/league/flysystem/src/Plugin/PluggableTrait.php', + 'League\\Flysystem\\Plugin\\PluginNotFoundException' => __DIR__ . '/..' . '/league/flysystem/src/Plugin/PluginNotFoundException.php', + 'League\\Flysystem\\ReadInterface' => __DIR__ . '/..' . '/league/flysystem/src/ReadInterface.php', + 'League\\Flysystem\\RootViolationException' => __DIR__ . '/..' . '/league/flysystem/src/RootViolationException.php', + 'League\\Flysystem\\SafeStorage' => __DIR__ . '/..' . '/league/flysystem/src/SafeStorage.php', + 'League\\Flysystem\\UnreadableFileException' => __DIR__ . '/..' . '/league/flysystem/src/UnreadableFileException.php', + 'League\\Flysystem\\Util' => __DIR__ . '/..' . '/league/flysystem/src/Util.php', + 'League\\Flysystem\\Util\\ContentListingFormatter' => __DIR__ . '/..' . '/league/flysystem/src/Util/ContentListingFormatter.php', + 'League\\Flysystem\\Util\\MimeType' => __DIR__ . '/..' . '/league/flysystem/src/Util/MimeType.php', + 'League\\Flysystem\\Util\\StreamHasher' => __DIR__ . '/..' . '/league/flysystem/src/Util/StreamHasher.php', + 'Mockery' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery.php', + 'Mockery\\Adapter\\Phpunit\\MockeryPHPUnitIntegration' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryPHPUnitIntegration.php', + 'Mockery\\Adapter\\Phpunit\\MockeryTestCase' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryTestCase.php', + 'Mockery\\Adapter\\Phpunit\\TestListener' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Adapter/Phpunit/TestListener.php', + 'Mockery\\CompositeExpectation' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/CompositeExpectation.php', + 'Mockery\\Configuration' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Configuration.php', + 'Mockery\\Container' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Container.php', + 'Mockery\\CountValidator\\AtLeast' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/CountValidator/AtLeast.php', + 'Mockery\\CountValidator\\AtMost' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/CountValidator/AtMost.php', + 'Mockery\\CountValidator\\CountValidatorAbstract' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/CountValidator/CountValidatorAbstract.php', + 'Mockery\\CountValidator\\Exact' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/CountValidator/Exact.php', + 'Mockery\\CountValidator\\Exception' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/CountValidator/Exception.php', + 'Mockery\\Exception' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Exception.php', + 'Mockery\\Exception\\InvalidCountException' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Exception/InvalidCountException.php', + 'Mockery\\Exception\\InvalidOrderException' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Exception/InvalidOrderException.php', + 'Mockery\\Exception\\NoMatchingExpectationException' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Exception/NoMatchingExpectationException.php', + 'Mockery\\Exception\\RuntimeException' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Exception/RuntimeException.php', + 'Mockery\\Expectation' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Expectation.php', + 'Mockery\\ExpectationDirector' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/ExpectationDirector.php', + 'Mockery\\ExpectationInterface' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/ExpectationInterface.php', + 'Mockery\\Generator\\CachingGenerator' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Generator/CachingGenerator.php', + 'Mockery\\Generator\\DefinedTargetClass' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Generator/DefinedTargetClass.php', + 'Mockery\\Generator\\Generator' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Generator/Generator.php', + 'Mockery\\Generator\\Method' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Generator/Method.php', + 'Mockery\\Generator\\MockConfiguration' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Generator/MockConfiguration.php', + 'Mockery\\Generator\\MockConfigurationBuilder' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Generator/MockConfigurationBuilder.php', + 'Mockery\\Generator\\MockDefinition' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Generator/MockDefinition.php', + 'Mockery\\Generator\\Parameter' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Generator/Parameter.php', + 'Mockery\\Generator\\StringManipulationGenerator' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Generator/StringManipulationGenerator.php', + 'Mockery\\Generator\\StringManipulation\\Pass\\CallTypeHintPass' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/CallTypeHintPass.php', + 'Mockery\\Generator\\StringManipulation\\Pass\\ClassNamePass' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/ClassNamePass.php', + 'Mockery\\Generator\\StringManipulation\\Pass\\ClassPass' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/ClassPass.php', + 'Mockery\\Generator\\StringManipulation\\Pass\\InstanceMockPass' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/InstanceMockPass.php', + 'Mockery\\Generator\\StringManipulation\\Pass\\InterfacePass' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/InterfacePass.php', + 'Mockery\\Generator\\StringManipulation\\Pass\\MethodDefinitionPass' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/MethodDefinitionPass.php', + 'Mockery\\Generator\\StringManipulation\\Pass\\Pass' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/Pass.php', + 'Mockery\\Generator\\StringManipulation\\Pass\\RemoveBuiltinMethodsThatAreFinalPass' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/RemoveBuiltinMethodsThatAreFinalPass.php', + 'Mockery\\Generator\\StringManipulation\\Pass\\RemoveUnserializeForInternalSerializableClassesPass' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/RemoveUnserializeForInternalSerializableClassesPass.php', + 'Mockery\\Generator\\TargetClass' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Generator/TargetClass.php', + 'Mockery\\Generator\\UndefinedTargetClass' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Generator/UndefinedTargetClass.php', + 'Mockery\\Instantiator' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Instantiator.php', + 'Mockery\\Loader' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Loader.php', + 'Mockery\\Loader\\EvalLoader' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Loader/EvalLoader.php', + 'Mockery\\Loader\\Loader' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Loader/Loader.php', + 'Mockery\\Loader\\RequireLoader' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Loader/RequireLoader.php', + 'Mockery\\Matcher\\Any' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Matcher/Any.php', + 'Mockery\\Matcher\\AnyOf' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Matcher/AnyOf.php', + 'Mockery\\Matcher\\Closure' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Matcher/Closure.php', + 'Mockery\\Matcher\\Contains' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Matcher/Contains.php', + 'Mockery\\Matcher\\Ducktype' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Matcher/Ducktype.php', + 'Mockery\\Matcher\\HasKey' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Matcher/HasKey.php', + 'Mockery\\Matcher\\HasValue' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Matcher/HasValue.php', + 'Mockery\\Matcher\\MatcherAbstract' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Matcher/MatcherAbstract.php', + 'Mockery\\Matcher\\MustBe' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Matcher/MustBe.php', + 'Mockery\\Matcher\\Not' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Matcher/Not.php', + 'Mockery\\Matcher\\NotAnyOf' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Matcher/NotAnyOf.php', + 'Mockery\\Matcher\\Subset' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Matcher/Subset.php', + 'Mockery\\Matcher\\Type' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Matcher/Type.php', + 'Mockery\\MethodCall' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/MethodCall.php', + 'Mockery\\Mock' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Mock.php', + 'Mockery\\MockInterface' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/MockInterface.php', + 'Mockery\\ReceivedMethodCalls' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/ReceivedMethodCalls.php', + 'Mockery\\Recorder' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Recorder.php', + 'Mockery\\Undefined' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Undefined.php', + 'Mockery\\VerificationDirector' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/VerificationDirector.php', + 'Mockery\\VerificationExpectation' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/VerificationExpectation.php', + 'Monolog\\ErrorHandler' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/ErrorHandler.php', + 'Monolog\\Formatter\\ChromePHPFormatter' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Formatter/ChromePHPFormatter.php', + 'Monolog\\Formatter\\ElasticaFormatter' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Formatter/ElasticaFormatter.php', + 'Monolog\\Formatter\\FlowdockFormatter' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Formatter/FlowdockFormatter.php', + 'Monolog\\Formatter\\FluentdFormatter' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Formatter/FluentdFormatter.php', + 'Monolog\\Formatter\\FormatterInterface' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Formatter/FormatterInterface.php', + 'Monolog\\Formatter\\GelfMessageFormatter' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Formatter/GelfMessageFormatter.php', + 'Monolog\\Formatter\\HtmlFormatter' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Formatter/HtmlFormatter.php', + 'Monolog\\Formatter\\JsonFormatter' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Formatter/JsonFormatter.php', + 'Monolog\\Formatter\\LineFormatter' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Formatter/LineFormatter.php', + 'Monolog\\Formatter\\LogglyFormatter' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Formatter/LogglyFormatter.php', + 'Monolog\\Formatter\\LogstashFormatter' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Formatter/LogstashFormatter.php', + 'Monolog\\Formatter\\MongoDBFormatter' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Formatter/MongoDBFormatter.php', + 'Monolog\\Formatter\\NormalizerFormatter' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php', + 'Monolog\\Formatter\\ScalarFormatter' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Formatter/ScalarFormatter.php', + 'Monolog\\Formatter\\WildfireFormatter' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Formatter/WildfireFormatter.php', + 'Monolog\\Handler\\AbstractHandler' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Handler/AbstractHandler.php', + 'Monolog\\Handler\\AbstractProcessingHandler' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php', + 'Monolog\\Handler\\AbstractSyslogHandler' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Handler/AbstractSyslogHandler.php', + 'Monolog\\Handler\\AmqpHandler' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Handler/AmqpHandler.php', + 'Monolog\\Handler\\BrowserConsoleHandler' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Handler/BrowserConsoleHandler.php', + 'Monolog\\Handler\\BufferHandler' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Handler/BufferHandler.php', + 'Monolog\\Handler\\ChromePHPHandler' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Handler/ChromePHPHandler.php', + 'Monolog\\Handler\\CouchDBHandler' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Handler/CouchDBHandler.php', + 'Monolog\\Handler\\CubeHandler' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Handler/CubeHandler.php', + 'Monolog\\Handler\\Curl\\Util' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Handler/Curl/Util.php', + 'Monolog\\Handler\\DeduplicationHandler' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Handler/DeduplicationHandler.php', + 'Monolog\\Handler\\DoctrineCouchDBHandler' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Handler/DoctrineCouchDBHandler.php', + 'Monolog\\Handler\\DynamoDbHandler' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Handler/DynamoDbHandler.php', + 'Monolog\\Handler\\ElasticSearchHandler' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Handler/ElasticSearchHandler.php', + 'Monolog\\Handler\\ErrorLogHandler' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Handler/ErrorLogHandler.php', + 'Monolog\\Handler\\FilterHandler' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Handler/FilterHandler.php', + 'Monolog\\Handler\\FingersCrossedHandler' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Handler/FingersCrossedHandler.php', + 'Monolog\\Handler\\FingersCrossed\\ActivationStrategyInterface' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Handler/FingersCrossed/ActivationStrategyInterface.php', + 'Monolog\\Handler\\FingersCrossed\\ChannelLevelActivationStrategy' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Handler/FingersCrossed/ChannelLevelActivationStrategy.php', + 'Monolog\\Handler\\FingersCrossed\\ErrorLevelActivationStrategy' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Handler/FingersCrossed/ErrorLevelActivationStrategy.php', + 'Monolog\\Handler\\FirePHPHandler' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Handler/FirePHPHandler.php', + 'Monolog\\Handler\\FleepHookHandler' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Handler/FleepHookHandler.php', + 'Monolog\\Handler\\FlowdockHandler' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Handler/FlowdockHandler.php', + 'Monolog\\Handler\\GelfHandler' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Handler/GelfHandler.php', + 'Monolog\\Handler\\GroupHandler' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Handler/GroupHandler.php', + 'Monolog\\Handler\\HandlerInterface' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Handler/HandlerInterface.php', + 'Monolog\\Handler\\HandlerWrapper' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Handler/HandlerWrapper.php', + 'Monolog\\Handler\\HipChatHandler' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Handler/HipChatHandler.php', + 'Monolog\\Handler\\IFTTTHandler' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Handler/IFTTTHandler.php', + 'Monolog\\Handler\\LogEntriesHandler' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Handler/LogEntriesHandler.php', + 'Monolog\\Handler\\LogglyHandler' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Handler/LogglyHandler.php', + 'Monolog\\Handler\\MailHandler' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Handler/MailHandler.php', + 'Monolog\\Handler\\MandrillHandler' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Handler/MandrillHandler.php', + 'Monolog\\Handler\\MissingExtensionException' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Handler/MissingExtensionException.php', + 'Monolog\\Handler\\MongoDBHandler' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Handler/MongoDBHandler.php', + 'Monolog\\Handler\\NativeMailerHandler' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Handler/NativeMailerHandler.php', + 'Monolog\\Handler\\NewRelicHandler' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Handler/NewRelicHandler.php', + 'Monolog\\Handler\\NullHandler' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Handler/NullHandler.php', + 'Monolog\\Handler\\PHPConsoleHandler' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Handler/PHPConsoleHandler.php', + 'Monolog\\Handler\\PsrHandler' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Handler/PsrHandler.php', + 'Monolog\\Handler\\PushoverHandler' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Handler/PushoverHandler.php', + 'Monolog\\Handler\\RavenHandler' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Handler/RavenHandler.php', + 'Monolog\\Handler\\RedisHandler' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Handler/RedisHandler.php', + 'Monolog\\Handler\\RollbarHandler' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Handler/RollbarHandler.php', + 'Monolog\\Handler\\RotatingFileHandler' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php', + 'Monolog\\Handler\\SamplingHandler' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Handler/SamplingHandler.php', + 'Monolog\\Handler\\SlackHandler' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Handler/SlackHandler.php', + 'Monolog\\Handler\\SlackWebhookHandler' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Handler/SlackWebhookHandler.php', + 'Monolog\\Handler\\Slack\\SlackRecord' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Handler/Slack/SlackRecord.php', + 'Monolog\\Handler\\SlackbotHandler' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Handler/SlackbotHandler.php', + 'Monolog\\Handler\\SocketHandler' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Handler/SocketHandler.php', + 'Monolog\\Handler\\StreamHandler' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Handler/StreamHandler.php', + 'Monolog\\Handler\\SwiftMailerHandler' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Handler/SwiftMailerHandler.php', + 'Monolog\\Handler\\SyslogHandler' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Handler/SyslogHandler.php', + 'Monolog\\Handler\\SyslogUdpHandler' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Handler/SyslogUdpHandler.php', + 'Monolog\\Handler\\SyslogUdp\\UdpSocket' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Handler/SyslogUdp/UdpSocket.php', + 'Monolog\\Handler\\TestHandler' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Handler/TestHandler.php', + 'Monolog\\Handler\\WhatFailureGroupHandler' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Handler/WhatFailureGroupHandler.php', + 'Monolog\\Handler\\ZendMonitorHandler' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Handler/ZendMonitorHandler.php', + 'Monolog\\Logger' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Logger.php', + 'Monolog\\Processor\\GitProcessor' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Processor/GitProcessor.php', + 'Monolog\\Processor\\IntrospectionProcessor' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Processor/IntrospectionProcessor.php', + 'Monolog\\Processor\\MemoryPeakUsageProcessor' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Processor/MemoryPeakUsageProcessor.php', + 'Monolog\\Processor\\MemoryProcessor' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Processor/MemoryProcessor.php', + 'Monolog\\Processor\\MemoryUsageProcessor' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Processor/MemoryUsageProcessor.php', + 'Monolog\\Processor\\MercurialProcessor' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Processor/MercurialProcessor.php', + 'Monolog\\Processor\\ProcessIdProcessor' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Processor/ProcessIdProcessor.php', + 'Monolog\\Processor\\PsrLogMessageProcessor' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php', + 'Monolog\\Processor\\TagProcessor' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Processor/TagProcessor.php', + 'Monolog\\Processor\\UidProcessor' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Processor/UidProcessor.php', + 'Monolog\\Processor\\WebProcessor' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Processor/WebProcessor.php', + 'Monolog\\Registry' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Registry.php', + 'PHPUnit\\Framework\\Assert' => __DIR__ . '/..' . '/phpunit/phpunit/src/ForwardCompatibility/Assert.php', + 'PHPUnit\\Framework\\BaseTestListener' => __DIR__ . '/..' . '/phpunit/phpunit/src/ForwardCompatibility/BaseTestListener.php', + 'PHPUnit\\Framework\\TestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/ForwardCompatibility/TestCase.php', + 'PHPUnit\\Framework\\TestListener' => __DIR__ . '/..' . '/phpunit/phpunit/src/ForwardCompatibility/TestListener.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', + 'PHPUnit_Extensions_PhptTestSuite' => __DIR__ . '/..' . '/phpunit/phpunit/src/Extensions/PhptTestSuite.php', + 'PHPUnit_Extensions_RepeatedTest' => __DIR__ . '/..' . '/phpunit/phpunit/src/Extensions/RepeatedTest.php', + 'PHPUnit_Extensions_TestDecorator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Extensions/TestDecorator.php', + 'PHPUnit_Extensions_TicketListener' => __DIR__ . '/..' . '/phpunit/phpunit/src/Extensions/TicketListener.php', + 'PHPUnit_Framework_Assert' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Assert.php', + 'PHPUnit_Framework_AssertionFailedError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/AssertionFailedError.php', + 'PHPUnit_Framework_BaseTestListener' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/BaseTestListener.php', + 'PHPUnit_Framework_CodeCoverageException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/CodeCoverageException.php', + 'PHPUnit_Framework_Constraint' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint.php', + 'PHPUnit_Framework_Constraint_And' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/And.php', + 'PHPUnit_Framework_Constraint_ArrayHasKey' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ArrayHasKey.php', + 'PHPUnit_Framework_Constraint_ArraySubset' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ArraySubset.php', + 'PHPUnit_Framework_Constraint_Attribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Attribute.php', + 'PHPUnit_Framework_Constraint_Callback' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Callback.php', + 'PHPUnit_Framework_Constraint_ClassHasAttribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ClassHasAttribute.php', + 'PHPUnit_Framework_Constraint_ClassHasStaticAttribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ClassHasStaticAttribute.php', + 'PHPUnit_Framework_Constraint_Composite' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Composite.php', + 'PHPUnit_Framework_Constraint_Count' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Count.php', + 'PHPUnit_Framework_Constraint_DirectoryExists' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/DirectoryExists.php', + 'PHPUnit_Framework_Constraint_Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Exception.php', + 'PHPUnit_Framework_Constraint_ExceptionCode' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ExceptionCode.php', + 'PHPUnit_Framework_Constraint_ExceptionMessage' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ExceptionMessage.php', + 'PHPUnit_Framework_Constraint_ExceptionMessageRegExp' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ExceptionMessageRegExp.php', + 'PHPUnit_Framework_Constraint_FileExists' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/FileExists.php', + 'PHPUnit_Framework_Constraint_GreaterThan' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/GreaterThan.php', + 'PHPUnit_Framework_Constraint_IsAnything' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsAnything.php', + 'PHPUnit_Framework_Constraint_IsEmpty' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsEmpty.php', + 'PHPUnit_Framework_Constraint_IsEqual' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsEqual.php', + 'PHPUnit_Framework_Constraint_IsFalse' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsFalse.php', + 'PHPUnit_Framework_Constraint_IsFinite' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsFinite.php', + 'PHPUnit_Framework_Constraint_IsIdentical' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php', + 'PHPUnit_Framework_Constraint_IsInfinite' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsInfinite.php', + 'PHPUnit_Framework_Constraint_IsInstanceOf' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsInstanceOf.php', + 'PHPUnit_Framework_Constraint_IsJson' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsJson.php', + 'PHPUnit_Framework_Constraint_IsNan' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsNan.php', + 'PHPUnit_Framework_Constraint_IsNull' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsNull.php', + 'PHPUnit_Framework_Constraint_IsReadable' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsReadable.php', + 'PHPUnit_Framework_Constraint_IsTrue' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsTrue.php', + 'PHPUnit_Framework_Constraint_IsType' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsType.php', + 'PHPUnit_Framework_Constraint_IsWritable' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsWritable.php', + 'PHPUnit_Framework_Constraint_JsonMatches' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/JsonMatches.php', + 'PHPUnit_Framework_Constraint_JsonMatches_ErrorMessageProvider' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/JsonMatches/ErrorMessageProvider.php', + 'PHPUnit_Framework_Constraint_LessThan' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/LessThan.php', + 'PHPUnit_Framework_Constraint_Not' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Not.php', + 'PHPUnit_Framework_Constraint_ObjectHasAttribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ObjectHasAttribute.php', + 'PHPUnit_Framework_Constraint_Or' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Or.php', + 'PHPUnit_Framework_Constraint_PCREMatch' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/PCREMatch.php', + 'PHPUnit_Framework_Constraint_SameSize' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/SameSize.php', + 'PHPUnit_Framework_Constraint_StringContains' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/StringContains.php', + 'PHPUnit_Framework_Constraint_StringEndsWith' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/StringEndsWith.php', + 'PHPUnit_Framework_Constraint_StringMatches' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/StringMatches.php', + 'PHPUnit_Framework_Constraint_StringStartsWith' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/StringStartsWith.php', + 'PHPUnit_Framework_Constraint_TraversableContains' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/TraversableContains.php', + 'PHPUnit_Framework_Constraint_TraversableContainsOnly' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/TraversableContainsOnly.php', + 'PHPUnit_Framework_Constraint_Xor' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Xor.php', + 'PHPUnit_Framework_CoveredCodeNotExecutedException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/CoveredCodeNotExecutedException.php', + 'PHPUnit_Framework_Error' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Error.php', + 'PHPUnit_Framework_Error_Deprecated' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Error/Deprecated.php', + 'PHPUnit_Framework_Error_Notice' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Error/Notice.php', + 'PHPUnit_Framework_Error_Warning' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Error/Warning.php', + 'PHPUnit_Framework_Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception.php', + 'PHPUnit_Framework_ExceptionWrapper' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/ExceptionWrapper.php', + 'PHPUnit_Framework_ExpectationFailedException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/ExpectationFailedException.php', + 'PHPUnit_Framework_IncompleteTest' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/IncompleteTest.php', + 'PHPUnit_Framework_IncompleteTestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/IncompleteTestCase.php', + 'PHPUnit_Framework_IncompleteTestError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/IncompleteTestError.php', + 'PHPUnit_Framework_InvalidCoversTargetException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/InvalidCoversTargetException.php', + 'PHPUnit_Framework_MissingCoversAnnotationException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MissingCoversAnnotationException.php', + 'PHPUnit_Framework_MockObject_BadMethodCallException' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/BadMethodCallException.php', + 'PHPUnit_Framework_MockObject_Builder_Identity' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Identity.php', + 'PHPUnit_Framework_MockObject_Builder_InvocationMocker' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/InvocationMocker.php', + 'PHPUnit_Framework_MockObject_Builder_Match' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Match.php', + 'PHPUnit_Framework_MockObject_Builder_MethodNameMatch' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/MethodNameMatch.php', + 'PHPUnit_Framework_MockObject_Builder_Namespace' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Namespace.php', + 'PHPUnit_Framework_MockObject_Builder_ParametersMatch' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/ParametersMatch.php', + 'PHPUnit_Framework_MockObject_Builder_Stub' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Stub.php', + 'PHPUnit_Framework_MockObject_Exception' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/Exception.php', + 'PHPUnit_Framework_MockObject_Generator' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator.php', + 'PHPUnit_Framework_MockObject_Invocation' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation.php', + 'PHPUnit_Framework_MockObject_InvocationMocker' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/InvocationMocker.php', + 'PHPUnit_Framework_MockObject_Invocation_Object' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation/Object.php', + 'PHPUnit_Framework_MockObject_Invocation_Static' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation/Static.php', + 'PHPUnit_Framework_MockObject_Invokable' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invokable.php', + 'PHPUnit_Framework_MockObject_Matcher' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher.php', + 'PHPUnit_Framework_MockObject_Matcher_AnyInvokedCount' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/AnyInvokedCount.php', + 'PHPUnit_Framework_MockObject_Matcher_AnyParameters' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/AnyParameters.php', + 'PHPUnit_Framework_MockObject_Matcher_ConsecutiveParameters' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/ConsecutiveParameters.php', + 'PHPUnit_Framework_MockObject_Matcher_Invocation' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/Invocation.php', + 'PHPUnit_Framework_MockObject_Matcher_InvokedAtIndex' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtIndex.php', + 'PHPUnit_Framework_MockObject_Matcher_InvokedAtLeastCount' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtLeastCount.php', + 'PHPUnit_Framework_MockObject_Matcher_InvokedAtLeastOnce' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtLeastOnce.php', + 'PHPUnit_Framework_MockObject_Matcher_InvokedAtMostCount' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtMostCount.php', + 'PHPUnit_Framework_MockObject_Matcher_InvokedCount' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedCount.php', + 'PHPUnit_Framework_MockObject_Matcher_InvokedRecorder' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedRecorder.php', + 'PHPUnit_Framework_MockObject_Matcher_MethodName' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/MethodName.php', + 'PHPUnit_Framework_MockObject_Matcher_Parameters' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/Parameters.php', + 'PHPUnit_Framework_MockObject_Matcher_StatelessInvocation' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/StatelessInvocation.php', + 'PHPUnit_Framework_MockObject_MockBuilder' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/MockBuilder.php', + 'PHPUnit_Framework_MockObject_MockObject' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/MockObject.php', + 'PHPUnit_Framework_MockObject_RuntimeException' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/RuntimeException.php', + 'PHPUnit_Framework_MockObject_Stub' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub.php', + 'PHPUnit_Framework_MockObject_Stub_ConsecutiveCalls' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ConsecutiveCalls.php', + 'PHPUnit_Framework_MockObject_Stub_Exception' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/Exception.php', + 'PHPUnit_Framework_MockObject_Stub_MatcherCollection' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/MatcherCollection.php', + 'PHPUnit_Framework_MockObject_Stub_Return' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/Return.php', + 'PHPUnit_Framework_MockObject_Stub_ReturnArgument' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnArgument.php', + 'PHPUnit_Framework_MockObject_Stub_ReturnCallback' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnCallback.php', + 'PHPUnit_Framework_MockObject_Stub_ReturnReference' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnReference.php', + 'PHPUnit_Framework_MockObject_Stub_ReturnSelf' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnSelf.php', + 'PHPUnit_Framework_MockObject_Stub_ReturnValueMap' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnValueMap.php', + 'PHPUnit_Framework_MockObject_Verifiable' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Verifiable.php', + 'PHPUnit_Framework_OutputError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/OutputError.php', + 'PHPUnit_Framework_RiskyTest' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/RiskyTest.php', + 'PHPUnit_Framework_RiskyTestError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/RiskyTestError.php', + 'PHPUnit_Framework_SelfDescribing' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/SelfDescribing.php', + 'PHPUnit_Framework_SkippedTest' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/SkippedTest.php', + 'PHPUnit_Framework_SkippedTestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/SkippedTestCase.php', + 'PHPUnit_Framework_SkippedTestError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/SkippedTestError.php', + 'PHPUnit_Framework_SkippedTestSuiteError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/SkippedTestSuiteError.php', + 'PHPUnit_Framework_SyntheticError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/SyntheticError.php', + 'PHPUnit_Framework_Test' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Test.php', + 'PHPUnit_Framework_TestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestCase.php', + 'PHPUnit_Framework_TestFailure' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestFailure.php', + 'PHPUnit_Framework_TestListener' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestListener.php', + 'PHPUnit_Framework_TestResult' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestResult.php', + 'PHPUnit_Framework_TestSuite' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestSuite.php', + 'PHPUnit_Framework_TestSuite_DataProvider' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestSuite/DataProvider.php', + 'PHPUnit_Framework_UnintentionallyCoveredCodeError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/UnintentionallyCoveredCodeError.php', + 'PHPUnit_Framework_Warning' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Warning.php', + 'PHPUnit_Framework_WarningTestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/WarningTestCase.php', + 'PHPUnit_Runner_BaseTestRunner' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/BaseTestRunner.php', + 'PHPUnit_Runner_Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Exception.php', + 'PHPUnit_Runner_Filter_Factory' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/Factory.php', + 'PHPUnit_Runner_Filter_GroupFilterIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/Group.php', + 'PHPUnit_Runner_Filter_Group_Exclude' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/Group/Exclude.php', + 'PHPUnit_Runner_Filter_Group_Include' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/Group/Include.php', + 'PHPUnit_Runner_Filter_Test' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/Test.php', + 'PHPUnit_Runner_StandardTestSuiteLoader' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/StandardTestSuiteLoader.php', + 'PHPUnit_Runner_TestSuiteLoader' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/TestSuiteLoader.php', + 'PHPUnit_Runner_Version' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Version.php', + 'PHPUnit_TextUI_Command' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Command.php', + 'PHPUnit_TextUI_ResultPrinter' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/ResultPrinter.php', + 'PHPUnit_TextUI_TestRunner' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/TestRunner.php', + 'PHPUnit_Util_Blacklist' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Blacklist.php', + 'PHPUnit_Util_Configuration' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Configuration.php', + 'PHPUnit_Util_ConfigurationGenerator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/ConfigurationGenerator.php', + 'PHPUnit_Util_ErrorHandler' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/ErrorHandler.php', + 'PHPUnit_Util_Fileloader' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Fileloader.php', + 'PHPUnit_Util_Filesystem' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Filesystem.php', + 'PHPUnit_Util_Filter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Filter.php', + 'PHPUnit_Util_Getopt' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Getopt.php', + 'PHPUnit_Util_GlobalState' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/GlobalState.php', + 'PHPUnit_Util_InvalidArgumentHelper' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/InvalidArgumentHelper.php', + 'PHPUnit_Util_Log_JSON' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Log/JSON.php', + 'PHPUnit_Util_Log_JUnit' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Log/JUnit.php', + 'PHPUnit_Util_Log_TAP' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Log/TAP.php', + 'PHPUnit_Util_Log_TeamCity' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Log/TeamCity.php', + 'PHPUnit_Util_PHP' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/PHP.php', + 'PHPUnit_Util_PHP_Default' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/PHP/Default.php', + 'PHPUnit_Util_PHP_Windows' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/PHP/Windows.php', + 'PHPUnit_Util_Printer' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Printer.php', + 'PHPUnit_Util_Regex' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Regex.php', + 'PHPUnit_Util_String' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/String.php', + 'PHPUnit_Util_Test' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Test.php', + 'PHPUnit_Util_TestDox_NamePrettifier' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/NamePrettifier.php', + 'PHPUnit_Util_TestDox_ResultPrinter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/ResultPrinter.php', + 'PHPUnit_Util_TestDox_ResultPrinter_HTML' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/ResultPrinter/HTML.php', + 'PHPUnit_Util_TestDox_ResultPrinter_Text' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/ResultPrinter/Text.php', + 'PHPUnit_Util_TestDox_ResultPrinter_XML' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/ResultPrinter/XML.php', + 'PHPUnit_Util_TestSuiteIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestSuiteIterator.php', + 'PHPUnit_Util_Type' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Type.php', + 'PHPUnit_Util_XML' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/XML.php', + 'PHP_Timer' => __DIR__ . '/..' . '/phpunit/php-timer/src/Timer.php', + 'PHP_Token' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_TokenWithScope' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_TokenWithScopeAndVisibility' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ABSTRACT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_AMPERSAND' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_AND_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ARRAY' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ARRAY_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_AS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ASYNC' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_AT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_AWAIT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_BACKTICK' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_BAD_CHARACTER' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_BOOLEAN_AND' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_BOOLEAN_OR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_BOOL_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_BREAK' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CALLABLE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CARET' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CASE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CATCH' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CHARACTER' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CLASS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CLASS_C' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CLASS_NAME_CONSTANT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CLONE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CLOSE_BRACKET' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CLOSE_CURLY' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CLOSE_SQUARE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CLOSE_TAG' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_COALESCE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_COLON' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_COMMA' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_COMMENT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_COMPILER_HALT_OFFSET' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CONCAT_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CONST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CONSTANT_ENCAPSED_STRING' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CONTINUE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_CURLY_OPEN' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_DEC' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_DECLARE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_DEFAULT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_DIR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_DIV' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_DIV_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_DNUMBER' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_DO' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_DOC_COMMENT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_DOLLAR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_DOLLAR_OPEN_CURLY_BRACES' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_DOT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_DOUBLE_ARROW' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_DOUBLE_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_DOUBLE_COLON' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_DOUBLE_QUOTES' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ECHO' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ELLIPSIS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ELSE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ELSEIF' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_EMPTY' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ENCAPSED_AND_WHITESPACE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ENDDECLARE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ENDFOR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ENDFOREACH' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ENDIF' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ENDSWITCH' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ENDWHILE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_END_HEREDOC' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ENUM' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_EQUALS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_EVAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_EXCLAMATION_MARK' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_EXIT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_EXTENDS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_FILE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_FINAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_FINALLY' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_FOR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_FOREACH' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_FUNCTION' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_FUNC_C' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_GLOBAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_GOTO' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_GT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_HALT_COMPILER' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_IF' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_IMPLEMENTS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_IN' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_INC' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_INCLUDE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_INCLUDE_ONCE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_INLINE_HTML' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_INSTANCEOF' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_INSTEADOF' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_INTERFACE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_INT_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ISSET' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_IS_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_IS_GREATER_OR_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_IS_IDENTICAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_IS_NOT_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_IS_NOT_IDENTICAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_IS_SMALLER_OR_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_Includes' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_JOIN' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_LAMBDA_ARROW' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_LAMBDA_CP' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_LAMBDA_OP' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_LINE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_LIST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_LNUMBER' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_LOGICAL_AND' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_LOGICAL_OR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_LOGICAL_XOR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_LT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_METHOD_C' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_MINUS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_MINUS_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_MOD_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_MULT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_MUL_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_NAMESPACE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_NEW' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_NS_C' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_NS_SEPARATOR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_NULLSAFE_OBJECT_OPERATOR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_NUM_STRING' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_OBJECT_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_OBJECT_OPERATOR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_ONUMBER' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_OPEN_BRACKET' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_OPEN_CURLY' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_OPEN_SQUARE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_OPEN_TAG' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_OPEN_TAG_WITH_ECHO' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_OR_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_PAAMAYIM_NEKUDOTAYIM' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_PERCENT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_PIPE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_PLUS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_PLUS_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_POW' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_POW_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_PRINT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_PRIVATE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_PROTECTED' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_PUBLIC' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_QUESTION_MARK' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_REQUIRE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_REQUIRE_ONCE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_RETURN' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_SEMICOLON' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_SHAPE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_SL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_SL_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_SPACESHIP' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_SR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_SR_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_START_HEREDOC' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_STATIC' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_STRING' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_STRING_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_STRING_VARNAME' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_SUPER' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_SWITCH' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_Stream' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token/Stream.php', + 'PHP_Token_Stream_CachingFactory' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token/Stream/CachingFactory.php', + 'PHP_Token_THROW' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_TILDE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_TRAIT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_TRAIT_C' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_TRY' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_TYPE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_TYPELIST_GT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_TYPELIST_LT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_UNSET' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_UNSET_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_USE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_USE_FUNCTION' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_VAR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_VARIABLE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_WHERE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_WHILE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_WHITESPACE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_XHP_ATTRIBUTE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_XHP_CATEGORY' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_XHP_CATEGORY_LABEL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_XHP_CHILDREN' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_XHP_LABEL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_XHP_REQUIRED' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_XHP_TAG_GT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_XHP_TAG_LT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + 'PHP_Token_XHP_TEXT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', + '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', + 'Parsedown' => __DIR__ . '/..' . '/erusev/parsedown/Parsedown.php', + 'ParsedownTest' => __DIR__ . '/..' . '/erusev/parsedown/test/ParsedownTest.php', + 'PhpParser\\Autoloader' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Autoloader.php', + 'PhpParser\\Builder' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder.php', + 'PhpParser\\BuilderAbstract' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/BuilderAbstract.php', + 'PhpParser\\BuilderFactory' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/BuilderFactory.php', + 'PhpParser\\Builder\\Class_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/Class_.php', + 'PhpParser\\Builder\\Declaration' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/Declaration.php', + 'PhpParser\\Builder\\FunctionLike' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php', + 'PhpParser\\Builder\\Function_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/Function_.php', + 'PhpParser\\Builder\\Interface_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/Interface_.php', + 'PhpParser\\Builder\\Method' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/Method.php', + 'PhpParser\\Builder\\Namespace_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/Namespace_.php', + 'PhpParser\\Builder\\Param' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/Param.php', + 'PhpParser\\Builder\\Property' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/Property.php', + 'PhpParser\\Builder\\Trait_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/Trait_.php', + 'PhpParser\\Builder\\Use_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/Use_.php', + 'PhpParser\\Comment' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Comment.php', + 'PhpParser\\Comment\\Doc' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Comment/Doc.php', + 'PhpParser\\Error' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Error.php', + 'PhpParser\\ErrorHandler' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/ErrorHandler.php', + 'PhpParser\\ErrorHandler\\Collecting' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/ErrorHandler/Collecting.php', + 'PhpParser\\ErrorHandler\\Throwing' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/ErrorHandler/Throwing.php', + 'PhpParser\\Lexer' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer.php', + 'PhpParser\\Lexer\\Emulative' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php', + 'PhpParser\\Node' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node.php', + 'PhpParser\\NodeAbstract' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeAbstract.php', + 'PhpParser\\NodeDumper' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeDumper.php', + 'PhpParser\\NodeTraverser' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeTraverser.php', + 'PhpParser\\NodeTraverserInterface' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeTraverserInterface.php', + 'PhpParser\\NodeVisitor' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeVisitor.php', + 'PhpParser\\NodeVisitorAbstract' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeVisitorAbstract.php', + 'PhpParser\\NodeVisitor\\NameResolver' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php', + 'PhpParser\\Node\\Arg' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Arg.php', + 'PhpParser\\Node\\Const_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Const_.php', + 'PhpParser\\Node\\Expr' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr.php', + 'PhpParser\\Node\\Expr\\ArrayDimFetch' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayDimFetch.php', + 'PhpParser\\Node\\Expr\\ArrayItem' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php', + 'PhpParser\\Node\\Expr\\Array_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Array_.php', + 'PhpParser\\Node\\Expr\\Assign' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php', + 'PhpParser\\Node\\Expr\\AssignOp' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php', + 'PhpParser\\Node\\Expr\\AssignOp\\BitwiseAnd' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php', + 'PhpParser\\Node\\Expr\\AssignOp\\BitwiseOr' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseOr.php', + 'PhpParser\\Node\\Expr\\AssignOp\\BitwiseXor' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseXor.php', + 'PhpParser\\Node\\Expr\\AssignOp\\Concat' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Concat.php', + 'PhpParser\\Node\\Expr\\AssignOp\\Div' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Div.php', + 'PhpParser\\Node\\Expr\\AssignOp\\Minus' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Minus.php', + 'PhpParser\\Node\\Expr\\AssignOp\\Mod' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mod.php', + 'PhpParser\\Node\\Expr\\AssignOp\\Mul' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mul.php', + 'PhpParser\\Node\\Expr\\AssignOp\\Plus' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Plus.php', + 'PhpParser\\Node\\Expr\\AssignOp\\Pow' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Pow.php', + 'PhpParser\\Node\\Expr\\AssignOp\\ShiftLeft' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftLeft.php', + 'PhpParser\\Node\\Expr\\AssignOp\\ShiftRight' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftRight.php', + 'PhpParser\\Node\\Expr\\AssignRef' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignRef.php', + 'PhpParser\\Node\\Expr\\BinaryOp' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\BitwiseAnd' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\BitwiseOr' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseOr.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\BitwiseXor' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseXor.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\BooleanAnd' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanAnd.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\BooleanOr' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanOr.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\Coalesce' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Coalesce.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\Concat' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Concat.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\Div' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Div.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\Equal' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Equal.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\Greater' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Greater.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\GreaterOrEqual' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\Identical' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Identical.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\LogicalAnd' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalAnd.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\LogicalOr' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalOr.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\LogicalXor' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalXor.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\Minus' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Minus.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\Mod' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mod.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\Mul' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mul.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\NotEqual' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotEqual.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\NotIdentical' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotIdentical.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\Plus' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Plus.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\Pow' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Pow.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\ShiftLeft' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftLeft.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\ShiftRight' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftRight.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\Smaller' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Smaller.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\SmallerOrEqual' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/SmallerOrEqual.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\Spaceship' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Spaceship.php', + 'PhpParser\\Node\\Expr\\BitwiseNot' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BitwiseNot.php', + 'PhpParser\\Node\\Expr\\BooleanNot' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php', + 'PhpParser\\Node\\Expr\\Cast' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast.php', + 'PhpParser\\Node\\Expr\\Cast\\Array_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Array_.php', + 'PhpParser\\Node\\Expr\\Cast\\Bool_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Bool_.php', + 'PhpParser\\Node\\Expr\\Cast\\Double' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Double.php', + 'PhpParser\\Node\\Expr\\Cast\\Int_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Int_.php', + 'PhpParser\\Node\\Expr\\Cast\\Object_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Object_.php', + 'PhpParser\\Node\\Expr\\Cast\\String_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/String_.php', + 'PhpParser\\Node\\Expr\\Cast\\Unset_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Unset_.php', + 'PhpParser\\Node\\Expr\\ClassConstFetch' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/ClassConstFetch.php', + 'PhpParser\\Node\\Expr\\Clone_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php', + 'PhpParser\\Node\\Expr\\Closure' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php', + 'PhpParser\\Node\\Expr\\ClosureUse' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php', + 'PhpParser\\Node\\Expr\\ConstFetch' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/ConstFetch.php', + 'PhpParser\\Node\\Expr\\Empty_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php', + 'PhpParser\\Node\\Expr\\Error' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php', + 'PhpParser\\Node\\Expr\\ErrorSuppress' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/ErrorSuppress.php', + 'PhpParser\\Node\\Expr\\Eval_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Eval_.php', + 'PhpParser\\Node\\Expr\\Exit_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Exit_.php', + 'PhpParser\\Node\\Expr\\FuncCall' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php', + 'PhpParser\\Node\\Expr\\Include_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Include_.php', + 'PhpParser\\Node\\Expr\\Instanceof_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Instanceof_.php', + 'PhpParser\\Node\\Expr\\Isset_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Isset_.php', + 'PhpParser\\Node\\Expr\\List_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/List_.php', + 'PhpParser\\Node\\Expr\\MethodCall' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php', + 'PhpParser\\Node\\Expr\\New_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php', + 'PhpParser\\Node\\Expr\\PostDec' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/PostDec.php', + 'PhpParser\\Node\\Expr\\PostInc' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/PostInc.php', + 'PhpParser\\Node\\Expr\\PreDec' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/PreDec.php', + 'PhpParser\\Node\\Expr\\PreInc' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/PreInc.php', + 'PhpParser\\Node\\Expr\\Print_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Print_.php', + 'PhpParser\\Node\\Expr\\PropertyFetch' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/PropertyFetch.php', + 'PhpParser\\Node\\Expr\\ShellExec' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/ShellExec.php', + 'PhpParser\\Node\\Expr\\StaticCall' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php', + 'PhpParser\\Node\\Expr\\StaticPropertyFetch' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.php', + 'PhpParser\\Node\\Expr\\Ternary' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Ternary.php', + 'PhpParser\\Node\\Expr\\UnaryMinus' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryMinus.php', + 'PhpParser\\Node\\Expr\\UnaryPlus' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryPlus.php', + 'PhpParser\\Node\\Expr\\Variable' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Variable.php', + 'PhpParser\\Node\\Expr\\YieldFrom' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/YieldFrom.php', + 'PhpParser\\Node\\Expr\\Yield_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php', + 'PhpParser\\Node\\FunctionLike' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php', + 'PhpParser\\Node\\Name' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Name.php', + 'PhpParser\\Node\\Name\\FullyQualified' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Name/FullyQualified.php', + 'PhpParser\\Node\\Name\\Relative' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Name/Relative.php', + 'PhpParser\\Node\\NullableType' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/NullableType.php', + 'PhpParser\\Node\\Param' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Param.php', + 'PhpParser\\Node\\Scalar' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar.php', + 'PhpParser\\Node\\Scalar\\DNumber' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/DNumber.php', + 'PhpParser\\Node\\Scalar\\Encapsed' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/Encapsed.php', + 'PhpParser\\Node\\Scalar\\EncapsedStringPart' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/EncapsedStringPart.php', + 'PhpParser\\Node\\Scalar\\LNumber' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php', + 'PhpParser\\Node\\Scalar\\MagicConst' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst.php', + 'PhpParser\\Node\\Scalar\\MagicConst\\Class_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Class_.php', + 'PhpParser\\Node\\Scalar\\MagicConst\\Dir' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Dir.php', + 'PhpParser\\Node\\Scalar\\MagicConst\\File' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/File.php', + 'PhpParser\\Node\\Scalar\\MagicConst\\Function_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Function_.php', + 'PhpParser\\Node\\Scalar\\MagicConst\\Line' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Line.php', + 'PhpParser\\Node\\Scalar\\MagicConst\\Method' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Method.php', + 'PhpParser\\Node\\Scalar\\MagicConst\\Namespace_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Namespace_.php', + 'PhpParser\\Node\\Scalar\\MagicConst\\Trait_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Trait_.php', + 'PhpParser\\Node\\Scalar\\String_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/String_.php', + 'PhpParser\\Node\\Stmt' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt.php', + 'PhpParser\\Node\\Stmt\\Break_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Break_.php', + 'PhpParser\\Node\\Stmt\\Case_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php', + 'PhpParser\\Node\\Stmt\\Catch_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php', + 'PhpParser\\Node\\Stmt\\ClassConst' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassConst.php', + 'PhpParser\\Node\\Stmt\\ClassLike' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php', + 'PhpParser\\Node\\Stmt\\ClassMethod' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php', + 'PhpParser\\Node\\Stmt\\Class_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php', + 'PhpParser\\Node\\Stmt\\Const_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php', + 'PhpParser\\Node\\Stmt\\Continue_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php', + 'PhpParser\\Node\\Stmt\\DeclareDeclare' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php', + 'PhpParser\\Node\\Stmt\\Declare_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Declare_.php', + 'PhpParser\\Node\\Stmt\\Do_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php', + 'PhpParser\\Node\\Stmt\\Echo_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php', + 'PhpParser\\Node\\Stmt\\ElseIf_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/ElseIf_.php', + 'PhpParser\\Node\\Stmt\\Else_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Else_.php', + 'PhpParser\\Node\\Stmt\\Finally_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Finally_.php', + 'PhpParser\\Node\\Stmt\\For_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/For_.php', + 'PhpParser\\Node\\Stmt\\Foreach_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Foreach_.php', + 'PhpParser\\Node\\Stmt\\Function_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php', + 'PhpParser\\Node\\Stmt\\Global_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Global_.php', + 'PhpParser\\Node\\Stmt\\Goto_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Goto_.php', + 'PhpParser\\Node\\Stmt\\GroupUse' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/GroupUse.php', + 'PhpParser\\Node\\Stmt\\HaltCompiler' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/HaltCompiler.php', + 'PhpParser\\Node\\Stmt\\If_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php', + 'PhpParser\\Node\\Stmt\\InlineHTML' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/InlineHTML.php', + 'PhpParser\\Node\\Stmt\\Interface_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php', + 'PhpParser\\Node\\Stmt\\Label' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Label.php', + 'PhpParser\\Node\\Stmt\\Namespace_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php', + 'PhpParser\\Node\\Stmt\\Nop' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Nop.php', + 'PhpParser\\Node\\Stmt\\Property' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Property.php', + 'PhpParser\\Node\\Stmt\\PropertyProperty' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php', + 'PhpParser\\Node\\Stmt\\Return_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Return_.php', + 'PhpParser\\Node\\Stmt\\StaticVar' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php', + 'PhpParser\\Node\\Stmt\\Static_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Static_.php', + 'PhpParser\\Node\\Stmt\\Switch_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php', + 'PhpParser\\Node\\Stmt\\Throw_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Throw_.php', + 'PhpParser\\Node\\Stmt\\TraitUse' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php', + 'PhpParser\\Node\\Stmt\\TraitUseAdaptation' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php', + 'PhpParser\\Node\\Stmt\\TraitUseAdaptation\\Alias' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php', + 'PhpParser\\Node\\Stmt\\TraitUseAdaptation\\Precedence' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php', + 'PhpParser\\Node\\Stmt\\Trait_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php', + 'PhpParser\\Node\\Stmt\\TryCatch' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php', + 'PhpParser\\Node\\Stmt\\Unset_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php', + 'PhpParser\\Node\\Stmt\\UseUse' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/UseUse.php', + 'PhpParser\\Node\\Stmt\\Use_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Use_.php', + 'PhpParser\\Node\\Stmt\\While_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php', + 'PhpParser\\Parser' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Parser.php', + 'PhpParser\\ParserAbstract' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/ParserAbstract.php', + 'PhpParser\\ParserFactory' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/ParserFactory.php', + 'PhpParser\\Parser\\Multiple' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Parser/Multiple.php', + 'PhpParser\\Parser\\Php5' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Parser/Php5.php', + 'PhpParser\\Parser\\Php7' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Parser/Php7.php', + 'PhpParser\\Parser\\Tokens' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Parser/Tokens.php', + 'PhpParser\\PrettyPrinterAbstract' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php', + 'PhpParser\\PrettyPrinter\\Standard' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php', + 'PhpParser\\Serializer' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Serializer.php', + 'PhpParser\\Serializer\\XML' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Serializer/XML.php', + 'PhpParser\\Unserializer' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Unserializer.php', + 'PhpParser\\Unserializer\\XML' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Unserializer/XML.php', + 'Prophecy\\Argument' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Argument.php', + 'Prophecy\\Argument\\ArgumentsWildcard' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Argument/ArgumentsWildcard.php', + 'Prophecy\\Argument\\Token\\AnyValueToken' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Argument/Token/AnyValueToken.php', + 'Prophecy\\Argument\\Token\\AnyValuesToken' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Argument/Token/AnyValuesToken.php', + 'Prophecy\\Argument\\Token\\ApproximateValueToken' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Argument/Token/ApproximateValueToken.php', + 'Prophecy\\Argument\\Token\\ArrayCountToken' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayCountToken.php', + 'Prophecy\\Argument\\Token\\ArrayEntryToken' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayEntryToken.php', + 'Prophecy\\Argument\\Token\\ArrayEveryEntryToken' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayEveryEntryToken.php', + 'Prophecy\\Argument\\Token\\CallbackToken' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Argument/Token/CallbackToken.php', + 'Prophecy\\Argument\\Token\\ExactValueToken' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Argument/Token/ExactValueToken.php', + 'Prophecy\\Argument\\Token\\IdenticalValueToken' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Argument/Token/IdenticalValueToken.php', + 'Prophecy\\Argument\\Token\\LogicalAndToken' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Argument/Token/LogicalAndToken.php', + 'Prophecy\\Argument\\Token\\LogicalNotToken' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Argument/Token/LogicalNotToken.php', + 'Prophecy\\Argument\\Token\\ObjectStateToken' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Argument/Token/ObjectStateToken.php', + 'Prophecy\\Argument\\Token\\StringContainsToken' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Argument/Token/StringContainsToken.php', + 'Prophecy\\Argument\\Token\\TokenInterface' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Argument/Token/TokenInterface.php', + 'Prophecy\\Argument\\Token\\TypeToken' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Argument/Token/TypeToken.php', + 'Prophecy\\Call\\Call' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Call/Call.php', + 'Prophecy\\Call\\CallCenter' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Call/CallCenter.php', + 'Prophecy\\Comparator\\ClosureComparator' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Comparator/ClosureComparator.php', + 'Prophecy\\Comparator\\Factory' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Comparator/Factory.php', + 'Prophecy\\Comparator\\ProphecyComparator' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Comparator/ProphecyComparator.php', + 'Prophecy\\Doubler\\CachedDoubler' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Doubler/CachedDoubler.php', + 'Prophecy\\Doubler\\ClassPatch\\ClassPatchInterface' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ClassPatchInterface.php', + 'Prophecy\\Doubler\\ClassPatch\\DisableConstructorPatch' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/DisableConstructorPatch.php', + 'Prophecy\\Doubler\\ClassPatch\\HhvmExceptionPatch' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/HhvmExceptionPatch.php', + 'Prophecy\\Doubler\\ClassPatch\\KeywordPatch' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/KeywordPatch.php', + 'Prophecy\\Doubler\\ClassPatch\\MagicCallPatch' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/MagicCallPatch.php', + 'Prophecy\\Doubler\\ClassPatch\\ProphecySubjectPatch' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ProphecySubjectPatch.php', + 'Prophecy\\Doubler\\ClassPatch\\ReflectionClassNewInstancePatch' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ReflectionClassNewInstancePatch.php', + 'Prophecy\\Doubler\\ClassPatch\\SplFileInfoPatch' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/SplFileInfoPatch.php', + 'Prophecy\\Doubler\\ClassPatch\\TraversablePatch' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/TraversablePatch.php', + 'Prophecy\\Doubler\\DoubleInterface' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Doubler/DoubleInterface.php', + 'Prophecy\\Doubler\\Doubler' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Doubler/Doubler.php', + 'Prophecy\\Doubler\\Generator\\ClassCodeGenerator' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassCodeGenerator.php', + 'Prophecy\\Doubler\\Generator\\ClassCreator' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassCreator.php', + 'Prophecy\\Doubler\\Generator\\ClassMirror' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassMirror.php', + 'Prophecy\\Doubler\\Generator\\Node\\ArgumentNode' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ArgumentNode.php', + 'Prophecy\\Doubler\\Generator\\Node\\ClassNode' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ClassNode.php', + 'Prophecy\\Doubler\\Generator\\Node\\MethodNode' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/MethodNode.php', + 'Prophecy\\Doubler\\Generator\\ReflectionInterface' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Doubler/Generator/ReflectionInterface.php', + 'Prophecy\\Doubler\\LazyDouble' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Doubler/LazyDouble.php', + 'Prophecy\\Doubler\\NameGenerator' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Doubler/NameGenerator.php', + 'Prophecy\\Exception\\Call\\UnexpectedCallException' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Exception/Call/UnexpectedCallException.php', + 'Prophecy\\Exception\\Doubler\\ClassCreatorException' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassCreatorException.php', + 'Prophecy\\Exception\\Doubler\\ClassMirrorException' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassMirrorException.php', + 'Prophecy\\Exception\\Doubler\\ClassNotFoundException' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassNotFoundException.php', + 'Prophecy\\Exception\\Doubler\\DoubleException' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Exception/Doubler/DoubleException.php', + 'Prophecy\\Exception\\Doubler\\DoublerException' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Exception/Doubler/DoublerException.php', + 'Prophecy\\Exception\\Doubler\\InterfaceNotFoundException' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Exception/Doubler/InterfaceNotFoundException.php', + 'Prophecy\\Exception\\Doubler\\MethodNotExtendableException' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Exception/Doubler/MethodNotExtendableException.php', + 'Prophecy\\Exception\\Doubler\\MethodNotFoundException' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Exception/Doubler/MethodNotFoundException.php', + 'Prophecy\\Exception\\Doubler\\ReturnByReferenceException' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Exception/Doubler/ReturnByReferenceException.php', + 'Prophecy\\Exception\\Exception' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Exception/Exception.php', + 'Prophecy\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Exception/InvalidArgumentException.php', + 'Prophecy\\Exception\\Prediction\\AggregateException' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Exception/Prediction/AggregateException.php', + 'Prophecy\\Exception\\Prediction\\FailedPredictionException' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Exception/Prediction/FailedPredictionException.php', + 'Prophecy\\Exception\\Prediction\\NoCallsException' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Exception/Prediction/NoCallsException.php', + 'Prophecy\\Exception\\Prediction\\PredictionException' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Exception/Prediction/PredictionException.php', + 'Prophecy\\Exception\\Prediction\\UnexpectedCallsCountException' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Exception/Prediction/UnexpectedCallsCountException.php', + 'Prophecy\\Exception\\Prediction\\UnexpectedCallsException' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Exception/Prediction/UnexpectedCallsException.php', + 'Prophecy\\Exception\\Prophecy\\MethodProphecyException' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Exception/Prophecy/MethodProphecyException.php', + 'Prophecy\\Exception\\Prophecy\\ObjectProphecyException' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Exception/Prophecy/ObjectProphecyException.php', + 'Prophecy\\Exception\\Prophecy\\ProphecyException' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Exception/Prophecy/ProphecyException.php', + 'Prophecy\\PhpDocumentor\\ClassAndInterfaceTagRetriever' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/PhpDocumentor/ClassAndInterfaceTagRetriever.php', + 'Prophecy\\PhpDocumentor\\ClassTagRetriever' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/PhpDocumentor/ClassTagRetriever.php', + 'Prophecy\\PhpDocumentor\\LegacyClassTagRetriever' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/PhpDocumentor/LegacyClassTagRetriever.php', + 'Prophecy\\PhpDocumentor\\MethodTagRetrieverInterface' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/PhpDocumentor/MethodTagRetrieverInterface.php', + 'Prophecy\\Prediction\\CallPrediction' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Prediction/CallPrediction.php', + 'Prophecy\\Prediction\\CallTimesPrediction' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Prediction/CallTimesPrediction.php', + 'Prophecy\\Prediction\\CallbackPrediction' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Prediction/CallbackPrediction.php', + 'Prophecy\\Prediction\\NoCallsPrediction' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Prediction/NoCallsPrediction.php', + 'Prophecy\\Prediction\\PredictionInterface' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Prediction/PredictionInterface.php', + 'Prophecy\\Promise\\CallbackPromise' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Promise/CallbackPromise.php', + 'Prophecy\\Promise\\PromiseInterface' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Promise/PromiseInterface.php', + 'Prophecy\\Promise\\ReturnArgumentPromise' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Promise/ReturnArgumentPromise.php', + 'Prophecy\\Promise\\ReturnPromise' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Promise/ReturnPromise.php', + 'Prophecy\\Promise\\ThrowPromise' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Promise/ThrowPromise.php', + 'Prophecy\\Prophecy\\MethodProphecy' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Prophecy/MethodProphecy.php', + 'Prophecy\\Prophecy\\ObjectProphecy' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Prophecy/ObjectProphecy.php', + 'Prophecy\\Prophecy\\ProphecyInterface' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Prophecy/ProphecyInterface.php', + 'Prophecy\\Prophecy\\ProphecySubjectInterface' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Prophecy/ProphecySubjectInterface.php', + 'Prophecy\\Prophecy\\Revealer' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Prophecy/Revealer.php', + 'Prophecy\\Prophecy\\RevealerInterface' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Prophecy/RevealerInterface.php', + 'Prophecy\\Prophet' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Prophet.php', + 'Prophecy\\Util\\ExportUtil' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Util/ExportUtil.php', + 'Prophecy\\Util\\StringUtil' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Util/StringUtil.php', + 'Psr\\Log\\AbstractLogger' => __DIR__ . '/..' . '/psr/log/Psr/Log/AbstractLogger.php', + 'Psr\\Log\\InvalidArgumentException' => __DIR__ . '/..' . '/psr/log/Psr/Log/InvalidArgumentException.php', + 'Psr\\Log\\LogLevel' => __DIR__ . '/..' . '/psr/log/Psr/Log/LogLevel.php', + 'Psr\\Log\\LoggerAwareInterface' => __DIR__ . '/..' . '/psr/log/Psr/Log/LoggerAwareInterface.php', + 'Psr\\Log\\LoggerAwareTrait' => __DIR__ . '/..' . '/psr/log/Psr/Log/LoggerAwareTrait.php', + 'Psr\\Log\\LoggerInterface' => __DIR__ . '/..' . '/psr/log/Psr/Log/LoggerInterface.php', + 'Psr\\Log\\LoggerTrait' => __DIR__ . '/..' . '/psr/log/Psr/Log/LoggerTrait.php', + 'Psr\\Log\\NullLogger' => __DIR__ . '/..' . '/psr/log/Psr/Log/NullLogger.php', + 'Psr\\Log\\Test\\DummyTest' => __DIR__ . '/..' . '/psr/log/Psr/Log/Test/LoggerInterfaceTest.php', + 'Psr\\Log\\Test\\LoggerInterfaceTest' => __DIR__ . '/..' . '/psr/log/Psr/Log/Test/LoggerInterfaceTest.php', + 'Psy\\Autoloader' => __DIR__ . '/..' . '/psy/psysh/src/Psy/Autoloader.php', + 'Psy\\CodeCleaner' => __DIR__ . '/..' . '/psy/psysh/src/Psy/CodeCleaner.php', + 'Psy\\CodeCleaner\\AbstractClassPass' => __DIR__ . '/..' . '/psy/psysh/src/Psy/CodeCleaner/AbstractClassPass.php', + 'Psy\\CodeCleaner\\AssignThisVariablePass' => __DIR__ . '/..' . '/psy/psysh/src/Psy/CodeCleaner/AssignThisVariablePass.php', + 'Psy\\CodeCleaner\\CallTimePassByReferencePass' => __DIR__ . '/..' . '/psy/psysh/src/Psy/CodeCleaner/CallTimePassByReferencePass.php', + 'Psy\\CodeCleaner\\CalledClassPass' => __DIR__ . '/..' . '/psy/psysh/src/Psy/CodeCleaner/CalledClassPass.php', + 'Psy\\CodeCleaner\\CodeCleanerPass' => __DIR__ . '/..' . '/psy/psysh/src/Psy/CodeCleaner/CodeCleanerPass.php', + 'Psy\\CodeCleaner\\ExitPass' => __DIR__ . '/..' . '/psy/psysh/src/Psy/CodeCleaner/ExitPass.php', + 'Psy\\CodeCleaner\\FinalClassPass' => __DIR__ . '/..' . '/psy/psysh/src/Psy/CodeCleaner/FinalClassPass.php', + 'Psy\\CodeCleaner\\FunctionReturnInWriteContextPass' => __DIR__ . '/..' . '/psy/psysh/src/Psy/CodeCleaner/FunctionReturnInWriteContextPass.php', + 'Psy\\CodeCleaner\\ImplicitReturnPass' => __DIR__ . '/..' . '/psy/psysh/src/Psy/CodeCleaner/ImplicitReturnPass.php', + 'Psy\\CodeCleaner\\InstanceOfPass' => __DIR__ . '/..' . '/psy/psysh/src/Psy/CodeCleaner/InstanceOfPass.php', + 'Psy\\CodeCleaner\\LeavePsyshAlonePass' => __DIR__ . '/..' . '/psy/psysh/src/Psy/CodeCleaner/LeavePsyshAlonePass.php', + 'Psy\\CodeCleaner\\LegacyEmptyPass' => __DIR__ . '/..' . '/psy/psysh/src/Psy/CodeCleaner/LegacyEmptyPass.php', + 'Psy\\CodeCleaner\\MagicConstantsPass' => __DIR__ . '/..' . '/psy/psysh/src/Psy/CodeCleaner/MagicConstantsPass.php', + 'Psy\\CodeCleaner\\NamespaceAwarePass' => __DIR__ . '/..' . '/psy/psysh/src/Psy/CodeCleaner/NamespaceAwarePass.php', + 'Psy\\CodeCleaner\\NamespacePass' => __DIR__ . '/..' . '/psy/psysh/src/Psy/CodeCleaner/NamespacePass.php', + 'Psy\\CodeCleaner\\PassableByReferencePass' => __DIR__ . '/..' . '/psy/psysh/src/Psy/CodeCleaner/PassableByReferencePass.php', + 'Psy\\CodeCleaner\\StaticConstructorPass' => __DIR__ . '/..' . '/psy/psysh/src/Psy/CodeCleaner/StaticConstructorPass.php', + 'Psy\\CodeCleaner\\StrictTypesPass' => __DIR__ . '/..' . '/psy/psysh/src/Psy/CodeCleaner/StrictTypesPass.php', + 'Psy\\CodeCleaner\\UseStatementPass' => __DIR__ . '/..' . '/psy/psysh/src/Psy/CodeCleaner/UseStatementPass.php', + 'Psy\\CodeCleaner\\ValidClassNamePass' => __DIR__ . '/..' . '/psy/psysh/src/Psy/CodeCleaner/ValidClassNamePass.php', + 'Psy\\CodeCleaner\\ValidConstantPass' => __DIR__ . '/..' . '/psy/psysh/src/Psy/CodeCleaner/ValidConstantPass.php', + 'Psy\\CodeCleaner\\ValidFunctionNamePass' => __DIR__ . '/..' . '/psy/psysh/src/Psy/CodeCleaner/ValidFunctionNamePass.php', + 'Psy\\Command\\BufferCommand' => __DIR__ . '/..' . '/psy/psysh/src/Psy/Command/BufferCommand.php', + 'Psy\\Command\\ClearCommand' => __DIR__ . '/..' . '/psy/psysh/src/Psy/Command/ClearCommand.php', + 'Psy\\Command\\Command' => __DIR__ . '/..' . '/psy/psysh/src/Psy/Command/Command.php', + 'Psy\\Command\\DocCommand' => __DIR__ . '/..' . '/psy/psysh/src/Psy/Command/DocCommand.php', + 'Psy\\Command\\DumpCommand' => __DIR__ . '/..' . '/psy/psysh/src/Psy/Command/DumpCommand.php', + 'Psy\\Command\\ExitCommand' => __DIR__ . '/..' . '/psy/psysh/src/Psy/Command/ExitCommand.php', + 'Psy\\Command\\HelpCommand' => __DIR__ . '/..' . '/psy/psysh/src/Psy/Command/HelpCommand.php', + 'Psy\\Command\\HistoryCommand' => __DIR__ . '/..' . '/psy/psysh/src/Psy/Command/HistoryCommand.php', + 'Psy\\Command\\ListCommand' => __DIR__ . '/..' . '/psy/psysh/src/Psy/Command/ListCommand.php', + 'Psy\\Command\\ListCommand\\ClassConstantEnumerator' => __DIR__ . '/..' . '/psy/psysh/src/Psy/Command/ListCommand/ClassConstantEnumerator.php', + 'Psy\\Command\\ListCommand\\ClassEnumerator' => __DIR__ . '/..' . '/psy/psysh/src/Psy/Command/ListCommand/ClassEnumerator.php', + 'Psy\\Command\\ListCommand\\ConstantEnumerator' => __DIR__ . '/..' . '/psy/psysh/src/Psy/Command/ListCommand/ConstantEnumerator.php', + 'Psy\\Command\\ListCommand\\Enumerator' => __DIR__ . '/..' . '/psy/psysh/src/Psy/Command/ListCommand/Enumerator.php', + 'Psy\\Command\\ListCommand\\FunctionEnumerator' => __DIR__ . '/..' . '/psy/psysh/src/Psy/Command/ListCommand/FunctionEnumerator.php', + 'Psy\\Command\\ListCommand\\GlobalVariableEnumerator' => __DIR__ . '/..' . '/psy/psysh/src/Psy/Command/ListCommand/GlobalVariableEnumerator.php', + 'Psy\\Command\\ListCommand\\InterfaceEnumerator' => __DIR__ . '/..' . '/psy/psysh/src/Psy/Command/ListCommand/InterfaceEnumerator.php', + 'Psy\\Command\\ListCommand\\MethodEnumerator' => __DIR__ . '/..' . '/psy/psysh/src/Psy/Command/ListCommand/MethodEnumerator.php', + 'Psy\\Command\\ListCommand\\PropertyEnumerator' => __DIR__ . '/..' . '/psy/psysh/src/Psy/Command/ListCommand/PropertyEnumerator.php', + 'Psy\\Command\\ListCommand\\TraitEnumerator' => __DIR__ . '/..' . '/psy/psysh/src/Psy/Command/ListCommand/TraitEnumerator.php', + 'Psy\\Command\\ListCommand\\VariableEnumerator' => __DIR__ . '/..' . '/psy/psysh/src/Psy/Command/ListCommand/VariableEnumerator.php', + 'Psy\\Command\\ParseCommand' => __DIR__ . '/..' . '/psy/psysh/src/Psy/Command/ParseCommand.php', + 'Psy\\Command\\PsyVersionCommand' => __DIR__ . '/..' . '/psy/psysh/src/Psy/Command/PsyVersionCommand.php', + 'Psy\\Command\\ReflectingCommand' => __DIR__ . '/..' . '/psy/psysh/src/Psy/Command/ReflectingCommand.php', + 'Psy\\Command\\ShowCommand' => __DIR__ . '/..' . '/psy/psysh/src/Psy/Command/ShowCommand.php', + 'Psy\\Command\\ThrowUpCommand' => __DIR__ . '/..' . '/psy/psysh/src/Psy/Command/ThrowUpCommand.php', + 'Psy\\Command\\TraceCommand' => __DIR__ . '/..' . '/psy/psysh/src/Psy/Command/TraceCommand.php', + 'Psy\\Command\\WhereamiCommand' => __DIR__ . '/..' . '/psy/psysh/src/Psy/Command/WhereamiCommand.php', + 'Psy\\Command\\WtfCommand' => __DIR__ . '/..' . '/psy/psysh/src/Psy/Command/WtfCommand.php', + 'Psy\\Compiler' => __DIR__ . '/..' . '/psy/psysh/src/Psy/Compiler.php', + 'Psy\\ConfigPaths' => __DIR__ . '/..' . '/psy/psysh/src/Psy/ConfigPaths.php', + 'Psy\\Configuration' => __DIR__ . '/..' . '/psy/psysh/src/Psy/Configuration.php', + 'Psy\\ConsoleColorFactory' => __DIR__ . '/..' . '/psy/psysh/src/Psy/ConsoleColorFactory.php', + 'Psy\\Context' => __DIR__ . '/..' . '/psy/psysh/src/Psy/Context.php', + 'Psy\\ContextAware' => __DIR__ . '/..' . '/psy/psysh/src/Psy/ContextAware.php', + 'Psy\\Exception\\BreakException' => __DIR__ . '/..' . '/psy/psysh/src/Psy/Exception/BreakException.php', + 'Psy\\Exception\\DeprecatedException' => __DIR__ . '/..' . '/psy/psysh/src/Psy/Exception/DeprecatedException.php', + 'Psy\\Exception\\ErrorException' => __DIR__ . '/..' . '/psy/psysh/src/Psy/Exception/ErrorException.php', + 'Psy\\Exception\\Exception' => __DIR__ . '/..' . '/psy/psysh/src/Psy/Exception/Exception.php', + 'Psy\\Exception\\FatalErrorException' => __DIR__ . '/..' . '/psy/psysh/src/Psy/Exception/FatalErrorException.php', + 'Psy\\Exception\\ParseErrorException' => __DIR__ . '/..' . '/psy/psysh/src/Psy/Exception/ParseErrorException.php', + 'Psy\\Exception\\RuntimeException' => __DIR__ . '/..' . '/psy/psysh/src/Psy/Exception/RuntimeException.php', + 'Psy\\Exception\\ThrowUpException' => __DIR__ . '/..' . '/psy/psysh/src/Psy/Exception/ThrowUpException.php', + 'Psy\\Exception\\TypeErrorException' => __DIR__ . '/..' . '/psy/psysh/src/Psy/Exception/TypeErrorException.php', + 'Psy\\ExecutionLoop\\ForkingLoop' => __DIR__ . '/..' . '/psy/psysh/src/Psy/ExecutionLoop/ForkingLoop.php', + 'Psy\\ExecutionLoop\\Loop' => __DIR__ . '/..' . '/psy/psysh/src/Psy/ExecutionLoop/Loop.php', + 'Psy\\Formatter\\CodeFormatter' => __DIR__ . '/..' . '/psy/psysh/src/Psy/Formatter/CodeFormatter.php', + 'Psy\\Formatter\\DocblockFormatter' => __DIR__ . '/..' . '/psy/psysh/src/Psy/Formatter/DocblockFormatter.php', + 'Psy\\Formatter\\Formatter' => __DIR__ . '/..' . '/psy/psysh/src/Psy/Formatter/Formatter.php', + 'Psy\\Formatter\\SignatureFormatter' => __DIR__ . '/..' . '/psy/psysh/src/Psy/Formatter/SignatureFormatter.php', + 'Psy\\Output\\OutputPager' => __DIR__ . '/..' . '/psy/psysh/src/Psy/Output/OutputPager.php', + 'Psy\\Output\\PassthruPager' => __DIR__ . '/..' . '/psy/psysh/src/Psy/Output/PassthruPager.php', + 'Psy\\Output\\ProcOutputPager' => __DIR__ . '/..' . '/psy/psysh/src/Psy/Output/ProcOutputPager.php', + 'Psy\\Output\\ShellOutput' => __DIR__ . '/..' . '/psy/psysh/src/Psy/Output/ShellOutput.php', + 'Psy\\ParserFactory' => __DIR__ . '/..' . '/psy/psysh/src/Psy/ParserFactory.php', + 'Psy\\Readline\\GNUReadline' => __DIR__ . '/..' . '/psy/psysh/src/Psy/Readline/GNUReadline.php', + 'Psy\\Readline\\HoaConsole' => __DIR__ . '/..' . '/psy/psysh/src/Psy/Readline/HoaConsole.php', + 'Psy\\Readline\\Libedit' => __DIR__ . '/..' . '/psy/psysh/src/Psy/Readline/Libedit.php', + 'Psy\\Readline\\Readline' => __DIR__ . '/..' . '/psy/psysh/src/Psy/Readline/Readline.php', + 'Psy\\Readline\\Transient' => __DIR__ . '/..' . '/psy/psysh/src/Psy/Readline/Transient.php', + 'Psy\\Reflection\\ReflectionConstant' => __DIR__ . '/..' . '/psy/psysh/src/Psy/Reflection/ReflectionConstant.php', + 'Psy\\Reflection\\ReflectionLanguageConstruct' => __DIR__ . '/..' . '/psy/psysh/src/Psy/Reflection/ReflectionLanguageConstruct.php', + 'Psy\\Reflection\\ReflectionLanguageConstructParameter' => __DIR__ . '/..' . '/psy/psysh/src/Psy/Reflection/ReflectionLanguageConstructParameter.php', + 'Psy\\Shell' => __DIR__ . '/..' . '/psy/psysh/src/Psy/Shell.php', + 'Psy\\TabCompletion\\AutoCompleter' => __DIR__ . '/..' . '/psy/psysh/src/Psy/TabCompletion/AutoCompleter.php', + 'Psy\\TabCompletion\\Matcher\\AbstractContextAwareMatcher' => __DIR__ . '/..' . '/psy/psysh/src/Psy/TabCompletion/Matcher/AbstractContextAwareMatcher.php', + 'Psy\\TabCompletion\\Matcher\\AbstractMatcher' => __DIR__ . '/..' . '/psy/psysh/src/Psy/TabCompletion/Matcher/AbstractMatcher.php', + 'Psy\\TabCompletion\\Matcher\\ClassAttributesMatcher' => __DIR__ . '/..' . '/psy/psysh/src/Psy/TabCompletion/Matcher/ClassAttributesMatcher.php', + 'Psy\\TabCompletion\\Matcher\\ClassMethodsMatcher' => __DIR__ . '/..' . '/psy/psysh/src/Psy/TabCompletion/Matcher/ClassMethodsMatcher.php', + 'Psy\\TabCompletion\\Matcher\\ClassNamesMatcher' => __DIR__ . '/..' . '/psy/psysh/src/Psy/TabCompletion/Matcher/ClassNamesMatcher.php', + 'Psy\\TabCompletion\\Matcher\\CommandsMatcher' => __DIR__ . '/..' . '/psy/psysh/src/Psy/TabCompletion/Matcher/CommandsMatcher.php', + 'Psy\\TabCompletion\\Matcher\\ConstantsMatcher' => __DIR__ . '/..' . '/psy/psysh/src/Psy/TabCompletion/Matcher/ConstantsMatcher.php', + 'Psy\\TabCompletion\\Matcher\\FunctionsMatcher' => __DIR__ . '/..' . '/psy/psysh/src/Psy/TabCompletion/Matcher/FunctionsMatcher.php', + 'Psy\\TabCompletion\\Matcher\\KeywordsMatcher' => __DIR__ . '/..' . '/psy/psysh/src/Psy/TabCompletion/Matcher/KeywordsMatcher.php', + 'Psy\\TabCompletion\\Matcher\\MongoClientMatcher' => __DIR__ . '/..' . '/psy/psysh/src/Psy/TabCompletion/Matcher/MongoClientMatcher.php', + 'Psy\\TabCompletion\\Matcher\\MongoDatabaseMatcher' => __DIR__ . '/..' . '/psy/psysh/src/Psy/TabCompletion/Matcher/MongoDatabaseMatcher.php', + 'Psy\\TabCompletion\\Matcher\\ObjectAttributesMatcher' => __DIR__ . '/..' . '/psy/psysh/src/Psy/TabCompletion/Matcher/ObjectAttributesMatcher.php', + 'Psy\\TabCompletion\\Matcher\\ObjectMethodsMatcher' => __DIR__ . '/..' . '/psy/psysh/src/Psy/TabCompletion/Matcher/ObjectMethodsMatcher.php', + 'Psy\\TabCompletion\\Matcher\\VariablesMatcher' => __DIR__ . '/..' . '/psy/psysh/src/Psy/TabCompletion/Matcher/VariablesMatcher.php', + 'Psy\\Util\\Docblock' => __DIR__ . '/..' . '/psy/psysh/src/Psy/Util/Docblock.php', + 'Psy\\Util\\Json' => __DIR__ . '/..' . '/psy/psysh/src/Psy/Util/Json.php', + 'Psy\\Util\\Mirror' => __DIR__ . '/..' . '/psy/psysh/src/Psy/Util/Mirror.php', + 'Psy\\Util\\Str' => __DIR__ . '/..' . '/psy/psysh/src/Psy/Util/Str.php', + 'Psy\\VarDumper\\Cloner' => __DIR__ . '/..' . '/psy/psysh/src/Psy/VarDumper/Cloner.php', + 'Psy\\VarDumper\\Dumper' => __DIR__ . '/..' . '/psy/psysh/src/Psy/VarDumper/Dumper.php', + 'Psy\\VarDumper\\Presenter' => __DIR__ . '/..' . '/psy/psysh/src/Psy/VarDumper/Presenter.php', + 'Psy\\VarDumper\\PresenterAware' => __DIR__ . '/..' . '/psy/psysh/src/Psy/VarDumper/PresenterAware.php', + 'Psy\\VersionUpdater\\Checker' => __DIR__ . '/..' . '/psy/psysh/src/Psy/VersionUpdater/Checker.php', + 'Psy\\VersionUpdater\\GitHubChecker' => __DIR__ . '/..' . '/psy/psysh/src/Psy/VersionUpdater/GitHubChecker.php', + 'Psy\\VersionUpdater\\IntervalChecker' => __DIR__ . '/..' . '/psy/psysh/src/Psy/VersionUpdater/IntervalChecker.php', + 'Psy\\VersionUpdater\\NoopChecker' => __DIR__ . '/..' . '/psy/psysh/src/Psy/VersionUpdater/NoopChecker.php', + 'Ramsey\\Uuid\\BinaryUtils' => __DIR__ . '/..' . '/ramsey/uuid/src/BinaryUtils.php', + 'Ramsey\\Uuid\\Builder\\DefaultUuidBuilder' => __DIR__ . '/..' . '/ramsey/uuid/src/Builder/DefaultUuidBuilder.php', + 'Ramsey\\Uuid\\Builder\\DegradedUuidBuilder' => __DIR__ . '/..' . '/ramsey/uuid/src/Builder/DegradedUuidBuilder.php', + 'Ramsey\\Uuid\\Builder\\UuidBuilderInterface' => __DIR__ . '/..' . '/ramsey/uuid/src/Builder/UuidBuilderInterface.php', + 'Ramsey\\Uuid\\Codec\\CodecInterface' => __DIR__ . '/..' . '/ramsey/uuid/src/Codec/CodecInterface.php', + 'Ramsey\\Uuid\\Codec\\GuidStringCodec' => __DIR__ . '/..' . '/ramsey/uuid/src/Codec/GuidStringCodec.php', + 'Ramsey\\Uuid\\Codec\\OrderedTimeCodec' => __DIR__ . '/..' . '/ramsey/uuid/src/Codec/OrderedTimeCodec.php', + 'Ramsey\\Uuid\\Codec\\StringCodec' => __DIR__ . '/..' . '/ramsey/uuid/src/Codec/StringCodec.php', + 'Ramsey\\Uuid\\Codec\\TimestampFirstCombCodec' => __DIR__ . '/..' . '/ramsey/uuid/src/Codec/TimestampFirstCombCodec.php', + 'Ramsey\\Uuid\\Codec\\TimestampLastCombCodec' => __DIR__ . '/..' . '/ramsey/uuid/src/Codec/TimestampLastCombCodec.php', + 'Ramsey\\Uuid\\Converter\\NumberConverterInterface' => __DIR__ . '/..' . '/ramsey/uuid/src/Converter/NumberConverterInterface.php', + 'Ramsey\\Uuid\\Converter\\Number\\BigNumberConverter' => __DIR__ . '/..' . '/ramsey/uuid/src/Converter/Number/BigNumberConverter.php', + 'Ramsey\\Uuid\\Converter\\Number\\DegradedNumberConverter' => __DIR__ . '/..' . '/ramsey/uuid/src/Converter/Number/DegradedNumberConverter.php', + 'Ramsey\\Uuid\\Converter\\TimeConverterInterface' => __DIR__ . '/..' . '/ramsey/uuid/src/Converter/TimeConverterInterface.php', + 'Ramsey\\Uuid\\Converter\\Time\\BigNumberTimeConverter' => __DIR__ . '/..' . '/ramsey/uuid/src/Converter/Time/BigNumberTimeConverter.php', + 'Ramsey\\Uuid\\Converter\\Time\\DegradedTimeConverter' => __DIR__ . '/..' . '/ramsey/uuid/src/Converter/Time/DegradedTimeConverter.php', + 'Ramsey\\Uuid\\Converter\\Time\\PhpTimeConverter' => __DIR__ . '/..' . '/ramsey/uuid/src/Converter/Time/PhpTimeConverter.php', + 'Ramsey\\Uuid\\DegradedUuid' => __DIR__ . '/..' . '/ramsey/uuid/src/DegradedUuid.php', + 'Ramsey\\Uuid\\Exception\\InvalidUuidStringException' => __DIR__ . '/..' . '/ramsey/uuid/src/Exception/InvalidUuidStringException.php', + 'Ramsey\\Uuid\\Exception\\UnsatisfiedDependencyException' => __DIR__ . '/..' . '/ramsey/uuid/src/Exception/UnsatisfiedDependencyException.php', + 'Ramsey\\Uuid\\Exception\\UnsupportedOperationException' => __DIR__ . '/..' . '/ramsey/uuid/src/Exception/UnsupportedOperationException.php', + 'Ramsey\\Uuid\\FeatureSet' => __DIR__ . '/..' . '/ramsey/uuid/src/FeatureSet.php', + 'Ramsey\\Uuid\\Generator\\CombGenerator' => __DIR__ . '/..' . '/ramsey/uuid/src/Generator/CombGenerator.php', + 'Ramsey\\Uuid\\Generator\\DefaultTimeGenerator' => __DIR__ . '/..' . '/ramsey/uuid/src/Generator/DefaultTimeGenerator.php', + 'Ramsey\\Uuid\\Generator\\MtRandGenerator' => __DIR__ . '/..' . '/ramsey/uuid/src/Generator/MtRandGenerator.php', + 'Ramsey\\Uuid\\Generator\\OpenSslGenerator' => __DIR__ . '/..' . '/ramsey/uuid/src/Generator/OpenSslGenerator.php', + 'Ramsey\\Uuid\\Generator\\PeclUuidRandomGenerator' => __DIR__ . '/..' . '/ramsey/uuid/src/Generator/PeclUuidRandomGenerator.php', + 'Ramsey\\Uuid\\Generator\\PeclUuidTimeGenerator' => __DIR__ . '/..' . '/ramsey/uuid/src/Generator/PeclUuidTimeGenerator.php', + 'Ramsey\\Uuid\\Generator\\RandomBytesGenerator' => __DIR__ . '/..' . '/ramsey/uuid/src/Generator/RandomBytesGenerator.php', + 'Ramsey\\Uuid\\Generator\\RandomGeneratorFactory' => __DIR__ . '/..' . '/ramsey/uuid/src/Generator/RandomGeneratorFactory.php', + 'Ramsey\\Uuid\\Generator\\RandomGeneratorInterface' => __DIR__ . '/..' . '/ramsey/uuid/src/Generator/RandomGeneratorInterface.php', + 'Ramsey\\Uuid\\Generator\\RandomLibAdapter' => __DIR__ . '/..' . '/ramsey/uuid/src/Generator/RandomLibAdapter.php', + 'Ramsey\\Uuid\\Generator\\SodiumRandomGenerator' => __DIR__ . '/..' . '/ramsey/uuid/src/Generator/SodiumRandomGenerator.php', + 'Ramsey\\Uuid\\Generator\\TimeGeneratorFactory' => __DIR__ . '/..' . '/ramsey/uuid/src/Generator/TimeGeneratorFactory.php', + 'Ramsey\\Uuid\\Generator\\TimeGeneratorInterface' => __DIR__ . '/..' . '/ramsey/uuid/src/Generator/TimeGeneratorInterface.php', + 'Ramsey\\Uuid\\Provider\\NodeProviderInterface' => __DIR__ . '/..' . '/ramsey/uuid/src/Provider/NodeProviderInterface.php', + 'Ramsey\\Uuid\\Provider\\Node\\FallbackNodeProvider' => __DIR__ . '/..' . '/ramsey/uuid/src/Provider/Node/FallbackNodeProvider.php', + 'Ramsey\\Uuid\\Provider\\Node\\RandomNodeProvider' => __DIR__ . '/..' . '/ramsey/uuid/src/Provider/Node/RandomNodeProvider.php', + 'Ramsey\\Uuid\\Provider\\Node\\SystemNodeProvider' => __DIR__ . '/..' . '/ramsey/uuid/src/Provider/Node/SystemNodeProvider.php', + 'Ramsey\\Uuid\\Provider\\TimeProviderInterface' => __DIR__ . '/..' . '/ramsey/uuid/src/Provider/TimeProviderInterface.php', + 'Ramsey\\Uuid\\Provider\\Time\\FixedTimeProvider' => __DIR__ . '/..' . '/ramsey/uuid/src/Provider/Time/FixedTimeProvider.php', + 'Ramsey\\Uuid\\Provider\\Time\\SystemTimeProvider' => __DIR__ . '/..' . '/ramsey/uuid/src/Provider/Time/SystemTimeProvider.php', + 'Ramsey\\Uuid\\Uuid' => __DIR__ . '/..' . '/ramsey/uuid/src/Uuid.php', + 'Ramsey\\Uuid\\UuidFactory' => __DIR__ . '/..' . '/ramsey/uuid/src/UuidFactory.php', + 'Ramsey\\Uuid\\UuidFactoryInterface' => __DIR__ . '/..' . '/ramsey/uuid/src/UuidFactoryInterface.php', + 'Ramsey\\Uuid\\UuidInterface' => __DIR__ . '/..' . '/ramsey/uuid/src/UuidInterface.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', + 'SebastianBergmann\\CodeCoverage\\Driver\\HHVM' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Driver/HHVM.php', + 'SebastianBergmann\\CodeCoverage\\Driver\\PHPDBG' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Driver/PHPDBG.php', + 'SebastianBergmann\\CodeCoverage\\Driver\\Xdebug' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Driver/Xdebug.php', + 'SebastianBergmann\\CodeCoverage\\Exception' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/Exception.php', + 'SebastianBergmann\\CodeCoverage\\Filter' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Filter.php', + 'SebastianBergmann\\CodeCoverage\\InvalidArgumentException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/InvalidArgumentException.php', + 'SebastianBergmann\\CodeCoverage\\MissingCoversAnnotationException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/MissingCoversAnnotationException.php', + 'SebastianBergmann\\CodeCoverage\\Node\\AbstractNode' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Node/AbstractNode.php', + 'SebastianBergmann\\CodeCoverage\\Node\\Builder' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Node/Builder.php', + 'SebastianBergmann\\CodeCoverage\\Node\\Directory' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Node/Directory.php', + 'SebastianBergmann\\CodeCoverage\\Node\\File' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Node/File.php', + 'SebastianBergmann\\CodeCoverage\\Node\\Iterator' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Node/Iterator.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Clover' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Clover.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Crap4j' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Crap4j.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Html\\Dashboard' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Html/Renderer/Dashboard.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Html\\Directory' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Html/Renderer/Directory.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Html\\Facade' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Html/Facade.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Html\\File' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Html/Renderer/File.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Html\\Renderer' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Html/Renderer.php', + 'SebastianBergmann\\CodeCoverage\\Report\\PHP' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/PHP.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Text' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Text.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Coverage' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Coverage.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Directory' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Directory.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Facade' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Facade.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\File' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/File.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Method' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Method.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Node' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Node.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Project' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Project.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Report' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Report.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Tests' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Tests.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Totals' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Totals.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Unit' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Unit.php', + 'SebastianBergmann\\CodeCoverage\\RuntimeException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/RuntimeException.php', + 'SebastianBergmann\\CodeCoverage\\UnintentionallyCoveredCodeException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/UnintentionallyCoveredCodeException.php', + 'SebastianBergmann\\CodeCoverage\\Util' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Util.php', + 'SebastianBergmann\\CodeUnitReverseLookup\\Wizard' => __DIR__ . '/..' . '/sebastian/code-unit-reverse-lookup/src/Wizard.php', + 'SebastianBergmann\\Comparator\\ArrayComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ArrayComparator.php', + 'SebastianBergmann\\Comparator\\Comparator' => __DIR__ . '/..' . '/sebastian/comparator/src/Comparator.php', + 'SebastianBergmann\\Comparator\\ComparisonFailure' => __DIR__ . '/..' . '/sebastian/comparator/src/ComparisonFailure.php', + 'SebastianBergmann\\Comparator\\DOMNodeComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/DOMNodeComparator.php', + 'SebastianBergmann\\Comparator\\DateTimeComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/DateTimeComparator.php', + 'SebastianBergmann\\Comparator\\DoubleComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/DoubleComparator.php', + 'SebastianBergmann\\Comparator\\ExceptionComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ExceptionComparator.php', + 'SebastianBergmann\\Comparator\\Factory' => __DIR__ . '/..' . '/sebastian/comparator/src/Factory.php', + 'SebastianBergmann\\Comparator\\MockObjectComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/MockObjectComparator.php', + 'SebastianBergmann\\Comparator\\NumericComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/NumericComparator.php', + 'SebastianBergmann\\Comparator\\ObjectComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ObjectComparator.php', + 'SebastianBergmann\\Comparator\\ResourceComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ResourceComparator.php', + 'SebastianBergmann\\Comparator\\ScalarComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ScalarComparator.php', + 'SebastianBergmann\\Comparator\\SplObjectStorageComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/SplObjectStorageComparator.php', + 'SebastianBergmann\\Comparator\\TypeComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/TypeComparator.php', + 'SebastianBergmann\\Diff\\Chunk' => __DIR__ . '/..' . '/sebastian/diff/src/Chunk.php', + 'SebastianBergmann\\Diff\\Diff' => __DIR__ . '/..' . '/sebastian/diff/src/Diff.php', + 'SebastianBergmann\\Diff\\Differ' => __DIR__ . '/..' . '/sebastian/diff/src/Differ.php', + 'SebastianBergmann\\Diff\\LCS\\LongestCommonSubsequence' => __DIR__ . '/..' . '/sebastian/diff/src/LCS/LongestCommonSubsequence.php', + 'SebastianBergmann\\Diff\\LCS\\MemoryEfficientImplementation' => __DIR__ . '/..' . '/sebastian/diff/src/LCS/MemoryEfficientLongestCommonSubsequenceImplementation.php', + 'SebastianBergmann\\Diff\\LCS\\TimeEfficientImplementation' => __DIR__ . '/..' . '/sebastian/diff/src/LCS/TimeEfficientLongestCommonSubsequenceImplementation.php', + 'SebastianBergmann\\Diff\\Line' => __DIR__ . '/..' . '/sebastian/diff/src/Line.php', + 'SebastianBergmann\\Diff\\Parser' => __DIR__ . '/..' . '/sebastian/diff/src/Parser.php', + 'SebastianBergmann\\Environment\\Console' => __DIR__ . '/..' . '/sebastian/environment/src/Console.php', + 'SebastianBergmann\\Environment\\Runtime' => __DIR__ . '/..' . '/sebastian/environment/src/Runtime.php', + 'SebastianBergmann\\Exporter\\Exporter' => __DIR__ . '/..' . '/sebastian/exporter/src/Exporter.php', + 'SebastianBergmann\\GlobalState\\Blacklist' => __DIR__ . '/..' . '/sebastian/global-state/src/Blacklist.php', + 'SebastianBergmann\\GlobalState\\CodeExporter' => __DIR__ . '/..' . '/sebastian/global-state/src/CodeExporter.php', + 'SebastianBergmann\\GlobalState\\Exception' => __DIR__ . '/..' . '/sebastian/global-state/src/Exception.php', + 'SebastianBergmann\\GlobalState\\Restorer' => __DIR__ . '/..' . '/sebastian/global-state/src/Restorer.php', + 'SebastianBergmann\\GlobalState\\RuntimeException' => __DIR__ . '/..' . '/sebastian/global-state/src/RuntimeException.php', + 'SebastianBergmann\\GlobalState\\Snapshot' => __DIR__ . '/..' . '/sebastian/global-state/src/Snapshot.php', + 'SebastianBergmann\\ObjectEnumerator\\Enumerator' => __DIR__ . '/..' . '/sebastian/object-enumerator/src/Enumerator.php', + 'SebastianBergmann\\ObjectEnumerator\\Exception' => __DIR__ . '/..' . '/sebastian/object-enumerator/src/Exception.php', + 'SebastianBergmann\\ObjectEnumerator\\InvalidArgumentException' => __DIR__ . '/..' . '/sebastian/object-enumerator/src/InvalidArgumentException.php', + 'SebastianBergmann\\RecursionContext\\Context' => __DIR__ . '/..' . '/sebastian/recursion-context/src/Context.php', + 'SebastianBergmann\\RecursionContext\\Exception' => __DIR__ . '/..' . '/sebastian/recursion-context/src/Exception.php', + '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', + 'Symfony\\Component\\Console\\Application' => __DIR__ . '/..' . '/symfony/console/Application.php', + 'Symfony\\Component\\Console\\Command\\Command' => __DIR__ . '/..' . '/symfony/console/Command/Command.php', + 'Symfony\\Component\\Console\\Command\\HelpCommand' => __DIR__ . '/..' . '/symfony/console/Command/HelpCommand.php', + 'Symfony\\Component\\Console\\Command\\ListCommand' => __DIR__ . '/..' . '/symfony/console/Command/ListCommand.php', + 'Symfony\\Component\\Console\\Command\\LockableTrait' => __DIR__ . '/..' . '/symfony/console/Command/LockableTrait.php', + 'Symfony\\Component\\Console\\ConsoleEvents' => __DIR__ . '/..' . '/symfony/console/ConsoleEvents.php', + 'Symfony\\Component\\Console\\Descriptor\\ApplicationDescription' => __DIR__ . '/..' . '/symfony/console/Descriptor/ApplicationDescription.php', + 'Symfony\\Component\\Console\\Descriptor\\Descriptor' => __DIR__ . '/..' . '/symfony/console/Descriptor/Descriptor.php', + 'Symfony\\Component\\Console\\Descriptor\\DescriptorInterface' => __DIR__ . '/..' . '/symfony/console/Descriptor/DescriptorInterface.php', + 'Symfony\\Component\\Console\\Descriptor\\JsonDescriptor' => __DIR__ . '/..' . '/symfony/console/Descriptor/JsonDescriptor.php', + 'Symfony\\Component\\Console\\Descriptor\\MarkdownDescriptor' => __DIR__ . '/..' . '/symfony/console/Descriptor/MarkdownDescriptor.php', + 'Symfony\\Component\\Console\\Descriptor\\TextDescriptor' => __DIR__ . '/..' . '/symfony/console/Descriptor/TextDescriptor.php', + 'Symfony\\Component\\Console\\Descriptor\\XmlDescriptor' => __DIR__ . '/..' . '/symfony/console/Descriptor/XmlDescriptor.php', + 'Symfony\\Component\\Console\\Event\\ConsoleCommandEvent' => __DIR__ . '/..' . '/symfony/console/Event/ConsoleCommandEvent.php', + 'Symfony\\Component\\Console\\Event\\ConsoleEvent' => __DIR__ . '/..' . '/symfony/console/Event/ConsoleEvent.php', + 'Symfony\\Component\\Console\\Event\\ConsoleExceptionEvent' => __DIR__ . '/..' . '/symfony/console/Event/ConsoleExceptionEvent.php', + 'Symfony\\Component\\Console\\Event\\ConsoleTerminateEvent' => __DIR__ . '/..' . '/symfony/console/Event/ConsoleTerminateEvent.php', + 'Symfony\\Component\\Console\\Exception\\CommandNotFoundException' => __DIR__ . '/..' . '/symfony/console/Exception/CommandNotFoundException.php', + 'Symfony\\Component\\Console\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/console/Exception/ExceptionInterface.php', + 'Symfony\\Component\\Console\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/symfony/console/Exception/InvalidArgumentException.php', + 'Symfony\\Component\\Console\\Exception\\InvalidOptionException' => __DIR__ . '/..' . '/symfony/console/Exception/InvalidOptionException.php', + 'Symfony\\Component\\Console\\Exception\\LogicException' => __DIR__ . '/..' . '/symfony/console/Exception/LogicException.php', + 'Symfony\\Component\\Console\\Exception\\RuntimeException' => __DIR__ . '/..' . '/symfony/console/Exception/RuntimeException.php', + 'Symfony\\Component\\Console\\Formatter\\OutputFormatter' => __DIR__ . '/..' . '/symfony/console/Formatter/OutputFormatter.php', + 'Symfony\\Component\\Console\\Formatter\\OutputFormatterInterface' => __DIR__ . '/..' . '/symfony/console/Formatter/OutputFormatterInterface.php', + 'Symfony\\Component\\Console\\Formatter\\OutputFormatterStyle' => __DIR__ . '/..' . '/symfony/console/Formatter/OutputFormatterStyle.php', + 'Symfony\\Component\\Console\\Formatter\\OutputFormatterStyleInterface' => __DIR__ . '/..' . '/symfony/console/Formatter/OutputFormatterStyleInterface.php', + 'Symfony\\Component\\Console\\Formatter\\OutputFormatterStyleStack' => __DIR__ . '/..' . '/symfony/console/Formatter/OutputFormatterStyleStack.php', + 'Symfony\\Component\\Console\\Helper\\DebugFormatterHelper' => __DIR__ . '/..' . '/symfony/console/Helper/DebugFormatterHelper.php', + 'Symfony\\Component\\Console\\Helper\\DescriptorHelper' => __DIR__ . '/..' . '/symfony/console/Helper/DescriptorHelper.php', + 'Symfony\\Component\\Console\\Helper\\FormatterHelper' => __DIR__ . '/..' . '/symfony/console/Helper/FormatterHelper.php', + 'Symfony\\Component\\Console\\Helper\\Helper' => __DIR__ . '/..' . '/symfony/console/Helper/Helper.php', + 'Symfony\\Component\\Console\\Helper\\HelperInterface' => __DIR__ . '/..' . '/symfony/console/Helper/HelperInterface.php', + 'Symfony\\Component\\Console\\Helper\\HelperSet' => __DIR__ . '/..' . '/symfony/console/Helper/HelperSet.php', + 'Symfony\\Component\\Console\\Helper\\InputAwareHelper' => __DIR__ . '/..' . '/symfony/console/Helper/InputAwareHelper.php', + 'Symfony\\Component\\Console\\Helper\\ProcessHelper' => __DIR__ . '/..' . '/symfony/console/Helper/ProcessHelper.php', + 'Symfony\\Component\\Console\\Helper\\ProgressBar' => __DIR__ . '/..' . '/symfony/console/Helper/ProgressBar.php', + 'Symfony\\Component\\Console\\Helper\\ProgressIndicator' => __DIR__ . '/..' . '/symfony/console/Helper/ProgressIndicator.php', + 'Symfony\\Component\\Console\\Helper\\QuestionHelper' => __DIR__ . '/..' . '/symfony/console/Helper/QuestionHelper.php', + 'Symfony\\Component\\Console\\Helper\\SymfonyQuestionHelper' => __DIR__ . '/..' . '/symfony/console/Helper/SymfonyQuestionHelper.php', + 'Symfony\\Component\\Console\\Helper\\Table' => __DIR__ . '/..' . '/symfony/console/Helper/Table.php', + 'Symfony\\Component\\Console\\Helper\\TableCell' => __DIR__ . '/..' . '/symfony/console/Helper/TableCell.php', + 'Symfony\\Component\\Console\\Helper\\TableSeparator' => __DIR__ . '/..' . '/symfony/console/Helper/TableSeparator.php', + 'Symfony\\Component\\Console\\Helper\\TableStyle' => __DIR__ . '/..' . '/symfony/console/Helper/TableStyle.php', + 'Symfony\\Component\\Console\\Input\\ArgvInput' => __DIR__ . '/..' . '/symfony/console/Input/ArgvInput.php', + 'Symfony\\Component\\Console\\Input\\ArrayInput' => __DIR__ . '/..' . '/symfony/console/Input/ArrayInput.php', + 'Symfony\\Component\\Console\\Input\\Input' => __DIR__ . '/..' . '/symfony/console/Input/Input.php', + 'Symfony\\Component\\Console\\Input\\InputArgument' => __DIR__ . '/..' . '/symfony/console/Input/InputArgument.php', + 'Symfony\\Component\\Console\\Input\\InputAwareInterface' => __DIR__ . '/..' . '/symfony/console/Input/InputAwareInterface.php', + 'Symfony\\Component\\Console\\Input\\InputDefinition' => __DIR__ . '/..' . '/symfony/console/Input/InputDefinition.php', + 'Symfony\\Component\\Console\\Input\\InputInterface' => __DIR__ . '/..' . '/symfony/console/Input/InputInterface.php', + 'Symfony\\Component\\Console\\Input\\InputOption' => __DIR__ . '/..' . '/symfony/console/Input/InputOption.php', + 'Symfony\\Component\\Console\\Input\\StreamableInputInterface' => __DIR__ . '/..' . '/symfony/console/Input/StreamableInputInterface.php', + 'Symfony\\Component\\Console\\Input\\StringInput' => __DIR__ . '/..' . '/symfony/console/Input/StringInput.php', + 'Symfony\\Component\\Console\\Logger\\ConsoleLogger' => __DIR__ . '/..' . '/symfony/console/Logger/ConsoleLogger.php', + 'Symfony\\Component\\Console\\Output\\BufferedOutput' => __DIR__ . '/..' . '/symfony/console/Output/BufferedOutput.php', + 'Symfony\\Component\\Console\\Output\\ConsoleOutput' => __DIR__ . '/..' . '/symfony/console/Output/ConsoleOutput.php', + 'Symfony\\Component\\Console\\Output\\ConsoleOutputInterface' => __DIR__ . '/..' . '/symfony/console/Output/ConsoleOutputInterface.php', + 'Symfony\\Component\\Console\\Output\\NullOutput' => __DIR__ . '/..' . '/symfony/console/Output/NullOutput.php', + 'Symfony\\Component\\Console\\Output\\Output' => __DIR__ . '/..' . '/symfony/console/Output/Output.php', + 'Symfony\\Component\\Console\\Output\\OutputInterface' => __DIR__ . '/..' . '/symfony/console/Output/OutputInterface.php', + 'Symfony\\Component\\Console\\Output\\StreamOutput' => __DIR__ . '/..' . '/symfony/console/Output/StreamOutput.php', + 'Symfony\\Component\\Console\\Question\\ChoiceQuestion' => __DIR__ . '/..' . '/symfony/console/Question/ChoiceQuestion.php', + 'Symfony\\Component\\Console\\Question\\ConfirmationQuestion' => __DIR__ . '/..' . '/symfony/console/Question/ConfirmationQuestion.php', + 'Symfony\\Component\\Console\\Question\\Question' => __DIR__ . '/..' . '/symfony/console/Question/Question.php', + 'Symfony\\Component\\Console\\Style\\OutputStyle' => __DIR__ . '/..' . '/symfony/console/Style/OutputStyle.php', + 'Symfony\\Component\\Console\\Style\\StyleInterface' => __DIR__ . '/..' . '/symfony/console/Style/StyleInterface.php', + 'Symfony\\Component\\Console\\Style\\SymfonyStyle' => __DIR__ . '/..' . '/symfony/console/Style/SymfonyStyle.php', + 'Symfony\\Component\\Console\\Terminal' => __DIR__ . '/..' . '/symfony/console/Terminal.php', + 'Symfony\\Component\\Console\\Tester\\ApplicationTester' => __DIR__ . '/..' . '/symfony/console/Tester/ApplicationTester.php', + 'Symfony\\Component\\Console\\Tester\\CommandTester' => __DIR__ . '/..' . '/symfony/console/Tester/CommandTester.php', + 'Symfony\\Component\\CssSelector\\CssSelectorConverter' => __DIR__ . '/..' . '/symfony/css-selector/CssSelectorConverter.php', + 'Symfony\\Component\\CssSelector\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/css-selector/Exception/ExceptionInterface.php', + 'Symfony\\Component\\CssSelector\\Exception\\ExpressionErrorException' => __DIR__ . '/..' . '/symfony/css-selector/Exception/ExpressionErrorException.php', + 'Symfony\\Component\\CssSelector\\Exception\\InternalErrorException' => __DIR__ . '/..' . '/symfony/css-selector/Exception/InternalErrorException.php', + 'Symfony\\Component\\CssSelector\\Exception\\ParseException' => __DIR__ . '/..' . '/symfony/css-selector/Exception/ParseException.php', + 'Symfony\\Component\\CssSelector\\Exception\\SyntaxErrorException' => __DIR__ . '/..' . '/symfony/css-selector/Exception/SyntaxErrorException.php', + 'Symfony\\Component\\CssSelector\\Node\\AbstractNode' => __DIR__ . '/..' . '/symfony/css-selector/Node/AbstractNode.php', + 'Symfony\\Component\\CssSelector\\Node\\AttributeNode' => __DIR__ . '/..' . '/symfony/css-selector/Node/AttributeNode.php', + 'Symfony\\Component\\CssSelector\\Node\\ClassNode' => __DIR__ . '/..' . '/symfony/css-selector/Node/ClassNode.php', + 'Symfony\\Component\\CssSelector\\Node\\CombinedSelectorNode' => __DIR__ . '/..' . '/symfony/css-selector/Node/CombinedSelectorNode.php', + 'Symfony\\Component\\CssSelector\\Node\\ElementNode' => __DIR__ . '/..' . '/symfony/css-selector/Node/ElementNode.php', + 'Symfony\\Component\\CssSelector\\Node\\FunctionNode' => __DIR__ . '/..' . '/symfony/css-selector/Node/FunctionNode.php', + 'Symfony\\Component\\CssSelector\\Node\\HashNode' => __DIR__ . '/..' . '/symfony/css-selector/Node/HashNode.php', + 'Symfony\\Component\\CssSelector\\Node\\NegationNode' => __DIR__ . '/..' . '/symfony/css-selector/Node/NegationNode.php', + 'Symfony\\Component\\CssSelector\\Node\\NodeInterface' => __DIR__ . '/..' . '/symfony/css-selector/Node/NodeInterface.php', + 'Symfony\\Component\\CssSelector\\Node\\PseudoNode' => __DIR__ . '/..' . '/symfony/css-selector/Node/PseudoNode.php', + 'Symfony\\Component\\CssSelector\\Node\\SelectorNode' => __DIR__ . '/..' . '/symfony/css-selector/Node/SelectorNode.php', + 'Symfony\\Component\\CssSelector\\Node\\Specificity' => __DIR__ . '/..' . '/symfony/css-selector/Node/Specificity.php', + 'Symfony\\Component\\CssSelector\\Parser\\Handler\\CommentHandler' => __DIR__ . '/..' . '/symfony/css-selector/Parser/Handler/CommentHandler.php', + 'Symfony\\Component\\CssSelector\\Parser\\Handler\\HandlerInterface' => __DIR__ . '/..' . '/symfony/css-selector/Parser/Handler/HandlerInterface.php', + 'Symfony\\Component\\CssSelector\\Parser\\Handler\\HashHandler' => __DIR__ . '/..' . '/symfony/css-selector/Parser/Handler/HashHandler.php', + 'Symfony\\Component\\CssSelector\\Parser\\Handler\\IdentifierHandler' => __DIR__ . '/..' . '/symfony/css-selector/Parser/Handler/IdentifierHandler.php', + 'Symfony\\Component\\CssSelector\\Parser\\Handler\\NumberHandler' => __DIR__ . '/..' . '/symfony/css-selector/Parser/Handler/NumberHandler.php', + 'Symfony\\Component\\CssSelector\\Parser\\Handler\\StringHandler' => __DIR__ . '/..' . '/symfony/css-selector/Parser/Handler/StringHandler.php', + 'Symfony\\Component\\CssSelector\\Parser\\Handler\\WhitespaceHandler' => __DIR__ . '/..' . '/symfony/css-selector/Parser/Handler/WhitespaceHandler.php', + 'Symfony\\Component\\CssSelector\\Parser\\Parser' => __DIR__ . '/..' . '/symfony/css-selector/Parser/Parser.php', + 'Symfony\\Component\\CssSelector\\Parser\\ParserInterface' => __DIR__ . '/..' . '/symfony/css-selector/Parser/ParserInterface.php', + 'Symfony\\Component\\CssSelector\\Parser\\Reader' => __DIR__ . '/..' . '/symfony/css-selector/Parser/Reader.php', + 'Symfony\\Component\\CssSelector\\Parser\\Shortcut\\ClassParser' => __DIR__ . '/..' . '/symfony/css-selector/Parser/Shortcut/ClassParser.php', + 'Symfony\\Component\\CssSelector\\Parser\\Shortcut\\ElementParser' => __DIR__ . '/..' . '/symfony/css-selector/Parser/Shortcut/ElementParser.php', + 'Symfony\\Component\\CssSelector\\Parser\\Shortcut\\EmptyStringParser' => __DIR__ . '/..' . '/symfony/css-selector/Parser/Shortcut/EmptyStringParser.php', + 'Symfony\\Component\\CssSelector\\Parser\\Shortcut\\HashParser' => __DIR__ . '/..' . '/symfony/css-selector/Parser/Shortcut/HashParser.php', + 'Symfony\\Component\\CssSelector\\Parser\\Token' => __DIR__ . '/..' . '/symfony/css-selector/Parser/Token.php', + 'Symfony\\Component\\CssSelector\\Parser\\TokenStream' => __DIR__ . '/..' . '/symfony/css-selector/Parser/TokenStream.php', + 'Symfony\\Component\\CssSelector\\Parser\\Tokenizer\\Tokenizer' => __DIR__ . '/..' . '/symfony/css-selector/Parser/Tokenizer/Tokenizer.php', + 'Symfony\\Component\\CssSelector\\Parser\\Tokenizer\\TokenizerEscaping' => __DIR__ . '/..' . '/symfony/css-selector/Parser/Tokenizer/TokenizerEscaping.php', + 'Symfony\\Component\\CssSelector\\Parser\\Tokenizer\\TokenizerPatterns' => __DIR__ . '/..' . '/symfony/css-selector/Parser/Tokenizer/TokenizerPatterns.php', + 'Symfony\\Component\\CssSelector\\XPath\\Extension\\AbstractExtension' => __DIR__ . '/..' . '/symfony/css-selector/XPath/Extension/AbstractExtension.php', + 'Symfony\\Component\\CssSelector\\XPath\\Extension\\AttributeMatchingExtension' => __DIR__ . '/..' . '/symfony/css-selector/XPath/Extension/AttributeMatchingExtension.php', + 'Symfony\\Component\\CssSelector\\XPath\\Extension\\CombinationExtension' => __DIR__ . '/..' . '/symfony/css-selector/XPath/Extension/CombinationExtension.php', + 'Symfony\\Component\\CssSelector\\XPath\\Extension\\ExtensionInterface' => __DIR__ . '/..' . '/symfony/css-selector/XPath/Extension/ExtensionInterface.php', + 'Symfony\\Component\\CssSelector\\XPath\\Extension\\FunctionExtension' => __DIR__ . '/..' . '/symfony/css-selector/XPath/Extension/FunctionExtension.php', + 'Symfony\\Component\\CssSelector\\XPath\\Extension\\HtmlExtension' => __DIR__ . '/..' . '/symfony/css-selector/XPath/Extension/HtmlExtension.php', + 'Symfony\\Component\\CssSelector\\XPath\\Extension\\NodeExtension' => __DIR__ . '/..' . '/symfony/css-selector/XPath/Extension/NodeExtension.php', + 'Symfony\\Component\\CssSelector\\XPath\\Extension\\PseudoClassExtension' => __DIR__ . '/..' . '/symfony/css-selector/XPath/Extension/PseudoClassExtension.php', + 'Symfony\\Component\\CssSelector\\XPath\\Translator' => __DIR__ . '/..' . '/symfony/css-selector/XPath/Translator.php', + 'Symfony\\Component\\CssSelector\\XPath\\TranslatorInterface' => __DIR__ . '/..' . '/symfony/css-selector/XPath/TranslatorInterface.php', + 'Symfony\\Component\\CssSelector\\XPath\\XPathExpr' => __DIR__ . '/..' . '/symfony/css-selector/XPath/XPathExpr.php', + 'Symfony\\Component\\Debug\\BufferingLogger' => __DIR__ . '/..' . '/symfony/debug/BufferingLogger.php', + 'Symfony\\Component\\Debug\\Debug' => __DIR__ . '/..' . '/symfony/debug/Debug.php', + 'Symfony\\Component\\Debug\\DebugClassLoader' => __DIR__ . '/..' . '/symfony/debug/DebugClassLoader.php', + 'Symfony\\Component\\Debug\\ErrorHandler' => __DIR__ . '/..' . '/symfony/debug/ErrorHandler.php', + 'Symfony\\Component\\Debug\\ExceptionHandler' => __DIR__ . '/..' . '/symfony/debug/ExceptionHandler.php', + 'Symfony\\Component\\Debug\\Exception\\ClassNotFoundException' => __DIR__ . '/..' . '/symfony/debug/Exception/ClassNotFoundException.php', + 'Symfony\\Component\\Debug\\Exception\\ContextErrorException' => __DIR__ . '/..' . '/symfony/debug/Exception/ContextErrorException.php', + 'Symfony\\Component\\Debug\\Exception\\FatalErrorException' => __DIR__ . '/..' . '/symfony/debug/Exception/FatalErrorException.php', + 'Symfony\\Component\\Debug\\Exception\\FatalThrowableError' => __DIR__ . '/..' . '/symfony/debug/Exception/FatalThrowableError.php', + 'Symfony\\Component\\Debug\\Exception\\FlattenException' => __DIR__ . '/..' . '/symfony/debug/Exception/FlattenException.php', + 'Symfony\\Component\\Debug\\Exception\\OutOfMemoryException' => __DIR__ . '/..' . '/symfony/debug/Exception/OutOfMemoryException.php', + 'Symfony\\Component\\Debug\\Exception\\SilencedErrorContext' => __DIR__ . '/..' . '/symfony/debug/Exception/SilencedErrorContext.php', + 'Symfony\\Component\\Debug\\Exception\\UndefinedFunctionException' => __DIR__ . '/..' . '/symfony/debug/Exception/UndefinedFunctionException.php', + 'Symfony\\Component\\Debug\\Exception\\UndefinedMethodException' => __DIR__ . '/..' . '/symfony/debug/Exception/UndefinedMethodException.php', + 'Symfony\\Component\\Debug\\FatalErrorHandler\\ClassNotFoundFatalErrorHandler' => __DIR__ . '/..' . '/symfony/debug/FatalErrorHandler/ClassNotFoundFatalErrorHandler.php', + 'Symfony\\Component\\Debug\\FatalErrorHandler\\FatalErrorHandlerInterface' => __DIR__ . '/..' . '/symfony/debug/FatalErrorHandler/FatalErrorHandlerInterface.php', + 'Symfony\\Component\\Debug\\FatalErrorHandler\\UndefinedFunctionFatalErrorHandler' => __DIR__ . '/..' . '/symfony/debug/FatalErrorHandler/UndefinedFunctionFatalErrorHandler.php', + 'Symfony\\Component\\Debug\\FatalErrorHandler\\UndefinedMethodFatalErrorHandler' => __DIR__ . '/..' . '/symfony/debug/FatalErrorHandler/UndefinedMethodFatalErrorHandler.php', + 'Symfony\\Component\\EventDispatcher\\ContainerAwareEventDispatcher' => __DIR__ . '/..' . '/symfony/event-dispatcher/ContainerAwareEventDispatcher.php', + 'Symfony\\Component\\EventDispatcher\\Debug\\TraceableEventDispatcher' => __DIR__ . '/..' . '/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php', + 'Symfony\\Component\\EventDispatcher\\Debug\\TraceableEventDispatcherInterface' => __DIR__ . '/..' . '/symfony/event-dispatcher/Debug/TraceableEventDispatcherInterface.php', + 'Symfony\\Component\\EventDispatcher\\Debug\\WrappedListener' => __DIR__ . '/..' . '/symfony/event-dispatcher/Debug/WrappedListener.php', + 'Symfony\\Component\\EventDispatcher\\DependencyInjection\\RegisterListenersPass' => __DIR__ . '/..' . '/symfony/event-dispatcher/DependencyInjection/RegisterListenersPass.php', + 'Symfony\\Component\\EventDispatcher\\Event' => __DIR__ . '/..' . '/symfony/event-dispatcher/Event.php', + 'Symfony\\Component\\EventDispatcher\\EventDispatcher' => __DIR__ . '/..' . '/symfony/event-dispatcher/EventDispatcher.php', + 'Symfony\\Component\\EventDispatcher\\EventDispatcherInterface' => __DIR__ . '/..' . '/symfony/event-dispatcher/EventDispatcherInterface.php', + 'Symfony\\Component\\EventDispatcher\\EventSubscriberInterface' => __DIR__ . '/..' . '/symfony/event-dispatcher/EventSubscriberInterface.php', + 'Symfony\\Component\\EventDispatcher\\GenericEvent' => __DIR__ . '/..' . '/symfony/event-dispatcher/GenericEvent.php', + 'Symfony\\Component\\EventDispatcher\\ImmutableEventDispatcher' => __DIR__ . '/..' . '/symfony/event-dispatcher/ImmutableEventDispatcher.php', + 'Symfony\\Component\\Finder\\Comparator\\Comparator' => __DIR__ . '/..' . '/symfony/finder/Comparator/Comparator.php', + 'Symfony\\Component\\Finder\\Comparator\\DateComparator' => __DIR__ . '/..' . '/symfony/finder/Comparator/DateComparator.php', + 'Symfony\\Component\\Finder\\Comparator\\NumberComparator' => __DIR__ . '/..' . '/symfony/finder/Comparator/NumberComparator.php', + 'Symfony\\Component\\Finder\\Exception\\AccessDeniedException' => __DIR__ . '/..' . '/symfony/finder/Exception/AccessDeniedException.php', + 'Symfony\\Component\\Finder\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/finder/Exception/ExceptionInterface.php', + 'Symfony\\Component\\Finder\\Finder' => __DIR__ . '/..' . '/symfony/finder/Finder.php', + 'Symfony\\Component\\Finder\\Glob' => __DIR__ . '/..' . '/symfony/finder/Glob.php', + 'Symfony\\Component\\Finder\\Iterator\\CustomFilterIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/CustomFilterIterator.php', + 'Symfony\\Component\\Finder\\Iterator\\DateRangeFilterIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/DateRangeFilterIterator.php', + 'Symfony\\Component\\Finder\\Iterator\\DepthRangeFilterIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/DepthRangeFilterIterator.php', + 'Symfony\\Component\\Finder\\Iterator\\ExcludeDirectoryFilterIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php', + 'Symfony\\Component\\Finder\\Iterator\\FileTypeFilterIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/FileTypeFilterIterator.php', + 'Symfony\\Component\\Finder\\Iterator\\FilecontentFilterIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/FilecontentFilterIterator.php', + 'Symfony\\Component\\Finder\\Iterator\\FilenameFilterIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/FilenameFilterIterator.php', + 'Symfony\\Component\\Finder\\Iterator\\FilterIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/FilterIterator.php', + 'Symfony\\Component\\Finder\\Iterator\\MultiplePcreFilterIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/MultiplePcreFilterIterator.php', + 'Symfony\\Component\\Finder\\Iterator\\PathFilterIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/PathFilterIterator.php', + 'Symfony\\Component\\Finder\\Iterator\\RecursiveDirectoryIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/RecursiveDirectoryIterator.php', + 'Symfony\\Component\\Finder\\Iterator\\SizeRangeFilterIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/SizeRangeFilterIterator.php', + 'Symfony\\Component\\Finder\\Iterator\\SortableIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/SortableIterator.php', + 'Symfony\\Component\\Finder\\SplFileInfo' => __DIR__ . '/..' . '/symfony/finder/SplFileInfo.php', + 'Symfony\\Component\\HttpFoundation\\AcceptHeader' => __DIR__ . '/..' . '/symfony/http-foundation/AcceptHeader.php', + 'Symfony\\Component\\HttpFoundation\\AcceptHeaderItem' => __DIR__ . '/..' . '/symfony/http-foundation/AcceptHeaderItem.php', + 'Symfony\\Component\\HttpFoundation\\ApacheRequest' => __DIR__ . '/..' . '/symfony/http-foundation/ApacheRequest.php', + 'Symfony\\Component\\HttpFoundation\\BinaryFileResponse' => __DIR__ . '/..' . '/symfony/http-foundation/BinaryFileResponse.php', + 'Symfony\\Component\\HttpFoundation\\Cookie' => __DIR__ . '/..' . '/symfony/http-foundation/Cookie.php', + 'Symfony\\Component\\HttpFoundation\\Exception\\ConflictingHeadersException' => __DIR__ . '/..' . '/symfony/http-foundation/Exception/ConflictingHeadersException.php', + 'Symfony\\Component\\HttpFoundation\\ExpressionRequestMatcher' => __DIR__ . '/..' . '/symfony/http-foundation/ExpressionRequestMatcher.php', + 'Symfony\\Component\\HttpFoundation\\FileBag' => __DIR__ . '/..' . '/symfony/http-foundation/FileBag.php', + 'Symfony\\Component\\HttpFoundation\\File\\Exception\\AccessDeniedException' => __DIR__ . '/..' . '/symfony/http-foundation/File/Exception/AccessDeniedException.php', + 'Symfony\\Component\\HttpFoundation\\File\\Exception\\FileException' => __DIR__ . '/..' . '/symfony/http-foundation/File/Exception/FileException.php', + 'Symfony\\Component\\HttpFoundation\\File\\Exception\\FileNotFoundException' => __DIR__ . '/..' . '/symfony/http-foundation/File/Exception/FileNotFoundException.php', + 'Symfony\\Component\\HttpFoundation\\File\\Exception\\UnexpectedTypeException' => __DIR__ . '/..' . '/symfony/http-foundation/File/Exception/UnexpectedTypeException.php', + 'Symfony\\Component\\HttpFoundation\\File\\Exception\\UploadException' => __DIR__ . '/..' . '/symfony/http-foundation/File/Exception/UploadException.php', + 'Symfony\\Component\\HttpFoundation\\File\\File' => __DIR__ . '/..' . '/symfony/http-foundation/File/File.php', + 'Symfony\\Component\\HttpFoundation\\File\\MimeType\\ExtensionGuesser' => __DIR__ . '/..' . '/symfony/http-foundation/File/MimeType/ExtensionGuesser.php', + 'Symfony\\Component\\HttpFoundation\\File\\MimeType\\ExtensionGuesserInterface' => __DIR__ . '/..' . '/symfony/http-foundation/File/MimeType/ExtensionGuesserInterface.php', + 'Symfony\\Component\\HttpFoundation\\File\\MimeType\\FileBinaryMimeTypeGuesser' => __DIR__ . '/..' . '/symfony/http-foundation/File/MimeType/FileBinaryMimeTypeGuesser.php', + 'Symfony\\Component\\HttpFoundation\\File\\MimeType\\FileinfoMimeTypeGuesser' => __DIR__ . '/..' . '/symfony/http-foundation/File/MimeType/FileinfoMimeTypeGuesser.php', + 'Symfony\\Component\\HttpFoundation\\File\\MimeType\\MimeTypeExtensionGuesser' => __DIR__ . '/..' . '/symfony/http-foundation/File/MimeType/MimeTypeExtensionGuesser.php', + 'Symfony\\Component\\HttpFoundation\\File\\MimeType\\MimeTypeGuesser' => __DIR__ . '/..' . '/symfony/http-foundation/File/MimeType/MimeTypeGuesser.php', + 'Symfony\\Component\\HttpFoundation\\File\\MimeType\\MimeTypeGuesserInterface' => __DIR__ . '/..' . '/symfony/http-foundation/File/MimeType/MimeTypeGuesserInterface.php', + 'Symfony\\Component\\HttpFoundation\\File\\UploadedFile' => __DIR__ . '/..' . '/symfony/http-foundation/File/UploadedFile.php', + 'Symfony\\Component\\HttpFoundation\\HeaderBag' => __DIR__ . '/..' . '/symfony/http-foundation/HeaderBag.php', + 'Symfony\\Component\\HttpFoundation\\IpUtils' => __DIR__ . '/..' . '/symfony/http-foundation/IpUtils.php', + 'Symfony\\Component\\HttpFoundation\\JsonResponse' => __DIR__ . '/..' . '/symfony/http-foundation/JsonResponse.php', + 'Symfony\\Component\\HttpFoundation\\ParameterBag' => __DIR__ . '/..' . '/symfony/http-foundation/ParameterBag.php', + 'Symfony\\Component\\HttpFoundation\\RedirectResponse' => __DIR__ . '/..' . '/symfony/http-foundation/RedirectResponse.php', + 'Symfony\\Component\\HttpFoundation\\Request' => __DIR__ . '/..' . '/symfony/http-foundation/Request.php', + 'Symfony\\Component\\HttpFoundation\\RequestMatcher' => __DIR__ . '/..' . '/symfony/http-foundation/RequestMatcher.php', + 'Symfony\\Component\\HttpFoundation\\RequestMatcherInterface' => __DIR__ . '/..' . '/symfony/http-foundation/RequestMatcherInterface.php', + 'Symfony\\Component\\HttpFoundation\\RequestStack' => __DIR__ . '/..' . '/symfony/http-foundation/RequestStack.php', + 'Symfony\\Component\\HttpFoundation\\Response' => __DIR__ . '/..' . '/symfony/http-foundation/Response.php', + 'Symfony\\Component\\HttpFoundation\\ResponseHeaderBag' => __DIR__ . '/..' . '/symfony/http-foundation/ResponseHeaderBag.php', + 'Symfony\\Component\\HttpFoundation\\ServerBag' => __DIR__ . '/..' . '/symfony/http-foundation/ServerBag.php', + 'Symfony\\Component\\HttpFoundation\\Session\\Attribute\\AttributeBag' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Attribute/AttributeBag.php', + 'Symfony\\Component\\HttpFoundation\\Session\\Attribute\\AttributeBagInterface' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Attribute/AttributeBagInterface.php', + 'Symfony\\Component\\HttpFoundation\\Session\\Attribute\\NamespacedAttributeBag' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Attribute/NamespacedAttributeBag.php', + 'Symfony\\Component\\HttpFoundation\\Session\\Flash\\AutoExpireFlashBag' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Flash/AutoExpireFlashBag.php', + 'Symfony\\Component\\HttpFoundation\\Session\\Flash\\FlashBag' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Flash/FlashBag.php', + 'Symfony\\Component\\HttpFoundation\\Session\\Flash\\FlashBagInterface' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Flash/FlashBagInterface.php', + 'Symfony\\Component\\HttpFoundation\\Session\\Session' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Session.php', + 'Symfony\\Component\\HttpFoundation\\Session\\SessionBagInterface' => __DIR__ . '/..' . '/symfony/http-foundation/Session/SessionBagInterface.php', + 'Symfony\\Component\\HttpFoundation\\Session\\SessionInterface' => __DIR__ . '/..' . '/symfony/http-foundation/Session/SessionInterface.php', + 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\MemcacheSessionHandler' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/Handler/MemcacheSessionHandler.php', + 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\MemcachedSessionHandler' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/Handler/MemcachedSessionHandler.php', + 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\MongoDbSessionHandler' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/Handler/MongoDbSessionHandler.php', + 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\NativeFileSessionHandler' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/Handler/NativeFileSessionHandler.php', + 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\NativeSessionHandler' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/Handler/NativeSessionHandler.php', + 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\NullSessionHandler' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/Handler/NullSessionHandler.php', + 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\PdoSessionHandler' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/Handler/PdoSessionHandler.php', + 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\WriteCheckSessionHandler' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/Handler/WriteCheckSessionHandler.php', + 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\MetadataBag' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/MetadataBag.php', + 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\MockArraySessionStorage' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/MockArraySessionStorage.php', + 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\MockFileSessionStorage' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/MockFileSessionStorage.php', + 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\NativeSessionStorage' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/NativeSessionStorage.php', + 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\PhpBridgeSessionStorage' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/PhpBridgeSessionStorage.php', + 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Proxy\\AbstractProxy' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/Proxy/AbstractProxy.php', + 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Proxy\\NativeProxy' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/Proxy/NativeProxy.php', + 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Proxy\\SessionHandlerProxy' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/Proxy/SessionHandlerProxy.php', + 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\SessionStorageInterface' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/SessionStorageInterface.php', + 'Symfony\\Component\\HttpFoundation\\StreamedResponse' => __DIR__ . '/..' . '/symfony/http-foundation/StreamedResponse.php', + 'Symfony\\Component\\HttpKernel\\Bundle\\Bundle' => __DIR__ . '/..' . '/symfony/http-kernel/Bundle/Bundle.php', + 'Symfony\\Component\\HttpKernel\\Bundle\\BundleInterface' => __DIR__ . '/..' . '/symfony/http-kernel/Bundle/BundleInterface.php', + 'Symfony\\Component\\HttpKernel\\CacheClearer\\CacheClearerInterface' => __DIR__ . '/..' . '/symfony/http-kernel/CacheClearer/CacheClearerInterface.php', + 'Symfony\\Component\\HttpKernel\\CacheClearer\\ChainCacheClearer' => __DIR__ . '/..' . '/symfony/http-kernel/CacheClearer/ChainCacheClearer.php', + 'Symfony\\Component\\HttpKernel\\CacheClearer\\Psr6CacheClearer' => __DIR__ . '/..' . '/symfony/http-kernel/CacheClearer/Psr6CacheClearer.php', + 'Symfony\\Component\\HttpKernel\\CacheWarmer\\CacheWarmer' => __DIR__ . '/..' . '/symfony/http-kernel/CacheWarmer/CacheWarmer.php', + 'Symfony\\Component\\HttpKernel\\CacheWarmer\\CacheWarmerAggregate' => __DIR__ . '/..' . '/symfony/http-kernel/CacheWarmer/CacheWarmerAggregate.php', + 'Symfony\\Component\\HttpKernel\\CacheWarmer\\CacheWarmerInterface' => __DIR__ . '/..' . '/symfony/http-kernel/CacheWarmer/CacheWarmerInterface.php', + 'Symfony\\Component\\HttpKernel\\CacheWarmer\\WarmableInterface' => __DIR__ . '/..' . '/symfony/http-kernel/CacheWarmer/WarmableInterface.php', + 'Symfony\\Component\\HttpKernel\\Client' => __DIR__ . '/..' . '/symfony/http-kernel/Client.php', + 'Symfony\\Component\\HttpKernel\\Config\\EnvParametersResource' => __DIR__ . '/..' . '/symfony/http-kernel/Config/EnvParametersResource.php', + 'Symfony\\Component\\HttpKernel\\Config\\FileLocator' => __DIR__ . '/..' . '/symfony/http-kernel/Config/FileLocator.php', + 'Symfony\\Component\\HttpKernel\\ControllerMetadata\\ArgumentMetadata' => __DIR__ . '/..' . '/symfony/http-kernel/ControllerMetadata/ArgumentMetadata.php', + 'Symfony\\Component\\HttpKernel\\ControllerMetadata\\ArgumentMetadataFactory' => __DIR__ . '/..' . '/symfony/http-kernel/ControllerMetadata/ArgumentMetadataFactory.php', + 'Symfony\\Component\\HttpKernel\\ControllerMetadata\\ArgumentMetadataFactoryInterface' => __DIR__ . '/..' . '/symfony/http-kernel/ControllerMetadata/ArgumentMetadataFactoryInterface.php', + 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver' => __DIR__ . '/..' . '/symfony/http-kernel/Controller/ArgumentResolver.php', + 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolverInterface' => __DIR__ . '/..' . '/symfony/http-kernel/Controller/ArgumentResolverInterface.php', + 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\DefaultValueResolver' => __DIR__ . '/..' . '/symfony/http-kernel/Controller/ArgumentResolver/DefaultValueResolver.php', + 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\RequestAttributeValueResolver' => __DIR__ . '/..' . '/symfony/http-kernel/Controller/ArgumentResolver/RequestAttributeValueResolver.php', + 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\RequestValueResolver' => __DIR__ . '/..' . '/symfony/http-kernel/Controller/ArgumentResolver/RequestValueResolver.php', + 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\VariadicValueResolver' => __DIR__ . '/..' . '/symfony/http-kernel/Controller/ArgumentResolver/VariadicValueResolver.php', + 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentValueResolverInterface' => __DIR__ . '/..' . '/symfony/http-kernel/Controller/ArgumentValueResolverInterface.php', + 'Symfony\\Component\\HttpKernel\\Controller\\ControllerReference' => __DIR__ . '/..' . '/symfony/http-kernel/Controller/ControllerReference.php', + 'Symfony\\Component\\HttpKernel\\Controller\\ControllerResolver' => __DIR__ . '/..' . '/symfony/http-kernel/Controller/ControllerResolver.php', + 'Symfony\\Component\\HttpKernel\\Controller\\ControllerResolverInterface' => __DIR__ . '/..' . '/symfony/http-kernel/Controller/ControllerResolverInterface.php', + 'Symfony\\Component\\HttpKernel\\Controller\\TraceableArgumentResolver' => __DIR__ . '/..' . '/symfony/http-kernel/Controller/TraceableArgumentResolver.php', + 'Symfony\\Component\\HttpKernel\\Controller\\TraceableControllerResolver' => __DIR__ . '/..' . '/symfony/http-kernel/Controller/TraceableControllerResolver.php', + 'Symfony\\Component\\HttpKernel\\DataCollector\\AjaxDataCollector' => __DIR__ . '/..' . '/symfony/http-kernel/DataCollector/AjaxDataCollector.php', + 'Symfony\\Component\\HttpKernel\\DataCollector\\ConfigDataCollector' => __DIR__ . '/..' . '/symfony/http-kernel/DataCollector/ConfigDataCollector.php', + 'Symfony\\Component\\HttpKernel\\DataCollector\\DataCollector' => __DIR__ . '/..' . '/symfony/http-kernel/DataCollector/DataCollector.php', + 'Symfony\\Component\\HttpKernel\\DataCollector\\DataCollectorInterface' => __DIR__ . '/..' . '/symfony/http-kernel/DataCollector/DataCollectorInterface.php', + 'Symfony\\Component\\HttpKernel\\DataCollector\\DumpDataCollector' => __DIR__ . '/..' . '/symfony/http-kernel/DataCollector/DumpDataCollector.php', + 'Symfony\\Component\\HttpKernel\\DataCollector\\EventDataCollector' => __DIR__ . '/..' . '/symfony/http-kernel/DataCollector/EventDataCollector.php', + 'Symfony\\Component\\HttpKernel\\DataCollector\\ExceptionDataCollector' => __DIR__ . '/..' . '/symfony/http-kernel/DataCollector/ExceptionDataCollector.php', + 'Symfony\\Component\\HttpKernel\\DataCollector\\LateDataCollectorInterface' => __DIR__ . '/..' . '/symfony/http-kernel/DataCollector/LateDataCollectorInterface.php', + 'Symfony\\Component\\HttpKernel\\DataCollector\\LoggerDataCollector' => __DIR__ . '/..' . '/symfony/http-kernel/DataCollector/LoggerDataCollector.php', + 'Symfony\\Component\\HttpKernel\\DataCollector\\MemoryDataCollector' => __DIR__ . '/..' . '/symfony/http-kernel/DataCollector/MemoryDataCollector.php', + 'Symfony\\Component\\HttpKernel\\DataCollector\\RequestDataCollector' => __DIR__ . '/..' . '/symfony/http-kernel/DataCollector/RequestDataCollector.php', + 'Symfony\\Component\\HttpKernel\\DataCollector\\RouterDataCollector' => __DIR__ . '/..' . '/symfony/http-kernel/DataCollector/RouterDataCollector.php', + 'Symfony\\Component\\HttpKernel\\DataCollector\\TimeDataCollector' => __DIR__ . '/..' . '/symfony/http-kernel/DataCollector/TimeDataCollector.php', + 'Symfony\\Component\\HttpKernel\\DataCollector\\Util\\ValueExporter' => __DIR__ . '/..' . '/symfony/http-kernel/DataCollector/Util/ValueExporter.php', + 'Symfony\\Component\\HttpKernel\\Debug\\FileLinkFormatter' => __DIR__ . '/..' . '/symfony/http-kernel/Debug/FileLinkFormatter.php', + 'Symfony\\Component\\HttpKernel\\Debug\\TraceableEventDispatcher' => __DIR__ . '/..' . '/symfony/http-kernel/Debug/TraceableEventDispatcher.php', + 'Symfony\\Component\\HttpKernel\\DependencyInjection\\AddClassesToCachePass' => __DIR__ . '/..' . '/symfony/http-kernel/DependencyInjection/AddClassesToCachePass.php', + 'Symfony\\Component\\HttpKernel\\DependencyInjection\\ConfigurableExtension' => __DIR__ . '/..' . '/symfony/http-kernel/DependencyInjection/ConfigurableExtension.php', + 'Symfony\\Component\\HttpKernel\\DependencyInjection\\Extension' => __DIR__ . '/..' . '/symfony/http-kernel/DependencyInjection/Extension.php', + 'Symfony\\Component\\HttpKernel\\DependencyInjection\\FragmentRendererPass' => __DIR__ . '/..' . '/symfony/http-kernel/DependencyInjection/FragmentRendererPass.php', + 'Symfony\\Component\\HttpKernel\\DependencyInjection\\LazyLoadingFragmentHandler' => __DIR__ . '/..' . '/symfony/http-kernel/DependencyInjection/LazyLoadingFragmentHandler.php', + 'Symfony\\Component\\HttpKernel\\DependencyInjection\\MergeExtensionConfigurationPass' => __DIR__ . '/..' . '/symfony/http-kernel/DependencyInjection/MergeExtensionConfigurationPass.php', + 'Symfony\\Component\\HttpKernel\\EventListener\\AddRequestFormatsListener' => __DIR__ . '/..' . '/symfony/http-kernel/EventListener/AddRequestFormatsListener.php', + 'Symfony\\Component\\HttpKernel\\EventListener\\DebugHandlersListener' => __DIR__ . '/..' . '/symfony/http-kernel/EventListener/DebugHandlersListener.php', + 'Symfony\\Component\\HttpKernel\\EventListener\\DumpListener' => __DIR__ . '/..' . '/symfony/http-kernel/EventListener/DumpListener.php', + 'Symfony\\Component\\HttpKernel\\EventListener\\ExceptionListener' => __DIR__ . '/..' . '/symfony/http-kernel/EventListener/ExceptionListener.php', + 'Symfony\\Component\\HttpKernel\\EventListener\\FragmentListener' => __DIR__ . '/..' . '/symfony/http-kernel/EventListener/FragmentListener.php', + 'Symfony\\Component\\HttpKernel\\EventListener\\LocaleListener' => __DIR__ . '/..' . '/symfony/http-kernel/EventListener/LocaleListener.php', + 'Symfony\\Component\\HttpKernel\\EventListener\\ProfilerListener' => __DIR__ . '/..' . '/symfony/http-kernel/EventListener/ProfilerListener.php', + 'Symfony\\Component\\HttpKernel\\EventListener\\ResponseListener' => __DIR__ . '/..' . '/symfony/http-kernel/EventListener/ResponseListener.php', + 'Symfony\\Component\\HttpKernel\\EventListener\\RouterListener' => __DIR__ . '/..' . '/symfony/http-kernel/EventListener/RouterListener.php', + 'Symfony\\Component\\HttpKernel\\EventListener\\SaveSessionListener' => __DIR__ . '/..' . '/symfony/http-kernel/EventListener/SaveSessionListener.php', + 'Symfony\\Component\\HttpKernel\\EventListener\\SessionListener' => __DIR__ . '/..' . '/symfony/http-kernel/EventListener/SessionListener.php', + 'Symfony\\Component\\HttpKernel\\EventListener\\StreamedResponseListener' => __DIR__ . '/..' . '/symfony/http-kernel/EventListener/StreamedResponseListener.php', + 'Symfony\\Component\\HttpKernel\\EventListener\\SurrogateListener' => __DIR__ . '/..' . '/symfony/http-kernel/EventListener/SurrogateListener.php', + 'Symfony\\Component\\HttpKernel\\EventListener\\TestSessionListener' => __DIR__ . '/..' . '/symfony/http-kernel/EventListener/TestSessionListener.php', + 'Symfony\\Component\\HttpKernel\\EventListener\\TranslatorListener' => __DIR__ . '/..' . '/symfony/http-kernel/EventListener/TranslatorListener.php', + 'Symfony\\Component\\HttpKernel\\EventListener\\ValidateRequestListener' => __DIR__ . '/..' . '/symfony/http-kernel/EventListener/ValidateRequestListener.php', + 'Symfony\\Component\\HttpKernel\\Event\\FilterControllerArgumentsEvent' => __DIR__ . '/..' . '/symfony/http-kernel/Event/FilterControllerArgumentsEvent.php', + 'Symfony\\Component\\HttpKernel\\Event\\FilterControllerEvent' => __DIR__ . '/..' . '/symfony/http-kernel/Event/FilterControllerEvent.php', + 'Symfony\\Component\\HttpKernel\\Event\\FilterResponseEvent' => __DIR__ . '/..' . '/symfony/http-kernel/Event/FilterResponseEvent.php', + 'Symfony\\Component\\HttpKernel\\Event\\FinishRequestEvent' => __DIR__ . '/..' . '/symfony/http-kernel/Event/FinishRequestEvent.php', + 'Symfony\\Component\\HttpKernel\\Event\\GetResponseEvent' => __DIR__ . '/..' . '/symfony/http-kernel/Event/GetResponseEvent.php', + 'Symfony\\Component\\HttpKernel\\Event\\GetResponseForControllerResultEvent' => __DIR__ . '/..' . '/symfony/http-kernel/Event/GetResponseForControllerResultEvent.php', + 'Symfony\\Component\\HttpKernel\\Event\\GetResponseForExceptionEvent' => __DIR__ . '/..' . '/symfony/http-kernel/Event/GetResponseForExceptionEvent.php', + 'Symfony\\Component\\HttpKernel\\Event\\KernelEvent' => __DIR__ . '/..' . '/symfony/http-kernel/Event/KernelEvent.php', + 'Symfony\\Component\\HttpKernel\\Event\\PostResponseEvent' => __DIR__ . '/..' . '/symfony/http-kernel/Event/PostResponseEvent.php', + 'Symfony\\Component\\HttpKernel\\Exception\\AccessDeniedHttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/AccessDeniedHttpException.php', + 'Symfony\\Component\\HttpKernel\\Exception\\BadRequestHttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/BadRequestHttpException.php', + 'Symfony\\Component\\HttpKernel\\Exception\\ConflictHttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/ConflictHttpException.php', + 'Symfony\\Component\\HttpKernel\\Exception\\GoneHttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/GoneHttpException.php', + 'Symfony\\Component\\HttpKernel\\Exception\\HttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/HttpException.php', + 'Symfony\\Component\\HttpKernel\\Exception\\HttpExceptionInterface' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/HttpExceptionInterface.php', + 'Symfony\\Component\\HttpKernel\\Exception\\LengthRequiredHttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/LengthRequiredHttpException.php', + 'Symfony\\Component\\HttpKernel\\Exception\\MethodNotAllowedHttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/MethodNotAllowedHttpException.php', + 'Symfony\\Component\\HttpKernel\\Exception\\NotAcceptableHttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/NotAcceptableHttpException.php', + 'Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/NotFoundHttpException.php', + 'Symfony\\Component\\HttpKernel\\Exception\\PreconditionFailedHttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/PreconditionFailedHttpException.php', + 'Symfony\\Component\\HttpKernel\\Exception\\PreconditionRequiredHttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/PreconditionRequiredHttpException.php', + 'Symfony\\Component\\HttpKernel\\Exception\\ServiceUnavailableHttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/ServiceUnavailableHttpException.php', + 'Symfony\\Component\\HttpKernel\\Exception\\TooManyRequestsHttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/TooManyRequestsHttpException.php', + 'Symfony\\Component\\HttpKernel\\Exception\\UnauthorizedHttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/UnauthorizedHttpException.php', + 'Symfony\\Component\\HttpKernel\\Exception\\UnprocessableEntityHttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/UnprocessableEntityHttpException.php', + 'Symfony\\Component\\HttpKernel\\Exception\\UnsupportedMediaTypeHttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/UnsupportedMediaTypeHttpException.php', + 'Symfony\\Component\\HttpKernel\\Fragment\\AbstractSurrogateFragmentRenderer' => __DIR__ . '/..' . '/symfony/http-kernel/Fragment/AbstractSurrogateFragmentRenderer.php', + 'Symfony\\Component\\HttpKernel\\Fragment\\EsiFragmentRenderer' => __DIR__ . '/..' . '/symfony/http-kernel/Fragment/EsiFragmentRenderer.php', + 'Symfony\\Component\\HttpKernel\\Fragment\\FragmentHandler' => __DIR__ . '/..' . '/symfony/http-kernel/Fragment/FragmentHandler.php', + 'Symfony\\Component\\HttpKernel\\Fragment\\FragmentRendererInterface' => __DIR__ . '/..' . '/symfony/http-kernel/Fragment/FragmentRendererInterface.php', + 'Symfony\\Component\\HttpKernel\\Fragment\\HIncludeFragmentRenderer' => __DIR__ . '/..' . '/symfony/http-kernel/Fragment/HIncludeFragmentRenderer.php', + 'Symfony\\Component\\HttpKernel\\Fragment\\InlineFragmentRenderer' => __DIR__ . '/..' . '/symfony/http-kernel/Fragment/InlineFragmentRenderer.php', + 'Symfony\\Component\\HttpKernel\\Fragment\\RoutableFragmentRenderer' => __DIR__ . '/..' . '/symfony/http-kernel/Fragment/RoutableFragmentRenderer.php', + 'Symfony\\Component\\HttpKernel\\Fragment\\SsiFragmentRenderer' => __DIR__ . '/..' . '/symfony/http-kernel/Fragment/SsiFragmentRenderer.php', + 'Symfony\\Component\\HttpKernel\\HttpCache\\AbstractSurrogate' => __DIR__ . '/..' . '/symfony/http-kernel/HttpCache/AbstractSurrogate.php', + 'Symfony\\Component\\HttpKernel\\HttpCache\\Esi' => __DIR__ . '/..' . '/symfony/http-kernel/HttpCache/Esi.php', + 'Symfony\\Component\\HttpKernel\\HttpCache\\HttpCache' => __DIR__ . '/..' . '/symfony/http-kernel/HttpCache/HttpCache.php', + 'Symfony\\Component\\HttpKernel\\HttpCache\\ResponseCacheStrategy' => __DIR__ . '/..' . '/symfony/http-kernel/HttpCache/ResponseCacheStrategy.php', + 'Symfony\\Component\\HttpKernel\\HttpCache\\ResponseCacheStrategyInterface' => __DIR__ . '/..' . '/symfony/http-kernel/HttpCache/ResponseCacheStrategyInterface.php', + 'Symfony\\Component\\HttpKernel\\HttpCache\\Ssi' => __DIR__ . '/..' . '/symfony/http-kernel/HttpCache/Ssi.php', + 'Symfony\\Component\\HttpKernel\\HttpCache\\Store' => __DIR__ . '/..' . '/symfony/http-kernel/HttpCache/Store.php', + 'Symfony\\Component\\HttpKernel\\HttpCache\\StoreInterface' => __DIR__ . '/..' . '/symfony/http-kernel/HttpCache/StoreInterface.php', + 'Symfony\\Component\\HttpKernel\\HttpCache\\SurrogateInterface' => __DIR__ . '/..' . '/symfony/http-kernel/HttpCache/SurrogateInterface.php', + 'Symfony\\Component\\HttpKernel\\HttpKernel' => __DIR__ . '/..' . '/symfony/http-kernel/HttpKernel.php', + 'Symfony\\Component\\HttpKernel\\HttpKernelInterface' => __DIR__ . '/..' . '/symfony/http-kernel/HttpKernelInterface.php', + 'Symfony\\Component\\HttpKernel\\Kernel' => __DIR__ . '/..' . '/symfony/http-kernel/Kernel.php', + 'Symfony\\Component\\HttpKernel\\KernelEvents' => __DIR__ . '/..' . '/symfony/http-kernel/KernelEvents.php', + 'Symfony\\Component\\HttpKernel\\KernelInterface' => __DIR__ . '/..' . '/symfony/http-kernel/KernelInterface.php', + 'Symfony\\Component\\HttpKernel\\Log\\DebugLoggerInterface' => __DIR__ . '/..' . '/symfony/http-kernel/Log/DebugLoggerInterface.php', + 'Symfony\\Component\\HttpKernel\\Profiler\\FileProfilerStorage' => __DIR__ . '/..' . '/symfony/http-kernel/Profiler/FileProfilerStorage.php', + 'Symfony\\Component\\HttpKernel\\Profiler\\Profile' => __DIR__ . '/..' . '/symfony/http-kernel/Profiler/Profile.php', + 'Symfony\\Component\\HttpKernel\\Profiler\\Profiler' => __DIR__ . '/..' . '/symfony/http-kernel/Profiler/Profiler.php', + 'Symfony\\Component\\HttpKernel\\Profiler\\ProfilerStorageInterface' => __DIR__ . '/..' . '/symfony/http-kernel/Profiler/ProfilerStorageInterface.php', + 'Symfony\\Component\\HttpKernel\\TerminableInterface' => __DIR__ . '/..' . '/symfony/http-kernel/TerminableInterface.php', + 'Symfony\\Component\\HttpKernel\\UriSigner' => __DIR__ . '/..' . '/symfony/http-kernel/UriSigner.php', + 'Symfony\\Component\\Process\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/process/Exception/ExceptionInterface.php', + 'Symfony\\Component\\Process\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/symfony/process/Exception/InvalidArgumentException.php', + 'Symfony\\Component\\Process\\Exception\\LogicException' => __DIR__ . '/..' . '/symfony/process/Exception/LogicException.php', + 'Symfony\\Component\\Process\\Exception\\ProcessFailedException' => __DIR__ . '/..' . '/symfony/process/Exception/ProcessFailedException.php', + 'Symfony\\Component\\Process\\Exception\\ProcessTimedOutException' => __DIR__ . '/..' . '/symfony/process/Exception/ProcessTimedOutException.php', + 'Symfony\\Component\\Process\\Exception\\RuntimeException' => __DIR__ . '/..' . '/symfony/process/Exception/RuntimeException.php', + 'Symfony\\Component\\Process\\ExecutableFinder' => __DIR__ . '/..' . '/symfony/process/ExecutableFinder.php', + 'Symfony\\Component\\Process\\InputStream' => __DIR__ . '/..' . '/symfony/process/InputStream.php', + 'Symfony\\Component\\Process\\PhpExecutableFinder' => __DIR__ . '/..' . '/symfony/process/PhpExecutableFinder.php', + 'Symfony\\Component\\Process\\PhpProcess' => __DIR__ . '/..' . '/symfony/process/PhpProcess.php', + 'Symfony\\Component\\Process\\Pipes\\AbstractPipes' => __DIR__ . '/..' . '/symfony/process/Pipes/AbstractPipes.php', + 'Symfony\\Component\\Process\\Pipes\\PipesInterface' => __DIR__ . '/..' . '/symfony/process/Pipes/PipesInterface.php', + 'Symfony\\Component\\Process\\Pipes\\UnixPipes' => __DIR__ . '/..' . '/symfony/process/Pipes/UnixPipes.php', + 'Symfony\\Component\\Process\\Pipes\\WindowsPipes' => __DIR__ . '/..' . '/symfony/process/Pipes/WindowsPipes.php', + 'Symfony\\Component\\Process\\Process' => __DIR__ . '/..' . '/symfony/process/Process.php', + 'Symfony\\Component\\Process\\ProcessBuilder' => __DIR__ . '/..' . '/symfony/process/ProcessBuilder.php', + 'Symfony\\Component\\Process\\ProcessUtils' => __DIR__ . '/..' . '/symfony/process/ProcessUtils.php', + 'Symfony\\Component\\Routing\\Annotation\\Route' => __DIR__ . '/..' . '/symfony/routing/Annotation/Route.php', + 'Symfony\\Component\\Routing\\CompiledRoute' => __DIR__ . '/..' . '/symfony/routing/CompiledRoute.php', + 'Symfony\\Component\\Routing\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/routing/Exception/ExceptionInterface.php', + 'Symfony\\Component\\Routing\\Exception\\InvalidParameterException' => __DIR__ . '/..' . '/symfony/routing/Exception/InvalidParameterException.php', + 'Symfony\\Component\\Routing\\Exception\\MethodNotAllowedException' => __DIR__ . '/..' . '/symfony/routing/Exception/MethodNotAllowedException.php', + 'Symfony\\Component\\Routing\\Exception\\MissingMandatoryParametersException' => __DIR__ . '/..' . '/symfony/routing/Exception/MissingMandatoryParametersException.php', + 'Symfony\\Component\\Routing\\Exception\\ResourceNotFoundException' => __DIR__ . '/..' . '/symfony/routing/Exception/ResourceNotFoundException.php', + 'Symfony\\Component\\Routing\\Exception\\RouteNotFoundException' => __DIR__ . '/..' . '/symfony/routing/Exception/RouteNotFoundException.php', + 'Symfony\\Component\\Routing\\Generator\\ConfigurableRequirementsInterface' => __DIR__ . '/..' . '/symfony/routing/Generator/ConfigurableRequirementsInterface.php', + 'Symfony\\Component\\Routing\\Generator\\Dumper\\GeneratorDumper' => __DIR__ . '/..' . '/symfony/routing/Generator/Dumper/GeneratorDumper.php', + 'Symfony\\Component\\Routing\\Generator\\Dumper\\GeneratorDumperInterface' => __DIR__ . '/..' . '/symfony/routing/Generator/Dumper/GeneratorDumperInterface.php', + 'Symfony\\Component\\Routing\\Generator\\Dumper\\PhpGeneratorDumper' => __DIR__ . '/..' . '/symfony/routing/Generator/Dumper/PhpGeneratorDumper.php', + 'Symfony\\Component\\Routing\\Generator\\UrlGenerator' => __DIR__ . '/..' . '/symfony/routing/Generator/UrlGenerator.php', + 'Symfony\\Component\\Routing\\Generator\\UrlGeneratorInterface' => __DIR__ . '/..' . '/symfony/routing/Generator/UrlGeneratorInterface.php', + 'Symfony\\Component\\Routing\\Loader\\AnnotationClassLoader' => __DIR__ . '/..' . '/symfony/routing/Loader/AnnotationClassLoader.php', + 'Symfony\\Component\\Routing\\Loader\\AnnotationDirectoryLoader' => __DIR__ . '/..' . '/symfony/routing/Loader/AnnotationDirectoryLoader.php', + 'Symfony\\Component\\Routing\\Loader\\AnnotationFileLoader' => __DIR__ . '/..' . '/symfony/routing/Loader/AnnotationFileLoader.php', + 'Symfony\\Component\\Routing\\Loader\\ClosureLoader' => __DIR__ . '/..' . '/symfony/routing/Loader/ClosureLoader.php', + 'Symfony\\Component\\Routing\\Loader\\DependencyInjection\\ServiceRouterLoader' => __DIR__ . '/..' . '/symfony/routing/Loader/DependencyInjection/ServiceRouterLoader.php', + 'Symfony\\Component\\Routing\\Loader\\DirectoryLoader' => __DIR__ . '/..' . '/symfony/routing/Loader/DirectoryLoader.php', + 'Symfony\\Component\\Routing\\Loader\\ObjectRouteLoader' => __DIR__ . '/..' . '/symfony/routing/Loader/ObjectRouteLoader.php', + 'Symfony\\Component\\Routing\\Loader\\PhpFileLoader' => __DIR__ . '/..' . '/symfony/routing/Loader/PhpFileLoader.php', + 'Symfony\\Component\\Routing\\Loader\\XmlFileLoader' => __DIR__ . '/..' . '/symfony/routing/Loader/XmlFileLoader.php', + 'Symfony\\Component\\Routing\\Loader\\YamlFileLoader' => __DIR__ . '/..' . '/symfony/routing/Loader/YamlFileLoader.php', + 'Symfony\\Component\\Routing\\Matcher\\Dumper\\DumperCollection' => __DIR__ . '/..' . '/symfony/routing/Matcher/Dumper/DumperCollection.php', + 'Symfony\\Component\\Routing\\Matcher\\Dumper\\DumperPrefixCollection' => __DIR__ . '/..' . '/symfony/routing/Matcher/Dumper/DumperPrefixCollection.php', + 'Symfony\\Component\\Routing\\Matcher\\Dumper\\DumperRoute' => __DIR__ . '/..' . '/symfony/routing/Matcher/Dumper/DumperRoute.php', + 'Symfony\\Component\\Routing\\Matcher\\Dumper\\MatcherDumper' => __DIR__ . '/..' . '/symfony/routing/Matcher/Dumper/MatcherDumper.php', + 'Symfony\\Component\\Routing\\Matcher\\Dumper\\MatcherDumperInterface' => __DIR__ . '/..' . '/symfony/routing/Matcher/Dumper/MatcherDumperInterface.php', + 'Symfony\\Component\\Routing\\Matcher\\Dumper\\PhpMatcherDumper' => __DIR__ . '/..' . '/symfony/routing/Matcher/Dumper/PhpMatcherDumper.php', + 'Symfony\\Component\\Routing\\Matcher\\RedirectableUrlMatcher' => __DIR__ . '/..' . '/symfony/routing/Matcher/RedirectableUrlMatcher.php', + 'Symfony\\Component\\Routing\\Matcher\\RedirectableUrlMatcherInterface' => __DIR__ . '/..' . '/symfony/routing/Matcher/RedirectableUrlMatcherInterface.php', + 'Symfony\\Component\\Routing\\Matcher\\RequestMatcherInterface' => __DIR__ . '/..' . '/symfony/routing/Matcher/RequestMatcherInterface.php', + 'Symfony\\Component\\Routing\\Matcher\\TraceableUrlMatcher' => __DIR__ . '/..' . '/symfony/routing/Matcher/TraceableUrlMatcher.php', + 'Symfony\\Component\\Routing\\Matcher\\UrlMatcher' => __DIR__ . '/..' . '/symfony/routing/Matcher/UrlMatcher.php', + 'Symfony\\Component\\Routing\\Matcher\\UrlMatcherInterface' => __DIR__ . '/..' . '/symfony/routing/Matcher/UrlMatcherInterface.php', + 'Symfony\\Component\\Routing\\RequestContext' => __DIR__ . '/..' . '/symfony/routing/RequestContext.php', + 'Symfony\\Component\\Routing\\RequestContextAwareInterface' => __DIR__ . '/..' . '/symfony/routing/RequestContextAwareInterface.php', + 'Symfony\\Component\\Routing\\Route' => __DIR__ . '/..' . '/symfony/routing/Route.php', + 'Symfony\\Component\\Routing\\RouteCollection' => __DIR__ . '/..' . '/symfony/routing/RouteCollection.php', + 'Symfony\\Component\\Routing\\RouteCollectionBuilder' => __DIR__ . '/..' . '/symfony/routing/RouteCollectionBuilder.php', + 'Symfony\\Component\\Routing\\RouteCompiler' => __DIR__ . '/..' . '/symfony/routing/RouteCompiler.php', + 'Symfony\\Component\\Routing\\RouteCompilerInterface' => __DIR__ . '/..' . '/symfony/routing/RouteCompilerInterface.php', + 'Symfony\\Component\\Routing\\Router' => __DIR__ . '/..' . '/symfony/routing/Router.php', + 'Symfony\\Component\\Routing\\RouterInterface' => __DIR__ . '/..' . '/symfony/routing/RouterInterface.php', + 'Symfony\\Component\\Translation\\Catalogue\\AbstractOperation' => __DIR__ . '/..' . '/symfony/translation/Catalogue/AbstractOperation.php', + 'Symfony\\Component\\Translation\\Catalogue\\MergeOperation' => __DIR__ . '/..' . '/symfony/translation/Catalogue/MergeOperation.php', + 'Symfony\\Component\\Translation\\Catalogue\\OperationInterface' => __DIR__ . '/..' . '/symfony/translation/Catalogue/OperationInterface.php', + 'Symfony\\Component\\Translation\\Catalogue\\TargetOperation' => __DIR__ . '/..' . '/symfony/translation/Catalogue/TargetOperation.php', + 'Symfony\\Component\\Translation\\DataCollectorTranslator' => __DIR__ . '/..' . '/symfony/translation/DataCollectorTranslator.php', + 'Symfony\\Component\\Translation\\DataCollector\\TranslationDataCollector' => __DIR__ . '/..' . '/symfony/translation/DataCollector/TranslationDataCollector.php', + 'Symfony\\Component\\Translation\\Dumper\\CsvFileDumper' => __DIR__ . '/..' . '/symfony/translation/Dumper/CsvFileDumper.php', + 'Symfony\\Component\\Translation\\Dumper\\DumperInterface' => __DIR__ . '/..' . '/symfony/translation/Dumper/DumperInterface.php', + 'Symfony\\Component\\Translation\\Dumper\\FileDumper' => __DIR__ . '/..' . '/symfony/translation/Dumper/FileDumper.php', + 'Symfony\\Component\\Translation\\Dumper\\IcuResFileDumper' => __DIR__ . '/..' . '/symfony/translation/Dumper/IcuResFileDumper.php', + 'Symfony\\Component\\Translation\\Dumper\\IniFileDumper' => __DIR__ . '/..' . '/symfony/translation/Dumper/IniFileDumper.php', + 'Symfony\\Component\\Translation\\Dumper\\JsonFileDumper' => __DIR__ . '/..' . '/symfony/translation/Dumper/JsonFileDumper.php', + 'Symfony\\Component\\Translation\\Dumper\\MoFileDumper' => __DIR__ . '/..' . '/symfony/translation/Dumper/MoFileDumper.php', + 'Symfony\\Component\\Translation\\Dumper\\PhpFileDumper' => __DIR__ . '/..' . '/symfony/translation/Dumper/PhpFileDumper.php', + 'Symfony\\Component\\Translation\\Dumper\\PoFileDumper' => __DIR__ . '/..' . '/symfony/translation/Dumper/PoFileDumper.php', + 'Symfony\\Component\\Translation\\Dumper\\QtFileDumper' => __DIR__ . '/..' . '/symfony/translation/Dumper/QtFileDumper.php', + 'Symfony\\Component\\Translation\\Dumper\\XliffFileDumper' => __DIR__ . '/..' . '/symfony/translation/Dumper/XliffFileDumper.php', + 'Symfony\\Component\\Translation\\Dumper\\YamlFileDumper' => __DIR__ . '/..' . '/symfony/translation/Dumper/YamlFileDumper.php', + 'Symfony\\Component\\Translation\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/translation/Exception/ExceptionInterface.php', + 'Symfony\\Component\\Translation\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/symfony/translation/Exception/InvalidArgumentException.php', + 'Symfony\\Component\\Translation\\Exception\\InvalidResourceException' => __DIR__ . '/..' . '/symfony/translation/Exception/InvalidResourceException.php', + 'Symfony\\Component\\Translation\\Exception\\LogicException' => __DIR__ . '/..' . '/symfony/translation/Exception/LogicException.php', + 'Symfony\\Component\\Translation\\Exception\\NotFoundResourceException' => __DIR__ . '/..' . '/symfony/translation/Exception/NotFoundResourceException.php', + 'Symfony\\Component\\Translation\\Exception\\RuntimeException' => __DIR__ . '/..' . '/symfony/translation/Exception/RuntimeException.php', + 'Symfony\\Component\\Translation\\Extractor\\AbstractFileExtractor' => __DIR__ . '/..' . '/symfony/translation/Extractor/AbstractFileExtractor.php', + 'Symfony\\Component\\Translation\\Extractor\\ChainExtractor' => __DIR__ . '/..' . '/symfony/translation/Extractor/ChainExtractor.php', + 'Symfony\\Component\\Translation\\Extractor\\ExtractorInterface' => __DIR__ . '/..' . '/symfony/translation/Extractor/ExtractorInterface.php', + 'Symfony\\Component\\Translation\\IdentityTranslator' => __DIR__ . '/..' . '/symfony/translation/IdentityTranslator.php', + 'Symfony\\Component\\Translation\\Interval' => __DIR__ . '/..' . '/symfony/translation/Interval.php', + 'Symfony\\Component\\Translation\\Loader\\ArrayLoader' => __DIR__ . '/..' . '/symfony/translation/Loader/ArrayLoader.php', + 'Symfony\\Component\\Translation\\Loader\\CsvFileLoader' => __DIR__ . '/..' . '/symfony/translation/Loader/CsvFileLoader.php', + 'Symfony\\Component\\Translation\\Loader\\FileLoader' => __DIR__ . '/..' . '/symfony/translation/Loader/FileLoader.php', + 'Symfony\\Component\\Translation\\Loader\\IcuDatFileLoader' => __DIR__ . '/..' . '/symfony/translation/Loader/IcuDatFileLoader.php', + 'Symfony\\Component\\Translation\\Loader\\IcuResFileLoader' => __DIR__ . '/..' . '/symfony/translation/Loader/IcuResFileLoader.php', + 'Symfony\\Component\\Translation\\Loader\\IniFileLoader' => __DIR__ . '/..' . '/symfony/translation/Loader/IniFileLoader.php', + 'Symfony\\Component\\Translation\\Loader\\JsonFileLoader' => __DIR__ . '/..' . '/symfony/translation/Loader/JsonFileLoader.php', + 'Symfony\\Component\\Translation\\Loader\\LoaderInterface' => __DIR__ . '/..' . '/symfony/translation/Loader/LoaderInterface.php', + 'Symfony\\Component\\Translation\\Loader\\MoFileLoader' => __DIR__ . '/..' . '/symfony/translation/Loader/MoFileLoader.php', + 'Symfony\\Component\\Translation\\Loader\\PhpFileLoader' => __DIR__ . '/..' . '/symfony/translation/Loader/PhpFileLoader.php', + 'Symfony\\Component\\Translation\\Loader\\PoFileLoader' => __DIR__ . '/..' . '/symfony/translation/Loader/PoFileLoader.php', + 'Symfony\\Component\\Translation\\Loader\\QtFileLoader' => __DIR__ . '/..' . '/symfony/translation/Loader/QtFileLoader.php', + 'Symfony\\Component\\Translation\\Loader\\XliffFileLoader' => __DIR__ . '/..' . '/symfony/translation/Loader/XliffFileLoader.php', + 'Symfony\\Component\\Translation\\Loader\\YamlFileLoader' => __DIR__ . '/..' . '/symfony/translation/Loader/YamlFileLoader.php', + 'Symfony\\Component\\Translation\\LoggingTranslator' => __DIR__ . '/..' . '/symfony/translation/LoggingTranslator.php', + 'Symfony\\Component\\Translation\\MessageCatalogue' => __DIR__ . '/..' . '/symfony/translation/MessageCatalogue.php', + 'Symfony\\Component\\Translation\\MessageCatalogueInterface' => __DIR__ . '/..' . '/symfony/translation/MessageCatalogueInterface.php', + 'Symfony\\Component\\Translation\\MessageSelector' => __DIR__ . '/..' . '/symfony/translation/MessageSelector.php', + 'Symfony\\Component\\Translation\\MetadataAwareInterface' => __DIR__ . '/..' . '/symfony/translation/MetadataAwareInterface.php', + 'Symfony\\Component\\Translation\\PluralizationRules' => __DIR__ . '/..' . '/symfony/translation/PluralizationRules.php', + 'Symfony\\Component\\Translation\\Translator' => __DIR__ . '/..' . '/symfony/translation/Translator.php', + 'Symfony\\Component\\Translation\\TranslatorBagInterface' => __DIR__ . '/..' . '/symfony/translation/TranslatorBagInterface.php', + 'Symfony\\Component\\Translation\\TranslatorInterface' => __DIR__ . '/..' . '/symfony/translation/TranslatorInterface.php', + 'Symfony\\Component\\Translation\\Util\\ArrayConverter' => __DIR__ . '/..' . '/symfony/translation/Util/ArrayConverter.php', + 'Symfony\\Component\\Translation\\Writer\\TranslationWriter' => __DIR__ . '/..' . '/symfony/translation/Writer/TranslationWriter.php', + 'Symfony\\Component\\VarDumper\\Caster\\AmqpCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/AmqpCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\ArgsStub' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/ArgsStub.php', + 'Symfony\\Component\\VarDumper\\Caster\\Caster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/Caster.php', + 'Symfony\\Component\\VarDumper\\Caster\\ClassStub' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/ClassStub.php', + 'Symfony\\Component\\VarDumper\\Caster\\ConstStub' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/ConstStub.php', + 'Symfony\\Component\\VarDumper\\Caster\\CutArrayStub' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/CutArrayStub.php', + 'Symfony\\Component\\VarDumper\\Caster\\CutStub' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/CutStub.php', + 'Symfony\\Component\\VarDumper\\Caster\\DOMCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/DOMCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\DoctrineCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/DoctrineCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\EnumStub' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/EnumStub.php', + 'Symfony\\Component\\VarDumper\\Caster\\ExceptionCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/ExceptionCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\FrameStub' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/FrameStub.php', + 'Symfony\\Component\\VarDumper\\Caster\\LinkStub' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/LinkStub.php', + 'Symfony\\Component\\VarDumper\\Caster\\MongoCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/MongoCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\PdoCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/PdoCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\PgSqlCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/PgSqlCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\RedisCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/RedisCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\ReflectionCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/ReflectionCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\ResourceCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/ResourceCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\SplCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/SplCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\StubCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/StubCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\TraceStub' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/TraceStub.php', + 'Symfony\\Component\\VarDumper\\Caster\\XmlReaderCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/XmlReaderCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\XmlResourceCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/XmlResourceCaster.php', + 'Symfony\\Component\\VarDumper\\Cloner\\AbstractCloner' => __DIR__ . '/..' . '/symfony/var-dumper/Cloner/AbstractCloner.php', + 'Symfony\\Component\\VarDumper\\Cloner\\ClonerInterface' => __DIR__ . '/..' . '/symfony/var-dumper/Cloner/ClonerInterface.php', + 'Symfony\\Component\\VarDumper\\Cloner\\Cursor' => __DIR__ . '/..' . '/symfony/var-dumper/Cloner/Cursor.php', + 'Symfony\\Component\\VarDumper\\Cloner\\Data' => __DIR__ . '/..' . '/symfony/var-dumper/Cloner/Data.php', + 'Symfony\\Component\\VarDumper\\Cloner\\DumperInterface' => __DIR__ . '/..' . '/symfony/var-dumper/Cloner/DumperInterface.php', + 'Symfony\\Component\\VarDumper\\Cloner\\Stub' => __DIR__ . '/..' . '/symfony/var-dumper/Cloner/Stub.php', + 'Symfony\\Component\\VarDumper\\Cloner\\VarCloner' => __DIR__ . '/..' . '/symfony/var-dumper/Cloner/VarCloner.php', + 'Symfony\\Component\\VarDumper\\Dumper\\AbstractDumper' => __DIR__ . '/..' . '/symfony/var-dumper/Dumper/AbstractDumper.php', + 'Symfony\\Component\\VarDumper\\Dumper\\CliDumper' => __DIR__ . '/..' . '/symfony/var-dumper/Dumper/CliDumper.php', + 'Symfony\\Component\\VarDumper\\Dumper\\DataDumperInterface' => __DIR__ . '/..' . '/symfony/var-dumper/Dumper/DataDumperInterface.php', + 'Symfony\\Component\\VarDumper\\Dumper\\HtmlDumper' => __DIR__ . '/..' . '/symfony/var-dumper/Dumper/HtmlDumper.php', + 'Symfony\\Component\\VarDumper\\Exception\\ThrowingCasterException' => __DIR__ . '/..' . '/symfony/var-dumper/Exception/ThrowingCasterException.php', + 'Symfony\\Component\\VarDumper\\Test\\VarDumperTestTrait' => __DIR__ . '/..' . '/symfony/var-dumper/Test/VarDumperTestTrait.php', + 'Symfony\\Component\\VarDumper\\VarDumper' => __DIR__ . '/..' . '/symfony/var-dumper/VarDumper.php', + 'Symfony\\Component\\Yaml\\Command\\LintCommand' => __DIR__ . '/..' . '/symfony/yaml/Command/LintCommand.php', + 'Symfony\\Component\\Yaml\\Dumper' => __DIR__ . '/..' . '/symfony/yaml/Dumper.php', + 'Symfony\\Component\\Yaml\\Escaper' => __DIR__ . '/..' . '/symfony/yaml/Escaper.php', + 'Symfony\\Component\\Yaml\\Exception\\DumpException' => __DIR__ . '/..' . '/symfony/yaml/Exception/DumpException.php', + 'Symfony\\Component\\Yaml\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/yaml/Exception/ExceptionInterface.php', + 'Symfony\\Component\\Yaml\\Exception\\ParseException' => __DIR__ . '/..' . '/symfony/yaml/Exception/ParseException.php', + 'Symfony\\Component\\Yaml\\Exception\\RuntimeException' => __DIR__ . '/..' . '/symfony/yaml/Exception/RuntimeException.php', + 'Symfony\\Component\\Yaml\\Inline' => __DIR__ . '/..' . '/symfony/yaml/Inline.php', + 'Symfony\\Component\\Yaml\\Parser' => __DIR__ . '/..' . '/symfony/yaml/Parser.php', + 'Symfony\\Component\\Yaml\\Unescaper' => __DIR__ . '/..' . '/symfony/yaml/Unescaper.php', + 'Symfony\\Component\\Yaml\\Yaml' => __DIR__ . '/..' . '/symfony/yaml/Yaml.php', + 'Symfony\\Polyfill\\Mbstring\\Mbstring' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/Mbstring.php', + 'Tests\\CreatesApplication' => __DIR__ . '/../..' . '/tests/CreatesApplication.php', + 'Tests\\Feature\\ExampleTest' => __DIR__ . '/../..' . '/tests/Feature/ExampleTest.php', + 'Tests\\TestCase' => __DIR__ . '/../..' . '/tests/TestCase.php', + 'Tests\\Unit\\ExampleTest' => __DIR__ . '/../..' . '/tests/Unit/ExampleTest.php', + 'Text_Template' => __DIR__ . '/..' . '/phpunit/php-text-template/src/Template.php', + 'TijsVerkoyen\\CssToInlineStyles\\CssToInlineStyles' => __DIR__ . '/..' . '/tijsverkoyen/css-to-inline-styles/src/CssToInlineStyles.php', + 'TijsVerkoyen\\CssToInlineStyles\\Css\\Processor' => __DIR__ . '/..' . '/tijsverkoyen/css-to-inline-styles/src/Css/Processor.php', + 'TijsVerkoyen\\CssToInlineStyles\\Css\\Property\\Processor' => __DIR__ . '/..' . '/tijsverkoyen/css-to-inline-styles/src/Css/Property/Processor.php', + 'TijsVerkoyen\\CssToInlineStyles\\Css\\Property\\Property' => __DIR__ . '/..' . '/tijsverkoyen/css-to-inline-styles/src/Css/Property/Property.php', + 'TijsVerkoyen\\CssToInlineStyles\\Css\\Rule\\Processor' => __DIR__ . '/..' . '/tijsverkoyen/css-to-inline-styles/src/Css/Rule/Processor.php', + 'TijsVerkoyen\\CssToInlineStyles\\Css\\Rule\\Rule' => __DIR__ . '/..' . '/tijsverkoyen/css-to-inline-styles/src/Css/Rule/Rule.php', + 'Webmozart\\Assert\\Assert' => __DIR__ . '/..' . '/webmozart/assert/src/Assert.php', + 'XdgBaseDir\\Xdg' => __DIR__ . '/..' . '/dnoegel/php-xdg-base-dir/src/Xdg.php', + 'phpDocumentor\\Reflection\\DocBlock' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock.php', + 'phpDocumentor\\Reflection\\DocBlockFactory' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlockFactory.php', + 'phpDocumentor\\Reflection\\DocBlockFactoryInterface' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlockFactoryInterface.php', + 'phpDocumentor\\Reflection\\DocBlock\\Description' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock/Description.php', + 'phpDocumentor\\Reflection\\DocBlock\\DescriptionFactory' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock/DescriptionFactory.php', + 'phpDocumentor\\Reflection\\DocBlock\\Serializer' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock/Serializer.php', + 'phpDocumentor\\Reflection\\DocBlock\\StandardTagFactory' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock/StandardTagFactory.php', + 'phpDocumentor\\Reflection\\DocBlock\\Tag' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock/Tag.php', + 'phpDocumentor\\Reflection\\DocBlock\\TagFactory' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock/TagFactory.php', + 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Author' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Author.php', + 'phpDocumentor\\Reflection\\DocBlock\\Tags\\BaseTag' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/BaseTag.php', + 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Covers' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Covers.php', + 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Deprecated' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Deprecated.php', + 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Example' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Example.php', + 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Factory\\StaticMethod' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Factory/StaticMethod.php', + 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Factory\\Strategy' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Factory/Strategy.php', + 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Formatter' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Formatter.php', + 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Formatter\\PassthroughFormatter' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Formatter/PassthroughFormatter.php', + 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Generic' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Generic.php', + 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Link' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Link.php', + 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Method' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Method.php', + 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Param' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Param.php', + 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Property' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Property.php', + 'phpDocumentor\\Reflection\\DocBlock\\Tags\\PropertyRead' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/PropertyRead.php', + 'phpDocumentor\\Reflection\\DocBlock\\Tags\\PropertyWrite' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/PropertyWrite.php', + 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Return_' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Return_.php', + 'phpDocumentor\\Reflection\\DocBlock\\Tags\\See' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/See.php', + 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Since' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Since.php', + 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Source' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Source.php', + 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Throws' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Throws.php', + 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Uses' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Uses.php', + 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Var_' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Var_.php', + 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Version' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Version.php', + 'phpDocumentor\\Reflection\\Element' => __DIR__ . '/..' . '/phpdocumentor/reflection-common/src/Element.php', + 'phpDocumentor\\Reflection\\ExampleFinder' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock/ExampleFinder.php', + 'phpDocumentor\\Reflection\\File' => __DIR__ . '/..' . '/phpdocumentor/reflection-common/src/File.php', + 'phpDocumentor\\Reflection\\Fqsen' => __DIR__ . '/..' . '/phpdocumentor/reflection-common/src/Fqsen.php', + 'phpDocumentor\\Reflection\\FqsenResolver' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/FqsenResolver.php', + 'phpDocumentor\\Reflection\\Location' => __DIR__ . '/..' . '/phpdocumentor/reflection-common/src/Location.php', + 'phpDocumentor\\Reflection\\Project' => __DIR__ . '/..' . '/phpdocumentor/reflection-common/src/Project.php', + 'phpDocumentor\\Reflection\\ProjectFactory' => __DIR__ . '/..' . '/phpdocumentor/reflection-common/src/ProjectFactory.php', + 'phpDocumentor\\Reflection\\Type' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/Type.php', + 'phpDocumentor\\Reflection\\TypeResolver' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/TypeResolver.php', + 'phpDocumentor\\Reflection\\Types\\Array_' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/Types/Array_.php', + 'phpDocumentor\\Reflection\\Types\\Boolean' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/Types/Boolean.php', + 'phpDocumentor\\Reflection\\Types\\Callable_' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/Types/Callable_.php', + 'phpDocumentor\\Reflection\\Types\\Compound' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/Types/Compound.php', + 'phpDocumentor\\Reflection\\Types\\Context' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/Types/Context.php', + 'phpDocumentor\\Reflection\\Types\\ContextFactory' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/Types/ContextFactory.php', + 'phpDocumentor\\Reflection\\Types\\Float_' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/Types/Float_.php', + 'phpDocumentor\\Reflection\\Types\\Integer' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/Types/Integer.php', + 'phpDocumentor\\Reflection\\Types\\Mixed' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/Types/Mixed.php', + 'phpDocumentor\\Reflection\\Types\\Null_' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/Types/Null_.php', + 'phpDocumentor\\Reflection\\Types\\Object_' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/Types/Object_.php', + 'phpDocumentor\\Reflection\\Types\\Resource' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/Types/Resource.php', + 'phpDocumentor\\Reflection\\Types\\Scalar' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/Types/Scalar.php', + 'phpDocumentor\\Reflection\\Types\\Self_' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/Types/Self_.php', + 'phpDocumentor\\Reflection\\Types\\Static_' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/Types/Static_.php', + 'phpDocumentor\\Reflection\\Types\\String_' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/Types/String_.php', + 'phpDocumentor\\Reflection\\Types\\This' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/Types/This.php', + 'phpDocumentor\\Reflection\\Types\\Void_' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/Types/Void_.php', + ); + + public static function getInitializer(ClassLoader $loader) + { + return \Closure::bind(function () use ($loader) { + $loader->prefixLengthsPsr4 = ComposerStaticInit9e0cab994f5c6c83d1dfb6de0c194887::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInit9e0cab994f5c6c83d1dfb6de0c194887::$prefixDirsPsr4; + $loader->prefixesPsr0 = ComposerStaticInit9e0cab994f5c6c83d1dfb6de0c194887::$prefixesPsr0; + $loader->classMap = ComposerStaticInit9e0cab994f5c6c83d1dfb6de0c194887::$classMap; + + }, null, ClassLoader::class); + } +} diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json new file mode 100644 index 0000000..154f23e --- /dev/null +++ b/vendor/composer/installed.json @@ -0,0 +1,3447 @@ +[ + { + "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": "erusev/parsedown", + "version": "1.6.2", + "version_normalized": "1.6.2.0", + "source": { + "type": "git", + "url": "https://github.com/erusev/parsedown.git", + "reference": "1bf24f7334fe16c88bf9d467863309ceaf285b01" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/erusev/parsedown/zipball/1bf24f7334fe16c88bf9d467863309ceaf285b01", + "reference": "1bf24f7334fe16c88bf9d467863309ceaf285b01", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "time": "2017-03-29 16:04:15", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-0": { + "Parsedown": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Emanuil Rusev", + "email": "hello@erusev.com", + "homepage": "http://erusev.com" + } + ], + "description": "Parser for Markdown.", + "homepage": "http://parsedown.org", + "keywords": [ + "markdown", + "parser" + ] + }, + { + "name": "jakub-onderka/php-console-color", + "version": "0.1", + "version_normalized": "0.1.0.0", + "source": { + "type": "git", + "url": "https://github.com/JakubOnderka/PHP-Console-Color.git", + "reference": "e0b393dacf7703fc36a4efc3df1435485197e6c1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/JakubOnderka/PHP-Console-Color/zipball/e0b393dacf7703fc36a4efc3df1435485197e6c1", + "reference": "e0b393dacf7703fc36a4efc3df1435485197e6c1", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "require-dev": { + "jakub-onderka/php-code-style": "1.0", + "jakub-onderka/php-parallel-lint": "0.*", + "jakub-onderka/php-var-dump-check": "0.*", + "phpunit/phpunit": "3.7.*", + "squizlabs/php_codesniffer": "1.*" + }, + "time": "2014-04-08 15:00:19", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-0": { + "JakubOnderka\\PhpConsoleColor": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-2-Clause" + ], + "authors": [ + { + "name": "Jakub Onderka", + "email": "jakub.onderka@gmail.com", + "homepage": "http://www.acci.cz" + } + ] + }, + { + "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\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "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" + ] + }, + { + "name": "symfony/var-dumper", + "version": "v3.2.7", + "version_normalized": "3.2.7.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/var-dumper.git", + "reference": "81dce20f69a8b40427e1f4e6462178df87cafc03" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/81dce20f69a8b40427e1f4e6462178df87cafc03", + "reference": "81dce20f69a8b40427e1f4e6462178df87cafc03", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0" + }, + "require-dev": { + "twig/twig": "~1.20|~2.0" + }, + "suggest": { + "ext-symfony_debug": "" + }, + "time": "2017-03-12 16:07:05", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "installation-source": "dist", + "autoload": { + "files": [ + "Resources/functions/dump.php" + ], + "psr-4": { + "Symfony\\Component\\VarDumper\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "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 mechanism for exploring and dumping PHP variables", + "homepage": "https://symfony.com", + "keywords": [ + "debug", + "dump" + ] + }, + { + "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.2.7", + "version_normalized": "3.2.7.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/debug.git", + "reference": "56f613406446a4a0a031475cfd0a01751de22659" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/debug/zipball/56f613406446a4a0a031475cfd0a01751de22659", + "reference": "56f613406446a4a0a031475cfd0a01751de22659", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "psr/log": "~1.0" + }, + "conflict": { + "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" + }, + "require-dev": { + "symfony/class-loader": "~2.8|~3.0", + "symfony/http-kernel": "~2.8|~3.0" + }, + "time": "2017-03-28 21:38:24", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "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" + }, + { + "name": "symfony/console", + "version": "v3.2.7", + "version_normalized": "3.2.7.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "c30243cc51f726812be3551316b109a2f5deaf8d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/c30243cc51f726812be3551316b109a2f5deaf8d", + "reference": "c30243cc51f726812be3551316b109a2f5deaf8d", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "symfony/debug": "~2.8|~3.0", + "symfony/polyfill-mbstring": "~1.0" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/event-dispatcher": "~2.8|~3.0", + "symfony/filesystem": "~2.8|~3.0", + "symfony/process": "~2.8|~3.0" + }, + "suggest": { + "psr/log": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/filesystem": "", + "symfony/process": "" + }, + "time": "2017-04-04 14:33:42", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-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": "nikic/php-parser", + "version": "v3.0.5", + "version_normalized": "3.0.5.0", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "2b9e2f71b722f7c53918ab0c25f7646c2013f17d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/2b9e2f71b722f7c53918ab0c25f7646c2013f17d", + "reference": "2b9e2f71b722f7c53918ab0c25f7646c2013f17d", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=5.5" + }, + "require-dev": { + "phpunit/phpunit": "~4.0|~5.0" + }, + "time": "2017-03-05 18:23:57", + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ] + }, + { + "name": "jakub-onderka/php-console-highlighter", + "version": "v0.3.2", + "version_normalized": "0.3.2.0", + "source": { + "type": "git", + "url": "https://github.com/JakubOnderka/PHP-Console-Highlighter.git", + "reference": "7daa75df45242c8d5b75a22c00a201e7954e4fb5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/JakubOnderka/PHP-Console-Highlighter/zipball/7daa75df45242c8d5b75a22c00a201e7954e4fb5", + "reference": "7daa75df45242c8d5b75a22c00a201e7954e4fb5", + "shasum": "" + }, + "require": { + "jakub-onderka/php-console-color": "~0.1", + "php": ">=5.3.0" + }, + "require-dev": { + "jakub-onderka/php-code-style": "~1.0", + "jakub-onderka/php-parallel-lint": "~0.5", + "jakub-onderka/php-var-dump-check": "~0.1", + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "~1.5" + }, + "time": "2015-04-20 18:58:01", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-0": { + "JakubOnderka\\PhpConsoleHighlighter": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jakub Onderka", + "email": "acci@acci.cz", + "homepage": "http://www.acci.cz/" + } + ] + }, + { + "name": "dnoegel/php-xdg-base-dir", + "version": "0.1", + "version_normalized": "0.1.0.0", + "source": { + "type": "git", + "url": "https://github.com/dnoegel/php-xdg-base-dir.git", + "reference": "265b8593498b997dc2d31e75b89f053b5cc9621a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dnoegel/php-xdg-base-dir/zipball/265b8593498b997dc2d31e75b89f053b5cc9621a", + "reference": "265b8593498b997dc2d31e75b89f053b5cc9621a", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "require-dev": { + "phpunit/phpunit": "@stable" + }, + "time": "2014-10-24 07:27:01", + "type": "project", + "installation-source": "dist", + "autoload": { + "psr-4": { + "XdgBaseDir\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "implementation of xdg base directory specification for php" + }, + { + "name": "psy/psysh", + "version": "v0.8.3", + "version_normalized": "0.8.3.0", + "source": { + "type": "git", + "url": "https://github.com/bobthecow/psysh.git", + "reference": "1dd4bbbc64d71e7ec075ffe82b42d9e096dc8d5e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/1dd4bbbc64d71e7ec075ffe82b42d9e096dc8d5e", + "reference": "1dd4bbbc64d71e7ec075ffe82b42d9e096dc8d5e", + "shasum": "" + }, + "require": { + "dnoegel/php-xdg-base-dir": "0.1", + "jakub-onderka/php-console-highlighter": "0.3.*", + "nikic/php-parser": "~1.3|~2.0|~3.0", + "php": ">=5.3.9", + "symfony/console": "~2.3.10|^2.4.2|~3.0", + "symfony/var-dumper": "~2.7|~3.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "~1.11", + "hoa/console": "~3.16|~1.14", + "phpunit/phpunit": "~4.4|~5.0", + "symfony/finder": "~2.1|~3.0" + }, + "suggest": { + "ext-pcntl": "Enabling the PCNTL extension makes PsySH a lot happier :)", + "ext-pdo-sqlite": "The doc command requires SQLite to work.", + "ext-posix": "If you have PCNTL, you'll want the POSIX extension as well.", + "ext-readline": "Enables support for arrow-key history navigation, and showing and manipulating command history.", + "hoa/console": "A pure PHP readline implementation. You'll want this if your PHP install doesn't already support readline or libedit." + }, + "time": "2017-03-19 21:40:44", + "bin": [ + "bin/psysh" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-develop": "0.9.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "files": [ + "src/Psy/functions.php" + ], + "psr-4": { + "Psy\\": "src/Psy/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Justin Hileman", + "email": "justin@justinhileman.info", + "homepage": "http://justinhileman.com" + } + ], + "description": "An interactive shell for modern PHP.", + "homepage": "http://psysh.org", + "keywords": [ + "REPL", + "console", + "interactive", + "shell" + ] + }, + { + "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": "symfony/css-selector", + "version": "v3.2.7", + "version_normalized": "3.2.7.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/css-selector.git", + "reference": "a48f13dc83c168f1253a5d2a5a4fb46c36244c4c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/a48f13dc83c168f1253a5d2a5a4fb46c36244c4c", + "reference": "a48f13dc83c168f1253a5d2a5a4fb46c36244c4c", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "time": "2017-02-21 09:12:04", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Component\\CssSelector\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jean-François Simon", + "email": "jeanfrancois.simon@sensiolabs.com" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony CssSelector Component", + "homepage": "https://symfony.com" + }, + { + "name": "tijsverkoyen/css-to-inline-styles", + "version": "2.2.0", + "version_normalized": "2.2.0.0", + "source": { + "type": "git", + "url": "https://github.com/tijsverkoyen/CssToInlineStyles.git", + "reference": "ab03919dfd85a74ae0372f8baf9f3c7d5c03b04b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/tijsverkoyen/CssToInlineStyles/zipball/ab03919dfd85a74ae0372f8baf9f3c7d5c03b04b", + "reference": "ab03919dfd85a74ae0372f8baf9f3c7d5c03b04b", + "shasum": "" + }, + "require": { + "php": "^5.5 || ^7", + "symfony/css-selector": "^2.7|~3.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.8|5.1.*" + }, + "time": "2016-09-20 12:50:39", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "TijsVerkoyen\\CssToInlineStyles\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Tijs Verkoyen", + "email": "css_to_inline_styles@verkoyen.eu", + "role": "Developer" + } + ], + "description": "CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very useful when you're sending emails.", + "homepage": "https://github.com/tijsverkoyen/CssToInlineStyles" + }, + { + "name": "symfony/routing", + "version": "v3.2.7", + "version_normalized": "3.2.7.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/routing.git", + "reference": "d6605f9a5767bc5bc4895e1c762ba93964608aee" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/routing/zipball/d6605f9a5767bc5bc4895e1c762ba93964608aee", + "reference": "d6605f9a5767bc5bc4895e1c762ba93964608aee", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "conflict": { + "symfony/config": "<2.8" + }, + "require-dev": { + "doctrine/annotations": "~1.0", + "doctrine/common": "~2.2", + "psr/log": "~1.0", + "symfony/config": "~2.8|~3.0", + "symfony/expression-language": "~2.8|~3.0", + "symfony/http-foundation": "~2.8|~3.0", + "symfony/yaml": "~2.8|~3.0" + }, + "suggest": { + "doctrine/annotations": "For using the annotation loader", + "symfony/config": "For using the all-in-one router or any loader", + "symfony/dependency-injection": "For loading routes from a service", + "symfony/expression-language": "For using expression matching", + "symfony/http-foundation": "For using a Symfony Request object", + "symfony/yaml": "For using the YAML loader" + }, + "time": "2017-03-02 15:58:09", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Component\\Routing\\": "" + }, + "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 Routing Component", + "homepage": "https://symfony.com", + "keywords": [ + "router", + "routing", + "uri", + "url" + ] + }, + { + "name": "symfony/process", + "version": "v3.2.7", + "version_normalized": "3.2.7.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "57fdaa55827ae14d617550ebe71a820f0a5e2282" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/57fdaa55827ae14d617550ebe71a820f0a5e2282", + "reference": "57fdaa55827ae14d617550ebe71a820f0a5e2282", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "time": "2017-03-27 18:07:02", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-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/http-foundation", + "version": "v3.2.7", + "version_normalized": "3.2.7.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-foundation.git", + "reference": "cb0b6418f588952c9290b3df4ca650f1b7ab570a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/cb0b6418f588952c9290b3df4ca650f1b7ab570a", + "reference": "cb0b6418f588952c9290b3df4ca650f1b7ab570a", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "symfony/polyfill-mbstring": "~1.1" + }, + "require-dev": { + "symfony/expression-language": "~2.8|~3.0" + }, + "time": "2017-04-04 15:30:56", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "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" + }, + { + "name": "symfony/event-dispatcher", + "version": "v3.2.7", + "version_normalized": "3.2.7.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "154bb1ef7b0e42ccc792bd53edbce18ed73440ca" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/154bb1ef7b0e42ccc792bd53edbce18ed73440ca", + "reference": "154bb1ef7b0e42ccc792bd53edbce18ed73440ca", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~2.8|~3.0", + "symfony/dependency-injection": "~2.8|~3.0", + "symfony/expression-language": "~2.8|~3.0", + "symfony/stopwatch": "~2.8|~3.0" + }, + "suggest": { + "symfony/dependency-injection": "", + "symfony/http-kernel": "" + }, + "time": "2017-04-04 07:26:27", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-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.2.7", + "version_normalized": "3.2.7.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-kernel.git", + "reference": "8285ab5faf1306b1a5ebcf287fe91c231a6de88e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/8285ab5faf1306b1a5ebcf287fe91c231a6de88e", + "reference": "8285ab5faf1306b1a5ebcf287fe91c231a6de88e", + "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": "~2.8.13|~3.1.6|~3.2" + }, + "conflict": { + "symfony/config": "<2.8" + }, + "require-dev": { + "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": "~2.8|~3.0", + "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.2" + }, + "suggest": { + "symfony/browser-kit": "", + "symfony/class-loader": "", + "symfony/config": "", + "symfony/console": "", + "symfony/dependency-injection": "", + "symfony/finder": "", + "symfony/var-dumper": "" + }, + "time": "2017-04-05 12:52:03", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-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": "symfony/finder", + "version": "v3.2.7", + "version_normalized": "3.2.7.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "b20900ce5ea164cd9314af52725b0bb5a758217a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/b20900ce5ea164cd9314af52725b0bb5a758217a", + "reference": "b20900ce5ea164cd9314af52725b0bb5a758217a", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "time": "2017-03-20 09:32:19", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-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": "swiftmailer/swiftmailer", + "version": "v5.4.7", + "version_normalized": "5.4.7.0", + "source": { + "type": "git", + "url": "https://github.com/swiftmailer/swiftmailer.git", + "reference": "56db4ed32a6d5c9824c3ecc1d2e538f663f47eb4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/56db4ed32a6d5c9824c3ecc1d2e538f663f47eb4", + "reference": "56db4ed32a6d5c9824c3ecc1d2e538f663f47eb4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "mockery/mockery": "~0.9.1", + "symfony/phpunit-bridge": "~3.2" + }, + "time": "2017-04-20 17:32:18", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.4-dev" + } + }, + "installation-source": "dist", + "autoload": { + "files": [ + "lib/swift_required.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Chris Corbyn" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Swiftmailer, free feature-rich PHP mailer", + "homepage": "http://swiftmailer.org", + "keywords": [ + "email", + "mail", + "mailer" + ] + }, + { + "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": "ramsey/uuid", + "version": "3.6.1", + "version_normalized": "3.6.1.0", + "source": { + "type": "git", + "url": "https://github.com/ramsey/uuid.git", + "reference": "4ae32dd9ab8860a4bbd750ad269cba7f06f7934e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/4ae32dd9ab8860a4bbd750ad269cba7f06f7934e", + "reference": "4ae32dd9ab8860a4bbd750ad269cba7f06f7934e", + "shasum": "" + }, + "require": { + "paragonie/random_compat": "^1.0|^2.0", + "php": "^5.4 || ^7.0" + }, + "replace": { + "rhumsaa/uuid": "self.version" + }, + "require-dev": { + "apigen/apigen": "^4.1", + "codeception/aspect-mock": "^1.0 | ^2.0", + "doctrine/annotations": "~1.2.0", + "goaop/framework": "1.0.0-alpha.2 | ^1.0 | ^2.1", + "ircmaxell/random-lib": "^1.1", + "jakub-onderka/php-parallel-lint": "^0.9.0", + "mockery/mockery": "^0.9.4", + "moontoast/math": "^1.1", + "php-mock/php-mock-phpunit": "^0.3|^1.1", + "phpunit/phpunit": "^4.7|>=5.0 <5.4", + "satooshi/php-coveralls": "^0.6.1", + "squizlabs/php_codesniffer": "^2.3" + }, + "suggest": { + "ext-libsodium": "Provides the PECL libsodium extension for use with the SodiumRandomGenerator", + "ext-uuid": "Provides the PECL UUID extension for use with the PeclUuidTimeGenerator and PeclUuidRandomGenerator", + "ircmaxell/random-lib": "Provides RandomLib for use with the RandomLibAdapter", + "moontoast/math": "Provides support for converting UUID to 128-bit integer (in string form).", + "ramsey/uuid-console": "A console application for generating UUIDs with ramsey/uuid", + "ramsey/uuid-doctrine": "Allows the use of Ramsey\\Uuid\\Uuid as Doctrine field type." + }, + "time": "2017-03-26 20:37:53", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Ramsey\\Uuid\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marijn Huizendveld", + "email": "marijn.huizendveld@gmail.com" + }, + { + "name": "Thibaud Fabre", + "email": "thibaud@aztech.io" + }, + { + "name": "Ben Ramsey", + "email": "ben@benramsey.com", + "homepage": "https://benramsey.com" + } + ], + "description": "Formerly rhumsaa/uuid. A PHP 5.4+ library for generating RFC 4122 version 1, 3, 4, and 5 universally unique identifiers (UUID).", + "homepage": "https://github.com/ramsey/uuid", + "keywords": [ + "guid", + "identifier", + "uuid" + ] + }, + { + "name": "symfony/translation", + "version": "v3.2.7", + "version_normalized": "3.2.7.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/translation.git", + "reference": "c740eee70783d2af4d3d6b70d5146f209e6b4d13" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/translation/zipball/c740eee70783d2af4d3d6b70d5146f209e6b4d13", + "reference": "c740eee70783d2af4d3d6b70d5146f209e6b4d13", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/config": "<2.8" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~2.8|~3.0", + "symfony/intl": "^2.8.18|^3.2.5", + "symfony/yaml": "~2.8|~3.0" + }, + "suggest": { + "psr/log": "To use logging capability in translator", + "symfony/config": "", + "symfony/yaml": "" + }, + "time": "2017-03-21 21:44:32", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-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": "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": "league/flysystem", + "version": "1.0.38", + "version_normalized": "1.0.38.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/flysystem.git", + "reference": "4ba6e13f5116204b21c3afdf400ecf2b9eb1c482" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/4ba6e13f5116204b21c3afdf400ecf2b9eb1c482", + "reference": "4ba6e13f5116204b21c3afdf400ecf2b9eb1c482", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "conflict": { + "league/flysystem-sftp": "<1.0.6" + }, + "require-dev": { + "ext-fileinfo": "*", + "mockery/mockery": "~0.9", + "phpspec/phpspec": "^2.2", + "phpunit/phpunit": "~4.8" + }, + "suggest": { + "ext-fileinfo": "Required for MimeType", + "league/flysystem-aws-s3-v2": "Allows you to use S3 storage with AWS SDK v2", + "league/flysystem-aws-s3-v3": "Allows you to use S3 storage with AWS SDK v3", + "league/flysystem-azure": "Allows you to use Windows Azure Blob storage", + "league/flysystem-cached-adapter": "Flysystem adapter decorator for metadata caching", + "league/flysystem-copy": "Allows you to use Copy.com storage", + "league/flysystem-eventable-filesystem": "Allows you to use EventableFilesystem", + "league/flysystem-rackspace": "Allows you to use Rackspace Cloud Files", + "league/flysystem-sftp": "Allows you to use SFTP server storage via phpseclib", + "league/flysystem-webdav": "Allows you to use WebDAV storage", + "league/flysystem-ziparchive": "Allows you to use ZipArchive adapter", + "spatie/flysystem-dropbox": "Allows you to use Dropbox storage" + }, + "time": "2017-04-22 18:59:19", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "League\\Flysystem\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frenky.net" + } + ], + "description": "Filesystem abstraction: Many filesystems, one API.", + "keywords": [ + "Cloud Files", + "WebDAV", + "abstraction", + "aws", + "cloud", + "copy.com", + "dropbox", + "file systems", + "files", + "filesystem", + "filesystems", + "ftp", + "rackspace", + "remote", + "s3", + "sftp", + "storage" + ] + }, + { + "name": "laravel/framework", + "version": "v5.4.19", + "version_normalized": "5.4.19.0", + "source": { + "type": "git", + "url": "https://github.com/laravel/framework.git", + "reference": "02444b7450350db17a7607c8a52f7268ebdb0dad" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/framework/zipball/02444b7450350db17a7607c8a52f7268ebdb0dad", + "reference": "02444b7450350db17a7607c8a52f7268ebdb0dad", + "shasum": "" + }, + "require": { + "doctrine/inflector": "~1.0", + "erusev/parsedown": "~1.6", + "ext-mbstring": "*", + "ext-openssl": "*", + "league/flysystem": "~1.0", + "monolog/monolog": "~1.11", + "mtdowling/cron-expression": "~1.0", + "nesbot/carbon": "~1.20", + "paragonie/random_compat": "~1.4|~2.0", + "php": ">=5.6.4", + "ramsey/uuid": "~3.0", + "swiftmailer/swiftmailer": "~5.4", + "symfony/console": "~3.2", + "symfony/debug": "~3.2", + "symfony/finder": "~3.2", + "symfony/http-foundation": "~3.2", + "symfony/http-kernel": "~3.2", + "symfony/process": "~3.2", + "symfony/routing": "~3.2", + "symfony/var-dumper": "~3.2", + "tijsverkoyen/css-to-inline-styles": "~2.2", + "vlucas/phpdotenv": "~2.2" + }, + "replace": { + "illuminate/auth": "self.version", + "illuminate/broadcasting": "self.version", + "illuminate/bus": "self.version", + "illuminate/cache": "self.version", + "illuminate/config": "self.version", + "illuminate/console": "self.version", + "illuminate/container": "self.version", + "illuminate/contracts": "self.version", + "illuminate/cookie": "self.version", + "illuminate/database": "self.version", + "illuminate/encryption": "self.version", + "illuminate/events": "self.version", + "illuminate/exception": "self.version", + "illuminate/filesystem": "self.version", + "illuminate/hashing": "self.version", + "illuminate/http": "self.version", + "illuminate/log": "self.version", + "illuminate/mail": "self.version", + "illuminate/notifications": "self.version", + "illuminate/pagination": "self.version", + "illuminate/pipeline": "self.version", + "illuminate/queue": "self.version", + "illuminate/redis": "self.version", + "illuminate/routing": "self.version", + "illuminate/session": "self.version", + "illuminate/support": "self.version", + "illuminate/translation": "self.version", + "illuminate/validation": "self.version", + "illuminate/view": "self.version", + "tightenco/collect": "self.version" + }, + "require-dev": { + "aws/aws-sdk-php": "~3.0", + "doctrine/dbal": "~2.5", + "mockery/mockery": "~0.9.4", + "pda/pheanstalk": "~3.0", + "phpunit/phpunit": "~5.7", + "predis/predis": "~1.0", + "symfony/css-selector": "~3.2", + "symfony/dom-crawler": "~3.2" + }, + "suggest": { + "aws/aws-sdk-php": "Required to use the SQS queue driver and SES mail driver (~3.0).", + "doctrine/dbal": "Required to rename columns and drop SQLite columns (~2.5).", + "fzaninotto/faker": "Required to use the eloquent factory builder (~1.4).", + "guzzlehttp/guzzle": "Required to use the Mailgun and Mandrill mail drivers and the ping methods on schedules (~6.0).", + "laravel/tinker": "Required to use the tinker console command (~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).", + "nexmo/client": "Required to use the Nexmo transport (~1.0).", + "pda/pheanstalk": "Required to use the beanstalk queue driver (~3.0).", + "predis/predis": "Required to use the redis cache and queue drivers (~1.0).", + "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (~2.0).", + "symfony/css-selector": "Required to use some of the crawler integration testing tools (~3.2).", + "symfony/dom-crawler": "Required to use most of the crawler integration testing tools (~3.2).", + "symfony/psr-http-message-bridge": "Required to psr7 bridging features (0.2.*)." + }, + "time": "2017-04-16 13:33:34", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.4-dev" + } + }, + "installation-source": "dist", + "autoload": { + "files": [ + "src/Illuminate/Foundation/helpers.php", + "src/Illuminate/Support/helpers.php" + ], + "psr-4": { + "Illuminate\\": "src/Illuminate/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Laravel Framework.", + "homepage": "https://laravel.com", + "keywords": [ + "framework", + "laravel" + ] + }, + { + "name": "laravel/tinker", + "version": "v1.0.0", + "version_normalized": "1.0.0.0", + "source": { + "type": "git", + "url": "https://github.com/laravel/tinker.git", + "reference": "3d5b675b55b24ccbf86395964042dbe061d5a965" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/tinker/zipball/3d5b675b55b24ccbf86395964042dbe061d5a965", + "reference": "3d5b675b55b24ccbf86395964042dbe061d5a965", + "shasum": "" + }, + "require": { + "illuminate/console": "~5.1", + "illuminate/contracts": "~5.1", + "illuminate/support": "~5.1", + "php": ">=5.5.9", + "psy/psysh": "0.7.*|0.8.*", + "symfony/var-dumper": "~3.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.0|~5.0" + }, + "suggest": { + "illuminate/database": "The Illuminate Database package (~5.1)." + }, + "time": "2016-12-30 18:13:17", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Laravel\\Tinker\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "Powerful REPL for the Laravel framework.", + "keywords": [ + "REPL", + "Tinker", + "laravel", + "psysh" + ] + }, + { + "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": "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" + ], + "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" + }, + { + "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" + ] + }, + { + "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": "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": "symfony/yaml", + "version": "v3.2.7", + "version_normalized": "3.2.7.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "62b4cdb99d52cb1ff253c465eb1532a80cebb621" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/62b4cdb99d52cb1ff253c465eb1532a80cebb621", + "reference": "62b4cdb99d52cb1ff253c465eb1532a80cebb621", + "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-03-20 09:45:15", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-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.1", + "version_normalized": "1.4.1.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/13edfd8706462032c2f52b4b862974dd46b71c9e", + "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.8" + }, + "time": "2015-12-08 07:14:41", + "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": "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": "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/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-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": "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.19", + "version_normalized": "5.7.19.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "69c4f49ff376af2692bad9cebd883d17ebaa98a1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/69c4f49ff376af2692bad9cebd883d17ebaa98a1", + "reference": "69c4f49ff376af2692bad9cebd883d17ebaa98a1", + "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.2", + "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-04-03 02:22:27", + "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" + ] + } +] diff --git a/vendor/dnoegel/php-xdg-base-dir/.gitignore b/vendor/dnoegel/php-xdg-base-dir/.gitignore new file mode 100644 index 0000000..57872d0 --- /dev/null +++ b/vendor/dnoegel/php-xdg-base-dir/.gitignore @@ -0,0 +1 @@ +/vendor/ diff --git a/vendor/dnoegel/php-xdg-base-dir/LICENSE b/vendor/dnoegel/php-xdg-base-dir/LICENSE new file mode 100644 index 0000000..029a00a --- /dev/null +++ b/vendor/dnoegel/php-xdg-base-dir/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2014 Daniel Nögel + +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/vendor/dnoegel/php-xdg-base-dir/README.md b/vendor/dnoegel/php-xdg-base-dir/README.md new file mode 100644 index 0000000..9e51bbb --- /dev/null +++ b/vendor/dnoegel/php-xdg-base-dir/README.md @@ -0,0 +1,38 @@ +# XDG Base Directory + +[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md) + +Implementation of XDG Base Directory specification for php + +## Install + +Via Composer + +``` bash +$ composer require dnoegel/php-xdg-base-dir +``` + +## Usage + +``` php +$xdg = \XdgBaseDir\Xdg(); + +echo $xdg->getHomeDir(); +echo $xdg->getHomeConfigDir() +echo $xdg->getHomeDataDir() +echo $xdg->getHomeCacheDir() +echo $xdg->getRuntimeDir() + +$xdg->getDataDirs() // returns array +$xdg->getConfigDirs() // returns array +``` + +## Testing + +``` bash +$ phpunit +``` + +## License + +The MIT License (MIT). Please see [License File](https://github.com/dnoegel/php-xdg-base-dir/blob/master/LICENSE) for more information. diff --git a/vendor/dnoegel/php-xdg-base-dir/composer.json b/vendor/dnoegel/php-xdg-base-dir/composer.json new file mode 100644 index 0000000..f6caf31 --- /dev/null +++ b/vendor/dnoegel/php-xdg-base-dir/composer.json @@ -0,0 +1,17 @@ +{ + "name": "dnoegel/php-xdg-base-dir", + "description": "implementation of xdg base directory specification for php", + "type": "project", + "license": "MIT", + "require": { + "php": ">=5.3.2" + }, + "require-dev": { + "phpunit/phpunit": "@stable" + }, + "autoload": { + "psr-4": { + "XdgBaseDir\\": "src/" + } + } +} diff --git a/vendor/dnoegel/php-xdg-base-dir/phpunit.xml.dist b/vendor/dnoegel/php-xdg-base-dir/phpunit.xml.dist new file mode 100644 index 0000000..4000c01 --- /dev/null +++ b/vendor/dnoegel/php-xdg-base-dir/phpunit.xml.dist @@ -0,0 +1,24 @@ + + + + + + + ./tests/ + + + + + + ./src/ + + + diff --git a/vendor/dnoegel/php-xdg-base-dir/src/Xdg.php b/vendor/dnoegel/php-xdg-base-dir/src/Xdg.php new file mode 100644 index 0000000..e2acda1 --- /dev/null +++ b/vendor/dnoegel/php-xdg-base-dir/src/Xdg.php @@ -0,0 +1,121 @@ +getHomeDir() . DIRECTORY_SEPARATOR . '.config'; + + return $path; + } + + /** + * @return string + */ + public function getHomeDataDir() + { + $path = getenv('XDG_DATA_HOME') ?: $this->getHomeDir() . DIRECTORY_SEPARATOR . '.local' . DIRECTORY_SEPARATOR . 'share'; + + return $path; + } + + /** + * @return array + */ + public function getConfigDirs() + { + $configDirs = getenv('XDG_CONFIG_DIRS') ? explode(':', getenv('XDG_CONFIG_DIRS')) : array('/etc/xdg'); + + $paths = array_merge(array($this->getHomeConfigDir()), $configDirs); + + return $paths; + } + + /** + * @return array + */ + public function getDataDirs() + { + $dataDirs = getenv('XDG_DATA_DIRS') ? explode(':', getenv('XDG_DATA_DIRS')) : array('/usr/local/share', '/usr/share'); + + $paths = array_merge(array($this->getHomeDataDir()), $dataDirs); + + return $paths; + } + + /** + * @return string + */ + public function getHomeCacheDir() + { + $path = getenv('XDG_CACHE_HOME') ?: $this->getHomeDir() . DIRECTORY_SEPARATOR . '.cache'; + + return $path; + + } + + public function getRuntimeDir($strict=true) + { + if ($runtimeDir = getenv('XDG_RUNTIME_DIR')) { + return $runtimeDir; + } + + if ($strict) { + throw new \RuntimeException('XDG_RUNTIME_DIR was not set'); + } + + $fallback = sys_get_temp_dir() . DIRECTORY_SEPARATOR . self::RUNTIME_DIR_FALLBACK . getenv('USER'); + + $create = false; + + if (!is_dir($fallback)) { + mkdir($fallback, 0700, true); + } + + $st = lstat($fallback); + + # The fallback must be a directory + if (!$st['mode'] & self::S_IFDIR) { + rmdir($fallback); + $create = true; + } elseif ($st['uid'] != getmyuid() || + $st['mode'] & (self::S_IRWXG | self::S_IRWXO) + ) { + rmdir($fallback); + $create = true; + } + + if ($create) { + mkdir($fallback, 0700, true); + } + + return $fallback; + } + +} diff --git a/vendor/dnoegel/php-xdg-base-dir/tests/XdgTest.php b/vendor/dnoegel/php-xdg-base-dir/tests/XdgTest.php new file mode 100644 index 0000000..92c2e07 --- /dev/null +++ b/vendor/dnoegel/php-xdg-base-dir/tests/XdgTest.php @@ -0,0 +1,116 @@ +assertEquals('/fake-dir', $this->getXdg()->getHomeDir()); + } + + public function testGetFallbackHomeDir() + { + putenv('HOME='); + putenv('HOMEDRIVE=C:'); + putenv('HOMEPATH=fake-dir'); + $this->assertEquals('C:/fake-dir', $this->getXdg()->getHomeDir()); + } + + public function testXdgPutCache() + { + putenv('XDG_DATA_HOME=tmp/'); + putenv('XDG_CONFIG_HOME=tmp/'); + putenv('XDG_CACHE_HOME=tmp/'); + $this->assertEquals('tmp/', $this->getXdg()->getHomeCacheDir()); + } + + public function testXdgPutData() + { + putenv('XDG_DATA_HOME=tmp/'); + $this->assertEquals('tmp/', $this->getXdg()->getHomeDataDir()); + } + + public function testXdgPutConfig() + { + putenv('XDG_CONFIG_HOME=tmp/'); + $this->assertEquals('tmp/', $this->getXdg()->getHomeConfigDir()); + } + + public function testXdgDataDirsShouldIncludeHomeDataDir() + { + putenv('XDG_DATA_HOME=tmp/'); + putenv('XDG_CONFIG_HOME=tmp/'); + + $this->assertArrayHasKey('tmp/', array_flip($this->getXdg()->getDataDirs())); + } + + public function testXdgConfigDirsShouldIncludeHomeConfigDir() + { + putenv('XDG_CONFIG_HOME=tmp/'); + + $this->assertArrayHasKey('tmp/', array_flip($this->getXdg()->getConfigDirs())); + } + + /** + * If XDG_RUNTIME_DIR is set, it should be returned + */ + public function testGetRuntimeDir() + { + putenv('XDG_RUNTIME_DIR=/tmp/'); + $runtimeDir = $this->getXdg()->getRuntimeDir(); + + $this->assertEquals(is_dir($runtimeDir), true); + } + + /** + * In strict mode, an exception should be shown if XDG_RUNTIME_DIR does not exist + * + * @expectedException \RuntimeException + */ + public function testGetRuntimeDirShouldThrowException() + { + putenv('XDG_RUNTIME_DIR='); + $this->getXdg()->getRuntimeDir(true); + } + + /** + * In fallback mode a directory should be created + */ + public function testGetRuntimeDirShouldCreateDirectory() + { + putenv('XDG_RUNTIME_DIR='); + $dir = $this->getXdg()->getRuntimeDir(false); + $permission = decoct(fileperms($dir) & 0777); + $this->assertEquals(700, $permission); + } + + /** + * Ensure, that the fallback directories are created with correct permission + */ + public function testGetRuntimeShouldDeleteDirsWithWrongPermission() + { + $runtimeDir = sys_get_temp_dir() . DIRECTORY_SEPARATOR . XdgBaseDir\Xdg::RUNTIME_DIR_FALLBACK . getenv('USER'); + + rmdir($runtimeDir); + mkdir($runtimeDir, 0764, true); + + // Permission should be wrong now + $permission = decoct(fileperms($runtimeDir) & 0777); + $this->assertEquals(764, $permission); + + putenv('XDG_RUNTIME_DIR='); + $dir = $this->getXdg()->getRuntimeDir(false); + + // Permission should be fixed + $permission = decoct(fileperms($dir) & 0777); + $this->assertEquals(700, $permission); + } +} diff --git a/vendor/doctrine/inflector/.gitignore b/vendor/doctrine/inflector/.gitignore new file mode 100644 index 0000000..f2cb7f8 --- /dev/null +++ b/vendor/doctrine/inflector/.gitignore @@ -0,0 +1,4 @@ +vendor/ +composer.lock +composer.phar +phpunit.xml diff --git a/vendor/doctrine/inflector/.travis.yml b/vendor/doctrine/inflector/.travis.yml new file mode 100644 index 0000000..9ec68f7 --- /dev/null +++ b/vendor/doctrine/inflector/.travis.yml @@ -0,0 +1,21 @@ +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/vendor/doctrine/inflector/LICENSE b/vendor/doctrine/inflector/LICENSE new file mode 100644 index 0000000..8c38cc1 --- /dev/null +++ b/vendor/doctrine/inflector/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2006-2015 Doctrine Project + +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/vendor/doctrine/inflector/README.md b/vendor/doctrine/inflector/README.md new file mode 100644 index 0000000..acb55a0 --- /dev/null +++ b/vendor/doctrine/inflector/README.md @@ -0,0 +1,6 @@ +# Doctrine Inflector + +Doctrine Inflector is a small library that can perform string manipulations +with regard to upper-/lowercase and singular/plural forms of words. + +[![Build Status](https://travis-ci.org/doctrine/inflector.svg?branch=master)](https://travis-ci.org/doctrine/inflector) diff --git a/vendor/doctrine/inflector/composer.json b/vendor/doctrine/inflector/composer.json new file mode 100644 index 0000000..7e5b2ef --- /dev/null +++ b/vendor/doctrine/inflector/composer.json @@ -0,0 +1,29 @@ +{ + "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", + "license": "MIT", + "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"} + ], + "require": { + "php": ">=5.3.2" + }, + "require-dev": { + "phpunit/phpunit": "4.*" + }, + "autoload": { + "psr-0": { "Doctrine\\Common\\Inflector\\": "lib/" } + }, + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" + } + } +} diff --git a/vendor/doctrine/inflector/lib/Doctrine/Common/Inflector/Inflector.php b/vendor/doctrine/inflector/lib/Doctrine/Common/Inflector/Inflector.php new file mode 100644 index 0000000..a53828a --- /dev/null +++ b/vendor/doctrine/inflector/lib/Doctrine/Common/Inflector/Inflector.php @@ -0,0 +1,482 @@ +. + */ + +namespace Doctrine\Common\Inflector; + +/** + * 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 + */ +class Inflector +{ + /** + * Plural inflector rules. + * + * @var array + */ + 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', + ) + ); + + /** + * 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', + ) + ); + + /** + * 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' + ); + + /** + * Method cache array. + * + * @var array + */ + private static $cache = array(); + + /** + * The initial state of Inflector so reset() works. + * + * @var array + */ + private static $initialState = array(); + + /** + * 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. + */ + public static function tableize($word) + { + return strtolower(preg_replace('~(?<=\\w)([A-Z])~', '_$1', $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) + { + return str_replace(" ", "", ucwords(strtr($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. + */ + public static function camelize($word) + { + return lcfirst(self::classify($word)); + } + + /** + * Uppercases words with configurable delimeters 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 + * whitespace. + * + * Here is an example: + * + * + * + * + * @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. + */ + public static function ucwords($string, $delimiters = " \n\t\r\0\x0B-") + { + return preg_replace_callback( + '/[^' . preg_quote($delimiters, '/') . ']+/', + function($matches) { + return ucfirst($matches[0]); + }, + $string + ); + } + + /** + * Clears Inflectors inflected value caches, and resets the inflection + * rules to the initial values. + * + * @return void + */ + public static function reset() + { + if (empty(self::$initialState)) { + self::$initialState = get_class_vars('Inflector'); + + return; + } + + foreach (self::$initialState as $key => $val) { + if ($key != 'initialState') { + self::${$key} = $val; + } + } + } + + /** + * Adds custom inflection $rules, of either 'plural' or 'singular' $type. + * + * ### Usage: + * + * {{{ + * Inflector::rules('plural', array('/^(inflect)or$/i' => '\1ables')); + * Inflector::rules('plural', array( + * 'rules' => array('/^(inflect)ors$/i' => '\1ables'), + * 'uninflected' => array('dontinflectme'), + * 'irregular' => array('red' => 'redlings') + * )); + * }}} + * + * @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. + * + * @return void + */ + public static function rules($type, $rules, $reset = false) + { + foreach ($rules as $rule => $pattern) { + if ( ! is_array($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(); + } + } + + self::${$type}['rules'] = $rules + self::${$type}['rules']; + } + + /** + * Returns a word in plural form. + * + * @param string $word The word in singular form. + * + * @return string The word in plural form. + */ + public static function pluralize($word) + { + if (isset(self::$cache['pluralize'][$word])) { + return self::$cache['pluralize'][$word]; + } + + 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]; + } + } + } + + /** + * Returns a word in singular form. + * + * @param string $word The word in plural form. + * + * @return string The word in singular form. + */ + public static function singularize($word) + { + if (isset(self::$cache['singularize'][$word])) { + return self::$cache['singularize'][$word]; + } + + 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; + } +} diff --git a/vendor/doctrine/inflector/phpunit.xml.dist b/vendor/doctrine/inflector/phpunit.xml.dist new file mode 100644 index 0000000..ef07faa --- /dev/null +++ b/vendor/doctrine/inflector/phpunit.xml.dist @@ -0,0 +1,31 @@ + + + + + + ./tests/Doctrine/ + + + + + + ./lib/Doctrine/ + + + + + + performance + + + diff --git a/vendor/doctrine/inflector/tests/Doctrine/Tests/Common/Inflector/InflectorTest.php b/vendor/doctrine/inflector/tests/Doctrine/Tests/Common/Inflector/InflectorTest.php new file mode 100644 index 0000000..4198d22 --- /dev/null +++ b/vendor/doctrine/inflector/tests/Doctrine/Tests/Common/Inflector/InflectorTest.php @@ -0,0 +1,309 @@ +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/vendor/doctrine/inflector/tests/Doctrine/Tests/DoctrineTestCase.php b/vendor/doctrine/inflector/tests/Doctrine/Tests/DoctrineTestCase.php new file mode 100644 index 0000000..e8323d2 --- /dev/null +++ b/vendor/doctrine/inflector/tests/Doctrine/Tests/DoctrineTestCase.php @@ -0,0 +1,10 @@ + 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/vendor/doctrine/instantiator/.travis.yml b/vendor/doctrine/instantiator/.travis.yml new file mode 100644 index 0000000..7f1ec5f --- /dev/null +++ b/vendor/doctrine/instantiator/.travis.yml @@ -0,0 +1,22 @@ +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/vendor/doctrine/instantiator/CONTRIBUTING.md b/vendor/doctrine/instantiator/CONTRIBUTING.md new file mode 100644 index 0000000..75b84b2 --- /dev/null +++ b/vendor/doctrine/instantiator/CONTRIBUTING.md @@ -0,0 +1,35 @@ +# 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) + * 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 + * Pull requests must be sent from a new hotfix/feature branch, not from `master`. + +## Installation + +To install the project and run the tests, you need to clone it first: + +```sh +$ git clone git://github.com/doctrine/instantiator.git +``` + +You will then need to run a composer installation: + +```sh +$ cd Instantiator +$ curl -s https://getcomposer.org/installer | php +$ php composer.phar update +``` + +## Testing + +The PHPUnit version to be used is the one installed as a dev- dependency via composer: + +```sh +$ ./vendor/bin/phpunit +``` + +Accepted coverage for new contributions is 80%. Any contribution not satisfying this requirement +won't be merged. + diff --git a/vendor/doctrine/instantiator/LICENSE b/vendor/doctrine/instantiator/LICENSE new file mode 100644 index 0000000..4d983d1 --- /dev/null +++ b/vendor/doctrine/instantiator/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2014 Doctrine Project + +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/vendor/doctrine/instantiator/README.md b/vendor/doctrine/instantiator/README.md new file mode 100644 index 0000000..393ec7c --- /dev/null +++ b/vendor/doctrine/instantiator/README.md @@ -0,0 +1,40 @@ +# Instantiator + +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) +[![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) + +## Installation + +The suggested installation method is via [composer](https://getcomposer.org/): + +```sh +php composer.phar require "doctrine/instantiator:~1.0.3" +``` + +## Usage + +The instantiator is able to create new instances of any class without using the constructor or any API of the class +itself: + +```php +$instantiator = new \Doctrine\Instantiator\Instantiator(); + +$instance = $instantiator->instantiate('My\\ClassName\\Here'); +``` + +## Contributing + +Please read the [CONTRIBUTING.md](CONTRIBUTING.md) contents if you wish to help out! + +## Credits + +This library was migrated from [ocramius/instantiator](https://github.com/Ocramius/Instantiator), which +has been donated to the doctrine organization, and which is now deprecated in favour of this package. diff --git a/vendor/doctrine/instantiator/composer.json b/vendor/doctrine/instantiator/composer.json new file mode 100644 index 0000000..4823890 --- /dev/null +++ b/vendor/doctrine/instantiator/composer.json @@ -0,0 +1,45 @@ +{ + "name": "doctrine/instantiator", + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "type": "library", + "license": "MIT", + "homepage": "https://github.com/doctrine/instantiator", + "keywords": [ + "instantiate", + "constructor" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "http://ocramius.github.com/" + } + ], + "require": { + "php": ">=5.3,<8.0-DEV" + }, + "require-dev": { + "ext-phar": "*", + "ext-pdo": "*", + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "~2.0", + "athletic/athletic": "~0.1.8" + }, + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "autoload-dev": { + "psr-0": { + "DoctrineTest\\InstantiatorPerformance\\": "tests", + "DoctrineTest\\InstantiatorTest\\": "tests", + "DoctrineTest\\InstantiatorTestAsset\\": "tests" + } + }, + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + } +} diff --git a/vendor/doctrine/instantiator/phpmd.xml.dist b/vendor/doctrine/instantiator/phpmd.xml.dist new file mode 100644 index 0000000..8254105 --- /dev/null +++ b/vendor/doctrine/instantiator/phpmd.xml.dist @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + diff --git a/vendor/doctrine/instantiator/phpunit.xml.dist b/vendor/doctrine/instantiator/phpunit.xml.dist new file mode 100644 index 0000000..0a8d570 --- /dev/null +++ b/vendor/doctrine/instantiator/phpunit.xml.dist @@ -0,0 +1,22 @@ + + + + ./tests/DoctrineTest/InstantiatorTest + + + + ./src + + + diff --git a/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/ExceptionInterface.php b/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/ExceptionInterface.php new file mode 100644 index 0000000..3065375 --- /dev/null +++ b/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/ExceptionInterface.php @@ -0,0 +1,29 @@ +. + */ + +namespace Doctrine\Instantiator\Exception; + +/** + * Base exception marker interface for the instantiator component + * + * @author Marco Pivetta + */ +interface ExceptionInterface +{ +} diff --git a/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/InvalidArgumentException.php b/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/InvalidArgumentException.php new file mode 100644 index 0000000..ea8d28c --- /dev/null +++ b/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/InvalidArgumentException.php @@ -0,0 +1,62 @@ +. + */ + +namespace Doctrine\Instantiator\Exception; + +use InvalidArgumentException as BaseInvalidArgumentException; +use ReflectionClass; + +/** + * 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) + { + if (interface_exists($className)) { + return new self(sprintf('The provided type "%s" is an interface, and can not 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)); + } + + return new self(sprintf('The provided class "%s" does not exist', $className)); + } + + /** + * @param ReflectionClass $reflectionClass + * + * @return self + */ + public static function fromAbstractClass(ReflectionClass $reflectionClass) + { + return new self(sprintf( + 'The provided class "%s" is abstract, and can not be instantiated', + $reflectionClass->getName() + )); + } +} diff --git a/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/UnexpectedValueException.php b/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/UnexpectedValueException.php new file mode 100644 index 0000000..1681e56 --- /dev/null +++ b/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/UnexpectedValueException.php @@ -0,0 +1,79 @@ +. + */ + +namespace Doctrine\Instantiator\Exception; + +use Exception; +use ReflectionClass; +use UnexpectedValueException as BaseUnexpectedValueException; + +/** + * 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 + * + * @return self + */ + public static function fromSerializationTriggeredException(ReflectionClass $reflectionClass, Exception $exception) + { + return new self( + sprintf( + 'An exception was raised while trying to instantiate an instance of "%s" via un-serialization', + $reflectionClass->getName() + ), + 0, + $exception + ); + } + + /** + * @param ReflectionClass $reflectionClass + * @param string $errorString + * @param int $errorCode + * @param string $errorFile + * @param int $errorLine + * + * @return UnexpectedValueException + */ + public static function fromUncleanUnSerialization( + ReflectionClass $reflectionClass, + $errorString, + $errorCode, + $errorFile, + $errorLine + ) { + return new self( + sprintf( + 'Could not produce an instance of "%s" via un-serialization, since an error was triggered ' + . 'in file "%s" at line "%d"', + $reflectionClass->getName(), + $errorFile, + $errorLine + ), + 0, + new Exception($errorString, $errorCode) + ); + } +} diff --git a/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Instantiator.php b/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Instantiator.php new file mode 100644 index 0000000..6d5b3b6 --- /dev/null +++ b/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Instantiator.php @@ -0,0 +1,273 @@ +. + */ + +namespace Doctrine\Instantiator; + +use Closure; +use Doctrine\Instantiator\Exception\InvalidArgumentException; +use Doctrine\Instantiator\Exception\UnexpectedValueException; +use Exception; +use ReflectionClass; + +/** + * {@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. + */ + const SERIALIZATION_FORMAT_USE_UNSERIALIZER = 'C'; + const SERIALIZATION_FORMAT_AVOID_UNSERIALIZER = 'O'; + + /** + * @var \Closure[] of {@see \Closure} instances used to instantiate specific classes + */ + private static $cachedInstantiators = array(); + + /** + * @var object[] of objects that can directly be cloned + */ + private static $cachedCloneables = array(); + + /** + * {@inheritDoc} + */ + public function instantiate($className) + { + if (isset(self::$cachedCloneables[$className])) { + return clone self::$cachedCloneables[$className]; + } + + if (isset(self::$cachedInstantiators[$className])) { + $factory = self::$cachedInstantiators[$className]; + + return $factory(); + } + + return $this->buildAndCacheFromFactory($className); + } + + /** + * Builds the requested object and caches it in static properties for performance + * + * @param string $className + * + * @return object + */ + private function buildAndCacheFromFactory($className) + { + $factory = self::$cachedInstantiators[$className] = $this->buildFactory($className); + $instance = $factory(); + + if ($this->isSafeToClone(new ReflectionClass($instance))) { + self::$cachedCloneables[$className] = clone $instance; + } + + return $instance; + } + + /** + * Builds a {@see \Closure} capable of instantiating the given $className without + * invoking its constructor. + * + * @param string $className + * + * @return Closure + */ + private function buildFactory($className) + { + $reflectionClass = $this->getReflectionClass($className); + + if ($this->isInstantiableViaReflection($reflectionClass)) { + return function () use ($reflectionClass) { + return $reflectionClass->newInstanceWithoutConstructor(); + }; + } + + $serializedString = sprintf( + '%s:%d:"%s":0:{}', + $this->getSerializationFormat($reflectionClass), + strlen($className), + $className + ); + + $this->checkIfUnSerializationIsSupported($reflectionClass, $serializedString); + + return function () use ($serializedString) { + return unserialize($serializedString); + }; + } + + /** + * @param string $className + * + * @return ReflectionClass + * + * @throws InvalidArgumentException + */ + private function getReflectionClass($className) + { + if (! class_exists($className)) { + throw InvalidArgumentException::fromNonExistingClass($className); + } + + $reflection = new ReflectionClass($className); + + if ($reflection->isAbstract()) { + throw InvalidArgumentException::fromAbstractClass($reflection); + } + + return $reflection; + } + + /** + * @param ReflectionClass $reflectionClass + * @param string $serializedString + * + * @throws UnexpectedValueException + * + * @return void + */ + private function checkIfUnSerializationIsSupported(ReflectionClass $reflectionClass, $serializedString) + { + set_error_handler(function ($code, $message, $file, $line) use ($reflectionClass, & $error) { + $error = UnexpectedValueException::fromUncleanUnSerialization( + $reflectionClass, + $message, + $code, + $file, + $line + ); + }); + + $this->attemptInstantiationViaUnSerialization($reflectionClass, $serializedString); + + restore_error_handler(); + + if ($error) { + throw $error; + } + } + + /** + * @param ReflectionClass $reflectionClass + * @param string $serializedString + * + * @throws UnexpectedValueException + * + * @return void + */ + private function attemptInstantiationViaUnSerialization(ReflectionClass $reflectionClass, $serializedString) + { + try { + unserialize($serializedString); + } catch (Exception $exception) { + restore_error_handler(); + + throw UnexpectedValueException::fromSerializationTriggeredException($reflectionClass, $exception); + } + } + + /** + * @param ReflectionClass $reflectionClass + * + * @return bool + */ + private function isInstantiableViaReflection(ReflectionClass $reflectionClass) + { + if (\PHP_VERSION_ID >= 50600) { + return ! ($this->hasInternalAncestors($reflectionClass) && $reflectionClass->isFinal()); + } + + return \PHP_VERSION_ID >= 50400 && ! $this->hasInternalAncestors($reflectionClass); + } + + /** + * Verifies whether the given class is to be considered internal + * + * @param ReflectionClass $reflectionClass + * + * @return bool + */ + private function hasInternalAncestors(ReflectionClass $reflectionClass) + { + do { + if ($reflectionClass->isInternal()) { + return true; + } + } while ($reflectionClass = $reflectionClass->getParentClass()); + + 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 + * + * @return bool + */ + private function isSafeToClone(ReflectionClass $reflection) + { + 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'); + } +} diff --git a/vendor/doctrine/instantiator/src/Doctrine/Instantiator/InstantiatorInterface.php b/vendor/doctrine/instantiator/src/Doctrine/Instantiator/InstantiatorInterface.php new file mode 100644 index 0000000..b665bea --- /dev/null +++ b/vendor/doctrine/instantiator/src/Doctrine/Instantiator/InstantiatorInterface.php @@ -0,0 +1,37 @@ +. + */ + +namespace Doctrine\Instantiator; + +/** + * Instantiator provides utility methods to build objects without invoking their constructors + * + * @author Marco Pivetta + */ +interface InstantiatorInterface +{ + /** + * @param string $className + * + * @return object + * + * @throws \Doctrine\Instantiator\Exception\ExceptionInterface + */ + public function instantiate($className); +} diff --git a/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorPerformance/InstantiatorPerformanceEvent.php b/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorPerformance/InstantiatorPerformanceEvent.php new file mode 100644 index 0000000..3e8fc6f --- /dev/null +++ b/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorPerformance/InstantiatorPerformanceEvent.php @@ -0,0 +1,96 @@ +. + */ + +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/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTest/Exception/InvalidArgumentExceptionTest.php b/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTest/Exception/InvalidArgumentExceptionTest.php new file mode 100644 index 0000000..39d9b94 --- /dev/null +++ b/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTest/Exception/InvalidArgumentExceptionTest.php @@ -0,0 +1,83 @@ +. + */ + +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/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTest/Exception/UnexpectedValueExceptionTest.php b/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTest/Exception/UnexpectedValueExceptionTest.php new file mode 100644 index 0000000..84154e7 --- /dev/null +++ b/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTest/Exception/UnexpectedValueExceptionTest.php @@ -0,0 +1,69 @@ +. + */ + +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/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTest/InstantiatorTest.php b/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTest/InstantiatorTest.php new file mode 100644 index 0000000..0a2cb93 --- /dev/null +++ b/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTest/InstantiatorTest.php @@ -0,0 +1,219 @@ +. + */ + +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/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/AbstractClassAsset.php b/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/AbstractClassAsset.php new file mode 100644 index 0000000..fbe28dd --- /dev/null +++ b/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/AbstractClassAsset.php @@ -0,0 +1,29 @@ +. + */ + +namespace DoctrineTest\InstantiatorTestAsset; + +/** + * A simple asset for an abstract class + * + * @author Marco Pivetta + */ +abstract class AbstractClassAsset +{ +} diff --git a/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/ArrayObjectAsset.php b/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/ArrayObjectAsset.php new file mode 100644 index 0000000..56146d7 --- /dev/null +++ b/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/ArrayObjectAsset.php @@ -0,0 +1,41 @@ +. + */ + +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/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/ExceptionAsset.php b/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/ExceptionAsset.php new file mode 100644 index 0000000..43bbe46 --- /dev/null +++ b/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/ExceptionAsset.php @@ -0,0 +1,41 @@ +. + */ + +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/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/FinalExceptionAsset.php b/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/FinalExceptionAsset.php new file mode 100644 index 0000000..7d268f5 --- /dev/null +++ b/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/FinalExceptionAsset.php @@ -0,0 +1,41 @@ +. + */ + +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/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/PharAsset.php b/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/PharAsset.php new file mode 100644 index 0000000..553fd56 --- /dev/null +++ b/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/PharAsset.php @@ -0,0 +1,41 @@ +. + */ + +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/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/PharExceptionAsset.php b/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/PharExceptionAsset.php new file mode 100644 index 0000000..42bf73e --- /dev/null +++ b/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/PharExceptionAsset.php @@ -0,0 +1,44 @@ +. + */ + +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/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/SerializableArrayObjectAsset.php b/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/SerializableArrayObjectAsset.php new file mode 100644 index 0000000..ba19aaf --- /dev/null +++ b/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/SerializableArrayObjectAsset.php @@ -0,0 +1,62 @@ +. + */ + +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/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/SimpleSerializableAsset.php b/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/SimpleSerializableAsset.php new file mode 100644 index 0000000..39f84a6 --- /dev/null +++ b/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/SimpleSerializableAsset.php @@ -0,0 +1,61 @@ +. + */ + +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/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/SimpleTraitAsset.php b/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/SimpleTraitAsset.php new file mode 100644 index 0000000..04e7806 --- /dev/null +++ b/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/SimpleTraitAsset.php @@ -0,0 +1,29 @@ +. + */ + +namespace DoctrineTest\InstantiatorTestAsset; + +/** + * A simple trait with no attached logic + * + * @author Marco Pivetta + */ +trait SimpleTraitAsset +{ +} diff --git a/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/UnCloneableAsset.php b/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/UnCloneableAsset.php new file mode 100644 index 0000000..7d03bda --- /dev/null +++ b/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/UnCloneableAsset.php @@ -0,0 +1,50 @@ +. + */ + +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/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/UnserializeExceptionArrayObjectAsset.php b/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/UnserializeExceptionArrayObjectAsset.php new file mode 100644 index 0000000..b348a40 --- /dev/null +++ b/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/UnserializeExceptionArrayObjectAsset.php @@ -0,0 +1,39 @@ +. + */ + +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/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/WakeUpNoticesAsset.php b/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/WakeUpNoticesAsset.php new file mode 100644 index 0000000..18dc671 --- /dev/null +++ b/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/WakeUpNoticesAsset.php @@ -0,0 +1,38 @@ +. + */ + +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/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/XMLReaderAsset.php b/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/XMLReaderAsset.php new file mode 100644 index 0000000..39ee699 --- /dev/null +++ b/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/XMLReaderAsset.php @@ -0,0 +1,41 @@ +. + */ + +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/vendor/erusev/parsedown/.travis.yml b/vendor/erusev/parsedown/.travis.yml new file mode 100644 index 0000000..fa5ca98 --- /dev/null +++ b/vendor/erusev/parsedown/.travis.yml @@ -0,0 +1,16 @@ +language: php + +php: + - 7.1 + - 7.0 + - 5.6 + - 5.5 + - 5.4 + - 5.3 + - hhvm + - hhvm-nightly + +matrix: + fast_finish: true + allow_failures: + - php: hhvm-nightly diff --git a/vendor/erusev/parsedown/LICENSE.txt b/vendor/erusev/parsedown/LICENSE.txt new file mode 100644 index 0000000..baca86f --- /dev/null +++ b/vendor/erusev/parsedown/LICENSE.txt @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2013 Emanuil Rusev, erusev.com + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/vendor/erusev/parsedown/Parsedown.php b/vendor/erusev/parsedown/Parsedown.php new file mode 100644 index 0000000..f5dd0fa --- /dev/null +++ b/vendor/erusev/parsedown/Parsedown.php @@ -0,0 +1,1548 @@ +DefinitionData = array(); + + # standardize line breaks + $text = str_replace(array("\r\n", "\r"), "\n", $text); + + # remove surrounding line breaks + $text = trim($text, "\n"); + + # split text into lines + $lines = explode("\n", $text); + + # iterate through lines to identify blocks + $markup = $this->lines($lines); + + # trim line breaks + $markup = trim($markup, "\n"); + + return $markup; + } + + # + # Setters + # + + function setBreaksEnabled($breaksEnabled) + { + $this->breaksEnabled = $breaksEnabled; + + return $this; + } + + protected $breaksEnabled; + + function setMarkupEscaped($markupEscaped) + { + $this->markupEscaped = $markupEscaped; + + return $this; + } + + protected $markupEscaped; + + function setUrlsLinked($urlsLinked) + { + $this->urlsLinked = $urlsLinked; + + return $this; + } + + protected $urlsLinked = true; + + # + # Lines + # + + protected $BlockTypes = array( + '#' => array('Header'), + '*' => array('Rule', 'List'), + '+' => array('List'), + '-' => array('SetextHeader', 'Table', 'Rule', 'List'), + '0' => array('List'), + '1' => array('List'), + '2' => array('List'), + '3' => array('List'), + '4' => array('List'), + '5' => array('List'), + '6' => array('List'), + '7' => array('List'), + '8' => array('List'), + '9' => array('List'), + ':' => array('Table'), + '<' => array('Comment', 'Markup'), + '=' => array('SetextHeader'), + '>' => array('Quote'), + '[' => array('Reference'), + '_' => array('Rule'), + '`' => array('FencedCode'), + '|' => array('Table'), + '~' => array('FencedCode'), + ); + + # ~ + + protected $unmarkedBlockTypes = array( + 'Code', + ); + + # + # Blocks + # + + protected function lines(array $lines) + { + $CurrentBlock = null; + + foreach ($lines as $line) + { + if (chop($line) === '') + { + if (isset($CurrentBlock)) + { + $CurrentBlock['interrupted'] = true; + } + + continue; + } + + if (strpos($line, "\t") !== false) + { + $parts = explode("\t", $line); + + $line = $parts[0]; + + unset($parts[0]); + + foreach ($parts as $part) + { + $shortage = 4 - mb_strlen($line, 'utf-8') % 4; + + $line .= str_repeat(' ', $shortage); + $line .= $part; + } + } + + $indent = 0; + + while (isset($line[$indent]) and $line[$indent] === ' ') + { + $indent ++; + } + + $text = $indent > 0 ? substr($line, $indent) : $line; + + # ~ + + $Line = array('body' => $line, 'indent' => $indent, 'text' => $text); + + # ~ + + if (isset($CurrentBlock['continuable'])) + { + $Block = $this->{'block'.$CurrentBlock['type'].'Continue'}($Line, $CurrentBlock); + + if (isset($Block)) + { + $CurrentBlock = $Block; + + continue; + } + else + { + if ($this->isBlockCompletable($CurrentBlock['type'])) + { + $CurrentBlock = $this->{'block'.$CurrentBlock['type'].'Complete'}($CurrentBlock); + } + } + } + + # ~ + + $marker = $text[0]; + + # ~ + + $blockTypes = $this->unmarkedBlockTypes; + + if (isset($this->BlockTypes[$marker])) + { + foreach ($this->BlockTypes[$marker] as $blockType) + { + $blockTypes []= $blockType; + } + } + + # + # ~ + + foreach ($blockTypes as $blockType) + { + $Block = $this->{'block'.$blockType}($Line, $CurrentBlock); + + if (isset($Block)) + { + $Block['type'] = $blockType; + + if ( ! isset($Block['identified'])) + { + $Blocks []= $CurrentBlock; + + $Block['identified'] = true; + } + + if ($this->isBlockContinuable($blockType)) + { + $Block['continuable'] = true; + } + + $CurrentBlock = $Block; + + continue 2; + } + } + + # ~ + + if (isset($CurrentBlock) and ! isset($CurrentBlock['type']) and ! isset($CurrentBlock['interrupted'])) + { + $CurrentBlock['element']['text'] .= "\n".$text; + } + else + { + $Blocks []= $CurrentBlock; + + $CurrentBlock = $this->paragraph($Line); + + $CurrentBlock['identified'] = true; + } + } + + # ~ + + if (isset($CurrentBlock['continuable']) and $this->isBlockCompletable($CurrentBlock['type'])) + { + $CurrentBlock = $this->{'block'.$CurrentBlock['type'].'Complete'}($CurrentBlock); + } + + # ~ + + $Blocks []= $CurrentBlock; + + unset($Blocks[0]); + + # ~ + + $markup = ''; + + foreach ($Blocks as $Block) + { + if (isset($Block['hidden'])) + { + continue; + } + + $markup .= "\n"; + $markup .= isset($Block['markup']) ? $Block['markup'] : $this->element($Block['element']); + } + + $markup .= "\n"; + + # ~ + + return $markup; + } + + protected function isBlockContinuable($Type) + { + return method_exists($this, 'block'.$Type.'Continue'); + } + + protected function isBlockCompletable($Type) + { + return method_exists($this, 'block'.$Type.'Complete'); + } + + # + # Code + + protected function blockCode($Line, $Block = null) + { + if (isset($Block) and ! isset($Block['type']) and ! isset($Block['interrupted'])) + { + return; + } + + if ($Line['indent'] >= 4) + { + $text = substr($Line['body'], 4); + + $Block = array( + 'element' => array( + 'name' => 'pre', + 'handler' => 'element', + 'text' => array( + 'name' => 'code', + 'text' => $text, + ), + ), + ); + + return $Block; + } + } + + protected function blockCodeContinue($Line, $Block) + { + if ($Line['indent'] >= 4) + { + if (isset($Block['interrupted'])) + { + $Block['element']['text']['text'] .= "\n"; + + unset($Block['interrupted']); + } + + $Block['element']['text']['text'] .= "\n"; + + $text = substr($Line['body'], 4); + + $Block['element']['text']['text'] .= $text; + + return $Block; + } + } + + protected function blockCodeComplete($Block) + { + $text = $Block['element']['text']['text']; + + $text = htmlspecialchars($text, ENT_NOQUOTES, 'UTF-8'); + + $Block['element']['text']['text'] = $text; + + return $Block; + } + + # + # Comment + + protected function blockComment($Line) + { + if ($this->markupEscaped) + { + return; + } + + if (isset($Line['text'][3]) and $Line['text'][3] === '-' and $Line['text'][2] === '-' and $Line['text'][1] === '!') + { + $Block = array( + 'markup' => $Line['body'], + ); + + if (preg_match('/-->$/', $Line['text'])) + { + $Block['closed'] = true; + } + + return $Block; + } + } + + protected function blockCommentContinue($Line, array $Block) + { + if (isset($Block['closed'])) + { + return; + } + + $Block['markup'] .= "\n" . $Line['body']; + + if (preg_match('/-->$/', $Line['text'])) + { + $Block['closed'] = true; + } + + return $Block; + } + + # + # Fenced Code + + protected function blockFencedCode($Line) + { + if (preg_match('/^['.$Line['text'][0].']{3,}[ ]*([\w-]+)?[ ]*$/', $Line['text'], $matches)) + { + $Element = array( + 'name' => 'code', + 'text' => '', + ); + + if (isset($matches[1])) + { + $class = 'language-'.$matches[1]; + + $Element['attributes'] = array( + 'class' => $class, + ); + } + + $Block = array( + 'char' => $Line['text'][0], + 'element' => array( + 'name' => 'pre', + 'handler' => 'element', + 'text' => $Element, + ), + ); + + return $Block; + } + } + + protected function blockFencedCodeContinue($Line, $Block) + { + if (isset($Block['complete'])) + { + return; + } + + if (isset($Block['interrupted'])) + { + $Block['element']['text']['text'] .= "\n"; + + unset($Block['interrupted']); + } + + if (preg_match('/^'.$Block['char'].'{3,}[ ]*$/', $Line['text'])) + { + $Block['element']['text']['text'] = substr($Block['element']['text']['text'], 1); + + $Block['complete'] = true; + + return $Block; + } + + $Block['element']['text']['text'] .= "\n".$Line['body']; + + return $Block; + } + + protected function blockFencedCodeComplete($Block) + { + $text = $Block['element']['text']['text']; + + $text = htmlspecialchars($text, ENT_NOQUOTES, 'UTF-8'); + + $Block['element']['text']['text'] = $text; + + return $Block; + } + + # + # Header + + protected function blockHeader($Line) + { + if (isset($Line['text'][1])) + { + $level = 1; + + while (isset($Line['text'][$level]) and $Line['text'][$level] === '#') + { + $level ++; + } + + if ($level > 6) + { + return; + } + + $text = trim($Line['text'], '# '); + + $Block = array( + 'element' => array( + 'name' => 'h' . min(6, $level), + 'text' => $text, + 'handler' => 'line', + ), + ); + + return $Block; + } + } + + # + # List + + protected function blockList($Line) + { + list($name, $pattern) = $Line['text'][0] <= '-' ? array('ul', '[*+-]') : array('ol', '[0-9]+[.]'); + + if (preg_match('/^('.$pattern.'[ ]+)(.*)/', $Line['text'], $matches)) + { + $Block = array( + 'indent' => $Line['indent'], + 'pattern' => $pattern, + 'element' => array( + 'name' => $name, + 'handler' => 'elements', + ), + ); + + if($name === 'ol') + { + $listStart = stristr($matches[0], '.', true); + + if($listStart !== '1') + { + $Block['element']['attributes'] = array('start' => $listStart); + } + } + + $Block['li'] = array( + 'name' => 'li', + 'handler' => 'li', + 'text' => array( + $matches[2], + ), + ); + + $Block['element']['text'] []= & $Block['li']; + + return $Block; + } + } + + protected function blockListContinue($Line, array $Block) + { + if ($Block['indent'] === $Line['indent'] and preg_match('/^'.$Block['pattern'].'(?:[ ]+(.*)|$)/', $Line['text'], $matches)) + { + if (isset($Block['interrupted'])) + { + $Block['li']['text'] []= ''; + + unset($Block['interrupted']); + } + + unset($Block['li']); + + $text = isset($matches[1]) ? $matches[1] : ''; + + $Block['li'] = array( + 'name' => 'li', + 'handler' => 'li', + 'text' => array( + $text, + ), + ); + + $Block['element']['text'] []= & $Block['li']; + + return $Block; + } + + if ($Line['text'][0] === '[' and $this->blockReference($Line)) + { + return $Block; + } + + if ( ! isset($Block['interrupted'])) + { + $text = preg_replace('/^[ ]{0,4}/', '', $Line['body']); + + $Block['li']['text'] []= $text; + + return $Block; + } + + if ($Line['indent'] > 0) + { + $Block['li']['text'] []= ''; + + $text = preg_replace('/^[ ]{0,4}/', '', $Line['body']); + + $Block['li']['text'] []= $text; + + unset($Block['interrupted']); + + return $Block; + } + } + + # + # Quote + + protected function blockQuote($Line) + { + if (preg_match('/^>[ ]?(.*)/', $Line['text'], $matches)) + { + $Block = array( + 'element' => array( + 'name' => 'blockquote', + 'handler' => 'lines', + 'text' => (array) $matches[1], + ), + ); + + return $Block; + } + } + + protected function blockQuoteContinue($Line, array $Block) + { + if ($Line['text'][0] === '>' and preg_match('/^>[ ]?(.*)/', $Line['text'], $matches)) + { + if (isset($Block['interrupted'])) + { + $Block['element']['text'] []= ''; + + unset($Block['interrupted']); + } + + $Block['element']['text'] []= $matches[1]; + + return $Block; + } + + if ( ! isset($Block['interrupted'])) + { + $Block['element']['text'] []= $Line['text']; + + return $Block; + } + } + + # + # Rule + + protected function blockRule($Line) + { + if (preg_match('/^(['.$Line['text'][0].'])([ ]*\1){2,}[ ]*$/', $Line['text'])) + { + $Block = array( + 'element' => array( + 'name' => 'hr' + ), + ); + + return $Block; + } + } + + # + # Setext + + protected function blockSetextHeader($Line, array $Block = null) + { + if ( ! isset($Block) or isset($Block['type']) or isset($Block['interrupted'])) + { + return; + } + + if (chop($Line['text'], $Line['text'][0]) === '') + { + $Block['element']['name'] = $Line['text'][0] === '=' ? 'h1' : 'h2'; + + return $Block; + } + } + + # + # Markup + + protected function blockMarkup($Line) + { + if ($this->markupEscaped) + { + return; + } + + if (preg_match('/^<(\w*)(?:[ ]*'.$this->regexHtmlAttribute.')*[ ]*(\/)?>/', $Line['text'], $matches)) + { + $element = strtolower($matches[1]); + + if (in_array($element, $this->textLevelElements)) + { + return; + } + + $Block = array( + 'name' => $matches[1], + 'depth' => 0, + 'markup' => $Line['text'], + ); + + $length = strlen($matches[0]); + + $remainder = substr($Line['text'], $length); + + if (trim($remainder) === '') + { + if (isset($matches[2]) or in_array($matches[1], $this->voidElements)) + { + $Block['closed'] = true; + + $Block['void'] = true; + } + } + else + { + if (isset($matches[2]) or in_array($matches[1], $this->voidElements)) + { + return; + } + + if (preg_match('/<\/'.$matches[1].'>[ ]*$/i', $remainder)) + { + $Block['closed'] = true; + } + } + + return $Block; + } + } + + protected function blockMarkupContinue($Line, array $Block) + { + if (isset($Block['closed'])) + { + return; + } + + if (preg_match('/^<'.$Block['name'].'(?:[ ]*'.$this->regexHtmlAttribute.')*[ ]*>/i', $Line['text'])) # open + { + $Block['depth'] ++; + } + + if (preg_match('/(.*?)<\/'.$Block['name'].'>[ ]*$/i', $Line['text'], $matches)) # close + { + if ($Block['depth'] > 0) + { + $Block['depth'] --; + } + else + { + $Block['closed'] = true; + } + } + + if (isset($Block['interrupted'])) + { + $Block['markup'] .= "\n"; + + unset($Block['interrupted']); + } + + $Block['markup'] .= "\n".$Line['body']; + + return $Block; + } + + # + # Reference + + protected function blockReference($Line) + { + if (preg_match('/^\[(.+?)\]:[ ]*?(?:[ ]+["\'(](.+)["\')])?[ ]*$/', $Line['text'], $matches)) + { + $id = strtolower($matches[1]); + + $Data = array( + 'url' => $matches[2], + 'title' => null, + ); + + if (isset($matches[3])) + { + $Data['title'] = $matches[3]; + } + + $this->DefinitionData['Reference'][$id] = $Data; + + $Block = array( + 'hidden' => true, + ); + + return $Block; + } + } + + # + # Table + + protected function blockTable($Line, array $Block = null) + { + if ( ! isset($Block) or isset($Block['type']) or isset($Block['interrupted'])) + { + return; + } + + if (strpos($Block['element']['text'], '|') !== false and chop($Line['text'], ' -:|') === '') + { + $alignments = array(); + + $divider = $Line['text']; + + $divider = trim($divider); + $divider = trim($divider, '|'); + + $dividerCells = explode('|', $divider); + + foreach ($dividerCells as $dividerCell) + { + $dividerCell = trim($dividerCell); + + if ($dividerCell === '') + { + continue; + } + + $alignment = null; + + if ($dividerCell[0] === ':') + { + $alignment = 'left'; + } + + if (substr($dividerCell, - 1) === ':') + { + $alignment = $alignment === 'left' ? 'center' : 'right'; + } + + $alignments []= $alignment; + } + + # ~ + + $HeaderElements = array(); + + $header = $Block['element']['text']; + + $header = trim($header); + $header = trim($header, '|'); + + $headerCells = explode('|', $header); + + foreach ($headerCells as $index => $headerCell) + { + $headerCell = trim($headerCell); + + $HeaderElement = array( + 'name' => 'th', + 'text' => $headerCell, + 'handler' => 'line', + ); + + if (isset($alignments[$index])) + { + $alignment = $alignments[$index]; + + $HeaderElement['attributes'] = array( + 'style' => 'text-align: '.$alignment.';', + ); + } + + $HeaderElements []= $HeaderElement; + } + + # ~ + + $Block = array( + 'alignments' => $alignments, + 'identified' => true, + 'element' => array( + 'name' => 'table', + 'handler' => 'elements', + ), + ); + + $Block['element']['text'] []= array( + 'name' => 'thead', + 'handler' => 'elements', + ); + + $Block['element']['text'] []= array( + 'name' => 'tbody', + 'handler' => 'elements', + 'text' => array(), + ); + + $Block['element']['text'][0]['text'] []= array( + 'name' => 'tr', + 'handler' => 'elements', + 'text' => $HeaderElements, + ); + + return $Block; + } + } + + protected function blockTableContinue($Line, array $Block) + { + if (isset($Block['interrupted'])) + { + return; + } + + if ($Line['text'][0] === '|' or strpos($Line['text'], '|')) + { + $Elements = array(); + + $row = $Line['text']; + + $row = trim($row); + $row = trim($row, '|'); + + preg_match_all('/(?:(\\\\[|])|[^|`]|`[^`]+`|`)+/', $row, $matches); + + foreach ($matches[0] as $index => $cell) + { + $cell = trim($cell); + + $Element = array( + 'name' => 'td', + 'handler' => 'line', + 'text' => $cell, + ); + + if (isset($Block['alignments'][$index])) + { + $Element['attributes'] = array( + 'style' => 'text-align: '.$Block['alignments'][$index].';', + ); + } + + $Elements []= $Element; + } + + $Element = array( + 'name' => 'tr', + 'handler' => 'elements', + 'text' => $Elements, + ); + + $Block['element']['text'][1]['text'] []= $Element; + + return $Block; + } + } + + # + # ~ + # + + protected function paragraph($Line) + { + $Block = array( + 'element' => array( + 'name' => 'p', + 'text' => $Line['text'], + 'handler' => 'line', + ), + ); + + return $Block; + } + + # + # Inline Elements + # + + protected $InlineTypes = array( + '"' => array('SpecialCharacter'), + '!' => array('Image'), + '&' => array('SpecialCharacter'), + '*' => array('Emphasis'), + ':' => array('Url'), + '<' => array('UrlTag', 'EmailTag', 'Markup', 'SpecialCharacter'), + '>' => array('SpecialCharacter'), + '[' => array('Link'), + '_' => array('Emphasis'), + '`' => array('Code'), + '~' => array('Strikethrough'), + '\\' => array('EscapeSequence'), + ); + + # ~ + + protected $inlineMarkerList = '!"*_&[:<>`~\\'; + + # + # ~ + # + + public function line($text) + { + $markup = ''; + + # $excerpt is based on the first occurrence of a marker + + while ($excerpt = strpbrk($text, $this->inlineMarkerList)) + { + $marker = $excerpt[0]; + + $markerPosition = strpos($text, $marker); + + $Excerpt = array('text' => $excerpt, 'context' => $text); + + foreach ($this->InlineTypes[$marker] as $inlineType) + { + $Inline = $this->{'inline'.$inlineType}($Excerpt); + + if ( ! isset($Inline)) + { + continue; + } + + # makes sure that the inline belongs to "our" marker + + if (isset($Inline['position']) and $Inline['position'] > $markerPosition) + { + continue; + } + + # sets a default inline position + + if ( ! isset($Inline['position'])) + { + $Inline['position'] = $markerPosition; + } + + # the text that comes before the inline + $unmarkedText = substr($text, 0, $Inline['position']); + + # compile the unmarked text + $markup .= $this->unmarkedText($unmarkedText); + + # compile the inline + $markup .= isset($Inline['markup']) ? $Inline['markup'] : $this->element($Inline['element']); + + # remove the examined text + $text = substr($text, $Inline['position'] + $Inline['extent']); + + continue 2; + } + + # the marker does not belong to an inline + + $unmarkedText = substr($text, 0, $markerPosition + 1); + + $markup .= $this->unmarkedText($unmarkedText); + + $text = substr($text, $markerPosition + 1); + } + + $markup .= $this->unmarkedText($text); + + return $markup; + } + + # + # ~ + # + + protected function inlineCode($Excerpt) + { + $marker = $Excerpt['text'][0]; + + if (preg_match('/^('.$marker.'+)[ ]*(.+?)[ ]*(? strlen($matches[0]), + 'element' => array( + 'name' => 'code', + 'text' => $text, + ), + ); + } + } + + protected function inlineEmailTag($Excerpt) + { + if (strpos($Excerpt['text'], '>') !== false and preg_match('/^<((mailto:)?\S+?@\S+?)>/i', $Excerpt['text'], $matches)) + { + $url = $matches[1]; + + if ( ! isset($matches[2])) + { + $url = 'mailto:' . $url; + } + + return array( + 'extent' => strlen($matches[0]), + 'element' => array( + 'name' => 'a', + 'text' => $matches[1], + 'attributes' => array( + 'href' => $url, + ), + ), + ); + } + } + + protected function inlineEmphasis($Excerpt) + { + if ( ! isset($Excerpt['text'][1])) + { + return; + } + + $marker = $Excerpt['text'][0]; + + if ($Excerpt['text'][1] === $marker and preg_match($this->StrongRegex[$marker], $Excerpt['text'], $matches)) + { + $emphasis = 'strong'; + } + elseif (preg_match($this->EmRegex[$marker], $Excerpt['text'], $matches)) + { + $emphasis = 'em'; + } + else + { + return; + } + + return array( + 'extent' => strlen($matches[0]), + 'element' => array( + 'name' => $emphasis, + 'handler' => 'line', + 'text' => $matches[1], + ), + ); + } + + protected function inlineEscapeSequence($Excerpt) + { + if (isset($Excerpt['text'][1]) and in_array($Excerpt['text'][1], $this->specialCharacters)) + { + return array( + 'markup' => $Excerpt['text'][1], + 'extent' => 2, + ); + } + } + + protected function inlineImage($Excerpt) + { + if ( ! isset($Excerpt['text'][1]) or $Excerpt['text'][1] !== '[') + { + return; + } + + $Excerpt['text']= substr($Excerpt['text'], 1); + + $Link = $this->inlineLink($Excerpt); + + if ($Link === null) + { + return; + } + + $Inline = array( + 'extent' => $Link['extent'] + 1, + 'element' => array( + 'name' => 'img', + 'attributes' => array( + 'src' => $Link['element']['attributes']['href'], + 'alt' => $Link['element']['text'], + ), + ), + ); + + $Inline['element']['attributes'] += $Link['element']['attributes']; + + unset($Inline['element']['attributes']['href']); + + return $Inline; + } + + protected function inlineLink($Excerpt) + { + $Element = array( + 'name' => 'a', + 'handler' => 'line', + 'text' => null, + 'attributes' => array( + 'href' => null, + 'title' => null, + ), + ); + + $extent = 0; + + $remainder = $Excerpt['text']; + + if (preg_match('/\[((?:[^][]++|(?R))*+)\]/', $remainder, $matches)) + { + $Element['text'] = $matches[1]; + + $extent += strlen($matches[0]); + + $remainder = substr($remainder, $extent); + } + else + { + return; + } + + if (preg_match('/^[(]\s*+((?:[^ ()]++|[(][^ )]+[)])++)(?:[ ]+("[^"]*"|\'[^\']*\'))?\s*[)]/', $remainder, $matches)) + { + $Element['attributes']['href'] = $matches[1]; + + if (isset($matches[2])) + { + $Element['attributes']['title'] = substr($matches[2], 1, - 1); + } + + $extent += strlen($matches[0]); + } + else + { + if (preg_match('/^\s*\[(.*?)\]/', $remainder, $matches)) + { + $definition = strlen($matches[1]) ? $matches[1] : $Element['text']; + $definition = strtolower($definition); + + $extent += strlen($matches[0]); + } + else + { + $definition = strtolower($Element['text']); + } + + if ( ! isset($this->DefinitionData['Reference'][$definition])) + { + return; + } + + $Definition = $this->DefinitionData['Reference'][$definition]; + + $Element['attributes']['href'] = $Definition['url']; + $Element['attributes']['title'] = $Definition['title']; + } + + $Element['attributes']['href'] = str_replace(array('&', '<'), array('&', '<'), $Element['attributes']['href']); + + return array( + 'extent' => $extent, + 'element' => $Element, + ); + } + + protected function inlineMarkup($Excerpt) + { + if ($this->markupEscaped or strpos($Excerpt['text'], '>') === false) + { + return; + } + + if ($Excerpt['text'][1] === '/' and preg_match('/^<\/\w*[ ]*>/s', $Excerpt['text'], $matches)) + { + return array( + 'markup' => $matches[0], + 'extent' => strlen($matches[0]), + ); + } + + if ($Excerpt['text'][1] === '!' and preg_match('/^/s', $Excerpt['text'], $matches)) + { + return array( + 'markup' => $matches[0], + 'extent' => strlen($matches[0]), + ); + } + + if ($Excerpt['text'][1] !== ' ' and preg_match('/^<\w*(?:[ ]*'.$this->regexHtmlAttribute.')*[ ]*\/?>/s', $Excerpt['text'], $matches)) + { + return array( + 'markup' => $matches[0], + 'extent' => strlen($matches[0]), + ); + } + } + + protected function inlineSpecialCharacter($Excerpt) + { + if ($Excerpt['text'][0] === '&' and ! preg_match('/^&#?\w+;/', $Excerpt['text'])) + { + return array( + 'markup' => '&', + 'extent' => 1, + ); + } + + $SpecialCharacter = array('>' => 'gt', '<' => 'lt', '"' => 'quot'); + + if (isset($SpecialCharacter[$Excerpt['text'][0]])) + { + return array( + 'markup' => '&'.$SpecialCharacter[$Excerpt['text'][0]].';', + 'extent' => 1, + ); + } + } + + protected function inlineStrikethrough($Excerpt) + { + if ( ! isset($Excerpt['text'][1])) + { + return; + } + + if ($Excerpt['text'][1] === '~' and preg_match('/^~~(?=\S)(.+?)(?<=\S)~~/', $Excerpt['text'], $matches)) + { + return array( + 'extent' => strlen($matches[0]), + 'element' => array( + 'name' => 'del', + 'text' => $matches[1], + 'handler' => 'line', + ), + ); + } + } + + protected function inlineUrl($Excerpt) + { + if ($this->urlsLinked !== true or ! isset($Excerpt['text'][2]) or $Excerpt['text'][2] !== '/') + { + return; + } + + if (preg_match('/\bhttps?:[\/]{2}[^\s<]+\b\/*/ui', $Excerpt['context'], $matches, PREG_OFFSET_CAPTURE)) + { + $Inline = array( + 'extent' => strlen($matches[0][0]), + 'position' => $matches[0][1], + 'element' => array( + 'name' => 'a', + 'text' => $matches[0][0], + 'attributes' => array( + 'href' => $matches[0][0], + ), + ), + ); + + return $Inline; + } + } + + protected function inlineUrlTag($Excerpt) + { + if (strpos($Excerpt['text'], '>') !== false and preg_match('/^<(\w+:\/{2}[^ >]+)>/i', $Excerpt['text'], $matches)) + { + $url = str_replace(array('&', '<'), array('&', '<'), $matches[1]); + + return array( + 'extent' => strlen($matches[0]), + 'element' => array( + 'name' => 'a', + 'text' => $url, + 'attributes' => array( + 'href' => $url, + ), + ), + ); + } + } + + # ~ + + protected function unmarkedText($text) + { + if ($this->breaksEnabled) + { + $text = preg_replace('/[ ]*\n/', "
\n", $text); + } + else + { + $text = preg_replace('/(?:[ ][ ]+|[ ]*\\\\)\n/', "
\n", $text); + $text = str_replace(" \n", "\n", $text); + } + + return $text; + } + + # + # Handlers + # + + protected function element(array $Element) + { + $markup = '<'.$Element['name']; + + if (isset($Element['attributes'])) + { + foreach ($Element['attributes'] as $name => $value) + { + if ($value === null) + { + continue; + } + + $markup .= ' '.$name.'="'.$value.'"'; + } + } + + if (isset($Element['text'])) + { + $markup .= '>'; + + if (isset($Element['handler'])) + { + $markup .= $this->{$Element['handler']}($Element['text']); + } + else + { + $markup .= $Element['text']; + } + + $markup .= ''; + } + else + { + $markup .= ' />'; + } + + return $markup; + } + + protected function elements(array $Elements) + { + $markup = ''; + + foreach ($Elements as $Element) + { + $markup .= "\n" . $this->element($Element); + } + + $markup .= "\n"; + + return $markup; + } + + # ~ + + protected function li($lines) + { + $markup = $this->lines($lines); + + $trimmedMarkup = trim($markup); + + if ( ! in_array('', $lines) and substr($trimmedMarkup, 0, 3) === '

') + { + $markup = $trimmedMarkup; + $markup = substr($markup, 3); + + $position = strpos($markup, "

"); + + $markup = substr_replace($markup, '', $position, 4); + } + + return $markup; + } + + # + # Deprecated Methods + # + + function parse($text) + { + $markup = $this->text($text); + + return $markup; + } + + # + # Static Methods + # + + static function instance($name = 'default') + { + if (isset(self::$instances[$name])) + { + return self::$instances[$name]; + } + + $instance = new static(); + + self::$instances[$name] = $instance; + + return $instance; + } + + private static $instances = array(); + + # + # Fields + # + + protected $DefinitionData; + + # + # Read-Only + + protected $specialCharacters = array( + '\\', '`', '*', '_', '{', '}', '[', ']', '(', ')', '>', '#', '+', '-', '.', '!', '|', + ); + + protected $StrongRegex = array( + '*' => '/^[*]{2}((?:\\\\\*|[^*]|[*][^*]*[*])+?)[*]{2}(?![*])/s', + '_' => '/^__((?:\\\\_|[^_]|_[^_]*_)+?)__(?!_)/us', + ); + + protected $EmRegex = array( + '*' => '/^[*]((?:\\\\\*|[^*]|[*][*][^*]+?[*][*])+?)[*](?![*])/s', + '_' => '/^_((?:\\\\_|[^_]|__[^_]*__)+?)_(?!_)\b/us', + ); + + protected $regexHtmlAttribute = '[a-zA-Z_:][\w:.-]*(?:\s*=\s*(?:[^"\'=<>`\s]+|"[^"]*"|\'[^\']*\'))?'; + + protected $voidElements = array( + 'area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'link', 'meta', 'param', 'source', + ); + + protected $textLevelElements = array( + 'a', 'br', 'bdo', 'abbr', 'blink', 'nextid', 'acronym', 'basefont', + 'b', 'em', 'big', 'cite', 'small', 'spacer', 'listing', + 'i', 'rp', 'del', 'code', 'strike', 'marquee', + 'q', 'rt', 'ins', 'font', 'strong', + 's', 'tt', 'kbd', 'mark', + 'u', 'xm', 'sub', 'nobr', + 'sup', 'ruby', + 'var', 'span', + 'wbr', 'time', + ); +} diff --git a/vendor/erusev/parsedown/README.md b/vendor/erusev/parsedown/README.md new file mode 100644 index 0000000..4e5659a --- /dev/null +++ b/vendor/erusev/parsedown/README.md @@ -0,0 +1,56 @@ +> You might also like [Caret](http://caret.io?ref=parsedown) - our Markdown editor for Mac / Windows / Linux. + +## Parsedown + +[![Build Status](https://img.shields.io/travis/erusev/parsedown/master.svg?style=flat-square)](https://travis-ci.org/erusev/parsedown) + + +Better Markdown Parser in PHP + +[Demo](http://parsedown.org/demo) | +[Benchmarks](http://parsedown.org/speed) | +[Tests](http://parsedown.org/tests/) | +[Documentation](https://github.com/erusev/parsedown/wiki/) + +### Features + +* One File +* Super Fast +* Extensible +* [GitHub flavored](https://help.github.com/articles/github-flavored-markdown) +* Tested in 5.3 to 7.1 and in HHVM +* [Markdown Extra extension](https://github.com/erusev/parsedown-extra) + +### Installation + +Include `Parsedown.php` or install [the composer package](https://packagist.org/packages/erusev/parsedown). + +### Example + +``` php +$Parsedown = new Parsedown(); + +echo $Parsedown->text('Hello _Parsedown_!'); # prints:

Hello Parsedown!

+``` + +More examples in [the wiki](https://github.com/erusev/parsedown/wiki/) and in [this video tutorial](http://youtu.be/wYZBY8DEikI). + +### Questions + +**How does Parsedown work?** + +It tries to read Markdown like a human. First, it looks at the lines. It’s interested in how the lines start. This helps it recognise blocks. It knows, for example, that if a line starts with a `-` then perhaps it belongs to a list. Once it recognises the blocks, it continues to the content. As it reads, it watches out for special characters. This helps it recognise inline elements (or inlines). + +We call this approach "line based". We believe that Parsedown is the first Markdown parser to use it. Since the release of Parsedown, other developers have used the same approach to develop other Markdown parsers in PHP and in other languages. + +**Is it compliant with CommonMark?** + +It passes most of the CommonMark tests. Most of the tests that don't pass deal with cases that are quite uncommon. Still, as CommonMark matures, compliance should improve. + +**Who uses it?** + +[phpDocumentor](http://www.phpdoc.org/), [October CMS](http://octobercms.com/), [Bolt CMS](http://bolt.cm/), [Kirby CMS](http://getkirby.com/), [Grav CMS](http://getgrav.org/), [Statamic CMS](http://www.statamic.com/), [Herbie CMS](http://www.getherbie.org/), [RaspberryPi.org](http://www.raspberrypi.org/), [Symfony demo](https://github.com/symfony/symfony-demo) and [more](https://packagist.org/packages/erusev/parsedown/dependents). + +**How can I help?** + +Use it, star it, share it and if you feel generous, [donate](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=528P3NZQMP8N2). diff --git a/vendor/erusev/parsedown/composer.json b/vendor/erusev/parsedown/composer.json new file mode 100644 index 0000000..28145af --- /dev/null +++ b/vendor/erusev/parsedown/composer.json @@ -0,0 +1,21 @@ +{ + "name": "erusev/parsedown", + "description": "Parser for Markdown.", + "keywords": ["markdown", "parser"], + "homepage": "http://parsedown.org", + "type": "library", + "license": "MIT", + "authors": [ + { + "name": "Emanuil Rusev", + "email": "hello@erusev.com", + "homepage": "http://erusev.com" + } + ], + "require": { + "php": ">=5.3.0" + }, + "autoload": { + "psr-0": {"Parsedown": ""} + } +} diff --git a/vendor/erusev/parsedown/phpunit.xml.dist b/vendor/erusev/parsedown/phpunit.xml.dist new file mode 100644 index 0000000..b2d5e9d --- /dev/null +++ b/vendor/erusev/parsedown/phpunit.xml.dist @@ -0,0 +1,8 @@ + + + + + test/ParsedownTest.php + + + \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/CommonMarkTest.php b/vendor/erusev/parsedown/test/CommonMarkTest.php new file mode 100644 index 0000000..37ed9fe --- /dev/null +++ b/vendor/erusev/parsedown/test/CommonMarkTest.php @@ -0,0 +1,74 @@ +setUrlsLinked(false); + + $actualHtml = $Parsedown->text($markdown); + $actualHtml = $this->normalizeMarkup($actualHtml); + + $this->assertEquals($expectedHtml, $actualHtml); + } + + function data() + { + $spec = file_get_contents(self::SPEC_URL); + $spec = strstr($spec, '', true); + + $tests = array(); + $currentSection = ''; + + preg_replace_callback( + '/^\.\n([\s\S]*?)^\.\n([\s\S]*?)^\.$|^#{1,6} *(.*)$/m', + function($matches) use ( & $tests, & $currentSection, & $testCount) { + if (isset($matches[3]) and $matches[3]) { + $currentSection = $matches[3]; + } else { + $testCount++; + $markdown = $matches[1]; + $markdown = preg_replace('/→/', "\t", $markdown); + $expectedHtml = $matches[2]; + $expectedHtml = $this->normalizeMarkup($expectedHtml); + $tests []= array( + $currentSection, # section + $markdown, # markdown + $expectedHtml, # html + ); + } + }, + $spec + ); + + return $tests; + } + + private function normalizeMarkup($markup) + { + $markup = preg_replace("/\n+/", "\n", $markup); + $markup = preg_replace('/^\s+/m', '', $markup); + $markup = preg_replace('/^((?:<[\w]+>)+)\n/m', '$1', $markup); + $markup = preg_replace('/\n((?:<\/[\w]+>)+)$/m', '$1', $markup); + $markup = trim($markup); + + return $markup; + } +} diff --git a/vendor/erusev/parsedown/test/ParsedownTest.php b/vendor/erusev/parsedown/test/ParsedownTest.php new file mode 100644 index 0000000..7e552e8 --- /dev/null +++ b/vendor/erusev/parsedown/test/ParsedownTest.php @@ -0,0 +1,159 @@ +dirs = $this->initDirs(); + $this->Parsedown = $this->initParsedown(); + + parent::__construct($name, $data, $dataName); + } + + private $dirs, $Parsedown; + + /** + * @return array + */ + protected function initDirs() + { + $dirs []= dirname(__FILE__).'/data/'; + + return $dirs; + } + + /** + * @return Parsedown + */ + protected function initParsedown() + { + $Parsedown = new Parsedown(); + + return $Parsedown; + } + + /** + * @dataProvider data + * @param $test + * @param $dir + */ + function test_($test, $dir) + { + $markdown = file_get_contents($dir . $test . '.md'); + + $expectedMarkup = file_get_contents($dir . $test . '.html'); + + $expectedMarkup = str_replace("\r\n", "\n", $expectedMarkup); + $expectedMarkup = str_replace("\r", "\n", $expectedMarkup); + + $actualMarkup = $this->Parsedown->text($markdown); + + $this->assertEquals($expectedMarkup, $actualMarkup); + } + + function data() + { + $data = array(); + + foreach ($this->dirs as $dir) + { + $Folder = new DirectoryIterator($dir); + + foreach ($Folder as $File) + { + /** @var $File DirectoryIterator */ + + if ( ! $File->isFile()) + { + continue; + } + + $filename = $File->getFilename(); + + $extension = pathinfo($filename, PATHINFO_EXTENSION); + + if ($extension !== 'md') + { + continue; + } + + $basename = $File->getBasename('.md'); + + if (file_exists($dir . $basename . '.html')) + { + $data []= array($basename, $dir); + } + } + } + + return $data; + } + + public function test_no_markup() + { + $markdownWithHtml = <<_content_
+ +sparse: + +
+
+_content_ +
+
+ +paragraph + + + +comment + + +MARKDOWN_WITH_MARKUP; + + $expectedHtml = <<<div>content</div>

+

sparse:

+

<div> +<div class="inner"> +content +</div> +</div>

+

paragraph

+

<style type="text/css"> +p { +color: red; +} +</style>

+

comment

+

<!-- html comment -->

+EXPECTED_HTML; + $parsedownWithNoMarkup = new Parsedown(); + $parsedownWithNoMarkup->setMarkupEscaped(true); + $this->assertEquals($expectedHtml, $parsedownWithNoMarkup->text($markdownWithHtml)); + } + + public function testLateStaticBinding() + { + include __DIR__ . '/TestParsedown.php'; + + $parsedown = Parsedown::instance(); + $this->assertInstanceOf('Parsedown', $parsedown); + + // After instance is already called on Parsedown + // subsequent calls with the same arguments return the same instance + $sameParsedown = TestParsedown::instance(); + $this->assertInstanceOf('Parsedown', $sameParsedown); + $this->assertSame($parsedown, $sameParsedown); + + $testParsedown = TestParsedown::instance('test late static binding'); + $this->assertInstanceOf('TestParsedown', $testParsedown); + + $sameInstanceAgain = TestParsedown::instance('test late static binding'); + $this->assertSame($testParsedown, $sameInstanceAgain); + } +} diff --git a/vendor/erusev/parsedown/test/TestParsedown.php b/vendor/erusev/parsedown/test/TestParsedown.php new file mode 100644 index 0000000..7024dfb --- /dev/null +++ b/vendor/erusev/parsedown/test/TestParsedown.php @@ -0,0 +1,5 @@ + + + +header 1 +header 2 + + + + +cell 1.1 +cell 1.2 + + +cell 2.1 +cell 2.2 + + + \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/aesthetic_table.md b/vendor/erusev/parsedown/test/data/aesthetic_table.md new file mode 100644 index 0000000..5245e6c --- /dev/null +++ b/vendor/erusev/parsedown/test/data/aesthetic_table.md @@ -0,0 +1,4 @@ +| header 1 | header 2 | +| -------- | -------- | +| cell 1.1 | cell 1.2 | +| cell 2.1 | cell 2.2 | \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/aligned_table.html b/vendor/erusev/parsedown/test/data/aligned_table.html new file mode 100644 index 0000000..c4acfcb --- /dev/null +++ b/vendor/erusev/parsedown/test/data/aligned_table.html @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + +
header 1header 2header 2
cell 1.1cell 1.2cell 1.3
cell 2.1cell 2.2cell 2.3
\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/aligned_table.md b/vendor/erusev/parsedown/test/data/aligned_table.md new file mode 100644 index 0000000..69a45f9 --- /dev/null +++ b/vendor/erusev/parsedown/test/data/aligned_table.md @@ -0,0 +1,4 @@ +| header 1 | header 2 | header 2 | +| :------- | :------: | -------: | +| cell 1.1 | cell 1.2 | cell 1.3 | +| cell 2.1 | cell 2.2 | cell 2.3 | \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/atx_heading.html b/vendor/erusev/parsedown/test/data/atx_heading.html new file mode 100644 index 0000000..751f873 --- /dev/null +++ b/vendor/erusev/parsedown/test/data/atx_heading.html @@ -0,0 +1,9 @@ +

h1

+

h2

+

h3

+

h4

+
h5
+
h6
+

####### not a heading

+

closed h1

+

#

\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/atx_heading.md b/vendor/erusev/parsedown/test/data/atx_heading.md new file mode 100644 index 0000000..ad97b44 --- /dev/null +++ b/vendor/erusev/parsedown/test/data/atx_heading.md @@ -0,0 +1,17 @@ +# h1 + +## h2 + +### h3 + +#### h4 + +##### h5 + +###### h6 + +####### not a heading + +# closed h1 # + +# \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/automatic_link.html b/vendor/erusev/parsedown/test/data/automatic_link.html new file mode 100644 index 0000000..50a94ba --- /dev/null +++ b/vendor/erusev/parsedown/test/data/automatic_link.html @@ -0,0 +1 @@ +

http://example.com

\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/automatic_link.md b/vendor/erusev/parsedown/test/data/automatic_link.md new file mode 100644 index 0000000..08d3bf4 --- /dev/null +++ b/vendor/erusev/parsedown/test/data/automatic_link.md @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/block-level_html.html b/vendor/erusev/parsedown/test/data/block-level_html.html new file mode 100644 index 0000000..6443a4a --- /dev/null +++ b/vendor/erusev/parsedown/test/data/block-level_html.html @@ -0,0 +1,12 @@ +
_content_
+

paragraph

+
+
+ _content_ +
+
+ +
+ home
\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/block-level_html.md b/vendor/erusev/parsedown/test/data/block-level_html.md new file mode 100644 index 0000000..17cbc22 --- /dev/null +++ b/vendor/erusev/parsedown/test/data/block-level_html.md @@ -0,0 +1,16 @@ +
_content_
+ +paragraph + +
+
+ _content_ +
+
+ + + +
+ home
\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/code_block.html b/vendor/erusev/parsedown/test/data/code_block.html new file mode 100644 index 0000000..889b02d --- /dev/null +++ b/vendor/erusev/parsedown/test/data/code_block.html @@ -0,0 +1,8 @@ +
<?php
+
+$message = 'Hello World!';
+echo $message;
+
+
> not a quote
+- not a list item
+[not a reference]: http://foo.com
\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/code_block.md b/vendor/erusev/parsedown/test/data/code_block.md new file mode 100644 index 0000000..2cfc953 --- /dev/null +++ b/vendor/erusev/parsedown/test/data/code_block.md @@ -0,0 +1,10 @@ + not a quote + - not a list item + [not a reference]: http://foo.com \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/code_span.html b/vendor/erusev/parsedown/test/data/code_span.html new file mode 100644 index 0000000..5c4c231 --- /dev/null +++ b/vendor/erusev/parsedown/test/data/code_span.html @@ -0,0 +1,6 @@ +

a code span

+

this is also a codespan trailing text

+

and look at this one!

+

single backtick in a code span: `

+

backtick-delimited string in a code span: `foo`

+

sth `` sth

\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/code_span.md b/vendor/erusev/parsedown/test/data/code_span.md new file mode 100644 index 0000000..c2f1a74 --- /dev/null +++ b/vendor/erusev/parsedown/test/data/code_span.md @@ -0,0 +1,11 @@ +a `code span` + +`this is also a codespan` trailing text + +`and look at this one!` + +single backtick in a code span: `` ` `` + +backtick-delimited string in a code span: `` `foo` `` + +`sth `` sth` \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/compound_blockquote.html b/vendor/erusev/parsedown/test/data/compound_blockquote.html new file mode 100644 index 0000000..37afb57 --- /dev/null +++ b/vendor/erusev/parsedown/test/data/compound_blockquote.html @@ -0,0 +1,9 @@ +
+

header

+

paragraph

+
    +
  • li
  • +
+
+

paragraph

+
\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/compound_blockquote.md b/vendor/erusev/parsedown/test/data/compound_blockquote.md new file mode 100644 index 0000000..80c4aed --- /dev/null +++ b/vendor/erusev/parsedown/test/data/compound_blockquote.md @@ -0,0 +1,10 @@ +> header +> ------ +> +> paragraph +> +> - li +> +> --- +> +> paragraph \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/compound_emphasis.html b/vendor/erusev/parsedown/test/data/compound_emphasis.html new file mode 100644 index 0000000..178dd54 --- /dev/null +++ b/vendor/erusev/parsedown/test/data/compound_emphasis.html @@ -0,0 +1,2 @@ +

code code

+

codecodecode

\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/compound_emphasis.md b/vendor/erusev/parsedown/test/data/compound_emphasis.md new file mode 100644 index 0000000..6fe07f2 --- /dev/null +++ b/vendor/erusev/parsedown/test/data/compound_emphasis.md @@ -0,0 +1,4 @@ +_`code`_ __`code`__ + +*`code`**`code`**`code`* + diff --git a/vendor/erusev/parsedown/test/data/compound_list.html b/vendor/erusev/parsedown/test/data/compound_list.html new file mode 100644 index 0000000..f5593c1 --- /dev/null +++ b/vendor/erusev/parsedown/test/data/compound_list.html @@ -0,0 +1,12 @@ +
    +
  • +

    paragraph

    +

    paragraph

    +
  • +
  • +

    paragraph

    +
    +

    quote

    +
    +
  • +
\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/compound_list.md b/vendor/erusev/parsedown/test/data/compound_list.md new file mode 100644 index 0000000..ed7f0c6 --- /dev/null +++ b/vendor/erusev/parsedown/test/data/compound_list.md @@ -0,0 +1,7 @@ +- paragraph + + paragraph + +- paragraph + + > quote \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/deeply_nested_list.html b/vendor/erusev/parsedown/test/data/deeply_nested_list.html new file mode 100644 index 0000000..d2c7e5a --- /dev/null +++ b/vendor/erusev/parsedown/test/data/deeply_nested_list.html @@ -0,0 +1,12 @@ +
    +
  • li +
      +
    • li +
        +
      • li
      • +
      • li
      • +
    • +
    • li
    • +
  • +
  • li
  • +
\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/deeply_nested_list.md b/vendor/erusev/parsedown/test/data/deeply_nested_list.md new file mode 100644 index 0000000..76b7552 --- /dev/null +++ b/vendor/erusev/parsedown/test/data/deeply_nested_list.md @@ -0,0 +1,6 @@ +- li + - li + - li + - li + - li +- li \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/em_strong.html b/vendor/erusev/parsedown/test/data/em_strong.html new file mode 100644 index 0000000..323d60a --- /dev/null +++ b/vendor/erusev/parsedown/test/data/em_strong.html @@ -0,0 +1,8 @@ +

em strong

+

em strong strong

+

strong em strong

+

strong em strong strong

+

em strong

+

em strong strong

+

strong em strong

+

strong em strong strong

\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/em_strong.md b/vendor/erusev/parsedown/test/data/em_strong.md new file mode 100644 index 0000000..9abeb3f --- /dev/null +++ b/vendor/erusev/parsedown/test/data/em_strong.md @@ -0,0 +1,15 @@ +___em strong___ + +___em strong_ strong__ + +__strong _em strong___ + +__strong _em strong_ strong__ + +***em strong*** + +***em strong* strong** + +**strong *em strong*** + +**strong *em strong* strong** \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/email.html b/vendor/erusev/parsedown/test/data/email.html new file mode 100644 index 0000000..c40759c --- /dev/null +++ b/vendor/erusev/parsedown/test/data/email.html @@ -0,0 +1 @@ +

my email is me@example.com

\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/email.md b/vendor/erusev/parsedown/test/data/email.md new file mode 100644 index 0000000..26b7b6c --- /dev/null +++ b/vendor/erusev/parsedown/test/data/email.md @@ -0,0 +1 @@ +my email is \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/emphasis.html b/vendor/erusev/parsedown/test/data/emphasis.html new file mode 100644 index 0000000..60ff4bd --- /dev/null +++ b/vendor/erusev/parsedown/test/data/emphasis.html @@ -0,0 +1,8 @@ +

underscore, asterisk, one two, three four, a, b

+

strong and em and strong and em

+

line +line +line

+

this_is_not_an_emphasis

+

an empty emphasis __ ** is not an emphasis

+

*mixed *double and single asterisk** spans

\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/emphasis.md b/vendor/erusev/parsedown/test/data/emphasis.md new file mode 100644 index 0000000..85b9d22 --- /dev/null +++ b/vendor/erusev/parsedown/test/data/emphasis.md @@ -0,0 +1,13 @@ +_underscore_, *asterisk*, _one two_, *three four*, _a_, *b* + +**strong** and *em* and **strong** and *em* + +_line +line +line_ + +this_is_not_an_emphasis + +an empty emphasis __ ** is not an emphasis + +*mixed **double and* single asterisk** spans \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/escaping.html b/vendor/erusev/parsedown/test/data/escaping.html new file mode 100644 index 0000000..ab1c41f --- /dev/null +++ b/vendor/erusev/parsedown/test/data/escaping.html @@ -0,0 +1,6 @@ +

escaped *emphasis*.

+

escaped \*emphasis\* in a code span

+
escaped \*emphasis\* in a code block
+

\ ` * _ { } [ ] ( ) > # + - . !

+

one_two one_two

+

one*two one*two

\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/escaping.md b/vendor/erusev/parsedown/test/data/escaping.md new file mode 100644 index 0000000..9f174e9 --- /dev/null +++ b/vendor/erusev/parsedown/test/data/escaping.md @@ -0,0 +1,11 @@ +escaped \*emphasis\*. + +`escaped \*emphasis\* in a code span` + + escaped \*emphasis\* in a code block + +\\ \` \* \_ \{ \} \[ \] \( \) \> \# \+ \- \. \! + +_one\_two_ __one\_two__ + +*one\*two* **one\*two** \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/fenced_code_block.html b/vendor/erusev/parsedown/test/data/fenced_code_block.html new file mode 100644 index 0000000..8bdabba --- /dev/null +++ b/vendor/erusev/parsedown/test/data/fenced_code_block.html @@ -0,0 +1,6 @@ +
<?php
+
+$message = 'fenced code block';
+echo $message;
+
tilde
+
echo 'language identifier';
\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/fenced_code_block.md b/vendor/erusev/parsedown/test/data/fenced_code_block.md new file mode 100644 index 0000000..cbed8eb --- /dev/null +++ b/vendor/erusev/parsedown/test/data/fenced_code_block.md @@ -0,0 +1,14 @@ +``` + +
+
+
+
\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/horizontal_rule.md b/vendor/erusev/parsedown/test/data/horizontal_rule.md new file mode 100644 index 0000000..bf461a9 --- /dev/null +++ b/vendor/erusev/parsedown/test/data/horizontal_rule.md @@ -0,0 +1,9 @@ +--- + +- - - + + - - - + +*** + +___ \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/html_comment.html b/vendor/erusev/parsedown/test/data/html_comment.html new file mode 100644 index 0000000..566dc3a --- /dev/null +++ b/vendor/erusev/parsedown/test/data/html_comment.html @@ -0,0 +1,5 @@ + +

paragraph

+ +

paragraph

\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/html_comment.md b/vendor/erusev/parsedown/test/data/html_comment.md new file mode 100644 index 0000000..6ddfdb4 --- /dev/null +++ b/vendor/erusev/parsedown/test/data/html_comment.md @@ -0,0 +1,8 @@ + + +paragraph + + + +paragraph \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/html_entity.html b/vendor/erusev/parsedown/test/data/html_entity.html new file mode 100644 index 0000000..4d23e3c --- /dev/null +++ b/vendor/erusev/parsedown/test/data/html_entity.html @@ -0,0 +1 @@ +

& © {

\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/html_entity.md b/vendor/erusev/parsedown/test/data/html_entity.md new file mode 100644 index 0000000..ff545ea --- /dev/null +++ b/vendor/erusev/parsedown/test/data/html_entity.md @@ -0,0 +1 @@ +& © { \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/image_reference.html b/vendor/erusev/parsedown/test/data/image_reference.html new file mode 100644 index 0000000..67fbd2c --- /dev/null +++ b/vendor/erusev/parsedown/test/data/image_reference.html @@ -0,0 +1,2 @@ +

Markdown Logo

+

![missing reference]

\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/image_reference.md b/vendor/erusev/parsedown/test/data/image_reference.md new file mode 100644 index 0000000..1e11d94 --- /dev/null +++ b/vendor/erusev/parsedown/test/data/image_reference.md @@ -0,0 +1,5 @@ +![Markdown Logo][image] + +[image]: /md.png + +![missing reference] \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/image_title.html b/vendor/erusev/parsedown/test/data/image_title.html new file mode 100644 index 0000000..957c950 --- /dev/null +++ b/vendor/erusev/parsedown/test/data/image_title.html @@ -0,0 +1,2 @@ +

alt

+

blank title

\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/image_title.md b/vendor/erusev/parsedown/test/data/image_title.md new file mode 100644 index 0000000..7ce2849 --- /dev/null +++ b/vendor/erusev/parsedown/test/data/image_title.md @@ -0,0 +1,3 @@ +![alt](/md.png "title") + +![blank title](/md.png "") \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/implicit_reference.html b/vendor/erusev/parsedown/test/data/implicit_reference.html new file mode 100644 index 0000000..24b51c1 --- /dev/null +++ b/vendor/erusev/parsedown/test/data/implicit_reference.html @@ -0,0 +1,4 @@ +

an implicit reference link

+

an implicit reference link with an empty link definition

+

an implicit reference link followed by another

+

an explicit reference link with a title

\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/implicit_reference.md b/vendor/erusev/parsedown/test/data/implicit_reference.md new file mode 100644 index 0000000..f850df9 --- /dev/null +++ b/vendor/erusev/parsedown/test/data/implicit_reference.md @@ -0,0 +1,13 @@ +an [implicit] reference link + +[implicit]: http://example.com + +an [implicit][] reference link with an empty link definition + +an [implicit][] reference link followed by [another][] + +[another]: http://cnn.com + +an [explicit][example] reference link with a title + +[example]: http://example.com "Example" \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/inline_link.html b/vendor/erusev/parsedown/test/data/inline_link.html new file mode 100644 index 0000000..cef29cf --- /dev/null +++ b/vendor/erusev/parsedown/test/data/inline_link.html @@ -0,0 +1,7 @@ +

link

+

link with parentheses in URL

+

(link) in parentheses

+

link

+

MD Logo

+

MD Logo and text

+

MD Logo and text

\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/inline_link.md b/vendor/erusev/parsedown/test/data/inline_link.md new file mode 100644 index 0000000..1ba24b7 --- /dev/null +++ b/vendor/erusev/parsedown/test/data/inline_link.md @@ -0,0 +1,13 @@ +[link](http://example.com) + +[link](/url-(parentheses)) with parentheses in URL + +([link](/index.php)) in parentheses + +[`link`](http://example.com) + +[![MD Logo](http://parsedown.org/md.png)](http://example.com) + +[![MD Logo](http://parsedown.org/md.png) and text](http://example.com) + +[![MD Logo](data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAUCAYAAADskT9PAAAKQWlDQ1BJQ0MgUHJvZmlsZQAASA2dlndUU9kWh8+9N73QEiIgJfQaegkg0jtIFQRRiUmAUAKGhCZ2RAVGFBEpVmRUwAFHhyJjRRQLg4Ji1wnyEFDGwVFEReXdjGsJ7601896a/cdZ39nnt9fZZ+9917oAUPyCBMJ0WAGANKFYFO7rwVwSE8vE9wIYEAEOWAHA4WZmBEf4RALU/L09mZmoSMaz9u4ugGS72yy/UCZz1v9/kSI3QyQGAApF1TY8fiYX5QKUU7PFGTL/BMr0lSkyhjEyFqEJoqwi48SvbPan5iu7yZiXJuShGlnOGbw0noy7UN6aJeGjjAShXJgl4GejfAdlvVRJmgDl9yjT0/icTAAwFJlfzOcmoWyJMkUUGe6J8gIACJTEObxyDov5OWieAHimZ+SKBIlJYqYR15hp5ejIZvrxs1P5YjErlMNN4Yh4TM/0tAyOMBeAr2+WRQElWW2ZaJHtrRzt7VnW5mj5v9nfHn5T/T3IevtV8Sbsz55BjJ5Z32zsrC+9FgD2JFqbHbO+lVUAtG0GQOXhrE/vIADyBQC03pzzHoZsXpLE4gwnC4vs7GxzAZ9rLivoN/ufgm/Kv4Y595nL7vtWO6YXP4EjSRUzZUXlpqemS0TMzAwOl89k/fcQ/+PAOWnNycMsnJ/AF/GF6FVR6JQJhIlou4U8gViQLmQKhH/V4X8YNicHGX6daxRodV8AfYU5ULhJB8hvPQBDIwMkbj96An3rWxAxCsi+vGitka9zjzJ6/uf6Hwtcim7hTEEiU+b2DI9kciWiLBmj34RswQISkAd0oAo0gS4wAixgDRyAM3AD3iAAhIBIEAOWAy5IAmlABLJBPtgACkEx2AF2g2pwANSBetAEToI2cAZcBFfADXALDIBHQAqGwUswAd6BaQiC8BAVokGqkBakD5lC1hAbWgh5Q0FQOBQDxUOJkBCSQPnQJqgYKoOqoUNQPfQjdBq6CF2D+qAH0CA0Bv0BfYQRmALTYQ3YALaA2bA7HAhHwsvgRHgVnAcXwNvhSrgWPg63whfhG/AALIVfwpMIQMgIA9FGWAgb8URCkFgkAREha5EipAKpRZqQDqQbuY1IkXHkAwaHoWGYGBbGGeOHWYzhYlZh1mJKMNWYY5hWTBfmNmYQM4H5gqVi1bGmWCesP3YJNhGbjS3EVmCPYFuwl7ED2GHsOxwOx8AZ4hxwfrgYXDJuNa4Etw/XjLuA68MN4SbxeLwq3hTvgg/Bc/BifCG+Cn8cfx7fjx/GvyeQCVoEa4IPIZYgJGwkVBAaCOcI/YQRwjRRgahPdCKGEHnEXGIpsY7YQbxJHCZOkxRJhiQXUiQpmbSBVElqIl0mPSa9IZPJOmRHchhZQF5PriSfIF8lD5I/UJQoJhRPShxFQtlOOUq5QHlAeUOlUg2obtRYqpi6nVpPvUR9Sn0vR5Mzl/OX48mtk6uRa5Xrl3slT5TXl3eXXy6fJ18hf0r+pvy4AlHBQMFTgaOwVqFG4bTCPYVJRZqilWKIYppiiWKD4jXFUSW8koGStxJPqUDpsNIlpSEaQtOledK4tE20Otpl2jAdRzek+9OT6cX0H+i99AllJWVb5SjlHOUa5bPKUgbCMGD4M1IZpYyTjLuMj/M05rnP48/bNq9pXv+8KZX5Km4qfJUilWaVAZWPqkxVb9UU1Z2qbapP1DBqJmphatlq+9Uuq43Pp893ns+dXzT/5PyH6rC6iXq4+mr1w+o96pMamhq+GhkaVRqXNMY1GZpumsma5ZrnNMe0aFoLtQRa5VrntV4wlZnuzFRmJbOLOaGtru2nLdE+pN2rPa1jqLNYZ6NOs84TXZIuWzdBt1y3U3dCT0svWC9fr1HvoT5Rn62fpL9Hv1t/ysDQINpgi0GbwaihiqG/YZ5ho+FjI6qRq9Eqo1qjO8Y4Y7ZxivE+41smsImdSZJJjclNU9jU3lRgus+0zwxr5mgmNKs1u8eisNxZWaxG1qA5wzzIfKN5m/krCz2LWIudFt0WXyztLFMt6ywfWSlZBVhttOqw+sPaxJprXWN9x4Zq42Ozzqbd5rWtqS3fdr/tfTuaXbDdFrtOu8/2DvYi+yb7MQc9h3iHvQ732HR2KLuEfdUR6+jhuM7xjOMHJ3snsdNJp9+dWc4pzg3OowsMF/AX1C0YctFx4bgccpEuZC6MX3hwodRV25XjWuv6zE3Xjed2xG3E3dg92f24+ysPSw+RR4vHlKeT5xrPC16Il69XkVevt5L3Yu9q76c+Oj6JPo0+E752vqt9L/hh/QL9dvrd89fw5/rX+08EOASsCegKpARGBFYHPgsyCRIFdQTDwQHBu4IfL9JfJFzUFgJC/EN2hTwJNQxdFfpzGC4sNKwm7Hm4VXh+eHcELWJFREPEu0iPyNLIR4uNFksWd0bJR8VF1UdNRXtFl0VLl1gsWbPkRoxajCCmPRYfGxV7JHZyqffS3UuH4+ziCuPuLjNclrPs2nK15anLz66QX8FZcSoeGx8d3xD/iRPCqeVMrvRfuXflBNeTu4f7kufGK+eN8V34ZfyRBJeEsoTRRJfEXYljSa5JFUnjAk9BteB1sl/ygeSplJCUoykzqdGpzWmEtPi000IlYYqwK10zPSe9L8M0ozBDuspp1e5VE6JA0ZFMKHNZZruYjv5M9UiMJJslg1kLs2qy3mdHZZ/KUcwR5vTkmuRuyx3J88n7fjVmNXd1Z752/ob8wTXuaw6thdauXNu5Tnddwbrh9b7rj20gbUjZ8MtGy41lG99uit7UUaBRsL5gaLPv5sZCuUJR4b0tzlsObMVsFWzt3WazrWrblyJe0fViy+KK4k8l3JLr31l9V/ndzPaE7b2l9qX7d+B2CHfc3em681iZYlle2dCu4F2t5czyovK3u1fsvlZhW3FgD2mPZI+0MqiyvUqvakfVp+qk6oEaj5rmvep7t+2d2sfb17/fbX/TAY0DxQc+HhQcvH/I91BrrUFtxWHc4azDz+ui6rq/Z39ff0TtSPGRz0eFR6XHwo911TvU1zeoN5Q2wo2SxrHjccdv/eD1Q3sTq+lQM6O5+AQ4ITnx4sf4H++eDDzZeYp9qukn/Z/2ttBailqh1tzWibakNml7THvf6YDTnR3OHS0/m/989Iz2mZqzymdLz5HOFZybOZ93fvJCxoXxi4kXhzpXdD66tOTSna6wrt7LgZevXvG5cqnbvfv8VZerZ645XTt9nX297Yb9jdYeu56WX+x+aem172296XCz/ZbjrY6+BX3n+l37L972un3ljv+dGwOLBvruLr57/17cPel93v3RB6kPXj/Mejj9aP1j7OOiJwpPKp6qP6391fjXZqm99Oyg12DPs4hnj4a4Qy//lfmvT8MFz6nPK0a0RupHrUfPjPmM3Xqx9MXwy4yX0+OFvyn+tveV0auffnf7vWdiycTwa9HrmT9K3qi+OfrW9m3nZOjk03dp76anit6rvj/2gf2h+2P0x5Hp7E/4T5WfjT93fAn88ngmbWbm3/eE8/syOll+AAAACXBIWXMAAAsTAAALEwEAmpwYAAAEImlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNS40LjAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyIKICAgICAgICAgICAgeG1sbnM6ZXhpZj0iaHR0cDovL25zLmFkb2JlLmNvbS9leGlmLzEuMC8iCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIKICAgICAgICAgICAgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIj4KICAgICAgICAgPHRpZmY6UmVzb2x1dGlvblVuaXQ+MTwvdGlmZjpSZXNvbHV0aW9uVW5pdD4KICAgICAgICAgPHRpZmY6Q29tcHJlc3Npb24+NTwvdGlmZjpDb21wcmVzc2lvbj4KICAgICAgICAgPHRpZmY6WFJlc29sdXRpb24+NzI8L3RpZmY6WFJlc29sdXRpb24+CiAgICAgICAgIDx0aWZmOk9yaWVudGF0aW9uPjE8L3RpZmY6T3JpZW50YXRpb24+CiAgICAgICAgIDx0aWZmOllSZXNvbHV0aW9uPjcyPC90aWZmOllSZXNvbHV0aW9uPgogICAgICAgICA8ZXhpZjpQaXhlbFhEaW1lbnNpb24+MzI8L2V4aWY6UGl4ZWxYRGltZW5zaW9uPgogICAgICAgICA8ZXhpZjpDb2xvclNwYWNlPjE8L2V4aWY6Q29sb3JTcGFjZT4KICAgICAgICAgPGV4aWY6UGl4ZWxZRGltZW5zaW9uPjIwPC9leGlmOlBpeGVsWURpbWVuc2lvbj4KICAgICAgICAgPGRjOnN1YmplY3Q+CiAgICAgICAgICAgIDxyZGY6QmFnLz4KICAgICAgICAgPC9kYzpzdWJqZWN0PgogICAgICAgICA8eG1wOk1vZGlmeURhdGU+MjAxNS0wNi0xNFQxOTowNjo1OTwveG1wOk1vZGlmeURhdGU+CiAgICAgICAgIDx4bXA6Q3JlYXRvclRvb2w+UGl4ZWxtYXRvciAzLjI8L3htcDpDcmVhdG9yVG9vbD4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+Ch7v5WoAAAGgSURBVEgNYywtLbVnYmLqYmBgMANieoJT//79K2MBWr4CaKsEPW2G2mUGspsFZnlnZycjPR1RXl7+H2Q3Ez0txWbXgDsAFAUYABo8YPH////HdXV1LUZWVFZWFsvIyLgIJoYt+pDNwCYP00swBIAWzaysrNSCaQCxgWLTYHxKaawhgGYoJzC7rC4sLDQBiYPYQIoHTQ3ZXGIcADJci42NDeZreGiQbSuSRmKiABb/CUB9IMwAjAKYGIhLESAYAj9//kwH+t4YaAvM59c4ODiyvn//HotuMzDh9QLFirCIg/I8CPQBE2QxhAkhCYZAf3//d2CJFQpU/h2EQeyGhoYvyIbA2FDDl8H4aPQydMtB8gQdAFLU3t5+DRjsWSAMYoPEcAFOTs5EoNw+NPl9UHE0YQYGglEA09HR0bEAxsZHA0PnFzAqgoBq9gIxKOrOAnEQSBxIYwCiQgBDFwEBYFB/BEaVJ7AQ2wGiQXxcWhhhJRZQ0UBURsSlAVyup4Y4TaKAFIeBouAJUIM0KZqoqPYpEzBrpQANfEFFQ4k16gXIbgCggnKoJ5DJdwAAAABJRU5ErkJggg==) and text](http://example.com) \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/inline_link_title.html b/vendor/erusev/parsedown/test/data/inline_link_title.html new file mode 100644 index 0000000..ecdfd03 --- /dev/null +++ b/vendor/erusev/parsedown/test/data/inline_link_title.html @@ -0,0 +1,6 @@ +

single quotes

+

double quotes

+

single quotes blank

+

double quotes blank

+

space

+

parentheses

\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/inline_link_title.md b/vendor/erusev/parsedown/test/data/inline_link_title.md new file mode 100644 index 0000000..6e1c5af --- /dev/null +++ b/vendor/erusev/parsedown/test/data/inline_link_title.md @@ -0,0 +1,11 @@ +[single quotes](http://example.com 'Title') + +[double quotes](http://example.com "Title") + +[single quotes blank](http://example.com '') + +[double quotes blank](http://example.com "") + +[space](http://example.com "2 Words") + +[parentheses](http://example.com/url-(parentheses) "Title") \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/inline_title.html b/vendor/erusev/parsedown/test/data/inline_title.html new file mode 100644 index 0000000..bbab93b --- /dev/null +++ b/vendor/erusev/parsedown/test/data/inline_title.html @@ -0,0 +1 @@ +

single quotes and double quotes

\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/inline_title.md b/vendor/erusev/parsedown/test/data/inline_title.md new file mode 100644 index 0000000..cb09344 --- /dev/null +++ b/vendor/erusev/parsedown/test/data/inline_title.md @@ -0,0 +1 @@ +[single quotes](http://example.com 'Example') and [double quotes](http://example.com "Example") \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/lazy_blockquote.html b/vendor/erusev/parsedown/test/data/lazy_blockquote.html new file mode 100644 index 0000000..0a2a2aa --- /dev/null +++ b/vendor/erusev/parsedown/test/data/lazy_blockquote.html @@ -0,0 +1,6 @@ +
+

quote +the rest of it

+

another paragraph +the rest of it

+
\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/lazy_blockquote.md b/vendor/erusev/parsedown/test/data/lazy_blockquote.md new file mode 100644 index 0000000..48f645f --- /dev/null +++ b/vendor/erusev/parsedown/test/data/lazy_blockquote.md @@ -0,0 +1,5 @@ +> quote +the rest of it + +> another paragraph +the rest of it \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/lazy_list.html b/vendor/erusev/parsedown/test/data/lazy_list.html new file mode 100644 index 0000000..1a51992 --- /dev/null +++ b/vendor/erusev/parsedown/test/data/lazy_list.html @@ -0,0 +1,4 @@ +
    +
  • li +the rest of it
  • +
\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/lazy_list.md b/vendor/erusev/parsedown/test/data/lazy_list.md new file mode 100644 index 0000000..62ad9d7 --- /dev/null +++ b/vendor/erusev/parsedown/test/data/lazy_list.md @@ -0,0 +1,2 @@ +- li +the rest of it \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/line_break.html b/vendor/erusev/parsedown/test/data/line_break.html new file mode 100644 index 0000000..5f37d85 --- /dev/null +++ b/vendor/erusev/parsedown/test/data/line_break.html @@ -0,0 +1,2 @@ +

line
+line

\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/line_break.md b/vendor/erusev/parsedown/test/data/line_break.md new file mode 100644 index 0000000..04dff43 --- /dev/null +++ b/vendor/erusev/parsedown/test/data/line_break.md @@ -0,0 +1,2 @@ +line +line \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/multiline_list_paragraph.html b/vendor/erusev/parsedown/test/data/multiline_list_paragraph.html new file mode 100644 index 0000000..3247bd2 --- /dev/null +++ b/vendor/erusev/parsedown/test/data/multiline_list_paragraph.html @@ -0,0 +1,7 @@ +
    +
  • +

    li

    +

    line +line

    +
  • +
\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/multiline_list_paragraph.md b/vendor/erusev/parsedown/test/data/multiline_list_paragraph.md new file mode 100644 index 0000000..f5b4272 --- /dev/null +++ b/vendor/erusev/parsedown/test/data/multiline_list_paragraph.md @@ -0,0 +1,4 @@ +- li + + line + line \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/nested_block-level_html.html b/vendor/erusev/parsedown/test/data/nested_block-level_html.html new file mode 100644 index 0000000..bfbef54 --- /dev/null +++ b/vendor/erusev/parsedown/test/data/nested_block-level_html.html @@ -0,0 +1,10 @@ +
+_parent_ +
+_child_ +
+
+_adopted child_
+
+
+

outside

\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/nested_block-level_html.md b/vendor/erusev/parsedown/test/data/nested_block-level_html.md new file mode 100644 index 0000000..5e01e10 --- /dev/null +++ b/vendor/erusev/parsedown/test/data/nested_block-level_html.md @@ -0,0 +1,11 @@ +
+_parent_ +
+_child_ +
+
+_adopted child_
+
+
+ +_outside_ \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/ordered_list.html b/vendor/erusev/parsedown/test/data/ordered_list.html new file mode 100644 index 0000000..c4a69db --- /dev/null +++ b/vendor/erusev/parsedown/test/data/ordered_list.html @@ -0,0 +1,13 @@ +
    +
  1. one
  2. +
  3. two
  4. +
+

repeating numbers:

+
    +
  1. one
  2. +
  3. two
  4. +
+

large numbers:

+
    +
  1. one
  2. +
\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/ordered_list.md b/vendor/erusev/parsedown/test/data/ordered_list.md new file mode 100644 index 0000000..b307032 --- /dev/null +++ b/vendor/erusev/parsedown/test/data/ordered_list.md @@ -0,0 +1,11 @@ +1. one +2. two + +repeating numbers: + +1. one +1. two + +large numbers: + +123. one \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/paragraph_list.html b/vendor/erusev/parsedown/test/data/paragraph_list.html new file mode 100644 index 0000000..ced1c43 --- /dev/null +++ b/vendor/erusev/parsedown/test/data/paragraph_list.html @@ -0,0 +1,12 @@ +

paragraph

+
    +
  • li
  • +
  • li
  • +
+

paragraph

+
    +
  • +

    li

    +
  • +
  • li
  • +
\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/paragraph_list.md b/vendor/erusev/parsedown/test/data/paragraph_list.md new file mode 100644 index 0000000..b973908 --- /dev/null +++ b/vendor/erusev/parsedown/test/data/paragraph_list.md @@ -0,0 +1,9 @@ +paragraph +- li +- li + +paragraph + + * li + + * li \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/reference_title.html b/vendor/erusev/parsedown/test/data/reference_title.html new file mode 100644 index 0000000..8f2be94 --- /dev/null +++ b/vendor/erusev/parsedown/test/data/reference_title.html @@ -0,0 +1,2 @@ +

double quotes and single quotes and parentheses

+

[invalid title]: http://example.com example title

\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/reference_title.md b/vendor/erusev/parsedown/test/data/reference_title.md new file mode 100644 index 0000000..43cb217 --- /dev/null +++ b/vendor/erusev/parsedown/test/data/reference_title.md @@ -0,0 +1,6 @@ +[double quotes] and [single quotes] and [parentheses] + +[double quotes]: http://example.com "example title" +[single quotes]: http://example.com 'example title' +[parentheses]: http://example.com (example title) +[invalid title]: http://example.com example title \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/self-closing_html.html b/vendor/erusev/parsedown/test/data/self-closing_html.html new file mode 100644 index 0000000..4d072b4 --- /dev/null +++ b/vendor/erusev/parsedown/test/data/self-closing_html.html @@ -0,0 +1,12 @@ +
+

paragraph

+
+

paragraph

+
+

paragraph

+
+

paragraph

+
+

paragraph

+
+

paragraph

\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/self-closing_html.md b/vendor/erusev/parsedown/test/data/self-closing_html.md new file mode 100644 index 0000000..acb2032 --- /dev/null +++ b/vendor/erusev/parsedown/test/data/self-closing_html.md @@ -0,0 +1,12 @@ +
+paragraph +
+paragraph +
+paragraph +
+paragraph +
+paragraph +
+paragraph \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/separated_nested_list.html b/vendor/erusev/parsedown/test/data/separated_nested_list.html new file mode 100644 index 0000000..80a5cae --- /dev/null +++ b/vendor/erusev/parsedown/test/data/separated_nested_list.html @@ -0,0 +1,9 @@ +
    +
  • +

    li

    +
      +
    • li
    • +
    • li
    • +
    +
  • +
\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/separated_nested_list.md b/vendor/erusev/parsedown/test/data/separated_nested_list.md new file mode 100644 index 0000000..d7cd1af --- /dev/null +++ b/vendor/erusev/parsedown/test/data/separated_nested_list.md @@ -0,0 +1,4 @@ +- li + + - li + - li \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/setext_header.html b/vendor/erusev/parsedown/test/data/setext_header.html new file mode 100644 index 0000000..60aac08 --- /dev/null +++ b/vendor/erusev/parsedown/test/data/setext_header.html @@ -0,0 +1,5 @@ +

h1

+

h2

+

single character

+

not a header

+
\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/setext_header.md b/vendor/erusev/parsedown/test/data/setext_header.md new file mode 100644 index 0000000..c43b52c --- /dev/null +++ b/vendor/erusev/parsedown/test/data/setext_header.md @@ -0,0 +1,12 @@ +h1 +== + +h2 +-- + +single character +- + +not a header + +------------ \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/simple_blockquote.html b/vendor/erusev/parsedown/test/data/simple_blockquote.html new file mode 100644 index 0000000..8225d57 --- /dev/null +++ b/vendor/erusev/parsedown/test/data/simple_blockquote.html @@ -0,0 +1,11 @@ +
+

quote

+
+

indented:

+
+

quote

+
+

no space after >:

+
+

quote

+
\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/simple_blockquote.md b/vendor/erusev/parsedown/test/data/simple_blockquote.md new file mode 100644 index 0000000..22b6b11 --- /dev/null +++ b/vendor/erusev/parsedown/test/data/simple_blockquote.md @@ -0,0 +1,7 @@ +> quote + +indented: + > quote + +no space after `>`: +>quote \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/simple_table.html b/vendor/erusev/parsedown/test/data/simple_table.html new file mode 100644 index 0000000..237d7ef --- /dev/null +++ b/vendor/erusev/parsedown/test/data/simple_table.html @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + +
header 1header 2
cell 1.1cell 1.2
cell 2.1cell 2.2
+
+ + + + + + + + + + + + + + + + + +
header 1header 2
cell 1.1cell 1.2
cell 2.1cell 2.2
\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/simple_table.md b/vendor/erusev/parsedown/test/data/simple_table.md new file mode 100644 index 0000000..466d140 --- /dev/null +++ b/vendor/erusev/parsedown/test/data/simple_table.md @@ -0,0 +1,11 @@ +header 1 | header 2 +-------- | -------- +cell 1.1 | cell 1.2 +cell 2.1 | cell 2.2 + +--- + +header 1 | header 2 +:------- | -------- +cell 1.1 | cell 1.2 +cell 2.1 | cell 2.2 \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/span-level_html.html b/vendor/erusev/parsedown/test/data/span-level_html.html new file mode 100644 index 0000000..f852a25 --- /dev/null +++ b/vendor/erusev/parsedown/test/data/span-level_html.html @@ -0,0 +1,5 @@ +

an important link

+

broken
+line

+

inline tag at the beginning

+

http://example.com

\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/span-level_html.md b/vendor/erusev/parsedown/test/data/span-level_html.md new file mode 100644 index 0000000..f221965 --- /dev/null +++ b/vendor/erusev/parsedown/test/data/span-level_html.md @@ -0,0 +1,8 @@ +an important link + +broken
+line + +inline tag at the beginning + +http://example.com \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/sparse_dense_list.html b/vendor/erusev/parsedown/test/data/sparse_dense_list.html new file mode 100644 index 0000000..095bc73 --- /dev/null +++ b/vendor/erusev/parsedown/test/data/sparse_dense_list.html @@ -0,0 +1,7 @@ +
    +
  • +

    li

    +
  • +
  • li
  • +
  • li
  • +
\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/sparse_dense_list.md b/vendor/erusev/parsedown/test/data/sparse_dense_list.md new file mode 100644 index 0000000..5768422 --- /dev/null +++ b/vendor/erusev/parsedown/test/data/sparse_dense_list.md @@ -0,0 +1,4 @@ +- li + +- li +- li \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/sparse_html.html b/vendor/erusev/parsedown/test/data/sparse_html.html new file mode 100644 index 0000000..9e89627 --- /dev/null +++ b/vendor/erusev/parsedown/test/data/sparse_html.html @@ -0,0 +1,8 @@ +
+line 1 + +line 2 +line 3 + +line 4 +
\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/sparse_html.md b/vendor/erusev/parsedown/test/data/sparse_html.md new file mode 100644 index 0000000..9e89627 --- /dev/null +++ b/vendor/erusev/parsedown/test/data/sparse_html.md @@ -0,0 +1,8 @@ +
+line 1 + +line 2 +line 3 + +line 4 +
\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/sparse_list.html b/vendor/erusev/parsedown/test/data/sparse_list.html new file mode 100644 index 0000000..452b2b8 --- /dev/null +++ b/vendor/erusev/parsedown/test/data/sparse_list.html @@ -0,0 +1,15 @@ +
    +
  • +

    li

    +
  • +
  • li
  • +
+
+
    +
  • +

    li

    +
      +
    • indented li
    • +
    +
  • +
\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/sparse_list.md b/vendor/erusev/parsedown/test/data/sparse_list.md new file mode 100644 index 0000000..362a35f --- /dev/null +++ b/vendor/erusev/parsedown/test/data/sparse_list.md @@ -0,0 +1,9 @@ +- li + +- li + +--- + +- li + + - indented li \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/special_characters.html b/vendor/erusev/parsedown/test/data/special_characters.html new file mode 100644 index 0000000..3b652c3 --- /dev/null +++ b/vendor/erusev/parsedown/test/data/special_characters.html @@ -0,0 +1,6 @@ +

AT&T has an ampersand in their name

+

this & that

+

4 < 5 and 6 > 5

+

http://example.com/autolink?a=1&b=2

+

inline link

+

reference link

\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/special_characters.md b/vendor/erusev/parsedown/test/data/special_characters.md new file mode 100644 index 0000000..111b03b --- /dev/null +++ b/vendor/erusev/parsedown/test/data/special_characters.md @@ -0,0 +1,13 @@ +AT&T has an ampersand in their name + +this & that + +4 < 5 and 6 > 5 + + + +[inline link](/script?a=1&b=2) + +[reference link][1] + +[1]: http://example.com/?a=1&b=2 \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/strikethrough.html b/vendor/erusev/parsedown/test/data/strikethrough.html new file mode 100644 index 0000000..2a9da98 --- /dev/null +++ b/vendor/erusev/parsedown/test/data/strikethrough.html @@ -0,0 +1,3 @@ +

strikethrough

+

here's one followed by another one

+

~~ this ~~ is not one neither is ~this~

\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/strikethrough.md b/vendor/erusev/parsedown/test/data/strikethrough.md new file mode 100644 index 0000000..d169144 --- /dev/null +++ b/vendor/erusev/parsedown/test/data/strikethrough.md @@ -0,0 +1,5 @@ +~~strikethrough~~ + +here's ~~one~~ followed by ~~another one~~ + +~~ this ~~ is not one neither is ~this~ \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/strong_em.html b/vendor/erusev/parsedown/test/data/strong_em.html new file mode 100644 index 0000000..b709c99 --- /dev/null +++ b/vendor/erusev/parsedown/test/data/strong_em.html @@ -0,0 +1,6 @@ +

em strong em

+

strong em em

+

em strong em em

+

em strong em

+

strong em em

+

em strong em em

\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/strong_em.md b/vendor/erusev/parsedown/test/data/strong_em.md new file mode 100644 index 0000000..f2aa3c7 --- /dev/null +++ b/vendor/erusev/parsedown/test/data/strong_em.md @@ -0,0 +1,11 @@ +*em **strong em*** + +***strong em** em* + +*em **strong em** em* + +_em __strong em___ + +___strong em__ em_ + +_em __strong em__ em_ \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/tab-indented_code_block.html b/vendor/erusev/parsedown/test/data/tab-indented_code_block.html new file mode 100644 index 0000000..7c140de --- /dev/null +++ b/vendor/erusev/parsedown/test/data/tab-indented_code_block.html @@ -0,0 +1,6 @@ +
<?php
+
+$message = 'Hello World!';
+echo $message;
+
+echo "following a blank line";
\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/tab-indented_code_block.md b/vendor/erusev/parsedown/test/data/tab-indented_code_block.md new file mode 100644 index 0000000..a405a16 --- /dev/null +++ b/vendor/erusev/parsedown/test/data/tab-indented_code_block.md @@ -0,0 +1,6 @@ + + + +header 1 +header 2 + + + + +cell 1.1 +cell 1.2 + + +| 2.1 +| 2.2 + + +\| 2.1 +link + + + \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/table_inline_markdown.md b/vendor/erusev/parsedown/test/data/table_inline_markdown.md new file mode 100644 index 0000000..2f3c620 --- /dev/null +++ b/vendor/erusev/parsedown/test/data/table_inline_markdown.md @@ -0,0 +1,5 @@ +| _header_ 1 | header 2 | +| ------------ | ------------ | +| _cell_ 1.1 | ~~cell~~ 1.2 | +| `|` 2.1 | \| 2.2 | +| `\|` 2.1 | [link](/) | \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/text_reference.html b/vendor/erusev/parsedown/test/data/text_reference.html new file mode 100644 index 0000000..11e4d37 --- /dev/null +++ b/vendor/erusev/parsedown/test/data/text_reference.html @@ -0,0 +1,8 @@ +

reference link

+

one with a semantic name

+

[one][404] with no definition

+

multiline +one defined on 2 lines

+

one with a mixed case label and an upper case definition

+

one with the a label on the next line

+

link

\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/text_reference.md b/vendor/erusev/parsedown/test/data/text_reference.md new file mode 100644 index 0000000..1a66a5c --- /dev/null +++ b/vendor/erusev/parsedown/test/data/text_reference.md @@ -0,0 +1,21 @@ +[reference link][1] + +[1]: http://example.com + +[one][website] with a semantic name + +[website]: http://example.com + +[one][404] with no definition + +[multiline +one][website] defined on 2 lines + +[one][Label] with a mixed case label and an upper case definition + +[LABEL]: http://example.com + +[one] +[1] with the a label on the next line + +[`link`][website] \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/unordered_list.html b/vendor/erusev/parsedown/test/data/unordered_list.html new file mode 100644 index 0000000..cd95567 --- /dev/null +++ b/vendor/erusev/parsedown/test/data/unordered_list.html @@ -0,0 +1,10 @@ +
    +
  • li
  • +
  • li
  • +
+

mixed markers:

+
    +
  • li
  • +
  • li
  • +
  • li
  • +
\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/unordered_list.md b/vendor/erusev/parsedown/test/data/unordered_list.md new file mode 100644 index 0000000..cf62c99 --- /dev/null +++ b/vendor/erusev/parsedown/test/data/unordered_list.md @@ -0,0 +1,8 @@ +- li +- li + +mixed markers: + +* li ++ li +- li \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/untidy_table.html b/vendor/erusev/parsedown/test/data/untidy_table.html new file mode 100644 index 0000000..88e1c2b --- /dev/null +++ b/vendor/erusev/parsedown/test/data/untidy_table.html @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + +
header 1header 2
cell 1.1cell 1.2
cell 2.1cell 2.2
\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/untidy_table.md b/vendor/erusev/parsedown/test/data/untidy_table.md new file mode 100644 index 0000000..8524eb1 --- /dev/null +++ b/vendor/erusev/parsedown/test/data/untidy_table.md @@ -0,0 +1,4 @@ +| header 1 | header 2 | +| ------------- | ----------- | +| cell 1.1 | cell 1.2 | +| cell 2.1 | cell 2.2 | \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/url_autolinking.html b/vendor/erusev/parsedown/test/data/url_autolinking.html new file mode 100644 index 0000000..58ca94c --- /dev/null +++ b/vendor/erusev/parsedown/test/data/url_autolinking.html @@ -0,0 +1,3 @@ +

an autolink http://example.com

+

inside of brackets [http://example.com], inside of braces {http://example.com}, inside of parentheses (http://example.com)

+

trailing slash http://example.com/ and http://example.com/path/

\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/url_autolinking.md b/vendor/erusev/parsedown/test/data/url_autolinking.md new file mode 100644 index 0000000..840f354 --- /dev/null +++ b/vendor/erusev/parsedown/test/data/url_autolinking.md @@ -0,0 +1,5 @@ +an autolink http://example.com + +inside of brackets [http://example.com], inside of braces {http://example.com}, inside of parentheses (http://example.com) + +trailing slash http://example.com/ and http://example.com/path/ \ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/whitespace.html b/vendor/erusev/parsedown/test/data/whitespace.html new file mode 100644 index 0000000..f2dd7a0 --- /dev/null +++ b/vendor/erusev/parsedown/test/data/whitespace.html @@ -0,0 +1 @@ +
code
\ No newline at end of file diff --git a/vendor/erusev/parsedown/test/data/whitespace.md b/vendor/erusev/parsedown/test/data/whitespace.md new file mode 100644 index 0000000..4cf926a --- /dev/null +++ b/vendor/erusev/parsedown/test/data/whitespace.md @@ -0,0 +1,5 @@ + + + code + + \ No newline at end of file diff --git a/vendor/fzaninotto/faker/.gitignore b/vendor/fzaninotto/faker/.gitignore new file mode 100644 index 0000000..7579f74 --- /dev/null +++ b/vendor/fzaninotto/faker/.gitignore @@ -0,0 +1,2 @@ +vendor +composer.lock diff --git a/vendor/fzaninotto/faker/.travis.yml b/vendor/fzaninotto/faker/.travis.yml new file mode 100644 index 0000000..80bebb2 --- /dev/null +++ b/vendor/fzaninotto/faker/.travis.yml @@ -0,0 +1,21 @@ +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/vendor/fzaninotto/faker/CHANGELOG.md b/vendor/fzaninotto/faker/CHANGELOG.md new file mode 100644 index 0000000..b251047 --- /dev/null +++ b/vendor/fzaninotto/faker/CHANGELOG.md @@ -0,0 +1,295 @@ +CHANGELOG +========= + +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)) +* 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)) +* Fixed file provider to ignore unreadable and special files [\#565](https://github.com/fzaninotto/Faker/pull/565) ([svrnm](https://github.com/svrnm)) +* Fixed Dutch (nl\_NL) Address and Person providers [\#560](https://github.com/fzaninotto/Faker/pull/560) ([killerog](https://github.com/killerog)) +* Fixed Dutch (nl\_NL) Person provider [\#559](https://github.com/fzaninotto/Faker/pull/559) ([pauledenburg](https://github.com/pauledenburg)) +* Added Russian (ru\_RU) Bank names provider [\#553](https://github.com/fzaninotto/Faker/pull/553) ([wizardjedi](https://github.com/wizardjedi)) +* Added mobile phone function in French (fr\_FR) provider [\#552](https://github.com/fzaninotto/Faker/pull/552) ([kletellier](https://github.com/kletellier)) +* Added phpdoc for new magic methods in Generator to help IntelliSense completion [\#550](https://github.com/fzaninotto/Faker/pull/550) ([stof](https://github.com/stof)) +* Fixed File provider bug 'The first argument to copy() function cannot be a directory' [\#547](https://github.com/fzaninotto/Faker/pull/547) ([svrnm](https://github.com/svrnm)) +* Added new Brazilian (pt\_BR) Providers [\#545](https://github.com/fzaninotto/Faker/pull/545) ([igorsantos07](https://github.com/igorsantos07)) +* Fixed ability to seed the generator [\#543](https://github.com/fzaninotto/Faker/pull/543) ([schmengler](https://github.com/schmengler)) +* Added streetAddress formatter to Russian (ru\_RU) provider [\#542](https://github.com/fzaninotto/Faker/pull/542) ([ZAYEC77](https://github.com/ZAYEC77)) +* Fixed Internet provider warning "Could not create transliterator"* [\#541](https://github.com/fzaninotto/Faker/pull/541) ([fonsecas72](https://github.com/fonsecas72)) +* Fixed Spanish for Argentina (es\_AR) Address provider [\#540](https://github.com/fzaninotto/Faker/pull/540) ([ivanmirson](https://github.com/ivanmirson)) +* Fixed region names in French for Belgium (fr\_BE) address provider [\#536](https://github.com/fzaninotto/Faker/pull/536) ([miclf](https://github.com/miclf)) +* Fixed broken Doctrine2 link in README [\#534](https://github.com/fzaninotto/Faker/pull/534) ([JonathanKryza](https://github.com/JonathanKryza)) +* Added link to faker-context Behat extension in readme [\#532](https://github.com/fzaninotto/Faker/pull/532) ([denheck](https://github.com/denheck)) +* Added PHP 7.0 nightly to Travis build targets [\#525](https://github.com/fzaninotto/Faker/pull/525) ([TomasVotruba](https://github.com/TomasVotruba)) +* Added Dutch (nl\_NL) color names [\#523](https://github.com/fzaninotto/Faker/pull/523) ([belendel](https://github.com/belendel)) +* Fixed Chinese (zh\_CN) Address provider (remove Taipei) [\#522](https://github.com/fzaninotto/Faker/pull/522) ([asika32764](https://github.com/asika32764)) +* Fixed phonenumber formats in Dutch (nl\_NL) PhoneNumber provider [\#521](https://github.com/fzaninotto/Faker/pull/521) ([SpaceK33z](https://github.com/SpaceK33z)) +* Fixed Russian (ru\_RU) Address provider [\#518](https://github.com/fzaninotto/Faker/pull/518) ([glagola](https://github.com/glagola)) +* Added Italian (it\_IT) Text provider [\#517](https://github.com/fzaninotto/Faker/pull/517) ([endelwar](https://github.com/endelwar)) +* Added Norwegian (no\_NO) locale [\#515](https://github.com/fzaninotto/Faker/pull/515) ([phaza](https://github.com/phaza)) +* Added VAT number to Bulgarian (bg\_BG) Payment provider [\#512](https://github.com/fzaninotto/Faker/pull/512) ([ronanguilloux](https://github.com/ronanguilloux)) +* Fixed UserAgent provider outdated user agents [\#511](https://github.com/fzaninotto/Faker/pull/511) ([ajbdev](https://github.com/ajbdev)) +* Fixed `image()` formatter to make it work with temp dir of any (decent) OS [\#507](https://github.com/fzaninotto/Faker/pull/507) ([ronanguilloux](https://github.com/ronanguilloux)) +* Added Persian (fa\_IR) locale [\#500](https://github.com/fzaninotto/Faker/pull/500) ([zoli](https://github.com/zoli)) +* Added Currency Code formatter [\#497](https://github.com/fzaninotto/Faker/pull/497) ([stelgenhof](https://github.com/stelgenhof)) +* Added VAT number to Belgium (be_BE) Payment provider [\#495](https://github.com/fzaninotto/Faker/pull/495) ([ronanguilloux](https://github.com/ronanguilloux)) +* Fixed `imageUrl` formatter bug where it would always return the same image [\#494](https://github.com/fzaninotto/Faker/pull/494) ([fzaninotto](https://github.com/fzaninotto)) +* Added more Indonesian (id\_ID) providers [\#493](https://github.com/fzaninotto/Faker/pull/493) ([deerawan](https://github.com/deerawan)) +* Added Indonesian (id\_ID) locale [\#492](https://github.com/fzaninotto/Faker/pull/492) ([stoutZero](https://github.com/stoutZero)) +* Fixed unique generator performance [\#491](https://github.com/fzaninotto/Faker/pull/491) ([ikwattro](https://github.com/ikwattro)) +* Added transliterator to `email` and `username` [\#490](https://github.com/fzaninotto/Faker/pull/490) ([fzaninotto](https://github.com/fzaninotto)) +* Added Hungarian (hu\_HU) Text provider [\#486](https://github.com/fzaninotto/Faker/pull/486) ([lintaba](https://github.com/lintaba)) +* Fixed CakePHP Entity Popolator (some cases where no entities prev. inserted) [\#483](https://github.com/fzaninotto/Faker/pull/483) ([jadb](https://github.com/jadb)) +* Added Color and DateTime Turkish (tr\_TR) Providers [\#481](https://github.com/fzaninotto/Faker/pull/481) ([behramcelen](https://github.com/behramcelen)) +* Added Latvian (lv\_LV) `personalIdentityNumber` formatter [\#472](https://github.com/fzaninotto/Faker/pull/472) ([MatissJanis](https://github.com/MatissJanis)) +* Added VAT number to Austrian (at_AT) Payment provider [\#470](https://github.com/fzaninotto/Faker/pull/470) ([ronanguilloux](https://github.com/ronanguilloux)) +* Fixed missing @return phpDoc in Payment provider [\#469](https://github.com/fzaninotto/Faker/pull/469) ([ronanguilloux](https://github.com/ronanguilloux)) +* Added SWIFT/BIC payment type formatter to the Payment provider [\#465](https://github.com/fzaninotto/Faker/pull/465) ([ronanguilloux](https://github.com/ronanguilloux)) +* Fixed small typo in Base provider exception [\#460](https://github.com/fzaninotto/Faker/pull/460) ([miclf](https://github.com/miclf)) +* Added Georgian (ka\_Ge) locale [\#457](https://github.com/fzaninotto/Faker/pull/457) ([lperto](https://github.com/lperto)) +* Added PSR-4 Autoloading [\#455](https://github.com/fzaninotto/Faker/pull/455) ([GrahamCampbell](https://github.com/GrahamCampbell)) +* Added Uganda (en_UG) locale [\#454](https://github.com/fzaninotto/Faker/pull/454) ([tharoldD](https://github.com/tharoldD)) +* Added `regexify` formatter, generating a random string based on a regular expression [\#453](https://github.com/fzaninotto/Faker/pull/453) ([fzaninotto](https://github.com/fzaninotto)) +* Added shuffle formatter, to shuffle an array or a string [\#452](https://github.com/fzaninotto/Faker/pull/452) ([fzaninotto](https://github.com/fzaninotto)) +* Added ISBN-10 & ISBN-13 codes formatters to Barcode provider [\#451](https://github.com/fzaninotto/Faker/pull/451) ([gietos](https://github.com/gietos)) +* Fixed Russian (ru\_RU) middle names (different for different genders) [\#450](https://github.com/fzaninotto/Faker/pull/450) ([gietos](https://github.com/gietos)) +* Fixed Ukranian (uk\_UA) Person provider [\#448](https://github.com/fzaninotto/Faker/pull/448) ([aivus](https://github.com/aivus)) +* Added Vietnamese (vi\_VN) locale [\#447](https://github.com/fzaninotto/Faker/pull/447) ([huy95](https://github.com/huy95)) +* Added type hint to the Documentor constructor [\#446](https://github.com/fzaninotto/Faker/pull/446) ([JeroenDeDauw](https://github.com/JeroenDeDauw)) +* Fixed Russian (ru\_RU) Person provider (joined names) [\#445](https://github.com/fzaninotto/Faker/pull/445) ([aivus](https://github.com/aivus)) +* Added English (en\_GB) `mobileNumber` methods [\#438](https://github.com/fzaninotto/Faker/pull/438) ([daveblake](https://github.com/daveblake)) +* Added Traditional Chinese (zh\_TW) Realtext provider [\#434](https://github.com/fzaninotto/Faker/pull/434) ([tzhuan](https://github.com/tzhuan)) +* Fixed first name in Spanish for Argentina (es\_AR) Person provider [\#433](https://github.com/fzaninotto/Faker/pull/433) ([fzaninotto](https://github.com/fzaninotto)) +* Fixed Canadian (en_CA) state abbreviation for Nunavut [\#430](https://github.com/fzaninotto/Faker/pull/430) ([julien-c](https://github.com/julien-c)) +* Added CakePHP ORM entity populator [\#428](https://github.com/fzaninotto/Faker/pull/428) ([jadb](https://github.com/jadb)) +* Added Traditional Chinese (zh\_TW) locale [\#427](https://github.com/fzaninotto/Faker/pull/427) ([tzhuan](https://github.com/tzhuan)) +* Fixed typo in Doctrine Populator phpDoc [\#425](https://github.com/fzaninotto/Faker/pull/425) ([ihsanudin](https://github.com/ihsanudin)) +* Added Chinese (zh_CN) Internet provider [\#424](https://github.com/fzaninotto/Faker/pull/424) ([Lisso-Me](https://github.com/Lisso-Me)) +* Added Country ISO 3166-1 alpha-3 code to the Miscellaneous provider[\#422](https://github.com/fzaninotto/Faker/pull/422) ([gido](https://github.com/gido)) +* Added English (en\_GB) Person provider [\#421](https://github.com/fzaninotto/Faker/pull/421) ([AlexCutts](https://github.com/AlexCutts)) +* Added missing tests for the Color Provider [\#420](https://github.com/fzaninotto/Faker/pull/420) ([bessl](https://github.com/bessl)) +* Added Nepali (ne\_NP) locale [\#419](https://github.com/fzaninotto/Faker/pull/419) ([ankitpokhrel](https://github.com/ankitpokhrel)) +* Fixed latitude and longitude formatters bug (numeric value out of range for 32bits) [\#416](https://github.com/fzaninotto/Faker/pull/416) ([fzaninotto](https://github.com/fzaninotto)) +* Added a dedicated calculator Luhn calculator service [\#414](https://github.com/fzaninotto/Faker/pull/414) ([fzaninotto](https://github.com/fzaninotto)) +* Fixed Russian (ru_RU) Person provider (removed lowercase duplications) [\#413](https://github.com/fzaninotto/Faker/pull/413) ([Ragazzo](https://github.com/Ragazzo)) +* Fixed barcode formatter (improved speed, added tests) [\#412](https://github.com/fzaninotto/Faker/pull/412) ([fzaninotto](https://github.com/fzaninotto)) +* Added ipv4 and barcode formatters tests [\#410](https://github.com/fzaninotto/Faker/pull/410) ([bessl](https://github.com/bessl)) +* Fixed typos in various comments blocks [\#409](https://github.com/fzaninotto/Faker/pull/409) ([bessl](https://github.com/bessl)) +* Fixed InternetTest (replaced regex with PHP filter) [\#406](https://github.com/fzaninotto/Faker/pull/406) ([bessl](https://github.com/bessl)) +* Added password formatter to the Internet provider[\#402](https://github.com/fzaninotto/Faker/pull/402) ([fzaninotto](https://github.com/fzaninotto)) +* Added Company and Internet Austrian (de\_AT) Providers [\#400](https://github.com/fzaninotto/Faker/pull/400) ([bessl](https://github.com/bessl)) +* Added third-party libraries section in README [\#399](https://github.com/fzaninotto/Faker/pull/399) ([fzaninotto](https://github.com/fzaninotto)) +* Added Spanish for Venezuela (es\_VE) locale [\#398](https://github.com/fzaninotto/Faker/pull/398) ([DIOHz0r](https://github.com/DIOHz0r)) +* Added PhoneNumber Autrian (de\_AT) Provider, and missing test for the 'locale' method. [\#395](https://github.com/fzaninotto/Faker/pull/395) ([bessl](https://github.com/bessl)) +* Removed wrongly localized Lorem provider [\#394](https://github.com/fzaninotto/Faker/pull/394) ([fzaninotto](https://github.com/fzaninotto)) +* Fixed Miscellaneous provider (made the `locale` formatter static) [\#390](https://github.com/fzaninotto/Faker/pull/390) ([bessl](https://github.com/bessl)) +* Added a unit test file for the Miscellaneous Provider [\#389](https://github.com/fzaninotto/Faker/pull/389) ([bessl](https://github.com/bessl)) +* Added warning in README about using `rand()`` and the seed functions [\#386](https://github.com/fzaninotto/Faker/pull/386) ([paulvalla](https://github.com/paulvalla)) +* Fixed French (fr\_FR) Person provider (Uppercased a first name) [\#385](https://github.com/fzaninotto/Faker/pull/385) ([netcarver](https://github.com/netcarver)) +* Added Russian (ru\_RU) and Ukrainian (uk\_UA) Text providers [\#383](https://github.com/fzaninotto/Faker/pull/383) ([terion-name](https://github.com/terion-name)) +* Added more street prefixes to French (fr\_FR) Address provider [\#381](https://github.com/fzaninotto/Faker/pull/381) ([ronanguilloux](https://github.com/ronanguilloux)) +* Added PHP 5.6 to CI targets [\#378](https://github.com/fzaninotto/Faker/pull/378) ([GrahamCampbell](https://github.com/GrahamCampbell)) +* Fixed spaces remaining at the end of liine in various files [\#377](https://github.com/fzaninotto/Faker/pull/377) ([GrahamCampbell](https://github.com/GrahamCampbell)) +* Fixed UserAgent provider (added space before processor on linux platform) [\#374](https://github.com/fzaninotto/Faker/pull/374) ([TomK](https://github.com/TomK)) +* Added Company generator for Russian (ru\_RU) locale [\#371](https://github.com/fzaninotto/Faker/pull/371) ([kix](https://github.com/kix)) +* Fixed Russian (ru\_RU) Color provider (uppercase letters) [\#370](https://github.com/fzaninotto/Faker/pull/370) ([semanser](https://github.com/semanser)) +* Added more Polish (pl\_PL) phone numbers [\#369](https://github.com/fzaninotto/Faker/pull/369) ([piotrantosik](https://github.com/piotrantosik)) +* Fixed Ruby Faker link in readme [\#368](https://github.com/fzaninotto/Faker/pull/368) ([philsturgeon](https://github.com/philsturgeon)) +* Added more Japanese (ja\_JP) names in Person provider [\#366](https://github.com/fzaninotto/Faker/pull/366) ([kumamidori](https://github.com/kumamidori)) +* Added Slovenian (sl\_SL) locale [\#363](https://github.com/fzaninotto/Faker/pull/363) ([alesf](https://github.com/alesf)) +* Fixed German (de\_DE) Person provider (first names) [\#362](https://github.com/fzaninotto/Faker/pull/362) ([mikehaertl](https://github.com/mikehaertl)) +* Fixed Ukrainian (uk\_UA) Person providr (there is no such letter "ы" in Ukrainian) [\#359](https://github.com/fzaninotto/Faker/pull/359) ([nazar-pc](https://github.com/nazar-pc)) +* Fixed Chinese (zh\_CN) PhoneNumber provider (the length of mobile phone number is 11) [\#358](https://github.com/fzaninotto/Faker/pull/358) ([byan](https://github.com/byan)) +* Added Arabic (ar_\JO) Locale [\#357](https://github.com/fzaninotto/Faker/pull/357) ([zrashwani](https://github.com/zrashwani)) +* Fixed Czech (cs\_CZ) Person provider (missing lowercase in last name) [\#355](https://github.com/fzaninotto/Faker/pull/355) ([halaxa](https://github.com/halaxa)) +* Fixed French for Belgium (fr\_BE) Address Provider (doubled city names) [\#354](https://github.com/fzaninotto/Faker/pull/354) ([miclf](https://github.com/miclf)) +* Added Biased Integer Provider [\#332](https://github.com/fzaninotto/Faker/pull/332) ([TimWolla](https://github.com/TimWolla)) +* Added Swedish (sv\_SE) locale [\#316](https://github.com/fzaninotto/Faker/pull/316) ([ulrikjohansson](https://github.com/ulrikjohansson)) +* 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 +------------------ + +* Fixed typo in Slovak person names (cinan) +* Added tests for uk_UA providers (serge-kuharev) +* Fixed numerify() performance by making it 30% faster (fzaninotto) +* Added strict option to randomNumber to force number of digits (fzaninotto) +* Fixed randomNumber usage duplicating numberBetween (fzaninotto) +* Fixed address provider for latvian language (MatissJA) +* Added Czech Republic (cs_CZ) address, company, datetime and text providers (Mikulas) +* Fixed da_DK Person provider data containing an 'unnamed' person (tolnem) +* Added slug provider (fzaninotto) +* Fixed IDE insights for new local IP and MAC address providers (hugofonseca) +* Added firstname gender method to all Person providers (csanquer) +* Fixed tr_TR email service, city name, person, and phone number formats (ogunkarakus) +* Fixed US_en state list (fzaninotto) +* Fixed en_US address provider so state abbr are ISO 3166 codes (Garbee) +* Added local IP and MAC address providers (kielabokkie) +* Fixed typo in century list affecting the century provider (fzaninotto) +* Added default value to optional modifier (joshuajabbour) +* Fixed Portuguese phonenumbers have 9 digits (hugofonseca) +* Added fileCopy to File provider to simulate file upload (stefanosala) +* Added pt_PT providers (hugofonseca) +* Fixed dead code in text provider (hugofonseca) +* Fixed IDE insights for magic properties (hugofonseca) +* Added tin (NIF) generator for pt_PT provider (hugofonseca) +* Fixed numberBetween max default value handling (fzaninotto) +* Added pt_PT phone number provider (hugofonseca) +* Fixed PSR-2 standards and add make task to force it on Travis (terite) +* Added new ro_RO Personal Numerical Code (CNP) and phone number providers (avataru) +* Fixed Internet provider for sk_SK locale (cinan) +* Fixed typo in en_ZA Internet provider (bjorntheart) +* Fixed phpdoc for DateTime magic methods (stof) +* Added doc about seeding with maximum timestamp using dateTime formatters (fzaninotto) +* Added Maximum Timestamp option to get always same unix timestamp when using a fixed seed (csanquer) +* Added Montenegrian (me_ME) providers (ognjenm) +* Added ean barcode provider (nineinchnick) +* Added fullPath parameter to Image provider (stefanosala) +* Added more Polish company formats (nineinchnick) +* Added Polish realText provider (nineinchnick) +* Fixed remaining non-seedable random generators (terite) +* Added randomElements provider (terite) +* Added French realText provider (fzaninotto) +* Fixed realText provider bootstrap slowness (fzaninotto) +* Added realText provider for English and German, based on Markov Chains Generator (TimWolla) +* Fixed address format in nl_NL provider (doenietzomoeilijk) +* Fixed potentially offensive word from last name list (joshuajabbour) +* Fixed reamde documentation about the optional modifier (cryode) +* Fixed Image provider and documentor routine (fzaninotto) +* Fixed IDE insights for methods (PedroTroller) +* Fixed missing data in en_US Address provider (Garbee) +* Added Bengali (bn_BD) providers (masnun) +* Fixed warning on test file when short tags are on (bateller) +* Fixed Doctrine populator undefined index warning (dbojdo) +* Added French Canadian (fr_CA) Address and Person providers (marcaube) +* Fixed typo in NullGenerator (mhanson01) +* Fixed Doctrine populator issue with one-to-one nullable relationship (jpetitcolas) +* Added Canadian English (en_CA) address and phone number providers (cviebrock) +* Fixed duplicated Payment example in readme (Garbee) +* Fixed Polish (pl_PL) Person provider data (czogori) +* Added Hungarian (hu_HU) providers (sagikazarmark) +* 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 +------------------ + +* Fixed state generator in Australian (en_AU) provider (sebklaus) +* Fixed IDE insights for locale specific providers (ulrikjohansson) +* Added English (South Africa) (en_ZA) person, address, Internet and phone number providers (dmfaux) +* Fixed integer values overflowing on signed INTEGER columns on Doctrine populator (Thinkscape) +* Fixed spelling error in French (fr_FR) address provider (leihog) +* Added improvements based on SensioLabsInsights analysis +* Fixed Italian (it_IT) email provider (garak) +* Added Spanish (es_ES) Internet provider (eusonlito) +* Added English Philippines (en_PH) address provider (kamote) +* Added Brazilian (pt_BR) email provider data (KennedyTedesco) +* Fixed UK country code (pgscandeias) +* Added Peruvian (es_PE) person, address, phone number, and company providers (cslucano) +* Added Ukrainian (uk_UA) color provider (ruden) +* Fixed Ukrainian (uk_UA) namespace and email translitteration (ruden) +* Added Romanian (Moldova) (ro_MD) person, address, and phone number providers (AlexanderC) +* Added IBAN generator for every currently known locale that uses it (nineinchnick) +* Added Image generation powered by LoremPixel (weotch) +* Fixed missing timezone with dateTimeBetween (baldurrensch) +* Fixed call to undefined method cardType in Payment (WMeldon) +* Added Romanian (ro_RO) address and person providers (calina-c) +* Fixed Doctrine populator to use ObjectManager instead of EntityManagerInterface (mgiustiniani) +* Fixed docblock for Provider\Base::unique() (pschultz) +* Added Payment providers (creditCardType, creditCardNumber, creditCardExpirationDate, creditCardExpirationDateString) (pomaxa) +* Added unique() modifier +* Added IDE insights to allow better intellisense/phpStorm autocompletion (thallisphp) +* Added Polish (pl_PL) address provider, personal identity number and pesel number generator (nineinchnick) +* Added Turkish (tr_TR) address provider, and improved internet provider (hasandz) +* Fixed Propel column number guesser to use signed range of values (gunnarlium) +* Added Greek (el_GR) person, address, and phone number providers (georgeharito) +* Added Austrian (en_AU) address, Internet, and phone number providers (rcuddy) +* Fixed phpDoc in Doctrine Entity populator (rogamoore) +* Added French (fr_FR) phone number formats (vchabot) +* Added optional() modifier (weotch) +* Fixed typo in the Person provider documentation (jtreminio) +* Fixed Russian (ru_RU) person format (alexshadow007) +* Added Japanese (ja_JP) person, address, Internet, phone number, and company providers (kumamidori) +* Added color providers, driver license and passport number formats for the ru_RU locale (pomaxa) +* Added Latvian (lv_LV) person, address, Internet, and phone number providers (pomaxa) +* Added Brazilian (pt_BR) Internet provider (vjnrv) +* Added more Czech (cs_CZ) lastnames (petrkle) +* Added Chinese Simplified (zh_CN) person, address, Internet, and phone number providers (tlikai) +* Fixed Typos (pborelli) +* 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 +------------------ + +* Added new provider for fr_BE locale (jflefebvre) +* Updated locale provider to use a static locale list (spawn-guy) +* Fixed invalid UTF-8 sequence in domain provider with the Bulgarian provider (Dynom) +* Fixed the nl_NL Person provider (Dynom) +* Removed all requires and added the autoload definition to composer (Dynom) +* Fixed encoding problems in nl_NL Address provider (Dynom) +* Added icelandic provider (is_IS) (birkir) +* Added en_CA address and phone numbers (cviebrock) +* Updated safeEmail provider to be really safe (TimWolla) +* Documented alternative randomNumber usage (Seldaek) +* Added basic file provider (anroots) +* Fixed use of fourth argument on Doctrine addEntity (ecentinela) +* Added nl_BE provider (wimvds) +* Added Random Float provider (csanquer) +* Fixed bug in Faker\ORM\Doctrine\Populator (mmf-amarcos) +* Updated ru_RU provider (rmrevin) +* Added safe email domain provider (csanquer) +* Fixed latitude provider (rumpl) +* Fixed unpredictability of fake data generated by Faker\Provider\Base::numberBetween() (goatherd) +* Added uuid provider (goatherd) +* Added possibility to call methods on Doctrine entities, possibility to generate unique id (nenadalm) +* Fixed prefixes typos in 'pl_PL' Person provider (krymen) +* Added more fake data to the Ukraininan providers (lysenkobv) +* Added more fake data to the Italian providers (EmanueleMinotto) +* Fixed spaces appearing in generated emails (alchy58) +* Added Armenian (hy_AM) provider (artash) +* Added Generation of valid SIREN & SIRET codes to French providers (alexsegura) +* Added Dutch (nl_NL) provider (WouterJ) +* Fixed missing typehint in Base::__construct() (benja-M-1) +* Fixed typo in README (benja-M-1) +* Added Ukrainian (ua_UA) provider (rsvasilyev) +* Added Turkish (tr_TR) Provider (faridmovsumov) +* Fixed executable bit in some PHP files (siwinski) +* Added Brazilian Portuguese (pt_BR) provider (oliveiraev) +* Added Spanish (es_ES) provider (ivannis) +* Fixed Doctrine populator to allow for the population of entity data that has associations to other entities (afishnamedsquish) +* Added Danish (da_DK) providers (toin0u) +* Cleaned up whitespaces (toin0u) +* Fixed utf-8 bug with lowercase generators (toin0u) +* Fixed composer.json (Seldaek) +* Fixed bug in Doctrine EntityPopulator (beberlei) +* Added Finnish (fi_FI) provider (drodil) + +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) +* Added random number generator between a and b, simply like rand() (Seldaek) +* Fixed spaces in generated emails (blaugueux) +* Fixed Person provider in Russian locale (Isamashii) +* Added new UserAgent provider (blaugueux) +* Added locale generator to Miscellaneous provider (blaugueux) +* Added timezone generator to DateTime provider (blaugueux) +* Added new generators to French Address providers (departments, regions) (geoffrey-brier) +* Added new generators to French Company provider (catch phrase, SIREN, and SIRET numbers) (geoffrey-brier) +* Added state generator to German Address provider (Powerhamster) +* Added Slovak provider (bazo) +* Added latitude and longitude formatters to Address provider (fixe) +* Added Serbian provider (umpirsky) + +2012-07-10, v1.0.0 +----------------- + +* Initial Version diff --git a/vendor/fzaninotto/faker/CONTRIBUTING.md b/vendor/fzaninotto/faker/CONTRIBUTING.md new file mode 100644 index 0000000..804bf79 --- /dev/null +++ b/vendor/fzaninotto/faker/CONTRIBUTING.md @@ -0,0 +1,22 @@ +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/vendor/fzaninotto/faker/LICENSE b/vendor/fzaninotto/faker/LICENSE new file mode 100644 index 0000000..99ed007 --- /dev/null +++ b/vendor/fzaninotto/faker/LICENSE @@ -0,0 +1,22 @@ +Copyright (c) 2011 François Zaninotto +Portions Copyright (c) 2008 Caius Durling +Portions Copyright (c) 2008 Adam Royle +Portions Copyright (c) 2008 Fiona Burrows + +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/vendor/fzaninotto/faker/Makefile b/vendor/fzaninotto/faker/Makefile new file mode 100644 index 0000000..ad0bb40 --- /dev/null +++ b/vendor/fzaninotto/faker/Makefile @@ -0,0 +1,10 @@ +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/vendor/fzaninotto/faker/composer.json b/vendor/fzaninotto/faker/composer.json new file mode 100644 index 0000000..1bf3497 --- /dev/null +++ b/vendor/fzaninotto/faker/composer.json @@ -0,0 +1,35 @@ +{ + "name": "fzaninotto/faker", + "type": "library", + "description": "Faker is a PHP library that generates fake data for you.", + "keywords": ["faker", "fixtures", "data"], + "license": "MIT", + "authors": [ + { + "name": "François Zaninotto" + } + ], + "require": { + "php": "^5.3.3|^7.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "~1.5", + "ext-intl": "*" + }, + "autoload": { + "psr-4": { + "Faker\\": "src/Faker/" + } + }, + "autoload-dev": { + "psr-4": { + "Faker\\Test\\": "test/Faker/" + } + }, + "extra": { + "branch-alias": { + "dev-master": "1.6.0" + } + } +} diff --git a/vendor/fzaninotto/faker/phpunit.xml.dist b/vendor/fzaninotto/faker/phpunit.xml.dist new file mode 100644 index 0000000..4ffa17f --- /dev/null +++ b/vendor/fzaninotto/faker/phpunit.xml.dist @@ -0,0 +1,12 @@ + + + + + + ./test/Faker/ + + + diff --git a/vendor/fzaninotto/faker/readme.md b/vendor/fzaninotto/faker/readme.md new file mode 100644 index 0000000..ccb47f4 --- /dev/null +++ b/vendor/fzaninotto/faker/readme.md @@ -0,0 +1,1287 @@ +# 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). + +Faker requires PHP >= 5.3.3. + +[![Monthly Downloads](https://poser.pugx.org/fzaninotto/faker/d/monthly.png)](https://packagist.org/packages/fzaninotto/faker) [![Build Status](https://travis-ci.org/fzaninotto/Faker.svg?branch=master)](https://travis-ci.org/fzaninotto/Faker) [![SensioLabsInsight](https://insight.sensiolabs.com/projects/eceb78a9-38d4-4ad5-8b6b-b52f323e3549/mini.png)](https://insight.sensiolabs.com/projects/eceb78a9-38d4-4ad5-8b6b-b52f323e3549) + +# Table of Contents + +- [Installation](#installation) +- [Basic Usage](#basic-usage) +- [Formatters](#formatters) + - [Base](#fakerproviderbase) + - [Lorem Ipsum Text](#fakerproviderlorem) + - [Person](#fakerprovideren_usperson) + - [Address](#fakerprovideren_usaddress) + - [Phone Number](#fakerprovideren_usphonenumber) + - [Company](#fakerprovideren_uscompany) + - [Real Text](#fakerprovideren_ustext) + - [Date and Time](#fakerproviderdatetime) + - [Internet](#fakerproviderinternet) + - [User Agent](#fakerprovideruseragent) + - [Payment](#fakerproviderpayment) + - [Color](#fakerprovidercolor) + - [File](#fakerproviderfile) + - [Image](#fakerproviderimage) + - [Uuid](#fakerprovideruuid) + - [Barcode](#fakerproviderbarcode) + - [Miscellaneous](#fakerprovidermiscellaneous) + - [Biased](#fakerproviderbiased) +- [Modifiers](#modifiers) +- [Localization](#localization) +- [Populating Entities Using an ORM or an ODM](#populating-entities-using-an-orm-or-an-odm) +- [Seeding the Generator](#seeding-the-generator) +- [Faker Internals: Understanding Providers](#faker-internals-understanding-providers) +- [Real Life Usage](#real-life-usage) +- [Language specific formatters](#language-specific-formatters) +- [Third-Party Libraries Extending/Based On Faker](#third-party-libraries-extendingbased-on-faker) +- [License](#license) + + +## Installation + +```sh +composer require fzaninotto/faker +``` + +## Basic Usage + +Use `Faker\Factory::create()` to create and initialize a faker generator, which can generate data by accessing properties named after the type of data you want. + +```php +name; + // 'Lucy Cechtelar'; +echo $faker->address; + // "426 Jordy Lodge + // Cartwrightshire, SC 88120-6700" +echo $faker->text; + // Dolores sit sint laboriosam dolorem culpa et autem. Beatae nam sunt fugit + // et sit et mollitia sed. + // Fuga deserunt tempora facere magni omnis. Omnis quia temporibus laudantium + // sit minima sint. +``` + +Even if this example shows a property access, each call to `$faker->name` yields a different (random) result. This is because Faker uses `__get()` magic, and forwards `Faker\Generator->$property` calls to `Faker\Generator->format($property)`. + +```php +name, "\n"; +} + // Adaline Reichel + // Dr. Santa Prosacco DVM + // Noemy Vandervort V + // Lexi O'Conner + // Gracie Weber + // Roscoe Johns + // Emmett Lebsack + // Keegan Thiel + // Wellington Koelpin II + // Ms. Karley Kiehn V +``` + +**Tip**: For a quick generation of fake data, you can also use Faker as a command line tool thanks to [faker-cli](https://github.com/bit3/faker-cli). + +## Formatters + +Each of the generator properties (like `name`, `address`, and `lorem`) are called "formatters". A faker generator has many of them, packaged in "providers". Here is a list of the bundled formatters in the default locale. + +### `Faker\Provider\Base` + + randomDigit // 7 + randomDigitNotNull // 5 + randomNumber($nbDigits = NULL) // 79907610 + randomFloat($nbMaxDecimals = NULL, $min = 0, $max = NULL) // 48.8932 + numberBetween($min = 1000, $max = 9000) // 8567 + randomLetter // 'b' + // returns randomly ordered subsequence of a provided array + randomElements($array = array ('a','b','c'), $count = 1) // array('c') + randomElement($array = array ('a','b','c')) // 'b' + shuffle('hello, world') // 'rlo,h eoldlw' + shuffle(array(1, 2, 3)) // array(2, 1, 3) + numerify('Hello ###') // 'Hello 609' + lexify('Hello ???') // 'Hello wgt' + bothify('Hello ##??') // 'Hello 42jz' + asciify('Hello ***') // 'Hello R6+' + regexify('[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}'); // sm0@y8k96a.ej + +### `Faker\Provider\Lorem` + + word // 'aut' + words($nb = 3, $asText = false) // array('porro', 'sed', 'magni') + sentence($nbWords = 6, $variableNbWords = true) // 'Sit vitae voluptas sint non voluptates.' + sentences($nb = 3, $asText = false) // array('Optio quos qui illo error.', 'Laborum vero a officia id corporis.', 'Saepe provident esse hic eligendi.') + paragraph($nbSentences = 3, $variableNbSentences = true) // 'Ut ab voluptas sed a nam. Sint autem inventore aut officia aut aut blanditiis. Ducimus eos odit amet et est ut eum.' + paragraphs($nb = 3, $asText = false) // array('Quidem ut sunt et quidem est accusamus aut. Fuga est placeat rerum ut. Enim ex eveniet facere sunt.', 'Aut nam et eum architecto fugit repellendus illo. Qui ex esse veritatis.', 'Possimus omnis aut incidunt sunt. Asperiores incidunt iure sequi cum culpa rem. Rerum exercitationem est rem.') + text($maxNbChars = 200) // 'Fuga totam reiciendis qui architecto fugiat nemo. Consequatur recusandae qui cupiditate eos quod.' + +### `Faker\Provider\en_US\Person` + + title($gender = null|'male'|'female') // 'Ms.' + titleMale // 'Mr.' + titleFemale // 'Ms.' + suffix // 'Jr.' + name($gender = null|'male'|'female') // 'Dr. Zane Stroman' + firstName($gender = null|'male'|'female') // 'Maynard' + firstNameMale // 'Maynard' + firstNameFemale // 'Rachel' + lastName // 'Zulauf' + +### `Faker\Provider\en_US\Address` + + cityPrefix // 'Lake' + secondaryAddress // 'Suite 961' + state // 'NewMexico' + stateAbbr // 'OH' + citySuffix // 'borough' + streetSuffix // 'Keys' + buildingNumber // '484' + city // 'West Judge' + streetName // 'Keegan Trail' + streetAddress // '439 Karley Loaf Suite 897' + postcode // '17916' + address // '8888 Cummings Vista Apt. 101, Susanbury, NY 95473' + country // 'Falkland Islands (Malvinas)' + latitude($min = -90, $max = 90) // 77.147489 + longitude($min = -180, $max = 180) // 86.211205 + +### `Faker\Provider\en_US\PhoneNumber` + + phoneNumber // '201-886-0269 x3767' + tollFreePhoneNumber // '(888) 937-7238' + e164PhoneNumber // '+27113456789' + +### `Faker\Provider\en_US\Company` + + catchPhrase // 'Monitored regional contingency' + bs // 'e-enable robust architectures' + company // 'Bogan-Treutel' + companySuffix // 'and Sons' + jobTitle // 'Cashier' + +### `Faker\Provider\en_US\Text` + + realText($maxNbChars = 200, $indexSize = 2) // "And yet I wish you could manage it?) 'And what are they made of?' Alice asked in a shrill, passionate voice. 'Would YOU like cats if you were never even spoke to Time!' 'Perhaps not,' Alice replied." + +### `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') + 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') + amPm($max = 'now') // 'pm' + dayOfMonth($max = 'now') // '04' + dayOfWeek($max = 'now') // 'Friday' + month($max = 'now') // '06' + monthName($max = 'now') // 'January' + year($max = 'now') // '1993' + century // 'VI' + timezone // 'Europe/Paris' + +### `Faker\Provider\Internet` + + email // 'tkshlerin@collins.com' + safeEmail // 'king.alford@example.org' + freeEmail // 'bradley72@gmail.com' + companyEmail // 'russel.durward@mcdermott.org' + freeEmailDomain // 'yahoo.com' + safeEmailDomain // 'example.org' + userName // 'wade55' + password // 'k&|X+a45*2[' + domainName // 'wolffdeckow.net' + domainWord // 'feeney' + tld // 'biz' + url // 'http://www.skilesdonnelly.biz/aut-accusantium-ut-architecto-sit-et.html' + slug // 'aut-repellat-commodi-vel-itaque-nihil-id-saepe-nostrum' + ipv4 // '109.133.32.252' + localIpv4 // '10.242.58.8' + ipv6 // '8e65:933d:22ee:a232:f1c1:2741:1f10:117c' + macAddress // '43:85:B7:08:10:CA' + +### `Faker\Provider\UserAgent` + + userAgent // 'Mozilla/5.0 (Windows CE) AppleWebKit/5350 (KHTML, like Gecko) Chrome/13.0.888.0 Safari/5350' + chrome // 'Mozilla/5.0 (Macintosh; PPC Mac OS X 10_6_5) AppleWebKit/5312 (KHTML, like Gecko) Chrome/14.0.894.0 Safari/5312' + firefox // 'Mozilla/5.0 (X11; Linuxi686; rv:7.0) Gecko/20101231 Firefox/3.6' + safari // 'Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_7_1 rv:3.0; en-US) AppleWebKit/534.11.3 (KHTML, like Gecko) Version/4.0 Safari/534.11.3' + opera // 'Opera/8.25 (Windows NT 5.1; en-US) Presto/2.9.188 Version/10.00' + internetExplorer // 'Mozilla/5.0 (compatible; MSIE 7.0; Windows 98; Win 9x 4.90; Trident/3.0)' + +### `Faker\Provider\Payment` + + creditCardType // 'MasterCard' + creditCardNumber // '4485480221084675' + creditCardExpirationDate // 04/13 + creditCardExpirationDateString // '04/13' + creditCardDetails // array('MasterCard', '4485480221084675', 'Aleksander Nowak', '04/13') + // Generates a random IBAN. Set $countryCode to null for a random country + iban($countryCode) // 'IT31A8497112740YZ575DJ28BP4' + swiftBicNumber // 'RZTIAT22263' + +### `Faker\Provider\Color` + + hexcolor // '#fa3cc2' + rgbcolor // '0,255,122' + rgbColorAsArray // array(0,255,122) + rgbCssColor // 'rgb(0,255,122)' + safeColorName // 'fuchsia' + colorName // 'Gainsbor' + +### `Faker\Provider\File` + + fileExtension // 'avi' + mimeType // 'video/x-msvideo' + // Copy a random file from the source to the target directory and returns the fullpath or filename + file($sourceDir = '/tmp', $targetDir = '/tmp') // '/path/to/targetDir/13b73edae8443990be1aa8f1a483bc27.jpg' + file($sourceDir, $targetDir, false) // '13b73edae8443990be1aa8f1a483bc27.jpg' + +### `Faker\Provider\Image` + + // Image generation provided by LoremPixel (http://lorempixel.com/) + 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' + 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 + +### `Faker\Provider\Uuid` + + uuid // '7e57d004-2b97-0e7a-b45f-5387367791cd' + +### `Faker\Provider\Barcode` + + ean13 // '4006381333931' + ean8 // '73513537' + isbn13 // '9790404436093' + isbn10 // '4881416324' + +### `Faker\Provider\Miscellaneous` + + boolean // false + boolean($chanceOfGettingTrue = 50) // true + md5 // 'de99a620c50f2990e87144735cd357e7' + sha1 // 'f08e7f04ca1a413807ebc47551a40a20a0b4de5c' + sha256 // '0061e4c60dac5c1d82db0135a42e00c89ae3a333e7c26485321f24348c7e98a5' + locale // en_UK + countryCode // UK + languageCode // en + currencyCode // EUR + +### `Faker\Provider\Biased` + + // get a random number between 10 and 20, + // with more chances to be close to 20 + biasedNumberBetween($min = 10, $max = 20, $function = 'sqrt') + +## Modifiers + +Faker provides three special providers, `unique()`, `optional()`, and `valid()`, to be called before any provider. + +```php +// unique() forces providers to return unique values +$values = array(); +for ($i=0; $i < 10; $i++) { + // get a random digit, but always a new one, to avoid duplicates + $values []= $faker->unique()->randomDigit; +} +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++) { + $values []= $faker->unique()->randomDigitNotNull; + } +} catch (\OverflowException $e) { + echo "There are only 9 unique digits not null, Faker can't generate 10 of them!"; +} + +// you can reset the unique modifier for all providers by passing true as first argument +$faker->unique($reset = true)->randomDigitNotNull; // will not throw OverflowException since unique() was reset +// tip: unique() keeps one array of values per provider + +// optional() sometimes bypasses the provider to return a default value instead (which defaults to NULL) +$values = array(); +for ($i=0; $i < 10; $i++) { + // get a random digit, but also null sometimes + $values []= $faker->optional()->randomDigit; +} +print_r($values); // [1, 4, null, 9, 5, null, null, 4, 6, null] + +// optional() accepts a weight argument to specify the probability of receiving the default value. +// 0 will always return the default value; 1 will always return the provider. Default weight is 0.5 (50% chance). +$faker->optional($weight = 0.1)->randomDigit; // 90% chance of NULL +$faker->optional($weight = 0.9)->randomDigit; // 10% chance of NULL + +// optional() accepts a default argument to specify the default value to return. +// Defaults to NULL. +$faker->optional($weight = 0.5, $default = false)->randomDigit; // 50% chance of FALSE +$faker->optional($weight = 0.9, $default = 'abc')->word; // 10% chance of 'abc' + +// valid() only accepts valid values according to the passed validator functions +$values = array(); +$evenValidator = function($digit) { + return $digit % 2 === 0; +}; +for ($i=0; $i < 10; $i++) { + $values []= $faker->valid($evenValidator)->randomDigit; +} +print_r($values); // [0, 4, 8, 4, 2, 6, 0, 8, 8, 6] + +// just like unique(), valid() throws an overflow exception when it can't generate a valid value +$values = array(); +try { + $faker->valid($evenValidator)->randomElement(1, 3, 5, 7, 9); +} catch (\OverflowException $e) { + echo "Can't pick an even number in that set!"; +} +``` + +## 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). + +```php +name, "\n"; +} + // Luce du Coulon + // Auguste Dupont + // Roger Le Voisin + // Alexandre Lacroix + // Jacques Humbert-Roy + // Thérèse Guillet-Andre + // Gilles Gros-Bodin + // Amélie Pires + // Marcel Laporte + // Geneviève Marchal +``` + +You can check available Faker locales in the source code, [under the `Provider` directory](https://github.com/fzaninotto/Faker/tree/master/src/Faker/Provider). The localization of Faker is an ongoing process, for which we need your help. Don't hesitate to create localized providers to your own locale and submit a PR! + +## 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). + +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. + +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(); +``` + +The populator uses name and column type guessers to populate each column with relevant data. For instance, Faker populates a column named `first_name` using the `firstName` formatter, and a column with a `TIMESTAMP` type using the `dateTime` formatter. The resulting entities are therefore coherent. If Faker misinterprets a column name, you can still specify a custom closure to be used for populating a particular column, using the third argument to `addEntity()`: + +```php +addEntity('Book', 5, array( + 'ISBN' => function() use ($generator) { return $generator->ean13(); } +)); +``` + +In this example, Faker will guess a formatter for all columns except `ISBN`, for which the given anonymous function will be used. + +**Tip**: To ignore some columns, specify `null` for the column names in the third argument of `addEntity()`. This is usually necessary for columns added by a behavior: + +```php +addEntity('Book', 5, array( + 'CreatedAt' => null, + 'UpdatedAt' => null, +)); +``` + +Of course, Faker does not populate autoincremented primary keys. In addition, `Faker\ORM\Propel\Populator::execute()` returns the list of inserted PKs, indexed by class: + +```php + (34, 35, 36, 37, 38), +// 'Book' => (456, 457, 458, 459, 470, 471, 472, 473, 474, 475) +// ) +``` + +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: + +```php +addEntity('Book', 5, array(), array( + function($book) { $book->publish(); }, +)); +``` + +## Seeding the Generator + +You may want to get always the same generated data - for instance when using Faker for unit testing purposes. The generator offers a `seed()` method, which seeds the random number generator. Calling the same script twice with the same seed produces the same results. + +```php +seed(1234); + +echo $faker->name; // 'Jess Mraz I'; +``` + +> **Tip**: DateTime formatters won't reproduce the same fake data if you don't fix the `$max` value: +> +> ```php +> // even when seeded, this line will return different results because $max varies +> $faker->dateTime(); // equivalent to $faker->dateTime($max = 'now') +> // make sure you fix the $max parameter +> $faker->dateTime('2014-02-25 08:37:17'); // will return always the same date when seeded +> ``` +> +> **Tip**: Formatters won't reproduce the same fake data if you use the `rand()` php function. Use `$faker` or `mt_rand()` instead: +> +> ```php +> // bad +> $faker->realText(rand(10,20)); +> // good +> $faker->realText($faker->numberBetween(10,20)); +> ``` + + + +## Faker Internals: Understanding Providers + +A `Faker\Generator` alone can't do much generation. It needs `Faker\Provider` objects to delegate the data generation to them. `Faker\Factory::create()` actually creates a `Faker\Generator` bundled with the default providers. Here is what happens under the hood: + +```php +addProvider(new Faker\Provider\en_US\Person($faker)); +$faker->addProvider(new Faker\Provider\en_US\Address($faker)); +$faker->addProvider(new Faker\Provider\en_US\PhoneNumber($faker)); +$faker->addProvider(new Faker\Provider\en_US\Company($faker)); +$faker->addProvider(new Faker\Provider\Lorem($faker)); +$faker->addProvider(new Faker\Provider\Internet($faker)); +```` + +Whenever you try to access a property on the `$faker` object, the generator looks for a method with the same name in all the providers attached to it. For instance, calling `$faker->name` triggers a call to `Faker\Provider\Person::name()`. And since Faker starts with the last provider, you can easily override existing formatters: just add a provider containing methods named after the formatters you want to override. + +That means that you can easily add your own providers to a `Faker\Generator` instance. A provider is usually a class extending `\Faker\Provider\Base`. This parent class allows you to use methods like `lexify()` or `randomNumber()`; it also gives you access to formatters of other providers, through the protected `$generator` property. The new formatters are the public methods of the provider class. + +Here is an example provider for populating Book data: + +```php +generator->sentence($nbWords); + return substr($sentence, 0, strlen($sentence) - 1); + } + + public function ISBN() + { + return $this->generator->ean13(); + } +} +``` + +To register this provider, just add a new instance of `\Faker\Provider\Book` to an existing generator: + +```php +addProvider(new \Faker\Provider\Book($faker)); +``` + +Now you can use the two new formatters like any other Faker formatter: + +```php +setTitle($faker->title); +$book->setISBN($faker->ISBN); +$book->setSummary($faker->text); +$book->setPrice($faker->randomNumber(2)); +``` + +**Tip**: A provider can also be a Plain Old PHP Object. In that case, all the public methods of the provider become available to the generator. + +## Real Life Usage + +The following script generates a valid XML document: + +```php + + + + + + +boolean(25)): ?> + + +
+ streetAddress ?> + city ?> + postcode ?> + state ?> +
+ +boolean(33)): ?> + bs ?> + +boolean(33)): ?> + + + +boolean(15)): ?> +
+text(400) ?> +]]> +
+ +
+ +
+``` + +Running this script produces a document looking like: + +```xml + + + + +
+ 182 Harrison Cove + North Lloyd + 45577 + Alabama +
+ + orchestrate compelling web-readiness + +
+ +
+
+ + +
+ 90111 Hegmann Inlet + South Geovanymouth + 69961-9311 + Colorado +
+ + +
+ + +
+ 9791 Nona Corner + Harberhaven + 74062-8191 + RhodeIsland +
+ + +
+ + +
+ 11161 Schultz Via + Feilstad + 98019 + NewJersey +
+ + + +
+ +
+
+ + +
+ 6106 Nader Village Suite 753 + McLaughlinstad + 43189-8621 + Missouri +
+ + expedite viral synergies + + +
+ + +
+ 7546 Kuvalis Plaza + South Wilfrid + 77069 + Georgia +
+ + +
+ + + +
+ 478 Daisha Landing Apt. 510 + West Lizethhaven + 30566-5362 + WestVirginia +
+ + orchestrate dynamic networks + + +
+ +
+
+ + +
+ 1251 Koelpin Mission + North Revastad + 81620 + Maryland +
+ + +
+ + +
+ 6396 Langworth Hills Apt. 446 + New Carlos + 89399-0268 + Wyoming +
+ + + +
+ + + +
+ 2246 Kreiger Station Apt. 291 + Kaydenmouth + 11397-1072 + Wyoming +
+ + grow sticky portals + +
+ +
+
+
+``` + +## Language specific formatters + +### `Faker\Provider\ar_SA\Person` + +```php +idNumber; // ID number +echo $faker->nationalIdNumber // Citizen ID number +echo $faker->foreignerIdNumber // Foreigner ID number +``` + +### `Faker\Provider\at_AT\Payment` + +```php +vat; // "AT U12345678" - Austrian Value Added Tax number +echo $faker->vat(false); // "ATU12345678" - unspaced Austrian Value Added Tax number +``` + +### `Faker\Provider\bg_BG\Payment` + +```php +vat; // "BG 0123456789" - Bulgarian Value Added Tax number +echo $faker->vat(false); // "BG0123456789" - unspaced Bulgarian Value Added Tax number +``` + +### `Faker\Provider\cs_CZ\Address` + +```php +region; // "Liberecký kraj" +``` + +### `Faker\Provider\cs_CZ\Company` + +```php +ico; // "69663963" +``` + +### `Faker\Provider\cs_CZ\DateTime` + +```php +monthNameGenitive; // "prosince" +echo $faker->formattedDate; // "12. listopadu 2015" +``` + +### `Faker\Provider\cs_CZ\Person` + +```php +birthNumber; // "7304243452" +``` + +### `Faker\Provider\da_DK\Person` + +```php +cpr; // "051280-2387" +``` + +### `Faker\Provider\da_DK\Address` + +```php +kommune; // "Frederiksberg" + +// Generates a random region name +echo $faker->region; // "Region Sjælland" +``` + +### `Faker\Provider\da_DK\Company` + +```php +cvr; // "32458723" + +// Generates a random P number +echo $faker->p; // "5398237590" +``` + +### `Faker\Provider\en_NZ\Phone` + +```php +cellNumber; // "021 123 4567" + +// Generates a toll free number +echo $faker->tollFreeNumber; // "0800 123 456" + +// Area Code +echo $faker->areaCode; // "03" +``` + +### `Faker\Provider\en_US\Payment` + +```php +bankAccountNumber; // '51915734310' +echo $faker->bankRoutingNumber; // '212240302' +``` + +### `Faker\Provider\en_ZA\Company` + +```php +companyNumber; // 1999/789634/01 +``` + +### `Faker\Provider\en_ZA\PhoneNumber` + +```php +tollFreeNumber; // 0800 555 5555 + +// Generates a mobile phone number +echo $faker->mobileNumber; // 082 123 5555 +``` + +### `Faker\Provider\es_ES\Person` + +```php +dni; // '77446565E' +``` + +### `Faker\Provider\fr_BE\Payment` + +```php +vat; // "BE 0123456789" - Belgian Value Added Tax number +echo $faker->vat(false); // "BE0123456789" - unspaced Belgian Value Added Tax number +``` + +### `Faker\Provider\fr_FR\Address` + +```php +departmentName; // "Haut-Rhin" + +// Generates a random department number +echo $faker->departmentNumber; // "2B" + +// Generates a random department info (department number => department name) +$faker->department; // array('18' => 'Cher'); + +// Generates a random region +echo $faker->region; // "Saint-Pierre-et-Miquelon" +``` + +### `Faker\Provider\fr_FR\Company` + +```php +siren; // 082 250 104 + +// Generates a random SIRET number +echo $faker->siret; // 347 355 708 00224 +``` + +### `Faker\Provider\hu_HU\Payment` + +```php +bankAccountNumber; // "HU09904437680048220079300783" +``` + +### `Faker\Provider\it_IT\Company` + +```php +vatId(); // "IT98746784967" +``` + +### `Faker\Provider\it_IT\Person` + +```php +taxId(); // "DIXDPZ44E08F367A" +``` + +### `Faker\Provider\ja_JP\Person` + +```php +kanaName; // "アオタ ミノル" + +// Generates a 'kana' first name +echo $faker->firstKanaName; // "ãƒãƒ«ã‚«" + +// Generates a 'kana' last name +echo $faker->lastKanaName; // "ナカジマ" +``` + +### `Faker\Provider\ka_GE\Payment` + +```php +bankAccountNumber; // "GE33ZV9773853617253389" +``` + +### `Faker\Provider\kk_KZ\Company` + +```php +businessIdentificationNumber; // "150140000019" +``` + +### `Faker\Provider\kk_KZ\Payment` + +```php +bank; // "Қазкоммерцбанк" + +// Generates a random bank account number +echo $faker->bankAccountNumber; // "KZ1076321LO4H6X41I37" +``` + +### `Faker\Provider\kk_KZ\Person` + +```php +individualIdentificationNumber; // "780322300455" +``` + +### `Faker\Provider\ko_KR\Address` + +```php +metropolitanCity; // "서울특별시" + +// Generates a borough +echo $faker->borough; // "강남구" +``` + +### `Faker\Provider\lv_LV\Person` + +```php +personalIdentityNumber; // "140190-12301" +``` + +### `Faker\Provider\ne_NP\Address` + +```php +district; + +//Generates a Nepali city name +echo $faker->cityName; +``` + +### `Faker\Provider\nl_BE\Payment` + +```php +vat; // "BE 0123456789" - Belgian Value Added Tax number +echo $faker->vat(false); // "BE0123456789" - unspaced Belgian Value Added Tax number +``` + +### `Faker\Provider\nl_NL\Company` + +```php +vat; // "NL123456789B01" - Dutch Value Added Tax number +echo $faker->btw; // "NL123456789B01" - Dutch Value Added Tax number (alias) +``` + +### `Faker\Provider\no_NO\Payment` + +```php +bankAccountNumber; // "NO3246764709816" +``` + +### `Faker\Provider\pl_PL\Person` + +```php +pesel; // "40061451555" +// Generates a random personal identity card number +echo $faker->personalIdentityNumber; // "AKX383360" +// Generates a random taxpayer identification number (NIP) +echo $faker->taxpayerIdentificationNumber; // '8211575109' +``` + +### `Faker\Provider\pl_PL\Company` + +```php +regon; // "714676680" +// Generates a random local REGON number +echo $faker->regonLocal; // "15346111382836" +``` + +### `Faker\Provider\pl_PL\Payment` + +```php +bank; // "Narodowy Bank Polski" +// Generates a random bank account number +echo $faker->bankAccountNumber; // "PL14968907563953822118075816" +``` + +### `Faker\Provider\pt_PT\Person` + +```php +taxpayerIdentificationNumber; // '165249277' +``` + +### `Faker\Provider\pt_BR\Address` + +```php +region; // 'Nordeste' + +// Generates a random region abbreviation +echo $faker->regionAbbr; // 'NE' +``` + +### `Faker\Provider\pt_BR\PhoneNumber` + +```php +areaCode; // 21 +echo $faker->cellphone; // 9432-5656 +echo $faker->landline; // 2654-3445 +echo $faker->phone; // random landline, 8-digit or 9-digit cellphone number + +// Using the phone functions with a false argument returns unformatted numbers +echo $faker->cellphone(false); // 74336667 + +// cellphone() has a special second argument to add the 9th digit. Ignored if generated a Radio number +echo $faker->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) +``` + +### `Faker\Provider\pt_BR\Person` + +```php +name; // 'Sr. Luis Adriano Sepúlveda Filho' + +// Valid document generators have a boolean argument to remove formatting +echo $faker->cpf; // '145.343.345-76' +echo $faker->cpf(false); // '45623467866' +echo $faker->rg; // '84.405.736-3' +``` + +### `Faker\Provider\pt_BR\Company` + +```php +cnpj; // '23.663.478/0001-24' +echo $faker->cnpj(false); // '23663478000124' +``` + +### `Faker\Provider\ro_MD\Payment` + +```php +bankAccountNumber; // "MD83BQW1CKMUW34HBESDP3A8" +``` + +### `Faker\Provider\ro_RO\Payment` + +```php +bankAccountNumber; // "RO55WRJE3OE8X3YQI7J26U1E" +``` + +### `Faker\Provider\ro_RO\Person` + +```php +prefixMale; // "ing." +// Generates a random female name prefix/title +echo $faker->prefixFemale; // "d-na." +// Generates a random male fist name +echo $faker->firstNameMale; // "Adrian" +// Generates a random female fist 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 +``` + +### `Faker\Provider\ro_RO\PhoneNumber` + +```php +tollFreePhoneNumber; // "0800123456" +// Generates a random premium-rate phone number +echo $faker->premiumRatePhoneNumber; // "0900123456" +``` + +### `Faker\Provider\ru_RU\Payment` + +```php +bank; // "ОТП Банк" +``` + +### `Faker\Provider\sv_SE\Payment` + +```php +bankAccountNumber; // "SE5018548608468284909192" +``` + +### `Faker\Provider\sv_SE\Person` + +```php +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\zh_CN\Payment` + +```php +bank; // '中国建设银行' +``` + +## 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 + +## License + +Faker is released under the MIT Licence. See the bundled LICENSE file for details. diff --git a/vendor/fzaninotto/faker/src/Faker/Calculator/Iban.php b/vendor/fzaninotto/faker/src/Faker/Calculator/Iban.php new file mode 100644 index 0000000..ee2c459 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Calculator/Iban.php @@ -0,0 +1,71 @@ += 0; $i -= 2) { + $sum += $number{$i}; + } + for ($i = $length - 2; $i >= 0; $i -= 2) { + $sum += array_sum(str_split($number{$i} * 2)); + } + + return $sum % 10; + } + + /** + * @param $partialNumber + * @return string + */ + public static function computeCheckDigit($partialNumber) + { + $checkDigit = self::checksum($partialNumber . '0'); + if ($checkDigit === 0) { + return 0; + } + + return (string) (10 - $checkDigit); + } + + /** + * Checks whether a number (partial number + check digit) is Luhn compliant + * + * @param string $number + * @return bool + */ + public static function isValid($number) + { + return self::checksum($number) === 0; + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/DefaultGenerator.php b/vendor/fzaninotto/faker/src/Faker/DefaultGenerator.php new file mode 100644 index 0000000..4210f93 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/DefaultGenerator.php @@ -0,0 +1,34 @@ +optional(). + */ +class DefaultGenerator +{ + protected $default; + + public function __construct($default = null) + { + $this->default = $default; + } + + /** + * @param string $attribute + */ + public function __get($attribute) + { + return $this->default; + } + + /** + * @param string $method + * @param array $attributes + */ + public function __call($method, $attributes) + { + return $this->default; + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Documentor.php b/vendor/fzaninotto/faker/src/Faker/Documentor.php new file mode 100644 index 0000000..e42bdf4 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Documentor.php @@ -0,0 +1,66 @@ +generator = $generator; + } + + /** + * @return array + */ + public function getFormatters() + { + $formatters = array(); + $providers = array_reverse($this->generator->getProviders()); + $providers[]= new Provider\Base($this->generator); + foreach ($providers as $provider) { + $providerClass = get_class($provider); + $formatters[$providerClass] = array(); + $refl = new \ReflectionObject($provider); + foreach ($refl->getMethods(\ReflectionMethod::IS_PUBLIC) as $reflmethod) { + if ($reflmethod->getDeclaringClass()->getName() == 'Faker\Provider\Base' && $providerClass != 'Faker\Provider\Base') { + continue; + } + $methodName = $reflmethod->name; + if ($reflmethod->isConstructor()) { + continue; + } + $parameters = array(); + foreach ($reflmethod->getParameters() as $reflparameter) { + $parameter = '$'. $reflparameter->getName(); + if ($reflparameter->isDefaultValueAvailable()) { + $parameter .= ' = ' . var_export($reflparameter->getDefaultValue(), true); + } + $parameters []= $parameter; + } + $parameters = $parameters ? '('. join(', ', $parameters) . ')' : ''; + try { + $example = $this->generator->format($methodName); + } catch (\InvalidArgumentException $e) { + $example = ''; + } + if (is_array($example)) { + $example = "array('". join("', '", $example) . "')"; + } elseif ($example instanceof \DateTime) { + $example = "DateTime('" . $example->format('Y-m-d H:i:s') . "')"; + } elseif ($example instanceof Generator || $example instanceof UniqueGenerator) { // modifier + $example = ''; + } else { + $example = var_export($example, true); + } + $formatters[$providerClass][$methodName . $parameters] = $example; + } + } + + return $formatters; + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Factory.php b/vendor/fzaninotto/faker/src/Faker/Factory.php new file mode 100644 index 0000000..e02bc7d --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Factory.php @@ -0,0 +1,61 @@ +addProvider(new $providerClassName($generator)); + } + + return $generator; + } + + /** + * @param string $provider + * @param string $locale + * @return string + */ + protected static function getProviderClassname($provider, $locale = '') + { + if ($providerClass = self::findProviderClassname($provider, $locale)) { + return $providerClass; + } + // fallback to default locale + if ($providerClass = self::findProviderClassname($provider, static::DEFAULT_LOCALE)) { + return $providerClass; + } + // fallback to no locale + if ($providerClass = self::findProviderClassname($provider)) { + return $providerClass; + } + throw new \InvalidArgumentException(sprintf('Unable to find provider "%s" with locale "%s"', $provider, $locale)); + } + + /** + * @param string $provider + * @param string $locale + * @return string + */ + protected static function findProviderClassname($provider, $locale = '') + { + $providerClass = 'Faker\\' . ($locale ? sprintf('Provider\%s\%s', $locale, $provider) : sprintf('Provider\%s', $provider)); + if (class_exists($providerClass, true)) { + return $providerClass; + } + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Generator.php b/vendor/fzaninotto/faker/src/Faker/Generator.php new file mode 100644 index 0000000..83736d7 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Generator.php @@ -0,0 +1,249 @@ +providers, $provider); + } + + public function getProviders() + { + return $this->providers; + } + + public function seed($seed = null) + { + if ($seed === null) { + mt_srand(); + } else { + mt_srand((int) $seed); + } + } + + public function format($formatter, $arguments = array()) + { + return call_user_func_array($this->getFormatter($formatter), $arguments); + } + + /** + * @return Callable + */ + public function getFormatter($formatter) + { + if (isset($this->formatters[$formatter])) { + return $this->formatters[$formatter]; + } + foreach ($this->providers as $provider) { + if (method_exists($provider, $formatter)) { + $this->formatters[$formatter] = array($provider, $formatter); + + return $this->formatters[$formatter]; + } + } + throw new \InvalidArgumentException(sprintf('Unknown formatter "%s"', $formatter)); + } + + /** + * Replaces tokens ('{{ tokenName }}') with the result from the token method call + * + * @param string $string String that needs to bet parsed + * @return string + */ + public function parse($string) + { + return preg_replace_callback('/\{\{\s?(\w+)\s?\}\}/u', array($this, 'callFormatWithMatches'), $string); + } + + protected function callFormatWithMatches($matches) + { + return $this->format($matches[1]); + } + + /** + * @param string $attribute + */ + public function __get($attribute) + { + return $this->format($attribute); + } + + /** + * @param string $method + * @param array $attributes + */ + public function __call($method, $attributes) + { + return $this->format($method, $attributes); + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Guesser/Name.php b/vendor/fzaninotto/faker/src/Faker/Guesser/Name.php new file mode 100644 index 0000000..0b303db --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Guesser/Name.php @@ -0,0 +1,156 @@ +generator = $generator; + } + + /** + * @param string $name + * @param int|null $size Length of field, if known + * @return callable + */ + public function guessFormat($name, $size = null) + { + $name = Base::toLower($name); + $generator = $this->generator; + if (preg_match('/^is[_A-Z]/', $name)) { + return function () use ($generator) { + return $generator->boolean; + }; + } + if (preg_match('/(_a|A)t$/', $name)) { + return function () use ($generator) { + return $generator->dateTime; + }; + } + switch (str_replace('_', '', $name)) { + case 'firstname': + return function () use ($generator) { + return $generator->firstName; + }; + case 'lastname': + return function () use ($generator) { + return $generator->lastName; + }; + case 'username': + case 'login': + return function () use ($generator) { + return $generator->userName; + }; + case 'email': + case 'emailaddress': + return function () use ($generator) { + return $generator->email; + }; + case 'phonenumber': + case 'phone': + case 'telephone': + case 'telnumber': + return function () use ($generator) { + return $generator->phoneNumber; + }; + case 'address': + return function () use ($generator) { + return $generator->address; + }; + case 'city': + case 'town': + return function () use ($generator) { + return $generator->city; + }; + case 'streetaddress': + return function () use ($generator) { + return $generator->streetAddress; + }; + case 'postcode': + case 'zipcode': + return function () use ($generator) { + return $generator->postcode; + }; + case 'state': + return function () use ($generator) { + return $generator->state; + }; + case 'county': + if ($this->generator->locale == 'en_US') { + return function () use ($generator) { + return sprintf('%s County', $generator->city); + }; + } + + return function () use ($generator) { + return $generator->state; + }; + case 'country': + switch ($size) { + case 2: + return function () use ($generator) { + return $generator->countryCode; + }; + case 3: + return function () use ($generator) { + return $generator->countryISOAlpha3; + }; + case 5: + case 6: + return function () use ($generator) { + return $generator->locale; + }; + default: + return function () use ($generator) { + return $generator->country; + }; + } + break; + case 'locale': + return function () use ($generator) { + return $generator->locale; + }; + case 'currency': + case 'currencycode': + return function () use ($generator) { + return $generator->currencyCode; + }; + case 'url': + case 'website': + return function () use ($generator) { + return $generator->url; + }; + case 'company': + case 'companyname': + case 'employer': + return function () use ($generator) { + return $generator->company; + }; + case 'title': + if ($size !== null && $size <= 10) { + return function () use ($generator) { + return $generator->title; + }; + } + + return function () use ($generator) { + return $generator->sentence; + }; + case 'body': + case 'summary': + case 'article': + case 'description': + return function () use ($generator) { + return $generator->text; + }; + } + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/ORM/CakePHP/ColumnTypeGuesser.php b/vendor/fzaninotto/faker/src/Faker/ORM/CakePHP/ColumnTypeGuesser.php new file mode 100644 index 0000000..0b871ed --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/ORM/CakePHP/ColumnTypeGuesser.php @@ -0,0 +1,67 @@ +generator = $generator; + } + + /** + * @return \Closure|null + */ + public function guessFormat($column, $table) + { + $generator = $this->generator; + $schema = $table->schema(); + + switch ($schema->columnType($column)) { + case 'boolean': + return function () use ($generator) { + return $generator->boolean; + }; + case 'integer': + return function () { + return mt_rand(0, intval('2147483647')); + }; + case 'biginteger': + return function () { + return mt_rand(0, intval('9223372036854775807')); + }; + case 'decimal': + case 'float': + return function () use ($generator) { + return $generator->randomFloat(); + }; + case 'uuid': + return function () use ($generator) { + return $generator->uuid(); + }; + case 'string': + $columnData = $schema->column($column); + $length = $columnData['length']; + return function () use ($generator, $length) { + return $generator->text($length); + }; + case 'text': + return function () use ($generator) { + return $generator->text(); + }; + case 'date': + case 'datetime': + case 'timestamp': + case 'time': + return function () use ($generator) { + return $generator->datetime(); + }; + + case 'binary': + default: + return null; + } + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/ORM/CakePHP/EntityPopulator.php b/vendor/fzaninotto/faker/src/Faker/ORM/CakePHP/EntityPopulator.php new file mode 100644 index 0000000..2ec312a --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/ORM/CakePHP/EntityPopulator.php @@ -0,0 +1,166 @@ +class = $class; + } + + /** + * @param string $name + */ + public function __get($name) + { + return $this->{$name}; + } + + /** + * @param string $name + */ + public function __set($name, $value) + { + $this->{$name} = $value; + } + + public function mergeColumnFormattersWith($columnFormatters) + { + $this->columnFormatters = array_merge($this->columnFormatters, $columnFormatters); + } + + public function mergeModifiersWith($modifiers) + { + $this->modifiers = array_merge($this->modifiers, $modifiers); + } + + /** + * @return array + */ + public function guessColumnFormatters($populator) + { + $formatters = []; + $class = $this->class; + $table = $this->getTable($class); + $schema = $table->schema(); + $pk = $schema->primaryKey(); + $guessers = $populator->getGuessers() + ['ColumnTypeGuesser' => new ColumnTypeGuesser($populator->getGenerator())]; + $isForeignKey = function ($column) use ($table) { + foreach ($table->associations()->type('BelongsTo') as $assoc) { + if ($column == $assoc->foreignKey()) { + return true; + } + } + return false; + }; + + + foreach ($schema->columns() as $column) { + if ($column == $pk[0] || $isForeignKey($column)) { + continue; + } + + foreach ($guessers as $guesser) { + if ($formatter = $guesser->guessFormat($column, $table)) { + $formatters[$column] = $formatter; + break; + } + } + } + + return $formatters; + } + + /** + * @return array + */ + public function guessModifiers() + { + $modifiers = []; + $table = $this->getTable($this->class); + + $belongsTo = $table->associations()->type('BelongsTo'); + foreach ($belongsTo as $assoc) { + $modifiers['belongsTo' . $assoc->name()] = function ($data, $insertedEntities) use ($assoc) { + $table = $assoc->target(); + $foreignModel = $table->alias(); + + $foreignKeys = []; + if (!empty($insertedEntities[$foreignModel])) { + $foreignKeys = $insertedEntities[$foreignModel]; + } else { + $foreignKeys = $table->find('all') + ->select(['id']) + ->map(function ($row) { + return $row->id; + }) + ->toArray(); + } + + if (empty($foreignKeys)) { + throw new \Exception(sprintf('%s belongsTo %s, which seems empty at this point.', $this->getTable($this->class)->table(), $assoc->table())); + } + + $foreignKey = $foreignKeys[array_rand($foreignKeys)]; + $data[$assoc->foreignKey()] = $foreignKey; + return $data; + }; + } + + // TODO check if TreeBehavior attached to modify lft/rgt cols + + return $modifiers; + } + + /** + * @param array $options + */ + public function execute($class, $insertedEntities, $options = []) + { + $table = $this->getTable($class); + $entity = $table->newEntity(); + + foreach ($this->columnFormatters as $column => $format) { + if (!is_null($format)) { + $entity->{$column} = is_callable($format) ? $format($insertedEntities, $table) : $format; + } + } + + foreach ($this->modifiers as $modifier) { + $entity = $modifier($entity, $insertedEntities); + } + + if (!$entity = $table->save($entity, $options)) { + throw new \RuntimeException("Failed saving $class record"); + } + + $pk = $table->primaryKey(); + if (is_string($pk)) { + return $entity->{$pk}; + } + + return $entity->{$pk[0]}; + } + + public function setConnection($name) + { + $this->connectionName = $name; + } + + protected function getTable($class) + { + $options = []; + if (!empty($this->connectionName)) { + $options['connection'] = $this->connectionName; + } + return TableRegistry::get($class, $options); + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/ORM/CakePHP/Populator.php b/vendor/fzaninotto/faker/src/Faker/ORM/CakePHP/Populator.php new file mode 100644 index 0000000..eda30a8 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/ORM/CakePHP/Populator.php @@ -0,0 +1,109 @@ +generator = $generator; + } + + /** + * @return \Faker\Generator + */ + public function getGenerator() + { + return $this->generator; + } + + /** + * @return array + */ + public function getGuessers() + { + return $this->guessers; + } + + /** + * @return $this + */ + public function removeGuesser($name) + { + if ($this->guessers[$name]) { + unset($this->guessers[$name]); + } + return $this; + } + + /** + * @return $this + * @throws \Exception + */ + public function addGuesser($class) + { + if (!is_object($class)) { + $class = new $class($this->generator); + } + + if (!method_exists($class, 'guessFormat')) { + throw new \Exception('Missing required custom guesser method: ' . get_class($class) . '::guessFormat()'); + } + + $this->guessers[get_class($class)] = $class; + return $this; + } + + /** + * @param array $customColumnFormatters + * @param array $customModifiers + * @return $this + */ + public function addEntity($entity, $number, $customColumnFormatters = [], $customModifiers = []) + { + if (!$entity instanceof EntityPopulator) { + $entity = new EntityPopulator($entity); + } + + $entity->columnFormatters = $entity->guessColumnFormatters($this); + if ($customColumnFormatters) { + $entity->mergeColumnFormattersWith($customColumnFormatters); + } + + $entity->modifiers = $entity->guessModifiers($this); + if ($customModifiers) { + $entity->mergeModifiersWith($customModifiers); + } + + $class = $entity->class; + $this->entities[$class] = $entity; + $this->quantities[$class] = $number; + return $this; + } + + /** + * @param array $options + * @return array + */ + public function execute($options = []) + { + $insertedEntities = []; + + foreach ($this->quantities as $class => $number) { + for ($i = 0; $i < $number; $i++) { + $insertedEntities[$class][] = $this->entities[$class]->execute($class, $insertedEntities, $options); + } + } + + return $insertedEntities; + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/ORM/Doctrine/ColumnTypeGuesser.php b/vendor/fzaninotto/faker/src/Faker/ORM/Doctrine/ColumnTypeGuesser.php new file mode 100644 index 0000000..824f8c0 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/ORM/Doctrine/ColumnTypeGuesser.php @@ -0,0 +1,75 @@ +generator = $generator; + } + + /** + * @param ClassMetadata $class + * @return \Closure|null + */ + public function guessFormat($fieldName, ClassMetadata $class) + { + $generator = $this->generator; + $type = $class->getTypeOfField($fieldName); + switch ($type) { + case 'boolean': + return function () use ($generator) { + return $generator->boolean; + }; + case 'decimal': + $size = isset($class->fieldMappings[$fieldName]['precision']) ? $class->fieldMappings[$fieldName]['precision'] : 2; + + return function () use ($generator, $size) { + return $generator->randomNumber($size + 2) / 100; + }; + case 'smallint': + return function () { + return mt_rand(0, 65535); + }; + case 'integer': + return function () { + return mt_rand(0, intval('2147483647')); + }; + case 'bigint': + return function () { + return mt_rand(0, intval('18446744073709551615')); + }; + case 'float': + return function () { + return mt_rand(0, intval('4294967295'))/mt_rand(1, intval('4294967295')); + }; + case 'string': + $size = isset($class->fieldMappings[$fieldName]['length']) ? $class->fieldMappings[$fieldName]['length'] : 255; + + return function () use ($generator, $size) { + return $generator->text($size); + }; + case 'text': + return function () use ($generator) { + return $generator->text; + }; + case 'datetime': + case 'date': + case 'time': + return function () use ($generator) { + return $generator->datetime; + }; + default: + // no smart way to guess what the user expects here + return null; + } + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/ORM/Doctrine/EntityPopulator.php b/vendor/fzaninotto/faker/src/Faker/ORM/Doctrine/EntityPopulator.php new file mode 100644 index 0000000..a6e1fed --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/ORM/Doctrine/EntityPopulator.php @@ -0,0 +1,239 @@ +class = $class; + } + + /** + * @return string + */ + public function getClass() + { + return $this->class->getName(); + } + + /** + * @param $columnFormatters + */ + public function setColumnFormatters($columnFormatters) + { + $this->columnFormatters = $columnFormatters; + } + + /** + * @return array + */ + public function getColumnFormatters() + { + return $this->columnFormatters; + } + + public function mergeColumnFormattersWith($columnFormatters) + { + $this->columnFormatters = array_merge($this->columnFormatters, $columnFormatters); + } + + /** + * @param array $modifiers + */ + public function setModifiers(array $modifiers) + { + $this->modifiers = $modifiers; + } + + /** + * @return array + */ + public function getModifiers() + { + return $this->modifiers; + } + + /** + * @param array $modifiers + */ + public function mergeModifiersWith(array $modifiers) + { + $this->modifiers = array_merge($this->modifiers, $modifiers); + } + + /** + * @param \Faker\Generator $generator + * @return array + */ + public function guessColumnFormatters(\Faker\Generator $generator) + { + $formatters = array(); + $nameGuesser = new \Faker\Guesser\Name($generator); + $columnTypeGuesser = new ColumnTypeGuesser($generator); + foreach ($this->class->getFieldNames() as $fieldName) { + if ($this->class->isIdentifier($fieldName) || !$this->class->hasField($fieldName)) { + continue; + } + + $size = isset($this->class->fieldMappings[$fieldName]['length']) ? $this->class->fieldMappings[$fieldName]['length'] : null; + if ($formatter = $nameGuesser->guessFormat($fieldName, $size)) { + $formatters[$fieldName] = $formatter; + continue; + } + if ($formatter = $columnTypeGuesser->guessFormat($fieldName, $this->class)) { + $formatters[$fieldName] = $formatter; + continue; + } + } + + foreach ($this->class->getAssociationNames() as $assocName) { + if ($this->class->isCollectionValuedAssociation($assocName)) { + continue; + } + + $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; + } + } + } + + $index = 0; + $formatters[$assocName] = function ($inserted) use ($relatedClass, &$index, $unique, $optional) { + + if (isset($inserted[$relatedClass])) { + if ($unique) { + $related = null; + if (isset($inserted[$relatedClass][$index]) || !$optional) { + $related = $inserted[$relatedClass][$index]; + } + + $index++; + + return $related; + } + + return $inserted[$relatedClass][mt_rand(0, count($inserted[$relatedClass]) - 1)]; + } + + return null; + }; + } + + return $formatters; + } + + /** + * Insert one new record using the Entity class. + * @param ObjectManager $manager + * @param bool $generateId + * @return EntityPopulator + */ + public function execute(ObjectManager $manager, $insertedEntities, $generateId = false) + { + $obj = $this->class->newInstance(); + + $this->fillColumns($obj, $insertedEntities); + $this->callMethods($obj, $insertedEntities); + + if ($generateId) { + $idsName = $this->class->getIdentifier(); + foreach ($idsName as $idName) { + $id = $this->generateId($obj, $idName, $manager); + $this->class->reflFields[$idName]->setValue($obj, $id); + } + } + + $manager->persist($obj); + + return $obj; + } + + private function fillColumns($obj, $insertedEntities) + { + foreach ($this->columnFormatters as $field => $format) { + if (null !== $format) { + // Add some extended debugging information to any errors thrown by the formatter + try { + $value = is_callable($format) ? $format($insertedEntities, $obj) : $format; + } catch (\InvalidArgumentException $ex) { + throw new \InvalidArgumentException(sprintf( + "Failed to generate a value for %s::%s: %s", + get_class($obj), + $field, + $ex->getMessage() + )); + } + // Try a standard setter if it's available, otherwise fall back on reflection + $setter = sprintf("set%s", ucfirst($field)); + if (method_exists($obj, $setter)) { + $obj->$setter($value); + } else { + $this->class->reflFields[$field]->setValue($obj, $value); + } + } + } + } + + private function callMethods($obj, $insertedEntities) + { + foreach ($this->getModifiers() as $modifier) { + $modifier($obj, $insertedEntities); + } + } + + /** + * @param EntityManagerInterface $manager + * @return int|null + */ + private function generateId($obj, $column, EntityManagerInterface $manager) + { + /* @var $repository \Doctrine\ORM\EntityRepository */ + $repository = $manager->getRepository(get_class($obj)); + $result = $repository->createQueryBuilder('e') + ->select(sprintf('e.%s', $column)) + ->getQuery() + ->getResult(); + $ids = array_map('current', $result); + + $id = null; + do { + $id = mt_rand(); + } while (in_array($id, $ids)); + + return $id; + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/ORM/Doctrine/Populator.php b/vendor/fzaninotto/faker/src/Faker/ORM/Doctrine/Populator.php new file mode 100644 index 0000000..d4fe897 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/ORM/Doctrine/Populator.php @@ -0,0 +1,82 @@ +generator = $generator; + $this->manager = $manager; + } + + /** + * Add an order for the generation of $number records for $entity. + * + * @param mixed $entity A Doctrine classname, or a \Faker\ORM\Doctrine\EntityPopulator instance + * @param int $number The number of entities to populate + */ + public function addEntity($entity, $number, $customColumnFormatters = array(), $customModifiers = array(), $generateId = false) + { + if (!$entity instanceof \Faker\ORM\Doctrine\EntityPopulator) { + if (null === $this->manager) { + throw new \InvalidArgumentException("No entity manager passed to Doctrine Populator."); + } + $entity = new \Faker\ORM\Doctrine\EntityPopulator($this->manager->getClassMetadata($entity)); + } + $entity->setColumnFormatters($entity->guessColumnFormatters($this->generator)); + if ($customColumnFormatters) { + $entity->mergeColumnFormattersWith($customColumnFormatters); + } + $entity->mergeModifiersWith($customModifiers); + $this->generateId[$entity->getClass()] = $generateId; + + $class = $entity->getClass(); + $this->entities[$class] = $entity; + $this->quantities[$class] = $number; + } + + /** + * Populate the database using all the Entity classes previously added. + * + * @param null|EntityManager $entityManager A Doctrine connection object + * + * @return array A list of the inserted PKs + */ + public function execute($entityManager = null) + { + if (null === $entityManager) { + $entityManager = $this->manager; + } + if (null === $entityManager) { + throw new \InvalidArgumentException("No entity manager passed to Doctrine Populator."); + } + + $insertedEntities = array(); + 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); + } + $entityManager->flush(); + } + + return $insertedEntities; + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/ORM/Mandango/ColumnTypeGuesser.php b/vendor/fzaninotto/faker/src/Faker/ORM/Mandango/ColumnTypeGuesser.php new file mode 100644 index 0000000..d318b0a --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/ORM/Mandango/ColumnTypeGuesser.php @@ -0,0 +1,49 @@ +generator = $generator; + } + + /** + * @return \Closure|null + */ + public function guessFormat($field) + { + $generator = $this->generator; + switch ($field['type']) { + case 'boolean': + return function () use ($generator) { + return $generator->boolean; + }; + case 'integer': + return function () { + return mt_rand(0, intval('4294967295')); + }; + case 'float': + return function () { + return mt_rand(0, intval('4294967295'))/mt_rand(1, intval('4294967295')); + }; + case 'string': + return function () use ($generator) { + return $generator->text(255); + }; + case 'date': + return function () use ($generator) { + return $generator->datetime; + }; + default: + // no smart way to guess what the user expects here + return null; + } + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/ORM/Mandango/EntityPopulator.php b/vendor/fzaninotto/faker/src/Faker/ORM/Mandango/EntityPopulator.php new file mode 100644 index 0000000..667f5be --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/ORM/Mandango/EntityPopulator.php @@ -0,0 +1,122 @@ +class = $class; + } + + /** + * @return string + */ + public function getClass() + { + return $this->class; + } + + public function setColumnFormatters($columnFormatters) + { + $this->columnFormatters = $columnFormatters; + } + + /** + * @return array + */ + public function getColumnFormatters() + { + return $this->columnFormatters; + } + + public function mergeColumnFormattersWith($columnFormatters) + { + $this->columnFormatters = array_merge($this->columnFormatters, $columnFormatters); + } + + /** + * @param \Faker\Generator $generator + * @param Mandango $mandango + * @return array + */ + public function guessColumnFormatters(\Faker\Generator $generator, Mandango $mandango) + { + $formatters = array(); + $nameGuesser = new \Faker\Guesser\Name($generator); + $columnTypeGuesser = new \Faker\ORM\Mandango\ColumnTypeGuesser($generator); + + $metadata = $mandango->getMetadata($this->class); + + // fields + foreach ($metadata['fields'] as $fieldName => $field) { + if ($formatter = $nameGuesser->guessFormat($fieldName)) { + $formatters[$fieldName] = $formatter; + continue; + } + if ($formatter = $columnTypeGuesser->guessFormat($field)) { + $formatters[$fieldName] = $formatter; + continue; + } + } + + // references + foreach (array_merge($metadata['referencesOne'], $metadata['referencesMany']) as $referenceName => $reference) { + if (!isset($reference['class'])) { + continue; + } + $referenceClass = $reference['class']; + + $formatters[$referenceName] = function ($insertedEntities) use ($referenceClass) { + if (isset($insertedEntities[$referenceClass])) { + return Base::randomElement($insertedEntities[$referenceClass]); + } + }; + } + + return $formatters; + } + + /** + * Insert one new record using the Entity class. + * @param Mandango $mandango + */ + public function execute(Mandango $mandango, $insertedEntities) + { + $metadata = $mandango->getMetadata($this->class); + + $obj = $mandango->create($this->class); + foreach ($this->columnFormatters as $column => $format) { + if (null !== $format) { + $value = is_callable($format) ? $format($insertedEntities, $obj) : $format; + + if (isset($metadata['fields'][$column]) || + isset($metadata['referencesOne'][$column])) { + $obj->set($column, $value); + } + + if (isset($metadata['referencesMany'][$column])) { + $adder = 'add'.ucfirst($column); + $obj->$adder($value); + } + } + } + $mandango->persist($obj); + + return $obj; + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/ORM/Mandango/Populator.php b/vendor/fzaninotto/faker/src/Faker/ORM/Mandango/Populator.php new file mode 100644 index 0000000..26736dc --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/ORM/Mandango/Populator.php @@ -0,0 +1,65 @@ +generator = $generator; + $this->mandango = $mandango; + } + + /** + * Add an order for the generation of $number records for $entity. + * + * @param mixed $entity A Propel ActiveRecord classname, or a \Faker\ORM\Propel\EntityPopulator instance + * @param int $number The number of entities to populate + */ + public function addEntity($entity, $number, $customColumnFormatters = array()) + { + if (!$entity instanceof \Faker\ORM\Mandango\EntityPopulator) { + $entity = new \Faker\ORM\Mandango\EntityPopulator($entity); + } + $entity->setColumnFormatters($entity->guessColumnFormatters($this->generator, $this->mandango)); + if ($customColumnFormatters) { + $entity->mergeColumnFormattersWith($customColumnFormatters); + } + $class = $entity->getClass(); + $this->entities[$class] = $entity; + $this->quantities[$class] = $number; + } + + /** + * Populate the database using all the Entity classes previously added. + * + * @return array A list of the inserted entities. + */ + public function execute() + { + $insertedEntities = array(); + foreach ($this->quantities as $class => $number) { + for ($i=0; $i < $number; $i++) { + $insertedEntities[$class][]= $this->entities[$class]->execute($this->mandango, $insertedEntities); + } + } + $this->mandango->flush(); + + return $insertedEntities; + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/ORM/Propel/ColumnTypeGuesser.php b/vendor/fzaninotto/faker/src/Faker/ORM/Propel/ColumnTypeGuesser.php new file mode 100644 index 0000000..ac9cdb4 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/ORM/Propel/ColumnTypeGuesser.php @@ -0,0 +1,107 @@ +generator = $generator; + } + + /** + * @param ColumnMap $column + * @return \Closure|null + */ + public function guessFormat(ColumnMap $column) + { + $generator = $this->generator; + if ($column->isTemporal()) { + if ($column->isEpochTemporal()) { + return function () use ($generator) { + return $generator->dateTime; + }; + } else { + return function () use ($generator) { + return $generator->dateTimeAD; + }; + } + } + $type = $column->getType(); + switch ($type) { + case PropelColumnTypes::BOOLEAN: + case PropelColumnTypes::BOOLEAN_EMU: + return function () use ($generator) { + return $generator->boolean; + }; + case PropelColumnTypes::NUMERIC: + case PropelColumnTypes::DECIMAL: + $size = $column->getSize(); + + return function () use ($generator, $size) { + return $generator->randomNumber($size + 2) / 100; + }; + case PropelColumnTypes::TINYINT: + return function () { + return mt_rand(0, 127); + }; + case PropelColumnTypes::SMALLINT: + return function () { + return mt_rand(0, 32767); + }; + case PropelColumnTypes::INTEGER: + return function () { + return mt_rand(0, intval('2147483647')); + }; + case PropelColumnTypes::BIGINT: + return function () { + return mt_rand(0, intval('9223372036854775807')); + }; + case PropelColumnTypes::FLOAT: + return function () { + return mt_rand(0, intval('2147483647'))/mt_rand(1, intval('2147483647')); + }; + case PropelColumnTypes::DOUBLE: + case PropelColumnTypes::REAL: + return function () { + return mt_rand(0, intval('9223372036854775807'))/mt_rand(1, intval('9223372036854775807')); + }; + case PropelColumnTypes::CHAR: + case PropelColumnTypes::VARCHAR: + case PropelColumnTypes::BINARY: + case PropelColumnTypes::VARBINARY: + $size = $column->getSize(); + + return function () use ($generator, $size) { + return $generator->text($size); + }; + case PropelColumnTypes::LONGVARCHAR: + case PropelColumnTypes::LONGVARBINARY: + case PropelColumnTypes::CLOB: + case PropelColumnTypes::CLOB_EMU: + case PropelColumnTypes::BLOB: + return function () use ($generator) { + return $generator->text; + }; + case PropelColumnTypes::ENUM: + $valueSet = $column->getValueSet(); + + return function () use ($generator, $valueSet) { + return $generator->randomElement($valueSet); + }; + case PropelColumnTypes::OBJECT: + case PropelColumnTypes::PHP_ARRAY: + default: + // no smart way to guess what the user expects here + return null; + } + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/ORM/Propel/EntityPopulator.php b/vendor/fzaninotto/faker/src/Faker/ORM/Propel/EntityPopulator.php new file mode 100644 index 0000000..1976a40 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/ORM/Propel/EntityPopulator.php @@ -0,0 +1,191 @@ +class = $class; + } + + /** + * @return string + */ + public function getClass() + { + return $this->class; + } + + public function setColumnFormatters($columnFormatters) + { + $this->columnFormatters = $columnFormatters; + } + + /** + * @return array + */ + public function getColumnFormatters() + { + return $this->columnFormatters; + } + + public function mergeColumnFormattersWith($columnFormatters) + { + $this->columnFormatters = array_merge($this->columnFormatters, $columnFormatters); + } + + /** + * @param \Faker\Generator $generator + * @return array + */ + public function guessColumnFormatters(\Faker\Generator $generator) + { + $formatters = array(); + $class = $this->class; + $peerClass = $class::PEER; + $tableMap = $peerClass::getTableMap(); + $nameGuesser = new \Faker\Guesser\Name($generator); + $columnTypeGuesser = new \Faker\ORM\Propel\ColumnTypeGuesser($generator); + foreach ($tableMap->getColumns() as $columnMap) { + // skip behavior columns, handled by modifiers + if ($this->isColumnBehavior($columnMap)) { + continue; + } + if ($columnMap->isForeignKey()) { + $relatedClass = $columnMap->getRelation()->getForeignTable()->getClassname(); + $formatters[$columnMap->getPhpName()] = function ($inserted) use ($relatedClass) { + return isset($inserted[$relatedClass]) ? $inserted[$relatedClass][mt_rand(0, count($inserted[$relatedClass]) - 1)] : null; + }; + continue; + } + if ($columnMap->isPrimaryKey()) { + continue; + } + if ($formatter = $nameGuesser->guessFormat($columnMap->getPhpName(), $columnMap->getSize())) { + $formatters[$columnMap->getPhpName()] = $formatter; + continue; + } + if ($formatter = $columnTypeGuesser->guessFormat($columnMap)) { + $formatters[$columnMap->getPhpName()] = $formatter; + continue; + } + } + + return $formatters; + } + + /** + * @param ColumnMap $columnMap + * @return bool + */ + protected function isColumnBehavior(ColumnMap $columnMap) + { + foreach ($columnMap->getTable()->getBehaviors() as $name => $params) { + $columnName = Base::toLower($columnMap->getName()); + switch ($name) { + case 'nested_set': + $columnNames = array($params['left_column'], $params['right_column'], $params['level_column']); + if (in_array($columnName, $columnNames)) { + return true; + } + break; + case 'timestampable': + $columnNames = array($params['create_column'], $params['update_column']); + if (in_array($columnName, $columnNames)) { + return true; + } + break; + } + } + + return false; + } + + public function setModifiers($modifiers) + { + $this->modifiers = $modifiers; + } + + /** + * @return array + */ + public function getModifiers() + { + return $this->modifiers; + } + + public function mergeModifiersWith($modifiers) + { + $this->modifiers = array_merge($this->modifiers, $modifiers); + } + + /** + * @param \Faker\Generator $generator + * @return array + */ + public function guessModifiers(\Faker\Generator $generator) + { + $modifiers = array(); + $class = $this->class; + $peerClass = $class::PEER; + $tableMap = $peerClass::getTableMap(); + foreach ($tableMap->getBehaviors() as $name => $params) { + switch ($name) { + case 'nested_set': + $modifiers['nested_set'] = function ($obj, $inserted) use ($class, $generator) { + if (isset($inserted[$class])) { + $queryClass = $class . 'Query'; + $parent = $queryClass::create()->findPk($generator->randomElement($inserted[$class])); + $obj->insertAsLastChildOf($parent); + } else { + $obj->makeRoot(); + } + }; + break; + case 'sortable': + $modifiers['sortable'] = function ($obj, $inserted) use ($class) { + $maxRank = isset($inserted[$class]) ? count($inserted[$class]) : 0; + $obj->insertAtRank(mt_rand(1, $maxRank + 1)); + }; + break; + } + } + + return $modifiers; + } + + /** + * Insert one new record using the Entity class. + */ + public function execute($con, $insertedEntities) + { + $obj = new $this->class(); + foreach ($this->getColumnFormatters() as $column => $format) { + if (null !== $format) { + $obj->setByName($column, is_callable($format) ? $format($insertedEntities, $obj) : $format); + } + } + foreach ($this->getModifiers() as $modifier) { + $modifier($obj, $insertedEntities); + } + $obj->save($con); + + return $obj->getPrimaryKey(); + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/ORM/Propel/Populator.php b/vendor/fzaninotto/faker/src/Faker/ORM/Propel/Populator.php new file mode 100644 index 0000000..4285727 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/ORM/Propel/Populator.php @@ -0,0 +1,89 @@ +generator = $generator; + } + + /** + * Add an order for the generation of $number records for $entity. + * + * @param mixed $entity A Propel ActiveRecord classname, or a \Faker\ORM\Propel\EntityPopulator instance + * @param int $number The number of entities to populate + */ + public function addEntity($entity, $number, $customColumnFormatters = array(), $customModifiers = array()) + { + if (!$entity instanceof \Faker\ORM\Propel\EntityPopulator) { + $entity = new \Faker\ORM\Propel\EntityPopulator($entity); + } + $entity->setColumnFormatters($entity->guessColumnFormatters($this->generator)); + if ($customColumnFormatters) { + $entity->mergeColumnFormattersWith($customColumnFormatters); + } + $entity->setModifiers($entity->guessModifiers($this->generator)); + if ($customModifiers) { + $entity->mergeModifiersWith($customModifiers); + } + $class = $entity->getClass(); + $this->entities[$class] = $entity; + $this->quantities[$class] = $number; + } + + /** + * Populate the database using all the Entity classes previously added. + * + * @param PropelPDO $con A Propel connection object + * + * @return array A list of the inserted PKs + */ + public function execute($con = null) + { + if (null === $con) { + $con = $this->getConnection(); + } + $isInstancePoolingEnabled = \Propel::isInstancePoolingEnabled(); + \Propel::disableInstancePooling(); + $insertedEntities = array(); + $con->beginTransaction(); + foreach ($this->quantities as $class => $number) { + for ($i=0; $i < $number; $i++) { + $insertedEntities[$class][]= $this->entities[$class]->execute($con, $insertedEntities); + } + } + $con->commit(); + if ($isInstancePoolingEnabled) { + \Propel::enableInstancePooling(); + } + + return $insertedEntities; + } + + protected function getConnection() + { + // use the first connection available + $class = key($this->entities); + + if (!$class) { + throw new \RuntimeException('No class found from entities. Did you add entities to the Populator ?'); + } + + $peer = $class::PEER; + + return \Propel::getConnection($peer::DATABASE_NAME, \Propel::CONNECTION_WRITE); + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/ORM/Propel2/ColumnTypeGuesser.php b/vendor/fzaninotto/faker/src/Faker/ORM/Propel2/ColumnTypeGuesser.php new file mode 100644 index 0000000..13e4ee4 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/ORM/Propel2/ColumnTypeGuesser.php @@ -0,0 +1,107 @@ +generator = $generator; + } + + /** + * @param ColumnMap $column + * @return \Closure|null + */ + public function guessFormat(ColumnMap $column) + { + $generator = $this->generator; + if ($column->isTemporal()) { + if ($column->getType() == PropelTypes::BU_DATE || $column->getType() == PropelTypes::BU_TIMESTAMP) { + return function () use ($generator) { + return $generator->dateTime; + }; + } else { + return function () use ($generator) { + return $generator->dateTimeAD; + }; + } + } + $type = $column->getType(); + switch ($type) { + case PropelTypes::BOOLEAN: + case PropelTypes::BOOLEAN_EMU: + return function () use ($generator) { + return $generator->boolean; + }; + case PropelTypes::NUMERIC: + case PropelTypes::DECIMAL: + $size = $column->getSize(); + + return function () use ($generator, $size) { + return $generator->randomNumber($size + 2) / 100; + }; + case PropelTypes::TINYINT: + return function () { + return mt_rand(0, 127); + }; + case PropelTypes::SMALLINT: + return function () { + return mt_rand(0, 32767); + }; + case PropelTypes::INTEGER: + return function () { + return mt_rand(0, intval('2147483647')); + }; + case PropelTypes::BIGINT: + return function () { + return mt_rand(0, intval('9223372036854775807')); + }; + case PropelTypes::FLOAT: + return function () { + return mt_rand(0, intval('2147483647'))/mt_rand(1, intval('2147483647')); + }; + case PropelTypes::DOUBLE: + case PropelTypes::REAL: + return function () { + return mt_rand(0, intval('9223372036854775807'))/mt_rand(1, intval('9223372036854775807')); + }; + case PropelTypes::CHAR: + case PropelTypes::VARCHAR: + case PropelTypes::BINARY: + case PropelTypes::VARBINARY: + $size = $column->getSize(); + + return function () use ($generator, $size) { + return $generator->text($size); + }; + case PropelTypes::LONGVARCHAR: + case PropelTypes::LONGVARBINARY: + case PropelTypes::CLOB: + case PropelTypes::CLOB_EMU: + case PropelTypes::BLOB: + return function () use ($generator) { + return $generator->text; + }; + case PropelTypes::ENUM: + $valueSet = $column->getValueSet(); + + return function () use ($generator, $valueSet) { + return $generator->randomElement($valueSet); + }; + case PropelTypes::OBJECT: + case PropelTypes::PHP_ARRAY: + default: + // no smart way to guess what the user expects here + return null; + } + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/ORM/Propel2/EntityPopulator.php b/vendor/fzaninotto/faker/src/Faker/ORM/Propel2/EntityPopulator.php new file mode 100644 index 0000000..df5b671 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/ORM/Propel2/EntityPopulator.php @@ -0,0 +1,192 @@ +class = $class; + } + + /** + * @return string + */ + public function getClass() + { + return $this->class; + } + + public function setColumnFormatters($columnFormatters) + { + $this->columnFormatters = $columnFormatters; + } + + /** + * @return array + */ + public function getColumnFormatters() + { + return $this->columnFormatters; + } + + public function mergeColumnFormattersWith($columnFormatters) + { + $this->columnFormatters = array_merge($this->columnFormatters, $columnFormatters); + } + + /** + * @param \Faker\Generator $generator + * @return array + */ + public function guessColumnFormatters(\Faker\Generator $generator) + { + $formatters = array(); + $class = $this->class; + $peerClass = $class::TABLE_MAP; + $tableMap = $peerClass::getTableMap(); + $nameGuesser = new \Faker\Guesser\Name($generator); + $columnTypeGuesser = new \Faker\ORM\Propel2\ColumnTypeGuesser($generator); + foreach ($tableMap->getColumns() as $columnMap) { + // skip behavior columns, handled by modifiers + if ($this->isColumnBehavior($columnMap)) { + continue; + } + if ($columnMap->isForeignKey()) { + $relatedClass = $columnMap->getRelation()->getForeignTable()->getClassname(); + $formatters[$columnMap->getPhpName()] = function ($inserted) use ($relatedClass) { + $relatedClass = trim($relatedClass, "\\"); + return isset($inserted[$relatedClass]) ? $inserted[$relatedClass][mt_rand(0, count($inserted[$relatedClass]) - 1)] : null; + }; + continue; + } + if ($columnMap->isPrimaryKey()) { + continue; + } + if ($formatter = $nameGuesser->guessFormat($columnMap->getPhpName(), $columnMap->getSize())) { + $formatters[$columnMap->getPhpName()] = $formatter; + continue; + } + if ($formatter = $columnTypeGuesser->guessFormat($columnMap)) { + $formatters[$columnMap->getPhpName()] = $formatter; + continue; + } + } + + return $formatters; + } + + /** + * @param ColumnMap $columnMap + * @return bool + */ + protected function isColumnBehavior(ColumnMap $columnMap) + { + foreach ($columnMap->getTable()->getBehaviors() as $name => $params) { + $columnName = Base::toLower($columnMap->getName()); + switch ($name) { + case 'nested_set': + $columnNames = array($params['left_column'], $params['right_column'], $params['level_column']); + if (in_array($columnName, $columnNames)) { + return true; + } + break; + case 'timestampable': + $columnNames = array($params['create_column'], $params['update_column']); + if (in_array($columnName, $columnNames)) { + return true; + } + break; + } + } + + return false; + } + + public function setModifiers($modifiers) + { + $this->modifiers = $modifiers; + } + + /** + * @return array + */ + public function getModifiers() + { + return $this->modifiers; + } + + public function mergeModifiersWith($modifiers) + { + $this->modifiers = array_merge($this->modifiers, $modifiers); + } + + /** + * @param \Faker\Generator $generator + * @return array + */ + public function guessModifiers(\Faker\Generator $generator) + { + $modifiers = array(); + $class = $this->class; + $peerClass = $class::TABLE_MAP; + $tableMap = $peerClass::getTableMap(); + foreach ($tableMap->getBehaviors() as $name => $params) { + switch ($name) { + case 'nested_set': + $modifiers['nested_set'] = function ($obj, $inserted) use ($class, $generator) { + if (isset($inserted[$class])) { + $queryClass = $class . 'Query'; + $parent = $queryClass::create()->findPk($generator->randomElement($inserted[$class])); + $obj->insertAsLastChildOf($parent); + } else { + $obj->makeRoot(); + } + }; + break; + case 'sortable': + $modifiers['sortable'] = function ($obj, $inserted) use ($class) { + $maxRank = isset($inserted[$class]) ? count($inserted[$class]) : 0; + $obj->insertAtRank(mt_rand(1, $maxRank + 1)); + }; + break; + } + } + + return $modifiers; + } + + /** + * Insert one new record using the Entity class. + */ + public function execute($con, $insertedEntities) + { + $obj = new $this->class(); + foreach ($this->getColumnFormatters() as $column => $format) { + if (null !== $format) { + $obj->setByName($column, is_callable($format) ? $format($insertedEntities, $obj) : $format); + } + } + foreach ($this->getModifiers() as $modifier) { + $modifier($obj, $insertedEntities); + } + $obj->save($con); + + return $obj->getPrimaryKey(); + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/ORM/Propel2/Populator.php b/vendor/fzaninotto/faker/src/Faker/ORM/Propel2/Populator.php new file mode 100644 index 0000000..c0efe3b --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/ORM/Propel2/Populator.php @@ -0,0 +1,92 @@ +generator = $generator; + } + + /** + * Add an order for the generation of $number records for $entity. + * + * @param mixed $entity A Propel ActiveRecord classname, or a \Faker\ORM\Propel2\EntityPopulator instance + * @param int $number The number of entities to populate + */ + public function addEntity($entity, $number, $customColumnFormatters = array(), $customModifiers = array()) + { + if (!$entity instanceof \Faker\ORM\Propel2\EntityPopulator) { + $entity = new \Faker\ORM\Propel2\EntityPopulator($entity); + } + $entity->setColumnFormatters($entity->guessColumnFormatters($this->generator)); + if ($customColumnFormatters) { + $entity->mergeColumnFormattersWith($customColumnFormatters); + } + $entity->setModifiers($entity->guessModifiers($this->generator)); + if ($customModifiers) { + $entity->mergeModifiersWith($customModifiers); + } + $class = $entity->getClass(); + $this->entities[$class] = $entity; + $this->quantities[$class] = $number; + } + + /** + * Populate the database using all the Entity classes previously added. + * + * @param PropelPDO $con A Propel connection object + * + * @return array A list of the inserted PKs + */ + public function execute($con = null) + { + if (null === $con) { + $con = $this->getConnection(); + } + $isInstancePoolingEnabled = Propel::isInstancePoolingEnabled(); + Propel::disableInstancePooling(); + $insertedEntities = array(); + $con->beginTransaction(); + foreach ($this->quantities as $class => $number) { + for ($i=0; $i < $number; $i++) { + $insertedEntities[$class][]= $this->entities[$class]->execute($con, $insertedEntities); + } + } + $con->commit(); + if ($isInstancePoolingEnabled) { + Propel::enableInstancePooling(); + } + + return $insertedEntities; + } + + protected function getConnection() + { + // use the first connection available + $class = key($this->entities); + + if (!$class) { + throw new \RuntimeException('No class found from entities. Did you add entities to the Populator ?'); + } + + $peer = $class::TABLE_MAP; + + return Propel::getConnection($peer::DATABASE_NAME, ServiceContainerInterface::CONNECTION_WRITE); + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/ORM/Spot/ColumnTypeGuesser.php b/vendor/fzaninotto/faker/src/Faker/ORM/Spot/ColumnTypeGuesser.php new file mode 100644 index 0000000..716a9f2 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/ORM/Spot/ColumnTypeGuesser.php @@ -0,0 +1,77 @@ +generator = $generator; + } + + /** + * @param array $field + * @return \Closure|null + */ + public function guessFormat(array $field) + { + $generator = $this->generator; + $type = $field['type']; + switch ($type) { + case 'boolean': + return function () use ($generator) { + return $generator->boolean; + }; + case 'decimal': + $size = isset($field['precision']) ? $field['precision'] : 2; + + return function () use ($generator, $size) { + return $generator->randomNumber($size + 2) / 100; + }; + case 'smallint': + return function () use ($generator) { + return $generator->numberBetween(0, 65535); + }; + case 'integer': + return function () use ($generator) { + return $generator->numberBetween(0, intval('2147483647')); + }; + case 'bigint': + return function () use ($generator) { + return $generator->numberBetween(0, intval('18446744073709551615')); + }; + case 'float': + return function () use ($generator) { + return $generator->randomFloat(null, 0, intval('4294967295')); + }; + case 'string': + $size = isset($field['length']) ? $field['length'] : 255; + + return function () use ($generator, $size) { + return $generator->text($size); + }; + case 'text': + return function () use ($generator) { + return $generator->text; + }; + case 'datetime': + case 'date': + case 'time': + return function () use ($generator) { + return $generator->datetime; + }; + default: + // no smart way to guess what the user expects here + return null; + } + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/ORM/Spot/EntityPopulator.php b/vendor/fzaninotto/faker/src/Faker/ORM/Spot/EntityPopulator.php new file mode 100644 index 0000000..d59cf56 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/ORM/Spot/EntityPopulator.php @@ -0,0 +1,222 @@ +mapper = $mapper; + $this->locator = $locator; + $this->useExistingData = $useExistingData; + } + + /** + * @return string + */ + public function getMapper() + { + return $this->mapper; + } + + /** + * @param $columnFormatters + */ + public function setColumnFormatters($columnFormatters) + { + $this->columnFormatters = $columnFormatters; + } + + /** + * @return array + */ + public function getColumnFormatters() + { + return $this->columnFormatters; + } + + /** + * @param $columnFormatters + */ + public function mergeColumnFormattersWith($columnFormatters) + { + $this->columnFormatters = array_merge($this->columnFormatters, $columnFormatters); + } + + /** + * @param array $modifiers + */ + public function setModifiers(array $modifiers) + { + $this->modifiers = $modifiers; + } + + /** + * @return array + */ + public function getModifiers() + { + return $this->modifiers; + } + + /** + * @param array $modifiers + */ + public function mergeModifiersWith(array $modifiers) + { + $this->modifiers = array_merge($this->modifiers, $modifiers); + } + + /** + * @param Generator $generator + * @return array + */ + public function guessColumnFormatters(Generator $generator) + { + $formatters = array(); + $nameGuesser = new Name($generator); + $columnTypeGuesser = new ColumnTypeGuesser($generator); + $fields = $this->mapper->fields(); + foreach ($fields as $fieldName => $field) { + if ($field['primary'] === true) { + continue; + } + if ($formatter = $nameGuesser->guessFormat($fieldName)) { + $formatters[$fieldName] = $formatter; + continue; + } + if ($formatter = $columnTypeGuesser->guessFormat($field)) { + $formatters[$fieldName] = $formatter; + continue; + } + } + $entityName = $this->mapper->entity(); + $entity = $this->mapper->build([]); + $relations = $entityName::relations($this->mapper, $entity); + 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]; + $required = $field['required']; + + $locator = $this->locator; + + $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 $id; + } else { + return null; + } + } + }; + + } + } + + return $formatters; + } + + /** + * Insert one new record using the Entity class. + * + * @param $insertedEntities + * @return string + */ + public function execute($insertedEntities) + { + $obj = $this->mapper->build([]); + + $this->fillColumns($obj, $insertedEntities); + $this->callMethods($obj, $insertedEntities); + + $this->mapper->insert($obj); + + + return $obj; + } + + /** + * @param $obj + * @param $insertedEntities + */ + private function fillColumns($obj, $insertedEntities) + { + foreach ($this->columnFormatters as $field => $format) { + if (null !== $format) { + $value = is_callable($format) ? $format($insertedEntities, $obj) : $format; + $obj->set($field, $value); + } + } + } + + /** + * @param $obj + * @param $insertedEntities + */ + private function callMethods($obj, $insertedEntities) + { + foreach ($this->getModifiers() as $modifier) { + $modifier($obj, $insertedEntities); + } + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/ORM/Spot/Populator.php b/vendor/fzaninotto/faker/src/Faker/ORM/Spot/Populator.php new file mode 100644 index 0000000..c834b04 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/ORM/Spot/Populator.php @@ -0,0 +1,88 @@ +generator = $generator; + $this->locator = $locator; + } + + /** + * Add an order for the generation of $number records for $entity. + * + * @param $entityName string Name of Entity object to generate + * @param $number int The number of entities to populate + * @param $customColumnFormatters array + * @param $customModifiers array + * @param $useExistingData bool Should we use existing rows (e.g. roles) to populate relations? + */ + public function addEntity( + $entityName, + $number, + $customColumnFormatters = array(), + $customModifiers = array(), + $useExistingData = false + ) { + $mapper = $this->locator->mapper($entityName); + if (null === $mapper) { + throw new \InvalidArgumentException("No mapper can be found for entity " . $entityName); + } + $entity = new EntityPopulator($mapper, $this->locator, $useExistingData); + + $entity->setColumnFormatters($entity->guessColumnFormatters($this->generator)); + if ($customColumnFormatters) { + $entity->mergeColumnFormattersWith($customColumnFormatters); + } + $entity->mergeModifiersWith($customModifiers); + + $this->entities[$entityName] = $entity; + $this->quantities[$entityName] = $number; + } + + /** + * Populate the database using all the Entity classes previously added. + * + * @param Locator $locator A Spot locator + * + * @return array A list of the inserted PKs + */ + public function execute($locator = null) + { + if (null === $locator) { + $locator = $this->locator; + } + if (null === $locator) { + throw new \InvalidArgumentException("No entity manager passed to Spot Populator."); + } + + $insertedEntities = array(); + foreach ($this->quantities as $entityName => $number) { + for ($i = 0; $i < $number; $i++) { + $insertedEntities[$entityName][] = $this->entities[$entityName]->execute( + $insertedEntities + ); + } + } + + return $insertedEntities; + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/Address.php b/vendor/fzaninotto/faker/src/Faker/Provider/Address.php new file mode 100644 index 0000000..24f538a --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/Address.php @@ -0,0 +1,139 @@ +generator->parse($format); + } + + /** + * @example 'Crist Parks' + */ + public function streetName() + { + $format = static::randomElement(static::$streetNameFormats); + + return $this->generator->parse($format); + } + + /** + * @example '791 Crist Parks' + */ + public function streetAddress() + { + $format = static::randomElement(static::$streetAddressFormats); + + return $this->generator->parse($format); + } + + /** + * @example 86039-9874 + */ + public static function postcode() + { + return static::toUpper(static::bothify(static::randomElement(static::$postcode))); + } + + /** + * @example '791 Crist Parks, Sashabury, IL 86039-9874' + */ + public function address() + { + $format = static::randomElement(static::$addressFormats); + + return $this->generator->parse($format); + } + + /** + * @example 'Japan' + */ + public static function country() + { + return static::randomElement(static::$country); + } + + /** + * @example '77.147489' + * @param float|int $min + * @param float|int $max + * @return float Uses signed degrees format (returns a float number between -90 and 90) + */ + public static function latitude($min = -90, $max = 90) + { + return static::randomFloat(6, $min, $max); + } + + /** + * @example '86.211205' + * @param float|int $min + * @param float|int $max + * @return float Uses signed degrees format (returns a float number between -180 and 180) + */ + public static function longitude($min = -180, $max = 180) + { + return static::randomFloat(6, $min, $max); + } + + /** + * @example array('77.147489', '86.211205') + * @return array | latitude, longitude + */ + public static function localCoordinates() + { + return array( + 'latitude' => static::latitude(), + 'longitude' => static::longitude() + ); + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/Barcode.php b/vendor/fzaninotto/faker/src/Faker/Provider/Barcode.php new file mode 100644 index 0000000..84f7158 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/Barcode.php @@ -0,0 +1,110 @@ + $digit) { + $sums += $digit * $sequence[$n % 2]; + } + return (10 - $sums % 10) % 10; + } + + /** + * ISBN-10 check digit + * @link http://en.wikipedia.org/wiki/International_Standard_Book_Number#ISBN-10_check_digits + * + * @param string $input ISBN without check-digit + * @throws \LengthException When wrong input length passed + * + * @return integer Check digit + */ + protected static function isbnChecksum($input) + { + // We're calculating check digit for ISBN-10 + // so, the length of the input should be 9 + $length = 9; + + if (strlen($input) !== $length) { + throw new \LengthException(sprintf('Input length should be equal to %d', $length)); + } + + $digits = str_split($input); + array_walk( + $digits, + function (&$digit, $position) { + $digit = (10 - $position) * $digit; + } + ); + $result = (11 - array_sum($digits) % 11) % 11; + + // 10 is replaced by X + return ($result < 10)?$result:'X'; + } + + /** + * Get a random EAN13 barcode. + * @return string + * @example '4006381333931' + */ + public function ean13() + { + return $this->ean(13); + } + + /** + * Get a random EAN8 barcode. + * @return string + * @example '73513537' + */ + public function ean8() + { + return $this->ean(8); + } + + /** + * Get a random ISBN-10 code + * @link http://en.wikipedia.org/wiki/International_Standard_Book_Number + * + * @return string + * @example '4881416324' + */ + public function isbn10() + { + $code = static::numerify(str_repeat('#', 9)); + + return $code . static::isbnChecksum($code); + } + + /** + * Get a random ISBN-13 code + * @link http://en.wikipedia.org/wiki/International_Standard_Book_Number + * + * @return string + * @example '9790404436093' + */ + public function isbn13() + { + $code = '97' . static::numberBetween(8, 9) . static::numerify(str_repeat('#', 9)); + + return $code . static::eanChecksum($code); + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/Base.php b/vendor/fzaninotto/faker/src/Faker/Provider/Base.php new file mode 100644 index 0000000..6d7a66e --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/Base.php @@ -0,0 +1,583 @@ +generator = $generator; + } + + /** + * Returns a random number between 0 and 9 + * + * @return integer + */ + public static function randomDigit() + { + return mt_rand(0, 9); + } + + /** + * Returns a random number between 1 and 9 + * + * @return integer + */ + public static function randomDigitNotNull() + { + return mt_rand(1, 9); + } + + /** + * Generates a random digit, which cannot be $except + * + * @param int $except + * @return int + */ + public static function randomDigitNot($except) + { + $result = self::numberBetween(0, 8); + if ($result >= $except) { + $result++; + } + return $result; + } + + /** + * Returns a random integer with 0 to $nbDigits digits. + * + * The maximum value returned is mt_getrandmax() + * + * @param integer $nbDigits Defaults to a random number between 1 and 9 + * @param boolean $strict Whether the returned number should have exactly $nbDigits + * @example 79907610 + * + * @return integer + */ + public static function randomNumber($nbDigits = null, $strict = false) + { + if (!is_bool($strict)) { + throw new \InvalidArgumentException('randomNumber() generates numbers of fixed width. To generate numbers between two boundaries, use numberBetween() instead.'); + } + if (null === $nbDigits) { + $nbDigits = static::randomDigitNotNull(); + } + $max = pow(10, $nbDigits) - 1; + if ($max > mt_getrandmax()) { + throw new \InvalidArgumentException('randomNumber() can only generate numbers up to mt_getrandmax()'); + } + if ($strict) { + return mt_rand(pow(10, $nbDigits - 1), $max); + } + + return mt_rand(0, $max); + } + + /** + * Return a random float number + * + * @param int $nbMaxDecimals + * @param int|float $min + * @param int|float $max + * @example 48.8932 + * + * @return float + */ + public static function randomFloat($nbMaxDecimals = null, $min = 0, $max = null) + { + if (null === $nbMaxDecimals) { + $nbMaxDecimals = static::randomDigit(); + } + + if (null === $max) { + $max = static::randomNumber(); + } + + if ($min > $max) { + $tmp = $min; + $min = $max; + $max = $tmp; + } + + return round($min + mt_rand() / mt_getrandmax() * ($max - $min), $nbMaxDecimals); + } + + /** + * Returns a random number between $int1 and $int2 (any order) + * + * @param integer $int1 default to 0 + * @param integer $int2 defaults to 32 bit max integer, ie 2147483647 + * @example 79907610 + * + * @return integer + */ + public static function numberBetween($int1 = 0, $int2 = 2147483647) + { + $min = $int1 < $int2 ? $int1 : $int2; + $max = $int1 < $int2 ? $int2 : $int1; + return mt_rand($min, $max); + } + + /** + * Returns a random letter from a to z + * + * @return string + */ + public static function randomLetter() + { + return chr(mt_rand(97, 122)); + } + + /** + * Returns a random ASCII character (excluding accents and special chars) + */ + public static function randomAscii() + { + return chr(mt_rand(33, 126)); + } + + /** + * 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. + * @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) + { + $allKeys = array_keys($array); + $numKeys = count($allKeys); + + if ($numKeys < $count) { + throw new \LengthException(sprintf('Cannot get %d elements, only %d in array', $count, $numKeys)); + } + + $highKey = $numKeys - 1; + $keys = $elements = array(); + $numElements = 0; + + while ($numElements < $count) { + $num = mt_rand(0, $highKey); + if (isset($keys[$num])) { + continue; + } + + $keys[$num] = true; + $elements[] = $array[$allKeys[$num]]; + $numElements++; + } + + return $elements; + } + + /** + * Returns a random element from a passed array + * + * @param array $array + * @return mixed + */ + public static function randomElement($array = array('a', 'b', 'c')) + { + if (!$array) { + return null; + } + $elements = static::randomElements($array, 1); + + return $elements[0]; + } + + /** + * Returns a random key from a passed associative array + * + * @param array $array + * @return int|string|null + */ + public static function randomKey($array = array()) + { + if (!$array) { + return null; + } + $keys = array_keys($array); + $key = $keys[mt_rand(0, count($keys) - 1)]; + + return $key; + } + + /** + * Returns a shuffled version of the argument. + * + * This function accepts either an array, or a string. + * + * @example $faker->shuffle([1, 2, 3]); // [2, 1, 3] + * @example $faker->shuffle('hello, world'); // 'rlo,h eold!lw' + * + * @see shuffleArray() + * @see shuffleString() + * + * @param array|string $arg The set to shuffle + * @return array|string The shuffled set + */ + public static function shuffle($arg = '') + { + if (is_array($arg)) { + return static::shuffleArray($arg); + } + if (is_string($arg)) { + return static::shuffleString($arg); + } + throw new \InvalidArgumentException('shuffle() only supports strings or arrays'); + } + + /** + * 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 + * twister random generator. This function is therefore more random than + * PHP's shuffle() function, and it is seedable. + * + * @link http://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle + * + * @example $faker->shuffleArray([1, 2, 3]); // [2, 1, 3] + * + * @param array $array The set to shuffle + * @return array The shuffled set + */ + public static function shuffleArray($array = array()) + { + $shuffledArray = array(); + $i = 0; + reset($array); + while (list($key, $value) = each($array)) { + if ($i == 0) { + $j = 0; + } else { + $j = mt_rand(0, $i); + } + if ($j == $i) { + $shuffledArray[]= $value; + } else { + $shuffledArray[]= $shuffledArray[$j]; + $shuffledArray[$j] = $value; + } + $i++; + } + return $shuffledArray; + } + + /** + * 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 + * 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. + * + * @link http://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle + * + * @example $faker->shuffleString('hello, world'); // 'rlo,h eold!lw' + * + * @param string $string The set to shuffle + * @param string $encoding The string encoding (defaults to UTF-8) + * @return string The shuffled set + */ + public static function shuffleString($string = '', $encoding = 'UTF-8') + { + if (function_exists('mb_strlen')) { + // UTF8-safe str_split() + $array = array(); + $strlen = mb_strlen($string, $encoding); + for ($i = 0; $i < $strlen; $i++) { + $array []= mb_substr($string, $i, 1, $encoding); + } + } else { + $array = str_split($string, 1); + } + return implode('', static::shuffleArray($array)); + } + + private static function replaceWildcard($string, $wildcard = '#', $callback = 'static::randomDigit') + { + if (($pos = strpos($string, $wildcard)) === false) { + return $string; + } + for ($i = $pos, $last = strrpos($string, $wildcard, $pos) + 1; $i < $last; $i++) { + if ($string[$i] === $wildcard) { + $string[$i] = call_user_func($callback); + } + } + return $string; + } + + /** + * Replaces all hash sign ('#') occurrences with a random number + * Replaces all percentage sign ('%') occurrences with a not null number + * + * @param string $string String that needs to bet parsed + * @return string + */ + public static function numerify($string = '###') + { + // instead of using randomDigit() several times, which is slow, + // count the number of hashes and generate once a large number + $toReplace = array(); + if (($pos = strpos($string, '#')) !== false) { + for ($i = $pos, $last = strrpos($string, '#', $pos) + 1; $i < $last; $i++) { + if ($string[$i] === '#') { + $toReplace[] = $i; + } + } + } + if ($nbReplacements = count($toReplace)) { + $maxAtOnce = strlen((string) mt_getrandmax()) - 1; + $numbers = ''; + $i = 0; + while ($i < $nbReplacements) { + $size = min($nbReplacements - $i, $maxAtOnce); + $numbers .= str_pad(static::randomNumber($size), $size, '0', STR_PAD_LEFT); + $i += $size; + } + for ($i = 0; $i < $nbReplacements; $i++) { + $string[$toReplace[$i]] = $numbers[$i]; + } + } + $string = self::replaceWildcard($string, '%', 'static::randomDigitNotNull'); + + return $string; + } + + /** + * Replaces all question mark ('?') occurrences with a random letter + * + * @param string $string String that needs to bet parsed + * @return string + */ + public static function lexify($string = '????') + { + return self::replaceWildcard($string, '?', 'static::randomLetter'); + } + + /** + * Replaces hash signs ('#') and question marks ('?') with random numbers and letters + * An asterisk ('*') is replaced with either a random number or a random letter + * + * @param string $string String that needs to bet parsed + * @return string + */ + public static function bothify($string = '## ??') + { + $string = self::replaceWildcard($string, '*', function () { + return mt_rand(0, 1) ? '#' : '?'; + }); + return static::lexify(static::numerify($string)); + } + + /** + * Replaces * signs with random numbers and letters and special characters + * + * @example $faker->asciify(''********'); // "s5'G!uC3" + * + * @param string $string String that needs to bet parsed + * @return string + */ + public static function asciify($string = '****') + { + return preg_replace_callback('/\*/u', 'static::randomAscii', $string); + } + + /** + * Transforms a basic regular expression into a random string satisfying the expression. + * + * @example $faker->regexify('[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}'); // sm0@y8k96a.ej + * + * 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, + * assertions, recursive patterns, and comments are not supported. Escaping + * support is extremely fragile. + * + * This method is also VERY slow. Use it only when no other formatter + * can generate the fake data you want. For instance, prefer calling + * `$faker->email` rather than `regexify` with the previous regular + * expression. + * + * Also note than `bothify` can probably do most of what this method does, + * but much faster. For instance, for a dummy email generation, try + * `$faker->bothify('?????????@???.???')`. + * + * @see https://github.com/icomefromthenet/ReverseRegex for a more robust implementation + * + * @param string $regex A regular expression (delimiters are optional) + * @return string + */ + public static function regexify($regex = '') + { + // ditch the anchors + $regex = preg_replace('/^\/?\^?/', '', $regex); + $regex = preg_replace('/\$?\/?$/', '', $regex); + // All {2} become {2,2} + $regex = preg_replace('/\{(\d+)\}/', '{\1,\1}', $regex); + // Single-letter quantifiers (?, *, +) become bracket quantifiers ({0,1}, {0,rand}, {1, rand}) + $regex = preg_replace('/(? 0 && $weight < 1 && mt_rand() / mt_getrandmax() <= $weight) { + return $this->generator; + } + + // new system with percentage + if (is_int($weight) && mt_rand(1, 100) <= $weight) { + return $this->generator; + } + + return new DefaultGenerator($default); + } + + /** + * Chainable method for making any formatter unique. + * + * + * // will never return twice the same value + * $faker->unique()->randomElement(array(1, 2, 3)); + * + * + * @param boolean $reset If set to true, resets the list of existing values + * @param integer $maxRetries Maximum number of retries to find a unique value, + * After which an OverflowException is thrown. + * @throws \OverflowException When no unique value can be found by iterating $maxRetries times + * + * @return UniqueGenerator A proxy class returning only non-existing values + */ + public function unique($reset = false, $maxRetries = 10000) + { + if ($reset || !$this->unique) { + $this->unique = new UniqueGenerator($this->generator, $maxRetries); + } + + return $this->unique; + } + + /** + * Chainable method for forcing any formatter to return only valid values. + * + * The value validity is determined by a function passed as first argument. + * + * + * $values = array(); + * $evenValidator = function ($digit) { + * return $digit % 2 === 0; + * }; + * for ($i=0; $i < 10; $i++) { + * $values []= $faker->valid($evenValidator)->randomDigit; + * } + * print_r($values); // [0, 4, 8, 4, 2, 6, 0, 8, 8, 6] + * + * + * @param Closure $validator A function returning true for valid values + * @param integer $maxRetries Maximum number of retries to find a unique value, + * After which an OverflowException is thrown. + * @throws \OverflowException When no valid value can be found by iterating $maxRetries times + * + * @return ValidGenerator A proxy class returning only valid values + */ + public function valid($validator = null, $maxRetries = 10000) + { + return new ValidGenerator($this->generator, $validator, $maxRetries); + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/Biased.php b/vendor/fzaninotto/faker/src/Faker/Provider/Biased.php new file mode 100644 index 0000000..a9e98d9 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/Biased.php @@ -0,0 +1,64 @@ +generator->parse($format); + } + + /** + * @example 'Ltd' + */ + public static function companySuffix() + { + return static::randomElement(static::$companySuffix); + } + + /** + * @example 'Job' + */ + public function jobTitle() + { + $format = static::randomElement(static::$jobTitleFormat); + + return $this->generator->parse($format); + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/DateTime.php b/vendor/fzaninotto/faker/src/Faker/Provider/DateTime.php new file mode 100644 index 0000000..7baa7bc --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/DateTime.php @@ -0,0 +1,293 @@ +getTimestamp(); + } + + return strtotime(empty($max) ? 'now' : $max); + } + + /** + * Get a timestamp between January 1, 1970 and now + * + * @param \DateTime|int|string $max maximum timestamp used as random end limit, default to "now" + * @return int + * + * @example 1061306726 + */ + public static function unixTime($max = 'now') + { + return mt_rand(0, static::getMaxTimestamp($max)); + } + + /** + * 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` + * @example DateTime('2005-08-16 20:39:21') + * @return \DateTime + * @see http://php.net/manual/en/timezones.php + * @see http://php.net/manual/en/function.date-default-timezone-get.php + */ + public static function dateTime($max = 'now', $timezone = null) + { + return static::setTimezone( + new \DateTime('@' . static::unixTime($max)), + (null === $timezone ? date_default_timezone_get() : $timezone) + ); + } + + /** + * 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` + * @example DateTime('1265-03-22 21:15:52') + * @return \DateTime + * @see http://php.net/manual/en/timezones.php + * @see http://php.net/manual/en/function.date-default-timezone-get.php + */ + public static function dateTimeAD($max = 'now', $timezone = null) + { + return static::setTimezone( + new \DateTime('@' . mt_rand(-62135597361, static::getMaxTimestamp($max))), + (null === $timezone ? date_default_timezone_get() : $timezone) + ); + } + + /** + * get a date string formatted with ISO8601 + * + * @param \DateTime|int|string $max maximum timestamp used as random end limit, default to "now" + * @return string + * @example '2003-10-21T16:05:52+0000' + */ + public static function iso8601($max = 'now') + { + return static::date(\DateTime::ISO8601, $max); + } + + /** + * Get a date string between January 1, 1970 and now + * + * @param string $format + * @param \DateTime|int|string $max maximum timestamp used as random end limit, default to "now" + * @return string + * @example '2008-11-27' + */ + public static function date($format = 'Y-m-d', $max = 'now') + { + return static::dateTime($max)->format($format); + } + + /** + * Get a time string (24h format by default) + * + * @param string $format + * @param \DateTime|int|string $max maximum timestamp used as random end limit, default to "now" + * @return string + * @example '15:02:34' + */ + public static function time($format = 'H:i:s', $max = 'now') + { + return static::dateTime($max)->format($format); + } + + /** + * Get a DateTime object based on a random date between two given dates. + * Accepts date strings that can be recognized by strtotime(). + * + * @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` + * @example DateTime('1999-02-02 11:42:52') + * @return \DateTime + * @see http://php.net/manual/en/timezones.php + * @see http://php.net/manual/en/function.date-default-timezone-get.php + */ + public static function dateTimeBetween($startDate = '-30 years', $endDate = 'now', $timezone = null) + { + $startTimestamp = $startDate instanceof \DateTime ? $startDate->getTimestamp() : strtotime($startDate); + $endTimestamp = static::getMaxTimestamp($endDate); + + if ($startTimestamp > $endTimestamp) { + throw new \InvalidArgumentException('Start date must be anterior to end date.'); + } + + $timestamp = mt_rand($startTimestamp, $endTimestamp); + + return static::setTimezone( + new \DateTime('@' . $timestamp), + (null === $timezone ? date_default_timezone_get() : $timezone) + ); + } + + /** + * Get a DateTime object based on a random date between one given date and + * an interval + * Accepts date string that can be recognized by strtotime(). + * + * @param 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` + * @example dateTimeInInterval('1999-02-02 11:42:52', '+ 5 days') + * @return \DateTime + * @see http://php.net/manual/en/timezones.php + * @see http://php.net/manual/en/function.date-default-timezone-get.php + */ + public static function dateTimeInInterval($date = '-30 years', $interval = '+5 days', $timezone = null) + { + $intervalObject = \DateInterval::createFromDateString($interval); + $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) + ); + } + + /** + * @param \DateTime|int|string $max maximum timestamp used as random end limit, default to "now" + * @example DateTime('1964-04-04 11:02:02') + * @return \DateTime + */ + public static function dateTimeThisCentury($max = 'now') + { + return static::dateTimeBetween('-100 year', $max); + } + + /** + * @param \DateTime|int|string $max maximum timestamp used as random end limit, default to "now" + * @example DateTime('2010-03-10 05:18:58') + * @return \DateTime + */ + public static function dateTimeThisDecade($max = 'now') + { + return static::dateTimeBetween('-10 year', $max); + } + + /** + * @param \DateTime|int|string $max maximum timestamp used as random end limit, default to "now" + * @example DateTime('2011-09-19 09:24:37') + * @return \DateTime + */ + public static function dateTimeThisYear($max = 'now') + { + return static::dateTimeBetween('-1 year', $max); + } + + /** + * @param \DateTime|int|string $max maximum timestamp used as random end limit, default to "now" + * @example DateTime('2011-10-05 12:51:46') + * @return \DateTime + */ + public static function dateTimeThisMonth($max = 'now') + { + return static::dateTimeBetween('-1 month', $max); + } + + /** + * @param \DateTime|int|string $max maximum timestamp used as random end limit, default to "now" + * @return string + * @example 'am' + */ + public static function amPm($max = 'now') + { + return static::dateTime($max)->format('a'); + } + + /** + * @param \DateTime|int|string $max maximum timestamp used as random end limit, default to "now" + * @return string + * @example '22' + */ + public static function dayOfMonth($max = 'now') + { + return static::dateTime($max)->format('d'); + } + + /** + * @param \DateTime|int|string $max maximum timestamp used as random end limit, default to "now" + * @return string + * @example 'Tuesday' + */ + public static function dayOfWeek($max = 'now') + { + return static::dateTime($max)->format('l'); + } + + /** + * @param \DateTime|int|string $max maximum timestamp used as random end limit, default to "now" + * @return string + * @example '7' + */ + public static function month($max = 'now') + { + return static::dateTime($max)->format('m'); + } + + /** + * @param \DateTime|int|string $max maximum timestamp used as random end limit, default to "now" + * @return string + * @example 'September' + */ + public static function monthName($max = 'now') + { + return static::dateTime($max)->format('F'); + } + + /** + * @param \DateTime|int|string $max maximum timestamp used as random end limit, default to "now" + * @return int + * @example 1673 + */ + public static function year($max = 'now') + { + return static::dateTime($max)->format('Y'); + } + + /** + * @return string + * @example 'XVII' + */ + public static function century() + { + return static::randomElement(static::$century); + } + + /** + * @return string + * @example 'Europe/Paris' + */ + public static function timezone() + { + return static::randomElement(\DateTimeZone::listIdentifiers()); + } + + /** + * Internal method to set the time zone on a DateTime. + */ + private static function setTimezone(\DateTime $dt, $timezone) + { + return $dt->setTimezone(new \DateTimeZone($timezone)); + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/File.php b/vendor/fzaninotto/faker/src/Faker/Provider/File.php new file mode 100644 index 0000000..ba01594 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/File.php @@ -0,0 +1,606 @@ + file extension(s) + * @link http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types + */ + protected static $mimeTypes = array( + 'application/atom+xml' => 'atom', + 'application/ecmascript' => 'ecma', + 'application/emma+xml' => 'emma', + 'application/epub+zip' => 'epub', + 'application/java-archive' => 'jar', + 'application/java-vm' => 'class', + 'application/javascript' => 'js', + 'application/json' => 'json', + 'application/jsonml+json' => 'jsonml', + 'application/lost+xml' => 'lostxml', + 'application/mathml+xml' => 'mathml', + 'application/mets+xml' => 'mets', + 'application/mods+xml' => 'mods', + 'application/mp4' => 'mp4s', + 'application/msword' => array('doc', 'dot'), + 'application/octet-stream' => array( + 'bin', + 'dms', + 'lrf', + 'mar', + 'so', + 'dist', + 'distz', + 'pkg', + 'bpk', + 'dump', + 'elc', + 'deploy' + ), + 'application/ogg' => 'ogx', + 'application/omdoc+xml' => 'omdoc', + 'application/pdf' => 'pdf', + 'application/pgp-encrypted' => 'pgp', + 'application/pgp-signature' => array('asc', 'sig'), + 'application/pkix-pkipath' => 'pkipath', + 'application/pkixcmp' => 'pki', + 'application/pls+xml' => 'pls', + 'application/postscript' => array('ai', 'eps', 'ps'), + 'application/pskc+xml' => 'pskcxml', + 'application/rdf+xml' => 'rdf', + 'application/reginfo+xml' => 'rif', + 'application/rss+xml' => 'rss', + 'application/rtf' => 'rtf', + 'application/sbml+xml' => 'sbml', + 'application/vnd.adobe.air-application-installer-package+zip' => 'air', + 'application/vnd.adobe.xdp+xml' => 'xdp', + 'application/vnd.adobe.xfdf' => 'xfdf', + 'application/vnd.ahead.space' => 'ahead', + 'application/vnd.dart' => 'dart', + 'application/vnd.data-vision.rdz' => 'rdz', + 'application/vnd.dece.data' => array('uvf', 'uvvf', 'uvd', 'uvvd'), + 'application/vnd.dece.ttml+xml' => array('uvt', 'uvvt'), + 'application/vnd.dece.unspecified' => array('uvx', 'uvvx'), + 'application/vnd.dece.zip' => array('uvz', 'uvvz'), + 'application/vnd.denovo.fcselayout-link' => 'fe_launch', + 'application/vnd.dna' => 'dna', + 'application/vnd.dolby.mlp' => 'mlp', + 'application/vnd.dpgraph' => 'dpg', + 'application/vnd.dreamfactory' => 'dfac', + 'application/vnd.ds-keypoint' => 'kpxx', + 'application/vnd.dvb.ait' => 'ait', + 'application/vnd.dvb.service' => 'svc', + 'application/vnd.dynageo' => 'geo', + 'application/vnd.ecowin.chart' => 'mag', + 'application/vnd.enliven' => 'nml', + 'application/vnd.epson.esf' => 'esf', + 'application/vnd.epson.msf' => 'msf', + 'application/vnd.epson.quickanime' => 'qam', + 'application/vnd.epson.salt' => 'slt', + 'application/vnd.epson.ssf' => 'ssf', + 'application/vnd.ezpix-album' => 'ez2', + 'application/vnd.ezpix-package' => 'ez3', + 'application/vnd.fdf' => 'fdf', + 'application/vnd.fdsn.mseed' => 'mseed', + 'application/vnd.fdsn.seed' => array('seed', 'dataless'), + 'application/vnd.flographit' => 'gph', + 'application/vnd.fluxtime.clip' => 'ftc', + 'application/vnd.hal+xml' => 'hal', + 'application/vnd.hydrostatix.sof-data' => 'sfd-hdstx', + 'application/vnd.ibm.minipay' => 'mpy', + 'application/vnd.ibm.secure-container' => 'sc', + 'application/vnd.iccprofile' => array('icc', 'icm'), + 'application/vnd.igloader' => 'igl', + 'application/vnd.immervision-ivp' => 'ivp', + 'application/vnd.kde.karbon' => 'karbon', + 'application/vnd.kde.kchart' => 'chrt', + 'application/vnd.kde.kformula' => 'kfo', + 'application/vnd.kde.kivio' => 'flw', + 'application/vnd.kde.kontour' => 'kon', + 'application/vnd.kde.kpresenter' => array('kpr', 'kpt'), + 'application/vnd.kde.kspread' => 'ksp', + 'application/vnd.kde.kword' => array('kwd', 'kwt'), + 'application/vnd.kenameaapp' => 'htke', + 'application/vnd.kidspiration' => 'kia', + 'application/vnd.kinar' => array('kne', 'knp'), + 'application/vnd.koan' => array('skp', 'skd', 'skt', 'skm'), + 'application/vnd.kodak-descriptor' => 'sse', + 'application/vnd.las.las+xml' => 'lasxml', + 'application/vnd.llamagraphics.life-balance.desktop' => 'lbd', + 'application/vnd.llamagraphics.life-balance.exchange+xml' => 'lbe', + 'application/vnd.lotus-1-2-3' => '123', + 'application/vnd.lotus-approach' => 'apr', + 'application/vnd.lotus-freelance' => 'pre', + 'application/vnd.lotus-notes' => 'nsf', + 'application/vnd.lotus-organizer' => 'org', + 'application/vnd.lotus-screencam' => 'scm', + 'application/vnd.mozilla.xul+xml' => 'xul', + 'application/vnd.ms-artgalry' => 'cil', + 'application/vnd.ms-cab-compressed' => 'cab', + 'application/vnd.ms-excel' => array( + 'xls', + 'xlm', + 'xla', + 'xlc', + 'xlt', + 'xlw' + ), + 'application/vnd.ms-excel.addin.macroenabled.12' => 'xlam', + 'application/vnd.ms-excel.sheet.binary.macroenabled.12' => 'xlsb', + 'application/vnd.ms-excel.sheet.macroenabled.12' => 'xlsm', + 'application/vnd.ms-excel.template.macroenabled.12' => 'xltm', + 'application/vnd.ms-fontobject' => 'eot', + 'application/vnd.ms-htmlhelp' => 'chm', + 'application/vnd.ms-ims' => 'ims', + 'application/vnd.ms-lrm' => 'lrm', + 'application/vnd.ms-officetheme' => 'thmx', + 'application/vnd.ms-pki.seccat' => 'cat', + 'application/vnd.ms-pki.stl' => 'stl', + 'application/vnd.ms-powerpoint' => array('ppt', 'pps', 'pot'), + 'application/vnd.ms-powerpoint.addin.macroenabled.12' => 'ppam', + 'application/vnd.ms-powerpoint.presentation.macroenabled.12' => 'pptm', + 'application/vnd.ms-powerpoint.slide.macroenabled.12' => 'sldm', + 'application/vnd.ms-powerpoint.slideshow.macroenabled.12' => 'ppsm', + 'application/vnd.ms-powerpoint.template.macroenabled.12' => 'potm', + 'application/vnd.ms-project' => array('mpp', 'mpt'), + 'application/vnd.ms-word.document.macroenabled.12' => 'docm', + 'application/vnd.ms-word.template.macroenabled.12' => 'dotm', + 'application/vnd.ms-works' => array('wps', 'wks', 'wcm', 'wdb'), + 'application/vnd.ms-wpl' => 'wpl', + 'application/vnd.ms-xpsdocument' => 'xps', + 'application/vnd.mseq' => 'mseq', + 'application/vnd.musician' => 'mus', + 'application/vnd.oasis.opendocument.chart' => 'odc', + 'application/vnd.oasis.opendocument.chart-template' => 'otc', + 'application/vnd.oasis.opendocument.database' => 'odb', + 'application/vnd.oasis.opendocument.formula' => 'odf', + 'application/vnd.oasis.opendocument.formula-template' => 'odft', + 'application/vnd.oasis.opendocument.graphics' => 'odg', + 'application/vnd.oasis.opendocument.graphics-template' => 'otg', + 'application/vnd.oasis.opendocument.image' => 'odi', + 'application/vnd.oasis.opendocument.image-template' => 'oti', + 'application/vnd.oasis.opendocument.presentation' => 'odp', + 'application/vnd.oasis.opendocument.presentation-template' => 'otp', + 'application/vnd.oasis.opendocument.spreadsheet' => 'ods', + 'application/vnd.oasis.opendocument.spreadsheet-template' => 'ots', + 'application/vnd.oasis.opendocument.text' => 'odt', + 'application/vnd.oasis.opendocument.text-master' => 'odm', + 'application/vnd.oasis.opendocument.text-template' => 'ott', + 'application/vnd.oasis.opendocument.text-web' => 'oth', + 'application/vnd.olpc-sugar' => 'xo', + 'application/vnd.oma.dd2+xml' => 'dd2', + 'application/vnd.openofficeorg.extension' => 'oxt', + 'application/vnd.openxmlformats-officedocument.presentationml.presentation' => 'pptx', + 'application/vnd.openxmlformats-officedocument.presentationml.slide' => 'sldx', + 'application/vnd.openxmlformats-officedocument.presentationml.slideshow' => 'ppsx', + 'application/vnd.openxmlformats-officedocument.presentationml.template' => 'potx', + 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' => 'xlsx', + 'application/vnd.openxmlformats-officedocument.spreadsheetml.template' => 'xltx', + 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' => 'docx', + 'application/vnd.openxmlformats-officedocument.wordprocessingml.template' => 'dotx', + 'application/vnd.pvi.ptid1' => 'ptid', + 'application/vnd.quark.quarkxpress' => array( + 'qxd', + 'qxt', + 'qwd', + 'qwt', + 'qxl', + 'qxb' + ), + 'application/vnd.realvnc.bed' => 'bed', + 'application/vnd.recordare.musicxml' => 'mxl', + 'application/vnd.recordare.musicxml+xml' => 'musicxml', + 'application/vnd.rig.cryptonote' => 'cryptonote', + 'application/vnd.rim.cod' => 'cod', + 'application/vnd.rn-realmedia' => 'rm', + 'application/vnd.rn-realmedia-vbr' => 'rmvb', + 'application/vnd.route66.link66+xml' => 'link66', + 'application/vnd.sailingtracker.track' => 'st', + 'application/vnd.seemail' => 'see', + 'application/vnd.sema' => 'sema', + 'application/vnd.semd' => 'semd', + 'application/vnd.semf' => 'semf', + 'application/vnd.shana.informed.formdata' => 'ifm', + 'application/vnd.shana.informed.formtemplate' => 'itp', + 'application/vnd.shana.informed.interchange' => 'iif', + 'application/vnd.shana.informed.package' => 'ipk', + 'application/vnd.simtech-mindmapper' => array('twd', 'twds'), + 'application/vnd.smaf' => 'mmf', + 'application/vnd.stepmania.stepchart' => 'sm', + 'application/vnd.sun.xml.calc' => 'sxc', + 'application/vnd.sun.xml.calc.template' => 'stc', + 'application/vnd.sun.xml.draw' => 'sxd', + 'application/vnd.sun.xml.draw.template' => 'std', + 'application/vnd.sun.xml.impress' => 'sxi', + 'application/vnd.sun.xml.impress.template' => 'sti', + 'application/vnd.sun.xml.math' => 'sxm', + 'application/vnd.sun.xml.writer' => 'sxw', + 'application/vnd.sun.xml.writer.global' => 'sxg', + 'application/vnd.sun.xml.writer.template' => 'stw', + 'application/vnd.sus-calendar' => array('sus', 'susp'), + 'application/vnd.svd' => 'svd', + 'application/vnd.symbian.install' => array('sis', 'sisx'), + 'application/vnd.syncml+xml' => 'xsm', + 'application/vnd.syncml.dm+wbxml' => 'bdm', + 'application/vnd.syncml.dm+xml' => 'xdm', + 'application/vnd.tao.intent-module-archive' => 'tao', + 'application/vnd.tcpdump.pcap' => array('pcap', 'cap', 'dmp'), + 'application/vnd.tmobile-livetv' => 'tmo', + 'application/vnd.trid.tpt' => 'tpt', + 'application/vnd.triscape.mxs' => 'mxs', + 'application/vnd.trueapp' => 'tra', + 'application/vnd.ufdl' => array('ufd', 'ufdl'), + 'application/vnd.uiq.theme' => 'utz', + 'application/vnd.umajin' => 'umj', + 'application/vnd.unity' => 'unityweb', + 'application/vnd.uoml+xml' => 'uoml', + 'application/vnd.vcx' => 'vcx', + 'application/vnd.visio' => array('vsd', 'vst', 'vss', 'vsw'), + 'application/vnd.visionary' => 'vis', + 'application/vnd.vsf' => 'vsf', + 'application/vnd.wap.wbxml' => 'wbxml', + 'application/vnd.wap.wmlc' => 'wmlc', + 'application/vnd.wap.wmlscriptc' => 'wmlsc', + 'application/vnd.webturbo' => 'wtb', + 'application/vnd.wolfram.player' => 'nbp', + 'application/vnd.wordperfect' => 'wpd', + 'application/vnd.wqd' => 'wqd', + 'application/vnd.wt.stf' => 'stf', + 'application/vnd.xara' => 'xar', + 'application/vnd.xfdl' => 'xfdl', + 'application/voicexml+xml' => 'vxml', + 'application/widget' => 'wgt', + 'application/winhlp' => 'hlp', + 'application/wsdl+xml' => 'wsdl', + 'application/wspolicy+xml' => 'wspolicy', + 'application/x-7z-compressed' => '7z', + 'application/x-bittorrent' => 'torrent', + 'application/x-blorb' => array('blb', 'blorb'), + 'application/x-bzip' => 'bz', + 'application/x-cdlink' => 'vcd', + 'application/x-cfs-compressed' => 'cfs', + 'application/x-chat' => 'chat', + 'application/x-chess-pgn' => 'pgn', + 'application/x-conference' => 'nsc', + 'application/x-cpio' => 'cpio', + 'application/x-csh' => 'csh', + 'application/x-debian-package' => array('deb', 'udeb'), + 'application/x-dgc-compressed' => 'dgc', + 'application/x-director' => array( + 'dir', + 'dcr', + 'dxr', + 'cst', + 'cct', + 'cxt', + 'w3d', + 'fgd', + 'swa' + ), + 'application/x-font-ttf' => array('ttf', 'ttc'), + 'application/x-font-type1' => array('pfa', 'pfb', 'pfm', 'afm'), + 'application/x-font-woff' => 'woff', + 'application/x-freearc' => 'arc', + 'application/x-futuresplash' => 'spl', + 'application/x-gca-compressed' => 'gca', + 'application/x-glulx' => 'ulx', + 'application/x-gnumeric' => 'gnumeric', + 'application/x-gramps-xml' => 'gramps', + 'application/x-gtar' => 'gtar', + 'application/x-hdf' => 'hdf', + 'application/x-install-instructions' => 'install', + 'application/x-iso9660-image' => 'iso', + 'application/x-java-jnlp-file' => 'jnlp', + 'application/x-latex' => 'latex', + 'application/x-lzh-compressed' => array('lzh', 'lha'), + 'application/x-mie' => 'mie', + 'application/x-mobipocket-ebook' => array('prc', 'mobi'), + 'application/x-ms-application' => 'application', + 'application/x-ms-shortcut' => 'lnk', + 'application/x-ms-wmd' => 'wmd', + 'application/x-ms-wmz' => 'wmz', + 'application/x-ms-xbap' => 'xbap', + 'application/x-msaccess' => 'mdb', + 'application/x-msbinder' => 'obd', + 'application/x-mscardfile' => 'crd', + 'application/x-msclip' => 'clp', + 'application/x-msdownload' => array('exe', 'dll', 'com', 'bat', 'msi'), + 'application/x-msmediaview' => array( + 'mvb', + 'm13', + 'm14' + ), + 'application/x-msmetafile' => array('wmf', 'wmz', 'emf', 'emz'), + 'application/x-rar-compressed' => 'rar', + 'application/x-research-info-systems' => 'ris', + 'application/x-sh' => 'sh', + 'application/x-shar' => 'shar', + 'application/x-shockwave-flash' => 'swf', + 'application/x-silverlight-app' => 'xap', + 'application/x-sql' => 'sql', + 'application/x-stuffit' => 'sit', + 'application/x-stuffitx' => 'sitx', + 'application/x-subrip' => 'srt', + 'application/x-sv4cpio' => 'sv4cpio', + 'application/x-sv4crc' => 'sv4crc', + 'application/x-t3vm-image' => 't3', + 'application/x-tads' => 'gam', + 'application/x-tar' => 'tar', + 'application/x-tcl' => 'tcl', + 'application/x-tex' => 'tex', + 'application/x-tex-tfm' => 'tfm', + 'application/x-texinfo' => array('texinfo', 'texi'), + 'application/x-tgif' => 'obj', + 'application/x-ustar' => 'ustar', + 'application/x-wais-source' => 'src', + 'application/x-x509-ca-cert' => array('der', 'crt'), + 'application/x-xfig' => 'fig', + 'application/x-xliff+xml' => 'xlf', + 'application/x-xpinstall' => 'xpi', + 'application/x-xz' => 'xz', + 'application/x-zmachine' => 'z1', + 'application/xaml+xml' => 'xaml', + 'application/xcap-diff+xml' => 'xdf', + 'application/xenc+xml' => 'xenc', + 'application/xhtml+xml' => array('xhtml', 'xht'), + 'application/xml' => array('xml', 'xsl'), + 'application/xml-dtd' => 'dtd', + 'application/xop+xml' => 'xop', + 'application/xproc+xml' => 'xpl', + 'application/xslt+xml' => 'xslt', + 'application/xspf+xml' => 'xspf', + 'application/xv+xml' => array('mxml', 'xhvml', 'xvml', 'xvm'), + 'application/yang' => 'yang', + 'application/yin+xml' => 'yin', + 'application/zip' => 'zip', + 'audio/adpcm' => 'adp', + 'audio/basic' => array('au', 'snd'), + 'audio/midi' => array('mid', 'midi', 'kar', 'rmi'), + 'audio/mp4' => 'mp4a', + 'audio/mpeg' => array( + 'mpga', + 'mp2', + 'mp2a', + 'mp3', + 'm2a', + 'm3a' + ), + 'audio/ogg' => array('oga', 'ogg', 'spx'), + 'audio/vnd.dece.audio' => array('uva', 'uvva'), + 'audio/vnd.rip' => 'rip', + 'audio/webm' => 'weba', + 'audio/x-aac' => 'aac', + 'audio/x-aiff' => array('aif', 'aiff', 'aifc'), + 'audio/x-caf' => 'caf', + 'audio/x-flac' => 'flac', + 'audio/x-matroska' => 'mka', + 'audio/x-mpegurl' => 'm3u', + 'audio/x-ms-wax' => 'wax', + 'audio/x-ms-wma' => 'wma', + 'audio/x-pn-realaudio' => array('ram', 'ra'), + 'audio/x-pn-realaudio-plugin' => 'rmp', + 'audio/x-wav' => 'wav', + 'audio/xm' => 'xm', + 'image/bmp' => 'bmp', + 'image/cgm' => 'cgm', + 'image/g3fax' => 'g3', + 'image/gif' => 'gif', + 'image/ief' => 'ief', + 'image/jpeg' => array('jpeg', 'jpg', 'jpe'), + 'image/ktx' => 'ktx', + 'image/png' => 'png', + 'image/prs.btif' => 'btif', + 'image/sgi' => 'sgi', + 'image/svg+xml' => array('svg', 'svgz'), + 'image/tiff' => array('tiff', 'tif'), + 'image/vnd.adobe.photoshop' => 'psd', + 'image/vnd.dece.graphic' => array('uvi', 'uvvi', 'uvg', 'uvvg'), + 'image/vnd.dvb.subtitle' => 'sub', + 'image/vnd.djvu' => array('djvu', 'djv'), + 'image/vnd.dwg' => 'dwg', + 'image/vnd.dxf' => 'dxf', + 'image/vnd.fastbidsheet' => 'fbs', + 'image/vnd.fpx' => 'fpx', + 'image/vnd.fst' => 'fst', + 'image/vnd.fujixerox.edmics-mmr' => 'mmr', + 'image/vnd.fujixerox.edmics-rlc' => 'rlc', + 'image/vnd.ms-modi' => 'mdi', + 'image/vnd.ms-photo' => 'wdp', + 'image/vnd.net-fpx' => 'npx', + 'image/vnd.wap.wbmp' => 'wbmp', + 'image/vnd.xiff' => 'xif', + 'image/webp' => 'webp', + 'image/x-3ds' => '3ds', + 'image/x-cmu-raster' => 'ras', + 'image/x-cmx' => 'cmx', + 'image/x-freehand' => array('fh', 'fhc', 'fh4', 'fh5', 'fh7'), + 'image/x-icon' => 'ico', + 'image/x-mrsid-image' => 'sid', + 'image/x-pcx' => 'pcx', + 'image/x-pict' => array('pic', 'pct'), + 'image/x-portable-anymap' => 'pnm', + 'image/x-portable-bitmap' => 'pbm', + 'image/x-portable-graymap' => 'pgm', + 'image/x-portable-pixmap' => 'ppm', + 'image/x-rgb' => 'rgb', + 'image/x-tga' => 'tga', + 'image/x-xbitmap' => 'xbm', + 'image/x-xpixmap' => 'xpm', + 'image/x-xwindowdump' => 'xwd', + 'message/rfc822' => array('eml', 'mime'), + 'model/iges' => array('igs', 'iges'), + 'model/mesh' => array('msh', 'mesh', 'silo'), + 'model/vnd.collada+xml' => 'dae', + 'model/vnd.dwf' => 'dwf', + 'model/vnd.gdl' => 'gdl', + 'model/vnd.gtw' => 'gtw', + 'model/vnd.mts' => 'mts', + 'model/vnd.vtu' => 'vtu', + 'model/vrml' => array('wrl', 'vrml'), + 'model/x3d+binary' => 'x3db', + 'model/x3d+vrml' => 'x3dv', + 'model/x3d+xml' => 'x3d', + 'text/cache-manifest' => 'appcache', + 'text/calendar' => array('ics', 'ifb'), + 'text/css' => 'css', + 'text/csv' => 'csv', + 'text/html' => array('html', 'htm'), + 'text/n3' => 'n3', + 'text/plain' => array( + 'txt', + 'text', + 'conf', + 'def', + 'list', + 'log', + 'in' + ), + 'text/prs.lines.tag' => 'dsc', + 'text/richtext' => 'rtx', + 'text/sgml' => array('sgml', 'sgm'), + 'text/tab-separated-values' => 'tsv', + 'text/troff' => array( + 't', + 'tr', + 'roff', + 'man', + 'me', + 'ms' + ), + 'text/turtle' => 'ttl', + 'text/uri-list' => array('uri', 'uris', 'urls'), + 'text/vcard' => 'vcard', + 'text/vnd.curl' => 'curl', + 'text/vnd.curl.dcurl' => 'dcurl', + 'text/vnd.curl.scurl' => 'scurl', + 'text/vnd.curl.mcurl' => 'mcurl', + 'text/vnd.dvb.subtitle' => 'sub', + 'text/vnd.fly' => 'fly', + 'text/vnd.fmi.flexstor' => 'flx', + 'text/vnd.graphviz' => 'gv', + 'text/vnd.in3d.3dml' => '3dml', + 'text/vnd.in3d.spot' => 'spot', + 'text/vnd.sun.j2me.app-descriptor' => 'jad', + 'text/vnd.wap.wml' => 'wml', + 'text/vnd.wap.wmlscript' => 'wmls', + 'text/x-asm' => array('s', 'asm'), + 'text/x-fortran' => array('f', 'for', 'f77', 'f90'), + 'text/x-java-source' => 'java', + 'text/x-opml' => 'opml', + 'text/x-pascal' => array('p', 'pas'), + 'text/x-nfo' => 'nfo', + 'text/x-setext' => 'etx', + 'text/x-sfv' => 'sfv', + 'text/x-uuencode' => 'uu', + 'text/x-vcalendar' => 'vcs', + 'text/x-vcard' => 'vcf', + 'video/3gpp' => '3gp', + 'video/3gpp2' => '3g2', + 'video/h261' => 'h261', + 'video/h263' => 'h263', + 'video/h264' => 'h264', + 'video/jpeg' => 'jpgv', + 'video/jpm' => array('jpm', 'jpgm'), + 'video/mj2' => 'mj2', + 'video/mp4' => 'mp4', + 'video/mpeg' => array('mpeg', 'mpg', 'mpe', 'm1v', 'm2v'), + 'video/ogg' => 'ogv', + 'video/quicktime' => array('qt', 'mov'), + 'video/vnd.dece.hd' => array('uvh', 'uvvh'), + 'video/vnd.dece.mobile' => array('uvm', 'uvvm'), + 'video/vnd.dece.pd' => array('uvp', 'uvvp'), + 'video/vnd.dece.sd' => array('uvs', 'uvvs'), + 'video/vnd.dece.video' => array('uvv', 'uvvv'), + 'video/vnd.dvb.file' => 'dvb', + 'video/vnd.fvt' => 'fvt', + 'video/vnd.mpegurl' => array('mxu', 'm4u'), + 'video/vnd.ms-playready.media.pyv' => 'pyv', + 'video/vnd.uvvu.mp4' => array('uvu', 'uvvu'), + 'video/vnd.vivo' => 'viv', + 'video/webm' => 'webm', + 'video/x-f4v' => 'f4v', + 'video/x-fli' => 'fli', + 'video/x-flv' => 'flv', + 'video/x-m4v' => 'm4v', + 'video/x-matroska' => array('mkv', 'mk3d', 'mks'), + 'video/x-mng' => 'mng', + 'video/x-ms-asf' => array('asf', 'asx'), + 'video/x-ms-vob' => 'vob', + 'video/x-ms-wm' => 'wm', + 'video/x-ms-wmv' => 'wmv', + 'video/x-ms-wmx' => 'wmx', + 'video/x-ms-wvx' => 'wvx', + 'video/x-msvideo' => 'avi', + 'video/x-sgi-movie' => 'movie', + ); + + /** + * Get a random MIME type + * + * @return string + * @example 'video/avi' + */ + public static function mimeType() + { + return static::randomElement(array_keys(static::$mimeTypes)); + } + + /** + * Get a random file extension (without a dot) + * + * @example avi + * @return string + */ + public static function fileExtension() + { + $random_extension = static::randomElement(array_values(static::$mimeTypes)); + + return is_array($random_extension) ? static::randomElement($random_extension) : $random_extension; + } + + /** + * Copy a random file from the source directory to the target directory and returns the filename/fullpath + * + * @param string $sourceDirectory The directory to look for random file taking + * @param string $targetDirectory + * @param boolean $fullPath Whether to have the full path or just the filename + * @return string + */ + public static function file($sourceDirectory = '/tmp', $targetDirectory = '/tmp', $fullPath = true) + { + if (!is_dir($sourceDirectory)) { + throw new \InvalidArgumentException(sprintf('Source directory %s does not exist or is not a directory.', $sourceDirectory)); + } + + if (!is_dir($targetDirectory)) { + throw new \InvalidArgumentException(sprintf('Target directory %s does not exist or is not a directory.', $targetDirectory)); + } + + if ($sourceDirectory == $targetDirectory) { + throw new \InvalidArgumentException('Source and target directories must differ.'); + } + + // Drop . and .. and reset array keys + $files = array_filter(array_values(array_diff(scandir($sourceDirectory), array('.', '..'))), function ($file) use ($sourceDirectory) { + return is_file($sourceDirectory . DIRECTORY_SEPARATOR . $file) && is_readable($sourceDirectory . DIRECTORY_SEPARATOR . $file); + }); + + if (empty($files)) { + throw new \InvalidArgumentException(sprintf('Source directory %s is empty.', $sourceDirectory)); + } + + $sourceFullPath = $sourceDirectory . DIRECTORY_SEPARATOR . static::randomElement($files); + + $destinationFile = Uuid::uuid() . '.' . pathinfo($sourceFullPath, PATHINFO_EXTENSION); + $destinationFullPath = $targetDirectory . DIRECTORY_SEPARATOR . $destinationFile; + + if (false === copy($sourceFullPath, $destinationFullPath)) { + return false; + } + + return $fullPath ? $destinationFullPath : $destinationFile; + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/Image.php b/vendor/fzaninotto/faker/src/Faker/Provider/Image.php new file mode 100644 index 0000000..0e31d50 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/Image.php @@ -0,0 +1,94 @@ +generator->parse($format); + } + + /** + * @example 'jdoe@example.com' + */ + final public function safeEmail() + { + return preg_replace('/\s/u', '', $this->userName() . '@' . static::safeEmailDomain()); + } + + /** + * @example 'jdoe@gmail.com' + */ + public function freeEmail() + { + return preg_replace('/\s/u', '', $this->userName() . '@' . static::freeEmailDomain()); + } + + /** + * @example 'jdoe@dawson.com' + */ + public function companyEmail() + { + return preg_replace('/\s/u', '', $this->userName() . '@' . $this->domainName()); + } + + /** + * @example 'gmail.com' + */ + public static function freeEmailDomain() + { + return static::randomElement(static::$freeEmailDomain); + } + + /** + * @example 'example.org' + */ + final public static function safeEmailDomain() + { + $domains = array( + 'example.com', + 'example.org', + 'example.net' + ); + + return static::randomElement($domains); + } + /** + * @example 'jdoe' + */ + public function userName() + { + $format = static::randomElement(static::$userNameFormats); + $username = static::bothify($this->generator->parse($format)); + + return strtolower(static::transliterate($username)); + } + /** + * @example 'fY4èHdZv68' + */ + public function password($minLength = 6, $maxLength = 20) + { + $pattern = str_repeat('*', $this->numberBetween($minLength, $maxLength)); + + return $this->asciify($pattern); + } + + /** + * @example 'tiramisu.com' + */ + public function domainName() + { + return $this->domainWord() . '.' . $this->tld(); + } + + /** + * @example 'faber' + */ + public function domainWord() + { + $lastName = $this->generator->format('lastName'); + + return strtolower(static::transliterate($lastName)); + } + + /** + * @example 'com' + */ + public function tld() + { + return static::randomElement(static::$tld); + } + + /** + * @example 'http://www.runolfsdottir.com/' + */ + public function url() + { + $format = static::randomElement(static::$urlFormats); + + return $this->generator->parse($format); + } + + /** + * @example 'aut-repellat-commodi-vel-itaque-nihil-id-saepe-nostrum' + */ + public function slug($nbWords = 6, $variableNbWords = true) + { + if ($nbWords <= 0) { + return ''; + } + if ($variableNbWords) { + $nbWords = (int) ($nbWords * mt_rand(60, 140) / 100) + 1; + } + $words = $this->generator->words($nbWords); + + return join($words, '-'); + } + + /** + * @example '237.149.115.38' + */ + public function ipv4() + { + return long2ip(mt_rand(0, 1) == 0 ? mt_rand(-2147483648, -2) : mt_rand(16777216, 2147483647)); + } + + /** + * @example '35cd:186d:3e23:2986:ef9f:5b41:42a4:e6f1' + */ + public function ipv6() + { + $res = array(); + for ($i=0; $i < 8; $i++) { + $res []= dechex(mt_rand(0, "65535")); + } + + return join(':', $res); + } + + /** + * @example '10.1.1.17' + */ + public static function localIpv4() + { + 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 $ip; + } + + /** + * @example '32:F1:39:2F:D6:18' + */ + public static function macAddress() + { + for ($i=0; $i<6; $i++) { + $mac[] = sprintf('%02X', static::numberBetween(0, 0xff)); + } + $mac = implode(':', $mac); + + return $mac; + } + + protected static function transliterate($string) + { + $transId = 'Any-Latin; Latin-ASCII; NFD; [:Nonspacing Mark:] Remove; NFC;'; + if (function_exists('transliterator_transliterate') && $transliterator = \Transliterator::create($transId)) { + $transString = $transliterator->transliterate($string); + } else { + $transString = static::toAscii($string); + } + + return preg_replace('/[^A-Za-z0-9_.]/u', '', $transString); + } + + protected static function toAscii($string) + { + static $arrayFrom, $arrayTo; + + if (empty($arrayFrom)) { + $transliterationTable = array( + 'IJ'=>'I', 'Ö'=>'O', 'Å’'=>'O', 'Ãœ'=>'U', 'ä'=>'a', 'æ'=>'a', + 'ij'=>'i', 'ö'=>'o', 'Å“'=>'o', 'ü'=>'u', 'ß'=>'s', 'Å¿'=>'s', + 'À'=>'A', 'Ã'=>'A', 'Â'=>'A', 'Ã'=>'A', 'Ä'=>'A', 'Ã…'=>'A', + 'Æ'=>'A', 'Ä€'=>'A', 'Ä„'=>'A', 'Ä‚'=>'A', 'Ç'=>'C', 'Ć'=>'C', + 'ÄŒ'=>'C', 'Ĉ'=>'C', 'ÄŠ'=>'C', 'ÄŽ'=>'D', 'Ä'=>'D', 'È'=>'E', + 'É'=>'E', 'Ê'=>'E', 'Ë'=>'E', 'Ä’'=>'E', 'Ę'=>'E', 'Äš'=>'E', + 'Ä”'=>'E', 'Ä–'=>'E', 'Äœ'=>'G', 'Äž'=>'G', 'Ä '=>'G', 'Ä¢'=>'G', + 'Ĥ'=>'H', 'Ħ'=>'H', 'ÃŒ'=>'I', 'Ã'=>'I', 'ÃŽ'=>'I', 'Ã'=>'I', + 'Ī'=>'I', 'Ĩ'=>'I', 'Ĭ'=>'I', 'Ä®'=>'I', 'Ä°'=>'I', 'Ä´'=>'J', + 'Ķ'=>'K', 'Ľ'=>'K', 'Ĺ'=>'K', 'Ä»'=>'K', 'Ä¿'=>'K', 'Å'=>'L', + 'Ñ'=>'N', 'Ń'=>'N', 'Ň'=>'N', 'Å…'=>'N', 'ÅŠ'=>'N', 'Ã’'=>'O', + 'Ó'=>'O', 'Ô'=>'O', 'Õ'=>'O', 'Ø'=>'O', 'ÅŒ'=>'O', 'Å'=>'O', + 'ÅŽ'=>'O', 'Å”'=>'R', 'Ř'=>'R', 'Å–'=>'R', 'Åš'=>'S', 'Åž'=>'S', + 'Åœ'=>'S', 'Ș'=>'S', 'Å '=>'S', 'Ť'=>'T', 'Å¢'=>'T', 'Ŧ'=>'T', + 'Èš'=>'T', 'Ù'=>'U', 'Ú'=>'U', 'Û'=>'U', 'Ū'=>'U', 'Å®'=>'U', + 'Å°'=>'U', 'Ŭ'=>'U', 'Ũ'=>'U', 'Ų'=>'U', 'Å´'=>'W', 'Ŷ'=>'Y', + 'Ÿ'=>'Y', 'Ã'=>'Y', 'Ź'=>'Z', 'Å»'=>'Z', 'Ž'=>'Z', 'à'=>'a', + 'á'=>'a', 'â'=>'a', 'ã'=>'a', 'Ä'=>'a', 'Ä…'=>'a', 'ă'=>'a', + 'Ã¥'=>'a', 'ç'=>'c', 'ć'=>'c', 'Ä'=>'c', 'ĉ'=>'c', 'Ä‹'=>'c', + 'Ä'=>'d', 'Ä‘'=>'d', 'è'=>'e', 'é'=>'e', 'ê'=>'e', 'ë'=>'e', + 'Ä“'=>'e', 'Ä™'=>'e', 'Ä›'=>'e', 'Ä•'=>'e', 'Ä—'=>'e', 'Æ’'=>'f', + 'Ä'=>'g', 'ÄŸ'=>'g', 'Ä¡'=>'g', 'Ä£'=>'g', 'Ä¥'=>'h', 'ħ'=>'h', + 'ì'=>'i', 'í'=>'i', 'î'=>'i', 'ï'=>'i', 'Ä«'=>'i', 'Ä©'=>'i', + 'Ä­'=>'i', 'į'=>'i', 'ı'=>'i', 'ĵ'=>'j', 'Ä·'=>'k', 'ĸ'=>'k', + 'Å‚'=>'l', 'ľ'=>'l', 'ĺ'=>'l', 'ļ'=>'l', 'Å€'=>'l', 'ñ'=>'n', + 'Å„'=>'n', 'ň'=>'n', 'ņ'=>'n', 'ʼn'=>'n', 'Å‹'=>'n', 'ò'=>'o', + 'ó'=>'o', 'ô'=>'o', 'õ'=>'o', 'ø'=>'o', 'Å'=>'o', 'Å‘'=>'o', + 'Å'=>'o', 'Å•'=>'r', 'Å™'=>'r', 'Å—'=>'r', 'Å›'=>'s', 'Å¡'=>'s', + 'Å¥'=>'t', 'ù'=>'u', 'ú'=>'u', 'û'=>'u', 'Å«'=>'u', 'ů'=>'u', + 'ű'=>'u', 'Å­'=>'u', 'Å©'=>'u', 'ų'=>'u', 'ŵ'=>'w', 'ÿ'=>'y', + 'ý'=>'y', 'Å·'=>'y', 'ż'=>'z', 'ź'=>'z', 'ž'=>'z', 'Α'=>'A', + 'Ά'=>'A', 'Ἀ'=>'A', 'Ἁ'=>'A', 'Ἂ'=>'A', 'Ἃ'=>'A', 'Ἄ'=>'A', + 'á¼'=>'A', 'Ἆ'=>'A', 'á¼'=>'A', 'ᾈ'=>'A', 'ᾉ'=>'A', 'ᾊ'=>'A', + 'ᾋ'=>'A', 'ᾌ'=>'A', 'á¾'=>'A', 'ᾎ'=>'A', 'á¾'=>'A', 'Ᾰ'=>'A', + 'á¾¹'=>'A', 'Ὰ'=>'A', 'á¾¼'=>'A', 'Î’'=>'B', 'Γ'=>'G', 'Δ'=>'D', + 'Ε'=>'E', 'Έ'=>'E', 'Ἐ'=>'E', 'á¼™'=>'E', 'Ἒ'=>'E', 'á¼›'=>'E', + 'Ἔ'=>'E', 'á¼'=>'E', 'Ὲ'=>'E', 'Ζ'=>'Z', 'Η'=>'I', 'Ή'=>'I', + 'Ἠ'=>'I', 'Ἡ'=>'I', 'Ἢ'=>'I', 'Ἣ'=>'I', 'Ἤ'=>'I', 'á¼­'=>'I', + 'á¼®'=>'I', 'Ἧ'=>'I', 'ᾘ'=>'I', 'á¾™'=>'I', 'ᾚ'=>'I', 'á¾›'=>'I', + 'ᾜ'=>'I', 'á¾'=>'I', 'ᾞ'=>'I', 'ᾟ'=>'I', 'á¿Š'=>'I', 'á¿Œ'=>'I', + 'Θ'=>'T', 'Ι'=>'I', 'Ί'=>'I', 'Ϊ'=>'I', 'Ἰ'=>'I', 'á¼¹'=>'I', + 'Ἲ'=>'I', 'á¼»'=>'I', 'á¼¼'=>'I', 'á¼½'=>'I', 'á¼¾'=>'I', 'Ἷ'=>'I', + 'Ῐ'=>'I', 'á¿™'=>'I', 'á¿š'=>'I', 'Κ'=>'K', 'Λ'=>'L', 'Îœ'=>'M', + 'Î'=>'N', 'Ξ'=>'K', 'Ο'=>'O', 'ÎŒ'=>'O', 'Ὀ'=>'O', 'Ὁ'=>'O', + 'Ὂ'=>'O', 'Ὃ'=>'O', 'Ὄ'=>'O', 'á½'=>'O', 'Ὸ'=>'O', 'Π'=>'P', + 'Ρ'=>'R', 'Ῥ'=>'R', 'Σ'=>'S', 'Τ'=>'T', 'Î¥'=>'Y', 'ÎŽ'=>'Y', + 'Ϋ'=>'Y', 'á½™'=>'Y', 'á½›'=>'Y', 'á½'=>'Y', 'Ὗ'=>'Y', 'Ῠ'=>'Y', + 'á¿©'=>'Y', 'Ὺ'=>'Y', 'Φ'=>'F', 'Χ'=>'X', 'Ψ'=>'P', 'Ω'=>'O', + 'Î'=>'O', 'Ὠ'=>'O', 'Ὡ'=>'O', 'Ὢ'=>'O', 'Ὣ'=>'O', 'Ὤ'=>'O', + 'á½­'=>'O', 'á½®'=>'O', 'Ὧ'=>'O', 'ᾨ'=>'O', 'ᾩ'=>'O', 'ᾪ'=>'O', + 'ᾫ'=>'O', 'ᾬ'=>'O', 'á¾­'=>'O', 'á¾®'=>'O', 'ᾯ'=>'O', 'Ὼ'=>'O', + 'ῼ'=>'O', 'α'=>'a', 'ά'=>'a', 'á¼€'=>'a', 'á¼'=>'a', 'ἂ'=>'a', + 'ἃ'=>'a', 'ἄ'=>'a', 'á¼…'=>'a', 'ἆ'=>'a', 'ἇ'=>'a', 'á¾€'=>'a', + 'á¾'=>'a', 'ᾂ'=>'a', 'ᾃ'=>'a', 'ᾄ'=>'a', 'á¾…'=>'a', 'ᾆ'=>'a', + 'ᾇ'=>'a', 'á½°'=>'a', 'á¾°'=>'a', 'á¾±'=>'a', 'á¾²'=>'a', 'á¾³'=>'a', + 'á¾´'=>'a', 'ᾶ'=>'a', 'á¾·'=>'a', 'β'=>'b', 'γ'=>'g', 'δ'=>'d', + 'ε'=>'e', 'έ'=>'e', 'á¼'=>'e', 'ἑ'=>'e', 'á¼’'=>'e', 'ἓ'=>'e', + 'á¼”'=>'e', 'ἕ'=>'e', 'á½²'=>'e', 'ζ'=>'z', 'η'=>'i', 'ή'=>'i', + 'á¼ '=>'i', 'ἡ'=>'i', 'á¼¢'=>'i', 'á¼£'=>'i', 'ἤ'=>'i', 'á¼¥'=>'i', + 'ἦ'=>'i', 'ἧ'=>'i', 'á¾'=>'i', 'ᾑ'=>'i', 'á¾’'=>'i', 'ᾓ'=>'i', + 'á¾”'=>'i', 'ᾕ'=>'i', 'á¾–'=>'i', 'á¾—'=>'i', 'á½´'=>'i', 'á¿‚'=>'i', + 'ῃ'=>'i', 'á¿„'=>'i', 'ῆ'=>'i', 'ῇ'=>'i', 'θ'=>'t', 'ι'=>'i', + 'ί'=>'i', 'ÏŠ'=>'i', 'Î'=>'i', 'á¼°'=>'i', 'á¼±'=>'i', 'á¼²'=>'i', + 'á¼³'=>'i', 'á¼´'=>'i', 'á¼µ'=>'i', 'ἶ'=>'i', 'á¼·'=>'i', 'ὶ'=>'i', + 'á¿'=>'i', 'á¿‘'=>'i', 'á¿’'=>'i', 'á¿–'=>'i', 'á¿—'=>'i', 'κ'=>'k', + 'λ'=>'l', 'μ'=>'m', 'ν'=>'n', 'ξ'=>'k', 'ο'=>'o', 'ÏŒ'=>'o', + 'á½€'=>'o', 'á½'=>'o', 'ὂ'=>'o', 'ὃ'=>'o', 'ὄ'=>'o', 'á½…'=>'o', + 'ὸ'=>'o', 'Ï€'=>'p', 'Ï'=>'r', 'ῤ'=>'r', 'á¿¥'=>'r', 'σ'=>'s', + 'Ï‚'=>'s', 'Ï„'=>'t', 'Ï…'=>'y', 'Ï'=>'y', 'Ï‹'=>'y', 'ΰ'=>'y', + 'á½'=>'y', 'ὑ'=>'y', 'á½’'=>'y', 'ὓ'=>'y', 'á½”'=>'y', 'ὕ'=>'y', + 'á½–'=>'y', 'á½—'=>'y', 'ὺ'=>'y', 'á¿ '=>'y', 'á¿¡'=>'y', 'á¿¢'=>'y', + 'ῦ'=>'y', 'ῧ'=>'y', 'φ'=>'f', 'χ'=>'x', 'ψ'=>'p', 'ω'=>'o', + 'ÏŽ'=>'o', 'á½ '=>'o', 'ὡ'=>'o', 'á½¢'=>'o', 'á½£'=>'o', 'ὤ'=>'o', + 'á½¥'=>'o', 'ὦ'=>'o', 'ὧ'=>'o', 'á¾ '=>'o', 'ᾡ'=>'o', 'á¾¢'=>'o', + 'á¾£'=>'o', 'ᾤ'=>'o', 'á¾¥'=>'o', 'ᾦ'=>'o', 'ᾧ'=>'o', 'á½¼'=>'o', + 'ῲ'=>'o', 'ῳ'=>'o', 'á¿´'=>'o', 'ῶ'=>'o', 'á¿·'=>'o', 'Ð'=>'A', + 'Б'=>'B', 'Ð’'=>'V', 'Г'=>'G', 'Д'=>'D', 'Е'=>'E', 'Ð'=>'E', + 'Ж'=>'Z', 'З'=>'Z', 'И'=>'I', 'Й'=>'I', 'К'=>'K', 'Л'=>'L', + 'Ðœ'=>'M', 'Ð'=>'N', 'О'=>'O', 'П'=>'P', 'Р'=>'R', 'С'=>'S', + 'Т'=>'T', 'У'=>'U', 'Ф'=>'F', 'Ð¥'=>'K', 'Ц'=>'T', 'Ч'=>'C', + 'Ш'=>'S', 'Щ'=>'S', 'Ы'=>'Y', 'Э'=>'E', 'Ю'=>'Y', 'Я'=>'Y', + 'а'=>'A', 'б'=>'B', 'в'=>'V', 'г'=>'G', 'д'=>'D', 'е'=>'E', + 'Ñ‘'=>'E', 'ж'=>'Z', 'з'=>'Z', 'и'=>'I', 'й'=>'I', 'к'=>'K', + 'л'=>'L', 'м'=>'M', 'н'=>'N', 'о'=>'O', 'п'=>'P', 'Ñ€'=>'R', + 'Ñ'=>'S', 'Ñ‚'=>'T', 'у'=>'U', 'Ñ„'=>'F', 'Ñ…'=>'K', 'ц'=>'T', + 'ч'=>'C', 'ш'=>'S', 'щ'=>'S', 'Ñ‹'=>'Y', 'Ñ'=>'E', 'ÑŽ'=>'Y', + 'Ñ'=>'Y', 'ð'=>'d', 'Ã'=>'D', 'þ'=>'t', 'Þ'=>'T', 'áƒ'=>'a', + 'ბ'=>'b', 'გ'=>'g', 'დ'=>'d', 'ე'=>'e', 'ვ'=>'v', 'ზ'=>'z', + 'თ'=>'t', 'ი'=>'i', 'კ'=>'k', 'ლ'=>'l', 'მ'=>'m', 'ნ'=>'n', + 'áƒ'=>'o', 'პ'=>'p', 'ჟ'=>'z', 'რ'=>'r', 'ს'=>'s', 'ტ'=>'t', + 'უ'=>'u', 'ფ'=>'p', 'ქ'=>'k', 'ღ'=>'g', 'ყ'=>'q', 'შ'=>'s', + 'ჩ'=>'c', 'ც'=>'t', 'ძ'=>'d', 'წ'=>'t', 'ჭ'=>'c', 'ხ'=>'k', + 'ჯ'=>'j', 'ჰ'=>'h', 'Å£'=>'t', 'ʼ'=>"'", '̧'=>'', 'ḩ'=>'h', + '‘'=>"'", '’'=>"'", 'ừ'=>'u', '/'=>'', 'ế'=>'e', 'ả'=>'a', + 'ị'=>'i', 'ậ'=>'a', 'ệ'=>'e', 'ỉ'=>'i', 'ồ'=>'o', 'á»'=>'e', + 'Æ¡'=>'o', 'ạ'=>'a', 'ẵ'=>'a', 'Æ°'=>'u', 'ằ'=>'a', 'ầ'=>'a', + 'ḑ'=>'d', 'Ḩ'=>'H', 'á¸'=>'D', 'È™'=>'s', 'È›'=>'t', 'á»™'=>'o', + 'ắ'=>'a', 'ÅŸ'=>'s', "'"=>'', 'Õ¸Ö‚'=>'u', 'Õ¡'=>'a', 'Õ¢'=>'b', + 'Õ£'=>'g', 'Õ¤'=>'d', 'Õ¥'=>'e', 'Õ¦'=>'z', 'Õ§'=>'e', 'Õ¨'=>'y', + 'Õ©'=>'t', 'Õª'=>'zh', 'Õ«'=>'i', 'Õ¬'=>'l', 'Õ­'=>'kh', 'Õ®'=>'ts', + 'Õ¯'=>'k', 'Õ°'=>'h', 'Õ±'=>'dz', 'Õ²'=>'gh', 'Õ³'=>'ch', 'Õ´'=>'m', + 'Õµ'=>'y', 'Õ¶'=>'n', 'Õ·'=>'sh', 'Õ¸'=>'o', 'Õ¹'=>'ch', 'Õº'=>'p', + 'Õ»'=>'j', 'Õ¼'=>'r', 'Õ½'=>'s', 'Õ¾'=>'v', 'Õ¿'=>'t', 'Ö€'=>'r', + 'Ö'=>'ts', 'Öƒ'=>'p', 'Ö„'=>'q', 'Ö‡'=>'ev', 'Ö…'=>'o', 'Ö†'=>'f', + ); + $arrayFrom = array_keys($transliterationTable); + $arrayTo = array_values($transliterationTable); + } + + return str_replace($arrayFrom, $arrayTo, $string); + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/Lorem.php b/vendor/fzaninotto/faker/src/Faker/Provider/Lorem.php new file mode 100644 index 0000000..1c9356d --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/Lorem.php @@ -0,0 +1,215 @@ + array( + "4539########", + "4539###########", + "4556########", + "4556###########", + "4916########", + "4916###########", + "4532########", + "4532###########", + "4929########", + "4929###########", + "40240071####", + "40240071#######", + "4485########", + "4485###########", + "4716########", + "4716###########", + "4###########", + "4##############" + ), + 'MasterCard' => array( + "51#############", + "52#############", + "53#############", + "54#############", + "55#############" + ), + 'American Express' => array( + "34############", + "37############" + ), + 'Discover Card' => array( + "6011###########" + ), + ); + + /** + * @var array list of IBAN formats, source: @link https://www.swift.com/standards/data-standards/iban + */ + protected static $ibanFormats = array( + 'AD' => array(array('n', 4), array('n', 4), array('c', 12)), + 'AE' => array(array('n', 3), array('n', 16)), + 'AL' => array(array('n', 8), array('c', 16)), + 'AT' => array(array('n', 5), array('n', 11)), + 'AZ' => array(array('a', 4), array('c', 20)), + 'BA' => array(array('n', 3), array('n', 3), array('n', 8), array('n', 2)), + 'BE' => array(array('n', 3), array('n', 7), array('n', 2)), + 'BG' => array(array('a', 4), array('n', 4), array('n', 2), array('c', 8)), + 'BH' => array(array('a', 4), array('c', 14)), + 'BR' => array(array('n', 8), array('n', 5), array('n', 10), array('a', 1), array('c', 1)), + 'CH' => array(array('n', 5), array('c', 12)), + 'CR' => array(array('n', 3), array('n', 14)), + 'CY' => array(array('n', 3), array('n', 5), array('c', 16)), + 'CZ' => array(array('n', 4), array('n', 6), array('n', 10)), + 'DE' => array(array('n', 8), array('n', 10)), + 'DK' => array(array('n', 4), array('n', 9), array('n', 1)), + '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)), + '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)), + 'GI' => array(array('a', 4), array('c', 15)), + 'GR' => array(array('n', 3), array('n', 4), array('c', 16)), + 'GT' => array(array('c', 4), array('c', 20)), + 'HR' => array(array('n', 7), array('n', 10)), + 'HU' => array(array('n', 3), array('n', 4), array('n', 1), array('n', 15), array('n', 1)), + 'IE' => array(array('a', 4), array('n', 6), array('n', 8)), + 'IL' => array(array('n', 3), array('n', 3), array('n', 13)), + 'IS' => array(array('n', 4), array('n', 2), array('n', 6), array('n', 10)), + 'IT' => array(array('a', 1), array('n', 5), array('n', 5), array('c', 12)), + 'KW' => array(array('a', 4), array('n', 22)), + 'KZ' => array(array('n', 3), array('c', 13)), + 'LB' => array(array('n', 4), array('c', 20)), + 'LI' => array(array('n', 5), array('c', 12)), + 'LT' => array(array('n', 5), array('n', 11)), + 'LU' => array(array('n', 3), array('c', 13)), + 'LV' => array(array('a', 4), array('c', 13)), + 'MC' => array(array('n', 5), array('n', 5), array('c', 11), array('n', 2)), + 'MD' => array(array('c', 2), array('c', 18)), + 'ME' => array(array('n', 3), array('n', 13), array('n', 2)), + 'MK' => array(array('n', 3), array('c', 10), array('n', 2)), + 'MR' => array(array('n', 5), array('n', 5), array('n', 11), array('n', 2)), + 'MT' => array(array('a', 4), array('n', 5), array('c', 18)), + 'MU' => array(array('a', 4), array('n', 2), array('n', 2), array('n', 12), array('n', 3), array('a', 3)), + 'NL' => array(array('a', 4), array('n', 10)), + 'NO' => array(array('n', 4), array('n', 6), array('n', 1)), + 'PK' => array(array('a', 4), array('c', 16)), + 'PL' => array(array('n', 8), array('n', 16)), + 'PS' => array(array('a', 4), array('c', 21)), + 'PT' => array(array('n', 4), array('n', 4), array('n', 11), array('n', 2)), + 'RO' => array(array('a', 4), array('c', 16)), + 'RS' => array(array('n', 3), array('n', 13), array('n', 2)), + 'SA' => array(array('n', 2), array('c', 18)), + 'SE' => array(array('n', 3), array('n', 16), array('n', 1)), + 'SI' => array(array('n', 5), array('n', 8), array('n', 2)), + 'SK' => array(array('n', 4), array('n', 6), array('n', 10)), + 'SM' => array(array('a', 1), array('n', 5), array('n', 5), array('c', 12)), + 'TN' => array(array('n', 2), array('n', 3), array('n', 13), array('n', 2)), + 'TR' => array(array('n', 5), array('n', 1), array('c', 16)), + 'VG' => array(array('a', 4), array('n', 16)), + ); + + /** + * @return string Returns a credit card vendor name + * + * @example 'MasterCard' + */ + public static function creditCardType() + { + return static::randomElement(static::$cardVendors); + } + + /** + * Returns the String of a credit card number. + * + * @param string $type Supporting any of 'Visa', 'MasterCard', 'American Express', and 'Discover' + * @param boolean $formatted Set to true if the output string should contain one separator every 4 digits + * @param string $separator Separator string for formatting card number. Defaults to dash (-). + * @return string + * + * @example '4485480221084675' + */ + public static function creditCardNumber($type = null, $formatted = false, $separator = '-') + { + if (is_null($type)) { + $type = static::creditCardType(); + } + $mask = static::randomElement(static::$cardParams[$type]); + + $number = static::numerify($mask); + $number .= Luhn::computeCheckDigit($number); + + if ($formatted) { + $p1 = substr($number, 0, 4); + $p2 = substr($number, 4, 4); + $p3 = substr($number, 8, 4); + $p4 = substr($number, 12); + $number = $p1 . $separator . $p2 . $separator . $p3 . $separator . $p4; + } + + return $number; + } + + /** + * @param boolean $valid True (by default) to get a valid expiration date, false to get a maybe valid date + * @return \DateTime + * @example 04/13 + */ + public function creditCardExpirationDate($valid = true) + { + if ($valid) { + return $this->generator->dateTimeBetween('now', '36 months'); + } + + return $this->generator->dateTimeBetween('-36 months', '36 months'); + } + + /** + * @param boolean $valid True (by default) to get a valid expiration date, false to get a maybe valid date + * @param string $expirationDateFormat + * @return string + * @example '04/13' + */ + public function creditCardExpirationDateString($valid = true, $expirationDateFormat = null) + { + return $this->creditCardExpirationDate($valid)->format(is_null($expirationDateFormat) ? static::$expirationDateFormat : $expirationDateFormat); + } + + /** + * @param boolean $valid True (by default) to get a valid expiration date, false to get a maybe valid date + * @return array + */ + public function creditCardDetails($valid = true) + { + $type = static::creditCardType(); + + return array( + 'type' => $type, + 'number' => static::creditCardNumber($type), + 'name' => $this->generator->name(), + 'expirationDate' => $this->creditCardExpirationDateString($valid) + ); + } + + /** + * International Bank Account Number (IBAN) + * + * @link http://en.wikipedia.org/wiki/International_Bank_Account_Number + * @param string $countryCode ISO 3166-1 alpha-2 country code + * @param string $prefix for generating bank account number of a specific bank + * @param integer $length total length without country code and 2 check digits + * @return string + */ + public static function iban($countryCode, $prefix = '', $length = null) + { + $countryCode = is_null($countryCode) ? self::randomKey(self::$ibanFormats) : strtoupper($countryCode); + + $format = !isset(static::$ibanFormats[$countryCode]) ? null : static::$ibanFormats[$countryCode]; + if ($length === null) { + if ($format === null) { + $length = 24; + } else { + $length = 0; + foreach ($format as $part) { + list($class, $groupCount) = $part; + $length += $groupCount; + } + } + } + if ($format === null) { + $format = array(array('n', $length)); + } + + $expandedFormat = ''; + foreach ($format as $item) { + list($class, $length) = $item; + $expandedFormat .= str_repeat($class, $length); + } + + $result = $prefix; + $expandedFormat = substr($expandedFormat, strlen($result)); + foreach (str_split($expandedFormat) as $class) { + switch ($class) { + default: + case 'c': + $result .= mt_rand(0, 100) <= 50 ? static::randomDigit() : strtoupper(static::randomLetter()); + break; + case 'a': + $result .= strtoupper(static::randomLetter()); + break; + case 'n': + $result .= static::randomDigit(); + break; + } + } + + $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 + * + * @example 'RZTIAT22263' + * @link http://en.wikipedia.org/wiki/ISO_9362 + * @return string Swift/Bic number + */ + public static function swiftBicNumber() + { + return self::regexify("^([A-Z]){4}([A-Z]){2}([0-9A-Z]){2}([0-9A-Z]{3})?$"); + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/Person.php b/vendor/fzaninotto/faker/src/Faker/Provider/Person.php new file mode 100644 index 0000000..9d875b6 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/Person.php @@ -0,0 +1,126 @@ +generator->parse($format); + } + + /** + * @param string|null $gender 'male', 'female' or null for any + * @return string + * @example 'John' + */ + public function firstName($gender = null) + { + if ($gender === static::GENDER_MALE) { + return static::firstNameMale(); + } elseif ($gender === static::GENDER_FEMALE) { + return static::firstNameFemale(); + } + + return $this->generator->parse(static::randomElement(static::$firstNameFormat)); + } + + public static function firstNameMale() + { + return static::randomElement(static::$firstNameMale); + } + + public static function firstNameFemale() + { + return static::randomElement(static::$firstNameFemale); + } + + /** + * @example 'Doe' + * @return string + */ + public function lastName() + { + return static::randomElement(static::$lastName); + } + + /** + * @example 'Mrs.' + * @param string|null $gender 'male', 'female' or null for any + * @return string + */ + public function title($gender = null) + { + if ($gender === static::GENDER_MALE) { + return static::titleMale(); + } elseif ($gender === static::GENDER_FEMALE) { + return static::titleFemale(); + } + + return $this->generator->parse(static::randomElement(static::$titleFormat)); + } + + /** + * @example 'Mr.' + */ + public static function titleMale() + { + return static::randomElement(static::$titleMale); + } + + /** + * @example 'Mrs.' + */ + public static function titleFemale() + { + return static::randomElement(static::$titleFemale); + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/PhoneNumber.php b/vendor/fzaninotto/faker/src/Faker/Provider/PhoneNumber.php new file mode 100644 index 0000000..78f0fa1 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/PhoneNumber.php @@ -0,0 +1,43 @@ +generator->parse(static::randomElement(static::$formats))); + } + + /** + * @example +27113456789 + * @return string + */ + public function e164PhoneNumber() + { + $formats = array('+#############'); + return static::numerify($this->generator->parse(static::randomElement($formats))); + } + + /** + * International Mobile Equipment Identity (IMEI) + * + * @link http://en.wikipedia.org/wiki/International_Mobile_Station_Equipment_Identity + * @link http://imei-number.com/imei-validation-check/ + * @example '720084494799532' + * @return int $imei + */ + public function imei() + { + $imei = (string) static::numerify('##############'); + $imei .= Luhn::computeCheckDigit($imei); + return $imei; + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/Text.php b/vendor/fzaninotto/faker/src/Faker/Provider/Text.php new file mode 100644 index 0000000..3aaded9 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/Text.php @@ -0,0 +1,142 @@ + 5) { + throw new \InvalidArgumentException('indexSize must be at most 5'); + } + + + $words = $this->getConsecutiveWords($indexSize); + $result = array(); + $resultLength = 0; + // take a random starting point + $next = static::randomKey($words); + while ($resultLength < $maxNbChars && isset($words[$next])) { + // fetch a random word to append + $word = static::randomElement($words[$next]); + + // calculate next index + $currentWords = static::explode($next); + $currentWords[] = $word; + array_shift($currentWords); + $next = static::implode($currentWords); + + // ensure text starts with an uppercase letter + if ($resultLength == 0 && !static::validStart($word)) { + continue; + } + + // append the element + $result[] = $word; + $resultLength += static::strlen($word) + static::$separatorLen; + } + + // remove the element that caused the text to overflow + array_pop($result); + + // build result + $result = static::implode($result); + + return static::appendEnd($result); + } + + protected function getConsecutiveWords($indexSize) + { + if (!isset($this->consecutiveWords[$indexSize])) { + $parts = $this->getExplodedText(); + $words = array(); + $index = array(); + for ($i = 0; $i < $indexSize; $i++) { + $index[] = array_shift($parts); + } + + for ($i = 0, $count = count($parts); $i < $count; $i++) { + $stringIndex = static::implode($index); + if (!isset($words[$stringIndex])) { + $words[$stringIndex] = array(); + } + $word = $parts[$i]; + $words[$stringIndex][] = $word; + array_shift($index); + $index[] = $word; + } + // cache look up words for performance + $this->consecutiveWords[$indexSize] = $words; + } + + return $this->consecutiveWords[$indexSize]; + } + + protected function getExplodedText() + { + if ($this->explodedText === null) { + $this->explodedText = static::explode(preg_replace('/\s+/u', ' ', static::$baseText)); + } + + return $this->explodedText; + } + + protected static function explode($text) + { + return explode(static::$separator, $text); + } + + protected static function implode($words) + { + return implode(static::$separator, $words); + } + + protected static function strlen($text) + { + return function_exists('mb_strlen') ? mb_strlen($text, 'UTF-8') : strlen($text); + } + + protected static function validStart($word) + { + $isValid = true; + if (self::$textStartsWithUppercase) { + $isValid = preg_match('/^\p{Lu}/u', $word); + } + return $isValid; + } + + protected static function appendEnd($text) + { + return $text.'.'; + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/UserAgent.php b/vendor/fzaninotto/faker/src/Faker/Provider/UserAgent.php new file mode 100644 index 0000000..2aec239 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/UserAgent.php @@ -0,0 +1,166 @@ +> 8) | (($tLo & 0xff000000) >> 24); + $tMi = (($tMi & 0x00ff) << 8) | (($tMi & 0xff00) >> 8); + $tHi = (($tHi & 0x00ff) << 8) | (($tHi & 0xff00) >> 8); + } + + // apply version number + $tHi &= 0x0fff; + $tHi |= (3 << 12); + + // cast to string + $uuid = sprintf( + '%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x', + $tLo, + $tMi, + $tHi, + $csHi, + $csLo, + $byte[10], + $byte[11], + $byte[12], + $byte[13], + $byte[14], + $byte[15] + ); + + return $uuid; + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/ar_JO/Address.php b/vendor/fzaninotto/faker/src/Faker/Provider/ar_JO/Address.php new file mode 100644 index 0000000..6f4f258 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/ar_JO/Address.php @@ -0,0 +1,152 @@ +generator->parse($format)); + } + + /** + * @example 'wewebit.jo' + */ + public function domainName() + { + return static::randomElement(static::$lastNameAscii) . '.' . $this->tld(); + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/ar_JO/Person.php b/vendor/fzaninotto/faker/src/Faker/Provider/ar_JO/Person.php new file mode 100644 index 0000000..7fcadb3 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/ar_JO/Person.php @@ -0,0 +1,108 @@ +generator->parse($format)); + } + + /** + * @example 'wewebit.jo' + */ + public function domainName() + { + return static::randomElement(static::$lastNameAscii) . '.' . $this->tld(); + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/ar_SA/Person.php b/vendor/fzaninotto/faker/src/Faker/Provider/ar_SA/Person.php new file mode 100644 index 0000000..ed1d0d2 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/ar_SA/Person.php @@ -0,0 +1,148 @@ +generator->parse(static::randomElement(static::$lastNameFormat)); + } + + public static function lastNameMale() + { + return static::randomElement(static::$lastNameMale); + } + + public static function lastNameFemale() + { + return static::randomElement(static::$lastNameFemale); + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/bg_BG/PhoneNumber.php b/vendor/fzaninotto/faker/src/Faker/Provider/bg_BG/PhoneNumber.php new file mode 100644 index 0000000..e5ec042 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/bg_BG/PhoneNumber.php @@ -0,0 +1,20 @@ +generator->parse($format)); + } + + /** + * Generates valid czech IÄŒO + * + * @see http://phpfashion.com/jak-overit-platne-ic-a-rodne-cislo + * @return string + */ + public function ico() + { + $ico = static::numerify('#######'); + $split = str_split($ico); + $prod = 0; + foreach (array(8, 7, 6, 5, 4, 3, 2) as $i => $p) { + $prod += $p * $split[$i]; + } + $mod = $prod % 11; + if ($mod === 0 || $mod === 10) { + return "{$ico}1"; + } elseif ($mod === 1) { + return "{$ico}0"; + } + + return $ico . (11 - $mod); + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/cs_CZ/DateTime.php b/vendor/fzaninotto/faker/src/Faker/Provider/cs_CZ/DateTime.php new file mode 100644 index 0000000..4bd1508 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/cs_CZ/DateTime.php @@ -0,0 +1,61 @@ +format('w')]; + } + + /** + * @param \DateTime|int|string $max maximum timestamp used as random end limit, default to "now" + * @return string + * @example '2' + */ + public static function dayOfMonth($max = 'now') + { + return static::dateTime($max)->format('j'); + } + + /** + * Full date with inflected month + * @return string + * @example '16. listopadu 2003' + */ + public function formattedDate() + { + $format = static::randomElement(static::$formattedDateFormat); + + return $this->generator->parse($format); + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/cs_CZ/Internet.php b/vendor/fzaninotto/faker/src/Faker/Provider/cs_CZ/Internet.php new file mode 100644 index 0000000..d0d993d --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/cs_CZ/Internet.php @@ -0,0 +1,9 @@ +generator->boolean() ? static::GENDER_MALE : static::GENDER_FEMALE; + } + + $startTimestamp = strtotime("-${maxAge} year"); + $endTimestamp = strtotime("-${minAge} year"); + $randTimestamp = static::numberBetween($startTimestamp, $endTimestamp); + + $year = intval(date('Y', $randTimestamp)); + $month = intval(date('n', $randTimestamp)); + $day = intval(date('j', $randTimestamp)); + $suffix = static::numberBetween(0, 999); + + // women has +50 to month + if ($gender == static::GENDER_FEMALE) { + $month += 50; + } + // from year 2004 everyone has +20 to month when birth numbers in one day are exhausted + if ($year >= 2004 && $this->generator->boolean(10)) { + $month += 20; + } + + $birthNumber = sprintf('%02d%02d%02d%03d', $year % 100, $month, $day, $suffix); + + // from year 1954 birth number includes CRC + if ($year >= 1954) { + $crc = intval($birthNumber, 10) % 11; + if ($crc == 10) { + $crc = 0; + } + $birthNumber .= sprintf('%d', $crc); + } + + // add slash + if ($this->generator->boolean($slashProbability)) { + $birthNumber = substr($birthNumber, 0, 6) . '/' . substr($birthNumber, 6); + } + + return $birthNumber; + } + + public static function birthNumberMale() + { + return static::birthNumber(static::GENDER_MALE); + } + + public static function birthNumberFemale() + { + return static::birthNumber(static::GENDER_FEMALE); + } + + public function title($gender = null) + { + return static::titleMale(); + } + + /** + * replaced by specific unisex Czech title + */ + public static function titleMale() + { + return static::randomElement(static::$title); + } + + /** + * replaced by specific unisex Czech title + */ + public static function titleFemale() + { + return static::titleMale(); + } + + /** + * @param string|null $gender 'male', 'female' or null for any + * @example 'Albrecht' + */ + public function lastName($gender = null) + { + if ($gender === static::GENDER_MALE) { + return static::lastNameMale(); + } elseif ($gender === static::GENDER_FEMALE) { + return static::lastNameFemale(); + } + + return $this->generator->parse(static::randomElement(static::$lastNameFormat)); + } + + public static function lastNameMale() + { + return static::randomElement(static::$lastNameMale); + } + + public static function lastNameFemale() + { + return static::randomElement(static::$lastNameFemale); + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/cs_CZ/PhoneNumber.php b/vendor/fzaninotto/faker/src/Faker/Provider/cs_CZ/PhoneNumber.php new file mode 100644 index 0000000..90495df --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/cs_CZ/PhoneNumber.php @@ -0,0 +1,14 @@ + + */ +class Address extends \Faker\Provider\Address +{ + /** + * @var array Danish city suffixes. + */ + protected static $citySuffix = array( + 'sted', 'bjerg', 'borg', 'rød', 'lund', 'by', + ); + + /** + * @var array Danish street suffixes. + */ + protected static $streetSuffix = array( + 'vej', 'gade', 'skov', 'shaven', + ); + + /** + * @var array Danish street word suffixes. + */ + protected static $streetSuffixWord = array( + 'Vej', 'Gade', 'Allé', 'Boulevard', 'Plads', 'Have', + ); + + /** + * @var array Danish building numbers. + */ + protected static $buildingNumber = array( + '%##', '%#', '%#', '%', '%', '%', '%?', '% ?', + ); + + /** + * @var array Danish building level. + */ + protected static $buildingLevel = array( + 'st.', '%.', '%. sal.', + ); + + /** + * @var array Danish building sides. + */ + protected static $buildingSide = array( + 'tv.', 'th.', + ); + + /** + * @var array Danish zip code. + */ + protected static $postcode = array( + '%###' + ); + + /** + * @var array Danish cities. + */ + protected static $cityNames = array( + 'Aabenraa', 'Aabybro', 'Aakirkeby', 'Aalborg', 'Aalestrup', 'Aars', 'Aarup', 'Agedrup', 'Agerbæk', 'Agerskov', + 'Albertslund', 'Allerød', 'Allinge', 'AllingÃ¥bro', 'Almind', 'Anholt', 'Ansager', 'Arden', 'Asaa', 'Askeby', + 'Asnæs', 'Asperup', 'Assens', 'Augustenborg', 'Aulum', 'Auning', 'Bagenkop', 'Bagsværd', 'Balle', 'Ballerup', + 'Bandholm', 'Barrit', 'Beder', 'Bedsted', 'Bevtoft', 'Billum', 'Billund', 'Bindslev', 'Birkerød', 'Bjerringbro', + 'Bjert', 'Bjæverskov', 'Blokhus', 'Blommenslyst', 'BlÃ¥vand', 'Boeslunde', 'Bogense', 'Bogø', 'Bolderslev', 'Bording', + 'Borre', 'Borup', 'Brøndby', 'Brabrand', 'Bramming', 'Brande', 'Branderup', 'Bredebro', 'Bredsten', 'Brenderup', + 'Broager', 'Broby', 'Brovst', 'Bryrup', 'Brædstrup', 'Strand', 'Brønderslev', 'Brønshøj', 'Brørup', 'Bække', + 'Bækmarksbro', 'Bælum', 'Børkop', 'Bøvlingbjerg', 'Charlottenlund', 'Christiansfeld', 'Dalby', 'Dalmose', + 'Dannemare', 'DaugÃ¥rd', 'Dianalund', 'Dragør', 'Dronninglund', 'Dronningmølle', 'Dybvad', 'DyssegÃ¥rd', 'Ebberup', + 'Ebeltoft', 'Egernsund', 'Egtved', 'EgÃ¥', 'Ejby', 'Ejstrupholm', 'Engesvang', 'Errindlev', 'Erslev', 'Esbjerg', + 'Eskebjerg', 'Eskilstrup', 'Espergærde', 'Faaborg', 'Fanø', 'Farsø', 'Farum', 'Faxe', 'Ladeplads', 'Fejø', + 'Ferritslev', 'Fjenneslev', 'Fjerritslev', 'Flemming', 'Fredensborg', 'Fredericia', 'Frederiksberg', + 'Frederikshavn', 'Frederikssund', 'Frederiksværk', 'Frørup', 'Frøstrup', 'Fuglebjerg', 'Føllenslev', 'Føvling', + 'FÃ¥revejle', 'FÃ¥rup', 'FÃ¥rvang', 'Gadbjerg', 'Gadstrup', 'Galten', 'Gandrup', 'Gedser', 'Gedsted', 'Gedved', 'Gelsted', + 'Gentofte', 'Gesten', 'Gilleleje', 'Gislev', 'Gislinge', 'Gistrup', 'Give', 'Gjerlev', 'Gjern', 'Glamsbjerg', + 'Glejbjerg', 'Glesborg', 'Glostrup', 'Glumsø', 'Gram', 'Gredstedbro', 'Grenaa', 'Greve', 'Grevinge', 'Grindsted', + 'Græsted', 'GrÃ¥sten', 'Gudbjerg', 'Sydfyn', 'Gudhjem', 'Gudme', 'Guldborg', 'Gørding', 'Gørlev', 'Gørløse', + 'Haderslev', 'Haderup', 'Hadsten', 'Hadsund', 'Hals', 'Hammel', 'Hampen', 'Hanstholm', 'Harboøre', 'Harlev', 'Harndrup', + 'Harpelunde', 'Hasle', 'Haslev', 'Hasselager', 'Havdrup', 'Havndal', 'Hedehusene', 'Hedensted', 'Hejls', 'Hejnsvig', + 'Hellebæk', 'Hellerup', 'Helsinge', 'Helsingør', 'Hemmet', 'Henne', 'Herfølge', 'Herlev', 'Herlufmagle', 'Herning', + 'Hesselager', 'Hillerød', 'Hinnerup', 'Hirtshals', 'Hjallerup', 'Hjerm', 'Hjortshøj', 'Hjørring', 'Hobro', 'Holbæk', + 'Holeby', 'Holmegaard', 'Holstebro', 'Holsted', 'Holte', 'Horbelev', 'Hornbæk', 'Hornslet', 'Hornsyld', 'Horsens', + 'Horslunde', 'Hovborg', 'HovedgÃ¥rd', 'Humble', 'Humlebæk', 'Hundested', 'Hundslund', 'Hurup', 'Hvalsø', 'Hvide', + 'Sande', 'Hvidovre', 'Højbjerg', 'Højby', 'Højer', 'Højslev', 'Høng', 'Hørning', 'Hørsholm', 'Hørve', 'HÃ¥rlev', + 'Idestrup', 'Ikast', 'Ishøj', 'Janderup', 'Vestj', 'Jelling', 'Jerslev', 'Sjælland', 'Jerup', 'Jordrup', 'Juelsminde', + 'Jyderup', 'Jyllinge', 'Jystrup', 'Midtsj', 'Jægerspris', 'Kalundborg', 'Kalvehave', 'Karby', 'Karise', 'Karlslunde', + 'Karrebæksminde', 'Karup', 'Kastrup', 'Kerteminde', 'Kettinge', 'Kibæk', 'Kirke', 'Hyllinge', 'SÃ¥by', 'Kjellerup', + 'Klampenborg', 'Klarup', 'Klemensker', 'Klippinge', 'Klovborg', 'Knebel', 'Kokkedal', 'Kolding', 'Kolind', 'Kongens', + 'Lyngby', 'Kongerslev', 'Korsør', 'KrusÃ¥', 'KvistgÃ¥rd', 'Kværndrup', 'København', 'Køge', 'Langebæk', 'Langeskov', + 'LangÃ¥', 'Lejre', 'Lemming', 'Lemvig', 'Lille', 'Skensved', 'Lintrup', 'Liseleje', 'Lundby', 'Lunderskov', 'Lynge', + 'Lystrup', 'Læsø', 'Løgstrup', 'Løgstør', 'Løgumkloster', 'Løkken', 'Løsning', 'LÃ¥sby', 'Malling', 'Mariager', + 'Maribo', 'Marslev', 'Marstal', 'Martofte', 'Melby', 'Mern', 'Mesinge', 'Middelfart', 'Millinge', 'Morud', 'Munke', + 'Bjergby', 'Munkebo', 'Møldrup', 'Mørke', 'Mørkøv', 'MÃ¥løv', 'MÃ¥rslet', 'Nakskov', 'Nexø', 'Nibe', 'Nimtofte', + 'Nordborg', 'Nyborg', 'Nykøbing', 'Nyrup', 'Nysted', 'Nærum', 'Næstved', 'Nørager', 'Nørre', 'Aaby', 'Alslev', + 'Asmindrup', 'Nebel', 'Snede', 'Nørreballe', 'Nørresundby', 'Odder', 'Odense', 'Oksbøl', 'Otterup', 'Oure', 'Outrup', + 'Padborg', 'Pandrup', 'Præstø', 'Randbøl', 'Randers', 'Ranum', 'Rask', 'Mølle', 'Redsted', 'Regstrup', 'Ribe', 'Ringe', + 'Ringkøbing', 'Ringsted', 'Risskov', 'Roskilde', 'Roslev', 'Rude', 'Rudkøbing', 'Ruds', 'Vedby', 'Rungsted', 'Kyst', + 'Rynkeby', 'RyomgÃ¥rd', 'Ryslinge', 'Rødby', 'Rødding', 'Rødekro', 'Rødkærsbro', 'Rødovre', 'Rødvig', 'Stevns', + 'Rønde', 'Rønne', 'Rønnede', 'Rørvig', 'Sabro', 'Sakskøbing', 'Saltum', 'Samsø', 'Sandved', 'Sejerø', 'Silkeborg', + 'Sindal', 'Sjællands', 'Odde', 'Sjølund', 'Skagen', 'Skals', 'Skamby', 'Skanderborg', 'Skibby', 'Skive', 'Skjern', + 'Skodsborg', 'Skovlunde', 'Skælskør', 'Skærbæk', 'Skævinge', 'Skødstrup', 'Skørping', 'SkÃ¥rup', 'Slagelse', + 'Slangerup', 'Smørum', 'Snedsted', 'Snekkersten', 'Snertinge', 'Solbjerg', 'Solrød', 'Sommersted', 'Sorring', 'Sorø', + 'Spentrup', 'Spjald', 'Sporup', 'Spøttrup', 'Stakroge', 'Stege', 'Stenderup', 'Stenlille', 'Stenløse', 'Stenstrup', + 'Stensved', 'Stoholm', 'Jyll', 'Stokkemarke', 'Store', 'Fuglede', 'Heddinge', 'Merløse', 'Storvorde', 'Stouby', + 'Strandby', 'Struer', 'Strøby', 'Stubbekøbing', 'Støvring', 'Suldrup', 'Sulsted', 'Sunds', 'Svaneke', 'Svebølle', + 'Svendborg', 'Svenstrup', 'Svinninge', 'Sydals', 'Sæby', 'Søborg', 'Søby', 'Ærø', 'Søllested', 'Sønder', 'Felding', + 'Sønderborg', 'Søndersø', 'Sørvad', 'Taastrup', 'Tappernøje', 'Tarm', 'Terndrup', 'Them', 'Thisted', 'Thorsø', + 'Thyborøn', 'Thyholm', 'Tikøb', 'Tilst', 'Tinglev', 'Tistrup', 'Tisvildeleje', 'Tjele', 'Tjæreborg', 'Toftlund', + 'Tommerup', 'Toreby', 'Torrig', 'Tranbjerg', 'Tranekær', 'Trige', 'Trustrup', 'Tune', 'Tureby', 'Tylstrup', 'Tølløse', + 'Tønder', 'Tørring', 'TÃ¥rs', 'Ugerløse', 'Uldum', 'Ulfborg', 'Ullerslev', 'Ulstrup', 'Vadum', 'Valby', 'Vallensbæk', + 'Vamdrup', 'Vandel', 'Vanløse', 'Varde', 'Vedbæk', 'Veflinge', 'Vejby', 'Vejen', 'Vejers', 'Vejle', 'Vejstrup', + 'Veksø', 'Vemb', 'Vemmelev', 'Vesløs', 'Vestbjerg', 'Vester', 'Skerninge', 'Vesterborg', 'Vestervig', 'Viborg', 'Viby', + 'Videbæk', 'Vildbjerg', 'Vils', 'Vinderup', 'Vipperød', 'Virum', 'Vissenbjerg', 'Viuf', 'Vodskov', 'Vojens', 'Vonge', + 'Vorbasse', 'Vordingborg', 'Væggerløse', 'Værløse', 'Ærøskøbing', 'Ølgod', 'Ølsted', 'Ølstykke', 'Ørbæk', + 'Ørnhøj', 'Ørsted', 'Djurs', 'Østbirk', 'Øster', 'Assels', 'Ulslev', 'Østermarie', 'ØstervrÃ¥', 'Ã…byhøj', + 'Ã…lbæk', 'Ã…lsgÃ¥rde', 'Ã…rhus', 'Ã…rre', 'Ã…rslev', 'Haarby', 'NivÃ¥', 'Rømø', 'Omme', 'VrÃ¥', 'Ørum', + ); + + /** + * @var array Danish municipalities, called 'kommuner' in danish. + */ + protected static $kommuneNames = array( + 'København', 'Frederiksberg', 'Ballerup', 'Brøndby', 'Dragør', 'Gentofte', 'Gladsaxe', 'Glostrup', 'Herlev', + 'Albertslund', 'Hvidovre', 'Høje Taastrup', 'Lyngby-Taarbæk', 'Rødovre', 'Ishøj', 'TÃ¥rnby', 'Vallensbæk', + 'Allerød', 'Fredensborg', 'Helsingør', 'Hillerød', 'Hørsholm', 'Rudersdal', 'Egedal', 'Frederikssund', 'Greve', + 'Halsnæs', 'Roskilde', 'Solrød', 'Gribskov', 'Odsherred', 'Holbæk', 'Faxe', 'Kalundborg', 'Ringsted', 'Slagelse', + 'Stevns', 'Sorø', 'Lejre', 'Lolland', 'Næstved', 'Guldborgsund', 'Vordingborg', 'Bornholm', 'Middelfart', + 'Christiansø', 'Assens', 'Faaborg-Midtfyn', 'Kerteminde', 'Nyborg', 'Odense', 'Svendborg', 'Nordfyns', 'Langeland', + 'Ærø', 'Haderslev', 'Billund', 'Sønderborg', 'Tønder', 'Esbjerg', 'Fanø', 'Varde', 'Vejen', 'Aabenraa', + 'Fredericia', 'Horsens', 'Kolding', 'Vejle', 'Herning', 'Holstebro', 'Lemvig', 'Struer', 'Syddjurs', 'Furesø', + 'Norddjurs', 'Favrskov', 'Odder', 'Randers', 'Silkeborg', 'Samsø', 'Skanderborg', 'Aarhus', 'Ikast-Brande', + 'Ringkøbing-Skjern', 'Hedensted', 'Morsø', 'Skive', 'Thisted', 'Viborg', 'Brønderslev', 'Frederikshavn', + 'Vesthimmerlands', 'Læsø', 'Rebild', 'Mariagerfjord', 'Jammerbugt', 'Aalborg', 'Hjørring', 'Køge', + ); + + /** + * @var array Danish regions. + */ + protected static $regionNames = array( + 'Region Nordjylland', 'Region Midtjylland', 'Region Syddanmark', 'Region Hovedstaden', 'Region Sjælland', + ); + + /** + * @link https://github.com/umpirsky/country-list/blob/master/country/cldr/da_DK/country.php + * + * @var array Some countries in danish. + */ + protected static $country = array( + 'Andorra', 'Forenede Arabiske Emirater', 'Afghanistan', 'Antigua og Barbuda', 'Anguilla', 'Albanien', 'Armenien', + 'Hollandske Antiller', 'Angola', 'Antarktis', 'Argentina', 'Amerikansk Samoa', 'Østrig', 'Australien', 'Aruba', + 'Ã…land', 'Aserbajdsjan', 'Bosnien-Hercegovina', 'Barbados', 'Bangladesh', 'Belgien', 'Burkina Faso', 'Bulgarien', + 'Bahrain', 'Burundi', 'Benin', 'Saint Barthélemy', 'Bermuda', 'Brunei Darussalam', 'Bolivia', 'Brasilien', 'Bahamas', + 'Bhutan', 'Bouvetø', 'Botswana', 'Hviderusland', 'Belize', 'Canada', 'Cocosøerne', 'Congo-Kinshasa', + 'Centralafrikanske Republik', 'Congo', 'Schweiz', 'Elfenbenskysten', 'Cook-øerne', 'Chile', 'Cameroun', 'Kina', + 'Colombia', 'Costa Rica', 'Serbien og Montenegro', 'Cuba', 'Kap Verde', 'Juleøen', 'Cypern', 'Tjekkiet', 'Tyskland', + 'Djibouti', 'Danmark', 'Dominica', 'Den Dominikanske Republik', 'Algeriet', 'Ecuador', 'Estland', 'Egypten', + 'Vestsahara', 'Eritrea', 'Spanien', 'Etiopien', 'Finland', 'Fiji-øerne', 'Falklandsøerne', + 'Mikronesiens Forenede Stater', 'Færøerne', 'Frankrig', 'Gabon', 'Storbritannien', 'Grenada', 'Georgien', + 'Fransk Guyana', 'Guernsey', 'Ghana', 'Gibraltar', 'Grønland', 'Gambia', 'Guinea', 'Guadeloupe', 'Ækvatorialguinea', + 'Grækenland', 'South Georgia og De Sydlige Sandwichøer', 'Guatemala', 'Guam', 'Guinea-Bissau', 'Guyana', + 'SAR Hongkong', 'Heard- og McDonald-øerne', 'Honduras', 'Kroatien', 'Haiti', 'Ungarn', 'Indonesien', 'Irland', + 'Israel', 'Isle of Man', 'Indien', 'Det Britiske Territorium i Det Indiske Ocean', 'Irak', 'Iran', 'Island', + 'Italien', 'Jersey', 'Jamaica', 'Jordan', 'Japan', 'Kenya', 'Kirgisistan', 'Cambodja', 'Kiribati', 'Comorerne', + 'Saint Kitts og Nevis', 'Nordkorea', 'Sydkorea', 'Kuwait', 'Caymanøerne', 'Kasakhstan', 'Laos', 'Libanon', + 'Saint Lucia', 'Liechtenstein', 'Sri Lanka', 'Liberia', 'Lesotho', 'Litauen', 'Luxembourg', 'Letland', 'Libyen', + 'Marokko', 'Monaco', 'Republikken Moldova', 'Montenegro', 'Saint Martin', 'Madagaskar', 'Marshalløerne', + 'Republikken Makedonien', 'Mali', 'Myanmar', 'Mongoliet', 'SAR Macao', 'Nordmarianerne', 'Martinique', + 'Mauretanien', 'Montserrat', 'Malta', 'Mauritius', 'Maldiverne', 'Malawi', 'Mexico', 'Malaysia', 'Mozambique', + 'Namibia', 'Ny Caledonien', 'Niger', 'Norfolk Island', 'Nigeria', 'Nicaragua', 'Holland', 'Norge', 'Nepal', 'Nauru', + 'Niue', 'New Zealand', 'Oman', 'Panama', 'Peru', 'Fransk Polynesien', 'Papua Ny Guinea', 'Filippinerne', 'Pakistan', + 'Polen', 'Saint Pierre og Miquelon', 'Pitcairn', 'Puerto Rico', 'De palæstinensiske omrÃ¥der', 'Portugal', 'Palau', + 'Paraguay', 'Qatar', 'Reunion', 'Rumænien', 'Serbien', 'Rusland', 'Rwanda', 'Saudi-Arabien', 'Salomonøerne', + 'Seychellerne', 'Sudan', 'Sverige', 'Singapore', 'St. Helena', 'Slovenien', 'Svalbard og Jan Mayen', 'Slovakiet', + 'Sierra Leone', 'San Marino', 'Senegal', 'Somalia', 'Surinam', 'Sao Tome og Principe', 'El Salvador', 'Syrien', + 'Swaziland', 'Turks- og Caicosøerne', 'Tchad', 'Franske Besiddelser i Det Sydlige Indiske Ocean', 'Togo', + 'Thailand', 'Tadsjikistan', 'Tokelau', 'Timor-Leste', 'Turkmenistan', 'Tunesien', 'Tonga', 'Tyrkiet', + 'Trinidad og Tobago', 'Tuvalu', 'Taiwan', 'Tanzania', 'Ukraine', 'Uganda', 'De Mindre Amerikanske Oversøiske Øer', + 'USA', 'Uruguay', 'Usbekistan', 'Vatikanstaten', 'St. Vincent og Grenadinerne', 'Venezuela', + 'De britiske jomfruøer', 'De amerikanske jomfruøer', 'Vietnam', 'Vanuatu', 'Wallis og Futunaøerne', 'Samoa', + 'Yemen', 'Mayotte', 'Sydafrika', 'Zambia', 'Zimbabwe', + ); + + /** + * @var array Danish city format. + */ + protected static $cityFormats = array( + '{{cityName}}', + ); + + /** + * @var array Danish street's name formats. + */ + protected static $streetNameFormats = array( + '{{lastName}}{{streetSuffix}}', + '{{middleName}}{{streetSuffix}}', + '{{lastName}} {{streetSuffixWord}}', + '{{middleName}} {{streetSuffixWord}}', + ); + + /** + * @var array Danish street's address formats. + */ + protected static $streetAddressFormats = array( + '{{streetName}} {{buildingNumber}}', + '{{streetName}} {{buildingNumber}}, {{buildingLevel}}', + '{{streetName}} {{buildingNumber}}, {{buildingLevel}} {{buildingSide}}', + ); + + /** + * @var array Danish address format. + */ + protected static $addressFormats = array( + "{{streetAddress}}\n{{postcode}} {{city}}", + ); + + /** + * Randomly return a real city name. + * + * @return string + */ + public static function cityName() + { + return static::randomElement(static::$cityNames); + } + + /** + * Randomly return a suffix word. + * + * @return string + */ + public static function streetSuffixWord() + { + return static::randomElement(static::$streetSuffixWord); + } + + /** + * Randomly return a building number. + * + * @return string + */ + public static function buildingNumber() + { + return static::toUpper(static::bothify(static::randomElement(static::$buildingNumber))); + } + + /** + * Randomly return a building level. + * + * @return string + */ + public static function buildingLevel() + { + return static::numerify(static::randomElement(static::$buildingLevel)); + } + + /** + * Randomly return a side of the building. + * + * @return string + */ + public static function buildingSide() + { + return static::randomElement(static::$buildingSide); + } + + /** + * Randomly return a real municipality name, called 'kommune' in danish. + * + * @return string + */ + public static function kommune() + { + return static::randomElement(static::$kommuneNames); + } + + /** + * Randomly return a real region name. + * + * @return string + */ + public static function region() + { + return static::randomElement(static::$regionNames); + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/da_DK/Company.php b/vendor/fzaninotto/faker/src/Faker/Provider/da_DK/Company.php new file mode 100644 index 0000000..b9f289c --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/da_DK/Company.php @@ -0,0 +1,70 @@ + + */ +class Company extends \Faker\Provider\Company +{ + /** + * @var array Danish company name formats. + */ + protected static $formats = array( + '{{lastName}} {{companySuffix}}', + '{{lastName}} {{companySuffix}}', + '{{lastName}} {{companySuffix}}', + '{{firstname}} {{lastName}} {{companySuffix}}', + '{{middleName}} {{companySuffix}}', + '{{middleName}} {{companySuffix}}', + '{{middleName}} {{companySuffix}}', + '{{firstname}} {{middleName}} {{companySuffix}}', + '{{lastName}} & {{lastName}} {{companySuffix}}', + '{{lastName}} og {{lastName}} {{companySuffix}}', + '{{lastName}} & {{lastName}} {{companySuffix}}', + '{{lastName}} og {{lastName}} {{companySuffix}}', + '{{middleName}} & {{middleName}} {{companySuffix}}', + '{{middleName}} og {{middleName}} {{companySuffix}}', + '{{middleName}} & {{lastName}}', + '{{middleName}} og {{lastName}}', + ); + + /** + * @var array Company suffixes. + */ + protected static $companySuffix = array('ApS', 'A/S', 'I/S', 'K/S'); + + /** + * @link http://cvr.dk/Site/Forms/CMS/DisplayPage.aspx?pageid=60 + * + * @var string CVR number format. + */ + protected static $cvrFormat = '%#######'; + + /** + * @link http://cvr.dk/Site/Forms/CMS/DisplayPage.aspx?pageid=60 + * + * @var string P number (production number) format. + */ + protected static $pFormat = '%#########'; + + /** + * Generates a CVR number (8 digits). + * + * @return string + */ + public static function cvr() + { + return static::numerify(static::$cvrFormat); + } + + /** + * Generates a P entity number (10 digits). + * + * @return string + */ + public static function p() + { + return static::numerify(static::$pFormat); + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/da_DK/Internet.php b/vendor/fzaninotto/faker/src/Faker/Provider/da_DK/Internet.php new file mode 100644 index 0000000..1f778de --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/da_DK/Internet.php @@ -0,0 +1,30 @@ + + */ +class Internet extends \Faker\Provider\Internet +{ + /** + * @var array Some safe email TLD. + */ + protected static $safeEmailTld = array( + 'org', 'com', 'net', 'dk', 'dk', 'dk', + ); + + /** + * @var array Some email domains in Denmark. + */ + protected static $freeEmailDomain = array( + 'gmail.com', 'yahoo.com', 'yahoo.dk', 'hotmail.com', 'hotmail.dk', 'mail.dk', 'live.dk' + ); + + /** + * @var array Some TLD. + */ + protected static $tld = array( + 'com', 'com', 'com', 'biz', 'info', 'net', 'org', 'dk', 'dk', 'dk', + ); +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/da_DK/Payment.php b/vendor/fzaninotto/faker/src/Faker/Provider/da_DK/Payment.php new file mode 100644 index 0000000..6a5b6a8 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/da_DK/Payment.php @@ -0,0 +1,19 @@ + + */ +class Person extends \Faker\Provider\Person +{ + /** + * @var array Danish person name formats. + */ + protected static $maleNameFormats = array( + '{{firstNameMale}} {{lastName}}', + '{{firstNameMale}} {{lastName}}', + '{{firstNameMale}} {{lastName}}', + '{{firstNameMale}} {{middleName}} {{lastName}}', + '{{firstNameMale}} {{middleName}} {{lastName}}', + '{{firstNameMale}} {{middleName}}-{{middleName}} {{lastName}}', + '{{firstNameMale}} {{middleName}} {{middleName}}-{{lastName}}', + ); + + protected static $femaleNameFormats = array( + '{{firstNameFemale}} {{lastName}}', + '{{firstNameFemale}} {{lastName}}', + '{{firstNameFemale}} {{lastName}}', + '{{firstNameFemale}} {{middleName}} {{lastName}}', + '{{firstNameFemale}} {{middleName}} {{lastName}}', + '{{firstNameFemale}} {{middleName}}-{{middleName}} {{lastName}}', + '{{firstNameFemale}} {{middleName}} {{middleName}}-{{lastName}}', + ); + + /** + * @var array Danish first names. + */ + protected static $firstNameMale = array( + 'Aage', 'Adam', 'Adolf', 'Ahmad', 'Ahmed', 'Aksel', 'Albert', 'Alex', 'Alexander', 'Alf', 'Alfred', 'Ali', 'Allan', + 'Anders', 'Andreas', 'Anker', 'Anton', 'Arne', 'Arnold', 'Arthur', 'Asbjørn', 'Asger', 'August', 'Axel', 'Benjamin', + 'Benny', 'Bent', 'Bernhard', 'Birger', 'Bjarne', 'Bjørn', 'Bo', 'Brian', 'Bruno', 'Børge', 'Carl', 'Carlo', + 'Carsten', 'Casper', 'Charles', 'Chris', 'Christian', 'Christoffer', 'Christopher', 'Claus', 'Dan', 'Daniel', 'David', 'Dennis', + 'Ebbe', 'Edmund', 'Edvard', 'Egon', 'Einar', 'Ejvind', 'Elias', 'Emanuel', 'Emil', 'Erik', 'Erland', 'Erling', + 'Ernst', 'Esben', 'Ferdinand', 'Finn', 'Flemming', 'Frank', 'Freddy', 'Frederik', 'Frits', 'Fritz', 'Frode', 'Georg', + 'Gerhard', 'Gert', 'Gunnar', 'Gustav', 'Hans', 'Harald', 'Harry', 'Hassan', 'Heine', 'Heinrich', 'Helge', 'Helmer', + 'Helmuth', 'Henning', 'Henrik', 'Henry', 'Herman', 'Hermann', 'Holger', 'Hugo', 'Ib', 'Ibrahim', 'Ivan', 'Jack', + 'Jacob', 'Jakob', 'Jan', 'Janne', 'Jens', 'Jeppe', 'Jesper', 'Jimmi', 'Jimmy', 'Joachim', 'Johan', 'Johannes', + 'John', 'Johnny', 'Jon', 'Jonas', 'Jonathan', 'Josef', 'Jul', 'Julius', 'Jørgen', 'Jørn', 'Kai', 'Kaj', + 'Karl', 'Karlo', 'Karsten', 'Kasper', 'Kenneth', 'Kent', 'Kevin', 'Kjeld', 'Klaus', 'Knud', 'Kristian', 'Kristoffer', + 'Kurt', 'Lars', 'Lasse', 'Leif', 'Lennart', 'Leo', 'Leon', 'Louis', 'Lucas', 'Lukas', 'Mads', 'Magnus', + 'Malthe', 'Marc', 'Marcus', 'Marinus', 'Marius', 'Mark', 'Markus', 'Martin', 'Martinus', 'Mathias', 'Max', 'Michael', + 'Mikael', 'Mike', 'Mikkel', 'Mogens', 'Mohamad', 'Mohamed', 'Mohammad', 'Morten', 'Nick', 'Nicklas', 'Nicolai', 'Nicolaj', + 'Niels', 'Niklas', 'Nikolaj', 'Nils', 'Olaf', 'Olav', 'Ole', 'Oliver', 'Oscar', 'Oskar', 'Otto', 'Ove', + 'Palle', 'Patrick', 'Paul', 'Peder', 'Per', 'Peter', 'Philip', 'Poul', 'Preben', 'Rasmus', 'Rene', 'René', + 'Richard', 'Robert', 'Rolf', 'Rudolf', 'Rune', 'Sebastian', 'Sigurd', 'Simon', 'Simone', 'Steen', 'Stefan', 'Steffen', + 'Sten', 'Stig', 'Sune', 'Sven', 'Svend', 'Søren', 'Tage', 'Theodor', 'Thomas', 'Thor', 'Thorvald', 'Tim', + 'Tobias', 'Tom', 'Tommy', 'Tonny', 'Torben', 'Troels', 'Uffe', 'Ulrik', 'Vagn', 'Vagner', 'Valdemar', 'Vang', + 'Verner', 'Victor', 'Viktor', 'Villy', 'Walther', 'Werner', 'Wilhelm', 'William', 'Willy', 'Ã…ge', 'Bendt', 'Bjarke', + 'Chr', 'Eigil', 'Ejgil', 'Ejler', 'Ejnar', 'Ejner', 'Evald', 'Folmer', 'Gunner', 'Gurli', 'Hartvig', 'Herluf', 'Hjalmar', + 'Ingemann', 'Ingolf', 'Ingvard', 'Keld', 'Kresten', 'Laurids', 'Laurits', 'Lauritz', 'Ludvig', 'Lynge', 'Oluf', 'Osvald', + 'Povl', 'Richardt', 'Sigfred', 'Sofus', 'Thorkild', 'Viggo', 'Vilhelm', 'Villiam', + ); + + protected static $firstNameFemale = array( + 'Aase', 'Agathe', 'Agnes', 'Alberte', 'Alexandra', 'Alice', 'Alma', 'Amalie', 'Amanda', 'Andrea', 'Ane', 'Anette', 'Anita', + 'Anja', 'Ann', 'Anna', 'Annalise', 'Anne', 'Anne-Lise', 'Anne-Marie', 'Anne-Mette', 'Annelise', 'Annette', 'Anni', 'Annie', + 'Annika', 'Anny', 'Asta', 'Astrid', 'Augusta', 'Benedikte', 'Bente', 'Berit', 'Bertha', 'Betina', 'Bettina', 'Betty', + 'Birgit', 'Birgitte', 'Birte', 'Birthe', 'Bitten', 'Bodil', 'Britt', 'Britta', 'Camilla', 'Carina', 'Carla', 'Caroline', + 'Cathrine', 'Cecilie', 'Charlotte', 'Christa', 'Christen', 'Christiane', 'Christina', 'Christine', 'Clara', 'Conni', 'Connie', 'Conny', + 'Dagmar', 'Dagny', 'Diana', 'Ditte', 'Dora', 'Doris', 'Dorte', 'Dorthe', 'Ebba', 'Edel', 'Edith', 'Eleonora', + 'Eli', 'Elin', 'Eline', 'Elinor', 'Elisa', 'Elisabeth', 'Elise', 'Ella', 'Ellen', 'Ellinor', 'Elly', 'Elna', + 'Elsa', 'Else', 'Elsebeth', 'Elvira', 'Emilie', 'Emma', 'Emmy', 'Erna', 'Ester', 'Esther', 'Eva', 'Evelyn', + 'Frede', 'Frederikke', 'Freja', 'Frida', 'Gerda', 'Gertrud', 'Gitte', 'Grete', 'Grethe', 'Gudrun', 'Hanna', 'Hanne', + 'Hardy', 'Harriet', 'Hedvig', 'Heidi', 'Helen', 'Helena', 'Helene', 'Helga', 'Helle', 'Henny', 'Henriette', 'Herdis', + 'Hilda', 'Iben', 'Ida', 'Ilse', 'Ina', 'Inga', 'Inge', 'Ingeborg', 'Ingelise', 'Inger', 'Ingrid', 'Irene', + 'Iris', 'Irma', 'Isabella', 'Jane', 'Janni', 'Jannie', 'Jeanette', 'Jeanne', 'Jenny', 'Jes', 'Jette', 'Joan', + 'Johanna', 'Johanne', 'Jonna', 'Josefine', 'Josephine', 'Juliane', 'Julie', 'Jytte', 'Kaja', 'Kamilla', 'Karen', 'Karin', + 'Karina', 'Karla', 'Karoline', 'Kate', 'Kathrine', 'Katja', 'Katrine', 'Ketty', 'Kim', 'Kirsten', 'Kirstine', 'Klara', + 'Krista', 'Kristen', 'Kristina', 'Kristine', 'Laila', 'Laura', 'Laurine', 'Lea', 'Lena', 'Lene', 'Lilian', 'Lilli', + 'Lillian', 'Lilly', 'Linda', 'Line', 'Lis', 'Lisa', 'Lisbet', 'Lisbeth', 'Lise', 'Liselotte', 'Lissi', 'Lissy', + 'Liv', 'Lizzie', 'Lone', 'Lotte', 'Louise', 'Lydia', 'Lykke', 'Lærke', 'Magda', 'Magdalene', 'Mai', 'Maiken', + 'Maj', 'Maja', 'Majbritt', 'Malene', 'Maren', 'Margit', 'Margrethe', 'Maria', 'Mariane', 'Marianne', 'Marie', 'Marlene', + 'Martha', 'Martine', 'Mary', 'Mathilde', 'Matilde', 'Merete', 'Merethe', 'Meta', 'Mette', 'Mia', 'Michelle', 'Mie', + 'Mille', 'Minna', 'Mona', 'Monica', 'Nadia', 'Nancy', 'Nanna', 'Nicoline', 'Nikoline', 'Nina', 'Ninna', 'Oda', + 'Olga', 'Olivia', 'Orla', 'Paula', 'Pauline', 'Pernille', 'Petra', 'Pia', 'Poula', 'Ragnhild', 'Randi', 'Rasmine', + 'Rebecca', 'Rebekka', 'Rigmor', 'Rikke', 'Rita', 'Rosa', 'Rose', 'Ruth', 'Sabrina', 'Sandra', 'Sanne', 'Sara', + 'Sarah', 'Selma', 'Severin', 'Sidsel', 'Signe', 'Sigrid', 'Sine', 'Sofia', 'Sofie', 'Solveig', 'Solvejg', 'Sonja', + 'Sophie', 'Stephanie', 'Stine', 'Susan', 'Susanne', 'Tanja', 'Thea', 'Theodora', 'Therese', 'Thi', 'Thyra', 'Tina', + 'Tine', 'Tove', 'Trine', 'Ulla', 'Vera', 'Vibeke', 'Victoria', 'Viktoria', 'Viola', 'Vita', 'Vivi', 'Vivian', + 'Winnie', 'Yrsa', 'Yvonne', 'Agnete', 'Agnethe', 'Alfrida', 'Alvilda', 'Anine', 'Bolette', 'Dorthea', 'Gunhild', + 'Hansine', 'Inge-Lise', 'Jensine', 'Juel', 'Jørgine', 'Kamma', 'Kristiane', 'Maj-Britt', 'Margrete', 'Metha', 'Nielsine', + 'Oline', 'Petrea', 'Petrine', 'Pouline', 'Ragna', 'Sørine', 'Thora', 'Valborg', 'Vilhelmine', + ); + + /** + * @var array Danish middle names. + */ + protected static $middleName = array( + 'Møller', 'Lund', 'Holm', 'Jensen', 'Juul', 'Nielsen', 'Kjær', 'Hansen', 'Skov', 'Østergaard', 'Vestergaard', + 'Nørgaard', 'Dahl', 'Bach', 'Friis', 'Søndergaard', 'Andersen', 'Bech', 'Pedersen', 'Bruun', 'Nygaard', 'Winther', + 'Bang', 'Krogh', 'Schmidt', 'Christensen', 'Hedegaard', 'Toft', 'Damgaard', 'Holst', 'Sørensen', 'Juhl', 'Munk', + 'Skovgaard', 'Søgaard', 'Aagaard', 'Berg', 'Dam', 'Petersen', 'Lind', 'Overgaard', 'Brandt', 'Larsen', 'Bak', 'Schou', + 'Vinther', 'Bjerregaard', 'Riis', 'Bundgaard', 'Kruse', 'Mølgaard', 'Hjorth', 'Ravn', 'Madsen', 'Rasmussen', + 'Jørgensen', 'Kristensen', 'Bonde', 'Bay', 'Hougaard', 'Dalsgaard', 'Kjærgaard', 'Haugaard', 'Munch', 'Bjerre', 'Due', + 'Sloth', 'Leth', 'Kofoed', 'Thomsen', 'Kragh', 'Højgaard', 'Dalgaard', 'Hjort', 'Kirkegaard', 'Bøgh', 'Beck', 'Nissen', + 'Rask', 'Høj', 'Brix', 'Storm', 'Buch', 'Bisgaard', 'Birch', 'Gade', 'Kjærsgaard', 'Hald', 'Lindberg', 'Høgh', 'Falk', + 'Koch', 'Thorup', 'Borup', 'Knudsen', 'Vedel', 'Poulsen', 'Bøgelund', 'Juel', 'Frost', 'Hvid', 'Bjerg', 'Bæk', 'Elkjær', + 'Hartmann', 'Kirk', 'Sand', 'Sommer', 'Skou', 'Nedergaard', 'Meldgaard', 'Brink', 'Lindegaard', 'Fischer', 'Rye', + 'Hoffmann', 'Daugaard', 'Gram', 'Johansen', 'Meyer', 'Schultz', 'Fogh', 'Bloch', 'Lundgaard', 'Brøndum', 'Jessen', + 'Busk', 'Holmgaard', 'Lindholm', 'Krog', 'Egelund', 'Engelbrecht', 'Buus', 'Korsgaard', 'Ellegaard', 'Tang', 'Steen', + 'Kvist', 'Olsen', 'Nørregaard', 'Fuglsang', 'Wulff', 'Damsgaard', 'Hauge', 'Sonne', 'Skytte', 'Brun', 'Kronborg', + 'Abildgaard', 'Fabricius', 'Bille', 'Skaarup', 'Rahbek', 'Borg', 'Torp', 'Klitgaard', 'Nørskov', 'Greve', 'Hviid', + 'Mørch', 'Buhl', 'Rohde', 'Mørk', 'Vendelbo', 'Bjørn', 'Laursen', 'Egede', 'Rytter', 'Lehmann', 'Guldberg', 'Rosendahl', + 'Krarup', 'Krogsgaard', 'Westergaard', 'Rosendal', 'Fisker', 'Højer', 'Rosenberg', 'Svane', 'Storgaard', 'Pihl', + 'Mohamed', 'Bülow', 'Birk', 'Hammer', 'Bro', 'Kaas', 'Clausen', 'Nymann', 'Egholm', 'Ingemann', 'Haahr', 'Olesen', + 'Nøhr', 'Brinch', 'Bjerring', 'Christiansen', 'Schrøder', 'Guldager', 'Skjødt', 'Højlund', 'Ørum', 'Weber', + 'Bødker', 'Bruhn', 'Stampe', 'Astrup', 'Schack', 'Mikkelsen', 'Høyer', 'Husted', 'Skriver', 'Lindgaard', 'Yde', + 'Sylvest', 'Lykkegaard', 'Ploug', 'Gammelgaard', 'Pilgaard', 'Brogaard', 'Degn', 'Kaae', 'Kofod', 'Grønbæk', + 'Lundsgaard', 'Bagge', 'Lyng', 'Rømer', 'Kjeldgaard', 'Hovgaard', 'Groth', 'Hyldgaard', 'Ladefoged', 'Jacobsen', + 'Linde', 'Lange', 'Stokholm', 'Bredahl', 'Hein', 'Mose', 'Bækgaard', 'Sandberg', 'Klarskov', 'Kamp', 'Green', + 'Iversen', 'Riber', 'Smedegaard', 'Nyholm', 'Vad', 'Balle', 'Kjeldsen', 'Strøm', 'Borch', 'Lerche', 'Grønlund', + 'VestergÃ¥rd', 'ØstergÃ¥rd', 'Nyborg', 'Qvist', 'Damkjær', 'Kold', 'Sønderskov', 'Bank', + ); + + /** + * @var array Danish last names. + */ + protected static $lastName = array( + 'Jensen', 'Nielsen', 'Hansen', 'Pedersen', 'Andersen', 'Christensen', 'Larsen', 'Sørensen', 'Rasmussen', 'Petersen', + 'Jørgensen', 'Madsen', 'Kristensen', 'Olsen', 'Christiansen', 'Thomsen', 'Poulsen', 'Johansen', 'Knudsen', 'Mortensen', + 'Møller', 'Jacobsen', 'Jakobsen', 'Olesen', 'Frederiksen', 'Mikkelsen', 'Henriksen', 'Laursen', 'Lund', 'Schmidt', + 'Eriksen', 'Holm', 'Kristiansen', 'Clausen', 'Simonsen', 'Svendsen', 'Andreasen', 'Iversen', 'Jeppesen', 'Mogensen', + 'Jespersen', 'Nissen', 'Lauridsen', 'Frandsen', 'Østergaard', 'Jepsen', 'Kjær', 'Carlsen', 'Vestergaard', 'Jessen', + 'Nørgaard', 'Dahl', 'Christoffersen', 'Skov', 'Søndergaard', 'Bertelsen', 'Bruun', 'Lassen', 'Bach', 'Gregersen', + 'Friis', 'Johnsen', 'Steffensen', 'Kjeldsen', 'Bech', 'Krogh', 'Lauritsen', 'Danielsen', 'Mathiesen', 'Andresen', + 'Brandt', 'Winther', 'Toft', 'Ravn', 'Mathiasen', 'Dam', 'Holst', 'Nilsson', 'Lind', 'Berg', 'Schou', 'Overgaard', + 'Kristoffersen', 'Schultz', 'Klausen', 'Karlsen', 'Paulsen', 'Hermansen', 'Thorsen', 'Koch', 'Thygesen', 'Bak', 'Kruse', + 'Bang', 'Juhl', 'Davidsen', 'Berthelsen', 'Nygaard', 'Lorentzen', 'Villadsen', 'Lorenzen', 'Damgaard', 'Bjerregaard', + 'Lange', 'Hedegaard', 'Bendtsen', 'Lauritzen', 'Svensson', 'Justesen', 'Juul', 'Hald', 'Beck', 'Kofoed', 'Søgaard', + 'Meyer', 'Kjærgaard', 'Riis', 'Johannsen', 'Carstensen', 'Bonde', 'Ibsen', 'Fischer', 'Andersson', 'Bundgaard', + 'Johannesen', 'Eskildsen', 'Hemmingsen', 'Andreassen', 'Thomassen', 'Schrøder', 'Persson', 'Hjorth', 'Enevoldsen', + 'Nguyen', 'Henningsen', 'Jønsson', 'Olsson', 'Asmussen', 'Michelsen', 'Vinther', 'Markussen', 'Kragh', 'Thøgersen', + 'Johansson', 'Dalsgaard', 'Gade', 'Bjerre', 'Ali', 'Laustsen', 'Buch', 'Ludvigsen', 'Hougaard', 'Kirkegaard', 'Marcussen', + 'Mølgaard', 'Ipsen', 'Sommer', 'Ottosen', 'Müller', 'Krog', 'Hoffmann', 'Clemmensen', 'Nikolajsen', 'Brodersen', + 'Therkildsen', 'Leth', 'Michaelsen', 'Graversen', 'Frost', 'Dalgaard', 'Albertsen', 'Laugesen', 'Due', 'Ebbesen', + 'Munch', 'Svenningsen', 'Ottesen', 'Fisker', 'Albrechtsen', 'Axelsen', 'Erichsen', 'Sloth', 'Bentsen', 'Westergaard', + 'Bisgaard', 'Nicolaisen', 'Magnussen', 'Thuesen', 'Povlsen', 'Thorup', 'Høj', 'Bentzen', 'Johannessen', 'Vilhelmsen', + 'Isaksen', 'Bendixen', 'Ovesen', 'Villumsen', 'Lindberg', 'Thomasen', 'Kjærsgaard', 'Buhl', 'Kofod', 'Ahmed', 'Smith', + 'Storm', 'Christophersen', 'Bruhn', 'Matthiesen', 'Wagner', 'Bjerg', 'Gram', 'Nedergaard', 'Dinesen', 'Mouritsen', + 'Boesen', 'Borup', 'Abrahamsen', 'Wulff', 'Gravesen', 'Rask', 'Pallesen', 'Greve', 'Korsgaard', 'Haugaard', 'Josefsen', + 'Bæk', 'Espersen', 'Thrane', 'Mørch', 'Frank', 'Lynge', 'Rohde', 'Larsson', 'Hammer', 'Torp', 'Sonne', 'Boysen', 'Bay', + 'Pihl', 'Fabricius', 'Høyer', 'Birch', 'Skou', 'Kirk', 'Antonsen', 'Høgh', 'Damsgaard', 'Dall', 'Truelsen', 'Daugaard', + 'Fuglsang', 'Martinsen', 'Therkelsen', 'Jansen', 'Karlsson', 'Caspersen', 'Steen', 'Callesen', 'Balle', 'Bloch', 'Smidt', + 'Rahbek', 'Hjort', 'Bjørn', 'Skaarup', 'Sand', 'Storgaard', 'Willumsen', 'Busk', 'Hartmann', 'Ladefoged', 'Skovgaard', + 'Philipsen', 'Damm', 'Haagensen', 'Hviid', 'Duus', 'Kvist', 'Adamsen', 'Mathiassen', 'Degn', 'Borg', 'Brix', 'Troelsen', + 'Ditlevsen', 'Brøndum', 'Svane', 'Mohamed', 'Birk', 'Brink', 'Hassan', 'Vester', 'Elkjær', 'Lykke', 'Nørregaard', + 'Meldgaard', 'Mørk', 'Hvid', 'Abildgaard', 'Nicolajsen', 'Bengtsson', 'Stokholm', 'Ahmad', 'Wind', 'Rømer', 'Gundersen', + 'Carlsson', 'Grøn', 'Khan', 'Skytte', 'Bagger', 'Hendriksen', 'Rosenberg', 'Jonassen', 'Severinsen', 'Jürgensen', + 'Boisen', 'Groth', 'Bager', 'Fogh', 'Hussain', 'Samuelsen', 'Pilgaard', 'Bødker', 'Dideriksen', 'Brogaard', 'Lundberg', + 'Hansson', 'Schwartz', 'Tran', 'Skriver', 'Klitgaard', 'Hauge', 'Højgaard', 'Qvist', 'Voss', 'Strøm', 'Wolff', 'Krarup', + 'Green', 'Odgaard', 'Tønnesen', 'Blom', 'Gammelgaard', 'Jæger', 'Kramer', 'Astrup', 'Würtz', 'Lehmann', 'Koefoed', + 'Skøtt', 'Lundsgaard', 'Bøgh', 'Vang', 'Martinussen', 'Sandberg', 'Weber', 'Holmgaard', 'Bidstrup', 'Meier', 'Drejer', + 'Schneider', 'Joensen', 'Dupont', 'Lorentsen', 'Bro', 'Bagge', 'Terkelsen', 'Kaspersen', 'Keller', 'Eliasen', 'Lyberth', + 'Husted', 'Mouritzen', 'Krag', 'Kragelund', 'Nørskov', 'Vad', 'Jochumsen', 'Hein', 'Krogsgaard', 'Kaas', 'Tolstrup', + 'Ernst', 'Hermann', 'Børgesen', 'Skjødt', 'Holt', 'Buus', 'Gotfredsen', 'Kjeldgaard', 'Broberg', 'Roed', 'Sivertsen', + 'Bergmann', 'Bjerrum', 'Petersson', 'Smed', 'Jeremiassen', 'Nyborg', 'Borch', 'Foged', 'Terp', 'Mark', 'Busch', + 'Lundgaard', 'Boye', 'Yde', 'Hinrichsen', 'Matzen', 'Esbensen', 'Hertz', 'Westh', 'Holmberg', 'Geertsen', 'Raun', + 'Aagaard', 'Kock', 'Falk', 'Munk', + ); + + /** + * Randomly return a danish name. + * + * @return string + */ + public static function middleName() + { + return static::randomElement(static::$middleName); + } + + /** + * Randomly return a danish CPR number (Personnal identification number) format. + * + * @link http://cpr.dk/cpr/site.aspx?p=16 + * @link http://en.wikipedia.org/wiki/Personal_identification_number_%28Denmark%29 + * + * @return string + */ + public static function cpr() + { + $birthdate = new \DateTime('@' . mt_rand(0, time())); + + return sprintf('%s-%s', $birthdate->format('dmy'), static::numerify('%###')); + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/da_DK/PhoneNumber.php b/vendor/fzaninotto/faker/src/Faker/Provider/da_DK/PhoneNumber.php new file mode 100644 index 0000000..af96d3f --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/da_DK/PhoneNumber.php @@ -0,0 +1,21 @@ + + */ +class PhoneNumber extends \Faker\Provider\PhoneNumber +{ + /** + * @var array Danish phonenumber formats. + */ + protected static $formats = array( + '+45 ## ## ## ##', + '+45 #### ####', + '+45########', + '## ## ## ##', + '#### ####', + '########', + ); +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/de_AT/Address.php b/vendor/fzaninotto/faker/src/Faker/Provider/de_AT/Address.php new file mode 100644 index 0000000..1d7803c --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/de_AT/Address.php @@ -0,0 +1,111 @@ + 'Aargau'), + array('AI' => 'Appenzell Innerrhoden'), + array('AR' => 'Appenzell Ausserrhoden'), + array('BE' => 'Bern'), + array('BL' => 'Basel-Landschaft'), + array('BS' => 'Basel-Stadt'), + array('FR' => 'Freiburg'), + array('GE' => 'Genf'), + array('GL' => 'Glarus'), + array('GR' => 'Graubünden'), + array('JU' => 'Jura',), + array('LU' => 'Luzern'), + array('NE' => 'Neuenburg'), + array('NW' => 'Nidwalden'), + array('OW' => 'Obwalden'), + array('SG' => 'St. Gallen'), + array('SH' => 'Schaffhausen'), + array('SO' => 'Solothurn'), + array('SZ' => 'Schwyz'), + array('TG' => 'Thurgau'), + array('TI' => 'Tessin'), + array('UR' => 'Uri'), + array('VD' => 'Waadt'), + array('VS' => 'Wallis'), + array('ZG' => 'Zug'), + array('ZH' => 'Zürich') + ); + + protected static $country = array( + 'Afghanistan', 'Alandinseln', 'Albanien', 'Algerien', 'Amerikanisch-Ozeanien', 'Amerikanisch-Samoa', 'Amerikanische Jungferninseln', 'Andorra', 'Angola', 'Anguilla', 'Antarktis', 'Antigua und Barbuda', 'Argentinien', 'Armenien', 'Aruba', 'Aserbaidschan', 'Australien', 'Ägypten', 'Äquatorialguinea', 'Äthiopien', 'Äusseres Ozeanien', + 'Bahamas', 'Bahrain', 'Bangladesch', 'Barbados', 'Belarus', 'Belgien', 'Belize', 'Benin', 'Bermuda', 'Bhutan', 'Bolivien', 'Bosnien und Herzegowina', 'Botsuana', 'Bouvetinsel', 'Brasilien', 'Britische Jungferninseln', 'Britisches Territorium im Indischen Ozean', 'Brunei Darussalam', 'Bulgarien', 'Burkina Faso', 'Burundi', + 'Chile', 'China', 'Cookinseln', 'Costa Rica', 'Côte d’Ivoire', + 'Demokratische Republik Kongo', 'Demokratische Volksrepublik Korea', 'Deutschland', 'Dominica', 'Dominikanische Republik', 'Dschibuti', 'Dänemark', + 'Ecuador', 'El Salvador', 'Eritrea', 'Estland', 'Europäische Union', + 'Falklandinseln', 'Fidschi', 'Finnland', 'Frankreich', 'Französisch-Guayana', 'Französisch-Polynesien', 'Französische Süd- und Antarktisgebiete', 'Färöer', + 'Gabun', 'Gambia', 'Georgien', 'Ghana', 'Gibraltar', 'Grenada', 'Griechenland', 'Grönland', 'Guadeloupe', 'Guam', 'Guatemala', 'Guernsey', 'Guinea', 'Guinea-Bissau', 'Guyana', + 'Haiti', 'Heard- und McDonald-Inseln', 'Honduras', + 'Indien', 'Indonesien', 'Irak', 'Iran', 'Irland', 'Island', 'Isle of Man', 'Israel', 'Italien', + 'Jamaika', 'Japan', 'Jemen', 'Jersey', 'Jordanien', + 'Kaimaninseln', 'Kambodscha', 'Kamerun', 'Kanada', 'Kap Verde', 'Kasachstan', 'Katar', 'Kenia', 'Kirgisistan', 'Kiribati', 'Kokosinseln', 'Kolumbien', 'Komoren', 'Kongo', 'Kroatien', 'Kuba', 'Kuwait', + 'Laos', 'Lesotho', 'Lettland', 'Libanon', 'Liberia', 'Libyen', 'Liechtenstein', 'Litauen', 'Luxemburg', + 'Madagaskar', 'Malawi', 'Malaysia', 'Malediven', 'Mali', 'Malta', 'Marokko', 'Marshallinseln', 'Martinique', 'Mauretanien', 'Mauritius', 'Mayotte', 'Mazedonien', 'Mexiko', 'Mikronesien', 'Monaco', 'Mongolei', 'Montenegro', 'Montserrat', 'Mosambik', 'Myanmar', + 'Namibia', 'Nauru', 'Nepal', 'Neukaledonien', 'Neuseeland', 'Nicaragua', 'Niederlande', 'Niederländische Antillen', 'Niger', 'Nigeria', 'Niue', 'Norfolkinsel', 'Norwegen', 'Nördliche Marianen', + 'Oman', 'Osttimor', 'Österreich', + 'Pakistan', 'Palau', 'Palästinensische Gebiete', 'Panama', 'Papua-Neuguinea', 'Paraguay', 'Peru', 'Philippinen', 'Pitcairn', 'Polen', 'Portugal', 'Puerto Rico', + 'Republik Korea', 'Republik Moldau', 'Ruanda', 'Rumänien', 'Russische Föderation', 'Réunion', + 'Salomonen', 'Sambia', 'Samoa', 'San Marino', 'Saudi-Arabien', 'Schweden', 'Schweiz', 'Senegal', 'Serbien', 'Serbien und Montenegro', 'Seychellen', 'Sierra Leone', 'Simbabwe', 'Singapur', 'Slowakei', 'Slowenien', 'Somalia', 'Sonderverwaltungszone Hongkong', 'Sonderverwaltungszone Macao', 'Spanien', 'Sri Lanka', 'St. Barthélemy', 'St. Helena', 'St. Kitts und Nevis', 'St. Lucia', 'St. Martin', 'St. Pierre und Miquelon', 'St. Vincent und die Grenadinen', 'Sudan', 'Suriname', 'Svalbard und Jan Mayen', 'Swasiland', 'Syrien', 'São Tomé und Príncipe', 'Südafrika', 'Südgeorgien und die Südlichen Sandwichinseln', + 'Tadschikistan', 'Taiwan', 'Tansania', 'Thailand', 'Togo', 'Tokelau', 'Tonga', 'Trinidad und Tobago', 'Tschad', 'Tschechische Republik', 'Tunesien', 'Turkmenistan', 'Turks- und Caicosinseln', 'Tuvalu', 'Türkei', + 'Uganda', 'Ukraine', 'Unbekannte oder ungültige Region', 'Ungarn', 'Uruguay', 'Usbekistan', + 'Vanuatu', 'Vatikanstadt', 'Venezuela', 'Vereinigte Arabische Emirate', 'Vereinigte Staaten', 'Vereinigtes Königreich', 'Vietnam', + 'Wallis und Futuna', 'Weihnachtsinsel', 'Westsahara', + 'Zentralafrikanische Republik', 'Zypern', + ); + + protected static $cityFormats = array( + '{{cityName}}', + ); + + protected static $streetNameFormats = array( + '{{lastName}}{{streetSuffixShort}}', + '{{cityName}}{{streetSuffixShort}}', + '{{firstName}}-{{lastName}}-{{streetSuffixLong}}' + ); + + protected static $streetAddressFormats = array( + '{{streetName}} {{buildingNumber}}', + ); + protected static $addressFormats = array( + "{{streetAddress}}\n{{postcode}} {{city}}", + ); + + /** + * Returns a random city name. + * @example Luzern + * @return string + */ + public function cityName() + { + return static::randomElement(static::$cityNames); + } + + /** + * Returns a random street suffix. + * @example str. + * @return string + */ + public function streetSuffixShort() + { + return static::randomElement(static::$streetSuffixShort); + } + + /** + * Returns a random street suffix. + * @example Strasse + * @return string + */ + public function streetSuffixLong() + { + return static::randomElement(static::$streetSuffixLong); + } + + /** + * Returns a canton + * @example array('BE' => 'Bern') + * @return array + */ + public static function canton() + { + return static::randomElement(static::$canton); + } + + /** + * Returns the abbreviation of a canton. + * @return string + */ + public static function cantonShort() + { + $canton = static::canton(); + return key($canton); + } + + /** + * Returns the name of canton. + * @return string + */ + public static function cantonName() + { + $canton = static::canton(); + return current($canton); + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/de_CH/Company.php b/vendor/fzaninotto/faker/src/Faker/Provider/de_CH/Company.php new file mode 100644 index 0000000..604ec5a --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/de_CH/Company.php @@ -0,0 +1,15 @@ +generator->parse(static::randomElement(static::$lastNameFormat)); + } + + /** + * @example 'ΘεωδωÏόπουλος' + */ + public static function lastNameMale() + { + return static::randomElement(static::$lastNameMale); + } + + /** + * @example 'Κοκκίνου' + */ + public static function lastNameFemale() + { + return static::randomElement(static::$lastNameFemale); + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/el_GR/PhoneNumber.php b/vendor/fzaninotto/faker/src/Faker/Provider/el_GR/PhoneNumber.php new file mode 100644 index 0000000..f8cf8b3 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/el_GR/PhoneNumber.php @@ -0,0 +1,85 @@ +generator->parse(static::randomElement(static::$societyNameFormat)); + } + /** + * @example Mumbai + */ + public function city() + { + return static::randomElement(static::$city); + } + /** + * @example Vaishali Nagar + */ + public function locality() + { + return $this->generator->parse(static::randomElement(static::$localityFormats)); + } + /* + * @example Kharadi + */ + public function localityName() + { + return $this->generator->parse(static::randomElement(static::$localityName)); + } + /** + * @example Nagar + */ + public function areaSuffix() + { + return static::randomElement(static::$areaSuffix); + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/en_IN/Internet.php b/vendor/fzaninotto/faker/src/Faker/Provider/en_IN/Internet.php new file mode 100644 index 0000000..6ec1671 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/en_IN/Internet.php @@ -0,0 +1,9 @@ +generator->parse($format)); + } + + public function fixedLineNumber() + { + $format = static::randomElement(static::$fixedLineNumberFormats); + + return static::numerify($this->generator->parse($format)); + } + + public function voipNumber() + { + $format = static::randomElement(static::$voipNumber); + + return $this->generator->parse($format); + } + + public function internationalCodePrefix() + { + $format = static::randomElement(static::$internationalCodePrefix); + + return $this->generator->parse($format); + } + + public function zeroToEight() + { + return static::randomElement(static::$zeroToEight); + } + + public function oneToNine() + { + return static::randomElement(static::$oneToNine); + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/en_UG/Address.php b/vendor/fzaninotto/faker/src/Faker/Provider/en_UG/Address.php new file mode 100644 index 0000000..eb817e3 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/en_UG/Address.php @@ -0,0 +1,101 @@ +generator->parse($format)); + } + + /** + * NPA-format area code + * + * @see https://en.wikipedia.org/wiki/North_American_Numbering_Plan#Numbering_system + * + * @return string + */ + public static function areaCode() + { + $digits[] = self::numberBetween(2, 9); + $digits[] = self::randomDigit(); + $digits[] = self::randomDigitNot($digits[1]); + + return join('', $digits); + } + + /** + * NXX-format central office exchange code + * + * @see https://en.wikipedia.org/wiki/North_American_Numbering_Plan#Numbering_system + * + * @return string + */ + public static function exchangeCode() + { + $digits[] = self::numberBetween(2, 9); + $digits[] = self::randomDigit(); + + if ($digits[1] === 1) { + $digits[] = self::randomDigitNot(1); + } else { + $digits[] = self::randomDigit(); + } + + return join('', $digits); + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/en_US/Text.php b/vendor/fzaninotto/faker/src/Faker/Provider/en_US/Text.php new file mode 100644 index 0000000..b3c5258 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/en_US/Text.php @@ -0,0 +1,3720 @@ +format('Y'), + static::randomNumber(6, true), + static::randomElement(static::$legalEntities) + ); + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/en_ZA/Internet.php b/vendor/fzaninotto/faker/src/Faker/Provider/en_ZA/Internet.php new file mode 100644 index 0000000..0c5c5f4 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/en_ZA/Internet.php @@ -0,0 +1,18 @@ +generator->parse($format)); + } + + public function tollFreeNumber() + { + $format = static::randomElement(static::$specialFormats); + + return self::numerify($this->generator->parse($format)); + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/es_AR/Address.php b/vendor/fzaninotto/faker/src/Faker/Provider/es_AR/Address.php new file mode 100644 index 0000000..70f503f --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/es_AR/Address.php @@ -0,0 +1,68 @@ +numberBetween(10000, 100000000); + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/es_VE/PhoneNumber.php b/vendor/fzaninotto/faker/src/Faker/Provider/es_VE/PhoneNumber.php new file mode 100644 index 0000000..74caecc --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/es_VE/PhoneNumber.php @@ -0,0 +1,29 @@ +generator->parse($format)); + } + + /** + * @example 'ahmad.ir' + */ + public function domainName() + { + return static::randomElement(static::$lastNameAscii) . '.' . $this->tld(); + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/fa_IR/Person.php b/vendor/fzaninotto/faker/src/Faker/Provider/fa_IR/Person.php new file mode 100644 index 0000000..055b863 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/fa_IR/Person.php @@ -0,0 +1,137 @@ + 5) { + throw new \InvalidArgumentException('indexSize must be at most 5'); + } + + $words = $this->getConsecutiveWords($indexSize); + $result = array(); + $resultLength = 0; + // take a random starting point + $next = static::randomKey($words); + while ($resultLength < $maxNbChars && isset($words[$next])) { + // fetch a random word to append + $word = static::randomElement($words[$next]); + + // calculate next index + $currentWords = explode(' ', $next); + + $currentWords[] = $word; + array_shift($currentWords); + $next = implode(' ', $currentWords); + + if ($resultLength == 0 && !preg_match('/^[\x{0600}-\x{06FF}]/u', $word)) { + continue; + } + // append the element + $result[] = $word; + $resultLength += strlen($word) + 1; + } + + // remove the element that caused the text to overflow + array_pop($result); + + // build result + $result = implode(' ', $result); + + return $result.'.'; + } + + /** + * License: Creative Commons Attribution-ShareAlike License + * + * Title: مدیر مدرسه + * Author: جلال آل‌احمد + * Language: Persian + * + * @see http://fa.wikisource.org/wiki/%D9%85%D8%AF%DB%8C%D8%B1_%D9%85%D8%AF%D8%B1%D8%B3%D9%87 + * @var string + */ + protected static $baseText = <<<'EOT' +از در Ú©Ù‡ وارد شدم سیگارم دستم بود. زورم آمد سلام کنم. همین طوری دنگم گرÙته بود قد باشم. رئیس Ùرهنگ Ú©Ù‡ اجازه‌ی نشستن داد، نگاهش لحظه‌ای روی دستم Ù…Ú©Ø« کرد Ùˆ بعد چیزی را Ú©Ù‡ می‌نوشت، تمام کرد Ùˆ می‌خواست متوجه من بشود Ú©Ù‡ رونویس Ø­Ú©Ù… را روی میزش گذاشته بودم. حرÙÛŒ نزدیم. رونویس را با کاغذهای ضمیمه‌اش زیر Ùˆ رو کرد Ùˆ بعد غبغب انداخت Ùˆ آرام Ùˆ مثلاً خالی از عصبانیت Ú¯Ùت: + +- جا نداریم آقا. این Ú©Ù‡ نمی‌شه! هر روز یه Ø­Ú©Ù… می‌دند دست یکی می‌Ùرستنش سراغ من... دیروز به آقای مدیر Ú©Ù„... + +حوصله‌ی این اباطیل را نداشتم. حرÙØ´ را بریدم Ú©Ù‡: + +- ممکنه خواهش کنم زیر همین ورقه مرقوم بÙرمایید؟ + +Ùˆ سیگارم را توی زیرسیگاری براق روی میزش تکاندم. روی میز، پاک Ùˆ مرتب بود. درست مثل اتاق همان مهمان‌خانه‌ی تازه‌عروس‌ها. هر چیز به جای خود Ùˆ نه یک ذره گرد. Ùقط خاکستر سیگار من زیادی بود. مثل تÙÛŒ در صورت تازه تراشیده‌ای.... قلم را برداشت Ùˆ زیر Ø­Ú©Ù… چیزی نوشت Ùˆ امضا کرد Ùˆ من از در آمده بودم بیرون. خلاص. تحمل این یکی را نداشتم. با اداهایش. پیدا بود Ú©Ù‡ تازه رئیس شده. زورکی غبغب می‌انداخت Ùˆ حرÙØ´ را آهسته توی چشم آدم می‌زد. انگار برای شنیدنش گوش لازم نیست. صد Ùˆ پنجاه تومان در کارگزینی Ú©Ù„ مایه گذاشته بودم تا این Ø­Ú©Ù… را به امضا رسانده بودم. توصیه هم برده بودم Ùˆ تازه دو ماه هم دویده بودم. مو، لای درزش نمی‌رÙت. می‌دانستم Ú©Ù‡ Ú†Ù‡ او بپذیرد، Ú†Ù‡ نپذیرد، کار تمام است. خودش هم می‌دانست. حتماً هم دستگیرش شد Ú©Ù‡ با این Ù†Ú© Ùˆ نالی Ú©Ù‡ می‌کرد، خودش را کن٠کرده. ولی کاری بود Ùˆ شده بود. در کارگزینی Ú©Ù„ØŒ سÙارش کرده بودند Ú©Ù‡ برای خالی نبودن عریضه رونویس را به رؤیت رئیس Ùرهنگ هم برسانم تازه این طور شد. Ùˆ گر نه بالی Ø­Ú©Ù… کارگزینی Ú©Ù„ Ú†Ù‡ کسی می‌توانست حرÙÛŒ بزند؟ یک وزارت خانه بود Ùˆ یک کارگزینی! شوخی Ú©Ù‡ نبود. ته دلم قرص‌تر از این‌ها بود Ú©Ù‡ محتاج به این استدلال‌ها باشم. اما به نظرم همه‌ی این تقصیرها از این سیگار لعنتی بود Ú©Ù‡ به خیال خودم خواسته بودم خرجش را از محل اضاÙÙ‡ حقوق شغل جدیدم در بیاورم. البته از معلمی، هم اÙقم نشسته بود. ده سال «الÙ.ب.» درس دادن Ùˆ قیاÙه‌های بهت‌زده‌ی بچه‌های مردم برای مزخرÙ‌ترین چرندی Ú©Ù‡ می‌گویی... Ùˆ استغناء با غین Ùˆ استقراء با قا٠و خراسانی Ùˆ هندی Ùˆ قدیمی‌ترین شعر دری Ùˆ صنعت ارسال مثل Ùˆ ردالعجز... Ùˆ از این مزخرÙات! دیدم دارم خر می‌شوم. Ú¯Ùتم مدیر بشوم. مدیر دبستان! دیگر نه درس خواهم داد Ùˆ نه مجبور خواهم بود برای Ùرار از اتلا٠وقت، در امتحان تجدیدی به هر احمق بی‌شعوری Ù‡Ùت بدهم تا ایام آخر تابستانم را Ú©Ù‡ لذیذترین تکه‌ی تعطیلات است، نجات داده باشم. این بود Ú©Ù‡ راه اÙتادم. رÙتم Ùˆ از اهلش پرسیدم. از یک کار چاق Ú©Ù†. دستم را توی دست کارگزینی گذاشت Ùˆ قول Ùˆ قرار Ùˆ طرÙین خوش Ùˆ خرم Ùˆ یک روز هم نشانی مدرسه را دستم دادند Ú©Ù‡ بروم وارسی، Ú©Ù‡ باب میلم هست یا نه. + +Ùˆ رÙتم. مدرسه دو طبقه بود Ùˆ نوساز بود Ùˆ در دامنه‌ی کوه تنها اÙتاده بود Ùˆ Ø¢Ùتاب‌رو بود. یک Ùرهنگ‌دوست خرپول، عمارتش را وسط زمین خودش ساخته بود Ùˆ بیست Ùˆ پنج سال هم در اختیار Ùرهنگ گذاشته بود Ú©Ù‡ مدرسه‌اش کنند Ùˆ رÙت Ùˆ آمد بشود Ùˆ جاده‌ها کوبیده بشود Ùˆ این قدر ازین بشودها بشود، تا دل ننه باباها بسوزد Ùˆ برای این‌که راه بچه‌هاشان را کوتاه بکنند، بیایند همان اطرا٠مدرسه را بخرند Ùˆ خانه بسازند Ùˆ زمین یارو از متری یک عباسی بشود صد تومان. یارو اسمش را هم روی دیوار مدرسه کاشی‌کاری کرده بود. هنوز در Ùˆ همسایه پیدا نکرده بودند Ú©Ù‡ حرÙ‌شان بشود Ùˆ لنگ Ùˆ پاچه‌ی سعدی Ùˆ باباطاهر را بکشند میان Ùˆ یک ورق دیگر از تاریخ‌الشعرا را بکوبند روی نبش دیوار کوچه‌شان. تابلوی مدرسه هم حسابی Ùˆ بزرگ Ùˆ خوانا. از صد متری داد می‌زد Ú©Ù‡ توانا بود هر.... هر Ú†Ù‡ دلتان بخواهد! با شیر Ùˆ خورشیدش Ú©Ù‡ آن بالا سر، سه پا ایستاده بود Ùˆ زورکی تعادل خودش را Ø­Ùظ می‌کرد Ùˆ خورشید خانم روی کولش با ابروهای پیوسته Ùˆ قمچیلی Ú©Ù‡ به دست داشت Ùˆ تا سه تیر پرتاب، اطرا٠مدرسه بیابان بود. درندشت Ùˆ بی آب Ùˆ آبادانی Ùˆ آن ته رو به شمال، ردی٠کاج‌های درهم Ùرو رÙته‌ای Ú©Ù‡ از سر دیوار Ú¯Ù„ÛŒ یک باغ پیدا بود روی آسمان لکه‌ی دراز Ùˆ تیره‌ای زده بود. حتماً تا بیست Ùˆ پنج سال دیگر همه‌ی این اطرا٠پر می‌شد Ùˆ بوق ماشین Ùˆ ونگ ونگ بچه‌ها Ùˆ Ùریاد لبویی Ùˆ زنگ روزنامه‌Ùروشی Ùˆ عربده‌ی Ú¯Ù„ به سر دارم خیار! نان یارو توی روغن بود. + +- راستی شاید متری ده دوازده شاهی بیشتر نخریده باشد؟ شاید هم زمین‌ها را همین جوری به ثبت داده باشد؟ هان؟ + +- احمق به توچه؟!... + +بله این Ùکرها را همان روزی کردم Ú©Ù‡ ناشناس به مدرسه سر زدم Ùˆ آخر سر هم به این نتیجه رسیدم Ú©Ù‡ مردم حق دارند جایی بخوابند Ú©Ù‡ آب زیرشان نرود. + +- تو اگر مردی، عرضه داشته باش مدیر همین مدرسه هم بشو. + +Ùˆ رÙته بودم Ùˆ دنبال کار را گرÙته بودم تا رسیده بودم به این‌جا. همان روز وارسی Ùهمیده بودم Ú©Ù‡ مدیر قبلی مدرسه زندانی است. لابد کله‌اش بوی قرمه‌سبزی می‌داده Ùˆ باز لابد حالا دارد Ú©Ùاره‌ی گناهانی را می‌دهد Ú©Ù‡ یا خودش نکرده یا آهنگری در بلخ کرده. جزو پر قیچی‌های رئیس Ùرهنگ هم کسی نبود Ú©Ù‡ با مدیرشان، اضاÙÙ‡ حقوقی نصیبش بشود Ùˆ ناچار سر Ùˆ دستی برای این کار بشکند. خارج از مرکز هم نداشت. این معلومات را توی کارگزینی به دست آورده بودم. هنوز «گه خوردم نامه‌نویسی» هم مد نشده بود Ú©Ù‡ بگویم یارو به این زودی‌ها از سولدونی در خواهد آمد. Ùکر نمی‌کردم Ú©Ù‡ دیگری هم برای این وسط بیابان دلش Ù„Ú© زده باشد با زمستان سختش Ùˆ با رÙت Ùˆ آمد دشوارش. + +این بود Ú©Ù‡ خیالم راحت بود. از همه‌ی این‌ها گذشته کارگزینی Ú©Ù„ مواÙقت کرده بود! دست است Ú©Ù‡ پیش از بلند شدن بوی اسکناس، آن جا هم دو سه تا عیب شرعی Ùˆ عرÙÛŒ گرÙته بودند Ùˆ مثلاً Ú¯Ùته بودن لابد کاسه‌ای زیر نیم کاسه است Ú©Ù‡ Ùلانی یعنی من، با ده سال سابقه‌ی تدریس، می‌خواهد مدیر دبستان بشود! غرض‌شان این بود Ú©Ù‡ لابد خل شدم Ú©Ù‡ از شغل مهم Ùˆ محترم دبیری دست می‌شویم. ماهی صد Ùˆ پنجاه تومان حق مقام در آن روزها پولی نبود Ú©Ù‡ بتوانم نادیده بگیرم. Ùˆ تازه اگر ندیده می‌گرÙتم چه؟ باز باید بر می‌گشتم به این کلاس‌ها Ùˆ این جور حماقت‌ها. این بود Ú©Ù‡ پیش رئیس Ùرهنگ، صا٠برگشتم به کارگزینی Ú©Ù„ØŒ سراغ آن Ú©Ù‡ بÙهمی Ù†Ùهمی، دلال کارم بود. Ùˆ رونویس Ø­Ú©Ù… را گذاشتم Ùˆ Ú¯Ùتم Ú©Ù‡ Ú†Ù‡ طور شد Ùˆ آمدم بیرون. + +دو روز بعد رÙتم سراغش. معلوم شد Ú©Ù‡ حدسم درست بوده است Ùˆ رئیس Ùرهنگ Ú¯Ùته بوده: «من از این لیسانسه‌های پر اÙاده نمی‌خواهم Ú©Ù‡ سیگار به دست توی هر اتاقی سر می‌کنند.» + +Ùˆ یارو برایش Ú¯Ùته بود Ú©Ù‡ اصلاً وابدا..! Ùلانی همچین Ùˆ همچون است Ùˆ مثقالی Ù‡Ùت صنار با دیگران Ùرق دارد Ùˆ این هندوانه‌ها Ùˆ خیال من راحت باشد Ùˆ پنج‌شنبه یک Ù‡Ùته‌ی دیگر خودم بروم پهلوی او... Ùˆ این کار را کردم. این بار رئیس Ùرهنگ جلوی پایم بلند شد Ú©Ù‡: «ای آقا... چرا اول Ù†Ùرمودید؟!...» Ùˆ از کارمندهایش گله کرد Ùˆ به قول خودش، مرا «در جریان موقعیت محل» گذاشت Ùˆ بعد با ماشین خودش مرا به مدرسه رساند Ùˆ Ú¯Ùت زنگ را زودتر از موعد زدند Ùˆ در حضور معلم‌ها Ùˆ ناظم، نطق غرایی در خصائل مدیر جدید – Ú©Ù‡ من باشم – کرد Ùˆ بعد هم مرا گذاشت Ùˆ رÙت با یک مدرسه‌ی شش کلاسه‌ی «نوبنیاد» Ùˆ یک ناظم Ùˆ Ù‡Ùت تا معلم Ùˆ دویست Ùˆ سی Ùˆ پنج تا شاگرد. دیگر حسابی مدیر مدرسه شده بودم! + +ناظم، جوان رشیدی بود Ú©Ù‡ بلند حر٠می‌زد Ùˆ به راحتی امر Ùˆ نهی می‌کرد Ùˆ بیا Ùˆ برویی داشت Ùˆ با شاگردهای درشت، روی هم ریخته بود Ú©Ù‡ خودشان ترتیب کارها را می‌دادند Ùˆ پیدا بود Ú©Ù‡ به سر خر احتیاجی ندارد Ùˆ بی‌مدیر هم می‌تواند گلیم مدرسه را از آب بکشد. معلم کلاس چهار خیلی گنده بود. دو تای یک آدم حسابی. توی دÙتر، اولین چیزی Ú©Ù‡ به چشم می‌آمد. از آن‌هایی Ú©Ù‡ اگر توی Ú©ÙˆÚ†Ù‡ ببینی، خیال می‌کنی مدیر Ú©Ù„ است. Ù„Ùظ قلم حر٠می‌زد Ùˆ شاید به همین دلیل بود Ú©Ù‡ وقتی رئیس Ùرهنگ رÙت Ùˆ تشریÙات را با خودش برد، از طر٠همکارانش تبریک ورود Ú¯Ùت Ùˆ اشاره کرد به اینکه «ان‌شاءالله زیر سایه‌ی سرکار، سال دیگر کلاس‌های دبیرستان را هم خواهیم داشت.» پیدا بود Ú©Ù‡ این هیکل کم‌کم دارد از سر دبستان زیادی می‌کند! وقتی حر٠می‌زد همه‌اش درین Ùکر بودم Ú©Ù‡ با نان آقا معلمی Ú†Ù‡ طور می‌شد چنین هیکلی به هم زد Ùˆ چنین سر Ùˆ تیپی داشت؟ Ùˆ راستش تصمیم گرÙتم Ú©Ù‡ از Ùردا صبح به صبح ریشم را بتراشم Ùˆ یخه‌ام تمیز باشد Ùˆ اتوی شلوارم تیز. + +معلم کلاس اول باریکه‌ای بود، سیاه سوخته. با ته ریشی Ùˆ سر ماشین کرده‌ای Ùˆ یخه‌ی بسته. بی‌کراوات. شبیه میرزابنویس‌های دم پست‌خانه. حتی نوکر باب می‌نمود. Ùˆ من آن روز نتوانستم بÙهمم وقتی حر٠می‌زند کجا را نگاه می‌کند. با هر جیغ کوتاهی Ú©Ù‡ می‌زد هرهر می‌خندید. با این قضیه نمی‌شد کاری کرد. معلم کلاس سه، یک جوان ترکه‌ای بود؛ بلند Ùˆ با صورت استخوانی Ùˆ ریش از ته تراشیده Ùˆ یخه‌ی بلند آهاردار. مثل ÙرÙره می‌جنبید. چشم‌هایش برق عجیبی می‌زد Ú©Ù‡ Ùقط از هوش نبود، چیزی از ناسلامتی در برق چشم‌هایش بود Ú©Ù‡ مرا واداشت از ناظم بپرسم مبادا مسلول باشد. البته مسلول نبود، تنها بود Ùˆ در دانشگاه درس می‌خواند. کلاس‌های پنجم Ùˆ ششم را دو Ù†Ùر با هم اداره می‌کردند. یکی Ùارسی Ùˆ شرعیات Ùˆ تاریخ، جغراÙÛŒ Ùˆ کاردستی Ùˆ این جور سرگرمی‌ها را می‌گÙت، Ú©Ù‡ جوانکی بود بریانتین زده، با شلوار پاچه تنگ Ùˆ پوشت Ùˆ کراوات زرد Ùˆ پهنی Ú©Ù‡ نعش یک لنگر بزرگ آن را روی سینه‌اش Ù†Ú¯Ù‡ داشته بود Ùˆ دائماً دستش حمایل موهای سرش بود Ùˆ دم به دم توی شیشه‌ها نگاه می‌کرد. Ùˆ آن دیگری Ú©Ù‡ حساب Ùˆ مرابحه Ùˆ چیزهای دیگر می‌گÙت، جوانی بود موقر Ùˆ سنگین مازندرانی به نظر می‌آمد Ùˆ به خودش اطمینان داشت. غیر از این‌ها، یک معلم ورزش هم داشتیم Ú©Ù‡ دو Ù‡Ùته بعد دیدمش Ùˆ اصÙهانی بود Ùˆ از آن قاچاق‌ها. + +رئیس Ùرهنگ Ú©Ù‡ رÙت، گرم Ùˆ نرم از همه‌شان حال Ùˆ احوال پرسیدم. بعد به همه سیگار تعار٠کردم. سراپا همکاری Ùˆ همدردی بود. از کار Ùˆ بار هر کدامشان پرسیدم. Ùقط همان معلم کلاس سه، دانشگاه می‌رÙت. آن Ú©Ù‡ لنگر به سینه انداخته بود، شب‌ها انگلیسی می‌خواند Ú©Ù‡ برود آمریکا. چای Ùˆ بساطی در کار نبود Ùˆ ربع ساعت‌های تÙریح، Ùقط توی دÙتر جمع می‌شدند Ùˆ دوباره از نو. Ùˆ این نمی‌شد. باید همه‌ی سنن را رعایت کرد. دست کردم Ùˆ یک پنج تومانی روی میز گذاشتم Ùˆ قرار شد قبل Ùˆ منقلی تهیه کنند Ùˆ خودشان چای را راه بیندازند. + +بعد از زنگ قرار شد من سر ص٠نطقی بکنم. ناظم قضیه را در دو سه کلمه برای بچه‌ها Ú¯Ùت Ú©Ù‡ من رسیدم Ùˆ همه دست زدند. چیزی نداشتم برایشان بگویم. Ùقط یادم است اشاره‌ای به این کردم Ú©Ù‡ مدیر خیلی دلش می‌خواست یکی از شما را به جای Ùرزند داشته باشد Ùˆ حالا نمی‌داند با این همه Ùرزند Ú†Ù‡ بکند؟! Ú©Ù‡ بی‌صدا خندیدند Ùˆ در میان صÙ‌های عقب یکی Ù¾Ú©ÛŒ زد به خنده. واهمه برم داشت Ú©Ù‡ «نه بابا. کار ساده‌ای هم نیست!» قبلاً Ùکر کرده بودم Ú©Ù‡ می‌روم Ùˆ Ùارغ از دردسر اداره‌ی کلاس، در اتاق را روی خودم می‌بندم Ùˆ کار خودم را می‌کنم. اما حالا می‌دیدم به این سادگی‌ها هم نیست. اگر Ùردا یکی‌شان زد سر اون یکی را شکست، اگر یکی زیر ماشین رÙت؛ اگر یکی از ایوان اÙتاد؛ Ú†Ù‡ خاکی به سرم خواهم ریخت؟ + +حالا من مانده بودم Ùˆ ناظم Ú©Ù‡ چیزی از لای در آهسته خزید تو. کسی بود؛ Ùراش مدرسه با قیاÙه‌ای دهاتی Ùˆ ریش نتراشیده Ùˆ قدی کوتاه Ùˆ گشاد گشاد راه می‌رÙت Ùˆ دست‌هایش را دور از بدن Ù†Ú¯Ù‡ می‌داشت. آمد Ùˆ همان کنار در ایستاد. صا٠توی چشمم نگاه می‌کرد. حال او را هم پرسیدم. هر Ú†Ù‡ بود او هم می‌توانست یک گوشه‌ی این بار را بگیرد. در یک دقیقه همه‌ی درد دل‌هایش را کرد Ùˆ التماس دعاهایش Ú©Ù‡ تمام شد، Ùرستادمش برایم چای درست کند Ùˆ بیاورد. بعد از آن من به ناظم پرداختم. سال پیش، از دانشسرای مقدماتی در آمده بود. یک سال گرمسار Ùˆ کرج کار کرده بود Ùˆ امسال آمده بود این‌جا. پدرش دو تا زن داشته. از اولی دو تا پسر Ú©Ù‡ هر دو تا چاقوکش از آب در آمده‌اند Ùˆ از دومی Ùقط او مانده بود Ú©Ù‡ درس‌خوان شده Ùˆ سرشناس Ùˆ نان مادرش را می‌دهد Ú©Ù‡ مریض است Ùˆ از پدر سال‌هاست Ú©Ù‡ خبری نیست Ùˆ... یک اتاق گرÙته‌اند به پنجاه تومان Ùˆ صد Ùˆ پنجاه تومان حقوق به جایی نمی‌رسد Ùˆ تازه زور Ú©Ù‡ بزند سه سال دیگر می‌تواند از حق ÙÙ†ÛŒ نظامت مدرسه استÙاده کند + +... بعد بلند شدیم Ú©Ù‡ به کلاس‌ها سرکشی کنیم. بعد با ناظم به تک تک کلاس‌ها سر زدیم در این میان من به یاد دوران دبستان خودم اÙتادم. در کلاس ششم را باز کردیم «... ت بی پدرو مادر» جوانک بریانتین زده خورد توی صورت‌مان. یکی از بچه‌ها صورتش مثل چغندر قرمز بود. لابد بزک Ùحش هنوز باقی بود. قرائت Ùارسی داشتند. معلم دستهایش توی جیبش بود Ùˆ سینه‌اش را پیش داده بود Ùˆ زبان به شکایت باز کرد: + +- آقای مدیر! اصلاً دوستی سرشون نمی‌شه. تو سَری می‌خوان. ملاحظه کنید بنده با Ú†Ù‡ صمیمیتی... + +حرÙØ´ را در تشدید «ایت» بریدم Ú©Ù‡: + +- صحیح می‌Ùرمایید. این بار به من ببخشید. + +Ùˆ از در آمدیم بیرون. بعد از آن به اطاقی Ú©Ù‡ در آینده مال من بود سر زدیم. بهتر از این نمی‌شد. بی سر Ùˆ صدا، Ø¢Ùتاب‌رو، دور اÙتاده. + +وسط حیاط، یک حوض بزرگ بود Ùˆ کم‌عمق. تنها قسمت ساختمان بود Ú©Ù‡ رعایت حال بچه‌های قد Ùˆ نیم قد در آن شده بود. دور حیاط دیوار بلندی بود درست مثل دیوار چین. سد مرتÙعی در مقابل Ùرار احتمالی Ùرهنگ Ùˆ ته حیاط مستراح Ùˆ اتاق Ùراش بغلش Ùˆ انبار زغال Ùˆ بعد هم یک کلاس. به مستراح هم سر کشیدیم. همه بی در Ùˆ سق٠و تیغه‌ای میان آن‌ها. نگاهی به ناظم کردم Ú©Ù‡ پا به پایم می‌آمد. Ú¯Ùت: + +- دردسر عجیبی شده آقا. تا حالا صد تا کاغذ به ادارÙردا صبح رÙتم مدرسه. بچه‌ها با صÙ‌هاشان به طر٠کلاس‌ها می‌رÙتند Ùˆ ناظم چوب به دست توی ایوان ایستاده بود Ùˆ توی دÙتر دو تا از معلم‌ها بودند. معلوم شد کار هر روزه‌شان است. ناظم را هم Ùرستادم سر یک کلاس دیگر Ùˆ خودم آمدم دم در مدرسه به قدم زدن؛ Ùکر کردم از هر طر٠که بیایند مرا این ته، دم در مدرسه خواهند دید Ùˆ تمام طول راه در این خجالت خواهند ماند Ùˆ دیگر دیر نخواهند آمد. یک سیاهی از ته جاده‌ی جنوبی پیداشد. جوانک بریانتین زده بود. مسلماً او هم مرا می‌دید، ولی آهسته‌تر از آن می‌آمد Ú©Ù‡ یک معلم تأخیر کرده جلوی مدیرش می‌آمد. جلوتر Ú©Ù‡ آمد حتی شنیدم Ú©Ù‡ سوت می‌زد. اما بی‌انصا٠چنان سلانه سلانه می‌آمد Ú©Ù‡ دیدم هیچ جای گذشت نیست. اصلاً محل سگ به من نمی‌گذاشت. داشتم از کوره در می‌رÙتم Ú©Ù‡ یک مرتبه احساس کردم تغییری در رÙتار خود داد Ùˆ تند کرد. + +به خیر گذشت Ùˆ گرنه خدا عالم است Ú†Ù‡ اتÙاقی می‌اÙتاد. سلام Ú©Ù‡ کرد مثل این Ú©Ù‡ می‌خواست چیزی بگوید Ú©Ù‡ پیش دستی کردم: + +- بÙرمایید آقا. بÙرمایید، بچه‌ها منتظرند. + +واقعاً به خیر گذشت. شاید اتوبوسش دیر کرده. شاید راه‌بندان بوده؛ جاده قرق بوده Ùˆ باز یک گردن‌کلÙتی از اقصای عالم می‌آمده Ú©Ù‡ ازین سÙره‌ی مرتضی علی بی‌نصیب نماند. به هر صورت در دل بخشیدمش. Ú†Ù‡ خوب شد Ú©Ù‡ بد Ùˆ بی‌راهی Ù†Ú¯Ùتی! Ú©Ù‡ از دور علم اÙراشته‌ی هیکل معلم کلاس چهارم نمایان شد. از همان ته مرا دیده بود. تقریباً می‌دوید. تحمل این یکی را نداشتم. «بدکاری می‌کنی. اول بسم‌الله Ùˆ مته به خشخاش!» رÙتم Ùˆ توی دÙتر نشستم Ùˆ خودم را به کاری مشغول کردم Ú©Ù‡ هن هن کنان رسید. چنان عرق از پیشانی‌اش می‌ریخت Ú©Ù‡ راستی خجالت کشیدم. یک لیوان آب از کوه به دستش دادم Ùˆ مسخ‌شده‌ی خنده‌اش را با آب به خوردش دادم Ùˆ بلند Ú©Ù‡ شد برود، Ú¯Ùتم: + +- عوضش دو کیلو لاغر شدید. + +برگشت نگاهی کرد Ùˆ خنده‌ای Ùˆ رÙت. ناگهان ناظم از در وارد شد Ùˆ از را Ù‡ نرسیده Ú¯Ùت: + +- دیدید آقا! این جوری می‌آند مدرسه. اون قرتی Ú©Ù‡ عین خیالش هم نبود آقا! اما این یکی... + +از او پرسیدم: + +- انگار هنوز دو تا از کلاس‌ها ولند؟ + +- بله آقا. کلاس سه ورزش دارند. Ú¯Ùتم بنشینند دیکته بنویسند آقا. معلم حساب پنج Ùˆ شش هم Ú©Ù‡ نیومده آقا. + +در همین حین یکی از عکس‌های بزرگ دخمه‌های هخامنشی را Ú©Ù‡ به دیوار کوبیده بود پس زد Ùˆ: + +- نگاه کنید آقا... + +روی Ú¯Ú† دیوار با مداد قرمز Ùˆ نه چندان درشت، به عجله Ùˆ ناشیانه علامت داس کشیده بودند. همچنین دنبال کرد: + +- از آثار دوره‌ی اوناست آقا. کارشون همین چیزها بود. روزنومه بÙروشند. تبلیغات کنند Ùˆ داس Ú†Ú©Ø´ بکشند آقا. رئیس‌شون رو Ú©Ù‡ گرÙتند Ú†Ù‡ جونی کندم آقا تا حالی‌شون کنم Ú©Ù‡ دست ور دارند آقا. Ùˆ از روی میز پرید پایین. + +- Ú¯Ùتم Ù…Ú¯Ù‡ باز هم هستند؟ + +- آره آقا، پس Ú†ÛŒ! یکی همین آقازاده Ú©Ù‡ هنوز نیومده آقا. هر روز نیم ساعت تأخیر داره آقا. یکی هم مثل کلاس سه. + +- خوب چرا تا حالا پاکش نکردی؟ + +- به! آخه آدم درد دلشو واسه‌ی Ú©ÛŒ بگه؟ آخه آقا در میان تو روی آدم می‌گند جاسوس، مأمور! باهاش حرÙÙ… شده آقا. کتک Ùˆ کتک‌کاری! + +Ùˆ بعد یک سخنرانی Ú©Ù‡ Ú†Ù‡ طور مدرسه را خراب کرده‌اند Ùˆ اعتماد اهل محله را Ú†Ù‡ طور از بین برده‌اند Ú©Ù‡ نه انجمنی، نه Ú©Ù…Ú©ÛŒ به بی‌بضاعت‌ها؛ Ùˆ از این حر٠ها. + +بعد از سخنرانی آقای ناظم دستمالم را دادم Ú©Ù‡ آن عکس‌ها را پاک کند Ùˆ بعد هم راه اÙتادم Ú©Ù‡ بروم سراغ اتاق خودم. در اتاقم را Ú©Ù‡ باز کردم، داشتم دماغم با بوی خاک نم کشیده‌اش اخت می‌کرد Ú©Ù‡ آخرین معلم هم آمد. آمدم توی ایوان Ùˆ با صدای بلند، جوری Ú©Ù‡ در تمام مدرسه بشنوند، ناظم را صدا زدم Ùˆ Ú¯Ùتم با قلم قرمز برای آقا یک ساعت تأخیر بگذارند.ه‌ی ساختمان نوشتیم آقا. می‌گند نمی‌شه پول دولت رو تو ملک دیگرون خرج کرد. + +- Ú¯Ùتم راست می‌گند. + +دیگه کاÙÛŒ بود. آمدیم بیرون. همان توی حیاط تا Ù†Ùسی تازه کنیم وضع مالی Ùˆ بودجه Ùˆ ازین حرÙ‌های مدرسه را پرسیدم. هر اتاق ماهی پانزده ریال حق نظاÙت داشت. لوازم‌التحریر Ùˆ دÙترها را هم اداره‌ی Ùرهنگ می‌داد. ماهی بیست Ùˆ پنج تومان هم برای آب خوردن داشتند Ú©Ù‡ هنوز وصول نشده بود. برای نصب هر بخاری سالی سه تومان. ماهی سی تومان هم تنخواه‌گردان مدرسه بود Ú©Ù‡ مثل پول آب سوخت شده بود Ùˆ حالا هم ماه دوم سال بود. اواخر آبان. حالیش کردم Ú©Ù‡ حوصله‌ی این کارها را ندارم Ùˆ غرضم را از مدیر شدن برایش خلاصه کردم Ùˆ Ú¯Ùتم حاضرم همه‌ی اختیارات را به او بدهم. «اصلاً انگار Ú©Ù‡ هنوز مدیر نیامده.» مهر مدرسه هم پهلوی خودش باشد. البته او را هنوز نمی‌شناختم. شنیده بودم Ú©Ù‡ مدیرها قبلاً ناظم خودشان را انتخاب می‌کنند، اما من نه کسی را سراغ داشتم Ùˆ نه حوصله‌اش را. Ø­Ú©Ù… خودم را هم به زور گرÙته بودم. سنگ‌هامان را وا کندیم Ùˆ به دÙتر رÙتیم Ùˆ چایی را Ú©Ù‡ Ùراش از بساط خانه‌اش درست کرده بود، خوردیم تا زنگ را زدند Ùˆ باز هم زدند Ùˆ من نگاهی به پرونده‌های شاگردها کردم Ú©Ù‡ هر کدام عبارت بود از دو برگ کاغذ. از همین دو سه برگ کاغذ دانستم Ú©Ù‡ اولیای بچه‌ها اغلب زارع Ùˆ باغبان Ùˆ اویارند Ùˆ قبل از این‌که زنگ آخر را بزنند Ùˆ مدرسه تعطیل بشود بیرون آمدم. برای روز اول خیلی زیاد بود. + +Ùردا صبح رÙتم مدرسه. بچه‌ها با صÙ‌هاشان به طر٠کلاس‌ها می‌رÙتند Ùˆ ناظم چوب به دست توی ایوان ایستاده بود Ùˆ توی دÙتر دو تا از معلم‌ها بودند. معلوم شد کار هر روزه‌شان است. ناظم را هم Ùرستادم سر یک کلاس دیگر Ùˆ خودم آمدم دم در مدرسه به قدم زدن؛ Ùکر کردم از هر طر٠که بیایند مرا این ته، دم در مدرسه خواهند دید Ùˆ تمام طول راه در این خجالت خواهند ماند Ùˆ دیگر دیر نخواهند آمد. یک سیاهی از ته جاده‌ی جنوبی پیداشد. جوانک بریانتین زده بود. مسلماً او هم مرا می‌دید، ولی آهسته‌تر از آن می‌آمد Ú©Ù‡ یک معلم تأخیر کرده جلوی مدیرش می‌آمد. جلوتر Ú©Ù‡ آمد حتی شنیدم Ú©Ù‡ سوت می‌زد. اما بی‌انصا٠چنان سلانه سلانه می‌آمد Ú©Ù‡ دیدم هیچ جای گذشت نیست. اصلاً محل سگ به من نمی‌گذاشت. داشتم از کوره در می‌رÙتم Ú©Ù‡ یک مرتبه احساس کردم تغییری در رÙتار خود داد Ùˆ تند کرد. + +به خیر گذشت Ùˆ گرنه خدا عالم است Ú†Ù‡ اتÙاقی می‌اÙتاد. سلام Ú©Ù‡ کرد مثل این Ú©Ù‡ می‌خواست چیزی بگوید Ú©Ù‡ پیش دستی کردم: + +- بÙرمایید آقا. بÙرمایید، بچه‌ها منتظرند. + +واقعاً به خیر گذشت. شاید اتوبوسش دیر کرده. شاید راه‌بندان بوده؛ جاده قرق بوده Ùˆ باز یک گردن‌کلÙتی از اقصای عالم می‌آمده Ú©Ù‡ ازین سÙره‌ی مرتضی علی بی‌نصیب نماند. به هر صورت در دل بخشیدمش. Ú†Ù‡ خوب شد Ú©Ù‡ بد Ùˆ بی‌راهی Ù†Ú¯Ùتی! Ú©Ù‡ از دور علم اÙراشته‌ی هیکل معلم کلاس چهارم نمایان شد. از همان ته مرا دیده بود. تقریباً می‌دوید. تحمل این یکی را نداشتم. «بدکاری می‌کنی. اول بسم‌الله Ùˆ مته به خشخاش!» رÙتم Ùˆ توی دÙتر نشستم Ùˆ خودم را به کاری مشغول کردم Ú©Ù‡ هن هن کنان رسید. چنان عرق از پیشانی‌اش می‌ریخت Ú©Ù‡ راستی خجالت کشیدم. یک لیوان آب از کوه به دستش دادم Ùˆ مسخ‌شده‌ی خنده‌اش را با آب به خوردش دادم Ùˆ بلند Ú©Ù‡ شد برود، Ú¯Ùتم: + +- عوضش دو کیلو لاغر شدید. + +برگشت نگاهی کرد Ùˆ خنده‌ای Ùˆ رÙت. ناگهان ناظم از در وارد شد Ùˆ از را Ù‡ نرسیده Ú¯Ùت: + +- دیدید آقا! این جوری می‌آند مدرسه. اون قرتی Ú©Ù‡ عین خیالش هم نبود آقا! اما این یکی... + +از او پرسیدم: + +- انگار هنوز دو تا از کلاس‌ها ولند؟ + +- بله آقا. کلاس سه ورزش دارند. Ú¯Ùتم بنشینند دیکته بنویسند آقا. معلم حساب پنج Ùˆ شش هم Ú©Ù‡ نیومده آقا. + +در همین حین یکی از عکس‌های بزرگ دخمه‌های هخامنشی را Ú©Ù‡ به دیوار کوبیده بود پس زد Ùˆ: + +- نگاه کنید آقا... + +روی Ú¯Ú† دیوار با مداد قرمز Ùˆ نه چندان درشت، به عجله Ùˆ ناشیانه علامت داس کشیده بودند. همچنین دنبال کرد: + +- از آثار دوره‌ی اوناست آقا. کارشون همین چیزها بود. روزنومه بÙروشند. تبلیغات کنند Ùˆ داس Ú†Ú©Ø´ بکشند آقا. رئیس‌شون رو Ú©Ù‡ گرÙتند Ú†Ù‡ جونی کندم آقا تا حالی‌شون کنم Ú©Ù‡ دست ور دارند آقا. Ùˆ از روی میز پرید پایین. + +- Ú¯Ùتم Ù…Ú¯Ù‡ باز هم هستند؟ + +- آره آقا، پس Ú†ÛŒ! یکی همین آقازاده Ú©Ù‡ هنوز نیومده آقا. هر روز نیم ساعت تأخیر داره آقا. یکی هم مثل کلاس سه. + +- خوب چرا تا حالا پاکش نکردی؟ + +- به! آخه آدم درد دلشو واسه‌ی Ú©ÛŒ بگه؟ آخه آقا در میان تو روی آدم می‌گند جاسوس، مأمور! باهاش حرÙÙ… شده آقا. کتک Ùˆ کتک‌کاری! + +Ùˆ بعد یک سخنرانی Ú©Ù‡ Ú†Ù‡ طور مدرسه را خراب کرده‌اند Ùˆ اعتماد اهل محله را Ú†Ù‡ طور از بین برده‌اند Ú©Ù‡ نه انجمنی، نه Ú©Ù…Ú©ÛŒ به بی‌بضاعت‌ها؛ Ùˆ از این حر٠ها. + +بعد از سخنرانی آقای ناظم دستمالم را دادم Ú©Ù‡ آن عکس‌ها را پاک کند Ùˆ بعد هم راه اÙتادم Ú©Ù‡ بروم سراغ اتاق خودم. در اتاقم را Ú©Ù‡ باز کردم، داشتم دماغم با بوی خاک نم کشیده‌اش اخت می‌کرد Ú©Ù‡ آخرین معلم هم آمد. آمدم توی ایوان Ùˆ با صدای بلند، جوری Ú©Ù‡ در تمام مدرسه بشنوند، ناظم را صدا زدم Ùˆ Ú¯Ùتم با قلم قرمز برای آقا یک ساعت تأخیر بگذارند. + +روز سوم باز اول وقت مدرسه بودم. هنوز از پشت دیوار نپیچیده بودم Ú©Ù‡ صدای سوز Ùˆ بریز بچه‌ها به پیشبازم آمد. تند کردم. پنج تا از بچه‌ها توی ایوان به خودشان می‌پیچیدند Ùˆ ناظم ترکه‌ای به دست داشت Ùˆ به نوبت به ک٠دست‌شان می‌زد. بچه‌ها التماس می‌کردند؛ گریه می‌کردند؛ اما دستشان را هم دراز می‌کردند. نزدیک بود داد بزنم یا با لگد بزنم Ùˆ ناظم را پرت کنم آن طرÙ. پشتش به من بود Ùˆ من را نمی‌دید. ناگهان زمزمه‌ای توی صÙ‌ها اÙتاد Ú©Ù‡ یک مرتبه مرا به صراÙت انداخت Ú©Ù‡ در مقام مدیریت مدرسه، به سختی می‌شود ناظم را کتک زد. این بود Ú©Ù‡ خشمم را Ùرو خوردم Ùˆ آرام از پله‌ها رÙتم بالا. ناظم، تازه متوجه من شده بود در همین حین دخالتم را کردم Ùˆ خواهش کردم این بار همه‌شان را به من ببخشند. + +نمی‌دانم Ú†Ù‡ کار خطایی از آنها سر زده بود Ú©Ù‡ ناظم را تا این حد عصبانی کرده بود. بچه‌ها سکسکه‌کنان رÙتند توی صÙ‌ها Ùˆ بعد زنگ را زدند Ùˆ صÙ‌ها رÙتند به کلاس‌ها Ùˆ دنبالشان هم معلم‌ها Ú©Ù‡ همه سر وقت حاضر بودند. نگاهی به ناظم انداختم Ú©Ù‡ تازه حالش سر جا آمده بود Ùˆ Ú¯Ùتم در آن حالی Ú©Ù‡ داشت، ممکن بود گردن یک کدامشان را بشکند. Ú©Ù‡ مرتبه براق شد: + +- اگه یک روز جلوشونو نگیرید سوارتون می‌شند آقا. نمی‌دونید Ú†Ù‡ قاطرهای چموشی شده‌اند آقا. + +مثل بچه مدرسه‌ای‌ها آقا آقا می‌کرد. موضوع را برگرداندم Ùˆ احوال مادرش را پرسیدم. خنده، صورتش را از هم باز کرد Ùˆ صدا زد Ùراش برایش آب بیاورد. یادم هست آن روز نیم ساعتی برای آقای ناظم صحبت کردم. پیرانه. Ùˆ او جوان بود Ùˆ زود می‌شد رامش کرد. بعد ازش خواستم Ú©Ù‡ ترکه‌ها را بشکند Ùˆ آن وقت من رÙتم سراغ اتاق خودم. + +در همان Ù‡Ùته‌ی اول به کارها وارد شدم. Ùردای زمستان Ùˆ نه تا بخاری زغال سنگی Ùˆ روزی چهار بار آب آوردن Ùˆ آب Ùˆ جاروی اتاق‌ها با یک Ùراش جور در نمی‌آید. یک Ùراش دیگر از اداره ÛŒ Ùرهنگ خواستم Ú©Ù‡ هر روز منتظر ورودش بودیم. بعد از ظهرها را نمی‌رÙتم. روزهای اول با دست Ùˆ دل لرزان، ولی سه چهار روزه جرأت پیدا کردم. احساس می‌کردم Ú©Ù‡ مدرسه زیاد هم محض خاطر من نمی‌گردد. کلاس اول هم یکسره بود Ùˆ به خاطر بچه‌های جغله دلهره‌ای نداشتم. در بیابان‌های اطرا٠مدرسه هم ماشینی آمد Ùˆ رÙت نداشت Ùˆ گرچه پست Ùˆ بلند بود اما به هر صورت از حیاط مدرسه Ú©Ù‡ بزرگ‌تر بود. معلم ها هم، هر بعد از ظهری دو تاشان به نوبت می‌رÙتند یک جوری باهم کنار آمده بودند. Ùˆ ترسی هم از این نبود Ú©Ù‡ بچه‌ها از علم Ùˆ Ùرهنگ ثقل سرد بکنند. یک روز هم بازرس آمد Ùˆ نیم ساعتی پیزر لای پالان هم گذاشتیم Ùˆ چای Ùˆ احترامات متقابل! Ùˆ در دÙتر بازرسی تصدیق کرد Ú©Ù‡ مدرسه «با وجود عدم وسایل» بسیار خوب اداره می‌شود. + +بچه‌ها مدام در مدرسه زمین می‌خوردند، بازی می‌کردند، زمین می‌خوردند. مثل اینکه تاتوله خورده بودند. ساده‌ترین Ø´Ú©Ù„ بازی‌هایشان در ربع ساعت‌های تÙریح، دعوا بود. Ùکر می‌کردم علت این همه زمین خوردن شاید این باشد Ú©Ù‡ بیش‌ترشان Ú©ÙØ´ حسابی ندارند. آن‌ها هم Ú©Ù‡ داشتند، بچه‌ننه بودند Ùˆ بلد نبودند بدوند Ùˆ حتی راه بروند. این بود Ú©Ù‡ روزی دو سه بار، دست Ùˆ پایی خراش بر می‌داشت. پرونده‌ی برق Ùˆ تلÙÙ† مدرسه را از بایگانی بسیار محقر مدرسه بیرون کشیده بودم Ùˆ خوانده بودم. اگر یک خرده می‌دویدی تا دو سه سال دیگر هم برق مدرسه درست می‌شد Ùˆ هم تلÙنش. دوباره سری به اداره ساختمان زدم Ùˆ موضوع را تازه کردم Ùˆ به رÙقایی Ú©Ù‡ دورادور در اداره‌ی برق Ùˆ تلÙÙ† داشتم، یکی دو بار رو انداختم Ú©Ù‡ اول خیال می‌کردند کار خودم را می‌خواهم به اسم مدرسه راه بیندازم Ùˆ ناچار رها کردم. این قدر بود Ú©Ù‡ ادای وظیÙه‌ای می‌کرد. مدرسه آب نداشت. نه آب خوراکی Ùˆ نه آب جاری. با هرزاب بهاره، آب انبار زیر حوض را می‌انباشتند Ú©Ù‡ تلمبه‌ای سرش بود Ùˆ حوض را با همان پر می‌کردند Ùˆ خود بچه‌ها. اما برای آب خوردن دو تا منبع صد لیتری داشتیم از آهن سÙید Ú©Ù‡ مثل امامزاده‌ای یا سقاخانه‌ای دو قلو، روی چهار پایه کنار حیاط بود Ùˆ روزی دو بار پر Ùˆ خالی می‌شد. این آب را از همان باغی می‌آوردیم Ú©Ù‡ ردی٠کاج‌هایش روی آسمان، لکه‌ی دراز سیاه انداخته بود. البته Ùراش می‌آورد. با یک سطل بزرگ Ùˆ یک آب‌پاش Ú©Ù‡ سوراخ بود Ùˆ تا به مدرسه می‌رسید، نص٠شده بود. هر دو را از جیب خودم دادم تعمیر کردند. + +یک روز هم مالک مدرسه آمد. پیرمردی موقر Ùˆ سنگین Ú©Ù‡ خیال می‌کرد برای سرکشی به خانه‌ی مستأجرنشینش آمده. از در وارد نشده Ùریادش بلند شد Ùˆ Ùحش را کشید به Ùراش Ùˆ به Ùرهنگ Ú©Ù‡ چرا بچه‌ها دیوار مدرسه را با زغال سیاه کرده‌اند واز همین توپ Ùˆ تشرش شناختمش. Ú©Ù„ÛŒ با او صحبت کردیم البته او دو برابر سن من را داشت. برایش چای هم آوردیم Ùˆ با معلم‌ها آشنا شد Ùˆ قول‌ها داد Ùˆ رÙت. کنه‌ای بود. درست یک پیرمرد. یک ساعت Ùˆ نیم درست نشست. ماهی یک بار هم این برنامه را داشتند Ú©Ù‡ بایست پیه‌اش را به تن می‌مالیدم. + +اما معلم‌ها. هر کدام یک ابلاغ بیست Ùˆ چهار ساعته در دست داشتند، ولی در برنامه به هر کدام‌شان بیست ساعت درس بیشتر نرسیده بود. Ú©Ù… Ú©Ù… قرار شد Ú©Ù‡ یک معلم از Ùرهنگ بخواهیم Ùˆ به هر کدام‌شان هجده ساعت درس بدهیم، به شرط آن‌که هیچ بعد از ظهری مدرسه تعطیل نباشد. حتی آن Ú©Ù‡ دانشگاه می‌رÙت می‌توانست با Ù‡Ùته‌ای هجده ساعت درس بسازد. Ùˆ دشوارترین کار همین بود Ú©Ù‡ با کدخدامنشی حل شد Ùˆ من یک معلم دیگر از Ùرهنگ خواستم. + +اواخر Ù‡Ùته‌ی دوم، Ùراش جدید آمد. مرد پنجاه ساله‌ای باریک Ùˆ زبر Ùˆ زرنگ Ú©Ù‡ شب‌کلاه می‌گذاشت Ùˆ لباس آبی می‌پوشید Ùˆ تسبیح می‌گرداند Ùˆ از هر کاری سر رشته داشت. آب خوردن را نوبتی می‌آوردند. مدرسه تر Ùˆ تمیز شد Ùˆ رونقی گرÙت. Ùراش جدید سرش توی حساب بود. هر دو مستخدم با هم تمام بخاری‌ها را راه انداختند Ùˆ یک کارگر هم برای Ú©Ù…Ú© به آن‌ها آمد. Ùراش قدیمی را چهار روز پشت سر هم، سر ظهر می‌Ùرستادیم اداره‌ی Ùرهنگ Ùˆ هر آن منتظر زغال بودیم. هنوز یک Ù‡Ùته از آمدن Ùراش جدید نگذشته بود Ú©Ù‡ صدای همه‌ی معلم‌ها در آمده بود. نه به هیچ کدامشان سلام می‌کرد Ùˆ نه به دنبال خرده Ùرمایش‌هایشان می‌رÙت. درست است Ú©Ù‡ به من سلام می‌کرد، اما معلم‌ها هم، لابد هر کدام در حدود من صاحب Ùضایل Ùˆ عنوان Ùˆ معلومات بودند Ú©Ù‡ از یک Ùراش مدرسه توقع سلام داشته باشند. اما انگار نه انگار. + +بدتر از همه این Ú©Ù‡ سر خر معلم‌ها بود. من Ú©Ù‡ از همان اول، خرجم را سوا کرده بودم Ùˆ آن‌ها را آزاد گذاشته بودم Ú©Ù‡ در مواقع بیکاری در دÙتر را روی خودشان ببندند Ùˆ هر Ú†Ù‡ می‌خواهند بگویند Ùˆ هر کاری می‌خواهند بکنند. اما او در Ùاصله‌ی ساعات درس، همچه Ú©Ù‡ معلم‌ها می‌آمدند، می‌آمد توی دÙتر Ùˆ همین طوری گوشه‌ی اتاق می‌ایستاد Ùˆ معلم‌ها کلاÙÙ‡ می‌شدند. نه می‌توانستند شلکلک‌های معلمی‌شان را در حضور او کنار بگذارند Ùˆ نه جرأت می‌کردند به او چیزی بگویند. بدزبان بود Ùˆ از عهده‌ی همه‌شان بر می‌آمد. یکی دوبار دنبال نخود سیاه Ùرستاده بودندش. اما زرنگ بود Ùˆ Ùوری کار را انجام می‌داد Ùˆ بر می‌گشت. حسابی موی دماغ شده بود. ده سال تجربه این حداقل را به من آموخته بود Ú©Ù‡ اگر معلم‌ها در ربع ساعت‌های تÙریح نتوانند بخندند، سر کلاس، بچه‌های مردم را کتک خواهند زد. این بود Ú©Ù‡ دخالت کردم. یک روز Ùراش جدید را صدا زدم. اول حال Ùˆ احوالپرسی Ùˆ بعد چند سال سابقه دارد Ùˆ چند تا بچه Ùˆ Ú†Ù‡ قدر می‌گیرد... Ú©Ù‡ قضیه حل شد. سی صد Ùˆ خرده‌ای حقوق می‌گرÙت. با بیست Ùˆ پنج سال سابقه. کار از همین جا خراب بود. پیدا بود Ú©Ù‡ معلم‌ها حق دارند او را غریبه بدانند. نه دیپلمی، نه کاغذپاره‌ای، هر Ú†Ù‡ باشد یک Ùراش Ú©Ù‡ بیشتر نبود! Ùˆ تازه قلدر هم بود Ùˆ حق هم داشت. اول به اشاره Ùˆ کنایه Ùˆ بعد با صراحت بهش Ùهماندم Ú©Ù‡ گر Ú†Ù‡ معلم جماعت اجر دنیایی ندارد، اما از او Ú©Ù‡ آدم متدین Ùˆ Ùهمیده‌ای است بعید است Ùˆ از این حرÙ‌ها... Ú©Ù‡ یک مرتبه پرید توی حرÙÙ… Ú©Ù‡: + +- ای آقا! Ú†Ù‡ می‌Ùرمایید؟ شما نه خودتون این کاره‌اید Ùˆ نه اینارو می‌شناسید. امروز می‌خواند سیگار براشون بخرم، Ùردا می‌Ùرستنم سراغ عرق. من این‌ها رو می‌شناسم. + +راست می‌گÙت. زودتر از همه، او دندان‌های مرا شمرده بود. Ùهمیده بود Ú©Ù‡ در مدرسه هیچ‌کاره‌ام. می‌خواستم کوتاه بیایم، ولی مدیر مدرسه بودن Ùˆ در مقابل یک Ùراش پررو ساکت ماندن!... Ú©Ù‡ خر خر کامیون زغال به دادم رسید. ترمز Ú©Ù‡ کرد Ùˆ صدا خوابید Ú¯Ùتم: + +- این حرÙ‌ها قباحت داره. معلم جماعت کجا پولش به عرق می‌رسه؟ حالا بدو زغال آورده‌اند. + +Ùˆ همین طور Ú©Ù‡ داشت بیرون می‌رÙت، اÙزودم: + +- دو روز دیگه Ú©Ù‡ محتاجت شدند Ùˆ ازت قرض خواستند با هم رÙیق می‌شید. + +Ùˆ آمدم توی ایوان. در بزرگ آهنی مدرسه را باز کرده بودند Ùˆ کامیون آمده بود تو Ùˆ داشتند بارش را جلوی انبار ته حیاط خالی می‌کردند Ùˆ راننده، کاغذی به دست ناظم داد Ú©Ù‡ نگاهی به آن انداخت Ùˆ مرا نشان داد Ú©Ù‡ در ایوان بالا ایستاده بودم Ùˆ Ùرستادش بالا. کاغذش را با سلام به دستم داد. بیجک زغال بود. رسید رسمی اداره‌ی Ùرهنگ بود در سه نسخه Ùˆ روی آن ورقه‌ی ماشین شده‌ی «باسکول» Ú©Ù‡ می‌گÙت کامیون Ùˆ محتویاتش جمعاً دوازده خروار است. اما رسیدهای رسمی اداری Ùرهنگ ساکت بودند. جای مقدار زغالی Ú©Ù‡ تحویل مدرسه داده شده بود، در هر سه نسخه خالی بود. پیدا بود Ú©Ù‡ تحویل گیرنده باید پرشان کند. همین کار را کردم. اوراق را بردم توی اتاق Ùˆ با خودنویسم عدد را روی هر سه ورق نوشتم Ùˆ امضا کردم Ùˆ به دست راننده دادم Ú©Ù‡ راه اÙتاد Ùˆ از همان بالا به ناظم Ú¯Ùتم: + +- اگر مهر هم بایست زد، خودت بزن بابا. + +Ùˆ رÙتم سراغ کارم Ú©Ù‡ ناگهان در باز شد Ùˆ ناظم آمد تو؛ بیجک زغال دستش بود Ùˆ: + +- Ù…Ú¯Ù‡ Ù†Ùهمیدین آقا؟ مخصوصاً جاش رو خالی گذاشته بودند آقا... + +Ù†Ùهمیده بودم. اما اگر هم Ùهمیده بودم، Ùرقی نمی‌کرد Ùˆ به هر صورت از چنین کودنی نا به هنگام از جا در رÙتم Ùˆ به شدت Ú¯Ùتم: + +- خوب؟ + +- هیچ Ú†ÛŒ آقا.... رسم‌شون همینه آقا. اگه باهاشون کنار نیایید کارمونو لنگ می‌گذارند آقا... + +Ú©Ù‡ از جا در رÙتم. به چنین صراحتی مرا Ú©Ù‡ مدیر مدرسه بودم در معامله شرکت می‌داد. Ùˆ Ùریاد زدم: + +- عجب! حالا سرکار برای من تکلی٠هم معین می‌کنید؟... خاک بر سر این Ùرهنگ با مدیرش Ú©Ù‡ من باشم! برو ورقه رو بده دست‌شون، گورشون رو Ú¯Ù… کنند. پدر سوخته‌ها... + +چنان Ùریاد زده بودم Ú©Ù‡ هیچ کس در مدرسه انتظار نداشت. مدیر سر به زیر Ùˆ پا به راهی بودم Ú©Ù‡ از همه خواهش می‌کردم Ùˆ حالا ناظم مدرسه، داشت به من یاد می‌داد Ú©Ù‡ به جای نه خروار زغال مثلا هجده خروار تحویل بگیرم Ùˆ بعد با اداره‌ی Ùرهنگ کنار بیایم. Ù‡ÛŒ Ù‡ÛŒ!.... تا ظهر هیچ کاری نتوانستم بکنم، جز این‌که چند بار متن استعÙانامه‌ام را بنویسم Ùˆ پاره کنم... قدم اول را این جور جلوی پای آدم می‌گذارند. + +بارندگی Ú©Ù‡ شروع شد دستور دادم بخاری‌ها را از Ù‡Ùت صبح بسوزانند. بچه‌ها همیشه زود می‌آمدند. حتی روزهای بارانی. مثل این‌که اول Ø¢Ùتاب از خانه بیرون‌شان می‌کنند. یا ناهارنخورده. خیلی سعی کردم یک روز زودتر از بچه‌ها مدرسه باشم. اما عاقبت نشد Ú©Ù‡ مدرسه را خالی از Ù†Ùس٠به علم‌آلوده‌ی بچه‌ها استنشاق کنم. از راه Ú©Ù‡ می‌رسیدند دور بخاری جمع می‌شدند Ùˆ گیوه‌هاشان را خشک می‌کردند. Ùˆ خیلی زود Ùهمیدم Ú©Ù‡ ظهر در مدرسه ماندن هم مسأله Ú©ÙØ´ بود. هر Ú©Ù‡ داشت نمی‌ماند.این قاعده در مورد معلم‌ها هم صدق می‌کرد اقلاً یک پول واکس جلو بودند. وقتی Ú©Ù‡ باران می‌بارید تمام کوهپایه Ùˆ بدتر از آن تمام حیاط مدرسه Ú¯Ù„ می‌شد. بازی Ùˆ دویدن متوق٠شده بود. مدرسه سوت Ùˆ کور بود. این جا هم مسأله Ú©ÙØ´ بود. چشم اغلبشان هم قرمز بود. پیدا بود باز آن روز صبح یک Ùصل گریه کرده‌اند Ùˆ در خانه‌شان علم صراطی بوده است. + +مدرسه داشت تخته می‌شد. عده‌ی غایب‌های صبح ده برابر شده بود Ùˆ ساعت اول هیچ معلمی نمی‌توانست درس بدهد. دست‌های ورم‌کرده Ùˆ سرمازده کار نمی‌کرد. حتی معلم کلاس اولمان هم می‌دانست Ú©Ù‡ Ùرهنگ Ùˆ معلومات مدارس ما صرÙاً تابع تمرین است. مشق Ùˆ تمرین. ده بار بیست بار. دست یخ‌کرده بیل Ùˆ رنده را هم نمی‌تواند به کار بگیرد Ú©Ù‡ خیلی هم زمخت‌اند Ùˆ دست پر Ú©Ù†. این بود Ú©Ù‡ به Ùکر اÙتادیم. Ùراش جدید واردتر از همه‌ی ما بود. یک روز در اتاق دÙتر، شورامانندی داشتیم Ú©Ù‡ البته او هم بود. خودش را کم‌کم تحمیل کرده بود. Ú¯Ùت حاضر است یکی از دÙم‌کلÙت‌های همسایه‌ی مدرسه را وادارد Ú©Ù‡ شن برایمان بÙرستد به شرط آن Ú©Ù‡ ما هم برویم Ùˆ از انجمن محلی برای بچه‌ها Ú©ÙØ´ Ùˆ لباس بخواهیم. قرار شد خودش قضیه را دنبال کند Ú©Ù‡ Ù‡Ùته‌ی آینده جلسه‌شان کجاست Ùˆ حتی بخواهد Ú©Ù‡ دعوت‌مانندی از ما بکنند. دو روز بعد سه تا کامیون شن آمد. دوتایش را توی حیاط مدرسه، خالی کردیم Ùˆ سومی را دم در مدرسه، Ùˆ خود بچه‌ها نیم ساعته پهنش کردند. با پا Ùˆ بیل Ùˆ هر Ú†Ù‡ Ú©Ù‡ به دست می‌رسید. + +عصر همان روز ما را به انجمن دعوت کردند. خود من Ùˆ ناظم باید می‌رÙتیم. معلم کلاس چهارم را هم با خودمان بردیم. خانه‌ای Ú©Ù‡ محل جلسه‌ی آن شب انجمن بود، درست مثل مدرسه، دور اÙتاده Ùˆ تنها بود. قالی‌ها Ùˆ کناره‌ها را به Ùرهنگ می‌آلودیم Ùˆ می‌رÙتیم. مثل این‌که سه تا سه تا روی هم انداخته بودند. اولی Ú©Ù‡ کثی٠شد دومی. به بالا Ú©Ù‡ رسیدیم یک حاجی آقا در حال نماز خواندن بود. Ùˆ صاحب‌خانه با لهجه‌ی غلیظ یزدی به استقبال‌مان آمد. همراهانم را معرÙÛŒ کردم Ùˆ لابد خودش Ùهمید مدیر کیست. برای ما چای آوردند. سیگارم را چاق کردم Ùˆ با صاحب‌خانه از قالی‌هایش حر٠زدیم. ناظم به بچه‌هایی می‌ماند Ú©Ù‡ در مجلس بزرگترها خوابشان می‌گیرد Ùˆ دل‌شان هم نمی‌خواست دست به سر شوند. سر اعضای انجمن باز شده بود. حاجی آقا صندوقدار بود. من Ùˆ ناظم عین دو Ø·Ùلان مسلم بودیم Ùˆ معلم کلاس چهارم عین خولی وسطمان نشسته. اغلب اعضای انجمن به زبان محلی صحبت می‌کردند Ùˆ رÙتار ناشی داشتند. حتی یک کدامشان نمی‌دانستند Ú©Ù‡ دست Ùˆ پاهای خود را Ú†Ù‡ جور ضبط Ùˆ ربط کنند. بلند بلند حر٠می‌زدند. درست مثل این‌که وزارتخانه‌ی دواب سه تا حیوان تازه برای باغ وحش محله‌شان وارد کرده. جلسه Ú©Ù‡ رسمی شد، صاحبخانه معرÙی‌مان کرد Ùˆ شروع کردند. مدام از خودشان صحبت می‌کردند از این‌که دزد دیشب Ùلان جا را گرÙته Ùˆ باید درخواست پاسبان شبانه کنیم Ùˆ... + +همین طور یک ساعت حر٠زدند Ùˆ به مهام امور رسیدگی کردند Ùˆ من Ùˆ معلم کلاس چهارم سیگار کشیدیم. انگار نه انگار Ú©Ù‡ ما هم بودیم. نوکرشان Ú©Ù‡ آمد استکان‌ها را جمع کند، چیزی روی جلد اشنو نوشتم Ùˆ برای صاحبخانه Ùرستادم Ú©Ù‡ یک مرتبه به صراÙت ما اÙتاد Ùˆ اجازه خواست Ùˆ: + +- آقایان عرضی دارند. بهتر است کارهای خودمان را بگذاریم برای بعد. + +مثلاً می‌خواست بÙهماند Ú©Ù‡ نباید همه‌ی حرÙ‌ها را در حضور ما زده باشند. Ùˆ اجازه دادند معلم کلاس چهار شروع کرد به نطق Ùˆ او هم شروع کرد Ú©Ù‡ هر Ú†Ù‡ باشد ما زیر سایه‌ی آقایانیم Ùˆ خوش‌آیند نیست Ú©Ù‡ بچه‌هایی باشند Ú©Ù‡ نه لباس داشته باشند Ùˆ نه Ú©ÙØ´ درست Ùˆ حسابی Ùˆ از این حرÙ‌ها Ùˆ مدام حر٠می‌زد. ناظم هم از Ú†Ùرت در آمد چیزهایی را Ú©Ù‡ از Ø­Ùظ کرده بود Ú¯Ùت Ùˆ التماس دعا Ùˆ کار را خراب کرد.تشری به ناظم زدم Ú©Ù‡ گدابازی را بگذارد کنار Ùˆ حالی‌شان کردم Ú©Ù‡ صحبت از تقاضا نیست Ùˆ گدایی. بلکه مدرسه دور اÙتاده است Ùˆ مستراح بی در Ùˆ پیکر Ùˆ از این اباطیل... Ú†Ù‡ خوب شد Ú©Ù‡ عصبانی نشدم. Ùˆ قرار شد Ú©Ù‡ پنج Ù†Ùرشان Ùردا عصر بیایند Ú©Ù‡ مدرسه را وارسی کنند Ùˆ تشکر Ùˆ اظهار خوشحالی Ùˆ در آمدیم. + +در تاریکی بیابان Ù‡Ùت تا سواری پشت در خانه ردی٠بودند Ùˆ راننده‌ها توی یکی از آن‌ها جمع شده بودند Ùˆ اسرار ارباب‌هاشان را به هم می‌گÙتند. در این حین من مدام به خودم می‌گÙتم من چرا رÙتم؟ به من چه؟ مگر من در بی Ú©ÙØ´ Ùˆ کلاهی‌شان مقصر بودم؟ می‌بینی احمق؟ مدیر مدرسه هم Ú©Ù‡ باشی باید شخصیت Ùˆ غرورت را لای زرورق بپیچی Ùˆ طاق کلاهت بگذاری Ú©Ù‡ اقلاً نپوسد. حتی اگر بخواهی یک معلم Ú©ÙˆÙتی باشی، نه چرا دور می‌زنی؟ حتی اگر یک Ùراش ماهی نود تومانی باشی، باید تا خرخره توی لجن Ùرو بروی.در همین حین Ú©Ù‡ من در Ùکر بودم ناظم Ú¯Ùت: + +- دیدید آقا Ú†Ù‡ طور باهامون رÙتار کردند؟ با یکی از قالی‌هاشون آقا تمام مدرسه رو می‌خرید. + +Ú¯Ùتم: + +- تا سر Ùˆ کارت با الÙ.ب است به‌پا قیاس Ù†Ú©Ù†ÛŒ. خودخوری می‌آره. + +Ùˆ معلم کلاس چهار Ú¯Ùت: + +- اگه Ùحشمون هم می‌دادند من باز هم راضی بودم، باید واقع‌بین بود. خدا کنه پشیمون نشند. + +بعد هم مدتی درد دل کردیم Ùˆ تا اتوبوس برسد Ùˆ سوار بشیم، معلوم شد Ú©Ù‡ معلم کلاس چهار با زنش متارکه کرده Ùˆ مادر ناظم را سرطانی تشخیص دادند. Ùˆ بعد هم شب بخیر... + +دو روز تمام مدرسه نرÙتم. خجالت می‌کشیدم توی صورت یک کدام‌شان نگاه کنم. Ùˆ در همین دو روز حاجی آقا با دو Ù†Ùر آمده بودند، مدرسه را وارسی Ùˆ صورت‌برداری Ùˆ ناظم می‌گÙت Ú©Ù‡ حتی بچه‌هایی هم Ú©Ù‡ Ú©ÙØ´ Ùˆ کلاهی داشتند پاره Ùˆ پوره آمده بودند. Ùˆ برای بچه‌ها Ú©ÙØ´ Ùˆ لباس خریدند. روزهای بعد احساس کردم زن‌هایی Ú©Ù‡ سر راهم لب جوی آب ظر٠می‌شستند، سلام می‌کنند Ùˆ یک بار هم دعای خیر یکی‌شان را از عقب سر شنیدم.اما چنان از خودم بدم آمده بود Ú©Ù‡ رغبتم نمی‌شد به Ú©ÙØ´ Ùˆ لباس‌هاشان نگاه کنم. قربان همان گیوه‌های پاره! بله، نان گدایی Ùرهنگ را نو نوار کرده بود. + +تازه از دردسرهای اول کار مدرسه Ùارغ شده بودم Ú©Ù‡ شنیدم Ú©Ù‡ یک روز صبح، یکی از اولیای اطÙال آمد. بعد از سلام Ùˆ احوالپرسی دست کرد توی جیبش Ùˆ شش تا عکس در آورد، گذاشت روی میزم. شش تا عکس زن لخت. لخت لخت Ùˆ هر کدام به یک حالت. یعنی چه؟ نگاه تندی به او کردم. آدم مرتبی بود. اداری مانند. کسر شأن خودم می‌دانستم Ú©Ù‡ این گوشه‌ی از زندگی را طبق دستور عکاس‌باشی Ùلان جنده‌خانه‌ی بندری ببینم. اما حالا یک مرد اتو کشیده‌ی مرتب آمده بود Ùˆ شش تا از همین عکس‌ها را روی میزم پهن کرده بود Ùˆ به انتظار آن Ú©Ù‡ وقاحت عکس‌ها چشم‌هایم را پر کند داشت سیگار چاق می‌کرد. + +حسابی غاÙلگیر شده بودم... حتماً تا هر شش تای عکس‌ها را ببینم، بیش از یک دقیقه طول کشید. همه از یک Ù†Ùر بود. به این Ùکر گریختم Ú©Ù‡ الان هزار ها یا میلیون ها نسخه‌ی آن، توی جیب Ú†Ù‡ جور آدم‌هایی است Ùˆ در کجاها Ùˆ Ú†Ù‡ قدر خوب بود Ú©Ù‡ همه‌ی این آدم‌ها را می‌شناختم یا می‌دیدم. بیش ازین نمی‌شد گریخت. یارو به تمام وزنه وقاحتش، جلوی رویم نشسته بود. سیگاری آتش زدم Ùˆ چشم به او دوختم. کلاÙÙ‡ بود Ùˆ پیدا بود برای کتک‌کاری هم آماده باشد. سرخ شده بود Ùˆ داشت در دود سیگارش تکیه‌گاهی برای جسارتی Ú©Ù‡ می‌خواست به خرج بدهد می‌جست. عکس‌ها را با یک ورقه از اباطیلی Ú©Ù‡ همان روز سیاه کرده بودم، پوشاندم Ùˆ بعد با لحنی Ú©Ù‡ دعوا را با آن شروع می‌کنند؛ پرسیدم: + +- خوب، غرض؟ + +Ùˆ صدایم توی اتاق پیچید. حرکتی از روی بیچارگی به خودش داد Ùˆ همه‌ی جسارت‌ها را با دستش توی جیبش کرد Ùˆ آرام‌تر از آن چیزی Ú©Ù‡ با خودش تو آورده بود، Ú¯Ùت: + +- Ú†Ù‡ عرض کنم؟... از معلم کلاس پنج تون بپرسید. + +Ú©Ù‡ راحت شدم Ùˆ او شروع کرد به این Ú©Ù‡ «این Ú†Ù‡ Ùرهنگی است؟ خراب بشود. پس بچه‌های مردم با Ú†Ù‡ اطمینانی به مدرسه بیایند؟ + +Ùˆ از این حرÙ‌ها... + +خلاصه این آقا معلم کاردستی کلاس پنجم، این عکس‌ها را داده به پسر آقا تا آن‌ها را روی تخته سه لایی بچسباند Ùˆ دورش را سمباده بکشد Ùˆ بیاورد. به هر صورت معلم کلاس پنج بی‌گدار به آب زده. Ùˆ حالا من Ú†Ù‡ بکنم؟ به او Ú†Ù‡ جوابی بدهم؟ بگویم معلم را اخراج می‌کنم؟ Ú©Ù‡ نه می‌توانم Ùˆ نه لزومی دارد. او Ú†Ù‡ بکند؟ حتماً در این شهر کسی را ندارد Ú©Ù‡ به این عکس‌ها دلخوش کرده. ولی آخر چرا این جور؟ یعنی این قدر احمق است Ú©Ù‡ حتی شاگردهایش را نمی‌شناسد؟... پاشدم ناظم را صدا بزنم Ú©Ù‡ خودش آمده بود بالا، توی ایوان منتظر ایستاده بود. من آخرین کسی بودم Ú©Ù‡ از هر اتÙاقی در مدرسه خبردار می‌شدم. حضور این ولی Ø·ÙÙ„ گیجم کرده بود Ú©Ù‡ چنین عکس‌هایی را از توی جیب پسرش، Ùˆ لابد به همین وقاحتی Ú©Ù‡ آن‌ها را روی میز من ریخت، در آورده بوده. وقتی Ùهمید هر دو در مانده‌ایم سوار بر اسب شد Ú©Ù‡ اله می‌کنم Ùˆ بله می‌کنم، در مدرسه را می‌بندم، Ùˆ از این جÙنگیات.... + +حتماً نمی‌دانست Ú©Ù‡ اگر در هر مدرسه بسته بشود، در یک اداره بسته شده است. اما من تا او بود نمی‌توانستم Ùکرم را جمع کنم. می‌خواست پسرش را بخواهیم تا شهادت بدهد Ùˆ Ú†Ù‡ جانی کندیم تا حالیش کنیم Ú©Ù‡ پسرش هر Ú†Ù‡ Ø®Ùت کشیده، بس است Ùˆ وعده‌ها دادیم Ú©Ù‡ معلمش را دم خورشید کباب کنیم Ùˆ از نان خوردن بیندازیم. یعنی اول ناظم شروع کرد Ú©Ù‡ از دست او دل پری داشت Ùˆ من هم دنبالش را گرÙتم. برای دک کردن او چاره‌ای جز این نبود. Ùˆ بعد رÙت، ما دو Ù†Ùری ماندیم با شش تا عکس زن لخت. حواسم Ú©Ù‡ جمع شد به ناظم سپردم صدایش را در نیاورد Ùˆ یک Ù‡Ùته‌ی تمام مطلب را با عکس‌ها، توی کشوی میزم Ù‚ÙÙ„ کردم Ùˆ بعد پسرک را صدا زدم. نه عزیزدÙردانه می‌نمود Ùˆ نه هیچ جور دیگر. داد می‌زد Ú©Ù‡ از خانواده‌ی عیال‌واری است. کم‌خونی Ùˆ Ùقر. دیدم معلمش زیاد هم بد تشخیص نداده. یعنی زیاد بی‌گدار به آب نزده. Ú¯Ùتم: + +- خواهر برادر هم داری؟ + +- Ø¢... Ø¢...آقا داریم آقا. + +- چند تا؟ + +- Ø¢... آقا چهار تا آقا. + +- عکس‌ها رو خودت به بابات نشون دادی؟ + +- نه به خدا آقا... به خدا قسم... + +- پس Ú†Ù‡ طور شد؟ + +Ùˆ دیدم از ترس دارد قالب تهی می‌کند. گرچه چوب‌های ناظم شکسته بود، اما ترس او از من Ú©Ù‡ مدیر باشم Ùˆ از ناظم Ùˆ از مدرسه Ùˆ از تنبیه سالم مانده بود. + +- نترس بابا. کاریت نداریم. تقصیر آقا معلمه Ú©Ù‡ عکس‌ها رو داده... تو کار بدی نکردی بابا جان. Ùهمیدی؟ اما می‌خواهم ببینم Ú†Ù‡ طور شد Ú©Ù‡ عکس‌ها دست بابات اÙتاد. + +- Ø¢.. Ø¢... آخه آقا... آخه... + +می‌دانستم Ú©Ù‡ باید Ú©Ù…Ú©Ø´ کنم تا به حر٠بیاید. + +Ú¯Ùتم: + +- می‌دونی بابا؟ عکس‌هام چیز بدی نبود. تو خودت Ùهمیدی Ú†ÛŒ بود؟ + +- آخه آقا...نه آقا.... خواهرم آقا... خواهرم می‌گÙت... + +- خواهرت؟ از تو کوچک‌تره؟ + +- نه آقا. بزرگ‌تره. می‌گÙتش Ú©Ù‡ آقا... می‌گÙتش Ú©Ù‡ آقا... هیچ Ú†ÛŒ سر عکس‌ها دعوامون شد. + +دیگر تمام بود. عکس‌ها را به خواهرش نشان داده بود Ú©Ù‡ لای دÙترچه پر بوده از عکس آرتیست‌ها. به او پز داده بوده. اما حاضر نبوده، حتی یکی از آن‌ها را به خواهرش بدهد. آدم مورد اعتماد معلم باشد Ùˆ چنین خبطی بکند؟ Ùˆ تازه جواب معلم را Ú†Ù‡ بدهد؟ ناچار خواهر او را لو داده بوده. بعد از او معلم را احضار کردم. علت احضار را می‌دانست. Ùˆ داد می‌زد Ú©Ù‡ چیزی ندارد بگوید. پس از یک Ù‡Ùته مهلت، هنوز از وقاحتی Ú©Ù‡ من پیدا کرده بودم، تا از آدم خلع سلاح‌شده‌ای مثل او، دست بر ندارم، در تعجب بود. به او سیگار تعار٠کردم Ùˆ این قصه را برایش تعری٠کردم Ú©Ù‡ در اوایل تأسیس وزارت معارÙØŒ یک روز به وزیر خبر می‌دهند Ú©Ù‡ Ùلان معلم با Ùلان بچه روابطی دارد. وزیر Ùوراً او را می‌خواهد Ùˆ حال Ùˆ احوال او را می‌پرسد Ùˆ این‌که چرا تا به حال زن نگرÙته Ùˆ ناچار تقصیر گردن بی‌پولی می‌اÙتد Ùˆ دستور Ú©Ù‡ Ùلان قدر به او Ú©Ù…Ú© کنند تا عروسی راه بیندازد Ùˆ خود او هم دعوت بشود Ùˆ قضیه به همین سادگی تمام می‌شود. Ùˆ بعد Ú¯Ùتم Ú©Ù‡ خیلی جوان‌ها هستند Ú©Ù‡ نمی‌توانند زن بگیرند Ùˆ وزرای Ùرهنگ هم این روزها گرÙتار مصاحبه‌های روزنامه‌ای Ùˆ رادیویی هستند. اما در نجیب‌خانه‌ها Ú©Ù‡ باز است Ùˆ ازین مزخرÙات... Ùˆ هم‌دردی Ùˆ نگذاشتم یک کلمه حر٠بزند. بعد هم عکس را Ú©Ù‡ توی پاکت گذاشته بودم، به دستش دادم Ùˆ وقاحت را با این جمله به حد اعلا رساندم Ú©Ù‡: + +- اگر به تخته نچسبونید، ضررشون کم‌تره. + +تا حقوقم به لیست اداره‌ی Ùرهنگ برسه، سه ماه طول کشید. Ùرهنگی‌های گداگشنه Ùˆ خزانه‌ی خالی Ùˆ دست‌های از پا درازتر! اما خوبیش این بود Ú©Ù‡ در مدرسه‌ی ما Ùراش جدیدمان پولدار بود Ùˆ به همه‌شان قرض داد. Ú©Ù… Ú©Ù… بانک مدرسه شده بود. از سیصد Ùˆ خرده‌ای تومان Ú©Ù‡ می‌گرÙت، پنجاه تومان را هم خرج نمی‌کرد. نه سیگار می‌کشید Ùˆ نه اهل سینما بود Ùˆ نه برج دیگری داشت. از این گذشته، باغبان یکی از دم‌کلÙت‌های همان اطرا٠بود Ùˆ باغی Ùˆ دستگاهی Ùˆ سور Ùˆ ساتی Ùˆ لابد آشپزخانه‌ی مرتبی. خیلی زود معلم‌ها Ùهمیدند Ú©Ù‡ یک Ùراش پولدار خیلی بیش‌تر به درد می‌خورد تا یک مدیر بی‌بو Ùˆ خاصیت. + +این از معلم‌ها. حقوق مرا هم هنوز از مرکز می‌دادند. با حقوق ماه بعد هم اسم مرا هم به لیست اداره منتقل کردند. درین مدت خودم برای خودم ورقه انجام کار می‌نوشتم Ùˆ امضا می‌کردم Ùˆ می‌رÙتم از مدرسه‌ای Ú©Ù‡ قبلاً در آن درس می‌دادم، حقوقم را می‌گرÙتم. سر Ùˆ صدای حقوق Ú©Ù‡ بلند می‌شد معلم‌ها مرتب می‌شدند Ùˆ کلاس ماهی سه چهار روز کاملاً دایر بود. تا ورقه‌ی انجام کار به دستشان بدهم. غیر از همان یک بار - در اوایل کار- Ú©Ù‡ برای معلم حساب پنج Ùˆ شش قرمز توی دÙتر گذاشتیم، دیگر با مداد قرمز کاری نداشتیم Ùˆ خیال همه‌شان راحت بود. وقتی برای گرÙتن حقوقم به اداره رÙتم، چنان شلوغی بود Ú©Ù‡ به خودم Ú¯Ùتم کاش اصلاً حقوقم را منتقل نکرده بودم. نه می‌توانستم سر ص٠بایستم Ùˆ نه می‌توانستم از حقوقم بگذرم. تازه مگر مواجب‌بگیر دولت چیزی جز یک انبان گشاده‌ی پای صندوق است؟..... Ùˆ اگر هم می‌ماندی با آن شلوغی باید تا دو بعداز ظهر سر پا بایستی. همه‌ی جیره‌خوارهای اداره بو برده بودند Ú©Ù‡ مدیرم. Ùˆ لابد آن‌قدر ساده لوح بودند Ú©Ù‡ Ùکر کنند روزی گذارشان به مدرسه‌ی ما بیÙتد. دنبال سÙته‌ها می‌گشتند، به حسابدار قبلی Ùحش می‌دادند، التماس می‌کردند Ú©Ù‡ این ماه را ندیده بگیرید Ùˆ همه‌ی حق Ùˆ حساب‌دان شده بودند Ùˆ یکی Ú©Ù‡ زودتر از نوبت پولش را می‌گرÙت صدای همه در می‌آمد. در لیست مدرسه، بزرگ‌ترین رقم مال من بود. درست مثل بزرگ‌ترین گناه در نامه‌ی عمل. دو برابر Ùراش جدیدمان حقوق می‌گرÙتم. از دیدن رقم‌های مردنی حقوق دیگران چنان خجالت کشیدم Ú©Ù‡ انگار مال آن‌ها را دزدیده‌ام. Ùˆ تازه خلوت Ú©Ù‡ شد Ùˆ ده پانزده تا امضا Ú©Ù‡ کردم، صندوق‌دار چشمش به من اÙتاد Ùˆ با یک معذرت، شش صد تومان پول دزدی را گذاشت ک٠دستم... مرده شور! + +هنوز بر٠اول نباریده بود Ú©Ù‡ یک روز عصر، معلم کلاس چهار رÙت زیر ماشین. زیر یک سواری. مثل همه‌ی عصرها من مدرسه نبودم. دم غروب بود Ú©Ù‡ Ùراش قدیمی مدرسه دم در خونه‌مون، خبرش را آورد. Ú©Ù‡ دویدم به طر٠لباسم Ùˆ تا حاضر بشوم، می‌شنیدم Ú©Ù‡ دارد قضیه را برای زنم تعری٠می‌کند. ماشین برای یکی از آمریکایی‌ها بوده. باقیش را از خانه Ú©Ù‡ در آمدیم برایم تعری٠کرد. گویا یارو خودش پشت Ùرمون بوده Ùˆ بعد هم هول شده Ùˆ در رÙته. بچه‌ها خبر را به مدرسه برگردانده‌اند Ùˆ تا Ùراش Ùˆ زنش برسند، جمعیت Ùˆ پاسبان‌ها سوارش کرده بودند Ùˆ Ùرستاده بوده‌اند مریض‌خانه. به اتوبوس Ú©Ù‡ رسیدم، دیدم لاک پشت است. Ùراش را مرخص کردم Ùˆ پریدم توی تاکسی. اول رÙتم سراغ پاسگاه جدید کلانتری. تعاری٠تکه Ùˆ پاره‌ای از پرونده مطلع بود. اما پرونده تصریحی نداشت Ú©Ù‡ راننده Ú©Ù‡ بوده. اما هیچ کس نمی‌دانست عاقبت Ú†Ù‡ بلایی بر سر معلم کلاس چهار ما آمده است. کشیک پاسگاه همین قدر مطلع بود Ú©Ù‡ درین جور موارد «طبق جریان اداری» اول می‌روند سرکلانتری، بعد دایره‌ی تصادÙات Ùˆ بعد بیمارستان. اگر آشنا در نمی‌آمدیم، کشیک پاسگاه مسلماً نمی‌گذاشت به پرونده نگاه Ú†Ù¾ بکنم. احساس کردم میان اهل محل کم‌کم دارم سرشناس می‌شوم. Ùˆ از این احساس خنده‌ام گرÙت. + +ساعت Û¸ دم در بیمارستان بودم، اگر سالم هم بود حتماً یه چیزیش شده بود. همان طور Ú©Ù‡ من یه چیزیم می‌شد. روی در بیمارستان نوشته شده بود: «از ساعت Û· به بعد ورود ممنوع». در زدم. از پشت در کسی همین آیه را صادر کرد. دیدم Ùایده ندارد Ùˆ باید از یک چیزی Ú©Ù…Ú© بگیرم. از قدرتی، از مقامی، از هیکلی، از یک چیزی. صدایم را Ú©Ù„Ùت کردم Ùˆ Ú¯Ùتم:« من...» می‌خواستم بگویم من مدیر مدرسه‌ام. ولی Ùوراً پشیمان شدم. یارو لابد می‌گÙت مدیر مدرسه کدام سگی است؟ این بود با Ú©Ù…ÛŒ Ù…Ú©Ø« Ùˆ طمطراق Ùراوان جمله‌ام را این طور تمام کردم: + +- ...بازرس وزارت Ùرهنگم. + +Ú©Ù‡ کلون صدایی کرد Ùˆ لای در باز شد. یارو با چشم‌هایش سلام کرد. رÙتم تو Ùˆ با همان صدا پرسیدم: + +- این معلمه مدرسه Ú©Ù‡ تصاد٠کرده... + +تا آخرش را خواند. یکی را صدا زد Ùˆ دنبالم Ùرستاد Ú©Ù‡ طبقه‌ی Ùلان، اتاق Ùلان. از حیاط به راهرو Ùˆ باز به حیاط دیگر Ú©Ù‡ نصÙØ´ را بر٠پوشانده بود Ùˆ من چنان می‌دویدم Ú©Ù‡ یارو از عقب سرم هن هن می‌کرد. طبقه‌ی اول Ùˆ دوم Ùˆ چهارم. چهار تا پله یکی. راهرو تاریک بود Ùˆ پر از بوهای مخصوص بود. هن هن کنان دری را نشان داد Ú©Ù‡ هل دادم Ùˆ رÙتم تو. بو تندتر بود Ùˆ تاریکی بیشتر. تالاری بود پر از تخت Ùˆ جیرجیر Ú©ÙØ´ Ùˆ خرخر یک Ù†Ùر. دور یک تخت چهار Ù†Ùر ایستاده بودند. حتماً خودش بود. پای تخت Ú©Ù‡ رسیدم، احساس کردم همه‌ی آنچه از خشونت Ùˆ تظاهر Ùˆ ابهت به Ú©Ù…Ú© خواسته بودم آب شد Ùˆ بر سر Ùˆ صورتم راه اÙتاد. Ùˆ این معلم کلاس چهارم مدرسه‌ام بود. سنگین Ùˆ با Ø´Ú©Ù… بر آمده دراز کشیده بود. خیلی کوتاه‌تر از زمانی Ú©Ù‡ سر پا بود به نظرم آمد. صورت Ùˆ سینه‌اش از روپوش چرک‌مÙرد بیرون بود. صورتش را Ú©Ù‡ شسته بودند کبود کبود بود، درست به رنگ جای سیلی روی صورت بچه‌ها. مرا Ú©Ù‡ دید، لبخند Ùˆ Ú†Ù‡ لبخندی! شاید می‌خواست بگوید مدرسه‌ای Ú©Ù‡ مدیرش عصرها سر کار نباشد، باید همین جورها هم باشد. خنده توی صورت او همین طور لرزید Ùˆ لرزید تا یخ زد. + +«آخر چرا تصاد٠کردی؟...» + +مثل این Ú©Ù‡ سوال را ازو کردم. اما وقتی Ú©Ù‡ دیدم نمی‌تواند حر٠بزند Ùˆ به جای هر جوابی همان خنده‌ی یخ‌بسته را روی صورت دارد، خودم را به عنوان او دم Ú†Ú© گرÙتم. «آخه چرا؟ چرا این هیکل مدیر Ú©Ù„ÛŒ را با خودت این قد این ور Ùˆ آن ور می‌بری تا بزنندت؟ تا زیرت کنند؟ مگر نمی‌دانستی Ú©Ù‡ معلم حق ندارد این قدر خوش‌هیکل باشد؟ آخر چرا تصاد٠کردی؟» به چنان عتاب Ùˆ خطابی این‌ها را می‌گÙتم Ú©Ù‡ هیچ مطمئن نیستم بلند بلند به خودش Ù†Ú¯Ùته باشم. Ùˆ یک مرتبه به کله‌ام زد Ú©Ù‡ «مبادا خودت چشمش زده باشی؟» Ùˆ بعد: «احمق خاک بر سر! بعد از سی Ùˆ چند سال عمر، تازه خراÙاتی شدی!» Ùˆ چنان از خودم بیزاریم گرÙت Ú©Ù‡ می‌خواستم به یکی Ùحش بدهم، کسی را بزنم. Ú©Ù‡ چشمم به دکتر کشیک اÙتاد. + +- مرده شور این مملکتو ببره. ساعت چهار تا حالا از تن این مرد خون می‌ره. Ø­ÛŒÙتون نیومد؟... + +دستی روی شانه‌ام نشست Ùˆ Ùریادم را خواباند. برگشتم پدرش بود. او هم می‌خندید. دو Ù†Ùر دیگر هم با او بودند. همه دهاتی‌وار؛ همه خوش قد Ùˆ قواره. حظ کردم! آن دو تا پسرهایش بودند یا برادرزاده‌هایش یا کسان دیگرش. تازه داشت Ú¯Ù„ از گلم می‌شکÙت Ú©Ù‡ شنیدم: + +- آقا Ú©ÛŒ باشند؟ + +این راهم دکتر کشیک Ú¯Ùت Ú©Ù‡ من باز سوار شدم: + +- مرا می‌گید آقا؟ من هیشکی. یک آقا مدیر Ú©ÙˆÙتی. این هم معلمم. + +Ú©Ù‡ یک مرتبه عقل Ù‡ÛŒ زد Ùˆ «پسر Ø®ÙÙ‡ شو» Ùˆ Ø®ÙÙ‡ شدم. بغض توی گلویم بود. دلم می‌خواست یک کلمه دیگر بگوید. یک کنایه بزند... نسبت به مهارت هیچ دکتری تا کنون نتوانسته‌ام قسم بخورم. دستش را دراز کرد Ú©Ù‡ به اکراه Ùشار دادم Ùˆ بعد شیشه‌ی بزرگی را نشانم داد Ú©Ù‡ وارونه بالای تخت آویزان بود Ùˆ خرÙهمم کرد Ú©Ù‡ این جوری غذا به او می‌رسانند Ùˆ عکس هم گرÙته‌اند Ùˆ تا Ùردا صبح اگر زخم‌ها چرک نکند، جا خواهند انداخت Ùˆ Ú¯Ú† خواهند کرد. Ú©Ù‡ یکی دیگر از راه رسید. گوشی به دست Ùˆ سÙید پوش Ùˆ معطر. با حرکاتی مثل آرتیست سینما. سلامم کرد. صدایش در ته ذهنم چیزی را مختصر تکانی داد. اما احتیاجی به کنجکاوی نبود. یکی از شاگردهای نمی‌دانم چند سال پیشم بود. خودش خودش را معرÙÛŒ کرد. آقای دکتر...! عجب روزگاری! هر تکه از وجودت را با مزخرÙÛŒ از انبان مزخرÙاتت، مثل ذره‌ای روزی در خاکی ریخته‌ای Ú©Ù‡ حالا سبز کرده. چشم داری احمق. این تویی Ú©Ù‡ روی تخت دراز کشیده‌ای. ده سال آزگار از پلکان ساعات Ùˆ دقایق عمرت هر لحظه یکی بالا رÙته Ùˆ تو Ùقط خستگی این بار را هنوز در تن داری. این جوجه‌ÙÚ©Ù„ÛŒ Ùˆ جوجه‌های دیگر Ú©Ù‡ نمی‌شناسی‌شان، همه از تخمی سر در آورده‌اند Ú©Ù‡ روزی حصار جوانی تو بوده Ùˆ حالا شکسته Ùˆ خالی مانده. دستش را گرÙتم Ùˆ کشیدمش کناری Ùˆ در گوشش هر Ú†Ù‡ بد Ùˆ بی‌راه می‌دانستم، به او Ùˆ همکارش Ùˆ شغلش دادم. مثلاً می‌خواستم سÙارش معلم کلاس چهار مدرسه‌ام را کرده باشم. بعد هم سری برای پدر تکان دادم Ùˆ گریختم. از در Ú©Ù‡ بیرون آمدم، حیاط بود Ùˆ هوای بارانی. از در بزرگ Ú©Ù‡ بیرون آمدم به این Ùکر می‌کردم Ú©Ù‡ «اصلا به تو چه؟ اصلاً چرا آمدی؟ می‌خواستی کنجکاوی‌ات را سیرکنی؟» Ùˆ دست آخر به این نتیجه رسیدم Ú©Ù‡ «طعمه‌ای برای میزنشین‌های شهربانی Ùˆ دادگستری به دست آمده Ùˆ تو نه می‌توانی این طعمه را از دستشان بیرون بیاوری Ùˆ نه هیچ کار دیگری می‌توانی بکنی...» + +Ùˆ داشتم سوار تاکسی می‌شدم تا برگردم خانه Ú©Ù‡ یک دÙعه به صراÙت اÙتادم Ú©Ù‡ اقلاً چرا نپرسیدی Ú†Ù‡ بلایی به سرش آمده؟» خواستم عقب‌گرد کنم، اما هیکل کبود معلم کلاس چهارم روی تخت بود Ùˆ دیدم نمی‌توانم. خجالت می‌کشیدم Ùˆ یا می‌ترسیدم. آن شب تا ساعت دو بیدار بودم Ùˆ Ùردا یک گزارش Ù…Ùصل به امضای مدیر مدرسه Ùˆ شهادت همه‌ی معلم‌ها برای اداره‌ی Ùرهنگ Ùˆ کلانتری محل Ùˆ بعد هم دوندگی در اداره‌ی بیمه Ùˆ قرار بر این Ú©Ù‡ روزی نه تومان بودجه برای خرج بیمارستان او بدهند Ùˆ عصر پس از مدتی رÙتم مدرسه Ùˆ کلاس‌ها را تعطیل کردم Ùˆ معلم‌ها Ùˆ بچه‌های ششم را Ùرستادم عیادتش Ùˆ دسته Ú¯Ù„ Ùˆ ازین بازی‌ها... Ùˆ یک ساعتی در مدرسه تنها ماندم Ùˆ Ùارغ از همه چیز برای خودم خیال باÙتم.... Ùˆ Ùردا صبح پدرش آمد سلام Ùˆ احوالپرسی Ùˆ Ú¯Ùت یک دست Ùˆ یک پایش شکسته Ùˆ Ú©Ù…ÛŒ خونریزی داخل مغز Ùˆ از طر٠یارو آمریکاییه آمده‌اند عیادتش Ùˆ وعده Ùˆ وعید Ú©Ù‡ وقتی خوب شد، در اصل چهار استخدامش کنند Ùˆ با زبان بی‌زبانی حالیم کرد Ú©Ù‡ گزارش را بیخود داده‌ام Ùˆ حالا هم داده‌ام، دنبالش نکنم Ùˆ رضایت طرÙین Ùˆ کاسه‌ی از آش داغ‌تر Ùˆ از این حرÙ‌ها... خاک بر سر مملکت. + +اوایل امر توجهی به بچه‌ها نداشتم. خیال می‌کردم اختلا٠سÙÙ†ÛŒ میان‌مان آن قدر هست Ú©Ù‡ کاری به کار همدیگر نداشته باشیم. همیشه سرم به کار خودم بود. در دÙتر را می‌بستم Ùˆ در گرمای بخاری دولت قلم صد تا یک غاز می‌زدم. اما این کار مرتب سه چهار Ù‡Ùته بیش‌تر دوام نکرد. خسته شدم. ناچار به مدرسه بیشتر می‌رسیدم. یاد روزهای قدیمی با دوستان قدیمی به خیر Ú†Ù‡ آدم‌های پاک Ùˆ بی‌آلایشی بودند، Ú†Ù‡ شخصیت‌های بی‌نام Ùˆ نشانی Ùˆ هر کدام با Ú†Ù‡ زبانی Ùˆ با Ú†Ù‡ ادا Ùˆ اطوارهای مخصوص به خودشان Ùˆ این جوان‌های Ú†Ù„Ùته‌ای. Ú†Ù‡ مقلدهای بی‌دردسری برای Ùرهنگی‌مابی! نه خبری از دیروزشان داشتند Ùˆ نه از املاک تازه‌ای Ú©Ù‡ با Ù‡Ùتاد واسطه به دست‌شان داده بودند، چیزی سرشان می‌شد. بدتر از همه بی‌دست Ùˆ پایی‌شان بود. آرام Ùˆ مرتب درست مثل واگن شاه عبدالعظیم می‌آمدند Ùˆ می‌رÙتند. Ùقط بلد بودند روزی ده دقیقه دیرتر بیایند Ùˆ همین. Ùˆ از این هم بدتر تنگ‌نظری‌شان بود. + +سه بار شاهد دعواهایی بودم Ú©Ù‡ سر یک گلدان میخک یا شمعدانی بود. بچه‌باغبان‌ها زیاد بودند Ùˆ هر کدام‌شان حداقل ماهی یک گلدان میخک یا شمعدانی می‌آوردند Ú©Ù‡ در آن بر٠و سرما نعمتی بود. اول تصمیم گرÙتم، مدرسه را با آن‌ها زینت دهم. ولی Ú†Ù‡ Ùایده؟ نه کسی آب‌شان می‌داد Ùˆ نه مواظبتی. Ùˆ باز بدتر از همه‌ی این‌ها، بی‌شخصیتی معلم‌ها بود Ú©Ù‡ درمانده‌ام کرده بود. دو کلمه نمی‌توانستند حر٠بزنند. عجب هیچ‌کاره‌هایی بودند! احساس کردم Ú©Ù‡ روز به روز در کلاس‌ها معلم‌ها به جای دانش‌آموزان جااÙتاده‌تر می‌شوند. در نتیجه Ú¯Ùتم بیش‌تر متوجه بچه‌ها باشم. + +آن‌ها Ú©Ù‡ تنها با ناظم سر Ùˆ کار داشتند Ùˆ مثل این بود Ú©Ù‡ به من Ùقط یک سلام نیمه‌جویده بدهکارند. با این همه نومیدکننده نبودند. توی Ú©ÙˆÚ†Ù‡ مواظب‌شان بودم. می‌خواستم حر٠و سخن‌ها Ùˆ درد دل‌ها Ùˆ اÙکارشان را از یک Ùحش نیمه‌کاره یا از یک ادای نیمه‌تمام حدس بزنم، Ú©Ù‡ سلام‌نکرده در می‌رÙتند. خیلی Ú©Ù… تنها به مدرسه می‌آمدند. پیدا بود Ú©Ù‡ سر راه همدیگر می‌ایستند یا در خانه‌ی یکدیگر می‌روند. سه چهار Ù†Ùرشان هم با اسکورت می‌آمدند. از بیست سی Ù†Ùری Ú©Ù‡ ناهار می‌ماندند، Ùقط دو Ù†Ùرشان چلو خورش می‌آوردند؛ Ùراش اولی مدرسه برایم خبر می‌آورد. بقیه گوشت‌کوبیده، پنیر گردوئی، دم پختکی Ùˆ از این جور چیزها. دو Ù†Ùرشان هم بودند Ú©Ù‡ نان سنگک خالی می‌آوردند. برادر بودند. پنجم Ùˆ سوم. صبح Ú©Ù‡ می‌آمدند، جیب‌هاشان باد کرده بود. سنگک را نص٠می‌کردند Ùˆ توی جیب‌هاشان می‌تپاندند Ùˆ ظهر می‌شد، مثل آن‌هایی Ú©Ù‡ ناهارشان را در خانه می‌خورند، می‌رÙتند بیرون. من Ùقط بیرون رÙتن‌شان را می‌دیدم. اما حتی همین‌ها هر کدام روزی، یکی دو قران از Ùراش مدرسه خرت Ùˆ خورت می‌خریدند. از همان Ùراش قدیمی مدرسه Ú©Ù‡ ماهی پنج تومان سرایداریش را وصول کرده بودم. هر روز Ú©Ù‡ وارد اتاقم می‌شدم پشت سر من می‌آمد بارانی‌ام را بر می‌داشت Ùˆ شروع می‌کرد به گزارش دادن، Ú©Ù‡ دیروز باز دو Ù†Ùر از معلم‌ها سر یک گلدان دعوا کرده‌اند یا مأمور Ùرماندار نظامی آمده یا دÙتردار عوض شده Ùˆ از این اباطیل... پیدا بود Ú©Ù‡ Ùراش جدید هم در مطالبی Ú©Ù‡ او می‌گÙت، سهمی دارد. + +یک روز در حین گزارش دادن، اشاره‌ای کرد به این مطلب Ú©Ù‡ دیروز عصر یکی از بچه‌های کلاس چهار دو تا کله قند به او Ùروخته است. درست مثل اینکه سر کلا٠را به دستم داده باشد پرسیدم: + +- چند؟ + +- دو تومنش دادم آقا. + +- زحمت کشیدی. Ù†Ú¯Ùتی از کجا آورده؟ + +- من Ú©Ù‡ ضامن بهشت Ùˆ جهنمش نبودم آقا. + +بعد پرسیدم: + +- چرا به آقای ناظم خبر ندادی؟ + +می‌دانستم Ú©Ù‡ هم او Ùˆ هم Ùراش جدید، ناظم را هووی خودشان می‌دانند Ùˆ خیلی چیزهاشان از او مخÙÛŒ بود. این بود Ú©Ù‡ میان من Ùˆ ناظم خاصه‌خرجی می‌کردند. در جوابم همین طور مردد مانده بود Ú©Ù‡ در باز شد Ùˆ Ùراش جدید آمد تو. Ú©Ù‡: + +- اگه خبرش می‌کرد آقا بایست سهمش رو می‌داد... + +اخمم را درهم کشیدم Ùˆ Ú¯Ùتم: + +- تو باز رÙتی تو Ú©ÙˆÚ© مردم! اونم این جوری سر نزده Ú©Ù‡ نمی‌آیند تو اتاق کسی، پیرمرد! + +Ùˆ بعد اسم پسرک را ازشان پرسیدم Ùˆ حالی‌شان کردم Ú©Ù‡ چندان مهم نیست Ùˆ Ùرستادمشان برایم چای بیاورند. بعد کارم را زودتر تمام کردم Ùˆ رÙتم به اتاق دÙتر احوالی از مادر ناظم پرسیدم Ùˆ به هوای ورق زدن پرونده‌ها Ùهمیدم Ú©Ù‡ پسرک شاگرد دوساله است Ùˆ پدرش تاجر بازار. بعد برگشتم به اتاقم. یادداشتی برای پدر نوشتم Ú©Ù‡ پس Ùردا صبح، بیاید مدرسه Ùˆ دادم دست Ùراش جدید Ú©Ù‡ خودش برساند Ùˆ رسیدش را بیاورد. + +Ùˆ پس Ùردا صبح یارو آمد. باید مدیر مدرسه بود تا دانست Ú©Ù‡ اولیای اطÙال Ú†Ù‡ راحت تن به کوچک‌ترین خرده‌Ùرمایش‌های مدرسه می‌دهند. حتم دارم Ú©Ù‡ اگر از اجرای ثبت هم دنبال‌شان بÙرستی به این زودی‌ها Ø¢Ùتابی نشوند. چهل Ùˆ پنج ساله مردی بود با یخه‌ی بسته بی‌کراوات Ùˆ پالتویی Ú©Ù‡ بیش‌تر به قبا می‌ماند. Ùˆ خجالتی می‌نمود. هنوز ننشسته، پرسیدم: + +- شما دو تا زن دارید آقا؟ + +درباره‌ی پسرش برای خودم پیش‌گویی‌هایی کرده بودم Ùˆ Ú¯Ùتم این طوری به او رودست می‌زنم. پیدا بود Ú©Ù‡ از سؤالم زیاد یکه نخورده است. Ú¯Ùتم برایش چای آوردند Ùˆ سیگاری تعارÙØ´ کردم Ú©Ù‡ ناشیانه دود کرد از ترس این Ú©Ù‡ مبادا جلویم در بیاید Ú©Ù‡ - به شما Ú†Ù‡ مربوط است Ùˆ از این اعتراض‌ها - امانش ندادم Ùˆ سؤالم را این جور دنبال کردم: + +- البته می‌بخشید. چون لابد به همین علت بچه شما دو سال در یک کلاس مانده. + +شروع کرده بودم برایش یک میتینگ بدهم Ú©Ù‡ پرید وسط حرÙÙ…: + +- به سر شما قسم، روزی چهار زار پول تو جیبی داره آقا. پدرسوخته‌ی نمک به حروم...! + +حالیش کردم Ú©Ù‡ علت، پول تو جیبی نیست Ùˆ خواستم Ú©Ù‡ عصبانی نشود Ùˆ قول گرÙتم Ú©Ù‡ اصلاً به روی پسرش هم نیاورد Ùˆ آن وقت میتینگم را برایش دادم Ú©Ù‡ لابد پسر در خانه مهر Ùˆ محبتی نمی‌بیند Ùˆ غیب‌گویی‌های دیگر... تا عاقبت یارو خجالتش ریخت Ùˆ سر٠درد دلش باز شد Ú©Ù‡ عÙریته زن اولش همچه بوده Ùˆ همچون بوده Ùˆ پسرش هم به خودش برده Ùˆ Ú©ÛŒ طلاقش داده Ùˆ از زن دومش چند تا بچه دارد Ùˆ این نره‌خر حالا باید برای خودش نان‌آور شده باشد Ùˆ زنش حق دارد Ú©Ù‡ با دو تا بچه‌ی خرده‌پا به او نرسد... من هم Ú©Ù„ÛŒ برایش صحبت کردم. چایی دومش را هم سر کشید Ùˆ قول‌هایش را Ú©Ù‡ داد Ùˆ رÙت، من به این Ùکر اÙتادم Ú©Ù‡ «نکند علمای تعلیم Ùˆ تربیت هم، همین جورها تخم دوزرده می‌کنند!» + +یک روز صبح Ú©Ù‡ رسیدم، ناظم هنوز نیامده بود. از این اتÙاق‌ها Ú©Ù… می‌اÙتاد. ده دقیقه‌ای از زنگ می‌گذشت Ùˆ معلم‌ها در دÙتر سرگرم اختلاط بودند. خودم هم وقتی معلم بودم به این مرض دچار بودم. اما وقتی مدیر شدم تازه Ùهمیدم Ú©Ù‡ معلم‌ها Ú†Ù‡ لذتی می‌برند. حق هم داشتند. آدم وقتی مجبور باشد Ø´Ú©Ù„Ú©ÛŒ را به صورت بگذارد Ú©Ù‡ نه دیگران از آن می‌خندند Ùˆ نه خود آدم لذتی می‌برد، پیداست Ú©Ù‡ رÙع تکلی٠می‌کند. زنگ را Ú¯Ùتم زدند Ùˆ بچه‌ها سر کلاس رÙتند. دو تا از کلاس‌ها بی‌معلم بود. یکی از ششمی‌ها را Ùرستادم سر کلاس سوم Ú©Ù‡ برای‌شان دیکته بگوید Ùˆ خودم رÙتم سر کلاس چهار. مدیر هم Ú©Ù‡ باشی، باز باید تمرین Ú©Ù†ÛŒ Ú©Ù‡ مبادا Ùوت Ùˆ ÙÙ† معلمی از یادت برود. در حال صحبت با بچه‌ها بودم Ú©Ù‡ Ùراش خبر آورد Ú©Ù‡ خانمی توی دÙتر منتظرم است. خیال کردم لابد همان زنکه‌ی بیکاره‌ای است Ú©Ù‡ Ù‡Ùته‌ای یک بار به هوای سرکشی، به وضع درس Ùˆ مشق بچه‌اش سری می‌زند. زن سÙیدرویی بود با چشم‌های درشت محزون Ùˆ موی بور. بیست Ùˆ پنج ساله هم نمی‌نمود. اما بچه‌اش کلاس سوم بود. روز اول Ú©Ù‡ دیدمش لباس نارنجی به تن داشت Ùˆ تن بزک کرده بود. از زیارت من خیلی خوشحال شد Ùˆ از مراتب Ùضل Ùˆ ادبم خبر داشت. + +خیلی ساده آمده بود تا با دو تا مرد حرÙÛŒ زده باشد. آن طور Ú©Ù‡ ناظم خبر می‌داد، یک سالی طلاق گرÙته بود Ùˆ روی هم رÙته آمد Ùˆ رÙتنش به مدرسه باعث دردسر بود. وسط بیابان Ùˆ مدرسه‌ای پر از معلم‌های عزب Ùˆ بی‌دست Ùˆ پا Ùˆ یک زن زیبا... ناچار جور در نمی‌آمد. این بود Ú©Ù‡ دÙعات بعد دست به سرش می‌کردم، اما از رو نمی‌رÙت. سراغ ناظم Ùˆ اتاق دÙتر را می‌گرÙت Ùˆ صبر می‌کرد تا زنگ را بزنند Ùˆ معلم‌ها جمع بشوند Ùˆ لابد حر٠و سخنی Ùˆ خنده‌ای Ùˆ بعد از معلم کلاس سوم سراغ کار Ùˆ بار Ùˆ بچه‌اش را می‌گرÙت Ùˆ زنگ بعد را Ú©Ù‡ می‌زدند، خداحاÙظی می‌کرد Ùˆ می‌رÙت. آزاری نداشت. با چشم‌هایش Ù†Ùس معلم‌ها را می‌برید. Ùˆ حالا باز هم همان زن بود Ùˆ آمده بود Ùˆ من تا از پلکان پایین بروم در ذهنم جملات زننده‌ای ردی٠می‌کردم، تا پایش را از مدرسه ببرد Ú©Ù‡ در را باز کردم Ùˆ سلام... + +عجب! او نبود. دخترک یکی دو ساله‌ای بود با دهان گشاد Ùˆ موهای زبرش را به زحمت عقب سرش گلوله کرده بود Ùˆ بÙهمی Ù†Ùهمی دستی توی صورتش برده بود. روی هم رÙته زشت نبود. اما داد می‌زد Ú©Ù‡ معلم است. Ú¯Ùتم Ú©Ù‡ مدیر مدرسه‌ام Ùˆ حکمش را داد دستم Ú©Ù‡ دانشسرا دیده بود Ùˆ تازه استخدام شده بود. برایمان معلم Ùرستاده بودند. خواستم بگویم «مگر رئیس Ùرهنگ نمی‌داند Ú©Ù‡ این جا بیش از حد مرد است» ولی دیدم لزومی ندارد Ùˆ Ùکر کردم این هم خودش تنوعی است. + +به هر صورت زنی بود Ùˆ می‌توانست محیط خشن مدرسه را Ú©Ù‡ به طرز ناشیانه‌ای پسرانه بود، لطاÙتی بدهد Ùˆ خوش‌آمد Ú¯Ùتم Ùˆ چای آوردند Ú©Ù‡ نخورد Ùˆ بردمش کلاس‌های سوم Ùˆ چهارم را نشانش دادم Ú©Ù‡ هر کدام را مایل است، قبول کند Ùˆ صحبت از هجده ساعت درس Ú©Ù‡ در انتظار او بود Ùˆ برگشتیم به دÙتر .پرسید غیر از او هم، معلم زن داریم. Ú¯Ùتم: + +- متأسÙانه راه مدرسه‌ی ما را برای پاشنه‌ی Ú©ÙØ´ خانم‌ها نساخته‌اند. + +Ú©Ù‡ خندید Ùˆ احساس کردم زورکی می‌خندد. بعد Ú©Ù…ÛŒ این دست Ùˆ آن دست کرد Ùˆ عاقبت: + +- آخه من شنیده بودم شما با معلماتون خیلی خوب تا می‌کنید. + +صدای جذابی داشت. Ùکر کردم حی٠که این صدا را پای تخته سیاه خراب خواهد کرد. Ùˆ Ú¯Ùتم: + +- اما نه این قدر Ú©Ù‡ مدرسه تعطیل بشود خانم! Ùˆ لابد به عرض‌تون رسیده Ú©Ù‡ همکارهای شما، خودشون نشسته‌اند Ùˆ تصمیم گرÙته‌اند Ú©Ù‡ هجده ساعت درس بدهند. بنده هیچ‌کاره‌ام. + +- اختیار دارید. + +Ùˆ Ù†Ùهمیدم با این «اختیار دارید» Ú†Ù‡ می‌خواست بگوید. اما پیدا بود Ú©Ù‡ بحث سر ساعات درس نیست. آناً تصمیم گرÙتم، امتحانی بکنم: + +- این را هم اطلاع داشته باشید Ú©Ù‡ Ùقط دو تا از معلم‌های ما متأهل‌اند. + +Ú©Ù‡ قرمز شد Ùˆ برای این Ú©Ù‡ کار دیگری نکرده باشد، برخاست Ùˆ حکمش را از روی میز برداشت. پا به پا می‌شد Ú©Ù‡ دیدم باید به دادش برسم. ساعت را از او پرسیدم. وقت زنگ بود. Ùراش را صدا کردم Ú©Ù‡ زنگ را بزند Ùˆ بعد به او Ú¯Ùتم، بهتر است مشورت دیگری هم با رئیس Ùرهنگ بکند Ùˆ ما به هر صورت خوشحال خواهیم شد Ú©Ù‡ اÙتخار همکاری با خانمی مثل ایشان را داشته باشیم Ùˆ خداحاÙظ شما. از در دÙتر Ú©Ù‡ بیرون رÙت، صدای زنگ برخاست Ùˆ معلم‌ها انگار موشان را آتش زده‌اند، به عجله رسیدند Ùˆ هر کدام از پشت سر، آن قدر او را پاییدند تا از در بزرگ آهنی مدرسه بیرون رÙت. + +Ùردا صبح معلوم شد Ú©Ù‡ ناظم، دنبال کار مادرش بوده است Ú©Ù‡ قرار بود بستری شود، تا جای سرطان گرÙته را یک دوره برق بگذارند. Ú©Ù„ کار بیمارستان را من به Ú©Ù…Ú© دوستانم انجام دادم Ùˆ موقع آن رسیده بود Ú©Ù‡ مادرش برود بیمارستان اما وحشتش گرÙته بود Ùˆ حاضر نبود به بیمارستان برود. Ùˆ ناظم می‌خواست رسماً دخالت کنم Ùˆ با هم برویم خانه‌شان Ùˆ با زبان چرب Ùˆ نرمی Ú©Ù‡ به قول ناظم داشتم مادرش را راضی کنم. چاره‌ای نبود. مدرسه را به معلم‌ها سپردیم Ùˆ راه اÙتادیم. بالاخره به خانه‌ی آن‌ها رسیدیم. خانه‌ای بسیار Ú©ÙˆÚ†Ú© Ùˆ اجاره‌ای. مادر با چشم‌های گود نشسته Ùˆ انگار زغال به صورت مالیده! سیاه نبود اما رنگش چنان تیره بود Ú©Ù‡ وحشتم گرÙت. اصلاً صورت نبود. زخم سیاه شده‌ای بود Ú©Ù‡ انگار از جای چشم‌ها Ùˆ دهان سر باز کرده است. Ú©Ù„ÛŒ با مادرش صحبت کردم. از پسرش Ùˆ Ú©Ù„ÛŒ دروغ Ùˆ دونگ، Ùˆ چادرش را روی چارقدش انداختیم Ùˆ علی... Ùˆ خلاصه در بیمارستان بستری شدند. + +Ùردا Ú©Ù‡ به مدرسه آمدم، ناظم سرحال بود Ùˆ پیدا بود Ú©Ù‡ از شر چیزی خلاص شده است Ùˆ خبر داد Ú©Ù‡ معلم کلاس سه را گرÙته‌اند. یک ماه Ùˆ خرده‌ای می‌شد Ú©Ù‡ مخÙÛŒ بود Ùˆ ما ورقه‌ی انجام کارش را به جانشین غیر رسمی‌اش داده بودیم Ùˆ حقوقش لنگ نشده بود Ùˆ تا خبر رسمی بشنود Ùˆ در روزنامه‌ای بیابد Ùˆ قضیه به اداره‌ی Ùرهنگ Ùˆ لیست حقوق بکشد، باز هم می‌دادیم. اما خبر Ú©Ù‡ رسمی شد، جانشین واجد شرایط هم نمی‌توانست بÙرستد Ùˆ باید طبق مقررات رÙتار می‌کردیم Ùˆ بدیش همین بود. Ú©Ù… Ú©Ù… احساس کردم Ú©Ù‡ مدرسه خلوت شده است Ùˆ کلاس‌ها اغلب اوقات بی‌کارند. جانشین معلم کلاس چهار هنوز سر Ùˆ صورتی به کارش نداده بود Ùˆ حالا یک کلاس دیگر هم بی‌معلم شد. این بود Ú©Ù‡ باز هم به سراغ رئیس Ùرهنگ رÙتم. معلوم شد آن دخترک ترسیده Ùˆ «نرسیده متلک پیچش کرده‌اید» رئیس Ùرهنگ این طور می‌گÙت. Ùˆ ترجیح داده بود همان زیر نظر خودش دÙترداری کند. Ùˆ بعد قول Ùˆ قرار Ùˆ Ùردا Ùˆ پس Ùردا Ùˆ عاقبت چهار روز دوندگی تا دو تا معلم گرÙتم. یکی جوانکی رشتی Ú©Ù‡ گذاشتیمش کلاس چهار Ùˆ دیگری باز یکی ازین آقاپسرهای بریانتین‌زده Ú©Ù‡ هر روز کراوات عوض می‌کرد، با نقش‌ها Ùˆ طرح‌های عجیب. عجب Ùرهنگ را با قرتی‌ها در آمیخته بودند! باداباد. او را هم گذاشتیم سر کلاس سه. اواخر بهمن، یک روز ناظم آمد اتاقم Ú©Ù‡ بودجه‌ی مدرسه را زنده کرده است. Ú¯Ùتم: + +- مبارکه، Ú†Ù‡ قدر گرÙتی؟ + +- هنوز هیچ Ú†ÛŒ آقا. قراره Ùردا سر ظهر بیاند این جا آقا Ùˆ همین جا قالش رو بکنند. + +Ùˆ Ùردا اصلاً مدرسه نرÙتم. حتماً می‌خواست من هم باشم Ùˆ در بده بستان ماهی پانزده قران، حق نظاÙت هر اتاق نظارت کنم Ùˆ از مدیریتم مایه بگذارم تا تنخواه‌گردان مدرسه Ùˆ حق آب Ùˆ دیگر پول‌های عقب‌اÙتاده وصول بشود... Ùردا سه Ù†Ùری آمده بودند مدرسه. ناهار هم به خرج ناظم خورده بودند. Ùˆ قرار دیگری برای یک سور حسابی گذاشته بودند Ùˆ رÙته بودند Ùˆ ناظم با زبان بی‌زبانی حالیم کرد Ú©Ù‡ این بار حتماً باید باشم Ùˆ آن طور Ú©Ù‡ می‌گÙت، جای شکرش باقی بود Ú©Ù‡ مراعات کرده بودند Ùˆ حق بوقی نخواسته بودند. اولین باری بود Ú©Ù‡ چنین اهمیتی پیدا می‌کردم. این هم یک مزیت دیگر مدیری مدرسه بود! سی صد تومان از بودجه‌ی دولت بسته به این بود Ú©Ù‡ به Ùلان مجلس بروی یا نروی. تا سه روز دیگر موعد سور بود، اصلاً یادم نیست Ú†Ù‡ کردم. اما همه‌اش در این Ùکر بودم Ú©Ù‡ بروم یا نروم؟ یک بار دیگر استعÙانامه‌ام را توی جیبم گذاشتم Ùˆ بی این Ú©Ù‡ صدایش را در بیاورم، روز سور هم نرÙتم. + +بعد دیدم این طور Ú©Ù‡ نمی‌شود. Ú¯Ùتم بروم قضایا را برای رئیس Ùرهنگ بگویم. Ùˆ رÙتم. سلام Ùˆ احوالپرسی نشستم. اما Ú†Ù‡ بگویم؟ بگویم چون نمی‌خواستم در خوردن سور شرکت کنم، استعÙا می‌دهم؟... دیدم چیزی ندارم Ú©Ù‡ بگویم. Ùˆ از این گذشته Ø®Ùت‌آور نبود Ú©Ù‡ به خاطر سیصد تومان جا بزنم Ùˆ استعÙا بدهم؟ Ùˆ «خداحاÙظ؛ Ùقط آمده بودم سلام عرض کنم.» Ùˆ از این دروغ‌ها Ùˆ استعÙانامه‌ام را توی جوی آب انداختم. اما ناظم؛ یک Ù‡Ùته‌ای مثل سگ بود. عصبانی، پر سر Ùˆ صدا Ùˆ شارت Ùˆ شورت! حتی نرÙتم احوال مادرش را بپرسم. یک Ù‡Ùته‌ی تمام می‌رÙتم Ùˆ در اتاقم را می‌بستم Ùˆ سوراخ‌های گوشم را می‌گرÙتم Ùˆ تا اÙز Ùˆ Ú†Ùزّ بچه‌ها بخوابد، از این سر تا آن سر اتاق را می‌کوبیدم. ده روز تمام، قلب من Ùˆ بچه‌ها با هم Ùˆ به یک اندازه از ترس Ùˆ وحشت تپید. تا عاقبت پول‌ها وصول شد. منتها به جای سیصد Ùˆ خرده‌ای، Ùقط صد Ùˆ پنجاه تومان. علت هم این بود Ú©Ù‡ در تنظیم صورت حساب‌ها اشتباهاتی رخ داده بود Ú©Ù‡ ناچار اصلاحش کرده بودند! + +غیر از آن زنی Ú©Ù‡ Ù‡Ùته‌ای یک بار به مدرسه سری می‌زد، از اولیای اطÙال دو سه Ù†Ùر دیگر هم بودند Ú©Ù‡ مرتب بودند. یکی همان پاسبانی Ú©Ù‡ با کمربند، پاهای پسرش را بست Ùˆ ÙÙ„Ú© کرد. یکی هم کارمند پست Ùˆ تلگراÙÛŒ بود Ú©Ù‡ ده روزی یک بار می‌آمد Ùˆ پدر همان بچه‌ی شیطان. Ùˆ یک استاد نجار Ú©Ù‡ پسرش کلاس اول بود Ùˆ خودش سواد داشت Ùˆ به آن می‌بالید Ùˆ کارآمد می‌نمود. یک مقنی هم بود درشت استخوان Ùˆ بلندقد Ú©Ù‡ بچه‌اش کلاس سوم بود Ùˆ Ù‡Ùته‌ای یک بار می‌آمد Ùˆ همان توی حیاط، ده پانزده دقیقه‌ای با Ùراش‌ها اختلاط می‌کرد Ùˆ بی سر Ùˆ صدا می‌رÙت. نه کاری داشت، نه چیزی از آدم می‌خواست Ùˆ همان طور Ú©Ù‡ آمده بود چند دقیقه‌ای را با Ùراش صحبت می‌کرد Ùˆ بعد Ù…ÛŒ رÙت. Ùقط یک روز نمی‌دانم چرا رÙته بود بالای دیوار مدرسه. البته اول Ùکر کردم مأمور اداره برق است ولی بعد متوجه شدم Ú©Ù‡ همان مرد مقنی است. بچه‌ها جیغ Ùˆ Ùریاد می‌کردند Ùˆ من همه‌اش درین Ùکر بودم Ú©Ù‡ Ú†Ù‡ طور به سر دیوار رÙته است؟ ماحصل داد Ùˆ Ùریادش این بود Ú©Ù‡ چرا اسم پسر او را برای گرÙتن Ú©ÙØ´ Ùˆ لباس به انجمن ندادیم. وقتی به او رسیدم نگاهی به او انداختم Ùˆ بعد تشری به ناظم Ùˆ معلم ها زدم Ú©Ù‡ ولش کردند Ùˆ بچه‌ها رÙتند سر کلاس Ùˆ بعد بی این Ú©Ù‡ نگاهی به او بکنم، Ú¯Ùتم: + +- خسته نباشی اوستا. + +Ùˆ همان طور Ú©Ù‡ به طر٠دÙتر می‌رÙتم رو به ناظم Ùˆ معلم‌ها اÙزودم: + +- لابد جواب درست Ùˆ حسابی نشنیده Ú©Ù‡ رÙته سر دیوار. + +Ú©Ù‡ پشت سرم گرپ صدایی آمد Ùˆ از در دÙتر Ú©Ù‡ رÙتم تو، او Ùˆ ناظم با هم وارد شدند. Ú¯Ùتم نشست. Ùˆ به جای این‌که حرÙÛŒ بزند به گریه اÙتاد. هرگز گمان نمی‌کردم از چنان قد Ùˆ قامتی صدای گریه در بیاید. این بود Ú©Ù‡ از اتاق بیرون آمدم Ùˆ Ùراش را صدا زدم Ú©Ù‡ آب برایش بیاورد Ùˆ حالش Ú©Ù‡ جا آمد، بیاوردش پهلوی من. اما دیگر از او خبری نشد Ú©Ù‡ نشد. نه آن روز Ùˆ نه هیچ روز دیگر. آن روز چند دقیقه‌ای بعد از شیشه‌ی اتاق خودم دیدمش Ú©Ù‡ دمش را لای پایش گذاشته بود از در مدرسه بیرون می‌رÙت Ùˆ Ùراش جدید آمد Ú©Ù‡ بله می‌گÙتند از پسرش پنج تومان خواسته بودند تا اسمش را برای Ú©ÙØ´ Ùˆ لباس به انجمن بدهند. پیدا بود باز توی Ú©ÙˆÚ© ناظم رÙته است. مرخصش کردم Ùˆ ناظم را خواستم. معلوم شد می‌خواسته ناظم را بزند. همین جوری Ùˆ بی‌مقدمه. + +اواخر بهمن بود Ú©Ù‡ یکی از روزهای برÙÛŒ با یکی دیگر از اولیای اطÙال آشنا شدم. یارو مرد بسیار کوتاهی بود؛ Ùرنگ مآب Ùˆ بزک کرده Ùˆ اتو کشیده Ú©Ù‡ ننشسته از تحصیلاتش Ùˆ از سÙرهای Ùرنگش حر٠زد. می‌خواست پسرش را آن وقت سال از مدرسه‌ی دیگر به آن جا بیاورد. پسرش از آن بچه‌هایی بود Ú©Ù‡ شیر Ùˆ مربای صبحانه‌اش را با قربان صدقه توی حلقشان می‌تپانند. کلاس دوم بود Ùˆ ثلث اول دو تا تجدید آورده بود. می‌گÙت در باغ ییلاقی‌اش Ú©Ù‡ نزدیک مدرسه است، باغبانی دارند Ú©Ù‡ پسرش شاگرد ماست Ùˆ درس‌خوان است Ùˆ پیدا است Ú©Ù‡ بچه‌ها زیر سایه شما خوب پیشرÙت می‌کنند. Ùˆ از این پیزرها. Ùˆ حال به خاطر همین بچه، توی این بر٠و سرما، آمده‌اند ساکن باغ ییلاقی شده‌اند. بلند شدم ناظم را صدا کردم Ùˆ دست او Ùˆ بچه‌اش را توی دست ناظم گذاشتم Ùˆ خداحاÙظ شما... Ùˆ نیم ساعت بعد ناظم برگشت Ú©Ù‡ یارو خانه‌ی شهرش را به یک دبیرستان اجاره داده، به ماهی سه هزار Ùˆ دویست تومان، Ùˆ التماس دعا داشته، یعنی معلم سرخانه می‌خواسته Ùˆ حتی بدش نمی‌آمده است Ú©Ù‡ خود مدیر زحمت بکشند Ùˆ ازین گنده‌گوزی‌ها... احساس کردم Ú©Ù‡ ناظم دهانش آب اÙتاده است. Ùˆ من به ناظم حالی کردم خودش برود بهتر است Ùˆ Ùقط کاری بکند Ú©Ù‡ نه صدای معلم‌ها در بیاید Ùˆ نه آخر سال، برای یک معدل ده احتیاجی به من بمیرم Ùˆ تو بمیری پیدا کند. همان روز عصر ناظم رÙته بود Ùˆ قرار Ùˆ مدار برای هر روز عصر یک ساعت به ماهی صد Ùˆ پنجاه تومان. + +دیگر دنیا به کام ناظم بود. حال مادرش هم بهتر بود Ùˆ از بیمارستان مرخصش کرده بودند Ùˆ به Ùکر زن گرÙتن اÙتاده بود. Ùˆ هر روز هم برای یک Ù†Ùر نقشه می‌کشید حتی برای من هم. یک روز در آمد Ú©Ù‡ چرا ما خودمان «انجمن خانه Ùˆ مدرسه» نداشته باشیم؟ نشسته بود Ùˆ حسابش را کرده بود دیده بود Ú©Ù‡ پنجاه شصت Ù†Ùری از اولیای مدرسه دستشان به دهان‌شان می‌رسد Ùˆ از آن هم Ú©Ù‡ به پسرش درس خصوصی می‌داد قول مساعد گرÙته بود. حالیش کردم Ú©Ù‡ مواظب حر٠و سخن اداره‌ای باشد Ùˆ هر کار دلش می‌خواهد بکند. کاغذ دعوت را هم برایش نوشتم با آب Ùˆ تاب Ùˆ خودش برای اداره‌ی Ùرهنگ، داد ماشین کردند Ùˆ به وسیله‌ی خود بچه‌ها Ùرستاد. Ùˆ جلسه با حضور بیست Ùˆ چند Ù†Ùری از اولیای بچه‌ها رسمی شد. خوبیش این بود Ú©Ù‡ پاسبان کشیک پاسگاه هم آمده بود Ùˆ دم در برای همه، پاشنه‌هایش را به هم می‌کوبید Ùˆ معلم‌ها گوش تا گوش نشسته بودند Ùˆ مجلس ابهتی داشت Ùˆ ناظم، چای Ùˆ شیرینی تهیه کرده بود Ùˆ چراغ زنبوری کرایه کرده بود Ùˆ باران هم گذاشت پشتش Ùˆ سالون برای اولین بار در عمرش به نوایی رسید. + +یک سرهنگ بود Ú©Ù‡ رئیسش کردیم Ùˆ آن زن را Ú©Ù‡ Ù‡Ùته‌ای یک بار می‌آمد نایب رئیس. آن Ú©Ù‡ ناظم به پسرش درس خصوصی می‌داد نیامده بود. اما پاکت سربسته‌ای به اسم مدیر Ùرستاده بود Ú©Ù‡ Ùی‌المجلس بازش کردیم. عذرخواهی از این‌که نتوانسته بود بیاید Ùˆ وجه ناقابلی جو٠پاکت. صد Ùˆ پنجاه تومان. Ùˆ پول را روی میز صندوق‌دار گذاشتیم Ú©Ù‡ ضبط Ùˆ ربط کند. نائب رئیس بزک کرده Ùˆ معطر شیرینی تعار٠می‌کرد Ùˆ معلم‌ها با هر بار Ú©Ù‡ شیرینی بر می‌داشتند، یک بار تا بناگوش سرخ می‌شدند Ùˆ Ùراش‌ها دست به دست چای می‌آوردند. + +در Ùکر بودم Ú©Ù‡ یک مرتبه احساس کردم، سیصد چهارصد تومان پول نقد، روی میز است Ùˆ هشت صد تومان هم تعهد کرده بودند. پیرزن صندوقدار Ú©Ù‡ کی٠پولش را همراهش نیاورده بود ناچار حضار تصویب کردند Ú©Ù‡ پول‌ها Ùعلاً پیش ناظم باشد. Ùˆ صورت مجلس مرتب شد Ùˆ امضاها ردی٠پای آن Ùˆ Ùردا Ùهمیدم Ú©Ù‡ ناظم همان شب روی خشت نشسته بوده Ùˆ به معلم‌ها سور داده بوده است. اولین کاری Ú©Ù‡ کردم رونوشت مجلس آن شب را برای اداره‌ی Ùرهنگ Ùرستادم. Ùˆ بعد همان استاد نجار را صدا کردم Ùˆ دستور دادم برای مستراح‌ها دو روزه در بسازد Ú©Ù‡ ناظم خیلی به سختی پولش را داد. Ùˆ بعد در کوچه‌ی مدرسه درخت کاشتیم. تور والیبال را تعویض Ùˆ تعدادی توپ در اختیار بچه‌ها گذاشتیم برای تمرین در بعد از ظهرها Ùˆ آمادگی برای مسابقه با دیگر مدارس Ùˆ در همین حین سر Ùˆ کله‌ی بازرس تربیت بدنی هم پیدا شد Ùˆ هر روز سرکشی Ùˆ بیا Ùˆ برو. تا یک روز Ú©Ù‡ به مدرسه رسیدم شنیدم Ú©Ù‡ از سالون سر Ùˆ صدا می‌آید. صدای هالتر بود. ناظم سر خود رÙته بود Ùˆ سرخود دویست سیصد تومان داده بود Ùˆ هالتر خریده بود Ùˆ بچه‌های لاغر زیر بار آن گردن خود را خرد می‌کردند. من در این میان حرÙÛŒ نزدم. می‌توانستم حرÙÛŒ بزنم؟ من چیکاره بودم؟ اصلاً به من Ú†Ù‡ ربطی داشت؟ هر کار Ú©Ù‡ دلشان می‌خواهد بکنند. مهم این بود Ú©Ù‡ سالون مدرسه رونقی گرÙته بود. ناظم هم راضی بود Ùˆ معلم‌ها هم. چون نه خبر از حسادتی بود Ùˆ نه حر٠و سخنی پیش آمد. Ùقط می‌بایست به ناظم سÙارش Ù…ÛŒ کردم Ú©Ù‡ Ùکر Ùراش‌ها هم باشد. + +Ú©Ù… Ú©Ù… خودمان را برای امتحان‌های ثلث دوم آماده می‌کردیم. این بود Ú©Ù‡ اوایل اسÙند، یک روز معلم‌ها را صدا زدم Ùˆ در شورا مانندی Ú©Ù‡ کردیم بی‌مقدمه برایشان داستان یکی از همکاران سابقم را Ú¯Ùتم Ú©Ù‡ هر وقت بیست می‌داد تا دو روز تب داشت. البته معلم‌ها خندیدند. ناچار تشویق شدم Ùˆ داستان آخوندی را Ú¯Ùتم Ú©Ù‡ در بچگی معلم شرعیاتمان بود Ùˆ زیر عبایش نمره می‌داد Ùˆ دستش چنان می‌لرزید Ú©Ù‡ عبا تکان می‌خورد Ùˆ درست ده دقیقه طول می‌کشید. Ùˆ تازه چند؟ بهترین شاگردها دوازده. Ùˆ البته باز هم خندیدند. Ú©Ù‡ این بار کلاÙه‌ام کرد. Ùˆ بعد حالیشان کردم Ú©Ù‡ بد نیست در طرح سؤال‌ها مشورت کنیم Ùˆ از این حرÙ‌ها... + +Ùˆ از شنبه‌ی بعد، امتحانات شروع شد. درست از نیمه‌ی دوم اسÙند. سؤال‌ها را سه Ù†Ùری می‌دیدیم. خودم با معلم هر کلاس Ùˆ ناظم. در سالون میزها را چیده بودیم البته از وقتی هالتردار شده بود خیلی زیباتر شده بود. در سالون کاردستی‌های بچه‌ها در همه جا به چشم می‌خورد. هر کسی هر چیزی را به عنوان کاردستی درست کرده بودند Ùˆ آورده بودند. Ú©Ù‡ برای این کاردستی‌ها Ú†Ù‡ پول‌ها Ú©Ù‡ خرج نشده بود Ùˆ Ú†Ù‡ دست‌ها Ú©Ù‡ نبریده بود Ùˆ Ú†Ù‡ دعواها Ú©Ù‡ نشده بود Ùˆ Ú†Ù‡ عرق‌ها Ú©Ù‡ ریخته نشده بود. پیش از هر امتحان Ú©Ù‡ می‌شد، خودم یک میتینگ برای بچه‌ها می‌دادم Ú©Ù‡ ترس از معلم Ùˆ امتحان بی‌جا است Ùˆ باید اعتماد به Ù†Ùس داشت Ùˆ ازین مزخرÙات....ولی مگر حر٠به گوش کسی می‌رÙت؟ از در Ú©Ù‡ وارد می‌شدند، چنان هجومی می‌بردند Ú©Ù‡ Ù†Ú¯Ùˆ! به جاهای دور از نظر. یک بار چنان بود Ú©Ù‡ احساس کردم مثل این‌که از ترس، لذت می‌برند. اگر معلم نبودی یا مدیر، به راحتی می‌توانستی حدس بزنی Ú©Ù‡ کی‌ها با هم قرار Ùˆ مداری دارند Ùˆ کدام یک پهلو دست کدام یک خواهد نشست. یکی دو بار کوشیدم بالای دست یکی‌شان بایستم Ùˆ ببینم Ú†Ù‡ می‌نویسد. ولی چنان مضطرب می‌شدند Ùˆ دستشان به لرزه می‌اÙتاد Ú©Ù‡ از نوشتن باز می‌ماندند. می‌دیدم Ú©Ù‡ این مردان آینده، درین کلاس‌ها Ùˆ امتحان‌ها آن قدر خواهند ترسید Ú©Ù‡ وقتی دیپلمه بشوند یا لیسانسه، اصلاً آدم نوع جدیدی خواهند شد. آدمی انباشته از وحشت، انبانی از ترس Ùˆ دلهره. به این ترتیب یک روز بیشتر دوام نیاوردم. چون دیدم نمی‌توانم قلب بچگانه‌ای داشته باشم تا با آن ترس Ùˆ وحشت بچه‌ها را درک کنم Ùˆ هم‌دردی نشان بدهم.این جور بود Ú©Ù‡ می‌دیدم Ú©Ù‡ معلم مدرسه هم نمی‌توانم باشم. + +دو روز قبل از عید کارنامه‌ها آماده بود Ùˆ منتظر امضای مدیر. دویست Ùˆ سی Ùˆ شش تا امضا اقلاً تا ظهر طول می‌کشید. پیش از آن هم تا می‌توانستم از امضای دÙترهای حضور Ùˆ غیاب می‌گریختم. خیلی از جیره‌خورهای دولت در ادارات دیگر یا در میان همکارانم دیده بودم Ú©Ù‡ در مواقع بیکاری تمرین امضا می‌کنند. پیش از آن نمی‌توانستم بÙهمم Ú†Ù‡ طور از مدیری یک مدرسه یا کارمندی ساده یک اداره می‌شود به وزارت رسید. یا اصلاً آرزویش را داشت. نیم‌قراضه امضای آماده Ùˆ هر کدام معر٠یک شخصیت، بعد نیم‌ذرع زبان چرب Ùˆ نرم Ú©Ù‡ با آن، مار را از سوراخ بیرون بکشی، یا همه جا را بلیسی Ùˆ یک دست هم قیاÙÙ‡. نه یک جور. دوازده جور. + +در این Ùکرها بودم Ú©Ù‡ ناگهان در میان کارنامه‌ها چشمم به یک اسم آشنا اÙتاد. به اسم پسران جناب سرهنگ Ú©Ù‡ رئیس انجمن بود. رÙتم توی نخ نمراتش. همه متوسط بود Ùˆ جای ایرادی نبود. Ùˆ یک مرتبه به صراÙت اÙتادم Ú©Ù‡ از اول سال تا به حال بچه‌های مدرسه را Ùقط به اعتبار وضع مالی پدرشان قضاوت کرده‌ام. درست مثل این پسر سرهنگ Ú©Ù‡ به اعتبار کیابیای پدرش درس نمی‌خواند. دیدم هر کدام Ú©Ù‡ پدرشان Ùقیرتر است به نظر من باهوش‌تر می‌آمده‌اند. البته ناظم با این حرÙ‌ها کاری نداشت. مر قانونی را عمل می‌کرد. از یکی چشم می‌پوشید به دیگری سخت می‌گرÙت. + +اما من مثل این Ú©Ù‡ قضاوتم را درباره‌ی بچه‌ها از پیش کرده باشم Ùˆ Ú†Ù‡ خوب بود Ú©Ù‡ نمره‌ها در اختیار من نبود Ùˆ آن یکی هم «انظباط» مال آخر سال بود. مسخره‌ترین کارها آن است Ú©Ù‡ کسی به اصلاح وضعی دست بزند، اما در قلمروی Ú©Ù‡ تا سر دماغش بیشتر نیست. Ùˆ تازه مدرسه‌ی من، این قلمروی Ùعالیت من، تا سر دماغم هم نبود. به همان توی ذهنم ختم می‌شد. وضعی را Ú©Ù‡ دیگران ترتیب داده بودند. به این ترتیب بعد از پنج شش ماه، می‌Ùهمیدم Ú©Ù‡ حسابم یک حساب عقلایی نبوده است. احساساتی بوده است. ضعÙ‌های احساساتی مرا خشونت‌های عملی ناظم جبران می‌کرد Ùˆ این بود Ú©Ù‡ جمعاً نمی‌توانستم ازو بگذرم. مرد عمل بود. کار را می‌برید Ùˆ پیش می‌رÙت. در زندگی Ùˆ در هر کاری، هر قدمی بر می‌داشت، برایش هد٠بود. Ùˆ چشم از وجوه دیگر قضیه می‌پوشید. این بود Ú©Ù‡ برش داشت. Ùˆ من نمی‌توانستم. چرا Ú©Ù‡ اصلاً مدیر نبودم. خلاص... + +Ùˆ کارنامه‌ی پسر سرهنگ را Ú©Ù‡ زیر دستم عرق کرده بود، به دقت Ùˆ احتیاج خشک کردم Ùˆ امضایی زیر آن گذاشتم به قدری بد خط Ùˆ مسخره بود Ú©Ù‡ به یاد امضای Ùراش جدیدمان اÙتادم. حتماً جناب سرهنگ کلاÙÙ‡ می‌شد Ú©Ù‡ چرا چنین آدم بی‌سوادی را با این خط Ùˆ ربط امضا مدیر مدرسه کرده‌اند. آخر یک جناب سرهنگ هم می‌داند Ú©Ù‡ امضای آدم معر٠شخصیت آدم است. + +اواخر تعطیلات نوروز رÙتم به ملاقات معلم ترکه‌ای کلاس سوم. ناظم Ú©Ù‡ با او میانه‌ی خوشی نداشت. ناچار با معلم حساب کلاس پنج Ùˆ شش قرار Ùˆ مداری گذاشته بودم Ú©Ù‡ مختصری علاقه‌ای هم به آن حر٠و سخن‌ها داشت. هم به وسیله‌ی او بود Ú©Ù‡ می‌دانستم نشانی‌اش کجا است Ùˆ توی کدام زندان است. در راه قبل از هر چیز خبر داد Ú©Ù‡ رئیس Ùرهنگ عوض شده Ùˆ این طور Ú©Ù‡ شایع است یکی از هم دوره‌ای‌های من، جایش آمده. Ú¯Ùتم: + +- عجب! چرا؟ Ù…Ú¯Ù‡ رئیس قبلی چپش Ú©Ù… بود؟ + +- Ú†Ù‡ عرض کنم. می‌گند پا تو Ú©ÙØ´ یکی از نماینده‌ها کرده. شما خبر ندارید؟ + +- Ú†Ù‡ طور؟ از کجا خبر داشته باشم؟ + +- هیچ Ú†ÛŒ... Ù…ÛŒ گند دو تا از کارچاق‌کن‌های انتخاباتی یارو از صندوق Ùرهنگ حقوق می‌گرÙته‌اند؛ شب عیدی رئیس Ùرهنگ حقوق‌شون رو زده. + +- عجب! پس اونم می‌خواسته اصلاحات کنه! بیچاره. + +Ùˆ بعد از این حر٠زدیم Ú©Ù‡ الحمدالله مدرسه مرتب است Ùˆ آرام Ùˆ معلم‌ها همکاری می‌کنند Ùˆ ناظم بیش از اندازه همه‌کاره شده است. Ùˆ من Ùهمیدم Ú©Ù‡ باز لابد مشتری خصوصی تازه‌ای پیدا شده است Ú©Ù‡ سر Ùˆ صدای همه همکارها بلند شده. دم در زندان شلوغ بود. کلاه مخملی‌ها، عم‌قزی گل‌بته‌ها، خاله خانباجی‌ها Ùˆ... اسم نوشتیم Ùˆ نوبت گرÙتیم Ùˆ به جای پاها، دست‌هامان زیر بار Ú©ÙˆÚ†Ú©ÛŒ Ú©Ù‡ داشتیم، خسته شد Ùˆ خواب رÙت تا نوبتمان شد. از این اتاق به آن اتاق Ùˆ عاقبت نرده‌های آهنی Ùˆ پشت آن معلم کلاس سه Ùˆ... عجب چاق شده بود!درست مثل یک آدم حسابی شده بود. خوشحال شدیم Ùˆ احوالپرسی Ùˆ تشکر؛ Ùˆ دیگر Ú†Ù‡ بگویم؟ بگویم چرا خودت را به دردسر انداختی؟ پیدا بود از مدرسه Ùˆ کلاس به او خوش‌تر می‌گذرد. ایمانی بود Ùˆ او آن را داشت Ùˆ خوشبخت بود Ùˆ دردسری نمی‌دید Ùˆ زندان حداقل برایش کلاس درس بود. عاقبت پرسیدم: + +- پرونده‌ای هم برات درست کردند یا هنوز بلاتکلیÙی؟ + +- امتحانمو دادم آقا مدیر، بد از آب در نیومد. + +- یعنی چه؟ + +- یعنی بی‌تکلی٠نیستم. چون اسمم تو لیست جیره‌ی زندون رÙته. خیالم راحته. چون سختی‌هاش گذشته. + +دیگر Ú†Ù‡ بگویم. دیدم چیزی ندارم خداحاÙظی کردم Ùˆ او را با معلم حساب تنها گذاشتم Ùˆ آمدم بیرون Ùˆ تا مدت ملاقات تمام بشود، دم در زندان قدم زدم Ùˆ به زندانی Ùکر کردم Ú©Ù‡ برای خودم ساخته بودم. یعنی آن خرپول Ùرهنگ‌دوست ساخته بود. Ùˆ من به میل Ùˆ رغبت خودم را در آن زندانی کرده بودم. این یکی را به ضرب دگنک این جا آورده بودند. ناچار حق داشت Ú©Ù‡ خیالش راحت باشد. اما من به میل Ùˆ رغبت رÙته بودم Ùˆ Ú†Ù‡ بکنم؟ ناظم Ú†Ù‡ طور؟ راستی اگر رئیس Ùرهنگ از هم دوره‌ای‌های خودم باشد؛ Ú†Ù‡ طور است بروم Ùˆ ازو بخواهم Ú©Ù‡ ناظم را جای من بگذارد، یا همین معلم حساب را؟... Ú©Ù‡ معلم حساب در آمد Ùˆ راه اÙتادیم. با او هم دیگر حرÙÛŒ نداشتم. سر پیچ خداحاÙظ شما Ùˆ تاکسی گرÙتم Ùˆ یک سر به اداره‌ی Ùرهنگ زدم. گرچه دهم عید بود، اما هنوز رÙت Ùˆ آمد سال نو تمام نشده بود. برو Ùˆ بیا Ùˆ شیرینی Ùˆ چای دو جانبه. رÙتم تو. سلام Ùˆ تبریک Ùˆ همین تعارÙات را پراندم. + +بله خودش بود. یکی از پخمه‌های کلاس. Ú©Ù‡ آخر سال سوم کشتیارش شدم دو بیت شعر را Ø­Ùظ کند، نتوانست Ú©Ù‡ نتوانست. Ùˆ حالا او رئیس بود Ùˆ من آقا مدیر. راستی حی٠از من، Ú©Ù‡ حتی وزیر چنین رئیس Ùرهنگ‌هایی باشم! میز همان طور پاک بود Ùˆ رÙته. اما زیرسیگاری انباشته از خاکستر Ùˆ ته سیگار. بلند شد Ùˆ چلپ Ùˆ چولوپ روبوسی کردیم Ùˆ پهلوی خودش جا باز کرد Ùˆ گوش تا گوش جیره‌خورهای Ùرهنگ تبریکات صمیمانه Ùˆ بدگویی از ماسبق Ùˆ هندوانه Ùˆ پیزرها! Ùˆ دو Ù†Ùر Ú©Ù‡ قد Ùˆ قواره‌شان به درد گود زورخانه می‌خورد یا پای صندوق انتخابات شیرینی به مردم می‌دادند. نزدیک بود شیرینی را توی ظرÙØ´ بیندازم Ú©Ù‡ دیدم بسیار احمقانه است. سیگارم Ú©Ù‡ تمام شد قضیه‌ی رئیس Ùرهنگ قبلی Ùˆ آن دو Ù†Ùر را در گوشی ازش پرسیدم، حرÙÛŒ نزد. Ùقط نگاهی می‌کرد Ú©Ù‡ شبیه التماس بود Ùˆ من Ùرصت جستم تا وضع معلم کلاس سوم را برایش روشن کنم Ùˆ از او بخواهم تا آن جا Ú©Ù‡ می‌تواند جلوی حقوقش را نگیرد. Ùˆ از در Ú©Ù‡ آمدم بیرون، تازه یادم آمد Ú©Ù‡ برای کار دیگری پیش رئیس Ùرهنگ بودم. + +باز دیروز اÙتضاحی به پا شد. معقول یک ماهه‌ی Ùروردین راحت بودیم. اول اردیبهشت ماه جلالی Ùˆ کوس رسوایی سر دیوار مدرسه. نزدیک آخر وقت یک جÙت پدر Ùˆ مادر، بچه‌شان در میان، وارد اتاق شدند. یکی بر اÙروخته Ùˆ دیگری رنگ Ùˆ رو باخته Ùˆ بچه‌شان عیناً مثل این عروسک‌های Ú©ÙˆÚ©ÛŒ. سلام Ùˆ علیک Ùˆ نشستند. خدایا دیگر Ú†Ù‡ اتÙاقی اÙتاده است؟ + +- Ú†Ù‡ خبر شده Ú©Ù‡ با خانوم سراÙرازمون کردید؟ + +مرد اشاره‌ای به زنش کرد Ú©Ù‡ بلند شد Ùˆ دست بچه را گرÙت Ùˆ رÙت بیرون Ùˆ من ماندم Ùˆ پدر. اما حر٠نمی‌زد. به خودش Ùرصت می‌داد تا عصبانیتش بپزد. سیگارم را در آوردم Ùˆ تعارÙØ´ کردم. مثل این Ú©Ù‡ مگس مزاحمی را از روی دماغش بپراند، سیگار را رد کرد Ùˆ من Ú©Ù‡ سیگارم را آتش می‌زدم، Ùکر کردم لابد دردی دارد Ú©Ù‡ چنین دست Ùˆ پا بسته Ùˆ چنین متکی به خانواده به مدرسه آمده. باز پرسیدم: + +- خوب، حالا Ú†Ù‡ Ùرمایش داشتید؟ + +Ú©Ù‡ یک مرتبه ترکید: + +- اگه من مدیر مدرسه بودم Ùˆ هم‌چه اتÙاقی می‌اÙتاد، شیکم خودمو پاره می‌کردم. خجالت بکش مرد! برو استعÙا بده. تا اهل محل نریختن تیکه تیکه‌ات کنند، دو تا گوشتو وردار Ùˆ دررو. بچه‌های مردم می‌آن این جا درس بخونن Ùˆ حسن اخلاق. نمی‌آن Ú©Ù‡... + +- این مزخرÙات کدومه آقا! حر٠حساب سرکار چیه؟ + +Ùˆ حرکتی کردم Ú©Ù‡ او را از در بیندازم بیرون. اما آخر باید می‌Ùهمیدم Ú†Ù‡ مرگش است. «ولی آخر با من Ú†Ù‡ کار دارد؟» + +- آبروی من رÙته. آبروی صد ساله‌ی خونواده‌ام رÙته. اگه در مدرسه‌ی تو رو تخته نکنم، تخم بابام نیستم. آخه من دیگه با این بچه Ú†ÛŒ کار کنم؟ تو این مدرسه ناموس مردم در خطره. کلانتری Ùهمیده؛ پزشک قانونی Ùهمیده؛ یک پرونده درست شده پنجاه ورق؛ تازه می‌گی حر٠حسابم چیه؟ حر٠حسابم اینه Ú©Ù‡ صندلی Ùˆ این مقام از سر تو زیاده. حر٠حسابم اینه Ú©Ù‡ می‌دم محاکمه‌ات کنند Ùˆ از نون خوردن بندازنت... + +او می‌گÙت Ùˆ من گوش می‌کردم Ùˆ مثل دو تا سگ هار به جان هم اÙتاده بودیم Ú©Ù‡ در باز شد Ùˆ ناظم آمد تو. به دادم رسید. در همان حال Ú©Ù‡ من Ùˆ پدر بچه در حال دعوا بودیم زن Ùˆ بچه همان آقا رÙته بودند Ùˆ قضایا را برای ناظم تعری٠کرده بودند Ùˆ او Ùرستاده بوده Ùاعل را از کلاس کشیده بودند بیرون... Ùˆ Ú¯Ùت Ú†Ù‡ طور است زنگ بزنیم Ùˆ جلوی بچه‌ها ادبش کنیم Ùˆ کردیم. یعنی این بار خود من رÙتم میدان. پسرک نره‌خری بود از پنجمی‌ها با لباس مرتب Ùˆ صورت سرخ Ùˆ سÙید Ùˆ سالکی به گونه. جلوی روی بچه‌ها کشیدمش زیر مشت Ùˆ لگد Ùˆ بعد سه تا از ترکه‌ها را Ú©Ù‡ Ùراش جدید Ùوری از باغ همسایه آورده بود، به سر Ùˆ صورتش خرد کردم. چنان وحشی شده بودم Ú©Ù‡ اگر ترکه‌ها نمی‌رسید، پسرک را کشته بودم. این هم بود Ú©Ù‡ ناظم به دادش رسید Ùˆ وساطت کرد Ùˆ لاشه‌اش را توی دÙتر بردند Ùˆ بچه‌ها را مرخص کردند Ùˆ من به اتاقم برگشتم Ùˆ با حالی زار روی صندلی اÙتادم، نه از پدر خبری بود Ùˆ نه از مادر Ùˆ نه از عروسک‌های کوکی‌شان Ú©Ù‡ ناموسش دست کاری شده بود. Ùˆ تازه احساس کردم Ú©Ù‡ این کتک‌کاری را باید به او می‌زدم. خیس عرق بودم Ùˆ دهانم تلخ بود. تمام Ùحش‌هایی Ú©Ù‡ می‌بایست به آن مردکه‌ی دبنگ می‌دادم Ùˆ نداده بودم، در دهانم رسوب کرده بود Ùˆ مثل دم مار تلخ شده بود. اصلاً چرا زدمش؟ چرا نگذاشتم مثل همیشه ناظم میدان‌داری کند Ú©Ù‡ هم کارکشته‌تر بود Ùˆ هم خونسردتر. لابد پسرک با دخترعمه‌اش هم نمی‌تواند بازی کند. لابد توی خانواده‌شان، دخترها سر ده دوازده سالگی باید از پسرهای هم سن رو بگیرند. نکند عیبی کرده باشد؟ Ùˆ یک مرتبه به صراÙت اÙتادم Ú©Ù‡ بروم ببینم Ú†Ù‡ بلایی به سرش آورده‌ام. بلند شدم Ùˆ یکی از Ùراش‌ها را صدا کردم Ú©Ù‡ Ùهمیدم روانه‌اش کرده‌اند. آبی آورد Ú©Ù‡ روی دستم می‌ریخت Ùˆ صورتم را می‌شستم Ùˆ می‌کوشیدم Ú©Ù‡ لرزش دست‌هایم را نبیند. Ùˆ در گوشم آهسته Ú¯Ùت Ú©Ù‡ پسر مدیر شرکت اتوبوسرانی است Ùˆ بدجوری کتک خورده Ùˆ آن‌ها خیلی سعی کرده‌اند Ú©Ù‡ تر Ùˆ تمیزش کنند... + +احمق مثلا داشت توی دل مرا خالی می‌کرد. نمی‌دانست Ú©Ù‡ من اول تصمیم را گرÙتم، بعد مثل سگ هار شدم. Ùˆ تازه می‌Ùهمیدم کسی را زده‌ام Ú©Ù‡ لیاقتش را داشته. حتماً از این اتÙاق‌ها جای دیگر هم می‌اÙتد. آدم بردارد پایین تنه بچه‌ی خودش را، یا به قول خودش ناموسش را بگذارد سر گذر Ú©Ù‡ کلانتر محل Ùˆ پزشک معاینه کنند! تا پرونده درست کنند؟ با این پدرو مادرها بچه‌ها حق دارند Ú©Ù‡ قرتی Ùˆ دزد Ùˆ دروغگو از آب در بیایند. این مدرسه‌ها را اول برای پدر Ùˆ مادرها باز کنند... + +با این اÙکار به خانه رسیدم. زنم در را Ú©Ù‡ باز کرد؛ چشم‌هایش گرد شد. همیشه وقتی می‌ترسد این طور می‌شود. برای اینکه خیال نکند آدم کشته‌ام، زود قضایا را برایش Ú¯Ùتم. Ùˆ دیدم Ú©Ù‡ در ماند. یعنی ساکت ماند. آب سرد، عرق بیدمشک، سیگار پشت سیگار Ùایده نداشت، لقمه از گلویم پایین نمی‌رÙت Ùˆ دست‌ها هنوز می‌لرزید. هر کدام به اندازه‌ی یک ماه Ùعالیت کرده بودند. با سیگار چهارم شروع کردم: + +- می‌دانی زن؟ بابای یارو پول‌داره. مسلماً کار به دادگستری Ùˆ این جور خنس‌ها می‌کشه. مدیریت Ú©Ù‡ الÙاتحه. اما خیلی دلم می‌خواد قضیه به دادگاه برسه. یک سال آزگار رو دل کشیده‌ام Ùˆ دیگه خسته شده‌ام. دلم می‌خواد یکی بپرسه چرا بچه‌ی مردم رو این طوری زدی، چرا تنبیه بدنی کردی! آخه یک مدیر مدرسه هم حرÙ‌هایی داره Ú©Ù‡ باید یک جایی بزنه... + +Ú©Ù‡ بلند شد Ùˆ رÙت سراغ تلÙÙ†. دو سه تا از دوستانم را Ú©Ù‡ در دادگستری کاره‌ای بودند، گرÙت Ùˆ خودم قضیه را برایشان Ú¯Ùتم Ú©Ù‡ مواظب باشند. Ùردا پسرک Ùاعل به مدرسه نیامده بود. Ùˆ ناظم برایم Ú¯Ùت Ú©Ù‡ قضیه ازین قرار بوده است Ú©Ù‡ دوتایی به هوای دیدن مجموعه تمبرهای Ùاعل با هم به خانه‌ای می‌روند Ùˆ قضایا همان جا اتÙاق می‌اÙتد Ùˆ داد Ùˆ هوار Ùˆ دخالت پدر Ùˆ مادرهای طرÙین Ùˆ خط Ùˆ نشان Ùˆ شبانه کلانتری؛ Ùˆ تمام اهل محل خبر دارند. او هم نظرش این بود Ú©Ù‡ کار به دادگستری خواهد کشید. + +Ùˆ من یک Ù‡Ùته‌ی تمام به انتظار اخطاریه‌ی دادگستری صبح Ùˆ عصر به مدرسه رÙتم Ùˆ مثل بخت‌النصر پشت پنجره ایستادم. اما در تمام این مدت نه از Ùاعل خبری شد، نه از Ù…Ùعول Ùˆ نه از پدر Ùˆ مادر ناموس‌پرست Ùˆ نه از مدیر شرکت اتوبوسرانی. انگار نه انگار Ú©Ù‡ اتÙاقی اÙتاده. بچه‌ها می‌آمدند Ùˆ می‌رÙتند؛ برای آب خوردن عجله می‌کردند؛ به جای بازی کتک‌کاری می‌کردند Ùˆ همه چیز مثل قبل بود. Ùقط من ماندم Ùˆ یک دنیا حر٠و انتظار. تا عاقبت رسید.... احضاریه‌ای با تعیین وقت قبلی برای دو روز بعد، در Ùلان شعبه Ùˆ پیش Ùلان بازپرس دادگستری. آخر کسی پیدا شده بود Ú©Ù‡ به حرÙÙ… گوش کند. + +تا دو روز بعد Ú©Ù‡ موعد احضار بود، اصلاً از خانه در نیامدم. نشستم Ùˆ ماحصل حرÙ‌هایم را روی کاغذ آوردم. حرÙ‌هایی Ú©Ù‡ با همه‌ی چرندی هر وزیر Ùرهنگی می‌توانست با آن یک برنامه‌ی Ù‡Ùت ساله برای کارش بریزد. Ùˆ سر ساعت معین رÙتم دادگستری. اتاق معین Ùˆ بازپرس معین. در را باز کردم Ùˆ سلام، Ùˆ تا آمدم خودم را معرÙÛŒ کنم Ùˆ احضاریه را در بیاورم، یارو پیش‌دستی کرد Ùˆ صندلی آورد Ùˆ چای سÙارش داد Ùˆ «احتیاجی به این حرÙ‌ها نیست Ùˆ قضیه‌ی Ú©ÙˆÚ†Ú© بود Ùˆ حل شد Ùˆ راضی به زحمت شما نبودیم...» + +Ú©Ù‡ عرق سرد بر بدن من نشست. چایی‌ام را Ú©Ù‡ خوردم، روی همان کاغذ نشان‌دار دادگستری استعÙانامه‌ام را نوشتم Ùˆ به نام هم‌کلاسی پخمه‌ام Ú©Ù‡ تازه رئیس شده بود، دم در پست کردم. +EOT; +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/fi_FI/Address.php b/vendor/fzaninotto/faker/src/Faker/Provider/fi_FI/Address.php new file mode 100644 index 0000000..8e0829e --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/fi_FI/Address.php @@ -0,0 +1,85 @@ + 'Argovie'), + array('AI' => 'Appenzell Rhodes-Intérieures'), + array('AR' => 'Appenzell Rhodes-Extérieures'), + array('BE' => 'Berne'), + array('BL' => 'Bâle-Campagne'), + array('BS' => 'Bâle-Ville'), + array('FR' => 'Fribourg'), + array('GE' => 'Genève'), + array('GL' => 'Glaris'), + array('GR' => 'Grisons'), + array('JU' => 'Jura'), + array('LU' => 'Lucerne'), + array('NE' => 'Neuchâtel'), + array('NW' => 'Nidwald'), + array('OW' => 'Obwald'), + array('SG' => 'Saint-Gall'), + array('SH' => 'Schaffhouse'), + array('SO' => 'Soleure'), + array('SZ' => 'Schwytz'), + array('TG' => 'Thurgovie'), + array('TI' => 'Tessin'), + array('UR' => 'Uri'), + array('VD' => 'Vaud'), + array('VS' => 'Valais'), + array('ZG' => 'Zoug'), + array('ZH' => 'Zurich') + ); + + protected static $cityFormats = array( + '{{cityName}}', + ); + + protected static $streetNameFormats = array( + '{{streetPrefix}} {{lastName}}', + '{{streetPrefix}} de {{cityName}}', + '{{streetPrefix}} de {{lastName}}' + ); + + protected static $streetAddressFormats = array( + '{{streetName}} {{buildingNumber}}', + ); + protected static $addressFormats = array( + "{{streetAddress}}\n{{postcode}} {{city}}", + ); + + /** + * Returns a random street prefix + * @example Rue + * @return string + */ + public static function streetPrefix() + { + return static::randomElement(static::$streetPrefix); + } + + /** + * Returns a random city name. + * @example Luzern + * @return string + */ + public function cityName() + { + return static::randomElement(static::$cityNames); + } + + /** + * Returns a canton + * @example array('BE' => 'Bern') + * @return array + */ + public static function canton() + { + return static::randomElement(static::$canton); + } + + /** + * Returns the abbreviation of a canton. + * @return string + */ + public static function cantonShort() + { + $canton = static::canton(); + return key($canton); + } + + /** + * Returns the name of canton. + * @return string + */ + public static function cantonName() + { + $canton = static::canton(); + return current($canton); + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/fr_CH/Company.php b/vendor/fzaninotto/faker/src/Faker/Provider/fr_CH/Company.php new file mode 100644 index 0000000..bf3b0ae --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/fr_CH/Company.php @@ -0,0 +1,15 @@ + 'Ain'), array('02' => 'Aisne'), array('03' => 'Allier'), array('04' => 'Alpes-de-Haute-Provence'), array('05' => 'Hautes-Alpes'), + array('06' => 'Alpes-Maritimes'), array('07' => 'Ardèche'), array('08' => 'Ardennes'), array('09' => 'Ariège'), array('10' => 'Aube'), + array('11' => 'Aude'), array('12' => 'Aveyron'), array('13' => 'Bouches-du-Rhône'), array('14' => 'Calvados'), array('15' => 'Cantal'), + array('16' => 'Charente'), array('17' => 'Charente-Maritime'), array('18' => 'Cher'), array('19' => 'Corrèze'), array('2A' => 'Corse-du-Sud'), + array('2B' => 'Haute-Corse'), array('21' => "Côte-d'Or"), array('22' => "Côtes-d'Armor"), array('23' => 'Creuse'), array('24' => 'Dordogne'), + array('25' => 'Doubs'), array('26' => 'Drôme'), array('27' => 'Eure'), array('28' => 'Eure-et-Loir'), array('29' => 'Finistère'), array('30' => 'Gard'), + array('31' => 'Haute-Garonne'), array('32' => 'Gers'), array('33' => 'Gironde'), array('34' => 'Hérault'), array('35' => 'Ille-et-Vilaine'), + array('36' => 'Indre'), array('37' => 'Indre-et-Loire'), array('38' => 'Isère'), array('39' => 'Jura'), array('40' => 'Landes'), array('41' => 'Loir-et-Cher'), + array('42' => 'Loire'), array('43' => 'Haute-Loire'), array('44' => 'Loire-Atlantique'), array('45' => 'Loiret'), array('46' => 'Lot'), + array('47' => 'Lot-et-Garonne'), array('48' => 'Lozère'), array('49' => 'Maine-et-Loire'), array('50' => 'Manche'), array('51' => 'Marne'), + array('52' => 'Haute-Marne'), array('53' => 'Mayenne'), array('54' => 'Meurthe-et-Moselle'), array('55' => 'Meuse'), array('56' => 'Morbihan'), + array('57' => 'Moselle'), array('58' => 'Nièvre'), array('59' => 'Nord'), array('60' => 'Oise'), array('61' => 'Orne'), array('62' => 'Pas-de-Calais'), + array('63' => 'Puy-de-Dôme'), array('64' => 'Pyrénées-Atlantiques'), array('65' => 'Hautes-Pyrénées'), array('66' => 'Pyrénées-Orientales'), + array('67' => 'Bas-Rhin'), array('68' => 'Haut-Rhin'), array('69' => 'Rhône'), array('70' => 'Haute-Saône'), array('71' => 'Saône-et-Loire'), + array('72' => 'Sarthe'), array('73' => 'Savoie'), array('74' => 'Haute-Savoie'), array('75' => 'Paris'), array('76' => 'Seine-Maritime'), + array('77' => 'Seine-et-Marne'), array('78' => 'Yvelines'), array('79' => 'Deux-Sèvres'), array('80' => 'Somme'), array('81' => 'Tarn'), + array('82' => 'Tarn-et-Garonne'), array('83' => 'Var'), array('84' => 'Vaucluse'), array('85' => 'Vendée'), array('86' => 'Vienne'), + array('87' => 'Haute-Vienne'), array('88' => 'Vosges'), array('89' => 'Yonne'), array('90' => 'Territoire de Belfort'), array('91' => 'Essonne'), + array('92' => 'Hauts-de-Seine'), array('93' => 'Seine-Saint-Denis'), array('94' => 'Val-de-Marne'), array('95' => "Val-d'Oise"), + array('971' => 'Guadeloupe'), array('972' => 'Martinique'), array('973' => 'Guyane'), array('974' => 'La Réunion'), array('976' => 'Mayotte') + ); + + /** + * @example 'rue' + */ + public static function streetPrefix() + { + return static::randomElement(static::$streetPrefix); + } + + /** + * Randomly returns a french region. + * + * @example 'Guadeloupe' + * + * @return string + */ + public static function region() + { + return static::randomElement(static::$regions); + } + + /** + * Randomly returns a french department ('departmentNumber' => 'departmentName'). + * + * @example array('2B' => 'Haute-Corse') + * + * @return array + */ + public static function department() + { + return static::randomElement(static::$departments); + } + + /** + * Randomly returns a french department name. + * + * @example 'Ardèche' + * + * @return string + */ + public static function departmentName() + { + $randomDepartmentName = array_values(static::department()); + + return $randomDepartmentName[0]; + } + + /** + * Randomly returns a french department number. + * + * @example '59' + * + * @return string + */ + public static function departmentNumber() + { + $randomDepartmentNumber = array_keys(static::department()); + + return $randomDepartmentNumber[0]; + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/fr_FR/Company.php b/vendor/fzaninotto/faker/src/Faker/Provider/fr_FR/Company.php new file mode 100644 index 0000000..5f44066 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/fr_FR/Company.php @@ -0,0 +1,169 @@ +generator->parse($format)); + + if ($this->isCatchPhraseValid($catchPhrase)) { + break; + } + } while (true); + + return $catchPhrase; + } + + /** + * Generates a siret number (14 digits) that passes the Luhn check. + * + * @see http://fr.wikipedia.org/wiki/Syst%C3%A8me_d'identification_du_r%C3%A9pertoire_des_%C3%A9tablissements + * @return string + */ + public function siret($formatted = true) + { + $siret = $this->siren(false); + $nicFormat = static::randomElement(static::$siretNicFormats); + $siret .= $this->numerify($nicFormat); + $siret .= Luhn::computeCheckDigit($siret); + if ($formatted) { + $siret = substr($siret, 0, 3) . ' ' . substr($siret, 3, 3) . ' ' . substr($siret, 6, 3) . ' ' . substr($siret, 9, 5); + } + + return $siret; + } + + /** + * Generates a siren number (9 digits) that passes the Luhn check. + * + * @see http://fr.wikipedia.org/wiki/Syst%C3%A8me_d%27identification_du_r%C3%A9pertoire_des_entreprises + * @return string + */ + public function siren($formatted = true) + { + $siren = $this->numerify('%#######'); + $siren .= Luhn::computeCheckDigit($siren); + if ($formatted) { + $siren = substr($siren, 0, 3) . ' ' . substr($siren, 3, 3) . ' ' . substr($siren, 6, 3); + } + + return $siren; + } + + /** + * @var array An array containing string which should not appear twice in a catch phrase. + */ + protected static $wordsWhichShouldNotAppearTwice = array('sécurité', 'simpl'); + + /** + * Validates a french catch phrase. + * + * @param string $catchPhrase The catch phrase to validate. + * + * @return boolean (true if valid, false otherwise) + */ + protected static function isCatchPhraseValid($catchPhrase) + { + foreach (static::$wordsWhichShouldNotAppearTwice as $word) { + // Fastest way to check if a piece of word does not appear twice. + $beginPos = strpos($catchPhrase, $word); + $endPos = strrpos($catchPhrase, $word); + + if ($beginPos !== false && $beginPos != $endPos) { + return false; + } + } + + return true; + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/fr_FR/Internet.php b/vendor/fzaninotto/faker/src/Faker/Provider/fr_FR/Internet.php new file mode 100644 index 0000000..8e3024b --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/fr_FR/Internet.php @@ -0,0 +1,9 @@ + static::latitude(46.262740, 47.564721), + 'longitude' => static::longitude(17.077949, 20.604560) + ); + } + + /* ----------- DATA -------------------- */ + + protected static $streetSuffix = array( + 'árok', 'átjáró', 'dűlÅ‘sor', 'dűlőút', 'erdÅ‘sor', 'fasor', 'forduló', 'gát', 'határsor', 'határút', 'híd', 'játszótér', 'kert', 'körönd', 'körtér', 'körút', 'köz', 'lakótelep', 'lejáró', 'lejtÅ‘', 'lépcsÅ‘', 'liget', 'mélyút', 'orom', 'országút', 'ösvény', 'park', 'part', 'pincesor', 'rakpart', 'sétány', 'sétaút', 'sor', 'sugárút', 'tér', 'tere', 'turistaút', 'udvar', 'út', 'útja', 'utca', 'üdülÅ‘part' + ); + protected static $postcode = array('####'); + protected static $state = array( + 'Budapest', 'Bács-Kiskun', 'Baranya', 'Békés', 'Borsod-Abaúj-Zemplén', 'Csongrád', 'Fejér', 'GyÅ‘r-Moson-Sopron', 'Hajdú-Bihar', 'Heves', 'Jász-Nagykun-Szolnok', 'Komárom-Esztergom', 'Nógrád', 'Pest', 'Somogy', 'Szabolcs-Szatmár-Bereg', 'Tolna', 'Vas', 'Veszprém', 'Zala' + ); + protected static $country = array( + 'Afganisztán', 'Albánia', 'Algéria', 'Amerikai Egyesült Ãllamok', 'Andorra', 'Angola', 'Antigua és Barbuda', 'Argentína', 'Ausztria', 'Ausztrália', 'Azerbajdzsán', + 'Bahama-szigetek', 'Bahrein', 'Banglades', 'Barbados', 'Belgium', 'Belize', 'Benin', 'Bhután', 'Bolívia', 'Bosznia-Hercegovina', 'Botswana', 'Brazília', 'Brunei', 'Bulgária', 'Burkina Faso', 'Burma', 'Burundi', + 'Chile', 'Ciprus', 'Costa Rica', 'Csehország', 'Csád', + 'Dominikai Köztársaság', 'Dominikai Közösség', 'Dzsibuti', 'Dánia', 'Dél-Afrika', 'Dél-Korea', 'Dél-Szudán', + 'Ecuador', 'EgyenlítÅ‘i-Guinea', 'Egyesült Arab Emírségek', 'Egyesült Királyság', 'Egyiptom', 'Elefántcsontpart', 'Eritrea', 'Etiópia', + 'Fehéroroszország', 'Fidzsi-szigetek', 'Finnország', 'Franciaország', 'Fülöp-szigetek', + 'Gabon', 'Gambia', 'Ghána', 'Grenada', 'Grúzia', 'Guatemala', 'Guinea', 'Guyana', 'Görögország', + 'Haiti', 'Hollandia', 'Horvátország', + 'India', 'Indonézia', 'Irak', 'Irán', 'Izland', 'Izrael', + 'Japán', 'Jemen', 'Jordánia', + 'Kambodzsa', 'Kamerun', 'Kanada', 'Katar', 'Kazahsztán', 'Kelet-Timor', 'Kenya', 'Kirgizisztán', 'Kiribati', 'Kolumbia', 'Kongói Demokratikus Köztársaság', 'Kongói Köztársaság', 'Kuba', 'Kuvait', 'Kína', 'Közép-Afrika', + 'Laosz', 'Lengyelország', 'Lesotho', 'Lettország', 'Libanon', 'Libéria', 'Liechtenstein', 'Litvánia', 'Luxemburg', 'Líbia', + 'Macedónia', 'Madagaszkár', 'Magyarország', 'Malawi', 'Maldív-szigetek', 'Mali', 'Malájzia', 'Marokkó', 'Marshall-szigetek', 'Mauritánia', 'Mexikó', 'Mikronézia', 'Moldova', 'Monaco', 'Mongólia', 'Montenegró', 'Mozambik', 'Málta', + 'Namíbia', 'Nauru', 'Nepál', 'Nicaragua', 'Niger', 'Nigéria', 'Norvégia', 'Németország', + 'Olaszország', 'Omán', 'Oroszország', + 'Pakisztán', 'Palau', 'Panama', 'Paraguay', 'Peru', 'Portugália', 'Pápua Új-Guinea', + 'Románia', 'Ruanda', + 'Saint Kitts és Nevis', 'Saint Vincent', 'Salamon-szigetek', 'Salvador', 'San Marino', 'Seychelle-szigetek', 'Spanyolország', 'Srí Lanka', 'Suriname', 'Svájc', 'Svédország', 'Szamoa', 'Szaúd-Arábia', 'Szenegál', 'Szerbia', 'Szingapúr', 'Szlovákia', 'Szlovénia', 'Szomália', 'Szudán', 'Szváziföld', 'Szíria', 'São Tomé és Príncipe', + 'Tadzsikisztán', 'Tanzánia', 'Thaiföld', 'Togo', 'Tonga', 'Trinidad és Tobago', 'Tunézia', 'Tuvalu', 'Törökország', 'Türkmenisztán', + 'Uganda', 'Ukrajna', 'Uruguay', + 'Vanuatu', 'Venezuela', 'Vietnám', + 'Zambia', 'Zimbabwe', 'Zöld-foki-szigetek', + 'Észak-Korea', 'Észtország', 'Ãrország', 'Örményország', 'Új-Zéland', 'Ãœzbegisztán' + ); + + /** + * Source: https://hu.wikipedia.org/wiki/Magyarorsz%C3%A1g_v%C3%A1rosainak_list%C3%A1ja + */ + protected static $capitals = array('Budapest'); + protected static $bigCities = array(' + Békéscsaba', 'Debrecen', 'Dunaújváros', 'Eger', 'Érd', 'GyÅ‘r', 'HódmezÅ‘vásárhely', 'Kaposvár', 'Kecskemét', 'Miskolc', 'Nagykanizsa', 'Nyíregyháza', 'Pécs', 'Salgótarján', 'Sopron', 'Szeged', 'Székesfehérvár', 'Szekszárd', 'Szolnok', 'Szombathely', 'Tatabánya', 'Veszprém', 'Zalaegerszeg' + ); + protected static $smallerCities = array( + 'Ajka', 'Aszód', 'Bácsalmás', + 'Baja', 'Baktalórántháza', 'Balassagyarmat', 'Balatonalmádi', 'Balatonfüred', 'Balmazújváros', 'Barcs', 'Bátonyterenye', 'Békés', 'Bélapátfalva', 'Berettyóújfalu', 'Bicske', 'Bóly', 'Bonyhád', 'Budakeszi', + 'Cegléd', 'Celldömölk', 'Cigánd', 'Csenger', 'Csongrád', 'Csorna', 'Csurgó', + 'Dabas', 'Derecske', 'Devecser', 'Dombóvár', 'Dunakeszi', + 'Edelény', 'Encs', 'Enying', 'Esztergom', + 'Fehérgyarmat', 'Fonyód', 'Füzesabony', + 'Gárdony', 'GödöllÅ‘', 'Gönc', 'Gyál', 'GyomaendrÅ‘d', 'Gyöngyös', 'Gyula', + 'Hajdúböszörmény', 'Hajdúhadház', 'Hajdúnánás', 'Hajdúszoboszló', 'Hatvan', 'Heves', + 'Ibrány', + 'Jánoshalma', 'Jászapáti', 'Jászberény', + 'Kalocsa', 'Kapuvár', 'Karcag', 'Kazincbarcika', 'Kemecse', 'Keszthely', 'Kisbér', 'KiskÅ‘rös', 'Kiskunfélegyháza', 'Kiskunhalas', 'Kiskunmajsa', 'Kistelek', 'Kisvárda', 'Komárom', 'Komló', 'Körmend', 'KÅ‘szeg', 'Kunhegyes', 'Kunszentmárton', 'Kunszentmiklós', + 'Lenti', 'Letenye', + 'Makó', 'Marcali', 'Martonvásár', 'Mátészalka', 'MezÅ‘csát', 'MezÅ‘kovácsháza', 'MezÅ‘kövesd', 'MezÅ‘túr', 'Mohács', 'Monor', 'Mór', 'Mórahalom', 'Mosonmagyaróvár', + 'Nagyatád', 'Nagykálló', 'Nagykáta', 'NagykÅ‘rös', 'Nyíradony', 'Nyírbátor', + 'Orosháza', 'Oroszlány', 'Ózd', + 'Paks', 'Pannonhalma', 'Pápa', 'Pásztó', 'Pécsvárad', 'Pétervására', 'Pilisvörösvár', 'Polgárdi', 'Püspökladány', 'Putnok', + 'Ráckeve', 'Rétság', + 'Sárbogárd', 'Sarkad', 'Sárospatak', 'Sárvár', 'Sásd', 'Sátoraljaújhely', 'Sellye', 'Siklós', 'Siófok', 'Sümeg', 'Szarvas', 'Szécsény', 'Szeghalom', 'Szentendre', 'Szentes', 'Szentgotthárd', 'SzentlÅ‘rinc', 'Szerencs', 'Szigetszentmiklós', 'Szigetvár', 'Szikszó', 'Szob', + 'Tab', 'Tamási', 'Tapolca', 'Tata', 'Tét', 'Tiszafüred', 'Tiszakécske', 'Tiszaújváros', 'Tiszavasvári', 'Tokaj', 'Tolna', 'Törökszentmiklós', + 'Vác', 'Várpalota', 'Vásárosnamény', 'Vasvár', 'Vecsés', + 'Záhony', 'Zalaszentgrót', 'Zirc' + ); +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/hu_HU/Company.php b/vendor/fzaninotto/faker/src/Faker/Provider/hu_HU/Company.php new file mode 100644 index 0000000..7131654 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/hu_HU/Company.php @@ -0,0 +1,13 @@ +generator->parse($format); + } + + public static function country() + { + return static::randomElement(static::$country); + } + + public static function postcode() + { + return static::toUpper(static::bothify(static::randomElement(static::$postcode))); + } + + public static function regionSuffix() + { + return static::randomElement(static::$regionSuffix); + } + + public static function region() + { + return static::randomElement(static::$region); + } + + public static function cityPrefix() + { + return static::randomElement(static::$cityPrefix); + } + + public function city() + { + return static::randomElement(static::$city); + } + + public function streetPrefix() + { + return static::randomElement(static::$streetPrefix); + } + + public static function street() + { + return static::randomElement(static::$street); + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/hy_AM/Color.php b/vendor/fzaninotto/faker/src/Faker/Provider/hy_AM/Color.php new file mode 100644 index 0000000..16b68d8 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/hy_AM/Color.php @@ -0,0 +1,12 @@ +generator->parse(static::randomElement(static::$formats))); + } + + public function code() + { + return static::randomElement(static::$codes); + } + + /** + * @return mixed + */ + public function numberFormat() + { + return static::randomElement(static::$numberFormats); + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/id_ID/Address.php b/vendor/fzaninotto/faker/src/Faker/Provider/id_ID/Address.php new file mode 100644 index 0000000..49fd1a7 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/id_ID/Address.php @@ -0,0 +1,316 @@ +generator->parse($format); + } + + public static function street() + { + return static::randomElement(static::$street); + } + + public static function buildingNumber() + { + return static::numberBetween(1, 999); + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/id_ID/Company.php b/vendor/fzaninotto/faker/src/Faker/Provider/id_ID/Company.php new file mode 100644 index 0000000..7839f1e --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/id_ID/Company.php @@ -0,0 +1,43 @@ +generator->parse($lastNameRandomElement); + } + + /** + * Return last name for male + * + * @access public + * @return string last name + */ + public static function lastNameMale() + { + return static::randomElement(static::$lastNameMale); + } + + /** + * Return last name for female + * + * @access public + * @return string last name + */ + public static function lastNameFemale() + { + return static::randomElement(static::$lastNameFemale); + } + + /** + * For academic title + * + * @access public + * @return string suffix + */ + public static function suffix() + { + return static::randomElement(static::$suffix); + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/id_ID/PhoneNumber.php b/vendor/fzaninotto/faker/src/Faker/Provider/id_ID/PhoneNumber.php new file mode 100644 index 0000000..de5c969 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/id_ID/PhoneNumber.php @@ -0,0 +1,55 @@ + + */ +class Address extends \Faker\Provider\Address +{ + /** + * @var array Countries in icelandic + */ + protected static $country = array( + 'Afganistan', 'Albanía', 'Alsír', 'Andorra', 'Angóla', 'Angvilla', 'Antígva og Barbúda', 'Argentína', + 'Armenía', 'Arúba', 'Aserbaídsjan', 'Austur-Kongó', 'Austurríki', 'Austur-Tímor', 'Ãlandseyjar', + 'Ãstralía', 'Bahamaeyjar', 'Bandaríkin', 'Bandaríska Samóa', 'Bangladess', 'Barbados', 'Barein', + 'Belgía', 'Belís', 'Benín', 'Bermúdaeyjar', 'Bosnía og Hersegóvína', 'Botsvana', 'Bouvet-eyja', 'Bólivía', + 'Brasilía', 'Bresku Indlandshafseyjar', 'Bretland', 'Brúnei', 'Búlgaría', 'Búrkína Fasó', 'Búrúndí', 'Bútan', + 'Cayman-eyjar', 'Chile', 'Cooks-eyjar', 'Danmörk', 'Djíbútí', 'Dóminíka', 'Dóminíska lýðveldið', 'Egyptaland', + 'Eistland', 'Ekvador', 'El Salvador', 'England', 'Erítrea', 'Eþíópía', 'Falklandseyjar', 'Filippseyjar', + 'Finnland', 'Fídjieyjar', 'Fílabeinsströndin', 'Frakkland', 'Franska Gvæjana', 'Franska Pólýnesía', + 'Frönsku suðlægu landsvæðin', 'Færeyjar', 'Gabon', 'Gambía', 'Gana', 'Georgía', 'Gíbraltar', 'Gínea', + 'Gínea-Bissá', 'Grenada', 'Grikkland', 'Grænhöfðaeyjar', 'Grænland', 'Gvadelúpeyjar', 'Gvam', 'Gvatemala', + 'Gvæjana', 'Haítí', 'Heard og McDonalds-eyjar', 'Holland', 'Hollensku Antillur', 'Hondúras', 'Hong Kong', + 'Hvíta-Rússland', 'Indland', 'Indónesía', 'Ãrak', 'Ãran', 'Ãrland', 'Ãsland', 'Ãsrael', 'Ãtalía', 'Jamaíka', + 'Japan', 'Jemen', 'Jólaey', 'Jómfrúaeyjar', 'Jórdanía', 'Kambódía', 'Kamerún', 'Kanada', 'Kasakstan', 'Katar', + 'Kenía', 'Kirgisistan', 'Kína', 'Kíribatí', 'Kongó', 'Austur-Kongó', 'Vestur-Kongó', 'Kostaríka', 'Kókoseyjar', + 'Kólumbía', 'Kómoreyjar', 'Kórea', 'Norður-Kórea;', 'Suður-Kórea', 'Króatía', 'Kúba', 'Kúveit', 'Kýpur', + 'Laos', 'Lesótó', 'Lettland', 'Liechtenstein', 'Litháen', 'Líbanon', 'Líbería', 'Líbía', 'Lúxemborg', + 'Madagaskar', 'Makaó', 'Makedónía', 'Malasía', 'Malaví', 'Maldíveyjar', 'Malí', 'Malta', 'Marokkó', + 'Marshall-eyjar', 'Martiník', 'Mayotte', 'Máritanía', 'Máritíus', 'Mexíkó', 'Mið-Afríkulýðveldið', + 'Miðbaugs-Gínea', 'Míkrónesía', 'Mjanmar', 'Moldóva', 'Mongólía', 'Montserrat', 'Mónakó', 'Mósambík', + 'Namibía', 'Nárú', 'Nepal', 'Niue', 'Níger', 'Nígería', 'Níkaragva', 'Norður-Ãrland', 'Norður-Kórea', + 'Norður-Maríanaeyjar', 'Noregur', 'Norfolkeyja', 'Nýja-Kaledónía', 'Nýja-Sjáland', 'Óman', 'Pakistan', + 'Palá', 'Palestína', 'Panama', 'Papúa Nýja-Gínea', 'Paragvæ', 'Páfagarður', 'Perú', 'Pitcairn', 'Portúgal', + 'Pólland', 'Púertó Ríkó', 'Réunion', 'Rúanda', 'Rúmenía', 'Rússland', 'Salómonseyjar', 'Sambía', + 'Sameinuðu arabísku furstadæmin', 'Samóa', 'San Marínó', 'Sankti Helena', 'Sankti Kristófer og Nevis', + 'Sankti Lúsía', 'Sankti Pierre og Miquelon', 'Sankti Vinsent og Grenadíneyjar', 'Saó Tóme og Prinsípe', + 'Sádi-Arabía', 'Senegal', 'Serbía', 'Seychelles-eyjar', 'Simbabve', 'Singapúr', 'Síerra Leóne', 'Skotland', + 'Slóvakía', 'Slóvenía', 'Smáeyjar Bandaríkjanna', 'Sómalía', 'Spánn', 'Srí Lanka', 'Suður-Afríka', + 'Suður-Georgía og Suður-Sandvíkureyjar', 'Suður-Kórea', 'Suðurskautslandið', 'Súdan', 'Súrínam', 'Jan Mayen', + 'Svartfjallaland', 'Svasíland', 'Sviss', 'Svíþjóð', 'Sýrland', 'Tadsjikistan', 'Taíland', 'Taívan', 'Tansanía', + 'Tékkland', 'Tonga', 'Tógó', 'Tókelá', 'Trínidad og Tóbagó', 'Tsjad', 'Tsjetsjenía', 'Turks- og Caicos-eyjar', + 'Túnis', 'Túrkmenistan', 'Túvalú', 'Tyrkland', 'Ungverjaland', 'Úganda', 'Úkraína', 'Úrúgvæ', 'Úsbekistan', + 'Vanúatú', 'Venesúela', 'Vestur-Kongó', 'Vestur-Sahara', 'Víetnam', 'Wales', 'Wallis- og Fútúnaeyjar', 'Þýskaland' + ); + + /** + * @var array Icelandic cities. + */ + protected static $cityNames = array( + 'Reykjavík', 'Seltjarnarnes', 'Vogar', 'Kópavogur', 'Garðabær', 'Hafnarfjörður', 'Reykjanesbær', 'Grindavík', + 'Sandgerði', 'Garður', 'Reykjanesbær', 'Mosfellsbær', 'Akranes', 'Borgarnes', 'Reykholt', 'Stykkishólmur', + 'Flatey', 'Grundarfjörður', 'Ólafsvík', 'Snæfellsbær', 'Hellissandur', 'Búðardalur', 'Reykhólahreppur', + 'Ãsafjörður', 'Hnífsdalur', 'Bolungarvík', 'Súðavík', 'Flateyri', 'Suðureyri', 'Patreksfjörður', + 'Tálknafjörður', 'Bíldudalur', 'Þingeyri', 'Staður', 'Hólmavík', 'Drangsnes', 'Ãrneshreppur', 'Hvammstangi', + 'Blönduós', 'Skagaströnd', 'Sauðárkrókur', 'Varmahlíð', 'Hofsós', 'Fljót', 'Siglufjörður', 'Akureyri', + 'Grenivík', 'Grímsey', 'Dalvík', 'Ólafsfjörður', 'Hrísey', 'Húsavík', 'Fosshóll', 'Laugar', 'Mývatn', + 'Kópasker', 'Raufarhöfn', 'Þórshöfn', 'Bakkafjörður', 'Vopnafjörður', 'Egilsstaðir', 'Seyðisfjörður', + 'Mjóifjörður', 'Borgarfjörður', 'Reyðarfjörður', 'Eskifjörður', 'Neskaupstaður', 'Fáskrúðsfjörður', + 'Stöðvarfjörður', 'Breiðdalsvík', 'Djúpivogur', 'Höfn', 'Selfoss', 'Hveragerði', 'Þorlákshöfn', 'Ölfus', + 'Eyrarbakki', 'Stokkseyri', 'Laugarvatn', 'Flúðir', 'Hella', 'Hvolsvöllur', 'Vík', 'Kirkjubæjarklaustur', + 'Vestmannaeyjar' + ); + + /** + * @var array Street name suffix. + */ + protected static $streetSuffix = array( + 'ás', 'bakki', 'braut', 'bær', 'brún', 'berg', 'fold', 'gata', 'gróf', + 'garðar', 'höfði', 'heimar', 'hamar', 'hólar', 'háls', 'kvísl', 'lækur', + 'leiti', 'land', 'múli', 'nes', 'rimi', 'stígur', 'stræti', 'stekkur', + 'slóð', 'skógar', 'sel', 'teigur', 'tún', 'vangur', 'vegur', 'vogur', + 'vað' + ); + + /** + * @var array Street name prefix. + */ + protected static $streetPrefix = array( + 'Aðal', 'Austur', 'Bakka', 'Braga', 'Báru', 'Brunn', 'Fiski', 'Leifs', + 'Týs', 'Birki', 'Suður', 'Norður', 'Vestur', 'Austur', 'Sanda', 'Skógar', + 'Stór', 'Sunnu', 'Tungu', 'Tangar', 'Úlfarfells', 'Vagn', 'Vind', 'Ysti', + 'Þing', 'Hamra', 'Hóla', 'Kríu', 'Iðu', 'Spóa', 'Starra', 'Uglu', 'Vals' + ); + + /** + * @var Icelandic zip code. + **/ + protected static $postcode = array( + '%##' + ); + + /** + * @var array Icelandic regions. + */ + protected static $regionNames = array( + 'Höfuðborgarsvæðið', 'Norðurland', 'Suðurland', 'Vesturland', 'Vestfirðir', 'Austurland', 'Suðurnes' + ); + + /** + * @var array Icelandic building numbers. + */ + protected static $buildingNumber = array( + '%##', '%#', '%#', '%', '%', '%', '%?', '% ?', + ); + + /** + * @var array Icelandic city format. + */ + protected static $cityFormats = array( + '{{cityName}}', + ); + + /** + * @var array Icelandic street's name formats. + */ + protected static $streetNameFormats = array( + '{{streetPrefix}}{{streetSuffix}}', + '{{streetPrefix}}{{streetSuffix}}', + '{{firstNameMale}}{{streetSuffix}}', + '{{firstNameFemale}}{{streetSuffix}}' + ); + + /** + * @var array Icelandic street's address formats. + */ + protected static $streetAddressFormats = array( + '{{streetName}} {{buildingNumber}}' + ); + + /** + * @var array Icelandic address format. + */ + protected static $addressFormats = array( + "{{streetAddress}}\n{{postcode}} {{city}}", + ); + + /** + * Randomly return a real city name. + * + * @return string + */ + public static function cityName() + { + return static::randomElement(static::$cityNames); + } + + /** + * Randomly return a street prefix. + * + * @return string + */ + public static function streetPrefix() + { + return static::randomElement(static::$streetPrefix); + } + + /** + * Randomly return a building number. + * + * @return string + */ + public static function buildingNumber() + { + return static::toUpper(static::bothify(static::randomElement(static::$buildingNumber))); + } + + /** + * Randomly return a real region name. + * + * @return string + */ + public static function region() + { + return static::randomElement(static::$regionNames); + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/is_IS/Company.php b/vendor/fzaninotto/faker/src/Faker/Provider/is_IS/Company.php new file mode 100644 index 0000000..6b93451 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/is_IS/Company.php @@ -0,0 +1,53 @@ + + */ +class Company extends \Faker\Provider\Company +{ + /** + * @var array Danish company name formats. + */ + protected static $formats = array( + '{{lastName}} {{companySuffix}}', + '{{lastName}} {{companySuffix}}', + '{{lastName}} {{companySuffix}}', + '{{firstname}} {{lastName}} {{companySuffix}}', + '{{middleName}} {{companySuffix}}', + '{{middleName}} {{companySuffix}}', + '{{middleName}} {{companySuffix}}', + '{{firstname}} {{middleName}} {{companySuffix}}', + '{{lastName}} & {{lastName}} {{companySuffix}}', + '{{lastName}} og {{lastName}} {{companySuffix}}', + '{{lastName}} & {{lastName}} {{companySuffix}}', + '{{lastName}} og {{lastName}} {{companySuffix}}', + '{{middleName}} & {{middleName}} {{companySuffix}}', + '{{middleName}} og {{middleName}} {{companySuffix}}', + '{{middleName}} & {{lastName}}', + '{{middleName}} og {{lastName}}', + ); + + /** + * @var array Company suffixes. + */ + protected static $companySuffix = array('ehf.', 'hf.', 'sf.'); + + /** + * @link http://www.rsk.is/atvinnurekstur/virdisaukaskattur/ + * + * @var string VSK number format. + */ + protected static $vskFormat = '%####'; + + /** + * Generates a VSK number (5 digits). + * + * @return string + */ + public static function vsk() + { + return static::numerify(static::$vskFormat); + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/is_IS/Internet.php b/vendor/fzaninotto/faker/src/Faker/Provider/is_IS/Internet.php new file mode 100644 index 0000000..a265da6 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/is_IS/Internet.php @@ -0,0 +1,23 @@ + + */ +class Internet extends \Faker\Provider\Internet +{ + /** + * @var array Some email domains in Denmark. + */ + protected static $freeEmailDomain = array( + 'gmail.com', 'yahoo.com', 'hotmail.com', 'visir.is', 'simnet.is', 'internet.is' + ); + + /** + * @var array Some TLD. + */ + protected static $tld = array( + 'com', 'com', 'com', 'net', 'is', 'is', 'is', + ); +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/is_IS/Payment.php b/vendor/fzaninotto/faker/src/Faker/Provider/is_IS/Payment.php new file mode 100644 index 0000000..c119c38 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/is_IS/Payment.php @@ -0,0 +1,19 @@ + + */ +class Person extends \Faker\Provider\Person +{ + /** + * @var array Icelandic person name formats. + */ + protected static $maleNameFormats = array( + '{{firstNameMale}} {{lastNameMale}}', + '{{firstNameMale}} {{lastNameMale}}', + '{{firstNameMale}} {{middleName}} {{lastNameMale}}', + '{{firstNameMale}} {{middleName}} {{lastNameMale}}', + ); + + protected static $femaleNameFormats = array( + '{{firstNameFemale}} {{lastNameFemale}}', + '{{firstNameFemale}} {{lastNameFemale}}', + '{{firstNameFemale}} {{middleName}} {{lastNameFemale}}', + '{{firstNameFemale}} {{middleName}} {{lastNameFemale}}', + ); + + /** + * @var string Icelandic women names. + */ + protected static $firstNameFemale = array('Aagot', 'Abela', 'Abigael', 'Ada', 'Adda', 'Addý', 'Adela', 'Adelía', 'Adríana', 'Aðalbjörg', 'Aðalbjört', 'Aðalborg', 'Aðaldís', 'Aðalfríður', 'Aðalheiður', 'Aðalrós', 'Aðalsteina', 'Aðalsteinunn', 'Aðalveig', 'Agata', 'Agatha', 'Agða', 'Agla', 'Agnea', 'Agnes', 'Agneta', 'Alanta', 'Alba', 'Alberta', 'Albína', 'Alda', 'Aldís', 'Aldný', 'Aleta', 'Aletta', 'Alexa', 'Alexandra', 'Alexandría', 'Alexis', 'Alexía', 'Alfa', 'Alfífa', 'Alice', 'Alida', 'Alída', 'Alína', 'Alís', 'Alísa', 'Alla', 'Allý', 'Alma', 'Alrún', 'Alva', 'Alvilda', 'Amadea', 'Amal', 'Amalía', 'Amanda', 'Amelía', 'Amilía', 'Amíra', 'Amy', 'Amý', 'Analía', 'Anastasía', 'Andra', 'Andrá', 'Andrea', 'Anetta', 'Angela', 'Angelíka', 'Anika', 'Anita', 'Aníka', 'Anína', 'Aníta', 'Anja', 'Ann', 'Anna', 'Annabella', 'Annalísa', 'Anne', 'Annelí', 'Annetta', 'Anney', 'Annika', 'Annía', 'Anný', 'Antonía', 'Apríl', 'Ardís', 'Arey', 'Arinbjörg', 'Aris', 'Arisa', 'Aría', 'Aríanna', 'Aríella', 'Arín', 'Arína', 'Arís', 'Armenía', 'Arna', 'Arnbjörg', 'Arnborg', 'Arndís', 'Arney', 'Arnfinna', 'Arnfríður', 'Arngerður', 'Arngunnur', 'Arnheiður', 'Arnhildur', 'Arnika', 'Arnkatla', 'Arnlaug', 'Arnleif', 'Arnlín', 'Arnljót', 'Arnóra', 'Arnrós', 'Arnrún', 'Arnþóra', 'Arnþrúður', 'Asírí', 'Askja', 'Assa', 'Astrid', 'Atalía', 'Atena', 'Athena', 'Atla', 'Atlanta', 'Auðbjörg', 'Auðbjört', 'Auðdís', 'Auðlín', 'Auðna', 'Auðný', 'Auðrún', 'Auður', 'Aurora', 'Axelía', 'Axelma', 'Aþena', 'Ãgústa', 'Ãgústína', 'Ãlfdís', 'Ãlfey', 'Ãlfgerður', 'Ãlfheiður', 'Ãlfhildur', 'Ãlfrós', 'Ãlfrún', 'Ãlfsól', 'Ãrbjörg', 'Ãrbjört', 'Ãrdís', 'Ãrelía', 'Ãrlaug', 'Ãrmey', 'Ãrna', 'Ãrndís', 'Ãrney', 'Ãrnheiður', 'Ãrnína', 'Ãrný', 'Ãróra', 'Ãrsól', 'Ãrsæl', 'Ãrún', 'Ãrveig', 'Ãrvök', 'Ãrþóra', 'Ãsa', 'Ãsbjörg', 'Ãsborg', 'Ãsdís', 'Ãsfríður', 'Ãsgerður', 'Ãshildur', 'Ãskatla', 'Ãsla', 'Ãslaug', 'Ãsleif', 'Ãsný', 'Ãsrós', 'Ãsrún', 'Ãst', 'Ãsta', 'Ãstbjörg', 'Ãstbjört', 'Ãstdís', 'Ãstfríður', 'Ãstgerður', 'Ãstheiður', 'Ãsthildur', 'Ãstríður', 'Ãstrós', 'Ãstrún', 'Ãstveig', 'Ãstþóra', 'Ãstþrúður', 'Ãsvör', 'Baldey', 'Baldrún', 'Baldvina', 'Barbara', 'Barbára', 'Bassí', 'Bára', 'Bebba', 'Begga', 'Belinda', 'Bella', 'Benedikta', 'Bengta', 'Benidikta', 'Benía', 'Beníta', 'Benna', 'Benney', 'Benný', 'Benta', 'Bentey', 'Bentína', 'Bera', 'Bergdís', 'Bergey', 'Bergfríður', 'Bergheiður', 'Berghildur', 'Berglaug', 'Berglind', 'Berglín', 'Bergljót', 'Bergmannía', 'Bergný', 'Bergrán', 'Bergrín', 'Bergrós', 'Bergrún', 'Bergþóra', 'Berit', 'Bernódía', 'Berta', 'Bertha', 'Bessí', 'Bestla', 'Beta', 'Betanía', 'Betsý', 'Bettý', 'Bil', 'Birgit', 'Birgitta', 'Birna', 'Birta', 'Birtna', 'Bíbí', 'Bína', 'Bjargdís', 'Bjargey', 'Bjargheiður', 'Bjarghildur', 'Bjarglind', 'Bjarkey', 'Bjarklind', 'Bjarma', 'Bjarndís', 'Bjarney', 'Bjarnfríður', 'Bjarngerður', 'Bjarnheiður', 'Bjarnhildur', 'Bjarnlaug', 'Bjarnrún', 'Bjarnveig', 'Bjarný', 'Bjarnþóra', 'Bjarnþrúður', 'Bjartey', 'Bjartmey', 'Björg', 'Björgey', 'Björgheiður', 'Björghildur', 'Björk', 'Björney', 'Björnfríður', 'Björt', 'Bláey', 'Blíða', 'Blín', 'Blómey', 'Blædís', 'Blær', 'Bobba', 'Boga', 'Bogdís', 'Bogey', 'Bogga', 'Boghildur', 'Borg', 'Borgdís', 'Borghildur', 'Borgný', 'Borgrún', 'Borgþóra', 'Botnía', 'Bóel', 'Bót', 'Bóthildur', 'Braga', 'Braghildur', 'Branddís', 'Brá', 'Brák', 'Brigitta', 'Brimdís', 'Brimhildur', 'Brimrún', 'Brit', 'Britt', 'Britta', 'Bríana', 'Bríanna', 'Bríet', 'Bryndís', 'Brynfríður', 'Bryngerður', 'Brynheiður', 'Brynhildur', 'Brynja', 'Brynný', 'Burkney', 'Bylgja', 'Camilla', 'Carla', 'Carmen', 'Cecilia', 'Cecilía', 'Charlotta', 'Charlotte', 'Christina', 'Christine', 'Clara', 'Daðey', 'Daðína', 'Dagbjörg', 'Dagbjört', 'Dagfríður', 'Daggrós', 'Dagheiður', 'Dagmar', 'Dagmey', 'Dagný', 'Dagrún', 'Daldís', 'Daley', 'Dalía', 'Dalla', 'Dallilja', 'Dalrós', 'Dana', 'Daney', 'Danfríður', 'Danheiður', 'Danhildur', 'Danía', 'Daníela', 'Daníella', 'Dara', 'Debora', 'Debóra', 'Dendý', 'Didda', 'Dilja', 'Diljá', 'Dimmblá', 'Dimmey', 'Día', 'Díana', 'Díanna', 'Díma', 'Dís', 'Dísa', 'Dísella', 'Donna', 'Doris', 'Dorothea', 'Dóa', 'Dómhildur', 'Dóra', 'Dórey', 'Dóris', 'Dórothea', 'Dórótea', 'Dóróthea', 'Drauma', 'Draumey', 'Drífa', 'Droplaug', 'Drótt', 'Dröfn', 'Dúa', 'Dúfa', 'Dúna', 'Dýrborg', 'Dýrfinna', 'Dýrleif', 'Dýrley', 'Dýrunn', 'Dæja', 'Dögg', 'Dögun', 'Ebba', 'Ebonney', 'Edda', 'Edel', 'Edil', 'Edit', 'Edith', 'Eðna', 'Efemía', 'Egedía', 'Eggrún', 'Egla', 'Eiðný', 'Eiðunn', 'Eik', 'Einbjörg', 'Eindís', 'Einey', 'Einfríður', 'Einhildur', 'Einína', 'Einrún', 'Eir', 'Eirdís', 'Eirfinna', 'Eiríka', 'Eirný', 'Eirún', 'Elba', 'Eldbjörg', 'Eldey', 'Eldlilja', 'Eldrún', 'Eleina', 'Elektra', 'Elena', 'Elenborg', 'Elfa', 'Elfur', 'Elina', 'Elinborg', 'Elisabeth', 'Elía', 'Elíana', 'Elín', 'Elína', 'Elíná', 'Elínbet', 'Elínbjörg', 'Elínbjört', 'Elínborg', 'Elíndís', 'Elíngunnur', 'Elínheiður', 'Elínrós', 'Elírós', 'Elísa', 'Elísabet', 'Elísabeth', 'Elka', 'Ella', 'Ellen', 'Elley', 'Ellisif', 'Ellín', 'Elly', 'Ellý', 'Elma', 'Elna', 'Elsa', 'Elsabet', 'Elsie', 'Elsí', 'Elsý', 'Elva', 'Elvi', 'Elvíra', 'Elvý', 'Embla', 'Emelía', 'Emelíana', 'Emelína', 'Emeralda', 'Emilía', 'Emilíana', 'Emilíanna', 'Emilý', 'Emma', 'Emmý', 'Emý', 'Enea', 'Eneka', 'Engilbjört', 'Engilráð', 'Engilrós', 'Engla', 'Enika', 'Enja', 'Enóla', 'Eres', 'Erika', 'Erin', 'Erla', 'Erlen', 'Erlín', 'Erna', 'Esja', 'Esmeralda', 'Ester', 'Esther', 'Estiva', 'Ethel', 'Etna', 'Eufemía', 'Eva', 'Evelyn', 'Evey', 'Evfemía', 'Evgenía', 'Evíta', 'Evlalía', 'Ey', 'Eybjörg', 'Eybjört', 'Eydís', 'Eyfríður', 'Eygerður', 'Eygló', 'Eyhildur', 'Eyja', 'Eyjalín', 'Eyleif', 'Eylín', 'Eyrós', 'Eyrún', 'Eyveig', 'Eyvör', 'Eyþóra', 'Eyþrúður', 'Fanndís', 'Fanney', 'Fannlaug', 'Fanny', 'Fanný', 'Febrún', 'Fema', 'Filipía', 'Filippa', 'Filippía', 'Finna', 'Finnbjörg', 'Finnbjörk', 'Finnboga', 'Finnborg', 'Finndís', 'Finney', 'Finnfríður', 'Finnlaug', 'Finnrós', 'Fía', 'Fídes', 'Fífa', 'Fjalldís', 'Fjóla', 'Flóra', 'Folda', 'Fransiska', 'Franziska', 'Frán', 'Fregn', 'Freydís', 'Freygerður', 'Freyja', 'Freylaug', 'Freyleif', 'Friðbjörg', 'Friðbjört', 'Friðborg', 'Friðdís', 'Friðdóra', 'Friðey', 'Friðfinna', 'Friðgerður', 'Friðjóna', 'Friðlaug', 'Friðleif', 'Friðlín', 'Friðmey', 'Friðný', 'Friðrika', 'Friðrikka', 'Friðrós', 'Friðrún', 'Friðsemd', 'Friðveig', 'Friðþóra', 'Frigg', 'Fríða', 'Fríður', 'Frostrós', 'Fróðný', 'Fura', 'Fönn', 'Gabríela', 'Gabríella', 'Gauja', 'Gauthildur', 'Gefjun', 'Gefn', 'Geira', 'Geirbjörg', 'Geirdís', 'Geirfinna', 'Geirfríður', 'Geirhildur', 'Geirlaug', 'Geirlöð', 'Geirný', 'Geirríður', 'Geirrún', 'Geirþrúður', 'Georgía', 'Gerða', 'Gerður', 'Gestheiður', 'Gestný', 'Gestrún', 'Gillý', 'Gilslaug', 'Gissunn', 'Gía', 'Gígja', 'Gísela', 'Gísla', 'Gísley', 'Gíslína', 'Gíslný', 'Gíslrún', 'Gíslunn', 'Gíta', 'Gjaflaug', 'Gloría', 'Gló', 'Glóa', 'Glóbjört', 'Glódís', 'Glóð', 'Glóey', 'Gná', 'Góa', 'Gógó', 'Grein', 'Gret', 'Greta', 'Grélöð', 'Grét', 'Gréta', 'Gríma', 'Grímey', 'Grímheiður', 'Grímhildur', 'Gróa', 'Guðbjörg', 'Guðbjört', 'Guðborg', 'Guðdís', 'Guðfinna', 'Guðfríður', 'Guðjóna', 'Guðlaug', 'Guðleif', 'Guðlín', 'Guðmey', 'Guðmunda', 'Guðmundína', 'Guðný', 'Guðríður', 'Guðrún', 'Guðsteina', 'Guðveig', 'Gullbrá', 'Gullveig', 'Gullý', 'Gumma', 'Gunnbjörg', 'Gunnbjört', 'Gunnborg', 'Gunndís', 'Gunndóra', 'Gunnella', 'Gunnfinna', 'Gunnfríður', 'Gunnharða', 'Gunnheiður', 'Gunnhildur', 'Gunnjóna', 'Gunnlaug', 'Gunnleif', 'Gunnlöð', 'Gunnrún', 'Gunnur', 'Gunnveig', 'Gunnvör', 'Gunný', 'Gunnþóra', 'Gunnþórunn', 'Gurrý', 'Gúa', 'Gyða', 'Gyðja', 'Gyðríður', 'Gytta', 'Gæfa', 'Gæflaug', 'Hadda', 'Haddý', 'Hafbjörg', 'Hafborg', 'Hafdís', 'Hafey', 'Hafliða', 'Haflína', 'Hafný', 'Hafrós', 'Hafrún', 'Hafsteina', 'Hafþóra', 'Halla', 'Hallbera', 'Hallbjörg', 'Hallborg', 'Halldís', 'Halldóra', 'Halley', 'Hallfríður', 'Hallgerður', 'Hallgunnur', 'Hallkatla', 'Hallný', 'Hallrún', 'Hallveig', 'Hallvör', 'Hanna', 'Hanney', 'Hansa', 'Hansína', 'Harpa', 'Hauður', 'Hákonía', 'Heba', 'Hedda', 'Hedí', 'Heiða', 'Heiðbjörg', 'Heiðbjörk', 'Heiðbjört', 'Heiðbrá', 'Heiðdís', 'Heiðlaug', 'Heiðlóa', 'Heiðný', 'Heiðrós', 'Heiðrún', 'Heiður', 'Heiðveig', 'Hekla', 'Helen', 'Helena', 'Helga', 'Hella', 'Helma', 'Hendrikka', 'Henný', 'Henrietta', 'Henrika', 'Henríetta', 'Hera', 'Herbjörg', 'Herbjört', 'Herborg', 'Herdís', 'Herfríður', 'Hergerður', 'Herlaug', 'Hermína', 'Hersilía', 'Herta', 'Hertha', 'Hervör', 'Herþrúður', 'Hilda', 'Hildegard', 'Hildibjörg', 'Hildigerður', 'Hildigunnur', 'Hildiríður', 'Hildisif', 'Hildur', 'Hilma', 'Himinbjörg', 'Hind', 'Hinrika', 'Hinrikka', 'Hjalta', 'Hjaltey', 'Hjálmdís', 'Hjálmey', 'Hjálmfríður', 'Hjálmgerður', 'Hjálmrós', 'Hjálmrún', 'Hjálmveig', 'Hjördís', 'Hjörfríður', 'Hjörleif', 'Hjörný', 'Hjörtfríður', 'Hlaðgerður', 'Hlédís', 'Hlíf', 'Hlín', 'Hlökk', 'Hólmbjörg', 'Hólmdís', 'Hólmfríður', 'Hrafna', 'Hrafnborg', 'Hrafndís', 'Hrafney', 'Hrafngerður', 'Hrafnheiður', 'Hrafnhildur', 'Hrafnkatla', 'Hrafnlaug', 'Hrafntinna', 'Hraundís', 'Hrefna', 'Hreindís', 'Hróðný', 'Hrólfdís', 'Hrund', 'Hrönn', 'Hugbjörg', 'Hugbjört', 'Hugborg', 'Hugdís', 'Hugljúf', 'Hugrún', 'Huld', 'Hulda', 'Huldís', 'Huldrún', 'Húnbjörg', 'Húndís', 'Húngerður', 'Hvönn', 'Hödd', 'Högna', 'Hörn', 'Ida', 'Idda', 'Iða', 'Iðunn', 'Ilmur', 'Immý', 'Ina', 'Inda', 'India', 'Indiana', 'Indía', 'Indíana', 'Indíra', 'Indra', 'Inga', 'Ingdís', 'Ingeborg', 'Inger', 'Ingey', 'Ingheiður', 'Inghildur', 'Ingibjörg', 'Ingibjört', 'Ingiborg', 'Ingifinna', 'Ingifríður', 'Ingigerður', 'Ingilaug', 'Ingileif', 'Ingilín', 'Ingimaría', 'Ingimunda', 'Ingiríður', 'Ingirós', 'Ingisól', 'Ingiveig', 'Ingrid', 'Ingrún', 'Ingunn', 'Ingveldur', 'Inna', 'Irena', 'Irene', 'Irja', 'Irma', 'Irmý', 'Irpa', 'Isabel', 'Isabella', 'Ãda', 'Ãma', 'Ãna', 'Ãr', 'Ãren', 'Ãrena', 'Ãris', 'Ãrunn', 'Ãsabel', 'Ãsabella', 'Ãsadóra', 'Ãsafold', 'Ãsalind', 'Ãsbjörg', 'Ãsdís', 'Ãsey', 'Ãsfold', 'Ãsgerður', 'Ãshildur', 'Ãsis', 'Ãslaug', 'Ãsleif', 'Ãsmey', 'Ãsold', 'Ãsól', 'Ãsrún', 'Ãssól', 'Ãsveig', 'Ãunn', 'Ãva', 'Jakobína', 'Jana', 'Jane', 'Janetta', 'Jannika', 'Jara', 'Jarún', 'Jarþrúður', 'Jasmín', 'Járnbrá', 'Járngerður', 'Jenetta', 'Jenna', 'Jenný', 'Jensína', 'Jessý', 'Jovina', 'Jóa', 'Jóanna', 'Jódís', 'Jófríður', 'Jóhanna', 'Jólín', 'Jóna', 'Jónanna', 'Jónasína', 'Jónbjörg', 'Jónbjört', 'Jóndís', 'Jóndóra', 'Jóney', 'Jónfríður', 'Jóngerð', 'Jónheiður', 'Jónhildur', 'Jóninna', 'Jónída', 'Jónína', 'Jónný', 'Jóný', 'Jóra', 'Jóríður', 'Jórlaug', 'Jórunn', 'Jósebína', 'Jósefín', 'Jósefína', 'Judith', 'Júdea', 'Júdit', 'Júlía', 'Júlíana', 'Júlíanna', 'Júlíetta', 'Júlírós', 'Júnía', 'Júníana', 'Jökla', 'Jökulrós', 'Jörgína', 'Kaðlín', 'Kaja', 'Kalla', 'Kamilla', 'Kamí', 'Kamma', 'Kapitola', 'Kapítóla', 'Kara', 'Karen', 'Karin', 'Karitas', 'Karí', 'Karín', 'Karína', 'Karítas', 'Karla', 'Karlinna', 'Karlína', 'Karlotta', 'Karolína', 'Karó', 'Karólín', 'Karólína', 'Kassandra', 'Kata', 'Katarína', 'Katerína', 'Katharina', 'Kathinka', 'Katinka', 'Katla', 'Katrín', 'Katrína', 'Katý', 'Kára', 'Kellý', 'Kendra', 'Ketilbjörg', 'Ketilfríður', 'Ketilríður', 'Kiddý', 'Kira', 'Kirsten', 'Kirstín', 'Kittý', 'Kjalvör', 'Klara', 'Kládía', 'Klementína', 'Kleópatra', 'Kolbjörg', 'Kolbrá', 'Kolbrún', 'Koldís', 'Kolfinna', 'Kolfreyja', 'Kolgríma', 'Kolka', 'Konkordía', 'Konný', 'Korka', 'Kormlöð', 'Kornelía', 'Kókó', 'Krista', 'Kristbjörg', 'Kristborg', 'Kristel', 'Kristensa', 'Kristey', 'Kristfríður', 'Kristgerður', 'Kristin', 'Kristine', 'Kristíana', 'Kristíanna', 'Kristín', 'Kristína', 'Kristjana', 'Kristjóna', 'Kristlaug', 'Kristlind', 'Kristlín', 'Kristný', 'Kristólína', 'Kristrós', 'Kristrún', 'Kristveig', 'Kristvina', 'Kristþóra', 'Kría', 'Kæja', 'Laila', 'Laíla', 'Lana', 'Lara', 'Laufey', 'Laufheiður', 'Laufhildur', 'Lauga', 'Laugey', 'Laugheiður', 'Lára', 'Lárensína', 'Láretta', 'Lárey', 'Lea', 'Leikný', 'Leila', 'Lena', 'Leonóra', 'Leóna', 'Leónóra', 'Lilja', 'Liljá', 'Liljurós', 'Lill', 'Lilla', 'Lillian', 'Lillý', 'Lily', 'Lilý', 'Lind', 'Linda', 'Linddís', 'Lingný', 'Lisbeth', 'Listalín', 'Liv', 'Líba', 'Líf', 'Lífdís', 'Lín', 'Lína', 'Línbjörg', 'Líndís', 'Líneik', 'Líney', 'Línhildur', 'Lísa', 'Lísabet', 'Lísandra', 'Lísbet', 'Lísebet', 'Lív', 'Ljósbjörg', 'Ljósbrá', 'Ljótunn', 'Lofn', 'Loftveig', 'Logey', 'Lokbrá', 'Lotta', 'Louisa', 'Lousie', 'Lovísa', 'Lóa', 'Lóreley', 'Lukka', 'Lúcía', 'Lúðvíka', 'Lúísa', 'Lúna', 'Lúsinda', 'Lúsía', 'Lúvísa', 'Lydia', 'Lydía', 'Lyngheiður', 'Lýdía', 'Læla', 'Maddý', 'Magda', 'Magdalena', 'Magðalena', 'Magga', 'Maggey', 'Maggý', 'Magna', 'Magndís', 'Magnea', 'Magnes', 'Magney', 'Magnfríður', 'Magnheiður', 'Magnhildur', 'Magnúsína', 'Magný', 'Magnþóra', 'Maía', 'Maídís', 'Maísól', 'Maj', 'Maja', 'Malen', 'Malena', 'Malía', 'Malín', 'Malla', 'Manda', 'Manúela', 'Mara', 'Mardís', 'Marela', 'Marella', 'Maren', 'Marey', 'Marfríður', 'Margit', 'Margot', 'Margret', 'Margrét', 'Margrjet', 'Margunnur', 'Marheiður', 'Maria', 'Marie', 'Marikó', 'Marinella', 'Marit', 'Marí', 'María', 'Maríam', 'Marían', 'Maríana', 'Maríanna', 'Marín', 'Marína', 'Marínella', 'Maríon', 'Marísa', 'Marísól', 'Marít', 'Maríuerla', 'Marja', 'Markrún', 'Marlaug', 'Marlena', 'Marlín', 'Marlís', 'Marólína', 'Marsa', 'Marselía', 'Marselína', 'Marsibil', 'Marsilía', 'Marsý', 'Marta', 'Martha', 'Martína', 'Mary', 'Marý', 'Matta', 'Mattea', 'Matthea', 'Matthilda', 'Matthildur', 'Matthía', 'Mattíana', 'Mattína', 'Mattý', 'Maxima', 'Mábil', 'Málfríður', 'Málhildur', 'Málmfríður', 'Mánadís', 'Máney', 'Mára', 'Meda', 'Mekkin', 'Mekkín', 'Melinda', 'Melissa', 'Melkorka', 'Melrós', 'Messíana', 'Metta', 'Mey', 'Mikaela', 'Mikaelína', 'Mikkalína', 'Milda', 'Mildríður', 'Milla', 'Millý', 'Minerva', 'Minna', 'Minney', 'Minný', 'Miriam', 'Mirja', 'Mirjam', 'Mirra', 'Mist', 'Mía', 'Mínerva', 'Míra', 'Míranda', 'Mítra', 'Mjaðveig', 'Mjalldís', 'Mjallhvít', 'Mjöll', 'Mona', 'Monika', 'Módís', 'Móeiður', 'Móey', 'Móheiður', 'Móna', 'Mónika', 'Móníka', 'Munda', 'Mundheiður', 'Mundhildur', 'Mundína', 'Myrra', 'Mýr', 'Mýra', 'Mýrún', 'Mörk', 'Nadia', 'Nadía', 'Nadja', 'Nana', 'Nanna', 'Nanný', 'Nansý', 'Naomí', 'Naómí', 'Natalie', 'Natalía', 'Náttsól', 'Nella', 'Nellý', 'Nenna', 'Nicole', 'Niðbjörg', 'Nikíta', 'Nikoletta', 'Nikólína', 'Ninja', 'Ninna', 'Nína', 'Níní', 'Njála', 'Njóla', 'Norma', 'Nóa', 'Nóra', 'Nótt', 'Nýbjörg', 'Odda', 'Oddbjörg', 'Oddfreyja', 'Oddfríður', 'Oddgerður', 'Oddhildur', 'Oddlaug', 'Oddleif', 'Oddný', 'Oddrún', 'Oddveig', 'Oddvör', 'Oktavía', 'Októvía', 'Olga', 'Ollý', 'Ora', 'Orka', 'Ormheiður', 'Ormhildur', 'Otkatla', 'Otta', 'Óda', 'Ófelía', 'Óla', 'Ólafía', 'Ólafína', 'Ólavía', 'Ólivía', 'Ólína', 'Ólöf', 'Ósa', 'Ósk', 'Ótta', 'Pamela', 'París', 'Patricia', 'Patrisía', 'Pála', 'Páldís', 'Páley', 'Pálfríður', 'Pálhanna', 'Pálheiður', 'Pálhildur', 'Pálín', 'Pálína', 'Pálmey', 'Pálmfríður', 'Pálrún', 'Perla', 'Peta', 'Petra', 'Petrea', 'Petrína', 'Petronella', 'Petrónella', 'Petrós', 'Petrún', 'Petrúnella', 'Pétrína', 'Pétrún', 'Pía', 'Polly', 'Pollý', 'Pría', 'Rafney', 'Rafnhildur', 'Ragna', 'Ragnbjörg', 'Ragney', 'Ragnfríður', 'Ragnheiður', 'Ragnhildur', 'Rakel', 'Ramóna', 'Randalín', 'Randíður', 'Randý', 'Ranka', 'Rannva', 'Rannveig', 'Ráðhildur', 'Rán', 'Rebekka', 'Reginbjörg', 'Regína', 'Rein', 'Renata', 'Reyn', 'Reyndís', 'Reynheiður', 'Reynhildur', 'Rikka', 'Ripley', 'Rita', 'Ríkey', 'Rín', 'Ríta', 'Ronja', 'Rorí', 'Roxanna', 'Róberta', 'Róbjörg', 'Rós', 'Rósa', 'Rósalind', 'Rósanna', 'Rósbjörg', 'Rósborg', 'Róselía', 'Rósey', 'Rósfríður', 'Róshildur', 'Rósinkara', 'Rósinkransa', 'Róska', 'Róslaug', 'Róslind', 'Róslinda', 'Róslín', 'Rósmary', 'Rósmarý', 'Rósmunda', 'Rósný', 'Runný', 'Rut', 'Ruth', 'Rúbý', 'Rún', 'Rúna', 'Rúndís', 'Rúnhildur', 'Rúrí', 'Röfn', 'Rögn', 'Röskva', 'Sabína', 'Sabrína', 'Saga', 'Salbjörg', 'Saldís', 'Salgerður', 'Salín', 'Salína', 'Salka', 'Salma', 'Salný', 'Salome', 'Salóme', 'Salvör', 'Sandra', 'Sanna', 'Santía', 'Sara', 'Sarína', 'Sefanía', 'Selja', 'Selka', 'Selma', 'Senía', 'Septíma', 'Sera', 'Serena', 'Seselía', 'Sesilía', 'Sesselía', 'Sesselja', 'Sessilía', 'Sif', 'Sigdís', 'Sigdóra', 'Sigfríð', 'Sigfríður', 'Sigga', 'Siggerður', 'Sigmunda', 'Signa', 'Signhildur', 'Signý', 'Sigríður', 'Sigrún', 'Sigurást', 'Sigurásta', 'Sigurbára', 'Sigurbirna', 'Sigurbjörg', 'Sigurbjört', 'Sigurborg', 'Sigurdís', 'Sigurdóra', 'Sigurdríf', 'Sigurdrífa', 'Sigurða', 'Sigurey', 'Sigurfinna', 'Sigurfljóð', 'Sigurgeira', 'Sigurhanna', 'Sigurhelga', 'Sigurhildur', 'Sigurjóna', 'Sigurlaug', 'Sigurleif', 'Sigurlilja', 'Sigurlinn', 'Sigurlín', 'Sigurlína', 'Sigurmunda', 'Sigurnanna', 'Sigurósk', 'Sigurrós', 'Sigursteina', 'Sigurunn', 'Sigurveig', 'Sigurvina', 'Sigurþóra', 'Sigyn', 'Sigþóra', 'Sigþrúður', 'Silfa', 'Silfá', 'Silfrún', 'Silja', 'Silka', 'Silla', 'Silva', 'Silvana', 'Silvía', 'Sirra', 'Sirrý', 'Siv', 'Sía', 'Símonía', 'Sísí', 'Síta', 'Sjöfn', 'Skarpheiður', 'Skugga', 'Skuld', 'Skúla', 'Skúlína', 'Snjáfríður', 'Snjáka', 'Snjófríður', 'Snjólaug', 'Snorra', 'Snót', 'Snæbjörg', 'Snæbjört', 'Snæborg', 'Snæbrá', 'Snædís', 'Snæfríður', 'Snælaug', 'Snærós', 'Snærún', 'Soffía', 'Sofie', 'Sofía', 'Solveig', 'Sonja', 'Sonný', 'Sophia', 'Sophie', 'Sól', 'Sóla', 'Sólbjörg', 'Sólbjört', 'Sólborg', 'Sólbrá', 'Sólbrún', 'Sóldís', 'Sóldögg', 'Sóley', 'Sólfríður', 'Sólgerður', 'Sólhildur', 'Sólín', 'Sólkatla', 'Sóllilja', 'Sólný', 'Sólrós', 'Sólrún', 'Sólveig', 'Sólvör', 'Sónata', 'Stefana', 'Stefanía', 'Stefánný', 'Steina', 'Steinbjörg', 'Steinborg', 'Steindís', 'Steindóra', 'Steiney', 'Steinfríður', 'Steingerður', 'Steinhildur', 'Steinlaug', 'Steinrós', 'Steinrún', 'Steinunn', 'Steinvör', 'Steinþóra', 'Stella', 'Stígheiður', 'Stígrún', 'Stína', 'Stjarna', 'Styrgerður', 'Sumarlína', 'Sumarrós', 'Sunna', 'Sunnefa', 'Sunneva', 'Sunniva', 'Sunníva', 'Susan', 'Súla', 'Súsan', 'Súsanna', 'Svafa', 'Svala', 'Svalrún', 'Svana', 'Svanbjörg', 'Svanbjört', 'Svanborg', 'Svandís', 'Svaney', 'Svanfríður', 'Svanheiður', 'Svanhildur', 'Svanhvít', 'Svanlaug', 'Svanrós', 'Svanþrúður', 'Svava', 'Svea', 'Sveina', 'Sveinbjörg', 'Sveinborg', 'Sveindís', 'Sveiney', 'Sveinfríður', 'Sveingerður', 'Sveinhildur', 'Sveinlaug', 'Sveinrós', 'Sveinrún', 'Sveinsína', 'Sveinveig', 'Sylgja', 'Sylva', 'Sylvía', 'Sæbjörg', 'Sæbjört', 'Sæborg', 'Sædís', 'Sæfinna', 'Sæfríður', 'Sæhildur', 'Sælaug', 'Sæmunda', 'Sæný', 'Særós', 'Særún', 'Sæsól', 'Sæunn', 'Sævör', 'Sölva', 'Sölvey', 'Sölvína', 'Tala', 'Talía', 'Tamar', 'Tamara', 'Tanía', 'Tanja', 'Tanya', 'Tanya', 'Tara', 'Tea', 'Teitný', 'Tekla', 'Telma', 'Tera', 'Teresa', 'Teresía', 'Thea', 'Thelma', 'Theodóra', 'Theódóra', 'Theresa', 'Tindra', 'Tinna', 'Tirsa', 'Tía', 'Tíbrá', 'Tína', 'Todda', 'Torbjörg', 'Torfey', 'Torfheiður', 'Torfhildur', 'Tóbý', 'Tóka', 'Tóta', 'Tristana', 'Trú', 'Tryggva', 'Tryggvína', 'Týra', 'Ugla', 'Una', 'Undína', 'Unna', 'Unnbjörg', 'Unndís', 'Unnur', 'Urður', 'Úa', 'Úlfa', 'Úlfdís', 'Úlfey', 'Úlfheiður', 'Úlfhildur', 'Úlfrún', 'Úlla', 'Úna', 'Úndína', 'Úranía', 'Úrsúla', 'Vagna', 'Vagnbjörg', 'Vagnfríður', 'Vaka', 'Vala', 'Valbjörg', 'Valbjörk', 'Valbjört', 'Valborg', 'Valdheiður', 'Valdís', 'Valentína', 'Valería', 'Valey', 'Valfríður', 'Valgerða', 'Valgerður', 'Valhildur', 'Valka', 'Vallý', 'Valný', 'Valrós', 'Valrún', 'Valva', 'Valý', 'Valþrúður', 'Vanda', 'Vár', 'Veig', 'Veiga', 'Venus', 'Vera', 'Veronika', 'Verónika', 'Veróníka', 'Vetrarrós', 'Vébjörg', 'Védís', 'Végerður', 'Vélaug', 'Véný', 'Vibeka', 'Victoría', 'Viðja', 'Vigdís', 'Vigný', 'Viktoria', 'Viktoría', 'Vilborg', 'Vildís', 'Vilfríður', 'Vilgerður', 'Vilhelmína', 'Villa', 'Villimey', 'Vilma', 'Vilný', 'Vinbjörg', 'Vinný', 'Vinsý', 'Virginía', 'Víbekka', 'Víf', 'Vígdögg', 'Víggunnur', 'Víóla', 'Víóletta', 'Vísa', 'Von', 'Von', 'Voney', 'Vordís', 'Ylfa', 'Ylfur', 'Ylja', 'Ylva', 'Ynja', 'Yrja', 'Yrsa', 'Ãja', 'Ãma', 'Ãr', 'Ãrr', 'Þalía', 'Þeba', 'Þeódís', 'Þeódóra', 'Þjóðbjörg', 'Þjóðhildur', 'Þoka', 'Þorbjörg', 'Þorfinna', 'Þorgerður', 'Þorgríma', 'Þorkatla', 'Þorlaug', 'Þorleif', 'Þorsteina', 'Þorstína', 'Þóra', 'Þóranna', 'Þórarna', 'Þórbjörg', 'Þórdís', 'Þórða', 'Þórelfa', 'Þórelfur', 'Þórey', 'Þórfríður', 'Þórgunna', 'Þórgunnur', 'Þórhalla', 'Þórhanna', 'Þórheiður', 'Þórhildur', 'Þórkatla', 'Þórlaug', 'Þórleif', 'Þórný', 'Þórodda', 'Þórsteina', 'Þórsteinunn', 'Þórstína', 'Þórunn', 'Þórveig', 'Þórvör', 'Þrá', 'Þrúða', 'Þrúður', 'Þula', 'Þura', 'Þurí', 'Þuríður', 'Þurý', 'Þúfa', 'Þyri', 'Þyrí', 'Þöll', 'Ægileif', 'Æsa', 'Æsgerður', 'Ögmunda', 'Ögn', 'Ölrún', 'Ölveig', 'Örbrún', 'Örk', 'Ösp'); + + /** + * @var string Icelandic men names. + */ + protected static $firstNameMale = array('Aage', 'Abel', 'Abraham', 'Adam', 'Addi', 'Adel', 'Adíel', 'Adólf', 'Adrían', 'Adríel', 'Aðalberg', 'Aðalbergur', 'Aðalbert', 'Aðalbjörn', 'Aðalborgar', 'Aðalgeir', 'Aðalmundur', 'Aðalráður', 'Aðalsteinn', 'Aðólf', 'Agnar', 'Agni', 'Albert', 'Aldar', 'Alex', 'Alexander', 'Alexíus', 'Alfons', 'Alfred', 'Alfreð', 'Ali', 'Allan', 'Alli', 'Almar', 'Alrekur', 'Alvar', 'Alvin', 'Amír', 'Amos', 'Anders', 'Andreas', 'André', 'Andrés', 'Andri', 'Anes', 'Anfinn', 'Angantýr', 'Angi', 'Annar', 'Annarr', 'Annas', 'Annel', 'Annes', 'Anthony', 'Anton', 'Antoníus', 'Aran', 'Arent', 'Ares', 'Ari', 'Arilíus', 'Arinbjörn', 'Aríel', 'Aríus', 'Arnald', 'Arnaldur', 'Arnar', 'Arnberg', 'Arnbergur', 'Arnbjörn', 'Arndór', 'Arnes', 'Arnfinnur', 'Arnfreyr', 'Arngeir', 'Arngils', 'Arngrímur', 'Arnkell', 'Arnlaugur', 'Arnleifur', 'Arnljótur', 'Arnmóður', 'Arnmundur', 'Arnoddur', 'Arnold', 'Arnór', 'Arnsteinn', 'Arnúlfur', 'Arnviður', 'Arnþór', 'Aron', 'Arthur', 'Arthúr', 'Artúr', 'Asael', 'Askur', 'Aspar', 'Atlas', 'Atli', 'Auðbergur', 'Auðbert', 'Auðbjörn', 'Auðgeir', 'Auðkell', 'Auðmundur', 'Auðólfur', 'Auðun', 'Auðunn', 'Austar', 'Austmann', 'Austmar', 'Austri', 'Axel', 'Ãgúst', 'Ãki', 'Ãlfar', 'Ãlfgeir', 'Ãlfgrímur', 'Ãlfur', 'Ãlfþór', 'Ãmundi', 'Ãrbjartur', 'Ãrbjörn', 'Ãrelíus', 'Ãrgeir', 'Ãrgils', 'Ãrmann', 'Ãrni', 'Ãrsæll', 'Ãs', 'Ãsberg', 'Ãsbergur', 'Ãsbjörn', 'Ãsgautur', 'Ãsgeir', 'Ãsgils', 'Ãsgrímur', 'Ãsi', 'Ãskell', 'Ãslaugur', 'Ãslákur', 'Ãsmar', 'Ãsmundur', 'Ãsólfur', 'Ãsröður', 'Ãstbjörn', 'Ãstgeir', 'Ãstmar', 'Ãstmundur', 'Ãstráður', 'Ãstríkur', 'Ãstvald', 'Ãstvaldur', 'Ãstvar', 'Ãstvin', 'Ãstþór', 'Ãsvaldur', 'Ãsvarður', 'Ãsþór', 'Baldur', 'Baldvin', 'Baldwin', 'Baltasar', 'Bambi', 'Barði', 'Barri', 'Bassi', 'Bastían', 'Baugur', 'Bárður', 'Beinir', 'Beinteinn', 'Beitir', 'Bekan', 'Benedikt', 'Benidikt', 'Benjamín', 'Benoný', 'Benóní', 'Benóný', 'Bent', 'Berent', 'Berg', 'Bergfinnur', 'Berghreinn', 'Bergjón', 'Bergmann', 'Bergmar', 'Bergmundur', 'Bergsteinn', 'Bergsveinn', 'Bergur', 'Bergvin', 'Bergþór', 'Bernhard', 'Bernharð', 'Bernharður', 'Berni', 'Bernódus', 'Bersi', 'Bertel', 'Bertram', 'Bessi', 'Betúel', 'Bill', 'Birgir', 'Birkir', 'Birnir', 'Birtingur', 'Birtir', 'Bjargar', 'Bjargmundur', 'Bjargþór', 'Bjarkan', 'Bjarkar', 'Bjarki', 'Bjarmar', 'Bjarmi', 'Bjarnar', 'Bjarnfinnur', 'Bjarnfreður', 'Bjarnharður', 'Bjarnhéðinn', 'Bjarni', 'Bjarnlaugur', 'Bjarnleifur', 'Bjarnólfur', 'Bjarnsteinn', 'Bjarnþór', 'Bjartmann', 'Bjartmar', 'Bjartur', 'Bjartþór', 'Bjólan', 'Bjólfur', 'Björgmundur', 'Björgólfur', 'Björgúlfur', 'Björgvin', 'Björn', 'Björnólfur', 'Blængur', 'Blær', 'Blævar', 'Boði', 'Bogi', 'Bolli', 'Borgar', 'Borgúlfur', 'Borgþór', 'Bóas', 'Bói', 'Bótólfur', 'Bragi', 'Brandur', 'Breki', 'Bresi', 'Brestir', 'Brimar', 'Brimi', 'Brimir', 'Brími', 'Brjánn', 'Broddi', 'Bruno', 'Bryngeir', 'Brynjar', 'Brynjólfur', 'Brynjúlfur', 'Brynleifur', 'Brynsteinn', 'Bryntýr', 'Brynþór', 'Burkni', 'Búi', 'Búri', 'Bæring', 'Bæringur', 'Bæron', 'Böðvar', 'Börkur', 'Carl', 'Cecil', 'Christian', 'Christopher', 'Cýrus', 'Daði', 'Dagbjartur', 'Dagfari', 'Dagfinnur', 'Daggeir', 'Dagmann', 'Dagnýr', 'Dagur', 'Dagþór', 'Dalbert', 'Dalli', 'Dalmann', 'Dalmar', 'Dalvin', 'Damjan', 'Dan', 'Danelíus', 'Daniel', 'Danival', 'Daníel', 'Daníval', 'Dante', 'Daríus', 'Darri', 'Davíð', 'Demus', 'Deníel', 'Dennis', 'Diðrik', 'Díómedes', 'Dofri', 'Dolli', 'Dominik', 'Dómald', 'Dómaldi', 'Dómaldur', 'Dónald', 'Dónaldur', 'Dór', 'Dóri', 'Dósóþeus', 'Draupnir', 'Dreki', 'Drengur', 'Dufgus', 'Dufþakur', 'Dugfús', 'Dúi', 'Dúnn', 'Dvalinn', 'Dýri', 'Dýrmundur', 'Ebbi', 'Ebeneser', 'Ebenezer', 'Eberg', 'Edgar', 'Edilon', 'Edílon', 'Edvard', 'Edvin', 'Edward', 'Eðvald', 'Eðvar', 'Eðvarð', 'Efraím', 'Eggert', 'Eggþór', 'Egill', 'Eiðar', 'Eiður', 'Eikar', 'Eilífur', 'Einar', 'Einir', 'Einvarður', 'Einþór', 'Eiríkur', 'Eivin', 'Elberg', 'Elbert', 'Eldar', 'Eldgrímur', 'Eldjárn', 'Eldmar', 'Eldon', 'Eldór', 'Eldur', 'Elentínus', 'Elfar', 'Elfráður', 'Elimar', 'Elinór', 'Elis', 'Elí', 'Elías', 'Elíeser', 'Elímar', 'Elínbergur', 'Elínmundur', 'Elínór', 'Elís', 'Ellert', 'Elli', 'Elliði', 'Ellís', 'Elmar', 'Elvar', 'Elvin', 'Elvis', 'Emanúel', 'Embrek', 'Emerald', 'Emil', 'Emmanúel', 'Engilbert', 'Engilbjartur', 'Engiljón', 'Engill', 'Enok', 'Eric', 'Erik', 'Erlar', 'Erlendur', 'Erling', 'Erlingur', 'Ernestó', 'Ernir', 'Ernst', 'Eron', 'Erpur', 'Esekíel', 'Esjar', 'Esra', 'Estefan', 'Evald', 'Evan', 'Evert', 'Eyberg', 'Eyjólfur', 'Eylaugur', 'Eyleifur', 'Eymar', 'Eymundur', 'Eyríkur', 'Eysteinn', 'Eyvar', 'Eyvindur', 'Eyþór', 'Fabrisíus', 'Falgeir', 'Falur', 'Fannar', 'Fannberg', 'Fanngeir', 'Fáfnir', 'Fálki', 'Felix', 'Fengur', 'Fenrir', 'Ferdinand', 'Ferdínand', 'Fertram', 'Feykir', 'Filip', 'Filippus', 'Finn', 'Finnbjörn', 'Finnbogi', 'Finngeir', 'Finnjón', 'Finnlaugur', 'Finnur', 'Finnvarður', 'Fífill', 'Fjalar', 'Fjarki', 'Fjólar', 'Fjólmundur', 'Fjölnir', 'Fjölvar', 'Fjörnir', 'Flemming', 'Flosi', 'Flóki', 'Flórent', 'Flóvent', 'Forni', 'Fossmar', 'Fólki', 'Francis', 'Frank', 'Franklín', 'Frans', 'Franz', 'Fránn', 'Frár', 'Freybjörn', 'Freygarður', 'Freymar', 'Freymóður', 'Freymundur', 'Freyr', 'Freysteinn', 'Freyviður', 'Freyþór', 'Friðberg', 'Friðbergur', 'Friðbert', 'Friðbjörn', 'Friðfinnur', 'Friðgeir', 'Friðjón', 'Friðlaugur', 'Friðleifur', 'Friðmann', 'Friðmar', 'Friðmundur', 'Friðrik', 'Friðsteinn', 'Friður', 'Friðvin', 'Friðþjófur', 'Friðþór', 'Friedrich', 'Fritz', 'Frímann', 'Frosti', 'Fróði', 'Fróðmar', 'Funi', 'Fúsi', 'Fylkir', 'Gabriel', 'Gabríel', 'Gael', 'Galdur', 'Gamalíel', 'Garðar', 'Garibaldi', 'Garpur', 'Garri', 'Gaui', 'Gaukur', 'Gauti', 'Gautrekur', 'Gautur', 'Gautviður', 'Geir', 'Geirarður', 'Geirfinnur', 'Geirharður', 'Geirhjörtur', 'Geirhvatur', 'Geiri', 'Geirlaugur', 'Geirleifur', 'Geirmundur', 'Geirólfur', 'Geirröður', 'Geirtryggur', 'Geirvaldur', 'Geirþjófur', 'Geisli', 'Gellir', 'Georg', 'Gerald', 'Gerðar', 'Geri', 'Gestur', 'Gilbert', 'Gilmar', 'Gils', 'Gissur', 'Gizur', 'Gídeon', 'Gígjar', 'Gísli', 'Gjúki', 'Glói', 'Glúmur', 'Gneisti', 'Gnúpur', 'Gnýr', 'Goði', 'Goðmundur', 'Gottskálk', 'Gottsveinn', 'Gói', 'Grani', 'Grankell', 'Gregor', 'Greipur', 'Greppur', 'Gretar', 'Grettir', 'Grétar', 'Grímar', 'Grímkell', 'Grímlaugur', 'Grímnir', 'Grímólfur', 'Grímur', 'Grímúlfur', 'Guðberg', 'Guðbergur', 'Guðbjarni', 'Guðbjartur', 'Guðbjörn', 'Guðbrandur', 'Guðfinnur', 'Guðfreður', 'Guðgeir', 'Guðjón', 'Guðlaugur', 'Guðleifur', 'Guðleikur', 'Guðmann', 'Guðmar', 'Guðmon', 'Guðmundur', 'Guðni', 'Guðráður', 'Guðröður', 'Guðsteinn', 'Guðvarður', 'Guðveigur', 'Guðvin', 'Guðþór', 'Gumi', 'Gunnar', 'Gunnberg', 'Gunnbjörn', 'Gunndór', 'Gunngeir', 'Gunnhallur', 'Gunnlaugur', 'Gunnleifur', 'Gunnólfur', 'Gunnóli', 'Gunnröður', 'Gunnsteinn', 'Gunnvaldur', 'Gunnþór', 'Gustav', 'Gutti', 'Guttormur', 'Gústaf', 'Gústav', 'Gylfi', 'Gyrðir', 'Gýgjar', 'Gýmir', 'Haddi', 'Haddur', 'Hafberg', 'Hafgrímur', 'Hafliði', 'Hafnar', 'Hafni', 'Hafsteinn', 'Hafþór', 'Hagalín', 'Hagbarður', 'Hagbert', 'Haki', 'Hallberg', 'Hallbjörn', 'Halldór', 'Hallfreður', 'Hallgarður', 'Hallgeir', 'Hallgils', 'Hallgrímur', 'Hallkell', 'Hallmann', 'Hallmar', 'Hallmundur', 'Hallsteinn', 'Hallur', 'Hallvarður', 'Hallþór', 'Hamar', 'Hannes', 'Hannibal', 'Hans', 'Harald', 'Haraldur', 'Harri', 'Harry', 'Harrý', 'Hartmann', 'Hartvig', 'Hauksteinn', 'Haukur', 'Haukvaldur', 'Hákon', 'Háleygur', 'Hálfdan', 'Hálfdán', 'Hámundur', 'Hárekur', 'Hárlaugur', 'Hásteinn', 'Hávar', 'Hávarður', 'Hávarr', 'Hávarr', 'Heiðar', 'Heiðarr', 'Heiðberg', 'Heiðbert', 'Heiðlindur', 'Heiðmann', 'Heiðmar', 'Heiðmundur', 'Heiðrekur', 'Heikir', 'Heilmóður', 'Heimir', 'Heinrekur', 'Heisi', 'Hektor', 'Helgi', 'Helmút', 'Hemmert', 'Hendrik', 'Henning', 'Henrik', 'Henry', 'Henrý', 'Herbert', 'Herbjörn', 'Herfinnur', 'Hergeir', 'Hergill', 'Hergils', 'Herjólfur', 'Herlaugur', 'Herleifur', 'Herluf', 'Hermann', 'Hermóður', 'Hermundur', 'Hersir', 'Hersteinn', 'Hersveinn', 'Hervar', 'Hervarður', 'Hervin', 'Héðinn', 'Hilaríus', 'Hilbert', 'Hildar', 'Hildibergur', 'Hildibrandur', 'Hildigeir', 'Hildiglúmur', 'Hildimar', 'Hildimundur', 'Hildingur', 'Hildir', 'Hildiþór', 'Hilmar', 'Hilmir', 'Himri', 'Hinrik', 'Híram', 'Hjallkár', 'Hjalti', 'Hjarnar', 'Hjálmar', 'Hjálmgeir', 'Hjálmtýr', 'Hjálmur', 'Hjálmþór', 'Hjörleifur', 'Hjörtur', 'Hjörtþór', 'Hjörvar', 'Hleiðar', 'Hlégestur', 'Hlér', 'Hlini', 'Hlíðar', 'Hlíðberg', 'Hlífar', 'Hljómur', 'Hlynur', 'Hlöðmundur', 'Hlöður', 'Hlöðvarður', 'Hlöðver', 'Hnefill', 'Hnikar', 'Hnikarr', 'Holgeir', 'Holger', 'Holti', 'Hólm', 'Hólmar', 'Hólmbert', 'Hólmfastur', 'Hólmgeir', 'Hólmgrímur', 'Hólmkell', 'Hólmsteinn', 'Hólmþór', 'Hóseas', 'Hrafn', 'Hrafnar', 'Hrafnbergur', 'Hrafnkell', 'Hrafntýr', 'Hrannar', 'Hrappur', 'Hraunar', 'Hreggviður', 'Hreiðar', 'Hreiðmar', 'Hreimur', 'Hreinn', 'Hringur', 'Hrímnir', 'Hrollaugur', 'Hrolleifur', 'Hróaldur', 'Hróar', 'Hróbjartur', 'Hróðgeir', 'Hróðmar', 'Hróðólfur', 'Hróðvar', 'Hrói', 'Hrólfur', 'Hrómundur', 'Hrútur', 'Hrærekur', 'Hugberg', 'Hugi', 'Huginn', 'Hugleikur', 'Hugo', 'Hugó', 'Huldar', 'Huxley', 'Húbert', 'Húgó', 'Húmi', 'Húnbogi', 'Húni', 'Húnn', 'Húnröður', 'Hvannar', 'Hyltir', 'Hylur', 'Hængur', 'Hænir', 'Höður', 'Högni', 'Hörður', 'Höskuldur', 'Illugi', 'Immanúel', 'Indriði', 'Ingberg', 'Ingi', 'Ingiberg', 'Ingibergur', 'Ingibert', 'Ingibjartur', 'Ingibjörn', 'Ingileifur', 'Ingimagn', 'Ingimar', 'Ingimundur', 'Ingivaldur', 'Ingiþór', 'Ingjaldur', 'Ingmar', 'Ingólfur', 'Ingvaldur', 'Ingvar', 'Ingvi', 'Ingþór', 'Ismael', 'Issi', 'Ãan', 'Ãgor', 'Ãmi', 'Ãsak', 'Ãsar', 'Ãsarr', 'Ãsbjörn', 'Ãseldur', 'Ãsgeir', 'Ãsidór', 'Ãsleifur', 'Ãsmael', 'Ãsmar', 'Ãsólfur', 'Ãsrael', 'Ãvan', 'Ãvar', 'Jack', 'Jafet', 'Jaki', 'Jakob', 'Jakop', 'Jamil', 'Jan', 'Janus', 'Jarl', 'Jason', 'Járngrímur', 'Játgeir', 'Játmundur', 'Játvarður', 'Jenni', 'Jens', 'Jeremías', 'Jes', 'Jesper', 'Jochum', 'Johan', 'John', 'Joshua', 'Jóakim', 'Jóann', 'Jóel', 'Jóhann', 'Jóhannes', 'Jói', 'Jómar', 'Jómundur', 'Jón', 'Jónar', 'Jónas', 'Jónatan', 'Jónbjörn', 'Jóndór', 'Jóngeir', 'Jónmundur', 'Jónsteinn', 'Jónþór', 'Jósafat', 'Jósavin', 'Jósef', 'Jósep', 'Jósteinn', 'Jósúa', 'Jóvin', 'Julian', 'Júlí', 'Júlían', 'Júlíus', 'Júní', 'Júníus', 'Júrek', 'Jökull', 'Jörfi', 'Jörgen', 'Jörmundur', 'Jörri', 'Jörundur', 'Jörvar', 'Jörvi', 'Kaj', 'Kakali', 'Kaktus', 'Kaldi', 'Kaleb', 'Kali', 'Kalman', 'Kalmann', 'Kalmar', 'Kaprasíus', 'Karel', 'Karim', 'Karkur', 'Karl', 'Karles', 'Karli', 'Karvel', 'Kaspar', 'Kasper', 'Kastíel', 'Katarínus', 'Kató', 'Kár', 'Kári', 'Keran', 'Ketilbjörn', 'Ketill', 'Kilían', 'Kiljan', 'Kjalar', 'Kjallakur', 'Kjaran', 'Kjartan', 'Kjarval', 'Kjárr', 'Kjói', 'Klemens', 'Klemenz', 'Klængur', 'Knútur', 'Knörr', 'Koðrán', 'Koggi', 'Kolbeinn', 'Kolbjörn', 'Kolfinnur', 'Kolgrímur', 'Kolmar', 'Kolskeggur', 'Kolur', 'Kolviður', 'Konráð', 'Konstantínus', 'Kormákur', 'Kornelíus', 'Kort', 'Kópur', 'Kraki', 'Kris', 'Kristall', 'Kristberg', 'Kristbergur', 'Kristbjörn', 'Kristdór', 'Kristens', 'Krister', 'Kristfinnur', 'Kristgeir', 'Kristian', 'Kristinn', 'Kristján', 'Kristjón', 'Kristlaugur', 'Kristleifur', 'Kristmann', 'Kristmar', 'Kristmundur', 'Kristofer', 'Kristófer', 'Kristvaldur', 'Kristvarður', 'Kristvin', 'Kristþór', 'Krummi', 'Kveldúlfur', 'Lambert', 'Lars', 'Laufar', 'Laugi', 'Lauritz', 'Lár', 'Lárent', 'Lárentíus', 'Lárus', 'Leiðólfur', 'Leif', 'Leifur', 'Leiknir', 'Leo', 'Leon', 'Leonard', 'Leonhard', 'Leó', 'Leópold', 'Leví', 'Lér', 'Liljar', 'Lindar', 'Lindberg', 'Línberg', 'Líni', 'Ljósálfur', 'Ljótur', 'Ljúfur', 'Loðmundur', 'Loftur', 'Logi', 'Loki', 'Lórens', 'Lórenz', 'Ludvig', 'Lundi', 'Lúðvíg', 'Lúðvík', 'Lúkas', 'Lúter', 'Lúther', 'Lyngar', 'Lýður', 'Lýtingur', 'Maggi', 'Magngeir', 'Magni', 'Magnús', 'Magnþór', 'Makan', 'Manfred', 'Manfreð', 'Manúel', 'Mar', 'Marbjörn', 'Marel', 'Margeir', 'Margrímur', 'Mari', 'Marijón', 'Marinó', 'Marías', 'Marínó', 'Marís', 'Maríus', 'Marjón', 'Markó', 'Markús', 'Markþór', 'Maron', 'Marri', 'Mars', 'Marsellíus', 'Marteinn', 'Marten', 'Marthen', 'Martin', 'Marvin', 'Mathías', 'Matthías', 'Matti', 'Mattías', 'Max', 'Maximus', 'Máni', 'Már', 'Márus', 'Mekkinó', 'Melkíor', 'Melkólmur', 'Melrakki', 'Mensalder', 'Merkúr', 'Methúsalem', 'Metúsalem', 'Meyvant', 'Michael', 'Mikael', 'Mikjáll', 'Mikkael', 'Mikkel', 'Mildinberg', 'Mías', 'Mímir', 'Míó', 'Mír', 'Mjöllnir', 'Mjölnir', 'Moli', 'Morgan', 'Moritz', 'Mosi', 'Móði', 'Móri', 'Mórits', 'Móses', 'Muggur', 'Muni', 'Muninn', 'Múli', 'Myrkvi', 'Mýrkjartan', 'Mörður', 'Narfi', 'Natan', 'Natanael', 'Nataníel', 'Náttmörður', 'Náttúlfur', 'Neisti', 'Nenni', 'Neptúnus', 'Nicolas', 'Nikanor', 'Nikolai', 'Nikolas', 'Nikulás', 'Nils', 'Níels', 'Níls', 'Njáll', 'Njörður', 'Nonni', 'Norbert', 'Norðmann', 'Normann', 'Nóam', 'Nóel', 'Nói', 'Nóni', 'Nóri', 'Nóvember', 'Númi', 'Nývarð', 'Nökkvi', 'Oddbergur', 'Oddbjörn', 'Oddfreyr', 'Oddgeir', 'Oddi', 'Oddkell', 'Oddleifur', 'Oddmar', 'Oddsteinn', 'Oddur', 'Oddvar', 'Oddþór', 'Oktavíus', 'Októ', 'Októvíus', 'Olaf', 'Olav', 'Olgeir', 'Oliver', 'Olivert', 'Orfeus', 'Ormar', 'Ormur', 'Orri', 'Orvar', 'Otkell', 'Otri', 'Otti', 'Ottó', 'Otur', 'Óðinn', 'Ófeigur', 'Ólafur', 'Óli', 'Óliver', 'Ólíver', 'Ómar', 'Ómi', 'Óskar', 'Ósvald', 'Ósvaldur', 'Ósvífur', 'Óttar', 'Óttarr', 'Parmes', 'Patrek', 'Patrekur', 'Patrick', 'Patrik', 'Páll', 'Pálmar', 'Pálmi', 'Pedró', 'Per', 'Peter', 'Pétur', 'Pjetur', 'Príor', 'Rafael', 'Rafn', 'Rafnar', 'Rafnkell', 'Ragnar', 'Ragúel', 'Randver', 'Rannver', 'Rasmus', 'Ráðgeir', 'Ráðvarður', 'Refur', 'Reginbaldur', 'Reginn', 'Reidar', 'Reifnir', 'Reimar', 'Reinar', 'Reinhart', 'Reinhold', 'Reynald', 'Reynar', 'Reynir', 'Reyr', 'Richard', 'Rikharð', 'Rikharður', 'Ríkarður', 'Ríkharð', 'Ríkharður', 'Ríó', 'Robert', 'Rolf', 'Ronald', 'Róbert', 'Rólant', 'Róman', 'Rómeó', 'Rósant', 'Rósar', 'Rósberg', 'Rósenberg', 'Rósi', 'Rósinberg', 'Rósinkar', 'Rósinkrans', 'Rósmann', 'Rósmundur', 'Rudolf', 'Runi', 'Runólfur', 'Rúbar', 'Rúben', 'Rúdólf', 'Rúnar', 'Rúrik', 'Rútur', 'Röðull', 'Rögnvald', 'Rögnvaldur', 'Rögnvar', 'Rökkvi', 'Safír', 'Sakarías', 'Salmann', 'Salmar', 'Salómon', 'Salvar', 'Samson', 'Samúel', 'Sandel', 'Sandri', 'Sandur', 'Saxi', 'Sebastian', 'Sebastían', 'Seifur', 'Seimur', 'Sesar', 'Sesil', 'Sigbergur', 'Sigbert', 'Sigbjartur', 'Sigbjörn', 'Sigdór', 'Sigfastur', 'Sigfinnur', 'Sigfreður', 'Sigfús', 'Siggeir', 'Sighvatur', 'Sigjón', 'Siglaugur', 'Sigmann', 'Sigmar', 'Sigmundur', 'Signar', 'Sigri', 'Sigríkur', 'Sigsteinn', 'Sigtryggur', 'Sigtýr', 'Sigur', 'Sigurbaldur', 'Sigurberg', 'Sigurbergur', 'Sigurbjarni', 'Sigurbjartur', 'Sigurbjörn', 'Sigurbrandur', 'Sigurdór', 'Sigurður', 'Sigurfinnur', 'Sigurgeir', 'Sigurgestur', 'Sigurgísli', 'Sigurgrímur', 'Sigurhans', 'Sigurhjörtur', 'Sigurjón', 'Sigurkarl', 'Sigurlaugur', 'Sigurlás', 'Sigurleifur', 'Sigurliði', 'Sigurlinni', 'Sigurmann', 'Sigurmar', 'Sigurmon', 'Sigurmundur', 'Sigurnýas', 'Sigurnýjas', 'Siguroddur', 'Siguróli', 'Sigurpáll', 'Sigursteinn', 'Sigursveinn', 'Sigurvaldi', 'Sigurvin', 'Sigurþór', 'Sigvaldi', 'Sigvarður', 'Sigþór', 'Silli', 'Sindri', 'Símon', 'Sírnir', 'Sírus', 'Sívar', 'Sjafnar', 'Skafti', 'Skapti', 'Skarphéðinn', 'Skefill', 'Skeggi', 'Skíði', 'Skírnir', 'Skjöldur', 'Skorri', 'Skuggi', 'Skúli', 'Skúta', 'Skær', 'Skæringur', 'Smári', 'Smiður', 'Smyrill', 'Snjóki', 'Snjólaugur', 'Snjólfur', 'Snorri', 'Snæbjartur', 'Snæbjörn', 'Snæhólm', 'Snælaugur', 'Snær', 'Snæringur', 'Snævar', 'Snævarr', 'Snæþór', 'Soffanías', 'Sophanías', 'Sophus', 'Sófónías', 'Sófus', 'Sókrates', 'Sólberg', 'Sólbergur', 'Sólbjartur', 'Sólbjörn', 'Sólimann', 'Sólmar', 'Sólmundur', 'Sólon', 'Sólver', 'Sólvin', 'Spartakus', 'Sporði', 'Spói', 'Stanley', 'Stapi', 'Starkaður', 'Starri', 'Stefan', 'Stefán', 'Stefnir', 'Steinar', 'Steinarr', 'Steinberg', 'Steinbergur', 'Steinbjörn', 'Steindór', 'Steinfinnur', 'Steingrímur', 'Steini', 'Steinkell', 'Steinmann', 'Steinmar', 'Steinmóður', 'Steinn', 'Steinólfur', 'Steinröður', 'Steinvarður', 'Steinþór', 'Stirnir', 'Stígur', 'Stormur', 'Stórólfur', 'Sturla', 'Sturlaugur', 'Sturri', 'Styr', 'Styrbjörn', 'Styrkár', 'Styrmir', 'Styrr', 'Sumarliði', 'Svafar', 'Svali', 'Svan', 'Svanberg', 'Svanbergur', 'Svanbjörn', 'Svangeir', 'Svanhólm', 'Svani', 'Svanlaugur', 'Svanmundur', 'Svanur', 'Svanþór', 'Svavar', 'Sváfnir', 'Sveinar', 'Sveinberg', 'Sveinbjartur', 'Sveinbjörn', 'Sveinjón', 'Sveinlaugur', 'Sveinmar', 'Sveinn', 'Sveinungi', 'Sveinþór', 'Svend', 'Sverre', 'Sverrir', 'Svölnir', 'Svörfuður', 'Sýrus', 'Sæberg', 'Sæbergur', 'Sæbjörn', 'Sæi', 'Sælaugur', 'Sæmann', 'Sæmundur', 'Sær', 'Sævald', 'Sævaldur', 'Sævar', 'Sævarr', 'Sævin', 'Sæþór', 'Sölmundur', 'Sölvar', 'Sölvi', 'Sören', 'Sörli', 'Tandri', 'Tarfur', 'Teitur', 'Theodór', 'Theódór', 'Thomas', 'Thor', 'Thorberg', 'Thór', 'Tindar', 'Tindri', 'Tindur', 'Tinni', 'Tími', 'Tímon', 'Tímoteus', 'Tímóteus', 'Tístran', 'Tjaldur', 'Tjörfi', 'Tjörvi', 'Tobías', 'Tolli', 'Tonni', 'Torfi', 'Tóbías', 'Tói', 'Tóki', 'Tómas', 'Tór', 'Trausti', 'Tristan', 'Trostan', 'Trúmann', 'Tryggvi', 'Tumas', 'Tumi', 'Tyrfingur', 'Týr', 'Ubbi', 'Uggi', 'Ulrich', 'Uni', 'Unnar', 'Unnbjörn', 'Unndór', 'Unnsteinn', 'Unnþór', 'Urðar', 'Uxi', 'Úddi', 'Úlfar', 'Úlfgeir', 'Úlfhéðinn', 'Úlfkell', 'Úlfljótur', 'Úlftýr', 'Úlfur', 'Úlrik', 'Úranus', 'Vagn', 'Vakur', 'Valberg', 'Valbergur', 'Valbjörn', 'Valbrandur', 'Valdemar', 'Valdi', 'Valdimar', 'Valdór', 'Valentín', 'Valentínus', 'Valgarð', 'Valgarður', 'Valgeir', 'Valíant', 'Vallaður', 'Valmar', 'Valmundur', 'Valsteinn', 'Valter', 'Valtýr', 'Valur', 'Valves', 'Valþór', 'Varmar', 'Vatnar', 'Váli', 'Vápni', 'Veigar', 'Veigur', 'Ver', 'Vermundur', 'Vernharð', 'Vernharður', 'Vestar', 'Vestmar', 'Veturliði', 'Vébjörn', 'Végeir', 'Vékell', 'Vélaugur', 'Vémundur', 'Vésteinn', 'Victor', 'Viðar', 'Vigfús', 'Viggó', 'Vignir', 'Vigri', 'Vigtýr', 'Vigur', 'Vikar', 'Viktor', 'Vilberg', 'Vilbergur', 'Vilbert', 'Vilbjörn', 'Vilbogi', 'Vilbrandur', 'Vilgeir', 'Vilhelm', 'Vilhjálmur', 'Vili', 'Viljar', 'Vilji', 'Villi', 'Vilmar', 'Vilmundur', 'Vincent', 'Vinjar', 'Virgill', 'Víðar', 'Víðir', 'Vífill', 'Víglundur', 'Vígmar', 'Vígmundur', 'Vígsteinn', 'Vígþór', 'Víkingur', 'Vopni', 'Vorm', 'Vöggur', 'Völundur', 'Vörður', 'Vöttur', 'Walter', 'Werner', 'Wilhelm', 'Willard', 'William', 'Willum', 'Ylur', 'Ymir', 'Yngvar', 'Yngvi', 'Yrkill', 'Ãmir', 'Ãrar', 'Zakaría', 'Zakarías', 'Zophanías', 'Zophonías', 'Zóphanías', 'Zóphonías', 'Þangbrandur', 'Þengill', 'Þeyr', 'Þiðrandi', 'Þiðrik', 'Þinur', 'Þjálfi', 'Þjóðann', 'Þjóðbjörn', 'Þjóðgeir', 'Þjóðleifur', 'Þjóðmar', 'Þjóðólfur', 'Þjóðrekur', 'Þjóðvarður', 'Þjóstar', 'Þjóstólfur', 'Þorberg', 'Þorbergur', 'Þorbjörn', 'Þorbrandur', 'Þorfinnur', 'Þorgarður', 'Þorgautur', 'Þorgeir', 'Þorgestur', 'Þorgils', 'Þorgísl', 'Þorgnýr', 'Þorgrímur', 'Þorkell', 'Þorlaugur', 'Þorlákur', 'Þorleifur', 'Þorleikur', 'Þormar', 'Þormóður', 'Þormundur', 'Þorri', 'Þorsteinn', 'Þorvaldur', 'Þorvar', 'Þorvarður', 'Þór', 'Þórar', 'Þórarinn', 'Þórbergur', 'Þórbjörn', 'Þórður', 'Þórgnýr', 'Þórgrímur', 'Þórhaddur', 'Þórhalli', 'Þórhallur', 'Þórir', 'Þórlaugur', 'Þórleifur', 'Þórlindur', 'Þórmar', 'Þórmundur', 'Þóroddur', 'Þórormur', 'Þórólfur', 'Þórsteinn', 'Þórörn', 'Þrastar', 'Þráinn', 'Þrándur', 'Þróttur', 'Þrúðmar', 'Þrymur', 'Þröstur', 'Þyrnir', 'Ægir', 'Æsir', 'Ævar', 'Ævarr', 'Ögmundur', 'Ögri', 'Ölnir', 'Ölver', 'Ölvir', 'Öndólfur', 'Önundur', 'Örlaugur', 'Örlygur', 'Örn', 'Örnólfur', 'Örvar', 'Össur', 'Öxar'); + + /** + * @var string Icelandic middle names. + */ + protected static $middleName = array( + 'Aðaldal', 'Aldan', 'Arnberg', 'Arnfjörð', 'Austan', 'Austdal', 'Austfjörð', 'Ãss', 'Bakkdal', 'Bakkmann', 'Bald', 'Ben', 'Bergholt', 'Bergland', 'Bíldsfells', 'Bjarg', 'Bjarndal', 'Bjarnfjörð', 'Bláfeld', 'Blómkvist', 'Borgdal', 'Brekkmann', 'Brim', 'Brúnsteð', 'Dalhoff', 'Dan', 'Diljan', 'Ektavon', 'Eldberg', 'Elísberg', 'Elvan', 'Espólín', 'Eyhlíð', 'Eyvík', 'Falk', 'Finndal', 'Fossberg', 'Freydal', 'Friðhólm', 'Giljan', 'Gilsfjörð', 'Gnarr', 'Gnurr', 'Grendal', 'Grindvík', 'Gull', 'Haffjörð', 'Hafnes', 'Hafnfjörð', 'Har', 'Heimdal', 'Heimsberg', 'Helgfell', 'Herberg', 'Hildiberg', 'Hjaltdal', 'Hlíðkvist', 'Hnappdal', 'Hnífsdal', 'Hofland', 'Hofteig', 'Hornfjörð', 'Hólmberg', 'Hrafnan', 'Hrafndal', 'Hraunberg', 'Hreinberg', 'Hreindal', 'Hrútfjörð', 'Hvammdal', 'Hvítfeld', 'Höfðdal', 'Hörðdal', 'Ãshólm', 'Júl', 'Kjarrval', 'Knaran', 'Knarran', 'Krossdal', 'Laufkvist', 'Laufland', 'Laugdal', 'Laxfoss', 'Liljan', 'Linddal', 'Línberg', 'Ljós', 'Loðmfjörð', 'Lyngberg', 'Magdal', 'Magg', 'Matt', 'Miðdal', 'Miðvík', 'Mjófjörð', 'Móberg', 'Mýrmann', 'Nesmann', 'Norðland', 'Núpdal', 'Ólfjörð', 'Ósland', 'Ósmann', 'Reginbald', 'Reykfell', 'Reykfjörð', 'Reynholt', 'Salberg', 'Sandhólm', 'Seljan', 'Sigurhólm', 'Skagalín', 'Skíðdal', 'Snæberg', 'Snædahl', 'Sólan', 'Stardal', 'Stein', 'Steinbekk', 'Steinberg', 'Storm', 'Straumberg', 'Svanhild', 'Svarfdal', 'Sædal', 'Val', 'Valagils', 'Vald', 'Varmdal', 'Vatnsfjörð', 'Vattar', 'Vattnes', 'Viðfjörð', 'Vídalín', 'Víking', 'Vopnfjörð', 'Yngling', 'Þor', 'Önfjörð', 'Örbekk', 'Öxdal', 'Öxndal' + ); + + /** + * Randomly return a icelandic middle name. + * + * @return string + */ + public static function middleName() + { + return static::randomElement(static::$middleName); + } + + /** + * Generate prepared last name for further processing + * + * @return string + */ + public function lastName() + { + $name = static::firstNameMale(); + + if (substr($name, -2) === 'ur') { + $name = substr($name, 0, strlen($name) - 2); + } + + if (substr($name, -1) !== 's') { + $name .= 's'; + } + + return $name; + } + + /** + * Randomly return a icelandic last name for woman. + * + * @return string + */ + public function lastNameMale() + { + return $this->lastName().'dóttir'; + } + + /** + * Randomly return a icelandic last name for man. + * + * @return string + */ + public function lastNameFemale() + { + return $this->lastName().'son'; + } + + /** + * Randomly return a icelandic Kennitala (Social Security number) format. + * + * @link http://en.wikipedia.org/wiki/Kennitala + * + * @return string + */ + public static function ssn() + { + // random birth date + $birthdate = new \DateTime('@' . mt_rand(0, time())); + + // last four buffer + $lastFour = null; + + // security variable reference + $ref = '32765432'; + + // valid flag + $valid = false; + + while (! $valid) { + // make two random numbers + $rand = static::randomDigit().static::randomDigit(); + + // 8 char string with birth date and two random numbers + $tmp = $birthdate->format('dmy').$rand; + + // loop through temp string + for ($i = 7, $sum = 0; $i >= 0; $i--) { + // calculate security variable + $sum += ($tmp[$i] * $ref[$i]); + } + + // subtract 11 if not 11 + $chk = ($sum % 11 === 0) ? 0 : (11 - ($sum % 11)); + + if ($chk < 10) { + $lastFour = $rand.$chk.substr($birthdate->format('Y'), 1, 1); + + $valid = true; + } + } + + return sprintf('%s-%s', $birthdate->format('dmy'), $lastFour); + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/is_IS/PhoneNumber.php b/vendor/fzaninotto/faker/src/Faker/Provider/is_IS/PhoneNumber.php new file mode 100644 index 0000000..de91f74 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/is_IS/PhoneNumber.php @@ -0,0 +1,20 @@ + + */ +class PhoneNumber extends \Faker\Provider\PhoneNumber +{ + /** + * @var array Icelandic phone number formats. + */ + protected static $formats = array( + '+354 ### ####', + '+354 #######', + '+354#######', + '### ####', + '#######', + ); +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/it_CH/Address.php b/vendor/fzaninotto/faker/src/Faker/Provider/it_CH/Address.php new file mode 100644 index 0000000..1eee3b6 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/it_CH/Address.php @@ -0,0 +1,139 @@ + 'Argovia'), + array('AI' => 'Appenzello Interno'), + array('AR' => 'Appenzello Esterno'), + array('BE' => 'Berna'), + array('BL' => 'Basilea Campagna'), + array('BS' => 'Basilea Città'), + array('FR' => 'Friburgo'), + array('GE' => 'Ginevra'), + array('GL' => 'Glarona'), + array('GR' => 'Grigioni'), + array('JU' => 'Giura'), + array('LU' => 'Lucerna'), + array('NE' => 'Neuchâtel'), + array('NW' => 'Nidvaldo'), + array('OW' => 'Obvaldo'), + array('SG' => 'San Gallo'), + array('SH' => 'Sciaffusa'), + array('SO' => 'Soletta'), + array('SZ' => 'Svitto'), + array('TG' => 'Turgovia'), + array('TI' => 'Ticino'), + array('UR' => 'Uri'), + array('VD' => 'Vaud'), + array('VS' => 'Vallese'), + array('ZG' => 'Zugo'), + array('ZH' => 'Zurigo') + ); + + protected static $cityFormats = array( + '{{cityName}}', + ); + + protected static $streetNameFormats = array( + '{{streetSuffix}} {{firstName}}', + '{{streetSuffix}} {{lastName}}' + ); + + protected static $streetAddressFormats = array( + '{{streetName}} {{buildingNumber}}', + ); + protected static $addressFormats = array( + "{{streetAddress}}\n{{postcode}} {{city}}", + ); + + /** + * Returns a random street prefix + * @example Via + * @return string + */ + public static function streetPrefix() + { + return static::randomElement(static::$streetPrefix); + } + + /** + * Returns a random city name. + * @example Luzern + * @return string + */ + public function cityName() + { + return static::randomElement(static::$cityNames); + } + + /** + * Returns a canton + * @example array('BE' => 'Bern') + * @return array + */ + public static function canton() + { + return static::randomElement(static::$canton); + } + + /** + * Returns the abbreviation of a canton. + * @return string + */ + public static function cantonShort() + { + $canton = static::canton(); + return key($canton); + } + + /** + * Returns the name of canton. + * @return string + */ + public static function cantonName() + { + $canton = static::canton(); + return current($canton); + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/it_CH/Company.php b/vendor/fzaninotto/faker/src/Faker/Provider/it_CH/Company.php new file mode 100644 index 0000000..9a42b1c --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/it_CH/Company.php @@ -0,0 +1,15 @@ +generator->parse($format); + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/ja_JP/Company.php b/vendor/fzaninotto/faker/src/Faker/Provider/ja_JP/Company.php new file mode 100644 index 0000000..937f375 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/ja_JP/Company.php @@ -0,0 +1,17 @@ +generator->parse($format)); + } + + /** + * @example 'yamada.jp' + */ + public function domainName() + { + return static::randomElement(static::$lastNameAscii) . '.' . $this->tld(); + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/ja_JP/Person.php b/vendor/fzaninotto/faker/src/Faker/Provider/ja_JP/Person.php new file mode 100644 index 0000000..20fb6cd --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/ja_JP/Person.php @@ -0,0 +1,100 @@ +generator->parse($format); + } + + /** + * @example 'アオタ' + */ + public static function firstKanaName() + { + return static::randomElement(static::$firstKanaName); + } + + /** + * @example 'アキラ' + */ + public static function lastKanaName() + { + return static::randomElement(static::$lastKanaName); + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/ja_JP/PhoneNumber.php b/vendor/fzaninotto/faker/src/Faker/Provider/ja_JP/PhoneNumber.php new file mode 100644 index 0000000..f4230d1 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/ja_JP/PhoneNumber.php @@ -0,0 +1,12 @@ + 'კვირáƒ', + 'Monday' => 'áƒáƒ áƒ¨áƒáƒ‘áƒáƒ—ი', + 'Tuesday' => 'სáƒáƒ›áƒ¨áƒáƒ‘áƒáƒ—ი', + 'Wednesday' => 'áƒáƒ—ხშáƒáƒ‘áƒáƒ—ი', + 'Thursday' => 'ხუთშáƒáƒ‘áƒáƒ—ი', + 'Friday' => 'პáƒáƒ áƒáƒ¡áƒ™áƒ”ვი', + 'Saturday' => 'შáƒáƒ‘áƒáƒ—ი', + ); + $week = static::dateTime($max)->format('l'); + return isset($map[$week]) ? $map[$week] : $week; + } + + public static function monthName($max = 'now') + { + $map = array( + 'January' => 'იáƒáƒœáƒ•áƒáƒ áƒ˜', + 'February' => 'თებერვáƒáƒšáƒ˜', + 'March' => 'მáƒáƒ áƒ¢áƒ˜', + 'April' => 'áƒáƒžáƒ áƒ˜áƒšáƒ˜', + 'May' => 'მáƒáƒ˜áƒ¡áƒ˜', + 'June' => 'ივნისი', + 'July' => 'ივლისი', + 'August' => 'áƒáƒ’ვისტáƒ', + 'September' => 'სექტემბერი', + 'October' => 'áƒáƒ¥áƒ¢áƒáƒ›áƒ‘ერი', + 'November' => 'ნáƒáƒ”მბერი', + 'December' => 'დეკემბერი', + ); + $month = static::dateTime($max)->format('F'); + return isset($map[$month]) ? $map[$month] : $month; + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/ka_GE/Internet.php b/vendor/fzaninotto/faker/src/Faker/Provider/ka_GE/Internet.php new file mode 100644 index 0000000..f37c866 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/ka_GE/Internet.php @@ -0,0 +1,9 @@ +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); + } + + /** + * National Business Identification Numbers + * + * @link http://egov.kz/wps/portal/!utWCM/p/b1/04_Sj9Q1MjAwsDQ1s9CP0I_KSyzLTE8syczPS8wB8aPM4oO8PE2cnAwdDSxMw4wMHE08nZ2CA0KDXcwMgQoikRUYWIY4gxS4hwU4mRkbGBgTp98AB3A0IKQ_XD8KVQkWF4AV4LHCzyM_N1U_uKhUPzcqx83SU9cRANth_Rk!/dl4/d5/L0lHSkovd0RNQU5rQUVnQSEhLzRKVUUvZW4!/ + * @param \DateTime $registrationDate + * @return string 12 digits, like 150140000019 + */ + public static function businessIdentificationNumber(\DateTime $registrationDate = null) + { + if (!$registrationDate) { + $registrationDate = \Faker\Provider\DateTime::dateTimeThisYear(); + } + + $dateAsString = $registrationDate->format('ym'); + $legalEntityType = (string) static::numberBetween(4, 6); + $legalEntityAdditionalType = (string) static::numberBetween(0, 3); + $randomDigits = (string) static::numerify('######'); + + return $dateAsString . $legalEntityType . $legalEntityAdditionalType . $randomDigits; + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/kk_KZ/Internet.php b/vendor/fzaninotto/faker/src/Faker/Provider/kk_KZ/Internet.php new file mode 100644 index 0000000..75999c2 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/kk_KZ/Internet.php @@ -0,0 +1,9 @@ +format('ymd'); + $genderAndCenturyId = (string) static::numberBetween(1, 6); + $randomDigits = (string) static::numerify('#####'); + + return $dateAsString . $genderAndCenturyId . $randomDigits; + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/kk_KZ/PhoneNumber.php b/vendor/fzaninotto/faker/src/Faker/Provider/kk_KZ/PhoneNumber.php new file mode 100644 index 0000000..edb38dd --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/kk_KZ/PhoneNumber.php @@ -0,0 +1,16 @@ +generator->parse($format)); + } + + /** + * @example 'kim.kr' + */ + public function domainName() + { + return static::randomElement(static::$lastNameAscii) . '.' . $this->tld(); + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/ko_KR/Person.php b/vendor/fzaninotto/faker/src/Faker/Provider/ko_KR/Person.php new file mode 100644 index 0000000..21bc22c --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/ko_KR/Person.php @@ -0,0 +1,52 @@ +ì— ë‚˜ì˜¤ëŠ” ìš”ê·€ì˜ ë¶ˆë¹› 모양으로 푸르무레 하게 í—ˆê³µì„ ë¹„ì¶”ì˜¤. ë™ê²½ì˜ 불바다는 ë‚´ 마ìŒì„ ë”ìš± ìŒì¹¨í•˜ê²Œ 하였소. +ì´ ë•Œì— ë’¤ì—ì„œ, +"모시모시(여보세요)." +하는 소리가 들렸소. ê·¸ê²ƒì€ í° ì €ê³ ë¦¬ë¥¼ ìž…ì€ í˜¸í…” ë³´ì´ì˜€ì†Œ. +"왜?" +하고 나는 고개만 ëŒë ¸ì†Œ. +"ì†ë‹˜ì´ 오셨습니다." +"ì†ë‹˜?" +하고 나는 ë³´ì´ì—게로 í•œ ê±¸ìŒ ê°€ê¹Œì´ ê°”ì†Œ. 나를 ì°¾ì„ ì†ë‹˜ì´ ì–´ë”” 있나 하고 나는 놀란 것ì´ì˜¤. +"따님께서 오셨습니다. 방으로 모셨습니다." +하고 ë³´ì´ëŠ” 들어가 버리고 ë§ì•˜ì†Œ. +"따님?" +하고 나는 ë”ìš± 놀ëžì†Œ. 순임ì´ê°€ 서울서 나를 ë”°ë¼ì™”나? ê·¸ê²ƒì€ ì•ˆ ë  ë§ì´ì˜¤. 순임ì´ê°€ ë‚´ 뒤를 ë”°ë¼ ë– ë‚¬ë”ë¼ë„ 아무리 빨리 ì™€ë„ ë‚´ì¼ì´ 아니면 못 ì™”ì„ ê²ƒì´ì˜¤. 그러면 누군가. ì •ìž„ì¸ê°€. ì •ìž„ì´ê°€ 병ì›ì—ì„œ 뛰어온 것ì¸ê°€. +나는 ë‘근거리는 ê°€ìŠ´ì„ ì–µì§€ë¡œ 진정하면서 ë‚´ ë°©ë¬¸ì„ ì—´ì—ˆì†Œ. +ê·¸ê²ƒì€ ì •ìž„ì´ì—ˆì†Œ. ì •ìž„ì€ ë‚´ê°€ 쓰다가 ë‘” 편지를 ë³´ê³  있다가 벌떡 ì¼ì–´ë‚˜ 내게 달려들어 안겨 버렸소. 나는 얼빠진 ë“¯ì´ ì •ìž„ì´ê°€ 하ë¼ëŠ” 대로 내버려ë‘었소. ê·¸ 편지는 부치려고 ì“´ ê²ƒë„ ì•„ë‹Œë° ê·¸ 편지를 ì •ìž„ì´ê°€ 본 ê²ƒì´ ì•ˆë˜ì—ˆë‹¤ê³  ìƒê°í•˜ì˜€ì†Œ. +형! 나를 ì±…ë§í•˜ì‹œì˜¤. 심히 부ë„러운 ë§ì´ì§€ë§ˆëŠ” 나는 ì •ìž„ì„ íž˜ê» ê»´ì•ˆì•„ 주고 싶었소. 나는 몇 번ì´ë‚˜ ì •ìž„ì˜ ë“±ì„ êµ½ì–´ ë³´ë©´ì„œ ë‚´ íŒ”ì— íž˜ì„ ë„£ìœ¼ë ¤ê³  하였소. ì •ìž„ì€ ì‹¬ížˆ 귀여웠소. ì •ìž„ì´ê°€ 그처럼 나를 사모하는 ê²ƒì´ ì‹¬ížˆ 기뻤소. 나는 ê°ì •ì´ 재우ì³ì„œ ëˆˆì´ ì•ˆ ë³´ì´ê³  ì •ì‹ ì´ ëª½ë¡±í•˜ì—¬ì§ì„ 깨달았소. 나는 아프고 쓰린 듯한 기ì¨ì„ 깨달았소. ì˜ì–´ë¡œ 엑스터시ë¼ë“ ì§€, 한문으로 ë¬´ì•„ì˜ ê²½ì§€ëž€ ì´ëŸ° ê²ƒì´ ì•„ë‹Œê°€ 하였소. 나는 사십 í‰ìƒì— ì´ëŸ¬í•œ ê²½í—˜ì„ ì²˜ìŒ í•œ 것ì´ì˜¤. +형! í˜•ì´ ì•„ì‹œë‹¤ì‹œí”¼ 나는 ë‚´ ì•„ë‚´ ì´ì™¸ì— ì Šì€ ì—¬ì„±ì—게 ì´ë ‡ê²Œ 안겨 본 ì¼ì´ 없소. 물론 안아 본 ì¼ë„ 없소. +그러나 형! 나는 나를 눌렀소. ë‚´ 타오르는 ì• ìš•ì„ ì°¨ë””ì°¬ ì´ì§€ì˜ 입김으로 불어서 ë„려고 애를 ì¼ì†Œ. +"글쎄 웬ì¼ì´ëƒ. 앓는 ê²ƒì´ ì´ ë°¤ì¤‘ì— ë¹„ë¥¼ 맞고 왜 나온단 ë§ì´ëƒ. 철없는 것 같으니." +하고 나는 ì•„ë²„ì§€ì˜ ìœ„ì—„ìœ¼ë¡œ ì •ìž„ì˜ ë‘ ì–´ê¹¨ë¥¼ 붙들어 ì•”ì²´ì–´ì— ì•‰í˜”ì†Œ. 그리고 ë‚˜ë„ í…Œì´ë¸”ì„ í•˜ë‚˜ 세워 ë‘ê³  맞ì€íŽ¸ì— 앉았소. +ì •ìž„ì€ ë¶€ë„러운 ë“¯ì´ ë‘ ì†ìœ¼ë¡œ ë‚¯ì„ ê°€ë¦¬ìš°ê³  ì œ ë¬´ë¦Žì— ì—Žë“œë ¤ 울기를 시작하오. +ì •ìž„ì€ ëˆ„ëŸ° ê°ˆìƒ‰ì˜ ì™¸íˆ¬ë¥¼ 입었소. ë¬´ì—‡ì„ íƒ€ê³  왔는지 모르지마는 구ë‘ì—는 꽤 ë§Žì´ ë¬¼ì´ ë¬»ê³  모ìžì—는 빗방울 ì–¼ë£©ì´ ë³´ì´ì˜¤. +"네가 ì´ëŸ¬ë‹¤ê°€ 다시 ë³‘ì´ ë”치면 어찌한단 ë§ì´ëƒ. ì•„ì´ê°€ 왜 그렇게 ì² ì´ ì—†ë‹ˆ?" +하고 나는 ë”ìš± 냉정한 ì–´ì¡°ë¡œ ì±…ë§í•˜ê³  ë°ìŠ¤í¬ ìœ„ì— ë†“ì¸ ë‚´ 편지 초를 집어 ë°•ë°• 찢어 버렸소. ì¢…ì´ ì°¢ëŠ” ì†Œë¦¬ì— ì •ìž„ì€ ìž ê¹ ê³ ê°œë¥¼ 들어서 처ìŒì—는 ë‚´ ì†ì„ ë³´ê³  다ìŒì—는 ë‚´ ì–¼êµ´ì„ ë³´ì•˜ì†Œ. 그러나 나는 모르는 체하고 ë„ë¡œ êµì˜ì— ëŒì•„와 앉아서 가만히 ëˆˆì„ ê°ì•˜ì†Œ. 그리고 ë„무지 í¥ë¶„ë˜ì§€ 아니한 ëª¨ì–‘ì„ ê¾¸ëª„ì†Œ. +형! 어떻게나 힘드는 ì¼ì´ì˜¤? 참으면 ì°¸ì„ìˆ˜ë¡ ë‚´ ì´ë¹¨ì´ 마주 부딪고, ì–¼êµ´ì˜ ê·¼ìœ¡ì€ ì”°ë£©ê±°ë¦¬ê³  ì†ì€ 불ëˆë¶ˆëˆ ì¥ì–´ì§€ì˜¤. +"ì •ë§ ë‚´ì¼ ê°€ì„¸ìš”?" +하고 아마 오 분 ë™ì•ˆì´ë‚˜ ì¹¨ë¬µì„ ì§€í‚¤ë‹¤ê°€ ì •ìž„ì´ê°€ 고개를 들고 물었소. +"그럼, 가야지." +하고 나는 빙그레 웃어 보였소. +"ì €ë„ ë°ë¦¬ê³  가세요!" +하는 ì •ìž„ì˜ ë§ì€ 마치 ì„œë¦¿ë°œì´ ë‚ ë¦¬ëŠ” 칼날과 같았소. 나는 ê¹œì§ ë†€ë¼ì„œ ì •ìž„ì„ ë°”ë¼ë³´ì•˜ì†Œ. ê·¸ì˜ ëˆˆì€ ë¹›ë‚˜ê³  ìž…ì€ ê¼­ 다물고 ì–¼êµ´ì˜ ê·¼ìœ¡ì€ íŒ½íŒ½í•˜ê²Œ 켕겼소. ì •ìž„ì˜ ì–¼êµ´ì—는 ì°¬ë°”ëžŒì´ ë„는 무서운 ê¸°ìš´ì´ ìžˆì—ˆì†Œ. +나는 즉ê°ì ìœ¼ë¡œ 죽기를 결심한 ì—¬ìžì˜ 모양ì´ë¼ê³  ìƒê°í•˜ì˜€ì†Œ. 열정으로 불ë©ì–´ë¦¬ê°€ ë˜ì—ˆë˜ ì •ìž„ì€ ë‚´ê°€ ë³´ì´ëŠ” 냉랭한 태ë„ë¡œ ë§ë¯¸ì•”ì•„ ê°‘ìžê¸° 얼어 버린 것 같았소. +"어디를?" +하고 나는 ì •ìž„ì˜ `ì €ë„ ë°ë¦¬ê³  가세요.' 하는 담대한 ë§ì— 놀ë¼ë©´ì„œ 물었소. +"어디든지, 아버지 가시는 ë°ë©´ 어디든지 저를 ë°ë¦¬ê³  가세요. 저는 아버지를 떠나서는 혼ìžì„œëŠ” 못 ì‚´ ê²ƒì„ ì§€ë‚˜ê°„ ë°˜ 달 ë™ì•ˆì— 잘 알았습니다. 아까 아버지 오셨다 가신 ë’¤ì— ìƒê°í•´ ë³´ë‹ˆê¹ ì•”ë§Œí•´ë„ ì•„ë²„ì§€ëŠ” 다시 ì €ì—게 와 보시지 아니하고 가실 것만 같애요. 그리고 저로 í•´ì„œ 아버지께서는 무슨 í° íƒ€ê²©ì„ ë‹¹í•˜ì‹  것만 같으셔요. ì²˜ìŒ ëµˆì˜¬ ì ì— ë²Œì¨ ê°€ìŠ´ì´ ëœ¨ë”했습니다. 그리고 ì—¬í–‰ì„ ë– ë‚˜ì‹ ë‹¤ëŠ” ë§ì”€ì„ 듣고는 반드시 무슨 í°ì¼ì´ 나셨ëŠë‹ˆë¼ê³ ë§Œ ìƒê°í–ˆìŠµë‹ˆë‹¤. 그리고 저어, 저로 í•´ì„œ 그러신 것만 같고, 저를 버리시고 í˜¼ìž ê°€ì‹œë ¤ëŠ” 것만 같고, 그래서 달려왔ë”니 여기 ì¨ ë†“ìœ¼ì‹  편지를 ë³´ê³  ê·¸ íŽ¸ì§€ì— ë‹¤ë¥¸ ë§ì”€ì€ ì–´ì°Œ ë든지, 네 ì¼ê¸°ë¥¼ 보았다 하신 ë§ì”€ì„ 보고는 다 알았습니다. 저와 í•œ ë°©ì— ìžˆëŠ” ì• ê°€ ì•”ë§Œí•´ë„ ì–´ë¨¸ë‹ˆ 스파ì¸ê°€ë´ìš”. 제가 ìž…ì›í•˜ê¸° ì „ì—ë„ ì œ 눈치를 슬슬 ë³´ê³  ë˜ ì±…ìƒ ì„œëžë„ 뒤지는 눈치가 ë³´ì´ê¸¸ëž˜ ì¼ê¸°ì±…ì€ ëŠ˜ 쇠 잠그는 ì„œëžì— 넣어 ë‘ì—ˆëŠ”ë° ì•„ë§ˆ 제가 ì •ì‹  ì—†ì´ ì•“ê³  누웠는 ë™ì•ˆì— ì œ 핸드백ì—ì„œ 쇳대를 í›”ì³ ê°”ë˜ê°€ë´ìš”. 그래서는 ê·¸ ì¼ê¸°ì±…ì„ êº¼ë‚´ì„œ 서울로 보냈나ë´ìš”. 그걸루 í•´ì„œ 아버지께서는 불명예스러운 ëˆ„ëª…ì„ ì“°ì‹œê³  í•™êµì¼ë„ 내놓으시게 ë˜ê³  ì§‘ë„ ë– ë‚˜ì‹œê²Œ ë˜ì…¨ë‚˜ë´ìš”. 다시는 ì§‘ì— ì•ˆ ëŒì•„오실 양으로 ê²°ì‹¬ì„ í•˜ì…¨ë‚˜ë´ìš”. 아까 병ì›ì—ì„œë„ í•˜ì‹œëŠ” ë§ì”€ì´ ëª¨ë‘ ìœ ì–¸í•˜ì‹œëŠ” 것만 같아서 í½ ì˜ì‹¬ì„ ê°€ì¡Œì—ˆëŠ”ë° ì§€ê¸ˆ ê·¸ ì“°ì‹œë˜ íŽ¸ì§€ë¥¼ 보고는 다 알았습니다. 그렇지만 그렇지만." +하고 웅변으로 ë‚´ë ¤ ë§í•˜ë˜ ì •ìž„ì€ ê°‘ìžê¸° 복받치는 ì—´ì •ì„ ì´ê¸°ì§€ 못하는 듯ì´, í•œ 번 í•œìˆ¨ì„ ì§€ìš°ê³ , +"그렇지만 저는 아버지를 ë”°ë¼ê°€ìš”. 절루 í•´ì„œ 아버지께서는 ì§‘ë„ ìžƒìœ¼ì‹œê³  ëª…ì˜ˆë„ ìžƒìœ¼ì‹œê³  ì‚¬ì—…ë„ ìžƒìœ¼ì‹œê³  ì¸ìƒì˜ 모든 ê²ƒì„ ë‹¤ 잃으셨으니 저는 아버지를 ë”°ë¼ê°€ìš”. 어디를 가시든지 저는 어린 딸로 아버지를 ë”°ë¼ë‹¤ë‹ˆë‹¤ê°€ 아버지께서 먼저 ëŒì•„가시면 ì €ë„ ë”°ë¼ ì£½ì–´ì„œ 아버지 ë°œ ë°‘ì— ë¬»íž í…Œì•¼ìš”. 제가 먼저 죽거든 제가 ë³‘ì´ ìžˆìœ¼ë‹ˆê¹ ë¬¼ë¡  제가 먼저 죽지요. ì£½ì–´ë„ ì¢‹ìŠµë‹ˆë‹¤. 병ì›ì—ì„œ 앓다가 í˜¼ìž ì£½ëŠ” ê±´ ì‹«ì–´ìš”. 아버지 ê³ì—ì„œ 죽으면 아버지께서, 오 ë‚´ 딸 ì •ìž„ì•„ 하시고 귀해 주시고 불ìŒížˆ 여겨 주시겠지요. 그리고 ì œ ëª¸ì„ ì–´ë””ë“ ì§€ ë•…ì— ë¬»ìœ¼ì‹œê³  `사랑하는 ë‚´ 딸 ì •ìž„ì˜ ë¬´ë¤'ì´ë¼ê³  패ë¼ë„ ì†ìˆ˜ 쓰셔서 세워 주시지 않겠습니까." +하고 ì •ìž„ì€ ë¹„ì­‰ë¹„ì­‰í•˜ë‹¤ê°€ 그만 무릎 ìœ„ì— ì—Žë”ì ¸ 울고 마오. +나는 다만 ì£½ì€ ì‚¬ëžŒ 모양으로 반쯤 ëˆˆì„ ê°ê³  앉아 있었소. 가슴 ì†ì—는 ì •ìž„ì˜ ê³ì—ì„œ 지지 않는 ì—´ì •ì„ í’ˆìœ¼ë©´ì„œë„ ì •ìž„ì˜ ë§ëŒ€ë¡œ ì •ìž„ì„ ë°ë¦¬ê³  ì•„ë¬´ë„ ëª¨ë¥´ëŠ” 곳으로 ê°€ 버리고 ì‹¶ìœ¼ë©´ì„œë„ ë‚˜ëŠ” ì´ ì—´ì •ì˜ ë¶ˆê¸¸ì„ ë‚´ 입김으로 꺼 버리지 아니하면 아니 ë˜ëŠ” 것ì´ì—ˆì†Œ. +"ì•„ì•„, 제가 왜 났어요? 왜 하나님께서 저를 세ìƒì— 보내셨어요? ì•„ë²„ì§€ì˜ ì¼ìƒì„ 파멸시키려 ë‚œ 것ì´ì§€ìš”? 제가 지금 죽어 버려서 ì•„ë²„ì§€ì˜ ëª…ì˜ˆë¥¼ 회복할 수 있다면 저는 죽어 버릴 í„°ì´ì•¼ìš”. 기ì˜ê²Œ 죽어 버리겠습니다. 제가 ì—¬ëŸ ì‚´ë¶€í„° 오늘날까지 ë°›ì€ ì€í˜œë¥¼ ì œ 목숨 하나로 ê°šì„ ìˆ˜ê°€ 있다면 저는 지금으로 죽어 버리겠습니다. 그렇지만 그렇지만……. +그렇지만 그렇지만 저는 다만 얼마ë¼ë„ 다만 하루ë¼ë„ 아버지 ê³ì—ì„œ ì‚´ê³  싶어요 다만 하루만ì´ë¼ë„, 아버지! 제가 왜 ì´ë ‡ìŠµë‹ˆê¹Œ, 네? 제가 어려서 ì´ë ‡ìŠµë‹ˆê¹Œ. 미친 ë…„ì´ ë˜ì–´ì„œ ì´ë ‡ìŠµë‹ˆê¹Œ. 아버지께서는 아실 테니 ë§ì”€í•´ 주세요. 하루만ì´ë¼ë„ 아버지를 모시고 아버지 ê³ì—ì„œ 살았으면 ì£½ì–´ë„ í•œì´ ì—†ê² ìŠµë‹ˆë‹¤. ì œ ìƒê°ì´ 잘못ì´ì•¼ìš”? ì œ ìƒê°ì´ 죄야요? 왜 죄입니까? 아버지, 저를 버리시고 í˜¼ìž ê°€ì‹œì§€ 마세요, 네? `ì •ìž„ì•„, 너를 ë°ë¦¬ê³  가마.' 하고 약ì†í•´ 주세요, 네." +ì •ìž„ì€ ì•„ì£¼ 담대하게 제가 í•˜ê³ ìž í•˜ëŠ” ë§ì„ 다 하오. ê·¸ 얌전한, ìˆ˜ì‚½í•œì •ìž„ì˜ ì†ì— ì–´ë”” 그러한 용기가 있었ë˜ê°€, ì°¸ ì´ìƒí•œ ì¼ì´ì˜¤. 나는 귀여운 어린 계집애 ì •ìž„ì˜ ì†ì— ì—‰í¼í•œ ì—¬ìžê°€ ë“¤ì–´ì•‰ì€ ê²ƒì„ ë°œê²¬í•˜ì˜€ì†Œ. 그가 몇 가지 재료(ë‚´ê°€ ì—¬í–‰ì„ ë– ë‚œë‹¤ëŠ” 것과 ì œ ì¼ê¸°ë¥¼ 보았다는 것)를 종합하여 나와 ì €ì™€ì˜ ìƒˆì—, ë˜ ê·¸ ë•Œë¬¸ì— ì–´ë– í•œ ì¼ì´ ì¼ì–´ë‚œ ê²ƒì„ ì¶”ì¸¡í•˜ëŠ” ê·¸ ìƒìƒë ¥ë„ 놀ëžê±°ë‹ˆì™€ 그렇게 ë‚´ ì•žì—서는 별로 ìž…ë„ ë²Œë¦¬ì§€ ì•„ë‹ˆí•˜ë˜ ê·¸ê°€ ì´ì²˜ëŸ¼ 담대하게 ì œ ì†ì— 있는 ë§ì„ ê±°ë¦¬ë‚Œì—†ì´ ë‹¤ í•´ 버리는 용기를 아니 놀랄 수 없었소. ë‚´ê°€, 사내요 ì–´ë¥¸ì¸ ë‚´ê°€ ë„리어 ì •ìž„ì—게 리드를 받고 ë†€ë¦¼ì„ ë°›ìŒì„ 깨달았소. +그러나 ì •ìž„ì„ ìœ„í•´ì„œë“ ì§€, 중년 남ìžì˜ ìœ„ì‹ ì„ ìœ„í•´ì„œë“ ì§€ 나는 ì˜ì§€ë ¥ìœ¼ë¡œ, ë„ë•ë ¥ìœ¼ë¡œ, ì •ìž„ì„ ëˆ„ë¥´ê³  훈계하지 아니하면 아니 ë˜ê² ë‹¤ê³  ìƒê°í•˜ì˜€ì†Œ. +"ì •ìž„ì•„." +하고 나는 비로소 ìž…ì„ ì—´ì–´ì„œ 불렀소. ë‚´ ì–´ì„±ì€ ìž¥ì¤‘í•˜ì˜€ì†Œ. 나는 í•  수 있는 ìœ„ì—„ì„ ë‹¤í•˜ì—¬ `ì •ìž„ì•„.' 하고 부른 것ì´ì˜¤. +"ì •ìž„ì•„, 네 ì†ì€ 다 알았다. 네 ë§ˆìŒ ë„¤ ëœ»ì€ ê·¸ë§Œí•˜ë©´ 다 알았다. 네가 나를 그처럼 ìƒê°í•´ 주는 ê²ƒì„ ê³ ë§™ê²Œ ìƒê°í•œë‹¤. 기ì˜ê²Œë„ ìƒê°í•œë‹¤. 그러나 ì •ìž„ì•„." +하고 나는 ì¼ì¸µ 태ë„와 소리를 엄숙하게 하여, +"네가 청하는 ë§ì€ 절대로 ë“¤ì„ ìˆ˜ 없는 ë§ì´ë‹¤. ë‚´ê°€ 너를 ì¹œë”¸ê°™ì´ ì‚¬ëž‘í•˜ê¸° ë•Œë¬¸ì— ë‚˜ëŠ” 너를 ë°ë¦¬ê³  가지 못하는 것ì´ë‹¤. 나는 세ìƒì—ì„œ 죽고 ì¡°ì„ ì—ì„œ 죽ë”ë¼ë„ 너는 죽어서 아니 ëœë‹¤. 차마 너까지는 죽ì´ê³  싶지 아니하단 ë§ì´ë‹¤. ë‚´ê°€ ì–´ë”” 가서 없어져 버리면 세ìƒì€ 네게 씌운 ëˆ„ëª…ì´ ì• ë§¤í•œ ì¤„ì„ ì•Œê²Œ ë  ê²ƒì´ ì•„ë‹ˆëƒ. 그리ë˜ë©´ 너는 ì¡°ì„ ì˜ ì¢‹ì€ ì¼ê¾¼ì´ ë˜ì–´ì„œ ì¼ë„ ë§Žì´ í•˜ê³  ë˜ ì‚¬ëž‘í•˜ëŠ” ë‚¨íŽ¸ì„ ë§žì•„ì„œ í–‰ë³µëœ ìƒí™œë„ í•  수 ìžˆì„ ê²ƒì´ ì•„ë‹ˆëƒ. ê·¸ê²ƒì´ ë‚´ê°€ 네게 ë°”ë¼ëŠ” 것ì´ë‹¤. ë‚´ê°€ ì–´ë”” ê°€ 있든지, ë‚´ê°€ ì‚´ì•„ 있는 ë™ì•ˆ 나는 네가 잘ë˜ëŠ” 것만, 행복ë˜ê²Œ 사는 것만 ë°”ë¼ë³´ê³  í˜¼ìž ê¸°ë»í•  ê²ƒì´ ì•„ë‹ˆëƒ. +네가 다 옳게 알았다. 나는 네 ë§ëŒ€ë¡œ ì¡°ì„ ì„ ì˜ì›ížˆ 떠나기로 하였다. 그렇지마는 나는 ì´ë ‡ê²Œ ëœ ê²ƒì„ ì¡°ê¸ˆë„ ìŠ¬í¼í•˜ì§€ 아니한다. 너를 위해서 ë‚´ê°€ 무슨 í¬ìƒì„ 한다고 하면 내게는 ê·¸ê²ƒì´ í° ê¸°ì¨ì´ë‹¤. ê·¸ë¿ ì•„ë‹ˆë¼, 나는 ì¸ì œëŠ” 세ìƒì´ 싫어졌다. ë” ì‚´ê¸°ê°€ 싫어졌다. ë‚´ê°€ ì‹­ì—¬ ë…„ ë™ì•ˆ ì „ìƒëª…ì„ ë°”ì³ì„œ êµìœ¡í•œ í•™ìƒë“¤ì—게까지 ë°°ì²™ì„ ë°›ì„ ë•Œì—는 나는 지금까지 살아온 ê²ƒì„ ìƒê°ë§Œ í•˜ì—¬ë„ ì§„ì €ë¦¬ê°€ 난다. 그렇지마는 나는 ì´ê²ƒì´ 다 ë‚´ê°€ 부족한 ë•Œë¬¸ì¸ ì¤„ì„ ìž˜ 안다. 나는 ì¡°ì„ ì„ ì›ë§í•œë‹¤ë“ ê°€, ë‚´ ë™í¬ë¥¼ ì›ë§í•œë‹¤ë“ ê°€, 그럴 ìƒê°ì€ 없다. ì›ë§ì„ 한다면 나 ìžì‹ ì˜ ë¶€ì¡±ì„ ì›ë§í•  ë¿ì´ë‹¤. ë‚´ê°€ ì›ì²´ êµìœ¡ì„ 한다든지 ë‚¨ì˜ ì§€ë„ìžê°€ ëœë‹¤ë“ ì§€ í•  ìžê²©ì´ ì—†ìŒì„ ì›ë§í•œë‹¤ë©´ ì›ë§í• ê¹Œ, ë‚´ê°€ 어떻게 ì¡°ì„ ì´ë‚˜ ì¡°ì„  ì‚¬ëžŒì„ ì›ë§í•˜ëŠëƒ. 그러니까 ì¸ì œ 내게 ë‚¨ì€ ì¼ì€ 나를 ì¡°ì„ ì—ì„œ 없애 버리는 것ì´ë‹¤. ê°ížˆ ì‹­ì—¬ ë…„ ê°„ êµìœ¡ê°€ë¼ê³  ìžì²˜í•´ ì˜¤ë˜ ê±°ì§“ë˜ê³  ì™¸ëžŒëœ ìƒí™œì„ ëŠì–´ 버리는 것ì´ë‹¤. 남편 ë…¸ë¦‡ë„ ëª» 하고 아버지 ë…¸ë¦‡ë„ ëª» 하는 ì‚¬ëžŒì´ ë‚¨ì˜ ìŠ¤ìŠ¹ì€ ì–´ë–»ê²Œ ë˜ê³  지ë„ìžëŠ” 어떻게 ë˜ëŠëƒ. 하니까 나는 ì´ì œ 세ìƒì„ 떠나 버리는 ê²ƒì´ ì¡°ê¸ˆë„ ìŠ¬í”„ì§€ 아니하고 ë„리어 ëª¸ì´ ê°€ëœ¬í•˜ê³  유쾌해지는 것 같다. +ì˜¤ì§ í•˜ë‚˜ 마ìŒì— 걸리는 ê²ƒì€ ë‚´ ì„ ë°°ìš” 사랑하는 ë™ì§€ì´ë˜ 남 ì„ ìƒì˜ 유ì¼í•œ 혈육ì´ë˜ 네게다가 ëˆ„ëª…ì„ ì”Œìš°ê³  가는 것ì´ë‹¤." +"그게 ì–´ë”” 아버지 잘못입니까?" +하고 ì •ìž„ì€ ìž…ìˆ ì„ ê¹¨ë¬¼ì—ˆì†Œ. +"ëª¨ë‘ ì œê°€ ì² ì´ ì—†ì–´ì„œ ì € 때문ì—……." +하고 ì •ìž„ì€ ëª¸ì„ ë–¨ê³  울었소. +"아니! 그렇게 ìƒê°í•˜ì§€ 마ë¼. ë‚´ê°€ 지금 세ìƒì„ 버릴 ë•Œì— ë¬´ìŠ¨ 기ì¨ì´ í•œ 가지 남는 ê²ƒì´ ìžˆë‹¤ê³  하면 너 하나가, ì´ ì„¸ìƒì—ì„œ ì˜¤ì§ ë„ˆ 하나가 나를 ë”°ë¼ ì£¼ëŠ” 것ì´ë‹¤. 아마 ë„ˆë„ ë‚˜ë¥¼ 잘못 알고 ë”°ë¼ ì£¼ëŠ” 것ì´ê² ì§€ë§ˆëŠ” 세ìƒì´ 다 나를 버리고, 처ìžê¹Œì§€ë„ 다 나를 버릴 ë•Œì— ì˜¤ì§ ë„ˆ 하나가 나를 소중히 알아 주니 ì–´ì°Œ 고맙지 ì•Šê² ëŠëƒ. 그러니까 ì •ìž„ì•„ 너는 ëª¸ì„ ì¡°ì‹¬í•˜ì—¬ì„œ ê±´ê°•ì„ íšŒë³µí•˜ì—¬ì„œ 오래 잘 ì‚´ê³ , 그리고 나를 ìƒê°í•´ 다오." +하고 ë‚˜ë„ ìš¸ì—ˆì†Œ. +형! ë‚´ê°€ ì •ìž„ì—게 ì´ëŸ° ë§ì„ í•œ ê²ƒì´ ìž˜ëª»ì´ì§€ìš”. 그러나 나는 ê·¸ ë•Œì— ì´ëŸ° ë§ì„ 아니 í•  수 없었소. 왜 그런고 하니, ê·¸ê²ƒì´ ë‚´ 진정ì´ë‹ˆê¹Œ. ë‚˜ë„ í•™êµ ì„ ìƒìœ¼ë¡œ, êµìž¥ìœ¼ë¡œ, ë˜ ì£¼ì œë„˜ê²Œ ì§€ì‚¬ë¡œì˜ ì¼ìƒì„ ë³´ë‚´ë…¸ë¼ê³  마치 ì˜¤ì§ ì–¼ìŒ ê°™ì€ ì˜ì§€ë ¥ë§Œ 가진 사람 모양으로 사십 í‰ìƒì„ ì‚´ì•„ 왔지마는 ë‚´ ì†ì—ë„ ì—´ì •ì€ ìžˆì—ˆë˜ ê²ƒì´ì˜¤. 다만 ê·¸ ì—´ì •ì„ ëˆ„ë¥´ê³  죽ì´ê³  ìžˆì—ˆì„ ë¿ì´ì˜¤. 물론 나는 아마 ì¼ìƒì— ì´ ì—´ì •ì˜ ê³ ì‚를 놓아 줄 ë‚ ì´ ì—†ê² ì§€ìš”. ë§Œì¼ ë‚´ê°€ ì´ ì—´ì •ì˜ ê³ ì‚를 놓아서 ìžìœ ë¡œ 달리게 한다고 하면 나는 ì´ ê²½ìš°ì— ì •ìž„ì„ ì•ˆê³ , ë‚´ 열정으로 ì •ìž„ì„ íƒœì›Œ 버렸ì„ëŠ”ì§€ë„ ëª¨ë¥´ì˜¤. 그러나 나는 ì •ìž„ì´ê°€ 열정으로 íƒˆìˆ˜ë¡ ë‚˜ëŠ” ë‚´ ì—´ì •ì˜ ê³ ì‚를 ë‘ ì†ìœ¼ë¡œ 꽉 붙들고 ì´ë¥¼ 악물고 매달릴 ê²°ì‹¬ì„ í•œ 것ì´ì˜¤. +ì—´í•œ ì‹œ! +"ì •ìž„ì•„. ì¸ì œ 병ì›ìœ¼ë¡œ 가거ë¼." +하고 나는 엄연하게 명령하였소. +"ë‚´ì¼ ì €ë¥¼ 보시고 떠나시지요?" +하고 ì •ìž„ì€ ëˆˆë¬¼ì„ ì”»ê³  물었소. +"그럼, Jì¡°êµìˆ˜ë„ 만나고 ë„ˆë„ ë³´ê³  떠나지." +하고 나는 거짓ë§ì„ 하였소. ì´ ê²½ìš°ì— ë‚´ê°€ 거짓ë§ìŸì´ë¼ëŠ” í° ì£„ì¸ì´ ë˜ëŠ” ê²ƒì´ ì •ìž„ì—게 대하여 ì •ìž„ì„ ìœ„í•˜ì—¬ 가장 ì˜³ì€ ì¼ì´ë¼ê³  ìƒê°í•œ 까닭ì´ì˜¤. +ì •ìž„ì€, 무서운 ì§ê°ë ¥ê³¼ ìƒìƒë ¥ì„ 가진 ì •ìž„ì€ ë‚´ ë§ì˜ ì§„ì‹¤ì„±ì„ ì˜ì‹¬í•˜ëŠ” ë“¯ì´ ë‚˜ë¥¼ 뚫어지게 ë°”ë¼ë³´ì•˜ì†Œ. 나는 차마 ì •ìž„ì˜ ì‹œì„ ì„ ë§ˆì£¼ 보지 못하여 외면하여 버렸소. +ì •ìž„ì€ ìˆ˜ê±´ìœ¼ë¡œ ëˆˆë¬¼ì„ ì”»ê³  ì²´ê²½ ì•žì— ê°€ì„œ í™”ìž¥ì„ ê³ ì¹˜ê³  그리고, +"저는 가요." +하고 ë‚´ ì•žì— í—ˆë¦¬ë¥¼ 굽혀서 작별 ì¸ì‚¬ë¥¼ 하였소. +"오, ê°€ ìžê±°ë¼." +하고 나는 극히 범연하게 대답하였소. 나는 ìžë¦¬ì˜·ì„ 입었기 ë•Œë¬¸ì— í˜„ê´€ê¹Œì§€ 작별할 ìˆ˜ë„ ì—†ì–´ì„œ ë³´ì´ë¥¼ 불러 ìžë™ì°¨ë¥¼ 하나 준비하ë¼ê³  명하고 ë‚´ ë°©ì—ì„œ 작별할 ìƒê°ì„ 하였소. +"ë‚´ì¼ ë³‘ì›ì— 오세요?" +하고 ì •ìž„ì€ ê³ ê°œë¥¼ 숙ì´ê³  낙루하였소. +"오, 가마." +하고 나는 ë˜ ê±°ì§“ë§ì„ 하였소. 세ìƒì„ 버리기로 결심한 ì‚¬ëžŒì˜ ê±°ì§“ë§ì€ í•˜ë‚˜ë‹˜ê»˜ì„œë„ ìš©ì„œí•˜ì‹œê² ì§€ìš”. 설사 ë‚´ê°€ 거짓ë§ì„ í•œ 죄로 ì§€ì˜¥ì— ê°„ë‹¤ 하ë”ë¼ë„ ì´ ê²½ìš°ì— ì •ìž„ì„ ìœ„í•˜ì—¬ 거짓ë§ì„ 아니 í•  수가 없지 않소? ë‚´ê°€ 거짓ë§ì„ 아니 하면 ì •ìž„ì€ ì•„ë‹ˆ ê°ˆ ê²ƒì´ ë¶„ëª…í•˜ì˜€ì†Œ. +"ì „ 가요." +하고 ì •ìž„ì€ ë˜ í•œ 번 ì ˆì„ í•˜ì˜€ìœ¼ë‚˜ 소리를 ë‚´ì–´ì„œ 울었소. +"울지 마ë¼! 몸 ìƒí•œë‹¤." +하고 나는 ì •ìž„ì—게 대한 ìµœí›„ì˜ ì¹œì ˆì„ ì •ìž„ì˜ ê³ì— í•œ ê±¸ìŒ ê°€ê¹Œì´ ê°€ì„œ 어깨를 ë˜ë‹¥ë˜ë‹¥í•˜ì—¬ 주고, 외투를 입혀 주었소. +"안녕히 주무세요." +하고 ì •ìž„ì€ ë¬¸ì„ ì—´ê³  나가 버렸소. +ì •ìž„ì˜ ê±¸ì–´ê°€ëŠ” 소리가 차차 멀어졌소. +나는 얼빠진 사람 모양으로 ê·¸ ìžë¦¬ì— ìš°ë‘커니 ì„œ 있었소. +ì°½ì— ë¶€ë”ªížˆëŠ” ë¹—ë°œ 소리가 들리고 ìžë™ì°¨ 소리가 먼 나ë¼ì—ì„œ 오는 ê²ƒê°™ì´ ë“¤ë¦¬ì˜¤. ì´ê²ƒì´ ì •ìž„ì´ê°€ 타고 가는 ìžë™ì°¨ 소리ì¸ê°€. 나는 ì •ìž„ì„ ë”°ë¼ê°€ì„œ 붙들어 오고 싶었소. ë‚´ 몸과 마ìŒì€ ì •ìž„ì„ ë”°ë¼ì„œ í—ˆê³µì— ë– ê°€ëŠ” 것 같았소. +ì•„ì•„ ì´ë ‡ê²Œ 나는 ì •ìž„ì„ ê³ì— ë‘ê³  싶ì„까. ì´ë ‡ê²Œ ë‚´ê°€ ì •ìž„ì˜ ê³ì— 있고 싶ì„까. 그러하건마는 나는 ì •ìž„ì„ ë–¼ì–´ 버리고 가지 아니하면 아니 ëœë‹¤! ê·¸ê²ƒì€ ì• ë“는 ì¼ì´ë‹¤. 기막히는 ì¼ì´ë‹¤! 그러나 ë‚´ ë„ë•ì  ì±…ìž„ì€ ì—„ì •í•˜ê²Œ 그렇게 명령하지 ì•ŠëŠëƒ. 나는 ì´ ë„ë•ì  ì±…ìž„ì˜ ëª…ë ¹ ê·¸ê²ƒì€ ë”위가 없는 명령ì´ë‹¤ ì„ í„¸ë만치ë¼ë„ 휘어서는 아니 ëœë‹¤. +그러나 ì •ìž„ì´ê°€ 호텔 현관까지 ìžë™ì°¨ë¥¼ 타기 ì „ì— í•œ 번만 ë” ë°”ë¼ë³´ëŠ” ê²ƒë„ ëª» í•  ì¼ì¼ê¹Œ. í•œ 번만, ìž ê¹ë§Œ ë” ë°”ë¼ë³´ëŠ” ê²ƒë„ ëª» í•  ì¼ì¼ê¹Œ. ìž ê¹ë§Œ ì¼ ë¶„ë§Œ 아니 ì¼ ì´ˆë§Œ í•œ 시그마ë¼ëŠ” 극히 ì§§ì€ ë™ì•ˆë§Œ ë°”ë¼ë³´ëŠ” ê²ƒë„ ëª» í•  ì¼ì¼ê¹Œ. 아니, ì •ìž„ì„ í•œ 시그마 ë™ì•ˆë§Œ ë” ë³´ê³  싶다 나는 ì´ë ‡ê²Œ ìƒê°í•˜ê³  벌떡 ì¼ì–´ë‚˜ì„œ ë„ì–´ì˜ í•¸ë“¤ì— ì†ì„ 대었소. +`안 ëœë‹¤! 옳잖다!' +하고 나는 ë‚´ ì†ŒíŒŒì— ëŒì•„와서 í„¸ì© ëª¸ì„ ë˜ì¡Œì†Œ. +`ìµœí›„ì˜ ìˆœê°„ì´ ì•„ë‹ˆëƒ. ìµœí›„ì˜ ìˆœê°„ì— ìš©ê°ížˆ ì´ê²¨ì•¼ í•  ê²ƒì´ ì•„ë‹ˆëƒ. ì•„ì„œë¼! ì•„ì„œë¼!' +하고 나는 í˜¼ìž ì£¼ë¨¹ì„ ë¶ˆëˆë¶ˆëˆ ì¥ì—ˆì†Œ. +ì´ ë•Œì— ì§œë°•ì§œë°• 하고 걸어오는 소리가 들리오. ë‚´ ê°€ìŠ´ì€ ìŒë°©ë§ì´ë¡œ ë‘들기는 ê²ƒê°™ì´ ë›°ì—ˆì†Œ. +`설마 ì •ìž„ì¼ê¹Œ.' +í•˜ë©´ì„œë„ ë‚˜ëŠ” ìˆ¨ì„ ì£½ì´ê³  귀를 기울였소. +ê·¸ ë°œìžêµ­ 소리는 분명 ë‚´ 문 ë°–ì— ì™€ì„œ 그쳤소. 그리고는 소리가 없었소. +`ë‚´ ê·€ì˜ í™˜ê°ì¸ê°€.' +하고 나는 í•œìˆ¨ì„ ë‚´ì‰¬ì—ˆì†Œ. +그러나 ë‹¤ìŒ ìˆœê°„ ë˜ ë‘ì–´ 번 ë¬¸ì„ ë‘드리는 소리가 들렸소. +"ì´ì—스." +하고 나는 대답하고 ë¬¸ì„ ë°”ë¼ë³´ì•˜ì†Œ. +ë¬¸ì´ ì—´ë ¸ì†Œ. +들어오는 ì´ëŠ” ì •ìž„ì´ì—ˆì†Œ. +"웬ì¼ì´ëƒ." +하고 나는 엄숙한 태ë„를 지었소. 그것으로 ì¼ ì´ˆì˜ ì¼ì²œë¶„지 ì¼ì´ë¼ë„ 다시 í•œ 번 ë³´ê³  ì‹¶ë˜ ì •ìž„ì„ ë³´ê³  기ì¨ì„ 카무플ë¼ì£¼í•œ 것ì´ì˜¤. +ì •ìž„ì€ ì„œìŠ´ì§€ ì•Šê³  ë‚´ ë’¤ì— ì™€ì„œ ë‚´ êµì˜ì— ëª¸ì„ ê¸°ëŒ€ë©°, +"ì•”ë§Œí•´ë„ ì˜¤ëŠ˜ì´ ë§ˆì§€ë§‰ì¸ ê²ƒë§Œ 같아서, 다시 뵈올 ê¸°ì•½ì€ ì—†ëŠ” 것만 같아서 가다가 ë„ë¡œ 왔습니다. í•œ 번만 ë” ëµ™ê³  ê°ˆ 양으로요. 그래 ë„ë¡œ ì™€ì„œë„ ë“¤ì–´ì˜¬ê¹Œ ë§ê¹Œ 하고 주저주저하다가 ì´ê²ƒì´ 마지막ì¸ë° 하고 용기를 ë‚´ì–´ì„œ 들어왔습니다. ë‚´ì¼ ì €ë¥¼ 보시고 가신다는 ê²ƒì´ ë¶€ëŸ¬ 하신 ë§ì”€ë§Œ 같고, 마지막 뵈옵고, ëµˆì˜¨ëŒ€ë„ ê·¸ëž˜ë„ í•œ 번 ë” ëµˆì˜µê¸°ë§Œ í•´ë„……." +하고 ì •ìž„ì˜ ë§ì€ ëì„ ì•„ë¬¼ì§€ 못하였소. 그는 ë‚´ 등 ë’¤ì— ì„œ 있기 ë•Œë¬¸ì— ê·¸ê°€ ì–´ë– í•œ í‘œì •ì„ í•˜ê³  있는지는 ë³¼ 수가 없었소. 나는 다만 ì•„ë²„ì§€ì˜ ìœ„ì—„ìœ¼ë¡œ ì •ë©´ì„ ë°”ë¼ë³´ê³  ìžˆì—ˆì„ ë¿ì´ì˜¤. +`ì •ìž„ì•„, ë‚˜ë„ ë„¤ê°€ ë³´ê³  싶었다. 네 뒤를 ë”°ë¼ê°€ê³  싶었다. ë‚´ 몸과 마ìŒì€ 네 뒤를 ë”°ë¼ì„œ 허공으로 날았다. 나는 너를 í•œ ì´ˆë¼ë„ í•œ ì´ˆì˜ ì²œë¶„ì§€ ì¼ ë™ì•ˆì´ë¼ë„ í•œ 번 ë” ë³´ê³  싶었다. ì •ìž„ì•„, ë‚´ ì§„ì •ì€ ë„ˆë¥¼ 언제든지 ë‚´ ê³ì— ë‘ê³  싶다. ì •ìž„ì•„, 지금 ë‚´ ìƒëª…ì´ ê°€ì§„ ê²ƒì€ ì˜¤ì§ ë„ˆë¿ì´ë‹¤.' +ì´ëŸ° ë§ì´ë¼ë„ 하고 싶었소. 그러나 ì´ëŸ° ë§ì„ 하여서는 아니 ë˜ì˜¤! ë§Œì¼ ë‚´ê°€ ì´ëŸ° ë§ì„ 하여 준다면 ì •ìž„ì´ê°€ 기ë»í•˜ê² ì§€ìš”. 그러나 나는 ì •ìž„ì´ì—게 ì´ëŸ° 기ì¨ì„ 주어서는 아니 ë˜ì˜¤! +나는 어디까지든지 ì•„ë²„ì§€ì˜ ìœ„ì—„, ì•„ë²„ì§€ì˜ ëƒ‰ì •í•¨ì„ ì•„ë‹ˆ 지켜서는 아니 ë˜ì˜¤. +그렇지마는 ë‚´ ê°€ìŠ´ì— íƒ€ì˜¤ë¥´ëŠ” ì´ë¦„ì§€ì„ ìˆ˜ 없는 ì—´ì •ì˜ ë¶ˆê¸¸ì€ ë‚´ ì´ì„±ê³¼ ì˜ì§€ë ¥ì„ 태워 버리려 하오. 나는 ëˆˆì´ ì•„ëœ©ì•„ëœ©í•¨ì„ ê¹¨ë‹«ì†Œ. 나는 ë‚´ ìƒëª…ì˜ ë¶ˆê¸¸ì´ ê¹œë°•ê¹œë°•í•¨ì„ ê¹¨ë‹«ì†Œ. +그렇지마는! ì•„ì•„ 그렇지마는 나는 ì´ ë„ë•ì  ì±…ìž„ì˜ ë¬´ìƒ ëª…ë ¹ì˜ ë°œë ¹ìžì¸ ì“´ ìž”ì„ ë§ˆì‹œì§€ 아니하여서는 아니 ë˜ëŠ” 것ì´ì˜¤. +`ì‚°! 바위!' +나는 ì •ì‹ ì„ ê°€ë‹¤ë“¬ì–´ì„œ ì´ê²ƒì„ 염하였소. +그러나 ì—´ì •ì˜ íŒŒë„ê°€ 치는 ê³³ì— ì‚°ì€ ì›€ì§ì´ì§€ 아니하오? 바위는 í”들리지 아니하오? 태산과 ë°˜ì„ì´ ê·¸ í° ë¶ˆê¸¸ì— íƒ€ì„œ 재가 ë˜ì§€ëŠ” 아니하오? ì¸ìƒì˜ 모든 힘 ê°€ìš´ë° ì—´ì •ë³´ë‹¤ ë” í­ë ¥ì ì¸ ê²ƒì´ ì–´ë”” 있소? ì•„ë§ˆë„ ìš°ì£¼ì˜ ëª¨ë“  힘 ê°€ìš´ë° ì‚¬ëžŒì˜ ì—´ì •ê³¼ ê°™ì´ í­ë ¥ì , 불가항력ì ì¸ ê²ƒì€ ì—†ìœ¼ë¦¬ë¼. 뇌성, 벽력, 글쎄 그것ì—나 비길까. ì°¨ë¼ë¦¬ 천체와 천체가 수학ì ìœ¼ë¡œ 계산할 수 없는 비ìƒí•œ ì†ë ¥ì„ 가지고 마주 달려들어서 ìš°ë¦¬ì˜ ê·€ë¡œ ë“¤ì„ ìˆ˜ 없는 í° ì†Œë¦¬ì™€ 우리가 굳다고 ì¼ì»«ëŠ” 금강ì„ì´ë¼ë„ ì¦ê¸°ë¥¼ 만들고야 ë§ ë§Œí•œ ì—´ì„ ë°œí•˜ëŠ” 충ëŒì˜ 순간ì—나 비길까. 형. 사람ì´ë¼ëŠ” 존재가 ìš°ì£¼ì˜ ëª¨ë“  존재 ì¤‘ì— ê°€ìž¥ 비ìƒí•œ ì¡´ìž¬ì¸ ê²ƒ 모양으로 ì‚¬ëžŒì˜ ì—´ì •ì˜ íž˜ì€ ìš°ì£¼ì˜ ëª¨ë“  신비한 힘 ê°€ìš´ë° ê°€ìž¥ 신비한 íž˜ì´ ì•„ë‹ˆê² ì†Œ? 대체 ìš°ì£¼ì˜ ëª¨ë“  íž˜ì€ ê·¸ê²ƒì´ ì•„ë¬´ë¦¬ í° íž˜ì´ë¼ê³  하ë”ë¼ë„ ì € ìžì‹ ì„ 깨뜨리는 ê²ƒì€ ì—†ì†Œ. 그렇지마는 사람ì´ë¼ëŠ” ì¡´ìž¬ì˜ ì—´ì •ì€ ëŠ¥ížˆ ì œ ìƒëª…ì„ ê¹¨ëœ¨ë ¤ 가루를 만들고 ì œ ìƒëª…ì„ ì‚´ë¼ì„œ 소지를 올리지 아니하오? 여보, 대체 ì´ì—ì„œ ë” í­ë ¥ì´ìš”, 신비ì ì¸ ê²ƒì´ ì–´ë”” 있단 ë§ì´ì˜¤. +ì´ ë•Œ ë‚´ ìƒíƒœ, 어깨 ë’¤ì—ì„œ 열정으로 타고 섰는 ì •ìž„ì„ ëŠë¼ëŠ” ë‚´ ìƒíƒœëŠ” 바야íë¡œ 대í­ë°œ, 대충ëŒì„ 기다리는 아슬아슬한 때가 아니었소. ë§Œì¼ ì¡°ê¸ˆë§Œì´ë¼ë„ ë‚´ê°€ ë‚´ ì—´ì •ì˜ ê³ ì‚ì— ëŠ¦ì¶¤ì„ ì¤€ë‹¤ê³  하면 무서운 대í­ë°œì´ ì¼ì–´ë‚¬ì„ 것ì´ì˜¤. +"ì •ìž„ì•„!" +하고 나는 충분히 마ìŒì„ 진정해 가지고 고개를 옆으로 ëŒë ¤ ì •ìž„ì˜ ì–¼êµ´ì„ ì°¾ì•˜ì†Œ. +"네ì—." +하고 ì •ìž„ì€ ìž…ì„ ì•½ê°„ ë‚´ ê·€ 가까ì´ë¡œ 가져와서 ê·¸ 씨근거리는 소리가 분명히 ë‚´ ê·€ì— ë“¤ë¦¬ê³  ê·¸ 후ëˆí›„ëˆí•˜ëŠ” 뜨거운 ìž…ê¹€ì´ ë‚´ 목과 ëº¨ì— ê°ê°ë˜ì—ˆì†Œ. +억지로 ì§„ì •í•˜ì˜€ë˜ ë‚´ ê°€ìŠ´ì€ ë‹¤ì‹œ 설레기를 시작하였소. ê·¸ 불규칙한 숨소리와 뜨거운 ìž…ê¹€ 때문ì´ì—ˆì„까. +"시간 늦는다. ì–´ì„œ 가거ë¼. ì´ ì•„ë²„ì§€ëŠ” 언제까지든지 너를 사랑하는 딸 ë¡œ 소중히 소중히 ê°€ìŠ´ì— í’ˆê³  있으마. ë˜ í›„ì¼ì— 다시 만날 ë•Œë„ ìžˆì„지 ì•„ëŠëƒ. 설사 다시 만날 때가 없다기로니 ê·¸ê²ƒì´ ë¬´ì—‡ì´ ê·¸ë¦¬ 대수ëƒ. ë‚˜ì´ ë§Žì€ ì‚¬ëžŒì€ ë¨¼ì € 죽고 ì Šì€ ì‚¬ëžŒì€ ì˜¤ëž˜ ì‚´ì•„ì„œ ì¸ìƒì˜ ì¼ì„ ë§Žì´ í•˜ëŠ” ê²ƒì´ ìˆœì„œê°€ 아니ëƒ. 너는 ëª¸ì´ ì•„ì§ ì•½í•˜ë‹ˆ 마ìŒì„ 잘 안정해서 ì–´ì„œ ê±´ê°•ì„ íšŒë³µí•˜ì—¬ë¼. 그리고 굳세게 굳세게, 힘있게 힘있게 ì‚´ì•„ 다오. ì¡°ì„ ì€ ì‚¬ëžŒì„ êµ¬í•œë‹¤. 나 ê°™ì€ ì‚¬ëžŒì€ ì¸ì œ ì¡°ì„ ì„œ ë” ì¼í•  ìžê²©ì„ 잃어버린 사람ì´ì§€ë§ˆëŠ” 네야 ì–´ë– ëƒ. 설사 누가 무슨 ë§ì„ í•´ì„œ í•™êµì—ì„œ 학비를 아니 준다거든 ë‚´ê°€ 네게 준 ìž¬ì‚°ì„ ê°€ì§€ê³  네 마ìŒëŒ€ë¡œ 공부를 하려무나. 네가 그렇게 í•´ 주어야 나를 위하는 것ì´ë‹¤. ìž ì¸ì œ 가거ë¼. 네 ì•žê¸¸ì´ ì–‘ì–‘í•˜ì§€ 아니하ëƒ. ìž ì¸ì œ 가거ë¼. 나는 ë‚´ì¼ ì•„ì¹¨ ë™ê²½ì„ 떠날란다. ìž ì–´ì„œ." +하고 나는 í™”í‰í•˜ê²Œ 웃는 낯으로 ì¼ì–´ì„°ì†Œ. +ì •ìž„ì€ ìš¸ë¨¹ìš¸ë¨¹í•˜ê³  고개를 숙ì´ì˜¤. +ë°–ì—서는 ë°”ëžŒì´ ì ì  강해져서 소리를 하고 ìœ ë¦¬ì°½ì„ í”드오. +"그럼, ì „ 가요." +하고 ì •ìž„ì€ ê³ ê°œë¥¼ 들었소. +"그래. ì–´ì„œ 가거ë¼. ë²Œì¨ ì—´í•œì‹œ ë°˜ì´ë‹¤. ë³‘ì› ë¬¸ì€ ì•„ë‹ˆ 닫니!" +ì •ìž„ì€ ëŒ€ë‹µì´ ì—†ì†Œ. +"ì–´ì„œ!" +하고 나는 ë³´ì´ë¥¼ 불러 ìžë™ì°¨ë¥¼ 하나 준비하ë¼ê³  ì¼ë €ì†Œ. +"ê°ˆëžë‹ˆë‹¤." +하고 ì •ìž„ì€ ê³ ê°œë¥¼ 숙여서 내게 ì¸ì‚¬ë¥¼ 하고 ë¬¸ì„ í–¥í•˜ì—¬ í•œ ê±¸ìŒ ê±·ë‹¤ê°€ ìž ê¹ ì£¼ì €í•˜ë”니, 다시 ëŒì•„서서, +"저를 í•œ 번만 안아 주셔요. 아버지가 어린 ë”¸ì„ ì•ˆë“¯ì´ í•œ 번만 안아 주셔요." +하고 ë‚´ 앞으로 ê°€ê¹Œì´ ì™€ 서오. +나는 íŒ”ì„ ë²Œë ¤ 주었소. ì •ìž„ì€ ë‚´ ê°€ìŠ´ì„ í–¥í•˜ê³  ëª¸ì„ ë˜ì¡Œì†Œ. 그리고 ì œ ì´ëº¨ ì €ëº¨ì„ ë‚´ ê°€ìŠ´ì— ëŒ€ê³  비ë³ì†Œ. 나는 ë‘ íŒ”ì„ ì •ìž„ì˜ ì–´ê¹¨ ìœ„ì— ê°€ë²¼ì´ ë†“ì•˜ì†Œ. +ì´ëŸ¬í•œ 지 몇 ë¶„ì´ ì§€ë‚¬ì†Œ. 아마 ì¼ ë¶„ë„ ë‹¤ 못 ë˜ì—ˆëŠ”지 모르오. +ì •ìž„ì€ ë‚´ 가슴ì—ì„œ 고개를 들어 나를 뚫어지게 우러러보ë”니, 다시 ë‚´ ê°€ìŠ´ì— ë‚¯ì„ ëŒ€ë”니 아마 ë‚´ ì‹¬ìž¥ì´ ë¬´ì„­ê²Œ 뛰는 소리를 ì •ìž„ì€ ë“¤ì—ˆì„ ê²ƒì´ì˜¤ ì •ìž„ì€ ë‹¤ì‹œ 고개를 들고, +"어디를 가시든지 편지나 주셔요." +하고 êµµì€ ëˆˆë¬¼ì„ ë–¨êµ¬ê³ ëŠ” 내게서 물러서서 ë˜ í•œ 번 절하고, +"안녕히 가셔요. 만주든지 ì•„ë ¹ì´ë“ ì§€ ì¡°ì„  사람 ë§Žì´ ì‚¬ëŠ” ê³³ì— ê°€ì…”ì„œ ì¼í•˜ê³  사셔요. ëŒì•„가실 ìƒê°ì€ 마셔요. 제가, 아버지 ë§ì”€ëŒ€ë¡œ í˜¼ìž ë–¨ì–´ì ¸ 있으니 ì•„ë²„ì§€ë„ ì œ ë§ì”€ëŒ€ë¡œ ëŒì•„가실 ìƒê°ì€ 마셔요, 네, 그렇다고 대답하셔요!" +하고는 ë˜ í•œ 번 ë‚´ ê°€ìŠ´ì— ëª¸ì„ ê¸°ëŒ€ì˜¤. +죽기를 결심한 나는 `오ëƒ, 그러마.' 하는 ëŒ€ë‹µì„ í•  수는 없었소. 그래서, +"오, ë‚´ ì‚´ë„ë¡ íž˜ì“°ë§ˆ." +하는 약ì†ì„ 주어서 ì •ìž„ì„ ëŒë ¤ë³´ëƒˆì†Œ. +ì •ìž„ì˜ ë°œìžêµ­ 소리가 안 들리게 ëœ ë•Œì— ë‚˜ëŠ” 빠른 걸ìŒìœ¼ë¡œ ì˜¥ìƒ ì •ì›ìœ¼ë¡œ 나갔소. 비가 막 뿌리오. +나는 ì •ìž„ì´ê°€ 타고 나가는 ìžë™ì°¨ë¼ë„ ë³¼ 양으로 호텔 현관 ì•žì´ ë³´ì´ëŠ” 꼭대기로 올ë¼ê°”소. í˜„ê´€ì„ ë– ë‚œ ìžë™ì°¨ 하나가 전찻길로 나서서는 ë¶ì„ 향하고 달아나서 순ì‹ê°„ì— ê·¸ ê½ë¬´ë‹ˆì— 달린 ë¶‰ì€ ë¶ˆì¡°ì°¨ 스러져 버리고 ë§ì•˜ì†Œ. +나는 미친 사람 모양으로, +"ì •ìž„ì•„, ì •ìž„ì•„!" +하고 ìˆ˜ì—†ì´ ë¶ˆë €ì†Œ. 나는 사 층ì´ë‚˜ ë˜ëŠ” ì´ ê¼­ëŒ€ê¸°ì—ì„œ 뛰어내려서 ì •ìž„ì´ê°€ 타고 ê°„ ìžë™ì°¨ì˜ 뒤를 따르고 싶었소. +"ì•„ì•„ ì˜ì›í•œ ì¸ìƒì˜ ì´ë³„!" +나는 ê·¸ 옥ìƒì— 얼마나 오래 ì„°ë˜ì§€ë¥¼ 모르오. ë‚´ 머리와 낯과 배스로브ì—서는 ë¬¼ì´ í르오. ë°©ì— ë“¤ì–´ì˜¤ë‹ˆ ì •ìž„ì´ê°€ ë¼ì¹˜ê³  ê°„ 향기와 추억만 남았소. +나는 ë°© 안 구ì„구ì„ì— ì •ìž„ì˜ ëª¨ì–‘ì´ ë³´ì´ëŠ” ê²ƒì„ ê¹¨ë‹¬ì•˜ì†Œ. 특별히 ì •ìž„ì´ê°€ 고개를 숙ì´ê³  ì„œ ìžˆë˜ ë‚´ êµì˜ ë’¤ì—는 분명히 갈색 외투를 ìž…ì€ ì •ìž„ì˜ ëª¨ì–‘ì´ ì™„ì—°í•˜ì˜¤. +"ì •ìž„ì•„!" +하고 나는 ê·¸ 곳으로 ë”°ë¼ê°€ì˜¤. 그러나 가면 거기는 ì •ìž„ì€ ì—†ì†Œ. +나는 êµì˜ì— 앉소. 그러면 ì •ìž„ì˜ ì”¨ê·¼ì”¨ê·¼í•˜ëŠ” 숨소리와 ë”ìš´ ìž…ê¹€ì´ ë¶„ëª… ë‚´ ì˜¤ë¥¸íŽ¸ì— ê°ê°ì´ ë˜ì˜¤. ì•„ì•„ 무서운 환ê°ì´ì—¬! +나는 ìžë¦¬ì— 눕소. 그리고 ì •ìž„ì˜ í™˜ê°ì„ 피하려고 ë¶ˆì„ ë„오. 그러면 ì •ìž„ì´ê°€ 내게 ì•ˆê¸°ë˜ ìžë¦¬ì¯¤ì— 환하게 ì •ìž„ì˜ ëª¨ì–‘ì´ ë‚˜íƒ€ë‚˜ì˜¤. +나는 ë¶ˆì„ ì¼œì˜¤. ë˜ ë¶ˆì„ ë„오. +ë‚ ì´ ë°ìž 나는 비가 ê°  ê²ƒì„ ë‹¤í–‰ìœ¼ë¡œ ë¹„í–‰ìž¥ì— ë‹¬ë ¤ê°€ì„œ 비행기를 얻어 탔소. +나는 다시 ì¡°ì„ ì˜ í•˜ëŠ˜ì„ í†µê³¼í•˜ê¸°ê°€ ì‹«ì–´ì„œ ë¶ê°•ì—ì„œ 비행기ì—ì„œ 내려서 ë¬¸ì‚¬ì— ì™€ì„œ 대련으로 가는 배를 탔소. +나는 대련ì—ì„œ 내려서 í•˜ë£»ë°¤ì„ ì—¬ê´€ì—ì„œ ìžê³ ëŠ” 곧 장춘 가는 ê¸‰í–‰ì„ íƒ”ì†Œ. 물론 아무ì—ê²Œë„ ì—½ì„œ í•œ 장 í•œ ì¼ ì—†ì—ˆì†Œ. ê·¸ê²ƒì€ ì¸ì—°ì„ ëŠì€ 세ìƒì— 대하여 ì—°ì—°í•œ 마ìŒì„ 가지는 ê²ƒì„ ë¶€ë„럽게 ìƒê°í•œ 까닭ì´ì˜¤. +차가 옛날ì—는 우리 ì¡°ìƒë„¤ê°€ ì‚´ê³  문화를 ì§“ë˜ ì˜› í„°ì „ì¸ ë§Œì£¼ì˜ ë²ŒíŒì„ 달릴 ë•Œì—는 ê°íšŒë„ 없지 아니하였소. 그러나 나는 지금 그런 한가한 ê°ìƒì„ 쓸 ê²¨ë¥¼ì´ ì—†ì†Œ. +ë‚´ê°€ 믿고 가는 ê³³ì€ í•˜ì–¼ë¹ˆì— ìžˆëŠ” ì–´ë–¤ 친구요. 그는 Rë¼ëŠ” 사람으로서 ê²½ìˆ ë…„ì— A씨 ë“±ì˜ ë§ëª…ê°ì„ ë”°ë¼ ë‚˜ê°”ë‹¤ê°€ ì•„ë¼ì‚¬ì—ì„œ 무관 í•™êµë¥¼ 졸업하고 ì•„ë¼ì‚¬ 사관으로서 구주 대전ì—ë„ ì¶œì •ì„ í•˜ì˜€ë‹¤ê°€, í˜ëª… 후ì—ë„ ì´ë‚´ ì ìœ„êµ°ì— ë¨¸ë¬¼ëŸ¬ì„œ 지금까지 소비ì—트 장êµë¡œ 있는 사람ì´ì˜¤. ì§€ê¸ˆì€ ìœ¡êµ° 소장ì´ë¼ë˜ê°€. +나는 í•˜ì–¼ë¹ˆì— ê·¸ ì‚¬ëžŒì„ ì°¾ì•„ê°€ëŠ” 것ì´ì˜¤. ê·¸ ì‚¬ëžŒì„ ì°¾ì•„ì•¼ ì•„ë¼ì‚¬ì— 들어갈 ì—¬í–‰ê¶Œì„ ì–»ì„ ê²ƒì´ìš”, ì—¬í–‰ê¶Œì„ ì–»ì–´ì•¼ ë‚´ê°€ í‰ì†Œì— ì´ìƒí•˜ê²Œë„ ê·¸ë¦¬ì›Œí•˜ë˜ ë°”ì´ì¹¼ 호를 ë³¼ 것ì´ì˜¤. +í•˜ì–¼ë¹ˆì— ë‚´ë¦° ê²ƒì€ í•´ê°€ 뉘엿뉘엿 넘어가는 ì„ì–‘ì´ì—ˆì†Œ. +나는 ì•ˆì¤‘ê·¼ì´ ì´ë“±ë°•ë¬¸(伊藤åšæ–‡:ì´í†  히로부미)ì„ ìœ ê³³ì´ ì–´ë”˜ê°€ 하고 벌íŒê³¼ ê°™ì´ ë„“ì€ í”Œëž«í¼ì— 내렸소. 과연 êµ­ì œ ë„ì‹œë¼ ì„œì–‘ 사람, 중국 사람, ì¼ë³¸ ì‚¬ëžŒì´ ê°ê¸° ì œ ë§ë¡œ 지껄ì´ì˜¤. ì•„ì•„ ì¡°ì„  ì‚¬ëžŒë„ ìžˆì„ ê²ƒì´ì˜¤ë§ˆëŠ” 다들 ì–‘ë³µì„ ìž…ê±°ë‚˜ ì²­ë³µì„ ìž…ê±°ë‚˜ 하고 ë˜ ì‚¬ëžŒì´ ë§Žì€ ê³³ì—서는 ë§ë„ 잘 하지 아니하여 ì•„ë¬´ìª¼ë¡ ì¡°ì„  ì‚¬ëžŒì¸ ê²ƒì„ í‘œì‹œí•˜ì§€ 아니하는 íŒì´ë¼ ê·¸ 골격과 í‘œì •ì„ ì‚´í”¼ê¸° ì „ì—는 ì–´ëŠ ê²ƒì´ ì¡°ì„  사람ì¸ì§€ ì•Œ ê¸¸ì´ ì—†ì†Œ. 아마 허름하게 차리고 기운 ì—†ì´, 비창한 ë¹›ì„ ë ê³  ì‚¬ëžŒì˜ ëˆˆì„ ìŠ¬ìŠ¬ 피하는 ì € 순하게 ìƒê¸´ ì‚¬ëžŒë“¤ì´ ì¡°ì„  사람ì´ê² ì§€ìš”. 언제나 í•œ 번 가는 곳마다 ë™ì–‘ì´ë“ ì§€, 서양ì´ë“ ì§€, +`나는 ì¡°ì„  사람ì´ì˜¤!' +하고 ë½ë‚´ê³  ë‹¤ë‹ ë‚ ì´ ìžˆì„까 하면 ëˆˆë¬¼ì´ ë‚˜ì˜¤. ë”구나, 하얼빈과 ê°™ì€ ê°ìƒ‰ ì¸ì¢…ì´ ëª¨ì—¬ì„œ ìƒì¡´ ê²½ìŸì„ 하는 ë§ˆë‹¹ì— ì„œì„œ ì´ëŸ° 비ê°ì´ 간절하오. ì•„ì•„ ì´ ë¶ˆìŒí•œ ìœ ëž‘ì˜ ë¬´ë¦¬ ì¤‘ì— ë‚˜ë„ í•˜ë‚˜ë¥¼ ë” ë³´íƒœëŠ”ê°€ 하면 ëˆˆë¬¼ì„ ì”»ì§€ 아니할 수 없었소. +나는 ì—­ì—ì„œ 나와서 ì–´ë–¤ ì•„ë¼ì‚¬ 병정 하나를 붙들고 Rì˜ ì•„ë¼ì‚¬ ì´ë¦„ì„ ë¶ˆë €ì†Œ. 그리고 ì•„ëŠëƒê³  ì˜ì–´ë¡œ 물었소. +ê·¸ ë³‘ì •ì€ ë‚´ ë§ì„ 잘못 알아들었는지, ë˜ëŠ” R를 모르는지 무엇ì´ë¼ê³  ì•„ë¼ì‚¬ë§ë¡œ 지껄ì´ëŠ” 모양ì´ë‚˜ 나는 물론 ê·¸ê²ƒì„ ì•Œì•„ë“¤ì„ ìˆ˜ê°€ 없었소. 그러나 나는 ê·¸ ë³‘ì •ì˜ í‘œì •ì—ì„œ 내게 호ì˜ë¥¼ 가진 ê²ƒì„ ì§ìž‘하고 í•œ 번 ë” ë¶„ëª…ížˆ, +"요십 알렉산드로비치 리가ì´." +ë¼ê³  불러 보았소. +ê·¸ ë³‘ì •ì€ ë¹™ê·¸ë ˆ 웃고 고개를 í”드오. ì´ ë‘ ì™¸êµ­ ì‚¬ëžŒì˜ ì´ìƒí•œ êµì„­ì— í¥ë¯¸ë¥¼ 가지고 여러 ì•„ë¼ì‚¬ 병정과 ë™ì–‘ ì‚¬ëžŒë“¤ì´ ì‹­ì—¬ ì¸ì´ë‚˜ 우리 ì£¼ìœ„ì— ëª¨ì—¬ë“œì˜¤. +ê·¸ ë³‘ì •ì´ ë‚˜ë¥¼ ë°”ë¼ë³´ê³  ë˜ í•œ 번 ê·¸ ì´ë¦„ì„ ë¶ˆëŸ¬ ë³´ë¼ëŠ” 모양 같기로 나는 ì´ë²ˆì—는 Rì˜ ì•„ë¼ì‚¬ ì´ë¦„ì— `제너럴'ì´ë¼ëŠ” ë§ì„ 붙여 불러 보았소. +그랬ë”니 ì–´ë–¤ 다른 ë³‘ì •ì´ ë›°ì–´ë“¤ë©°, +"게네ë¼ìš° 리가ì´!" +하고 안다는 í‘œì •ì„ í•˜ì˜¤. `게네ë¼ìš°'ë¼ëŠ” ê²ƒì´ ì•„ë§ˆ ì•„ë¼ì‚¬ë§ë¡œ 장군ì´ëž€ ë§ì¸ê°€ 하였소. +"예스. 예스." +하고 나는 기ì˜ê²Œ 대답하였소. 그리고는 ì•„ë¼ì‚¬ 병정들ë¼ë¦¬ 무ì—ë¼ê³  지껄ì´ë”니, ê·¸ ì¤‘ì— í•œ ë³‘ì •ì´ ë‚˜ì„œë©´ì„œ 고개를 ë„ë•ë„ë•í•˜ê³ , 제가 마차 하나를 불러서 나를 태우고 ì €ë„ íƒ€ê³  어디로 달려가오. +ê·¸ ì•„ë¼ì‚¬ ë³‘ì •ì€ ì¹œì ˆížˆ ì•Œì§€ë„ ëª»í•˜ëŠ” ë§ë¡œ ì´ê²ƒì €ê²ƒì„ 가리키면서 ì„¤ëª…ì„ í•˜ë”니 ë‚´ê°€ 못 알아듣는 ì¤„ì„ ìƒê°í•˜ê³  ë‚´ 어깨를 툭 치고 웃소. 어린애와 ê°™ì´ ìˆœí•œ 사람들ì´êµ¬ë‚˜ 하고 나는 고맙다는 표로 고개만 ë„ë•ë„ë•í•˜ì˜€ì†Œ. +어디로 어떻게 가는지 서양 시가로 달려가다가 ì–´ë–¤ í° ì €íƒ ì•žì— ì´ë¥´ëŸ¬ì„œ 마차를 ê·¸ 현관 앞으로 들ì´ëª°ì•˜ì†Œ. +현관ì—서는 ì¢…ì¡¸ì´ ë‚˜ì™”ì†Œ. ë‚´ê°€ ëª…í•¨ì„ ë“¤ì—¬ë³´ëƒˆë”니 ë¶€ê´€ì¸ ë“¯í•œ ì•„ë¼ì‚¬ 장êµê°€ 나와서 나를 으리으리한 ì‘접실로 ì¸ë„하였소. 얼마 있노ë¼ë‹ˆ ì¤‘ë…„ì´ ë„˜ì€ ì–´ë–¤ ëŒ€ìž¥ì´ ë‚˜ì˜¤ëŠ”ë° êµ°ë³µì— ì¹¼ëˆë§Œ 늘였소. +"ì´ê²Œ 누구요." +하고 ê·¸ ëŒ€ìž¥ì€ ë‹¬ë ¤ë“¤ì–´ì„œ 나를 껴안았소. ì´ì‹­ì˜¤ ë…„ ë§Œì— ë§Œë‚˜ëŠ” 우리는 서로 알아본 것ì´ì˜¤. +ì´ìœ½ê³  나는 ê·¸ì˜ ë¶€ì¸ê³¼ ìžë…€ë“¤ë„ 만났소. ê·¸ë“¤ì€ ë‹¤ ì•„ë¼ì‚¬ 사람ì´ì˜¤. +ì €ë…ì´ ëë‚œ ë’¤ì— ë‚˜ëŠ” Rì˜ ë¶€ì¸ê³¼ ë”¸ì˜ ìŒì•…ê³¼ 그림 구경과 ê¸°íƒ€ì˜ ê´€ëŒ€ë¥¼ 받고 ë‹¨ë‘˜ì´ ì´ì•¼ê¸°í•  기회를 얻었소. 경술년 당시 ì´ì•¼ê¸°ë„ 나오고, Aì”¨ì˜ ì´ì•¼ê¸°ë„ 나오고, Rì˜ ì‹ ì„¸ íƒ€ë ¹ë„ ë‚˜ì˜¤ê³ , ë‚´ ì´ì‹­ì˜¤ ë…„ ê°„ì˜ ìƒí™œ ì´ì•¼ê¸°ë„ 나오고, 소비ì—트 í˜ëª… ì´ì•¼ê¸°ë„ 나오고, 하얼빈 ì´ì•¼ê¸°ë„ 나오고, 우리네가 어려서 서로 ì‚¬ê·€ë˜ íšŒêµ¬ë‹´ë„ ë‚˜ì˜¤ê³  ì´ì•¼ê¸°ê°€ 그칠 바를 몰ëžì†Œ. "ì¡°ì„ ì€ ê·¸ë¦½ì§€ ì•Šì€ê°€." +하는 ë‚´ ë§ì— ì¾Œí™œí•˜ë˜ R는 고개를 숙ì´ê³  추연한 ë¹›ì„ ë³´ì˜€ì†Œ. +나는 Rì˜ ì¶”ì—°í•œ 태ë„를 아마 ê³ êµ­ì„ ê·¸ë¦¬ì›Œí•˜ëŠ” 것으로만 여겼소. 그래서 나는 그리 침ìŒí•˜ëŠ” ê²ƒì„ ë³´ê³ , +"얼마나 ê³ êµ­ì´ ê·¸ë¦½ê² ë‚˜. 나는 ê³ êµ­ì„ ë– ë‚œ 지가 ì¼ ì£¼ì¼ë„ 안 ë˜ê±´ë§ˆëŠ” 못 견디게 그리운ë°." +하고 ë™ì •í•˜ëŠ” ë§ì„ 하였소. +í–ˆë”니, ì´ ë§ ë³´ì‹œì˜¤. 그는 침ìŒì„ 깨뜨리고 고개를 ë²ˆì© ë“¤ë©°, +"아니! 나는 ê³ êµ­ì´ ì¡°ê¸ˆë„ ê·¸ë¦½ì§€ 아니하ì´. ë‚´ê°€ 지금 ìƒê°í•œ ê²ƒì€ ìžë„¤ ë§ì„ 듣고 ê³ êµ­ì´ ê·¸ë¦¬ìš´ê°€ 그리워할 ê²ƒì´ ìžˆëŠ”ê°€ë¥¼ ìƒê°í•´ 본 것ì¼ì„¸. 그랬ë”니 아무리 ìƒê°í•˜ì—¬ë„ 나는 ê³ êµ­ì´ ê·¸ë¦½ë‹¤ëŠ” ìƒê°ì„ 가질 수가 없어. 그야 어려서 ìžë¼ë‚  ë•Œì— ë³´ë˜ ê°•ì‚°ì´ë¼ë“ ì§€ ë‚´ ê¸°ì–µì— ë‚¨ì€ ì•„ëŠ” 사람들ì´ë¼ë“ ì§€, ë³´ê³  싶다 하는 ìƒê°ë„ 없지 아니하지마는 ê·¸ê²ƒì´ ê³ êµ­ì´ ê·¸ë¦¬ìš´ 것ì´ë¼ê³  í•  수가 있ì„까. ê·¸ ë°–ì—는 나는 아무리 ìƒê°í•˜ì—¬ë„ ê³ êµ­ì´ ê·¸ë¦¬ìš´ ê²ƒì„ ì°¾ì„ ê¸¸ì´ ì—†ë„¤. ë‚˜ë„ ì§€ê¸ˆ ìžë„¤ë¥¼ ë³´ê³  ë˜ ìžë„¤ ë§ì„ 듣고 오래 ìžŠì–´ë²„ë ¸ë˜ ê³ êµ­ì„ ì¢€ 그립게, 그립다 하게 ìƒê°í•˜ë ¤ê³  í•´ 보았지마는 ë„무지 나는 ê³ êµ­ì´ ê·¸ë¦½ë‹¤ëŠ” ìƒê°ì´ 나지 않네." +ì´ ë§ì— 나는 ê¹œì§ ë†€ëžì†Œ. 몸서리치게 무서웠소. 나는 í•´ì™¸ì— ì˜¤ëž˜ 표랑하는 ì‚¬ëžŒì€ ìœ¼ë ˆ ê³ êµ­ì„ ê·¸ë¦¬ì›Œí•  것으로 믿고 있었소. ê·¸ëŸ°ë° ì´ ì‚¬ëžŒì´, ì¼ì°ì€ ê³ êµ­ì„ ì‚¬ëž‘í•˜ì—¬ ëª©ìˆ¨ê¹Œì§€ë„ ë°”ì¹˜ë ¤ë˜ ì´ ì‚¬ëžŒì´ ë„무지 ì´ì²˜ëŸ¼ ê³ êµ­ì„ ìžŠì–´ë²„ë¦°ë‹¤ëŠ” ê²ƒì€ ë†€ë¼ìš´ ì •ë„를 지나서 괘씸하기 그지없었소. ë‚˜ë„ ë¹„ë¡ ì¡°ì„ ì„ ë– ë‚œë‹¤ê³ , ì˜ì›ížˆ 버린다고 나서기는 했지마는 나로는 죽기 ì „ì—는 아니 ë¹„ë¡ ì£½ë”ë¼ë„ 잊어버리지 못할 ê³ êµ­ì„ ìžŠì–´ë²„ë¦° Rì˜ ì‹¬ì‚¬ê°€ 난측하고 ì›ë§ìŠ¤ëŸ¬ì› ì†Œ. +"ê³ êµ­ì´ ê·¸ë¦½ì§€ê°€ ì•Šì•„?" +하고 Rì—게 묻는 ë‚´ 어성ì—는 격분한 ë¹›ì´ ìžˆì—ˆì†Œ. +"ì´ìƒí•˜ê²Œ ìƒê°í•˜ì‹œê² ì§€. 하지만 ê³ êµ­ì— ë¬´ìŠ¨ 그리울 ê²ƒì´ ìžˆë‹¨ ë§ì¸ê°€. ê·¸ 빈대 ë“는 오막살ì´ê°€ 그립단 ë§ì¸ê°€. 나무 í•œ ê°œ 없는 ì‚°ì´ ê·¸ë¦½ë‹¨ ë§ì¸ê°€. ë¬¼ë³´ë‹¤ë„ ëª¨ëž˜ê°€ ë§Žì€ ë‹¤ 늙어빠진 ê°œì²œì´ ê·¸ë¦½ë‹¨ ë§ì¸ê°€. ê·¸ 무기력하고 가난한, 시기 많고 싸우고 하는 ê·¸ ë°±ì„±ì„ ê·¸ë¦¬ì›Œí•œë‹¨ ë§ì¸ê°€. 그렇지 아니하면 무슨 그리워할 ìŒì•…ì´ ìžˆë‹¨ ë§ì¸ê°€, ë¯¸ìˆ ì´ ìžˆë‹¨ ë§ì¸ê°€, ë¬¸í•™ì´ ìžˆë‹¨ ë§ì¸ê°€, 사ìƒì´ 있단 ë§ì¸ê°€, 사모할 만한 ì¸ë¬¼ì´ 있단 ë§ì¸ê°€! ë‚ ë”러 ê³ êµ­ì˜ ë¬´ì—‡ì„ ê·¸ë¦¬ì›Œí•˜ëž€ ë§ì¸ê°€. 나는 ì¡°êµ­ì´ ì—†ëŠ” 사람ì¼ì„¸. ë‚´ê°€ 소비ì—트 êµ°ì¸ìœ¼ë¡œ 있으니 소비ì—트가 ë‚´ ì¡°êµ­ì´ê² ì§€. 그러나 진심으로 ë‚´ ì¡°êµ­ì´ë¼ëŠ” ìƒê°ì€ 나지 아니하네." +하고 ì €ë… ë¨¹ì„ ë•Œì— ì•½ê°„ ë¶‰ì—ˆë˜ Rì˜ ì–¼êµ´ì€ ì´ìƒí•œ í¥ë¶„으로 ë”ìš± 붉어지오.유 정유 ì • +R는 ë¨¹ë˜ ë‹´ë°°ë¥¼ 화나는 ë“¯ì´ ìž¬ë–¨ì´ì— 집어ë˜ì§€ë©°, +"ë‚´ê°€ í•˜ì–¼ë¹ˆì— ì˜¨ 지가 ì¸ì œ 겨우 삼사 ë…„ë°–ì— ì•ˆ ë˜ì§€ë§ˆëŠ” ì¡°ì„  사람 ë•Œë¬¸ì— ë‚˜ëŠ” 견딜 수가 없어. 와서 달ë¼ëŠ” ê²ƒë„ ë‹¬ë¼ëŠ” 것ì´ì§€ë§ˆëŠ” ì¡°ì„  ì‚¬ëžŒì´ ë˜ ì–´ì°Œí•˜ì˜€ëŠë‹ˆ ë˜ ì–´ì°Œí•˜ì˜€ëŠë‹ˆ 하는 불명예한 ë§ì„ ë“¤ì„ ë•Œì—는 나는 ê¸ˆì‹œì— ì£½ì–´ 버리고 싶단 ë§ì¼ì„¸. 내게 가장 불쾌한 ê²ƒì´ ìžˆë‹¤ê³  하면 ê·¸ê²ƒì€ ê³ êµ­ì´ë¼ëŠ” 기억과 ì¡°ì„  ì‚¬ëžŒì˜ ì¡´ìž´ì„¸. ë‚´ê°€ ë§Œì¼ ì–´ëŠ ë‚˜ë¼ì˜ ë…재ìžê°€ ëœë‹¤ê³  하면 나는 첫째로 ì¡°ì„ ì¸ ìž…êµ­ 금지를 단행하려네. ë§Œì¼ ì¡°ì„ ì´ë¼ëŠ” ê²ƒì„ ìžŠì–´ë²„ë¦´ ì•½ì´ ìžˆë‹¤ê³  하면 나는 ìƒëª…ê³¼ 바꾸어서ë¼ë„ 사 먹고 싶어." +하고 R는 약간 í¥ë¶„ëœ ì–´ì¡°ë¥¼ 늦추어서, +"ë‚˜ë„ ëª¨ìŠ¤í¬ë°”ì— ìžˆë‹¤ê°€ ì²˜ìŒ ì›ë™ì— ë‚˜ì™”ì„ ì ì—는 ê¸¸ì„ ë‹¤ë…€ë„ í˜¹ì‹œ ë™í¬ê°€ ëˆˆì— ëœ¨ì´ì§€ë‚˜ 아니하나 하고 찾았네. 그래서 어디서든지 ë™í¬ë¥¼ 만나면 ë°˜ê°€ì´ ì†ì„ 잡았지. 했지만 ì ì  ê·¸ë“¤ì€ ì˜¤ì§ ê·€ì°®ì€ ì¡´ìž¬ì— ì§€ë‚˜ì§€ 못하다는 ê²ƒì„ ì•Œì•˜ë‹¨ ë§ì¼ì„¸. ì¸ì œëŠ” ì¡°ì„  사람ì´ë¼ê³ ë§Œ 하면 만나기가 무섭고 ë”ì°ë”ì°í•˜ê³  진저리가 나는 걸 어떡허나. ìžë„¤ ëª…í•¨ì´ ë“¤ì–´ì˜¨ ë•Œì—ë„ ì¡°ì„  사람ì¸ê°€ 하고 ê°€ìŠ´ì´ ëœ¨ë”했네." +하고 R는 ì›ƒì§€ë„ ì•„ë‹ˆí•˜ì˜¤. ê·¸ì˜ ì–¼êµ´ì—는, êµ°ì¸ë‹¤ìš´ 기운찬 얼굴ì—는 ì¦ì˜¤ì™€ ë¶„ë…¸ì˜ ë¹›ì´ ë„˜ì³¤ì†Œ. +"ë‚˜ë„ ìžë„¤ ì§‘ì— í™˜ì˜ë°›ëŠ” 나그네는 ì•„ë‹ì„¸ê·¸ë ¤." +하고 나는 ì´ ê²¬ë””ê¸° 어려운 불쾌하고 무서운 공기를 완화하기 위하여 ë†ë‹´ì‚¼ì•„ í•œ 마디를 ë˜ì§€ê³  웃었소. +나는 Rì˜ ë§ì´ ê³¼ê²©í•¨ì— ë†€ëžì§€ë§ˆëŠ”, ë˜ ìƒê°í•˜ë©´ Rê°€ í•œ ë§ ê°€ìš´ë°ëŠ” ë“¤ì„ ë§Œí•œ ì´ìœ ë„ 없지 아니하오. ê·¸ê²ƒì„ ìƒê°í•  ë•Œì— ë‚˜ëŠ” R를 괘씸하게 ìƒê°í•˜ê¸° ì „ì— ë‚´ê°€ 버린다는 ì¡°ì„ ì„ ìœ„í•˜ì—¬ì„œ ê°€ìŠ´ì´ ì•„íŒ ì†Œ. 그렇지만 ì´ì œ 나 따위가 ê°€ìŠ´ì„ ì•„íŒŒí•œëŒ€ì•¼ 무슨 ì†Œìš©ì´ ìžˆì†Œ. ì¡°ì„ ì— ë‚¨ì•„ 계신 형ì´ë‚˜ Rì˜ ë§ì„ 참고삼아 쓰시기 ë°”ë¼ì˜¤. 어쨌으나 나는 Rì—게서 목ì í•œ ì—¬í–‰ê¶Œì„ ì–»ì—ˆì†Œ. Rì—게는 다만, +`나는 피곤한 ëª¸ì„ ì¢€ 정양하고 싶다. 나는 ë‚´ê°€ í‰ì†Œì— ì¦ê²¨í•˜ëŠ” ë°”ì´ì¹¼ 호반ì—ì„œ 눈과 ì–¼ìŒì˜ í•œê²¨ìš¸ì„ ì§€ë‚´ê³  싶다.' +는 ê²ƒì„ ì—¬í–‰ì˜ ì´ìœ ë¡œ 삼았소. +R는 ë‚˜ì˜ ì´ˆì·Œí•œ ëª¨ì–‘ì„ ì§ìž‘하고 ë‚´ 핑계를 그럴듯하게 아는 모양ì´ì—ˆì†Œ. 그리고 나ë”러, `ì´ì™• 정양하려거든 카프카 지방으로 가거ë¼. 거기는 기후 í’ê²½ë„ ì¢‹ê³  ë˜ ìš”ì–‘ì›ì˜ ì„¤ë¹„ë„ ìžˆë‹¤.'는 ê²ƒì„ ë§í•˜ì˜€ì†Œ. ë‚˜ë„ í†¨ìŠ¤í† ì´ì˜ 소설ì—ì„œ, ê¸°íƒ€ì˜ ì—¬í–‰ê¸° 등ì†ì—ì„œ ì´ ì§€ë°©ì— ê´€í•œ ë§ì„ 못 ë“¤ì€ ê²ƒì´ ì•„ë‹ˆë‚˜ 지금 ë‚´ 처지ì—는 그런 따뜻하고 경치 ì¢‹ì€ ì§€ë°©ì„ ê°€ë¦´ ì—¬ìœ ë„ ì—†ê³  ë˜ ê·¸ëŸ¬í•œ ì§€ë°©ë³´ë‹¤ë„ ëˆˆê³¼ ì–¼ìŒê³¼ ë°”ëžŒì˜ ì‹œë² ë¦¬ì•„ì˜ ê²¨ìš¸ì´ í•©ë‹¹í•œ 듯하였소. +그러나 나는 Rì˜ í˜¸ì˜ë¥¼ êµ³ì´ ì‚¬ì–‘í•  í•„ìš”ë„ ì—†ì–´ì„œ 그가 ì¨ ì£¼ëŠ” 대로 ì†Œê°œìž¥ì„ ë‹¤ 받아 넣었소. 그는 나를 처남 매부 ê°„ì´ë¼ê³  소개해 주었소. +나는 모스í¬ë°” 가는 ë‹¤ìŒ ê¸‰í–‰ì„ ê¸°ë‹¤ë¦¬ëŠ” ì‚¬í˜ ë™ì•ˆ Rì˜ ì§‘ì˜ ì†ì´ ë˜ì–´ì„œ Rë¶€ì²˜ì˜ ì¹œì ˆí•œ 대우를 받았소. +ê·¸ 후ì—는 나는 R와 ì¡°ì„ ì— ê´€í•œ í† ë¡ ì„ í•œ ì¼ì€ 없지마는 Rê°€ ì´ë¦„지어 ë§ì„ í•  ë•Œì—는 ì¡°ì„ ì„ ìžŠì—ˆë…¸ë¼, 그리워할 ê²ƒì´ ì—†ë…¸ë¼, 하지마는 무ì˜ì‹ì ìœ¼ë¡œ ë§ì„ í•  ë•Œì—는 ì¡°ì„ ì„ ëª» 잊고 ë˜ ì¡°ì„ ì„ ì—¬ëŸ¬ ì ìœ¼ë¡œ 그리워하는 ì–‘ì„ ë³´ì•˜ì†Œ. 나는 ê·¸ê²ƒìœ¼ë¡œì¨ ë§Œì¡±í•˜ê²Œ 여겼소. +나는 ê¸ˆìš”ì¼ ì˜¤í›„ 세시 모스í¬ë°” 가는 급행으로 í•˜ì–¼ë¹ˆì„ ë– ë‚¬ì†Œ. ì—­ë‘ì—는 R와 Rì˜ ê°€ì¡±ì´ ë‚˜ì™€ì„œ 꽃과 ê³¼ì¼ê³¼ 여러 가지 선물로 나를 전송하였소. R와 Rì˜ ê°€ì¡±ì€ ë‚˜ë¥¼ ì •ë§ í˜•ì œì˜ ì˜ˆë¡œ 대우하여 차가 떠나려 í•  ë•Œì— í¬ì˜¹ê³¼ 키스로 작별하여 주었소. +ì´ ë‚ ì€ í½ ë”°ëœ»í•˜ê³  ì¼ê¸°ê°€ ì¢‹ì€ ë‚ ì´ì—ˆì†Œ. í•˜ëŠ˜ì— êµ¬ë¦„ í•œ ì , ë•…ì— ë°”ëžŒ í•œ ì  ì—†ì´ ë§ˆì¹˜ ëŠ¦ì€ ë´„ë‚ ê³¼ ê°™ì´ ë”°ëœ»í•œ ë‚ ì´ì—ˆì†Œ. +차는 떠났소. íŒë‹¤ëŠ” ë‘¥ 안 íŒë‹¤ëŠ” ë‘¥ ë§ì½ ë§Žì€ ë™ì¤‘ë¡œ(ì§€ê¸ˆì€ ë¶ë§Œ ì² ë¡œë¼ê³  하오.)ì˜ êµ­ì œ ì—´ì°¨ì— ëª¸ì„ ì˜íƒí•œ 것ì´ì˜¤. +송화강(æ¾èŠ±æ±Ÿ:쑹화 ê°•)ì˜ ì² êµë¥¼ 건너오. ì•„ì•„ ê·¸ë¦¬ë„ ë‚¯ìµì€ 송화강! ì†¡í™”ê°•ì´ ì™œ ë‚¯ì´ ìµì†Œ. ì´ ì†¡í™”ê°•ì€ ë¶ˆí•¨ì‚°(장백산)ì— ê·¼ì›ì„ 발하여 광막한 ë¶ë§Œì£¼ì˜ ì‚¬ëžŒë„ ì—†ëŠ” 벌íŒì„ í˜¼ìž ì†Œë¦¬ë„ ì—†ì´ í˜ëŸ¬ê°€ëŠ” ê²ƒì´ ë‚´ 신세와 같소. ì´ ë¶ë§Œì£¼ì˜ 벌íŒì„ 만든 ìžê°€ 송화강ì´ì§€ë§ˆëŠ” 나는 그만한 íž˜ì´ ì—†ëŠ” ê²ƒì´ ë¶€ë„러울 ë¿ì´ì˜¤. ì´ ê´‘ë§‰í•œ ë¶ë§Œì˜ 벌íŒì„ ë‚´ ì†ìœ¼ë¡œ 개척하여서 ì¡°ì„  ì‚¬ëžŒì˜ ë‚™ì›ì„ ë§Œë“¤ìž í•˜ê³  ë½ë‚´ì–´ 볼까. ê·¸ê²ƒì€ í˜•ì´ í•˜ì‹œì˜¤. ë‚´ ì–´ë¦°ê²ƒì´ ìžë¼ê±°ë“  그놈ì—게나 그러한 ìƒê°ì„ 넣어 주시오. +ë™ì–‘ì˜ êµ­ì œì  ê´´ë¬¼ì¸ í•˜ì–¼ë¹ˆ ì‹œê°€ë„ ê¹Œë§£ê²Œ 안개ì—ì„œ 스러져 버리고 ë§ì•˜ì†Œ. 그러나 ê·¸ 시가를 싼 까만 ê¸°ìš´ì´ êµ­ì œì  í’ìš´ì„ í¬ìž¥í•œ 것ì´ë¼ê³  할까요. +ê°€ë„ê°€ë„ ë²ŒíŒ. ì„œë¦¬ë§žì€ ë§ˆë¥¸ 풀바다. 실개천 í•˜ë‚˜ë„ ì—†ëŠ” 메마른 사막. 어디를 ë³´ì•„ë„ ì‚° 하나 없으니 하늘과 ë•…ì´ ì°© 달ë¼ë¶™ì€ 듯한 천지. 구름 í•œ ì  ì—†ê±´ë§Œë„ ê·¸ í° íƒœì–‘ ê°€ì§€ê³ ë„ ë¯¸ì²˜ 다 비추지 못하여 지í‰ì„  호를 그린 지í‰ì„  위ì—는 í•­ìƒ í™©í˜¼ì´ ë– ë„는 듯한 세계. ì´ ì†ìœ¼ë¡œ ë‚´ê°€ ëª¸ì„ ë‹´ì€ ì—´ì°¨ëŠ” 서쪽으로 서쪽으로 í•´ê°€ 가는 걸ìŒì„ ë”°ë¼ì„œ 달리고 있소. 열차가 달리는 바퀴 ì†Œë¦¬ë„ ë°˜í–¥í•  ê³³ì´ ì—†ì–´ 힘없는 í•œìˆ¨ê°™ì´ ìŠ¤ëŸ¬ì§€ê³  마오. +ê¸°ì¨ ê°€ì§„ ì‚¬ëžŒì´ ì§€ë£¨í•´ì„œ 못 견딜 ì´ í’ê²½ì€ ë‚˜ê°™ì´ ìˆ˜ì‹¬ 가진 사람ì—게는 가장 ê³µìƒì˜ ë§ì„ ë‹¬ë¦¬ê¸°ì— í•©ë‹¹í•œ ê³³ì´ì˜¤. +ì´ ê³³ì—ë„ ì‚°ë„ ìžˆê³  ëƒ‡ë¬¼ë„ ìžˆê³  ì‚¼ë¦¼ë„ ìžˆê³  ê½ƒë„ í”¼ê³  ë‚ ì§ìŠ¹, 길ì§ìŠ¹ì´ ë‚ ê³  ê¸°ë˜ ë•Œë„ ìžˆì—ˆê² ì§€ìš”. ê·¸ëŸ¬ë˜ ê²ƒì´ ëª‡ë§Œ ë…„ 지나는 ë™ì•ˆì— ì‚°ì€ ë‚®ì•„ì§€ê³  ê³¨ì€ ë†’ì•„ì ¸ì„œ 마침내 ì´ ê¼´ì´ ëœ ê²ƒì¸ê°€ 하오. ë§Œì¼ í° íž˜ì´ ìžˆì–´ ì´ ê´‘ì•¼ë¥¼ 파낸다 하면 물 í르고 고기 ë†€ë˜ ê°•ê³¼, 울고 ì›ƒë˜ ìƒë¬¼ì´ ì‚´ë˜ ìžì·¨ê°€ ìžˆì„ ê²ƒì´ì˜¤. ì•„ì•„ ì´ ëª¨ë“  ê¸°ì–µì„ ê½‰ 품고 ì£½ì€ ë“¯ì´ ìž ìž í•œ 광야ì—! +ë‚´ê°€ 탄 차가 Fì—­ì— ë„ì°©í•˜ì˜€ì„ ë•Œì—는 ë¶ë§Œì£¼ ê´‘ì•¼ì˜ ì„ì–‘ì˜ ì•„ë¦„ë‹¤ì›€ì€ ê·¸ ê·¹ë„ì— ë‹¬í•œ 것 같았소. 둥긋한 지í‰ì„  ìœ„ì— ê±°ì˜ ê±¸ë¦° 커다란 í•´! 아마 ê·¸ 신비하고 ìž¥ì—„í•¨ì´ ë‚´ 경험으로는 ì´ ê³³ì—서밖ì—는 ë³¼ 수 없는 것ì´ë¼ê³ ìƒê°í•˜ì˜¤. ì´ê¸€ì´ê¸€ ì´ê¸€ì´ê¸€ ê·¸ëŸ¬ë©´ì„œë„ ë‘¥ê¸€ë‹¤ëŠ” 체모를 변치 아니하는 ê·¸ 지는 í•´! +게다가 먼 지í‰ì„ ìœ¼ë¡œë¶€í„° 기어드는 í™©í˜¼ì€ ì¸ì œëŠ” 대지를 ê±°ì˜ ë‹¤ ë®ì–´ 버려서 마른 풀로 ëœ ì§€ë©´ì€ ê°€ë­‡ê°€ë­‡í•œ ë¹›ì„ ë ê³  ì‚¬ë§‰ì˜ ê°€ëŠ” 모래를 ë¨¸ê¸ˆì€ ì§€ëŠ” í•´ì˜ ê´‘ì„ ì„ ë°˜ì‚¬í•˜ì—¬ì„œ 대기는 ì§™ì€ ìžì¤ë¹›ì„ 바탕으로 í•œ 가지ê°ìƒ‰ì˜ ëª…ì•”ì„ ê°€ì§„, ì˜¤ìƒ‰ì´ ì˜ë¡±í•œ, ë„무지 ë‚´ê°€ ì¼ì° 경험해 보지 못한 ìƒ‰ì±„ì˜ ì„¸ê³„ë¥¼ ì´ë£¨ì—ˆì†Œ. ì•„ 좋다! +ê·¸ ì†ì— 수ì€ê°™ì´ 빛나는, 수없는 ìž‘ê³  í° í˜¸ìˆ˜ë“¤ì˜ ë¹›! ê·¸ ì†ìœ¼ë¡œ 날아오는 수없고 ì´ë¦„ 모를 ìƒˆë“¤ì˜ ë–¼ë„ ì´ ì„¸ìƒì˜ 것ì´ë¼ê³ ëŠ” ìƒê°í•˜ì§€ 아니하오. +나는 ê±°ì˜ ë¬´ì˜ì‹ì ìœ¼ë¡œ ì°¨ì—ì„œ 뛰어내렸소. ê±°ì˜ ë– ë‚  ì‹œê°„ì´ ë‹¤ ë˜ì–´ì„œ ì§ì˜ ì¼ë¶€ë¶„ì€ ë¯¸ì²˜ ê°€ì§€ì§€ë„ ëª»í•˜ê³  뛰어내렸소. 반쯤 미친 것ì´ì˜¤. +정거장 ì•ž 조그마한 ì•„ë¼ì‚¬ ì‚¬ëžŒì˜ ì—¬ê´€ì—다가 ì§ì„ 맡겨 버리고 나는 ë‹¨ìž¥ì„ ëŒê³  ì² ë„ ì„ ë¡œë¥¼ ë›°ì–´ 건너서 í˜¸ìˆ˜ì˜ ìˆ˜ì€ë¹› 나는 ê³³ì„ ì°¾ì•„ì„œ 지향 ì—†ì´ ê±¸ì—ˆì†Œ. +í•œ 호수를 가서 ë³´ë©´ ë˜ ì € 편 호수가 ë” ì•„ë¦„ë‹¤ì›Œ ë³´ì´ì˜¤. ì›ì»¨ëŒ€ ì € 지는 í•´ê°€ 다 지기 ì „ì— ì´ ê´‘ì•¼ì— ìžˆëŠ” 호수를 다 ëŒì•„ë³´ê³  싶소. +ë‚´ê°€ 호숫 ê°€ì— ì„°ì„ ë•Œì— ê·¸ ê±°ìš¸ê°™ì´ ìž”ìž”í•œ í˜¸ìˆ˜ë©´ì— ë¹„ì¹˜ëŠ” ë‚´ 그림ìžì˜ 외로움ì´ì—¬, 그러나 아름다움ì´ì—¬! ê·¸ 호수는 ì˜ì›í•œ ìš°ì£¼ì˜ ì‹ ë¹„ë¥¼ 품고 í•˜ëŠ˜ì´ ì˜¤ë©´ 하늘ì„, 새가 오면 새를, êµ¬ë¦„ì´ ì˜¤ë©´ 구름ì„, 그리고 ë‚´ê°€ 오면 나를 비추지 아니하오. 나는 호수가 ë˜ê³  싶소. 그러나 형! 나는 ì´ í˜¸ìˆ˜ë©´ì—ì„œ 얼마나 ì •ìž„ì˜ ì–¼êµ´ì„ ì°¾ì•˜ê² ì†Œ. ê·¸ê²ƒì€ ë¬¼ë¦¬í•™ì ìœ¼ë¡œ 불가능한 ì¼ì´ê² ì§€ìš”. ë™ê²½ì˜ ë³‘ì‹¤ì— ëˆ„ì›Œ 있는 ì •ìž„ì˜ ëª¨ì–‘ì´ ëª½ê³  ì‚¬ë§‰ì˜ í˜¸ìˆ˜ë©´ì— ë¹„ì¹  리야 있겠소. 없겠지마는 나는 호수마다 ì •ìž„ì˜ ê·¸ë¦¼ìžë¥¼ 찾았소. 그러나 ë³´ì´ëŠ” ê²ƒì€ ì™¸ë¡œìš´ ë‚´ 그림ìžë¿ì´ì˜¤. +`ê°€ìž. ë없는 사막으로 í•œì—†ì´ ê°€ìž. 가다가 ë‚´ ê¸°ìš´ì´ ì§„í•˜ëŠ” ìžë¦¬ì— 나는 ë‚´ ì†ìœ¼ë¡œ 모래를 파고 ê·¸ ì†ì— ë‚´ ëª¸ì„ ë¬»ê³  죽어 버리ìž. ì‚´ì•„ì„œ 다시 ë³¼ 수 없는 ì •ìž„ì˜ ã€Œì´ë°ì•„ã€ë¥¼ 안고 ì´ ê¹¨ë—í•œ 광야ì—ì„œ 죽어 버리 ìž.' +하고 나는 지는 해를 향하고 한정 ì—†ì´ ê±¸ì—ˆì†Œ. ì‚¬ë§‰ì´ ë°›ì•˜ë˜ ë”°ëœ»í•œ ê¸°ìš´ì€ ì•„ì§ë„ 다 ì‹ì§€ëŠ” 아니하였소. 사막ì—는 바람 í•œ ì ë„ 없소. 소리 í•˜ë‚˜ë„ ì—†ì†Œ. ë°œìžêµ­ ë°‘ì—ì„œ 우는 마른 풀과 ëª¨ëž˜ì˜ ë°”ìŠ¤ë½ê±°ë¦¬ëŠ” 소리가 들릴 ë¿ì´ì˜¤. +나는 허리를 지í‰ì„ ì— 걸었소. ê·¸ 신비한 ê´‘ì„ ì€ ë‚´ 가슴으로부터 위ì—ë§Œì„ ë¹„ì¶”ê³  있소. +ë¬¸ë“ ë‚˜ëŠ” 해를 ë”°ë¼ê°€ëŠ” 별 ë‘ ê°œë¥¼ 보았소. 하나는 ì•žì„ ì„œê³  하나는 뒤를 섰소. ì•žì˜ ë³„ì€ ì¢€ í¬ê³  ë’¤ì˜ ë³„ì€ ì¢€ 작소. ì´ëŸ° ë³„ë“¤ì€ ì‚° ë§Žì€ ë‚˜ë¼ ë‹¤ì‹œ ë§í•˜ë©´ 서쪽 지í‰ì„ ì„ 보기 어려운 나ë¼ì—서만 ìƒìž¥í•œ 나로서는 보지 ëª»í•˜ë˜ ë³„ì´ì˜¤. 나는 ê·¸ ë³„ì˜ ì´ë¦„ì„ ëª¨ë¥´ì˜¤. `ë‘ ë³„'ì´ì˜¤. +í•´ê°€ 지í‰ì„ ì—ì„œ ëš ë–¨ì–´ì§€ìž ëŒ€ê¸°ì˜ ìžì¤ë¹›ì€ 남빛으로 변하였소. ì˜¤ì§ í•´ê°€ 금시 들어간 ìžë¦¬ì—만 주í™ë¹›ì˜ ì—¬ê´‘ì´ ìžˆì„ ë¿ì´ì˜¤. ë‚´ 눈앞ì—서는 남빛 안개가 피어오르는 듯하였소. ì•žì— ë³´ì´ëŠ” í˜¸ìˆ˜ë§Œì´ ìœ ë‚œížˆ 빛나오. ë˜ í•œ ë–¼ì˜ ì´ë¦„ 모를 ìƒˆë“¤ì´ ìˆ˜ë©´ì„ ìŠ¤ì¹˜ë©° ë‚  저문 ê²ƒì„ ë†€ë¼ëŠ” ë“¯ì´ ì–´ì§€ëŸ¬ì´ ë‚ ì•„ 지나가오. ê·¸ë“¤ì€ ì†Œë¦¬ë„ ì•„ë‹ˆ 하오. 날개치는 ì†Œë¦¬ë„ ì•„ë‹ˆ 들리오. ê·¸ê²ƒë“¤ì€ ì‚¬ë§‰ì˜ í™©í˜¼ì˜ í—ˆê¹¨ë¹„ì¸ ê²ƒ 같소. +나는 ìžê¾¸ 걷소. 해를 ë”°ë¥´ë˜ ë‚˜ëŠ” ë‘ ë³„ì„ ë”°ë¼ì„œ ìžê¾¸ 걷소. +ë³„ë“¤ì€ ì§„ 해를 ë”°ë¼ì„œ ë°”ì‚ ê±·ëŠ” ê²ƒë„ ê°™ê³ , 헤매는 나를 ì–´ë–¤ 나ë¼ë¡œ ë„는 ê²ƒë„ ê°™ì†Œ. +아니 ë‘ ë³„ ì¤‘ì— ì•žì„  ë³„ì´ í•œ 번 ë°˜ì§í•˜ê³ ëŠ” 최후로 í•œ 번 ë°˜ì§í•˜ê³ ëŠ” 지í‰ì„  ë°‘ì— ìˆ¨ì–´ 버리고 마오. ë’¤ì— ë‚¨ì€ ì™¸ë³„ì˜ ì™¸ë¡œì›€ì´ì—¬! 나는 울고 싶었소. 그러나 나는 하나만 ë‚¨ì€ ìž‘ì€ ë³„ 외로운 ìž‘ì€ ë³„ì„ ë”°ë¼ì„œ ë” ë¹¨ë¦¬ 걸ìŒì„ 걸었소. ê·¸ í•œ 별마저 넘어가 버리면 나는 어찌하오. +ë‚´ê°€ 웬ì¼ì´ì˜¤. 나는 ì‹œì¸ë„ 아니요, ì˜ˆìˆ ê°€ë„ ì•„ë‹ˆì˜¤. 나는 정으로 í–‰ë™í•œ ì¼ì€ 없다고 믿는 사람ì´ì˜¤. 그러나 형! ì´ ë•Œì— ë¯¸ì¹œ ê²ƒì´ ì•„ë‹ˆìš”, ë‚´ 가슴ì—는 무엇ì¸ì§€ 모를 ê²ƒì„ ë”°ë¥¼ 요샛ë§ë¡œ ì´ë¥¸ë°” ë™ê²½ìœ¼ë¡œ 찼소. +`ì•„ì•„ ì € ìž‘ì€ ë³„!' +ê·¸ê²ƒë„ ì§€í‰ì„ ì— 닿았소. +`ì•„ì•„ ì € ìž‘ì€ ë³„. 저것마저 넘어가면 나는 어찌하나.' +ì¸ì œëŠ” 어둡소. ê´‘ì•¼ì˜ í™©í˜¼ì€ ëª…ìƒ‰ë¿ì´ìš”, 순ì‹ê°„ì´ìš”, í•´ì§€ìž ì‹ ë¹„í•˜ë‹¤ê³  í•  만한 극히 ì§§ì€ ë™ì•ˆì— 아름다운 í™©í˜¼ì„ ì¡°ê¸ˆ ë³´ì´ê³ ëŠ” 곧 ì¹ ê³¼ ê°™ì€ ì•”í‘ì´ì˜¤. í˜¸ìˆ˜ì˜ ë¬¼ë§Œì´ ì–´ë””ì„œ ì€ë¹›ì„ 받았는지 뿌옇게 ë‚˜ë§Œì´ ìœ ì¼í•œ 존재다, ë‚˜ë§Œì´ ìœ ì¼í•œ ë¹›ì´ë‹¤ 하는 ë“¯ì´ ì¸ì œëŠ” 수ì€ë¹›ì´ ì•„ë‹ˆë¼ ë‚¨ë¹›ì„ ë°œí•˜ê³  ìžˆì„ ë¿ì´ì˜¤. +나는 ê·¸ 중 ë¹›ì„ ë§Žì´ ë°›ì€, ê·¸ 중 환해 ë³´ì´ëŠ” í˜¸ìˆ˜ë©´ì„ ì°¾ì•„ ë‘리번거리며, 그러나 빠른 걸ìŒìœ¼ë¡œ 헤매었소. 그러나 ë‚´ê°€ ì¢€ë” ë§‘ì€ í˜¸ìˆ˜ë©´ì„ ì°¾ëŠ” ë™ì•ˆì— ì´ ê´‘ì•¼ì˜ ì–´ë‘ ì€ ë”ìš±ë”ìš± 짙어지오. +나는 ì–´ë–¤ 조그마한 호숫 ê°€ì— íŽ„ì© ì•‰ì•˜ì†Œ. ë‚´ ì•žì—는 ì§™ì€ ë‚¨ë¹›ì˜ ìˆ˜ë©´ì— ì¡°ê·¸ë§ˆí•œ 거울만한 ë°ì€ ë°ê°€ 있소. 마치 ë‚´ 눈ì—ì„œ 무슨 ë¹›ì´ ë‚˜ì™€ì„œ, 아마 ì •ìž„ì„ ê·¸ë¦¬ì›Œí•˜ëŠ” ë¹›ì´ ë‚˜ì™€ì„œ ê·¸ ìˆ˜ë©´ì— ë°˜ì‚¬í•˜ëŠ” 듯ì´. 나는 í—ˆê²ì§€ê² ê·¸ 빤한 ìˆ˜ë©´ì„ ë“¤ì—¬ë‹¤ë³´ì•˜ì†Œ. 혹시나 ì •ìž„ì˜ ëª¨ì–‘ì´ ê±°ê¸° 나타나지나 아니할까 하고. 세ìƒì—는 그러한 기ì ë„ 있지 아니한가 하고. +물ì—는 ì •ìž„ì˜ ì–¼êµ´ì´ ì–´ë¥¸ê±°ë¦¬ëŠ” 것 같았소. ì´ë”°ê¸ˆ ì •ìž„ì˜ ëˆˆë„ ì–´ë¥¸ê±°ë¦¬ê³  ì½”ë„ ë²ˆëœ»ê±°ë¦¬ê³  ìž…ë„ ë²ˆëœ»ê±°ë¦¬ëŠ” 것 같소. 그러나 ìˆ˜ë©´ì€ ì ì  ì–´ë‘워 가서 ê·¸ 환ì˜ì¡°ì°¨ ë”ìš± í¬ë¯¸í•´ì§€ì˜¤. +나는 í˜¸ìˆ˜ë©´ì— ë¹¤í•˜ë˜ í•œ ì¡°ê°ì¡°ì°¨ 캄캄해지는 ê²ƒì„ ë³´ê³  ìˆ¨ì´ ë§‰íž ë“¯í•¨ì„ ê¹¨ë‹¬ìœ¼ë©´ì„œ 고개를 들었소. +고개를 들려고 í•  ë•Œì—, 형ì´ì—¬, ì´ìƒí•œ ì¼ë„ 다 있소. ê·¸ ìˆ˜ë©´ì— ì •ìž„ì˜ ëª¨ì–‘ì´, 얼굴만 아니ë¼, ê·¸ 몸 ì˜¨í†µì´ ê·¸ 어깨, 가슴, 팔, 다리까지ë„, ê·¸ 눈과 입까지ë„, ê·¸ ì–¼êµ´ì˜ í° ê²ƒê³¼ ìž…ìˆ ì´ ë¶ˆê·¸ë ˆí•œ 것까지ë„, 마치 환한 ëŒ€ë‚®ì— ì‹¤ë¬¼ì„ ëŒ€í•œ 모양으로 소ìƒí•˜ê²Œ 나타났소. +"ì •ìž„ì´!" +하고 나는 소리를 지르며 물로 뛰어들려 하였소. 그러나 형, ê·¸ ìˆœê°„ì— ì •ìž„ì˜ ëª¨ì–‘ì€ ì‚¬ë¼ì ¸ 버리고 ë§ì•˜ì†Œ. +나는 ì´ ì–´ë‘  ì†ì— ì–´ë”” ì •ìž„ì´ê°€ 나를 ë”°ë¼ì˜¨ ê²ƒê°™ì´ ìƒê°í–ˆì†Œ. 혹시나 ì •ìž„ì´ê°€ 죽어서 ê·¸ ëª¸ì€ ë™ê²½ì˜ 대학 병ì›ì— ë²—ì–´ ë‚´ì–´ë˜ì§€ê³  í˜¼ì´ ë¹ ì ¸ 나와서 ë¬¼ì— ë¹„ì¹˜ì—ˆë˜ ê²ƒì´ ì•„ë‹ê¹Œ, 나는 ê°€ìŠ´ì´ ìš¸ë ê±°ë¦¼ì„ 진정치 못하면서 호숫 ê°€ì—ì„œ 벌떡 ì¼ì–´ë‚˜ì„œ ì–´ë‘  ì†ì— ì •ìž„ì„ ë§Œì ¸ë³´ë ¤ëŠ” 듯ì´, ì–´ë‘워서 ëˆˆì— ë³´ì§€ëŠ” 못하ë”ë¼ë„ ìžê¾¸ 헤매노ë¼ë©´ ëª¸ì— ë¶€ë”ªížˆê¸°ë¼ë„ í•  것 같아서 함부로 헤매었소. 그리고는 ëˆˆì•žì— ë²ˆëœ»ê±°ë¦¬ëŠ” ì •ìž„ì˜ í™˜ì˜ì„ íŒ”ì„ ë²Œë ¤ì„œ 안고 소리를 ë‚´ì–´ì„œ 불렀소. +"ì •ìž„ì´, ì •ìž„ì´." +하고 나는 ìˆ˜ì—†ì´ ì •ìž„ì„ ë¶€ë¥´ë©´ì„œ 헤매었소. +그러나 형, ì´ê²ƒë„ 죄지요. ì´ê²ƒë„ 하나님께서 금하시는 ì¼ì´ì§€ìš”. 그러길래 ê´‘ì•¼ì— ì•„ì£¼ ì–´ë‘ ì´ ë®ì´ê³  새까만 í•˜ëŠ˜ì— ë³„ì´ ì´ì´í•˜ê²Œ 나고는 ì˜ ì •ìž„ì˜ í—›ê·¸ë¦¼ìžì¡°ì°¨ 아니 ë³´ì´ì§€ìš”. 나는 죄를 피해서 ì •ìž„ì„ ë– ë‚˜ì„œ 멀리 온 것ì´ë‹ˆ ì •ìž„ì˜ í—›ê·¸ë¦¼ìžë¥¼ ë”°ë¼ë‹¤ë‹ˆëŠ” ê²ƒë„ ì˜³ì§€ 않지요. +그렇지만 ë‚´ê°€ ì´ë ‡ê²Œ 혼ìžì„œ ì •ìž„ì„ ìƒê°ë§Œ 하는 것ì´ì•¼ 무슨 죄 ë  ê²ƒì´ ìžˆì„까요. ë‚´ê°€ ì •ìž„ì„ ë§Œ 리나 떠나서 ì´ë ‡ê²Œ 헛그림ìžë‚˜ 그리며 그리워하는 것ì´ì•¼ 무슨 죄가 ë ê¹Œìš”. 설사 죄가 ë˜ê¸°ë¡œì„œë‹ˆ 낸들 ì´ê²ƒê¹Œì§€ì•¼ 어찌하오. ë‚´ê°€ ë‚´ í˜¼ì„ ì£½ì—¬ 버리기 ì „ì—야 ë‚´ 힘으로 어찌하오. 설사 죄가 ë˜ì–´ì„œ ë‚´ê°€ ì§€ì˜¥ì˜ êº¼ì§€ì§€ 않는 유황불 ì†ì—ì„œ ì˜ì›í•œ í˜•ë²Œì„ ë°›ê²Œ ë˜ê¸°ë¡œì„œë‹ˆ ê·¸ê²ƒì„ ì–´ì°Œí•˜ì˜¤. 형, ì´ê²ƒ, ì´ê²ƒë„ ë§ì•„야 옳ì€ê°€ìš”. ì •ìž„ì˜ í—›ê·¸ë¦¼ìžê¹Œì§€ë„ ëŠì–´ 버려야 옳ì€ê°€ìš”. +ì´ ë•Œìš”. 바로 ì´ ë•Œìš”. ë‚´ ì•ž 수십 보나 ë ê¹Œ(캄캄한 ë°¤ì´ë¼ 먼지 가까운지 분명히 ì•Œ 수 없지마는) 하는 ê³³ì— ë‚œë°ì—†ëŠ” 등불 하나가 나서오. 나는 ê¹œì§ ë†€ë¼ì„œ ìš°ëš ì„°ì†Œ. ì´ ë¬´ì¸ì§€ê²½, ì´ ë°¤ì¤‘ì— ê°‘ìžê¸° ë³´ì´ëŠ” 등불 ê·¸ê²ƒì€ ë§ˆì¹˜ ì´ ì„¸ìƒ ê°™ì§€ 아니하였소. +ì € ë“±ë¶ˆì´ ì–´ë–¤ 등불ì¼ê¹Œ, ê·¸ ë“±ë¶ˆì´ ëª‡ ê±¸ìŒ ê°€ê¹Œì´ ì˜¤ë‹ˆ, ê·¸ 등불 ë’¤ì— ì‚¬ëžŒì˜ ë‹¤ë¦¬ê°€ ë³´ì´ì˜¤. +"누구요?" +하는 ê²ƒì€ ê·€ì— ìµì€ ì¡°ì„ ë§ì´ì˜¤. 어떻게 ì´ ëª½ê³ ì˜ ê´‘ì•¼ì—ì„œ ì¡°ì„ ë§ì„ 들ì„까 하고 나는 ë“±ë¶ˆì„ ì²˜ìŒ ë³¼ 때보다 ë”ìš± 놀ëžì†Œ. +"나는 ì§€ë‚˜ê°€ë˜ ì‚¬ëžŒì´ì˜¤." +하고 ë‚˜ë„ ë“±ë¶ˆì„ í–¥í•˜ì—¬ 마주 걸어갔소. +ê·¸ ì‚¬ëžŒì€ ë“±ë¶ˆì„ ë“¤ì–´ì„œ ë‚´ ì–¼êµ´ì„ ë¹„ì¶”ì–´ ë³´ë”니, +"당신 ì¡°ì„  사람ì´ì˜¤?" +하고 묻소. +"네, 나는 ì¡°ì„  사람ì´ì˜¤. ë‹¹ì‹ ë„ ìŒì„±ì„ 들으니 ì¡°ì„  사람ì¸ë°, 어떻게 ì´ëŸ° 광야ì—, ì•„ë‹Œ 밤중ì—, 여기 계시단 ë§ì´ì˜¤." +하고 나는 놀ë¼ëŠ” 표정 그대로 대답하였소. +"나는 ì´ ê·¼ë°©ì— ì‚¬ëŠ” 사람ì´ë‹ˆê¹Œ 여기 오는 ê²ƒë„ ìžˆì„ ì¼ì´ì§€ë§ˆëŠ” 당신ì´ì•¼ë§ë¡œ ì´ ì•„ë‹Œ 밤중ì—." +하고 육혈í¬ë¥¼ 집어넣고, ì†ì„ 내밀어서 내게 악수를 구하오. +나는 반갑게 ê·¸ì˜ ì†ì„ 잡았소. 그러나 나는 `ì£½ì„ ì§€ê²½ì— ì–´ë–»ê²Œ 오셨단 ë§ì´ì˜¤.' 하고, 그가 ë‚´ê°€ 무슨 ì•…ì˜ë¥¼ 가진 í‰í•œì´ ì•„ë‹Œ ì¤„ì„ ì•Œê³  ì†ì— ë¹¼ì–´ë“¤ì—ˆë˜ ìœ¡í˜ˆí¬ë¡œ 시기를 ìž ê¹ì´ë¼ë„ 노린 ê²ƒì„ ë¶ˆì¾Œí•˜ê²Œ ìƒê°í•˜ì˜€ë˜ 것ì´ì˜¤. +ê·¸ë„ ë‚´ ì´ë¦„ë„ ë¬»ì§€ 아니하고 ë˜ ë‚˜ë„ ê·¸ì˜ ì´ë¦„ì„ ë¬»ì§€ 아니하고 나는 ê·¸ì—게 ëŒë ¤ì„œ 그가 ì¸ë„하는 곳으로 갔소. ê·¸ ê³³ì´ëž€ ê²ƒì€ ì•„ê¹Œ ë“±ë¶ˆì´ ì²˜ìŒ ë‚˜íƒ€ë‚˜ë˜ ê³³ì¸ ë“¯í•œë°, 거기서 ë˜ í•œ 번 놀란 ê²ƒì€ ì–´ë–¤ 부ì¸ì´ 있는 것ì´ì˜¤. 남ìžëŠ” ì•„ë¼ì‚¬ì‹ ì–‘ë³µì„ ìž…ì—ˆìœ¼ë‚˜ 부ì¸ì€ 중국 옷 비슷한 ì˜·ì„ ìž…ì—ˆì†Œ. 남ìžëŠ” 나를 ëŒì–´ì„œ ê·¸ 부ì¸ì—게 ì¸ì‚¬í•˜ê²Œ 하고, +"ì´ëŠ” ë‚´ ì•„ë‚´ìš”." +하고 ë˜ ê·¸ ì•„ë‚´ë¼ëŠ” 부ì¸ì—게는, +"ì´ ì´ëŠ” ì¡°ì„  ì–‘ë°˜ì´ì˜¤. ì„±í•¨ì´ ë‰˜ì‹œì£ ?" +하고 그는 나를 ë°”ë¼ë³´ì˜¤. 나는, +"최ì„입니다." +하고 바로 대답하였소. +"ìµœì„ ì”¨?" +하고 ê·¸ 남ìžëŠ” ì†Œê°œí•˜ë˜ ê²ƒë„ ìžŠì–´ë²„ë¦¬ê³  ë‚´ ì–¼êµ´ì„ ë“¤ì—¬ë‹¤ë³´ì˜¤. +"네, 최ì„입니다." +"ì•„ â—â—í•™êµ êµìž¥ìœ¼ë¡œ 계신 ìµœì„ ì”¨." +하고 ê·¸ 남ìžëŠ” ë”ìš± 놀ë¼ì˜¤. +"네, 어떻게 ë‚´ ì´ë¦„ì„ ì•„ì„¸ìš”?" +하고 ë‚˜ë„ ê·¸ê°€ 혹시 아는 사람ì´ë‚˜ 아닌가 하고 등불 ë¹›ì— ì–¼êµ´ì„ ë“¤ì—¬ë‹¤ 보았으나 ë„무지 ê·¸ ì–¼êµ´ì´ ë³¸ ê¸°ì–µì´ ì—†ì†Œ. +"최 ì„ ìƒì„ ë‚´ê°€ 압니다. 남 ì„ ìƒí•œí…Œ ë§ì”€ì„ ë§Žì´ ë“¤ì—ˆì§€ìš”. ê·¸ëŸ°ë° ë‚¨ ì„ ìƒë„ ëŒì•„가신 지가 ë²Œì¨ ëª‡ 핸가." +하고 ê°ê°œë¬´ëŸ‰í•œ ë“¯ì´ ê·¸ 아내를 ëŒì•„보오. +"십오 ë…„ì´ì§€ìš”." +하고 ê³ì— ì„°ë˜ ë¶€ì¸ì´ ë§í•˜ì˜¤. +"ë²Œì¨ ì‹­ì˜¤ ë…„ì¸ê°€." +하고 ê·¸ 남ìžëŠ” 나를 ë³´ê³ , +"ì •ìž„ì´ ìž˜ ìžëžë‹ˆê¹Œ? ë²Œì¨ ì´ì‹­ì´ 넘었지." +하고 ë˜ ë¶€ì¸ì„ ëŒì•„보오. +"스물세 ì‚´ì´ì§€." +하고 부ì¸ì´ 확실치 아니한 ë“¯ì´ ëŒ€ë‹µí•˜ì˜¤. +"네, 스물세 살입니다. 지금 ë™ê²½ì— 있습니다. ë³‘ì´ ë‚˜ì„œ ìž…ì›í•œ ê²ƒì„ ë³´ê³  왔는ë°." +하고 나는 ë²ˆê°œê°™ì´ ì •ìž„ì˜ ë³‘ì‹¤ê³¼ ì •ìž„ì˜ í˜¸í…” 장면 ë“±ì„ ìƒê°í•˜ê³  ê°€ìŠ´ì´ ì„¤ë ˜ì„ ê¹¨ë‹¬ì•˜ì†Œ. ì˜ì™¸ì¸ ê³³ì—ì„œ ì˜ì™¸ì¸ ì‚¬ëžŒë“¤ì„ ë§Œë‚˜ì„œ ì •ìž„ì˜ ë§ì„ 하게 ëœ ê²ƒì„ ê¸°ë»í•˜ì˜€ì†Œ. +"무슨 병입니까. ì •ìž„ì´ê°€ 본래 ëª¸ì´ ì•½í•´ì„œ." +하고 부ì¸ì´ ì§ì ‘ 내게 묻소. +"네. ëª¸ì´ ì¢€ 약합니다. ë³‘ì´ ì¢€ ë‚˜ì€ ê²ƒì„ ë³´ê³  떠났습니다마는 염려가 ë©ë‹ˆë‹¤." +하고 나는 무ì˜ì‹ì¤‘ì— ê³ ê°œë¥¼ ë™ê²½ì´ 있는 방향으로 ëŒë ¸ì†Œ. 마치 고개를 ë™ìœ¼ë¡œ ëŒë¦¬ë©´ ì •ìž„ì´ê°€ ë³´ì´ê¸°ë‚˜ í•  것같ì´. +"ìž, 우리 집으로 갑시다." +하고 나는 ì•„ì§ ê·¸ì˜ ì„±ëª…ë„ ëª¨ë¥´ëŠ” 남ìžëŠ”, ê·¸ì˜ ì•„ë‚´ë¥¼ 재촉하ë”니, +"우리가 ì¡°ì„  ë™í¬ë¥¼ 만난 ê²ƒì´ ì‹­ì—¬ ë…„ 만ì´ì˜¤. ê·¸ëŸ°ë° ìµœ ì„ ìƒ, ì´ê²ƒì„ 좀 보시고 가시지요." +하고 그는 빙그레 웃으면서 나를 서너 ê±¸ìŒ ëŒê³  가오. 거기는 조그마한 무ë¤ì´ 있고 ê·¸ ì•žì—는 ì„ ìž ë†’ì´ë‚˜ ë˜ëŠ” 목패를 ì„¸ì› ëŠ”ë° ê·¸ 목패ì—는 `ë‘ ë³„ 무ë¤'ì´ë¼ëŠ” 넉 ìžë¥¼ ì¼ì†Œ. +ë‚´ê°€ ì´ìƒí•œ 눈으로 ê·¸ 무ë¤ê³¼ 목패를 ë³´ê³  있는 ê²ƒì„ ë³´ê³  그는, +"ì´ê²Œ 무슨 무ë¤ì¸ì§€ 아십니까?" +하고 유쾌하게 묻소. +"ë‘ ë³„ 무ë¤ì´ë¼ë‹ˆ 무슨 뜻ì¸ê°€ìš”?" +하고 ë‚˜ë„ ê·¸ì˜ ìœ ì¾Œí•œ í‘œì •ì— ì „ì—¼ì´ ë˜ì–´ì„œ 웃고 물었소. +"ì´ê²ƒì€ 우리 ë‘˜ì˜ ë¬´ë¤ì´ì™¸ë‹¤." +하고 그는 ì•„ë‚´ì˜ ì–´ê¹¨ë¥¼ 치며 유쾌하게 웃었소. 부ì¸ì€ 부ë„러운 ë“¯ì´ ì›ƒê³  고개를 숙ì´ì˜¤. +ë„무지 ëª¨ë‘ ê¿ˆ 같고 í™˜ì˜ ê°™ì†Œ. +"ìž ê°‘ì‹œë‹¤. ìžì„¸í•œ ë§ì€ 우리 ì§‘ì— ê°€ì„œ 합시다." +하고 서너 ê±¸ìŒ ì–´ë–¤ 방향으로 걸어가니 거기는 ë§ì„ 세 í•„ì´ë‚˜ 맨 마차가 있소. 몽고 ì‚¬ëžŒë“¤ì´ ê°€ì¡±ì„ ì‹£ê³  수초를 ë”°ë¼ ëŒì•„다니는 그러한 마차요. ì‚¿ìžë¦¬ë¡œ í™ì˜ˆí˜•ì˜ ì§€ë¶•ì„ ë§Œë“¤ê³  ê·¸ ì†ì— 들어가 앉게 ë˜ì—ˆì†Œ. ê·¸ì˜ ë¶€ì¸ê³¼ 나와는 ì´ ì§€ë¶• ì†ì— 들어앉고 그는 ì†ìˆ˜ ì–´ìžëŒ€ì— 앉아서 입으로 쮸쮸쮸쮸 하고 ë§ì„ 모오. ë“±ë¶ˆë„ êº¼ 버리고 캄캄한 ì†ìœ¼ë¡œ 달리오. +"ë¶ˆì´ ìžˆìœ¼ë©´ 군대ì—ì„œ ì˜ì‹¬ì„ 하지요. ë„ì ë†ˆì´ 엿보지요. 게다가 ë¶ˆì´ ìžˆìœ¼ë©´ ë„리어 ì•žì´ ì•ˆ ë³´ì¸ë‹¨ ë§ìš”. 쯧쯧쯧쯧!" +하는 소리가 들리오. +대체 ì´ ì‚¬ëžŒì€ ë¬´ìŠ¨ 사람ì¸ê°€. ë˜ ì´ ë¶€ì¸ì€ 무슨 사람ì¸ê°€ 하고 나는 ì–´ë‘ìš´ ì†ì—ì„œ í˜¼ìž ìƒê°í•˜ì˜€ì†Œ. 다만 ìž ì‹œ 본 ì¸ìƒìœ¼ë¡œ ë³´ì•„ì„œ ê·¸ë“¤ì€ í–‰ë³µëœ ë¶€ë¶€ì¸ ê²ƒ 같았소. ê·¸ë“¤ì´ ë¬´ì—‡ 하러 ì´ ì•„ë‹Œ ë°¤ì¤‘ì— ê´‘ì•¼ì— ë‚˜ì™”ë˜ê°€. ë˜ ê·¸ ì´ìƒì•¼ë¦‡í•œ ë‘ ë³„ 무ë¤ì´ëž€ 무엇ì¸ê°€. +나는 불현듯 ì§‘ì„ ìƒê°í•˜ì˜€ì†Œ. ë‚´ 아내와 ì–´ë¦°ê²ƒë“¤ì„ ìƒê°í•˜ì˜€ì†Œ. 가정과 사회ì—ì„œ 쫓겨난 ë‚´ê°€ 아니오. 쫓겨난 ìžì˜ ìƒê°ì€ 언제나 슬픔ë¿ì´ì—ˆì†Œ. +나는 ë‚´ 아내를 ì›ë§ì¹˜ 아니하오. 그는 ê²°ì½” ì•…í•œ ì—¬ìžê°€ 아니오. 다만 보통 ì—¬ìžìš”. 그는 질투 ë•Œë¬¸ì— ì´ì„±ì˜ íž˜ì„ ìžƒì€ ê²ƒì´ì˜¤. ì—¬ìžê°€ 질투 ë•Œë¬¸ì— ì´ì„±ì„ 잃는 ê²ƒì´ ì²œì§ì´ ì•„ë‹ê¹Œìš”. 그가 나를 사랑하길래 나를 위해서 질투를 가지는 ê²ƒì´ ì•„ë‹ˆì˜¤. +설사 질투가 그로 하여금 ì¹¼ì„ ë“¤ì–´ ë‚´ ê°€ìŠ´ì„ ì°Œë¥´ê²Œ 하였다 하ë”ë¼ë„ 나는 ê°ì‚¬í•œ ìƒê°ì„ 가지고 ëˆˆì„ ê°ì„ 것ì´ì˜¤. 사랑하는 ìžëŠ” 질투한다고 하오. 질투를 누르는 ê²ƒë„ ì•„ë¦„ë‹¤ìš´ ì¼ì´ì§€ë§ˆëŠ” ì§ˆíˆ¬ì— íƒ€ëŠ” ê²ƒë„ ì•„ë¦„ë‹¤ìš´ ì¼ì´ ì•„ë‹ê¹Œìš”. +ëœí¬ëŸ­ëœí¬ëŸ­ 하고 차바퀴가 ì² ë¡œê¸¸ì„ ë„˜ì–´ê°€ëŠ” 소리가 나ë”니 ì´ìœ½ê³  마차는 섰소. +ì•žì— ë¹¨ê°›ê²Œ ë¶ˆì´ ë¹„ì¹˜ì˜¤. +"ìž ì´ê²Œ 우리 집ì´ì˜¤." +하고 그가 마차ì—ì„œ 뛰어내리는 ì–‘ì´ ë³´ì´ì˜¤. ë‚´ë ¤ 보니까 ë‹¬ì´ ì˜¬ë¼ì˜¤ì˜¤. 굉장히 í° ë‹¬ì´, ë¶‰ì€ ë‹¬ì´ ì§€í‰ì„ ìœ¼ë¡œì„œ 넘ì„하고 올ë¼ì˜¤ì˜¤. +ë‹¬ë¹›ì— ë¹„ì¶”ì¸ ë°”ë¥¼ ë³´ë©´ 네모나게 ë‹´ ë‹´ì´ë¼ê¸°ë³´ë‹¤ëŠ” ì„±ì„ ë‘˜ëŸ¬ìŒ“ì€ ë‹¬ 뜨는 곳으로 열린 ëŒ€ë¬¸ì„ ë“¤ì–´ì„œì„œ ë„“ì€ ë§ˆë‹¹ì— ë‚´ë¦° ê²ƒì„ ë°œê²¬í•˜ì˜€ì†Œ. +"아버지!" +"엄마!" +하고 ì•„ì´ë“¤ì´ 뛰어나오오. ë§ë§Œí¼ì´ë‚˜ í° ê°œê°€ 네 놈ì´ë‚˜ 꼬리를 치고 나오오. ê·¸ë†ˆë“¤ì´ ì£¼ì¸ì§‘ 마차 소리를 알아듣고 짖지 아니한 모양ì´ì˜¤. +í° ì•„ì´ëŠ” 계집애로 ì—¬ë‚¨ì€ ì‚´, ìž‘ì€ ì•„ì´ëŠ” 사내로 육칠 세, ëª¨ë‘ ì¤‘êµ­ ì˜·ì„ ìž…ì—ˆì†Œ. +우리는 방으로 들어갔소. ë°©ì€ ì•„ë¼ì‚¬ì‹ 절반, ì¤‘êµ­ì‹ ì ˆë°˜ìœ¼ë¡œ ì„¸ê°„ì´ ë†“ì—¬ 있고 ë²½ì—는 ì¡°ì„  지ë„와 ë‹¨êµ°ì˜ ì´ˆìƒì´ 걸려 있소. +그들 부처는 지ë„와 단군 ì´ˆìƒ ì•žì— í—ˆë¦¬ë¥¼ 굽혀 배례하오. ë‚˜ë„ ë¬´ì˜ì‹ì ìœ¼ë¡œ 그대로 하였소. +그는 차를 마시며 ì´ë ‡ê²Œ ë§í•˜ì˜¤. +"우리는 ìžì‹ë“¤ì„ ì´ í¥ì•ˆë ¹ 가까운 무변 광야ì—ì„œ 기르는 것으로 ë‚™ì„ ì‚¼ê³  있지요. ì¡°ì„  ì‚¬ëžŒë“¤ì€ í•˜ë„ ë§ˆìŒì´ ìž‘ì•„ì„œ 걱정ì´ë‹ˆ ì´ëŸ° 호호탕탕한 ë„“ì€ ë²ŒíŒì—ì„œ 길러나면 마ìŒì´ 좀 커질까 하지요. ë˜ í¥ì•ˆë ¹ ë°‘ì—ì„œ 지나 중ì›ì„ 통ì¼í•œ ì œì™•ì´ ë§Žì´ ë‚¬ìœ¼ë‹ˆ 혹시나 ê·¸ 정기가 남아 있ì„까 하지요. 우리 ë¶€ì²˜ì˜ ìžì†ì´ 몇 대를 ë‘ê³  í¼ì§€ëŠ” ë™ì•ˆì—는 행여나 ë§ˆìŒ í° ì¸ë¬¼ì´ 하나 둘 날는지 알겠어요, 하하하하." +하고 그는 ì œ ë§ì„ 제가 비웃는 ë“¯ì´ í•œë°”íƒ• 웃고 나서, +"그러나 ì´ê±´ ë‚´ 진정ì´ì™¸ë‹¤. ìš°ë¦¬ë„ ì´ë ‡ê²Œ ê³ êµ­ì„ ë– ë‚˜ 있지마는 ê·¸ëž˜ë„ ê³ êµ­ 소ì‹ì´ ê¶ê¸ˆí•´ì„œ 신문 하나는 늘 보지요. 하지만 ì–´ë”” ì‹œì›í•œ 소ì‹ì´ 있어요. 그저 조리복소니가 ë˜ì–´ê°€ëŠ” ê²ƒì´ ì•„ë‹ˆë©´ 조그마한 ìƒê°ì„ 가지고, 눈곱만한 ì•¼ì‹¬ì„ ê°€ì§€ê³ , ì„œ 푼어치 안 ë˜ëŠ” ì´ìƒì„ 가지고 찧고 까불고 싸우고 하는 ê²ƒë°–ì— ì•ˆ ë³´ì´ë‹ˆ ì´ê±° ì–´ë”” ì‚´ 수가 있나. 그래서 나는 ë§ˆìŒ í° ìžì†ì„ 낳아서 길러 볼까 하고 ì´ë¥¼í…Œë©´ 새 ë¯¼ì¡±ì„ í•˜ë‚˜ 만들어 볼까 하고, 둘째 단군, 둘째 아브ë¼í•¨ì´ë‚˜ 하나 낳아 볼까 하고 하하하하앗하." +하고 유쾌하게, 그러나 비통하게 웃소. +나는 ì €ë…ì„ êµ¶ì–´ì„œ ë°°ê°€ 고프고, ë°¤ê¸¸ì„ ê±¸ì–´ì„œ ëª¸ì´ ê³¤í•œ ê²ƒë„ ìžŠê³  ê·¸ì˜ ë§ì„ 들었소. +부ì¸ì´ ê¹€ì´ ë¬´ëŸ­ë¬´ëŸ­ 나는 í˜¸ë–¡ì„ í° ëšë°°ê¸°ì— ë‹´ê³  김치를 ìž‘ì€ ëšë°°ê¸°ì— ë‹´ê³ , ë˜ ë¼ì§€ê³ ê¸° ì‚¶ì€ ê²ƒì„ í•œ ì ‘ì‹œ 담아다가 íƒìž ìœ„ì— ë†“ì†Œ. +건넌방ì´ë¼ê³  í•  만한 ë°©ì—ì„œ ì –ë¨¹ì´ ìš°ëŠ” 소리가 들리오. 부ì¸ì€ 삼십ì´ë‚˜ ë˜ì—ˆì„까, ë‚¨íŽ¸ì€ ì„œë¥¸ëŒ“ ë˜ì—ˆì„ 듯한 키가 í›¨ì© í¬ê³  눈과 코가 í¬ê³  ì†ë„ í° ê±´ìž¥í•œ 대장부요, ìŒì„±ì´ 부드러운 ê²ƒì´ ì²´ê²©ì— ì–´ìš¸ë¦¬ì§€ 아니하나 ê·¸ê²ƒì´ ì•„ë§ˆ ê·¸ì˜ ì •ì‹  ìƒí™œì´ ë†’ì€ í‘œê² ì§€ìš”. +"신문ì—ì„œ 최 ì„ ìƒì´ í•™êµë¥¼ 고만ë‘시게 ë˜ì—ˆë‹¤ëŠ” ë§ë„ 보았지요. 그러나 나는 ê·¸ê²ƒì´ ë‹¤ 최 ì„ ìƒì—게 대한 중ìƒì¸ ì¤„ì„ ì§ìž‘하였고, ë˜ ì˜¤ëŠ˜ ì´ë ‡ê²Œ 만나 보니까 ë”구나 ê·¸ê²ƒì´ ë‹¤ 중ìƒì¸ ì¤„ì„ ì•Œì§€ìš”." +하고 그는 확신 있는 ì–´ì¡°ë¡œ ë§í•˜ì˜¤. +"고맙습니다." +나는 ì´ë ‡ê²Œë°–ì— ëŒ€ë‹µí•  ë§ì´ 없었소. +"ì•„, 머, 고맙다고 하실 ê²ƒë„ ì—†ì§€ìš”." +하고 그는 머리를 뒤로 젖히고 한참ì´ë‚˜ ìƒê°ì„ 하ë”니 ìš°ì„  껄껄 한바탕 웃고 나서, +"ë‚´ê°€ 최 ì„ ìƒì´ 당하신 경우와 ê¼­ ê°™ì€ ê²½ìš°ë¥¼ 당하였거든요. ì´ë¥¼í…Œë©´ 과부 ì„¤ì›€ì€ ë™ë¬´ 과부가 안다는 것ì´ì§€ìš”." +하고 그는 ìžê¸°ì˜ ë‚´ë ¥ì„ ë§í•˜ê¸° 시작하오. +"ë‚´ ì§‘ì€ ë³¸ëž˜ 서울입니다. ë‚´ê°€ ì–´ë ¸ì„ ì ì— ë‚´ 선친께서 ì‹œêµ­ì— ëŒ€í•´ì„œ 불í‰ì„ 품고 당신 삼 í˜•ì œì˜ ê°€ì¡±ì„ ëŒê³  ìž¬ì‚°ì„ ëª¨ë‘ íŒ”ì•„ 가지고 ê°„ë„ì—를 건너오셨지요. ê°„ë„ì— ë§¨ 먼저 â—â—í•™êµë¥¼ 세운 ì´ê°€ ë‚´ 선친ì´ì§€ìš”." +여기까지 하는 ë§ì„ 듣고 나는 그가 누구ì¸ì§€ë¥¼ 알았소. 그는 R씨ë¼ê³  ê°„ë„ ê°œì²™ìžìš”, ê°„ë„ì— ì¡°ì„ ì¸ ë¬¸í™”ë¥¼ 세운 ì´ë¡œ 유명한 ì´ì˜ ì•„ë“¤ì¸ ê²ƒì´ ë¶„ëª…í•˜ì˜¤. 나는 ê·¸ì˜ ì´ë¦„ì´ ëˆ„êµ¬ì¸ì§€ë„ 물어 ë³¼ 것 ì—†ì´ ì•Œì•˜ì†Œ. +"ì•„ 그러십니까. 네, 그러세요." +하고 나는 ê°íƒ„하였소. +"네, ë‚´ ì„ ì¹œì„ í˜¹ 아실는지요. ì„ ì¹œì˜ ë§ì”€ì´ ë…¸ 그러신단 ë§ì”€ì•¼ìš”. ì¡°ì„  ì‚¬ëžŒì€ ì†ì´ ì¢ì•„ì„œ 못쓴다고 <ì •ê°ë¡>ì—ë„ ê·¸ëŸ° ë§ì´ 있다고 ì¡°ì„ ì€ ì‚°ì´ ë§Žê³  ë“¤ì´ ì¢ì•„ì„œ ì‚¬ëžŒì˜ ë§ˆìŒì´ ìž‘ì•„ì„œ í°ì¼í•˜ê¸°ê°€ 어렵고, í°ì‚¬ëžŒì´ 나기가 어렵다고. 웬만치 í°ì‚¬ëžŒì´ 나면 서로 시기해서 í°ì¼í•  새가 ì—†ì´ í•œë‹¤ê³  그렇게 <ì •ê°ë¡>ì—ë„ ìžˆë‹¤ë”êµ°ìš”. 그래서 선친께서 ìžì†ì—게나 í¬ë§ì„ 붙ì´ê³  ê°„ë„ë¡œ 오신 모양ì´ì§€ìš”. 거기서 ìžë¼ë‚¬ë‹¤ëŠ” ê²ƒì´ ë‚´ 꼴입니다마는, 아하하. +ë‚´ê°€ ìžë¼ì„œ 아버지께서 세우신 K여학êµì˜ êµì‚¬ë¡œ ìžˆì„ ë•Œ ì¼ìž…니다. 지금 ë‚´ 아내는 ê·¸ ë•Œ í•™ìƒìœ¼ë¡œ 있었구. ê·¸ëŸ¬ìž ë‚´ 아버지께서 ìž¬ì‚°ì´ ë‹¤ 없어져서 í•™êµë¥¼ ë…담하실 수가 없고, ë˜ ì–¼ë§ˆ 아니해서 아버지께서 ëŒì•„가시고 보니 í•™êµì—는 세력 ë‹¤íˆ¼ì´ ìƒê²¨ì„œ ì•„ë²„ì§€ì˜ í›„ê³„ìžë¡œ 추정ë˜ëŠ” 나를 배척하게 ë˜ì—ˆë‹¨ ë§ì”€ì´ì˜¤. 거기서 나를 배척하는 ìžë£Œë¥¼ ì‚¼ì€ ê²ƒì´ ë‚˜ì™€ 지금 ë‚´ ì•„ë‚´ê°€ ëœ í•™ìƒì˜ 관계란 것ì¸ë° ì´ê²ƒì€ ì „ì—° ë¬´ê·¼ì§€ì„¤ì¸ ê²ƒì€ ë§í•  ê²ƒë„ ì—†ì†Œ. ë‚˜ë„ ì´ê°ì´ìš”, 그는 처녀니까 혼ì¸ì„ 하ìžë©´ 못 í•  ê²ƒë„ ì—†ì§€ë§ˆëŠ” ê·¸ê²ƒì´ ì‚¬ì œ 관계ë¼ë©´ 중대 문제거든. 그래서 나는 단연히 사ì§ì„ 하고 ë‚´ê°€ 사ì§í•œ ê²ƒì€ ì œ 죄를 승ì¸í•œ 것ì´ë¼ 하여서 ê·¸ í•™ìƒ ì§€ê¸ˆ ë‚´ ì•„ë‚´ë„ ì¶œêµ ì²˜ë¶„ì„ ë‹¹í•œ 것ì´ì˜¤. 그러고 보니, ê·¸ ì—¬ìžì˜ 아버지 ë‚´ 장ì¸ì´ì§€ìš” ê·¸ ì—¬ìžì˜ 아버지는 나를 ì£½ì¼ ë†ˆê°™ì´ ì›ë§ì„ 하고 ê·¸ ë”¸ì„ ì£½ì¼ ë…„ì´ë¼ê³  ê°ê¸ˆì„ 하고 어쨌으나 조그마한 ê°„ë„ ì‚¬íšŒì—ì„œ í° íŒŒë¬¸ì„ ì¼ìœ¼ì¼°ë‹¨ ë§ì´ì˜¤. +ì´ ë¬¸ì œë¥¼ ë” í¬ê²Œ 만든 ê²ƒì€ ì§€ê¸ˆ ë‚´ ì•„ë‚´ì¸, ê·¸ ë”¸ì˜ ìžë°±ì´ì˜¤. 무어ë¼ê³  했는고 하니, 나는 ê·¸ ì‚¬ëžŒì„ ì‚¬ëž‘í•˜ì˜¤, ê·¸ 사람한테가 아니면 ì‹œì§‘ì„ ì•ˆ 가오, 하고 뻗댔단 ë§ìš”. +나는 ì´ ì—¬ìžê°€ ì´ë ‡ê²Œ 나를 ìƒê°í•˜ëŠ”ê°€ í•  ë•Œ ì˜ë¶„ì‹¬ì´ ë‚˜ì„œ 나는 어떻게 해서든지 ì´ ì—¬ìžì™€ 혼ì¸í•˜ë¦¬ë¼ê³  ê²°ì‹¬ì„ í•˜ì˜€ì†Œ. 나는 마침내 ì •ì‹ìœ¼ë¡œ K장로ë¼ëŠ” ë‚´ 장ì¸ì—게 ì²­í˜¼ì„ í•˜ì˜€ìœ¼ë‚˜ ë‹¨ë°•ì— ê±°ì ˆì„ ë‹¹í•˜ê³  ë§ì•˜ì§€ìš”. K장로는 ê·¸ ë”¸ì„ ê°„ë„ì— ë‘는 ê²ƒì´ ì˜³ì§€ 않다고 í•´ì„œ 서울로 보내기로 하였단 ë§ì„ 들었소. 그래서 나는 ìµœí›„ì˜ ê²°ì‹¬ìœ¼ë¡œ ê·¸ ì—¬ìž ì§€ê¸ˆ ë‚´ ì•„ë‚´ ëœ ì‚¬ëžŒì„ ë°ë¦¬ê³  ê°„ë„ì—ì„œ ë„ë§í•˜ì˜€ì†Œ. 하하하하. ë°¤ì¤‘ì— ë‹¨ë‘˜ì´ì„œ. +지금 같으면야 ì‚¬ì œê°„ì— ê²°í˜¼ì„ í•˜ê¸°ë¡œ 그리 í° ë¬¸ì œê°€ ë  ê²ƒì´ ì—†ì§€ë§ˆëŠ” ê·¸ ë•Œì— ì–´ë”” 그랬나요. ì‚¬ì œê°„ì— í˜¼ì¸ì´ëž€ ê²ƒì€ ë¶€ë…€ê°„ì— í˜¼ì¸í•œë‹¤ëŠ” 것과 ê°™ì´ ìƒê°í•˜ì˜€ì§€ìš”. ë”구나 ê·¸ ë•Œ ê°„ë„ ì‚¬íšŒì—는 ì²­êµë„ì  ì‚¬ìƒê³¼ 열렬한 ì• êµ­ì‹¬ì´ ìžˆì–´ì„œ ë„ë• í‘œì¤€ì´ ì—¬ê°„ 높지 아니하였지요. 그런 시대니까 ë‚´ê°€ ë‚´ ì œìžì¸ 여학ìƒì„ ë°ë¦¬ê³  달아난다는 ê²ƒì€ ì‚´ì¸ ê°•ë„를 하는 ì´ìƒìœ¼ë¡œ 무서운 ì¼ì´ì—ˆì§€ìš”. ì§€ê¸ˆë„ ë‚˜ëŠ” 그렇게 ìƒê°í•©ë‹ˆë‹¤ë§ˆëŠ”. +그래서 우리 ë‘ ì‚¬ëžŒì€ ìš°ë¦¬ ë‘ ì‚¬ëžŒì´ë¼ëŠ” ê²ƒë³´ë‹¤ë„ ë‚´ ìƒê°ì—는 어찌하였으나 나를 위해서 ì œ ëª©ìˆ¨ì„ ë²„ë¦¬ë ¤ëŠ” ê·¸ì—게 사실 ë‚˜ë„ ë§ˆìŒ ì†ìœ¼ë¡œëŠ” 그를 사랑하였지요. 다만 사제간ì´ë‹ˆê¹Œ ì˜ì›ížˆ 달할 수는 없는 사랑ì´ë¼ê³  단ë…í•˜ì˜€ì„ ë¿ì´ì§€ìš”. 그러니까 ë¹„ë¡ ë¶€ì²˜ ìƒí™œì€ 못 하ë”ë¼ë„ ë‚´ê°€ ê·¸ì˜ ì‚¬ëž‘ì„ ì•ˆë‹¤ëŠ” 것과 ë‚˜ë„ ê·¸ë¥¼ ì´ë§Œí¼ 사랑한다는 ê²ƒë§Œì„ ë³´ì—¬ 주ìžëŠ” 것ì´ì§€ìš”. +때는 마침 ê°€ì„ì´ì§€ë§ˆëŠ”, ëª¸ì— ì§€ë‹Œ ëˆë„ 얼마 없고 천신만고로 길림까지를 나와 가지고는 배를 타고 ì†¡í™”ê°•ì„ ë‚´ë ¤ì„œ í•˜ì–¼ë¹ˆì— ê°€ 가지고 ê±° 기서 간신히 ì¹˜íƒ€ê¹Œì§€ì˜ ì—¬ë¹„ì™€ ì—¬í–‰ê¶Œì„ ì–»ì–´ 가지고 차를 타고 떠나지 않았어요. ê·¸ê²ƒì´ ë°”ë¡œ ì‹­ì—¬ ë…„ ì „ 오늘ì´ëž€ ë§ì´ì˜¤." +ì´ ë•Œì— ë¶€ì¸ì´ 옥수수로 만든 국수와 ê°ìž ì‚¶ì€ ê²ƒì„ ê°€ì§€ê³  들어오오. +나는 Rì˜ ë§ì„ ë“£ë˜ ëì´ë¼ 유심히 부ì¸ì„ ë°”ë¼ë³´ì•˜ì†Œ. 그는 중키나 ë˜ëŠ” 둥근 ì–¼êµ´ì´ í˜ˆìƒ‰ì´ ì¢‹ê³  통통하여 미ì¸ì´ë¼ê¸°ë³´ë‹¤ëŠ” 씩씩한 ì—¬ìžìš”. 그런 ì¤‘ì— ì¡°ì„  ì—¬ìžë§Œì´ 가지는 아담하고 ì ìž–ì€ ë§›ì´ ìžˆì†Œ. +"앉으시지요. 지금 ë‘ ë¶„ê»˜ì„œ ì²˜ìŒ ì‚¬ëž‘í•˜ì‹œë˜ ë§ì”€ì„ 듣고 있습니다." +하고 나는 부ì¸ì—게 êµì˜ë¥¼ 권하였소. +"ì•„ì´, 그런 ë§ì”€ì€ 왜 하시오." +하고 부ì¸ì€ ê°‘ìžê¸° ì‹­ ë…„ì´ë‚˜ 어려지는 모양으로 수삽한 ë¹›ì„ ë³´ì´ê³  고개를 숙ì´ê³  달아나오. +"그래서요. 그래 ì˜¤ëŠ˜ì´ ê¸°ë…ì¼ì´ì™¸ë‹¤ê·¸ë ¤." +하고 ë‚˜ë„ ì›ƒì—ˆì†Œ. +"그렇지요. 우리는 해마다 ì˜¤ëŠ˜ì´ ì˜¤ë©´ 우리 무ë¤ì— 성묘를 가서 í•˜ë£»ë°¤ì„ ìƒˆìš°ì§€ìš”. ì˜¤ëŠ˜ì€ ì†ë‹˜ì´ 오셔서 ì¤‘ê°„ì— ëŒì•„왔지만, 하하하하." +하고 그는 유쾌하게 웃소. +"성묘ë¼ë‹ˆ?" +하고 나는 물었소. +"아까 ë³´ì‹  ë‘ ë³„ ë¬´ë¤ ë§ì´ì˜¤. ê·¸ê²ƒì´ ìš°ë¦¬ ë‚´ì™¸ì˜ ë¬´ë¤ì´ì§€ìš”. 하하하하." +"…………." +나는 ì˜ë¬¸ì„ 모르고 가만히 앉았소. +"ë‚´ ì´ì•¼ê¸°ë¥¼ 들으시지요. 그래 둘ì´ì„œ 차를 타고 오지 않았겠어요. 물론 여전히 ì„ ìƒë‹˜ê³¼ ì œìžì§€ìš”. 그렇지만 워낙 여러 ë‚  단둘ì´ì„œ ê°™ì´ ê³ ìƒì„ 하고 ì—¬í–‰ì„ í–ˆìœ¼ë‹ˆ ì‚¬ëž‘ì˜ ë¶ˆê¸¸ì´ íƒˆ 것ì´ì•¼ 물론 아니겠어요. 다만 사제ë¼ëŠ” êµ³ì€ ì˜ë¦¬ê°€ ê·¸ê²ƒì„ ê²‰ì— ë‚˜ì˜¤ì§€ 못하ë„ë¡ ëˆ„ë¥¸ 것ì´ì§€ìš”. â€¦â€¦ê·¸ëŸ°ë° ê¼­ ì˜¤ëŠ˜ê°™ì´ ì¢‹ì€ ë‚ ì¸ë° 여기는 대개 ì¼ê¸°ê°€ ì¼ì •í•©ë‹ˆë‹¤. 좀체로 비가 오는 ì¼ë„ 없고 í리는 ë‚ ë„ ì—†ì§€ìš”. í—Œë° Fì—­ì—를 오니까 ì°¸ ì„ì–‘ 경치가 좋단 ë§ì´ì˜¤. ê·¸ ë•Œì— ë¶ˆí˜„ë“¯, ì—ë¼ ì—¬ê¸°ì„œ 내려서 ì´ ì„ì–‘ ì†ì— ì € 호숫 ê°€ì— ë‘˜ì´ì„œ 헤매다가 깨ë—ì´ ì‚¬ì œì˜ ëª¸ìœ¼ë¡œ ì´ ê¹¨ë—í•œ ê´‘ì•¼ì— ë¬»í˜€ ë²„ë¦¬ìž í•˜ëŠ” ìƒê°ì´ 나겠지요. 그래 ê·¸ ë•Œ ë§ì„ ë‚´ ì•„ë‚´ ê·¸ ë•Œì—는 ì•„ì§ ì•„ë‚´ê°€ 아니지요 ë‚´ ì•„ë‚´ì—게 그런 ë§ì„ 하였ë”니 ì°¸ 좋다고 ë°•ìž¥ì„ í•˜ê³  ë‚´ ì–´ê¹¨ì— ë§¤ë‹¬ë¦¬ëŠ”êµ¬ë ¤. 그래서 우리 ë‘˜ì€ ì°¨ê°€ ê±°ì˜ ë– ë‚  ìž„ë°•í•´ì„œ ì°¨ì—ì„œ 뛰어내렸지요." +하고 그는 그때 ê´‘ê²½ì„ ëˆˆì•žì— ê·¸ë¦¬ëŠ” 모양으로 ë§ì„ ëŠê³  ìš°ë‘커니 í—ˆê³µì„ ë°”ë¼ë³´ì˜¤. 그러나 ê·¸ì˜ ìž… 언저리ì—는 유쾌한 회고ì—ì„œ 나오는 웃ìŒì´ì—ˆì†Œ. +"ì´ì•¼ê¸° 다 ë났어요?" +하고 부ì¸ì´ í¬ë°”스ë¼ëŠ” 청량 ìŒë£Œë¥¼ 들고 들어오오. +"아니오. ì´ì œë¶€í„°ê°€ 정통ì´ë‹ˆ ë‹¹ì‹ ë„ ê±°ê¸° 앉으시오. 지금 ì°¨ì—ì„œ 내린 ë°ê¹Œì§€ ì™”ëŠ”ë° ë‹¹ì‹ ë„ ì•‰ì•„ì„œ í•œ 파트를 맡으시오." +하고 R는 부ì¸ì˜ ì†ì„ ìž¡ì•„ì„œ ìžë¦¬ì— 앉히오. 부ì¸ë„ 웃으면서 앉소. +"최 ì„ ìƒ ì²˜ì§€ê°€ ê¼­ 나와 같단 ë§ìš”. ì •ìž„ì˜ ì²˜ì§€ê°€ 당신과 같고." +하고 그는 ë§ì„ 계ì†í•˜ì˜¤. +"그래 ì°¨ì—ì„œ 내려서 나는 ì´ ì–‘ë°˜í•˜ê³  ë¬¼ì„ ì°¾ì•„ 헤매었지요. ì•„ë”°, ì„ì–‘ì´ ì–´ë–»ê²Œ 좋ì€ì§€ ì´ ì–‘ë°˜ì€ ë°•ìž¥ì„ í•˜ê³  노래를 부르고 우리 ë‘˜ì€ ë§ˆì¹˜ 유쾌하게 산보하는 사람 같았지요." +"ì°¸ 좋았어요. ê·¸ ë•Œì—는 ì°¸ 좋았어요. ê·¸ ì„ì–‘ì— ë¹„ì¹œ 광야와 호수ë¼ëŠ” ê±´ 어떻게 좋ì€ì§€ ê·¸ ìˆ˜ì€ ê°™ì€ ë¬¼ ì†ì— 텀벙 뛰어들고 싶었어요. ê·¸ 후엔 해마다 ë³´ì•„ë„ ê·¸ë§Œ 못해." +하고 부ì¸ì´ ì°¸ê²¬ì„ í•˜ì˜¤. +ì•„ì´ë“¤ì€ 다 ìžëŠ” 모양ì´ì˜¤. +"그래 ì§€í–¥ì—†ì´ í—¤ë§¤ëŠ”ë° í•´ëŠ” 뉘엿뉘엿 넘어가구, ì–´ìŠ¤ë¦„ì€ ê¸°ì–´ë“¤ê³  ê·¸ ë•Œ 마침 하늘ì—는 별 ë‘˜ì´ ë‚˜íƒ€ë‚¬ë‹¨ ë§ì´ì•¼. ê·¸ê²ƒì„ ì´ ì—¬í•™ìƒì´ 먼저 ë³´ê³ ì„œ ê°‘ìžê¸° 추연해지면서 ì„ ìƒë‹˜ ì € 별 보셔요, ì•žì„  í° ë³„ì€ ì„ ìƒë‹˜ì´ 구 ë”°ë¼ê°€ëŠ” ìž‘ì€ ë³„ì€ ì €ì•¼ìš”, 하겠지요. ê·¸ ë§ì´, ë˜ ê·¸ 태ë„ê°€ 어떻게 가련한지. 그래서 나는 í•˜ëŠ˜ì„ ë°”ë¼ë³´ë‹ˆê¹ 과연 별 ë‘ ê°œê°€ 지는 해를 따르는 ë“¯ì´ ë”°ë¼ê°„다 ë§ìš”. ë§ì„ 듣고 보니 과연 우리 ì‹ ì„¸ì™€ë„ ê°™ì§€ ì•Šì•„ìš”? +그리고는 ì´ ì‚¬ëžŒì´ ë˜ ì´ëŸ½ë‹ˆë‹¤ê·¸ë ¤ `ì„ ìƒë‹˜, ì•žì„  í° ë³„ì€ ì•„ë¬´ë¦¬ ë”°ë¼ë„ ì € ìž‘ì€ ë³„ì€ ì˜ì›ížˆ ë”°ë¼ìž¡ì§€ 못하겠지요. ì˜ì›ížˆ ì˜ì›ížˆ ë”°ë¼ê°€ë‹¤ê°€ ë”°ë¼ê°€ë‹¤ê°€ 못 í•´ì„œ 마침내는 ì € ìž‘ì€ ë³„ì€ ì£½ì–´ì„œ ê²€ì€ ìž¬ê°€ ë˜ê³  ë§ê² ì§€ìš”? ì € ìž‘ì€ ë³„ì´ ì œ 신세와 어쩌면 그리 ê°™ì„까.' 하고 í•œíƒ„ì„ í•˜ê² ì§€ìš”. ê·¸ ë•Œì— í•œíƒ„ì„ í•˜ê³  ëˆˆë¬¼ì„ í˜ë¦¬ê³  섰는 어린 ì²˜ë…€ì˜ ì„ì–‘ë¹›ì— ë¹„ì·¬ ëª¨ì–‘ì„ ìƒìƒí•´ 보세요, 하하하하. ê·¸ ë•Œì—는 ë‹¹ì‹ ë„ ë¯¸ì¸ì´ì—ˆì†Œ. 하하하하." +하고 내외가 유쾌하게 웃는 ê²ƒì„ ë³´ë‹ˆ 나는 ë”ìš± ì ë§‰í•˜ì—¬ì§ì„ 깨달았소. 어쩌면 ê·¸ ì„ì–‘, ê·¸ ë‘ ë³„ì´ ì´ë“¤ì—게와 내게 ê¼­ ê°™ì€ ì¸ìƒì„ 주었ì„까 하니 참으로 ì´ìƒí•˜ë‹¤ 하였소. +"그래 ì¸ì œ." +하고 R는 다시 ì´ì•¼ê¸°ë¥¼ 계ì†í•˜ì˜¤. +"그래 ì¸ì œ 둘ì´ì„œ 그야ë§ë¡œ ê°ê°œë¬´ëŸ‰í•˜ê²Œ ë‘ ë³„ì„ ë°”ë¼ë³´ë©° 걸었지요. 그러다가 í•´ê°€ 넘어가고 ì•žì„  í° ë³„ì´ ë„˜ì–´ê°€ê³  그리고는 혼ìžì„œ 깜빡깜빡하고 ê°€ë˜ ìž‘ì€ ë³„ì´ ë„˜ì–´ê°€ë‹ˆ 우리는 그만 ë•…ì— ì£¼ì €ì•‰ì•˜ì†Œ. 거기가 어딘고 하니 ê·¸ ë‘ ë³„ 무ë¤ì´ 있는 ê³³ì´ì§€ìš”. `ì„ ìƒë‹˜ 저를 여기다가 파묻어 주시고 가셔요. ì„ ìƒë‹˜ ì†ìˆ˜ 저를 여기다가 묻어 놓고 ê°€ 주셔요.' 하고 ì´ ì‚¬ëžŒì´ ì¡°ë¥´ì§€ìš”." +하는 ê²ƒì„ ë¶€ì¸ì€, +"ë‚´ê°€ 언제." +하고 ë‚¨íŽ¸ì„ í˜ê²¨ë³´ì˜¤. +"그럼 무ì—ë¼ê³  했소? ì–´ë”” 본ì¸ì´ í•œ 번 옮겨 보오." +하고 Rê°€ ë§ì„ ëŠì†Œ. +"ê°„ë„를 ë– ë‚œ 지가 í•œ ë‹¬ì´ ë˜ë„ë¡ ë‹¨ë‘˜ì´ ë‹¤ë…€ë„ ìš”ë§Œí¼ë„ 귀해 주는 ì ì´ 안 뵈니 그럼 파묻어 달ë¼ê³  안 í•´ìš”?" +하고 부ì¸ì€ 웃소. +"í¥í¥." +하고 R는 부ì¸ì˜ ë§ì— 웃고 나서, +"ê·¸ ìžë¦¬ì— 묻어 달란 ë§ì„ 들으니까, 어떻게 측ì€í•œì§€, 그럼 ë‚˜ë„ í•¨ê»˜ 묻히ìžê³  그랬지요. 나는 ê·¸ ë•Œì— ì°¸ë§ ê·¸ ìžë¦¬ì— 함께 묻히고 싶었어요. 그래서 나는 ì†ìœ¼ë¡œ 곧 구ë©ì´ë¥¼ 팠지요. 떡가루 ê°™ì€ ëª¨ëž˜íŒì´ë‹ˆê¹Œ 파기는 íž˜ì´ ì•„ë‹ˆ 들겠지요. ì´ì´ë„ 물ë„러미 ë‚´ê°€ ë•…ì„ íŒŒëŠ” ê²ƒì„ ë³´ê³  ì„°ë”니만 ìžê¸°ë„ 파기를 시작하겠지요." +하고 내외가 다 웃소. +"그래 순ì‹ê°„ì—……." +하고 R는 ì´ì•¼ê¸°ë¥¼ 계ì†í•˜ì˜¤. +"순ì‹ê°„ì— ë‘˜ì´ ë“œëŸ¬ëˆ„ìš¸ 만한 구ë©ì´ë¥¼ 아마 ë‘ ìž ê¹Šì´ë‚˜ ë˜ê²Œ, 네모나게 파 놓고는 ë‚´ê°€ 들어가 누워 ë³´ê³  그러고는 ë˜ íŒŒê³  하여 아주 편안한 구ë©ì´ë¥¼ 파고 나서는 나는 아주 세ìƒì„ 하ì§í•  셈으로 ì‚¬ë°©ì„ ë‘˜ëŸ¬ë³´ ê³  사방ì´ëž˜ì•¼ ì»´ì»´í•œ ì–´ë‘ ë°–ì— ì—†ì§€ë§Œ ì‚¬ë°©ì„ ë‘˜ëŸ¬ë³´ê³ , ì´ë¥¼í…Œë©´ 세ìƒê³¼ ìž‘ë³„ì„ í•˜ê³  드러누웠지요. 지금 ì´ë ‡ê²Œ íšŒê³ ë‹´ì„ í•  ë•Œì—는 ìš°ìŠµê¸°ë„ í•˜ì§€ë§ˆëŠ” ê·¸ ë•Œì—는 참으로 종êµì ì´ë¼ í•  만한 엄숙ì´ì—ˆì†Œ. 그때 우리 ë‘˜ì˜ ì²˜ì§€ëŠ” ì•žë„ ì ˆë²½, ë’¤ë„ ì ˆë²½ì´ì–´ì„œ 죽는 ê¸¸ë°–ì— ì—†ì—ˆì§€ìš”. ë˜ ê·¸ë¿ ì•„ë‹ˆë¼ ì¸ìƒì˜ 가장 깨ë—하고 가장 ì‚¬ëž‘ì˜ ë§‘ì€ ì •ì´ íƒ€ê³  가장 기ì˜ê³ ë„ ìŠ¬í”„ê³ ë„ ì´ë¥¼í…Œë©´ 모든 ê°ì •ì´ ì ˆì •ì— ë‹¬í•˜ê³ , 그러한 ìˆœê°„ì— ëª©ìˆ¨ì„ ëŠì–´ 버리는 ê²ƒì´ ê°€ìž¥ ì¢‹ì€ ì¼ì´ìš”, 가장 마땅한 ì¼ê°™ì´ ìƒê°í•˜ì˜€ì§€ìš”. ê´‘ì•¼ì— ì•„ë¦„ë‹¤ìš´ í™©í˜¼ì´ ìˆœê°„ì— ìŠ¤ëŸ¬ì§€ëŠ” 모양으로 우리 ë‘ ìƒëª…ì˜ ì•„ë¦„ë‹¤ì›€ë„ ìˆœê°„ì— ìŠ¤ëŸ¬ì§€ìžëŠ” 우리는 ì² í•™ìžë„ ì‹œì¸ë„ 아니지마는 ìš°ë¦¬ë“¤ì˜ í™˜ê²½ì´ ìš°ë¦¬ 둘ì—게 그러한 ìƒê°ì„ 넣어 준 것ì´ì§€ìš”. +그래서 ë‚´ê°€ 가만히 드러누워 있는 ê²ƒì„ ì €ì´ê°€ 물ë„러미 ë³´ê³  있ë”니 ìžê¸°ë„ ë‚´ ê³ì— 들어와 눕겠지요. 그런 ë’¤ì—는 í™©í˜¼ì— ë‚¨ì€ ë¹›ë„ ë‹¤ 스러지고 아주 캄캄한 ì•”í‘ ì„¸ê³„ê°€ ë˜ì–´ 버렸지요. í•˜ëŠ˜ì— ì–´ë–»ê²Œ 그렇게 ë³„ì´ ë§Žì€ì§€. 가만히 í•˜ëŠ˜ì„ ë°”ë¼ë³´ë…¸ë¼ë©´ ì°¸ ë³„ì´ ë§Žì•„ìš”. 우주란 ì°¸ 커요. ê·¸ëŸ°ë° ì´ ëì—†ì´ í° ìš°ì£¼ì— í•œì—†ì´ ë§Žì€ ë³„ë“¤ì´ ë‹¤ ì œìžë¦¬ë¥¼ 지키고 ì œ ê¸¸ì„ ì§€ì¼œì„œ 서로 ë¶€ë”ªì§€ë„ ì•„ë‹ˆí•˜ê³  ëì—†ì´ ê¸´ ì‹œê°„ì— ì§ˆì„œë¥¼ 유지하고 있는 ê²ƒì„ ë³´ë©´ 우주ì—는 ì–´ë–¤ 주재하는 뜻, 섭리하는 ëœ»ì´ ìžˆë‹¤ 하는 ìƒê°ì´ 나겠지요. ë‚˜ë„ ì˜ˆìˆ˜êµì¸ì˜ 가정ì—ì„œ ìžë¼ë‚¬ì§€ë§ˆëŠ” ì´ ë•Œì²˜ëŸ¼ 하나님ì´ë¼ 할까 ì´ë¦„ì€ ë¬´ì—‡ì´ë¼ê³  하든지 ê°„ì— ìš°ì£¼ì˜ ì„­ë¦¬ìžì˜ 존재를 강렬하게 ì˜ì‹í•œ ì¼ì€ 없었지요. +그렇지만 `ì‚¬ëžŒì˜ ë§ˆìŒì— 비기면 저까짓 ë³„ë“¤ì´ ë‹¤ 무엇ì´ì˜¤?' 하고 그때 겨우 ì—´ì—¬ëŸ ì‚´ë°–ì— ì•ˆ ëœ ì´ì´ê°€ ë‚´ ê·€ì— ìž…ì„ ëŒ€ê³  ë§í•  ë•Œì—는 ë‚˜ë„ ì°¸ìœ¼ë¡œ 놀ëžìŠµë‹ˆë‹¤. 나ì´ëŠ” 나보다 오륙 ë…„ ìƒê´€ë°–ì— ì•ˆ ë˜ì§€ë§ˆëŠ” ì´ì‹­ 세 ë‚´ì™¸ì— ì˜¤ë¥™ ë…„ ìƒê´€ì´ ì ì€ 것ì¸ê°€ìš”? 게다가 나는 ì„ ìƒì´ìš” ìžê¸°ëŠ” í•™ìƒì´ë‹ˆê¹Œ 어린애로만 ì•Œì•˜ë˜ ê²ƒì´ ê·¸ëŸ° ë§ì„ 하니 놀ëžì§€ ì•Šì•„ìš”? 어째서 ì‚¬ëžŒì˜ ë§ˆìŒì´ í•˜ëŠ˜ë³´ë‹¤ë„ ë” ì´ìƒí• ê¹Œ 하고 ë‚´ê°€ 물으니까, ê·¸ ëŒ€ë‹µì´ `나는 무엇ì´ë¼ê³  설명할 수가 없지마는 ë‚´ ë§ˆìŒ ì†ì— ì¼ì–´ë‚˜ëŠ” ê²ƒì´ í•˜ëŠ˜ì´ë‚˜ ë•…ì— ì¼ì–´ë‚˜ëŠ” 모든 ê²ƒë³´ë‹¤ë„ ë” ì•„ë¦„ë‹µê³  ë” ì•Œ 수 없고 ë” ëœ¨ê²ê³  그런 것 같아요.' 그러겠지요. ìƒëª…ì´ëž€ 모든 아름다운 것 ì¤‘ì— ê°€ìž¥ 아름다운 것ì´ë¼ëŠ” ê²ƒì„ ë‚˜ëŠ” 깨달았어요. ê·¸ ë§ì—, `그렇다 하면 ì´ ì•„ë¦„ë‹µê³  신비한 ìƒëª…ì„ ë‚´ëŠ” 우주는 ë” ì•„ë¦„ë‹¤ìš´ ê²ƒì´ ì•„ë‹ˆì˜¤?' 하고 ë‚´ê°€ 반문하니까, 당신(부ì¸ì„ 향하여) ë§ì´, `ì „ 모르겠어요, 어쨌으나 ì „ 행복합니다. 저는 ì´ í–‰ë³µì„ ê¹¨ëœ¨ë¦¬ê³  싶지 않습니다. ë†“ì³ ë²„ë¦¬ê³  싶지 않습니다. ì´ í–‰ë³µ ì„ ìƒë‹˜ ê³ì— 있는 ì´ í–‰ë³µì„ ê½‰ 안고 죽고 싶어요.' 그러지 않았소?" +"누가 그랬어요? ì•„ì´ ë‚œ 다 잊어버렸어요." +하고 부ì¸ì€ 차를 따르오. R는 ì¸ì œëŠ” 하하하 하는 웃ìŒì¡°ì°¨ 잊어버리고, 부ì¸ì—게 ë†ë‹´ì„ 붙ì´ëŠ” 것조차 잊어버리고, 그야ë§ë¡œ 종êµì  엄숙 그대로ë§ì„ ì´ì–´, +"`ìž ì €ëŠ” ì•½ì„ ë¨¹ì–´ìš”.' 하고 ì†ì„ 입으로 가져가는 ë™ìž‘ì´ ê°í–‰ë˜ê² ì§€ìš”. 약ì´ëž€ ê²ƒì€ í•˜ì–¼ë¹ˆì—ì„œ 준비한 아편ì´ì§€ìš”. 하얼빈서 치타까지 가는 ë™ì•ˆì— í¥ì•ˆë ¹ì´ë‚˜ ì–´ëŠ ì‚¼ë¦¼ì§€ëŒ€ë‚˜ 어디서나 ì£½ì„ ìžë¦¬ë¥¼ ì°¾ìžê³  준비한 것ì´ë‹ˆê¹Œ. 나는 ìž… 근처로 가는 ê·¸ì˜ ì†ì„ 붙들었어요. 붙들면서 나는 `ìž ê¹ë§Œ 기다리오. 오늘 ë°¤ 안으로 ê·¸ ì•½ì„ ë¨¹ìœ¼ë©´ ê³ ë§Œì´ ì•„ë‹ˆì˜¤? ì´ í–‰ë³µëœ ìˆœê°„ì„ ìž ê¹ì´ë¼ë„ 늘립시다. 달 올ë¼ì˜¬ 때까지만.' 나는 ì´ë ‡ê²Œ ë§í–ˆì§€ìš”. `ì„ ìƒë‹˜ë„ 행복ë˜ì…”ìš”? ì„ ìƒë‹˜ì€ 불행ì´ì‹œì§€. ì € ë•Œë¬¸ì— ë¶ˆí–‰ì´ì‹œì§€. 저만 ì´ê³³ì— 묻어 주시구는 ì„ ìƒë‹˜ì€ 세ìƒì— ëŒì•„ê°€ 사셔요, 오래오래 사셔요, ì¼ ë§Žì´ í•˜ê³  사셔요.' 하고 울지 ì•Šê² ì–´ìš”. 나는 ê·¸ ë•Œì— ë‚´ ì•„ë‚´ê°€ í•˜ë˜ ë§ì„ í•œ ë§ˆë””ë„ ìžŠì§€ 아니합니다. ê·¸ ë§ì„ ë“£ë˜ ë•Œì˜ ë‚´ ì¸ìƒì€ 아마 ì¼ìƒ ë‘ê³  잊히지 아니하겠지요. +나는 ìžë°±í•©ë‹ˆë‹¤. ê·¸ ìˆœê°„ì— ë‚˜ëŠ” 처ìŒìœ¼ë¡œ ë‚´ 아내를 안고 키스를 하였지요. ë‚´ ì†ì— 눌리고 눌리고 쌓ì´ê³  í•˜ì˜€ë˜ ì—´ì •ì´ ê·¸ë§Œ ì¼ì‹œì— í­ë°œë˜ì—ˆë˜ 것ì´ì˜¤. ì•„ì•„ ì´ê²ƒì´ ìµœì´ˆì˜ ê²ƒì´ìš”, ë™ì‹œì— ìµœí›„ì˜ ê²ƒì´ë¡œêµ¬ë‚˜ í•  ë•Œì— ë‚´ 눈ì—서는 ë“는 듯한 ëˆˆë¬¼ì´ í˜ë €ì†Œì´ë‹¤. ë‘ ì‚¬ëžŒì˜ ì‹¬ìž¥ì´ ë›°ëŠ” 소리, ë‘ ì‚¬ëžŒì˜ í’€ë¬´ 불길 ê°™ì€ ìˆ¨ì†Œë¦¬. +ì´ìœ½ê³  ë‹¬ì´ ë– ì˜¬ë¼ ì™”ìŠµë‹ˆë‹¤. ê°€ì´ì—†ëŠ” 벌íŒì´ë‹ˆê¹Œ ë‹¬ì´ ëœ¨ë‹ˆê¹Œ ê°‘ìžê¸° 천지가 환해지고 우리 ë‘˜ì´ ì†ìœ¼ë¡œ 파서 쌓아 ë†“ì€ í™ë¬´ë”기가 ì´ ì‚° 없는 세ìƒì— ì‚°ì´ë‚˜ ë˜ëŠ” ê²ƒê°™ì´ ì¡°ê·¸ë§ˆí•œ ê²€ì€ ê·¸ë¦¼ìžë¥¼ 지고 있겠지요. `ìž ìš°ë¦¬ ë‹¬ë¹›ì„ ë ê³  좀 ëŒì•„다ë‹ê¹Œ.' 하고 나는 아내를 안아 ì¼ìœ¼ì¼°ì§€ìš”. ë‚´ íŒ”ì— ì•ˆê²¨ì„œ 고개를 뒤로 젖힌 ë‚´ ì•„ë‚´ì˜ ì–¼êµ´ì´ ë‹¬ë¹›ì— ë¹„ì¹œ ì–‘ì„ ë‚˜ëŠ” 잘 기억합니다. 실신한 듯한, 만족한 듯한, ê·¸ë¦¬ê³ ë„ ì ˆë§í•œ 듯한 ê·¸ í‘œì •ì„ ë¬´ì—‡ìœ¼ë¡œ 그릴지 모릅니다. ê·¸ë¦¼ë„ ê·¸ë¦´ 줄 모르고 ì¡°ê°ë„ í•  줄 모르고 ê¸€ë„ ì“¸ 줄 모르는 ë‚´ê°€ ê·¸ê²ƒì„ ì–´ë–»ê²Œ 그립니까. 그저 가슴 ì†ì— 품고 ì´ë ‡ê²Œ ì˜¤ëŠ˜ì˜ ë‚´ 아내를 ë°”ë¼ë³¼ ë¿ì´ì§€ìš”. +나는 ë‚´ 아내를 íŒ”ì— ê±¸ê³  네, 걸었다고 하는 ê²ƒì´ ê°€ìž¥ 합당하지 ìš” ì´ë ‡ê²Œ 팔ì—다 걸고 ë‹¬ë¹›ì„ ë°›ì€ í™©ëŸ‰í•œ 벌íŒ, 아무리 í•˜ì—¬ë„ í™˜í•˜ê²Œ ë°ì•„지지는 아니하는 벌íŒì„ 헤매었습니다. ì´ë”°ê¸ˆ ë‚´ ì•„ë‚´ê°€, `ì–´ì„œ 죽고 싶어요, ì „ 죽고만 싶어요.' 하는 ë§ì—는 ëŒ€ë‹µë„ ì•„ë‹ˆ 하고. 죽고 싶다는 ê·¸ ë§ì€ 물론 ì§„ì •ì¼ ê²ƒì´ì§€ìš”. 아무리 ë§‘ì€ ì¼ê¸°ë¼ 하ë”ë¼ë„ 오후가 ë˜ë©´ í려지는 법ì´ë‹ˆê¹Œ 오래 살아가는 ë™ì•ˆì— 늘 í•œ 모양으로 ì´ ìˆœê°„ê°™ì´ ê¹¨ë—하고 뜨거운 기분으로 ê°ˆ 수는 없지 ì•Šì•„ìš”? 불쾌한 ì¼ë„ ìƒê¸°ê³ , 보기 í‰í•œ ì¼ë„ ìƒê¸¸ëŠ”지 모르거든. 그러니까 ì´ ì™„ì „í•œ 깨ë—ê³¼ 완전한 사랑과 완전한 행복 ì†ì— 죽어 버리ìžëŠ” ëœ»ì„ ë‚˜ëŠ” 잘 알지요. ë”구나 ìš°ë¦¬ë“¤ì´ ì‚´ì•„ 남는대야 ì•žê¸¸ì´ ê¸°êµ¬í•˜ì§€ í‰íƒ„í•  리는 없지 아니해요? 그래서 나는 `죽지, 우리 ì´ ë‹¬ë°¤ì— ì‹¤ì»· ëŒì•„다니다가, ë” ëŒì•„다니기가 ì‹«ê±°ë“  ê·¸ 구ë©ì— ëŒì•„가서 ì•½ì„ ë¨¹ì시다.' ì´ë ‡ê²Œ ë§í•˜ê³  우리 ë‘˜ì€ í—¤ë§¸ì§€ìš”. ë‚®ì— ë³´ë©´ 어디까지나 í‰í‰í•œ 벌íŒì¸ 것만 같지마는 ë‹¬ë°¤ì— ë³´ë©´ ì´ ì‚¬ë§‰ì—ë„ ì•„ì§ ì±„ 스러지지 아니한 ì‚°ì˜ í˜•ì ì´ 남아 있어서 êµ°ë°êµ°ë° 거뭇거뭇한 그림ìžê°€ 있겠지요. ê·¸ ê·¸ë¦¼ìž ì†ì—는 걸어 들어가면 ì–´ë–¤ ë°ëŠ” 우리 í—ˆë¦¬ë§Œí¼ ê·¸ë¦¼ìžì— 가리우고 ì–´ë–¤ ë°ëŠ” 우리 ë‘˜ì„ ë‹¤ 가리워 버리는 ë°ë„ 있단 ë§ì•¼ìš”. 죽ìŒì˜ 그림ìžë¼ëŠ” ìƒê°ì´ 나면 ê·¸ëž˜ë„ ëª¸ì— ì†Œë¦„ì´ ë¼ì³ìš”. +차차 ë‹¬ì´ ë†’ì•„ì§€ê³  추위가 심해져서 ë°”ëžŒê²°ì´ ì§€ë‚˜ê°ˆ ë•Œì—는 눈ì—ì„œ ëˆˆë¬¼ì´ ë‚  지경ì´ì§€ìš”. ì›ì²´ 대기 ì¤‘ì— ìˆ˜ë¶„ì´ ì ìœ¼ë‹ˆê¹Œ ì„œë¦¬ë„ ë§Žì§€ 않지마는, ê·¸ëž˜ë„ ëŒ€ê¸° ì¤‘ì— ìžˆëŠ” ìˆ˜ë¶„ì€ ë‹¤ 얼어 버려서 ì–¼ìŒê°€ë£¨ê°€ ë˜ì—ˆëŠ” 게지요. 공중ì—는 ë°˜ì§ë°˜ì§í•˜ëŠ” 수정가루 ê°™ì€ ê²ƒì´ ë³´ìž…ë‹ˆë‹¤. ë‚®ì—는 ë•€ì´ íë¥´ë¦¬ë§Œí¼ ë¥ë˜ ì‚¬ë§‰ë„ ë°¤ì´ ë˜ë©´ ì´ë ‡ê²Œ ê¸°ì˜¨ì´ ë‚´ë ¤ê°€ì§€ìš”. 춥다고 ìƒê°ì€ í•˜ë©´ì„œë„ ì¶¥ë‹¤ëŠ” ë§ì€ 아니 하고 우리는 ì–´ë–¤ ë•Œì—는 ë‹¬ì„ ë”°ë¼ì„œ, ì–´ë–¤ ë•Œì—는 ë‹¬ì„ ë“±ì§€ê³ , ì–´ë–¤ ë•Œì—는 í˜¸ìˆ˜ì— ë¹„ì¹œ ë‹¬ì„ êµ½ì–´ë³´ê³ , ì´ ëª¨ì–‘ìœ¼ë¡œ í•œì—†ì´ ë§ë„ ì—†ì´ ëŒì•„다녔지요. ì´ ì„¸ìƒ ìƒëª…ì˜ ë§ˆì§€ë§‰ ìˆœê°„ì„ íž˜ê» ì˜ì‹í•˜ë ¤ëŠ” 듯ì´. +마침내 `나는 ë” ëª» 걸어요.' 하고 ì´ì´ê°€ ë‚´ ì–´ê¹¨ì— ë§¤ë‹¬ë ¤ 버리고 ë§ì•˜ì§€ìš”." +하고 Rê°€ 부ì¸ì„ ëŒì•„보니 부ì¸ì€ íŽ¸ë¬¼í•˜ë˜ ì†ì„ 쉬고, +"다리가 아픈 ì¤„ì€ ëª¨ë¥´ê² ëŠ”ë° ë‹¤ë¦¬ê°€ ì´ë¦¬ 뉘구 저리 뉘구 í•´ì„œ 걸ìŒì„ ê±¸ì„ ìˆ˜ê°€ 없었어요. 춥기는 하구." +하고 소리를 ë‚´ì–´ì„œ 웃소. +"그럴 ë§Œë„ í•˜ì§€." +하고 R는 긴장한 í‘œì •ì„ ì•½ê°„ 풀고 ì•‰ì€ ìžì„¸ë¥¼ ìž ê¹ ê³ ì¹˜ë©°, +"ê·¸ í›„ì— ê·¸ ë‚  ë°¤ ëŒì•„다닌 ê³³ì„ ë”듬어 보니까, ìžì„¸ížˆëŠ” ì•Œ 수 없지마는 삼십 리는 ë” ë˜ëŠ” 것 같거든. 다리가 아프지 아니할 리가 있나." +하고 차를 í•œ 모금 마시고 나서 ë§ì„ 계ì†í•˜ì˜¤. +"그래서 나는 ë‚´ 외투를 ë²—ì–´ì„œ, ì´ì´(부ì¸)를 싸서 어린애 ì•ˆë“¯ì´ ì•ˆê³  걸었지요. 외투로 쌌으니 ìžê¸°ë„ 춥지 않구, 나는 ë˜ ë¬´ê±°ìš´ ì§ì„ 안았으니 ë•€ì´ ë‚  지경ì´êµ¬, ê·¸ë¿ ì•„ë‹ˆë¼ ë‚´ê°€ 제게 주는 ìµœí›„ì˜ ì„œë¹„ìŠ¤ë¼ í•˜ë‹ˆ 기ì˜ê³ , ë§í•˜ìžë©´ ì¼ê±° 삼ë“ì´ì§€ìš”. 하하하하. 지난 ì¼ì´ë‹ˆ 웃지마는 ê·¸ ë•Œ ì‚¬ì •ì„ ìƒê°í•´ 보세요, 어떠했겠나." +하고 R는 약간 처참한 ë¹›ì„ ë ë©´ì„œ, +"그러니 ê·¸ 구ë©ì´ë¥¼ ì–´ë”” ì°¾ì„ ìˆ˜ê°€ 있나. 얼마를 찾아 ëŒì•„다니다가 아무 ë°ì„œë‚˜ ì£½ì„ ìƒê°ë„ í•´ 보았지마는 몸뚱ì´ë¥¼ 그냥 벌íŒì— 내놓고 죽고 싶지는 아니하고 ë˜ ê·¸ 구ë©ì´ê°€ 우리 ë‘ ì‚¬ëžŒì—게 특별한 ì˜ë¯¸ê°€ 있는 것 같아서 기어코 ê·¸ê²ƒì„ ì°¾ì•„ 내고야 ë§ì•˜ì§€ìš”. ê·¸ 때는 ë²Œì¨ ìƒˆë²½ì´ ê°€ê¹Œì› ë˜ ëª¨ì–‘ì´ì˜¤. ì—´ 시나 넘어서 뜬 í•˜í˜„ë‹¬ì´ ë‚®ì´ ê¸°ìš¸ì—ˆìœ¼ë‹ˆ 그렇지 ì•Šê² ì–´ìš”. ê·¸ 구ë©ì´ì— 와서 우리는 í•œ 번 ë” í•˜ëŠ˜ê³¼ 달과 별과, 그리고 ë§ˆìŒ ì†ì— 떠오른 사람들과 하ì§í•˜ê³  약 ë¨¹ì„ ì¤€ë¹„ë¥¼ 했지요. +ì•½ì„ ê²€ì€ ê³ ì•½ê³¼ ê°™ì€ ì•„íŽ¸ì„ ë§›ì´ ì“°ë‹¤ëŠ” ì•„íŽ¸ì„ ë¬¼ë„ ì—†ì´ ë¨¹ìœ¼ë ¤ 들었지요. +우리 ë‘˜ì€ ì•„ê¹Œ 모양으로 가지런히 누워서 í•˜ëŠ˜ì„ ë°”ë¼ë³´ì•˜ëŠ”ë° ë‹¬ì´ ë°ìœ¼ë‹ˆê¹Œ ë³´ì´ë˜ 별들 ì¤‘ì— ìˆ¨ì€ ë³„ì´ ë§Žê³  ë˜ ë³„ë“¤ì˜ ìœ„ì¹˜ 우리ì—게 낯ìµì€ ë¶ë‘칠성 ìžë¦¬ë„ ë³€í–ˆì„ ê²ƒ 아니야요. ì´ìƒí•œ ìƒê°ì´ 나요. 우리가 벌íŒìœ¼ë¡œ 헤매는 ë™ì•ˆì— 천지가 ëª¨ë‘ ë³€í•œ 것 같아요. 사실 변하였지요. ê·¸ 변한 ê²ƒì´ ìš°ìŠ¤ì›Œì„œ 나는 껄껄 웃었지요. 워낙 ë‚´ê°€ 웃ìŒì´ 좀 헤프지만 ì´ ë•Œì²˜ëŸ¼ 헤프게 실컷 웃어 본 ì¼ì€ 없습니다. +왜 웃ëŠëƒê³  ì•„ë‚´ê°€ 좀 ì„±ì„ ë‚¸ ë“¯ì´ ë¬»ê¸°ë¡œ, `천지와 ì¸ìƒì´ 변하는 ê²ƒì´ ìš°ìŠ¤ì›Œì„œ 웃었소.' 그랬지요. 그랬ë”니, `천지와 ì¸ìƒì€ 변할는지 몰ë¼ë„ ë‚´ 마ìŒì€ 안 변해요!' 하고 소리를 지르겠지요. í½ ë¶„ê°œí–ˆë˜ ëª¨ì–‘ì´ì•¼." +하고 R는 ê·¸ 아내를 보오. +"그럼 분개 안 í•´ìš”? ë‚¨ì€ ì£½ì„ ê²°ì‹¬ì„ í•˜ê³  발발 떨구 ìžˆëŠ”ë° ê³ì—ì„œ 껄껄거리고 웃으니, 어째 분하지가 ì•Šì•„ìš”. 나는 분해서 달아나려고 했어요." +하고 부ì¸ì€ ì•„ì§ë„ ë¶„í•¨ì´ ë‚¨ì€ ê²ƒê°™ì´ ë§í•˜ì˜¤. +"그래 달아나지 않았소?" +하고 R는 부ì¸ì´ 벌떡 ì¼ì–´ë‚˜ì„œ 비틀거리고 달아나는 í‰ë‚´ë¥¼ 팔과 다리로 ë‚´ê³  나서, +"ì´ëž˜ì„œ 죽는 ì‹œê°„ì´ ì§€ì²´ê°€ ë˜ì—ˆì§€ìš”. 그래서 ë‚´ê°€ 빌고 달래고 í•´ì„œ 가까스로 ì•ˆì •ì„ ì‹œí‚¤ê³  나니 ì†ì— ì¥ì—ˆë˜ ì•„íŽ¸ì´ ë•€ì— í‘¹ 젖었겠지요. ë‚´ê°€ ì›ƒì€ ê²ƒì€ ì£½ê¸° ì „ í•œ 번 천지와 ì¸ìƒì„ 웃어 버린 것ì¸ë° 그렇게 야단ì´ë‹ˆâ€¦â€¦ 하하하하." +R는 ì‹ì€ 차를 í•œ 모금 ë” ë§ˆì‹œë©°, +"ì°¸ ëª©ë„ ë§ˆë¥´ê¸°ë„ í•˜ë”니. ìž…ì—는 침 í•œ 방울 없고. 그러나 ëª»ë¬¼ì„ ë¨¹ì„ ìƒê°ë„ 없고. 나중ì—는 ë§ì„ 하려고 í•´ë„ í˜€ê°€ 안 ëŒì•„가겠지요. +ì´ëŸ¬ëŠ” ë™ì•ˆì— ë‹¬ë¹›ì´ í¬ë¯¸í•´ì§€ê¸¸ëž˜ 웬ì¼ì¸ê°€ 하고 고개를 ë²ˆì© ë“¤ì—ˆë”니 í•´ê°€ 떠오릅니다그려. 어떻게 붉고 둥글고 씩씩한지. `ì € í•´ 보오.' 하고 나는 기계ì ìœ¼ë¡œ 벌떡 ì¼ì–´ë‚˜ì„œ 구ë©ì´ì—ì„œ 뛰어나왔지요." +하고 빙그레 웃소. Rì˜ ë¹™ê·¸ë ˆ 웃는 ì–‘ì´ ì°¸ 좋았소. +"ë‚´ê°€ 뛰어나오는 ê²ƒì„ ë³´ê³  ì´ì´ë„ 뿌시시 ì¼ì–´ë‚¬ì§€ìš”. ê·¸ í•´! ê·¸ í•´ì˜ ìƒˆ ë¹›ì„ ë°›ëŠ” 하늘과 ë•…ì˜ ë¹›! 나는 ê·¸ê²ƒì„ í˜•ìš©í•  ë§ì„ 가지지 못합니다. 다만 íž˜ê» ì†Œë¦¬ì¹˜ê³  싶고 ê¸°ìš´ê» ë‹¬ìŒë°•ì§ˆì¹˜ê³  ì‹¶ì€ ìƒê°ì´ ë‚  ë¿ì´ì–´ìš”. +`우리 삽시다, 죽지 ë§ê³  삽시다, ì‚´ì•„ì„œ 새 세ìƒì„ 하나 만들어 봅시다.' ì´ë ‡ê²Œ ë§í•˜ì˜€ì§€ìš”. 하니까 ì´ì´ê°€ 처ìŒì—는 ê¹œì§ ë†€ë¼ëŠ” 것 같아요. 그러나 마침내 ì•„ë‚´ë„ ì£½ì„ ëœ»ì„ ë³€í•˜ì˜€ì§€ìš”. 그래서 남 ì„ ìƒì„ 청하여다가 ê·¸ ë§ì”€ì„ 여쭈었ë”니 남 ì„ ìƒê»˜ì„œ 고개를 ë„ë•ë„ë•í•˜ì‹œê³  우리 ë‘˜ì˜ í˜¼ì¸ ì£¼ë¡€ë¥¼ 하셨지요. ê·¸ 후 ì‹­ì—¬ ë…„ì— ìš°ë¦¬ëŠ” ë°­ 갈고 ì•„ì´ ê¸°ë¥´ê³  ì´ëŸ° ìƒí™œì„ 하고 ìžˆëŠ”ë° ì–¸ì œë‚˜ 여기 새 ë¯¼ì¡±ì´ ìƒê¸°ê³  누가 새 ë‹¨êµ°ì´ ë ëŠ”지요. 하하하하, 아하하하. 피곤하시겠습니다. ì´ì•¼ê¸°ê°€ 너무 길어서." +하고 R는 ë§ì„ ëŠì†Œ. +나는 R부처가 만류하는 ê²ƒë„ ë‹¤ 뿌리치고 여관으로 ëŒì•„왔소. R와 함께 달빛 ì†, ê°œ 짖는 소리 ì†ì„ 지나서 ì•„ë¼ì‚¬ ì‚¬ëžŒì˜ ì¡°ê·¸ë§ˆí•œ 여관으로 ëŒì•„왔소. 여관 주ì¸ë„ R를 아는 모양ì´ì–´ì„œ 반갑게 ì¸ì‚¬í•˜ê³  ë˜ ë‚´ê²Œ 대한 부íƒë„ 하는 모양ì¸ê°€ 보오. +R는 ë‚´ ë°©ì— ì˜¬ë¼ì™€ì„œ ë‚´ì¼ í•˜ë£¨ 지날 ì¼ë„ ì´ì•¼ê¸°í•˜ê³  ë˜ ë‚¨ ì„ ìƒê³¼ ì •ìž„ì—게 관한 ì´ì•¼ê¸°ë„ 하였으나, 나는 그가 무슨 ì´ì•¼ê¸°ë¥¼ 하는지 잘 ë“¤ì„ ë§Œí•œ 마ìŒì˜ ì—¬ìœ ë„ ì—†ì–´ì„œ ë§ˆìŒ ì—†ëŠ” ëŒ€ë‹µì„ í•  ë¿ì´ì—ˆì†Œ. +Rê°€ ëŒì•„ê°„ ë’¤ì— ë‚˜ëŠ” ì˜·ë„ ë²—ì§€ 아니하고 ì¹¨ëŒ€ì— ë“œëŸ¬ëˆ„ì› ì†Œ. 페치카를 때기는 í•œ 모양ì´ë‚˜ ë°©ì´ ì¨ëŠ˜í•˜ê¸° 그지없소. +`ê·¸ ë‘ ë³„ 무ë¤ì´ ì •ë§ R와 ê·¸ 여학ìƒê³¼ ë‘ ì‚¬ëžŒì´ ì˜ì›ížˆ 달치 못할 ê¿ˆì„ ì•ˆì€ ì±„ë¡œ 깨ë—하게 죽어서 묻힌 무ë¤ì´ì—ˆìœ¼ë©´ 얼마나 좋ì„까. ë§Œì¼ ê·¸ë ‡ë‹¤ 하면 ë‚´ì¼ í•œ 번 ë” ê°€ì„œ 보토ë¼ë„ 하고 오련마는.' +하고 나는 Rë¶€ì²˜ì˜ ìƒí™œì— 대하여 ì¼ì¢…ì˜ ë¶ˆë§Œê³¼ í™˜ë©¸ì„ ëŠê¼ˆì†Œ. +그리고 ë‚´ê°€ ì •ìž„ì„ ì—¬ê¸°ë‚˜ 시베리아나 ì–´ë–¤ 곳으로 불러다가 ë§Œì¼ R와 ê°™ì€ í‰ë‚´ë¥¼ 낸다 하면, 하고 ìƒê°í•´ 보고는 나는 진저리를 쳤소. 나는 내머리 ì†ì— 다시 그러한 ìƒê°ì´ í•œ ì¡°ê°ì´ë¼ë„ 들어올 ê²ƒì„ ë‘려워하였소. +ê¸‰í–‰ì„ ê¸°ë‹¤ë¦¬ìžë©´ ë˜ ì‚¬í˜ì„ 기다리지 아니하면 아니 ë˜ê¸°ë¡œ 나는 ì´íŠ¿ë‚  ìƒˆë²½ì— ë– ë‚˜ëŠ” 구간차를 타고 Fì—­ì„ ë– ë‚˜ 버렸소. Rì—게는 고맙다는 편지 í•œ ìž¥ë§Œì„ ì¨ ë†“ê³ . 나는 R를 ë” ë³´ê¸°ë¥¼ ì›ì¹˜ 아니하였소. ê·¸ê²ƒì€ ë°˜ë“œì‹œ R를 죄ì¸ìœ¼ë¡œ ë³´ì•„ì„œ 그런 ê²ƒì€ ì•„ë‹ˆì˜¤ë§ˆëŠ” 그저 나는 다시 R를 대면하기를 ì›ì¹˜ 아니한 것ì´ì˜¤. +나는 차가 Rì˜ ì§‘ ì•žì„ ì§€ë‚  ë•Œì—ë„ Rì˜ ì§‘ì— ëŒ€í•˜ì—¬ì„œëŠ” 외면하였소. +ì´ ëª¨ì–‘ìœ¼ë¡œ 나는 í¥ì•ˆë ¹ì„ 넘고, 하ì¼ë¼ë¥´ì˜ ì†”ë°­ì„ ì§€ë‚˜ì„œ 마침내 ì´ ê³³ì— ì˜¨ 것ì´ì˜¤. +형! 나는 ì¸ì œëŠ” ì´ íŽ¸ì§€ë¥¼ ë내오. ë” ì“¸ ë§ë„ 없거니와 ì¸ì œëŠ” ì´ê²ƒì„ ì“°ê¸°ë„ ì‹«ì¦ì´ 났소. +ì´ íŽ¸ì§€ë¥¼ 쓰기 시작할 ë•Œì—는 ë°”ì´ì¹¼ì— ë¬¼ê²°ì´ í‰ìš©í•˜ë”니 ì´ íŽ¸ì§€ë¥¼ ë내는 지금ì—는 ê°€ì˜ ê°€ê¹Œìš´ 물ì—는 ì–¼ìŒì´ 얼었소. 그리고 ì € 멀리 푸른 ë¬¼ì´ ëŠ ì‹¤ëŠ ì‹¤ 하얗게 눈 ë®ì¸ ì‚° 빛과 어울리게 ë˜ì—ˆì†Œ. +사í˜ì´ë‚˜ ì´ì–´ì„œ ì˜¤ë˜ ëˆˆì´ ë°¤ìƒˆì— ê°œê³  오늘 아침ì—는 칼날 ê°™ì€ ë°”ëžŒì´ ëˆˆì„ ë‚ ë¦¬ê³  있소. +나는 ì´ ì–¼ìŒ ìœ„ë¡œ 걸어서 ì € 푸른 물 있는 곳까지 가고 ì‹¶ì€ ìœ í˜¹ì„ ê¸ˆí•  수 없소. ë”구나 ì´ íŽ¸ì§€ë„ ë‹¤ ì“°ê³  나니, ì¸ì œëŠ” ë‚´ê°€ ì´ ì„¸ìƒì—ì„œ í•  마지막 ì¼ê¹Œì§€ 다 í•œ 것 같소. +ë‚´ê°€ ì´ ì•žì— ì–´ë””ë¡œ 가서 ì–´ì°Œ ë ëŠ”지는 ë‚˜ë„ ëª¨ë¥´ì§€ë§ˆëŠ” í¬ë¯¸í•œ 소ì›ì„ ë§í•˜ë©´ 눈 ë®ì¸ ì‹œë² ë¦¬ì•„ì˜ ì¸ì  없는 삼림 지대로 한정 ì—†ì´ í—¤ë§¤ë‹¤ê°€ 기운 진하는 ê³³ì—ì„œ ì´ ëª©ìˆ¨ì„ ë§ˆì¹˜ê³  싶소. +ìµœì„ êµ°ì€ `ë'ì´ë¼ëŠ” 글ìžë¥¼ ì¼ë‹¤ê°€ 지워 버리고 ë”´ 종ì´ì—다가 ì´ëŸ° ë§ì„ ì¼ë‹¤ +다 ì“°ê³  나니 ì´ëŸ° íŽ¸ì§€ë„ ë‹¤ 부질없는 ì¼ì´ì˜¤. ë‚´ê°€ ì´ëŸ° ë§ì„ 한대야 세ìƒì´ 믿어 줄 ë¦¬ë„ ì—†ì§€ 않소. ë§ì´ëž€ 소용 없는 것ì´ì˜¤. ë‚´ê°€ 아무리 ë‚´ ì•„ë‚´ì—게 ë§ì„ í–ˆì–´ë„ ì•„ë‹ˆ 믿었거든 ë‚´ ì•„ë‚´ë„ ë‚´ ë§ì„ 아니 믿었거든 하물며 세ìƒì´ ë‚´ ë§ì„ ë¯¿ì„ ë¦¬ê°€ 있소. 믿지 아니할 ë¿ ì•„ë‹ˆë¼ ë‚´ ë§ ì¤‘ì—ì„œ ìžê¸°ë„¤ 목ì ì— 필요한 ë¶€ë¶„ë§Œì€ ë¯¿ê³ , ë˜ ìžê¸°ë„¤ 목ì ì— 필요한 ë¶€ë¶„ì€ ë§ˆìŒëŒ€ë¡œ 고치고 뒤집고 보태고 í•  것ì´ë‹ˆê¹Œ, 나는 ì´ íŽ¸ì§€ë¥¼ ì“´ ê²ƒì´ í•œ 무ìµí•˜ê³  어리ì„ì€ ì¼ì¸ ì¤„ì„ ê¹¨ë‹¬ì•˜ì†Œ. +형ì´ì•¼ ì´ íŽ¸ì§€ë¥¼ 아니 보기로니 나를 안 믿겠소? ê·¸ 중ì—는 혹 í˜•ì´ ì§€ê¸ˆê¹Œì§€ ëª¨ë¥´ë˜ ìžë£Œë„ 없지 아니하니, 형만 í˜¼ìž ë³´ì‹œê³  형만 í˜¼ìž ë‚´ ì‚¬ì •ì„ ì•Œì•„ 주시면 다행ì´ê² ì†Œ. 세ìƒì— í•œ 믿는 친구를 가지는 ê²ƒì´ ì €ë§ˆë‹¤ 하는 ì¼ì´ê² ì†Œ? +나는 ì´ ì“¸ë°ì—†ëŠ” 편지를 몇 번ì´ë‚˜ ë¶ˆì‚´ë¼ ë²„ë¦¬ë ¤ê³  하였으나 ê·¸ëž˜ë„ ê±°ê¸°ë„ ì¼ì¢…ì˜ ì• ì°©ì‹¬ì´ ìƒê¸°ê³  ë¯¸ë ¨ì´ ìƒê¸°ëŠ”구려. 형 í•œ 분ì´ë¼ë„ ë³´ì—¬ 드리고 ì‹¶ì€ ë§ˆìŒì´ ìƒê¸°ëŠ”구려. ë‚´ê°€ Sí˜•ë¬´ì†Œì— ìž…ê°í•´ ìžˆì„ ì ì— 형무소 ë²½ì— ì£„ìˆ˜ê°€ ì†í†±ìœ¼ë¡œ ì„±ëª…ì„ ìƒˆê¸´ ê²ƒì„ ë³´ì•˜ì†Œ. ë’¤ì— ë¬¼ì—ˆë”니 ê·¸ê²ƒì€ í”히 사형수가 하는 짓ì´ë¼ê³ . 사형수가 êµìˆ˜ëŒ€ì— ëŒë ¤ 나가기 바로 ì „ì— í”히 ì†í†±ìœ¼ë¡œ ë‹´ë²¼ë½ì´ë‚˜ ë§ˆë£»ë°”ë‹¥ì— ì œ ì´ë¦„ì„ ìƒˆê¸°ëŠ” ì¼ì´ 있다고 하는 ë§ì„ 들었소. ë‚´ê°€ 형ì—게 쓰는 ì´ íŽ¸ì§€ë„ ê·¸ 심리와 비슷한 것ì¼ê¹Œìš”? +형! 나는 보통 사람보다는, 정보다는 지로, ìƒì‹ë³´ë‹¤ëŠ” ì´ë¡ ìœ¼ë¡œ, ì´í•´ë³´ë‹¤ëŠ” ì˜ë¦¬ë¡œ ì‚´ì•„ 왔다고 ìžì‹ í•˜ì˜¤. ì´ë¥¼í…Œë©´ 논리학ì ìœ¼ë¡œ 윤리학ì ìœ¼ë¡œ 살아온 것ì´ë¼ê³  할까. 나는 엄격한 êµì‚¬ìš”, êµìž¥ì´ì—ˆì†Œ. 내게는 ì˜ì§€ë ¥ê³¼ ì´ì§€ë ¥ë°–ì— ì—†ëŠ” 것 같았소. 그러한 ìƒí™œì„ 수십 ë…„ í•´ 오지 아니하였소? 나는 ì´ ì•žì— ëª‡ì‹­ ë…„ì„ ë” ì‚´ë”ë¼ë„ ë‚´ ì´ ì„±ê²©ì´ë‚˜ ìƒí™œ 태ë„ì—는 ë³€í•¨ì´ ì—†ìœ¼ë¦¬ë¼ê³  ìžì‹ í•˜ì˜€ì†Œ. ë¶ˆí˜¹ì§€ë…„ì´ ì§€ë‚¬ìœ¼ë‹ˆ 그렇게 ìƒê°í•˜ì˜€ì„ ê²ƒì´ ì•„ë‹ˆì˜¤? +ê·¸ëŸ°ë° í˜•! ì°¸ ì´ìƒí•œ ì¼ì´ 있소. ê·¸ê²ƒì€ ë‚´ê°€ 지금까지 처해 ìžˆë˜ í™˜ê²½ì„벗어나서 호호 탕탕하게 ë„“ì€ ì„¸ê³„ì— ì•Œëª¸ì„ ë‚´ì–´ë˜ì§ì„ 당하니 ë‚´ ë§ˆìŒ ì†ì—는 무서운 여러 가지 변화가 ì¼ì–´ë‚˜ëŠ”구려. 나는 ì´ ë§ë„ 형ì—게 아니 하려고 ìƒê°í•˜ì˜€ì†Œ. 노여워하지 마시오, ë‚´ê²Œê¹Œì§€ë„ ìˆ¨ê¸°ëŠëƒê³ . 그런 ê²ƒì´ ì•„ë‹ˆì˜¤, 형ì€ì»¤ë…• 나 ìžì‹ ì—ê²Œê¹Œì§€ë„ ìˆ¨ê¸°ë ¤ê³  í•˜ì˜€ë˜ ê²ƒì´ì˜¤. 혹시 그런 기다리지 아니 í•˜ì˜€ë˜ ì›, 그런 ìƒê°ì´ ë‚´ 마ìŒì˜ í•˜ëŠ˜ì— ì¼ì–´ë‚˜ë¦¬ë¼ê³  ìƒìƒë„ 아니하였ë˜, 그런 ìƒê°ì´ ì¼ì–´ë‚  ë•Œì—는 나는 스스로 놀ë¼ê³  스스로 슬í¼í•˜ì˜€ì†Œ. 그래서 스스로 숨기기로 하였소. +ê·¸ 숨긴다는 ê²ƒì´ ë¬´ì—‡ì´ëƒ 하면 ê·¸ê²ƒì€ ì—´ì •ì´ìš”, ì •ì˜ ë¶ˆê¸¸ì´ìš”, ì •ì˜ ê´‘í’ì´ìš”, ì •ì˜ ë¬¼ê²°ì´ì˜¤. ë§Œì¼ ë‚´ ì˜ì‹ì´ 세계를 í‰í™”로운 í’€ 있고, 꽃 있고, 나무 있는 벌íŒì´ë¼ê³  하면 거기 ë‚œë°ì—†ëŠ” 미친 ì§ìŠ¹ë“¤ì´ ë¶ˆì„ ë¿œê³  소리를 지르고 싸우고, ì˜ê°ì„ 하고 ë‚ ì³ì„œ, ì´ ë™ì‚°ì˜ í‰í™”ì˜ í™”ì´ˆë¥¼ 다 짓밟아 버리고 마는 그러한 모양과 같소. +형! ê·¸ ì´ìƒì•¼ë¦‡í•œ ì§ìŠ¹ë“¤ì´ 여태ê», 사십 ë…„ ê°„ì„ ì–´ëŠ êµ¬ì„ì— ìˆ¨ì–´ 있었소? 그러다가 ì¸ì œ 뛰어나와 ê°ê° ì œ 권리를 주장하오? +지금 ë‚´ 가슴 ì†ì€ ë“소. ë‚´ ëª¸ì€ ë°”ì§ ì—¬ìœ„ì—ˆì†Œ. ê·¸ê²ƒì€ ìƒë¦¬í•™ì ìœ¼ë¡œë‚˜ 심리학ì ìœ¼ë¡œë‚˜ 타는 것ì´ìš”, 연소하는 것ì´ì˜¤. 그래서 다만 ë‚´ ëª¸ì˜ ì§€ë°©ë§Œì´ íƒ€ëŠ” ê²ƒì´ ì•„ë‹ˆë¼, 골수까지 타고, ëª¸ì´ íƒˆ ë¿ì´ ì•„ë‹ˆë¼ ìƒëª… ê·¸ ë¬¼ê±´ì´ íƒ€ê³  있는 것ì´ì˜¤. 그러면 어찌할까. +지위, 명성, 습관, 시대 사조 등등으로 ì¼ìƒì— 눌리고 ëˆŒë ¸ë˜ ë‚´ ìžì•„ì˜ ì¼ë¶€ë¶„ì´ í˜ëª…ì„ ì¼ìœ¼í‚¨ 것ì´ì˜¤? í•œ ë²ˆë„ ìžìœ ë¡œ 권세를 부려 보지 못한 본능과 ê°ì •ë“¤ì´ ë‚´ ìƒëª…ì´ ë나기 ì „ì— í•œ 번 ë‚ ë›°ì–´ 보려는 것ì´ì˜¤. ì´ê²ƒì´ ì„ ì´ì˜¤? ì•…ì´ì˜¤? +ê·¸ë“¤ì€ ë‚´ê°€ 지금까지 옳다고 여기고 신성하다고 ì—¬ê¸°ë˜ ëª¨ë“  권위를 모조리 둘러엎으려고 드오. 그러나 형! 나는 ë„저히 ì´ í˜ëª…ì„ ìš©ì¸í•  수가 없소. 나는 죽기까지 버티기로 ê²°ì •ì„ í•˜ì˜€ì†Œ. ë‚´ ì†ì—ì„œ ë‘ ì„¸ë ¥ì´ ì‹¸ìš°ë‹¤ê°€ 싸우다가 승부가 ê²°ì •ì´ ëª» ëœë‹¤ë©´ 나는 ìŠ¹ë¶€ì˜ ê²°ì •ì„ ê¸°ë‹¤ë¦¬ì§€ 아니하고 살기를 그만ë‘려오. +나는 눈 ë®ì¸ 삼림 ì†ìœ¼ë¡œ 들어가려오. 나는 Vë¼ëŠ” 대삼림 지대가 ì–´ë””ì¸ ì¤„ë„ ì•Œê³  거기를 가려면 ì–´ëŠ ì •ê±°ìž¥ì—ì„œ 내릴 ê²ƒë„ ë‹¤ 알아 놓았소. +ë§Œì¼ ë‹¨ìˆœížˆ 죽는다 하면 구태여 멀리 찾아갈 í•„ìš”ë„ ì—†ì§€ë§ˆëŠ” ê·¸ëž˜ë„ ë‚˜ 혼ìžë¡œëŠ” ë‚´ 사ìƒê³¼ ê°ì •ì˜ ì²­ì‚°ì„ í•˜ê³  싶소. ì‚´ 수 있는 날까지 세ìƒì„ ë– ë‚œ ê³³ì—ì„œ 살다가 완전한 í•´ê²°ì„ ì–»ëŠ” ë‚  나는 í˜¹ì€ ìŠ¹ë¦¬ì˜, í˜¹ì€ íŒ¨ë°°ì˜ ì¢…ë§‰ì„ ë‹«ì¹  것ì´ì˜¤. ë§Œì¼ í•´ê²°ì´ ì•ˆ ë˜ë©´ 안 ë˜ëŠ” 대로 그치면 그만ì´ì§€ìš”. +나는 ì´ ë¶“ì„ ë†“ê¸° ì „ì— ì–´ì ¯ë°¤ì— ê¾¼ 꿈 ì´ì•¼ê¸° 하나는 하려오. ê¿ˆì´ í•˜ë„ ìˆ˜ìƒí•´ì„œ 마치 ë‚´ ì „ë„ì— ëŒ€í•œ ì‹ ì˜ ê³„ì‹œì™€ë„ ê°™ê¸°ë¡œ 하는 ë§ì´ì˜¤. ê·¸ ê¿ˆì€ ì´ëŸ¬í•˜ì˜€ì†Œ. +ë‚´ê°€ ê½ì´ê¹¨(꼬ì´ê¹Œë¼ëŠ” ì•„ë¼ì‚¬ë§ë¡œ 침대ë¼ëŠ” ë§ì´ ì¡°ì„  ë™í¬ì˜ 입으로 변한 ë§ì´ì˜¤.) ì§ì„ 지고 ì‚½ì„ ë©”ê³  ëˆˆì´ ë®ì¸ 삼림 ì†ì„ í˜¼ìž ê±¸ì—ˆì†Œ. ì´ ê½ì´ê¹¨ ì§ì´ëž€ ê²ƒì€ ê¸ˆì ê¾¼ë“¤ì´ ê·¸ 여행 ì¤‘ì— ì†Œìš©í’ˆ, 마른 ë¹µ, 소금, ë‚´ë³µ 등ì†ì„ 침대 ë§¤íŠ¸ë¦¬ìŠ¤ì— ë„£ì–´ì„œ 지고 다니는 것ì´ì˜¤. ì´ ì§í•˜ê³  삽 í•œ ê°œ, ë„ë¼ í•œ ê°œ, ê·¸ê²ƒì´ ì‹œë² ë¦¬ì•„ë¡œ ê¸ˆì„ ì°¾ì•„ 헤매는 ì¡°ì„  ë™í¬ë“¤ì˜ 행색ì´ì˜¤. ë‚´ê°€ ì´ë¥´ì¿ ì¸ í¬ì—ì„œ ì´ëŸ¬í•œ ë™í¬ë¥¼ ë§Œë‚¬ë˜ ê²ƒì´ ê¿ˆìœ¼ë¡œ ë˜ì–´ 나온 모양ì´ì˜¤. +나는 꿈ì—는 세ìƒì„ 다 잊어버린, 아주 깨ë—하고 침착한 사람으로 ì´ ê½ì´ê¹¨ ì§ì„ 지고 ì‚½ì„ ë©”ê³  ë°¤ì¸ì§€ ë‚®ì¸ì§€ ì•Œ 수 없으나 ë•…ì€ ëˆˆë¹›ìœ¼ë¡œ í¬ê³ , í•˜ëŠ˜ì€ êµ¬ë¦„ë¹›ìœ¼ë¡œ íšŒìƒ‰ì¸ ì‚¼ë¦¼ 지대를 í—ˆë•í—ˆë• 걸었소. ê¸¸ë„ ì—†ëŠ” ë°ë¥¼, ì¸ì ë„ 없는 ë°ë¥¼. +꿈ì—ë„ ë‚´ ëª¸ì€ í½ í”¼ê³¤í•´ì„œ 쉴 ìžë¦¬ë¥¼ 찾는 마ìŒì´ì—ˆì†Œ. +나는 마침내 ì–´ë–¤ ì–¸ë• ë°‘ í•œ êµ°ë°ë¥¼ 골ëžì†Œ. 그리고 ìƒì‹œì— ì´ì•¼ê¸°ì—ì„œ ë“¤ì€ ëŒ€ë¡œ 삽으로 ë‚´ê°€ 누울 ìžë¦¬ë§Œí•œ ëˆˆì„ ì¹˜ê³ , 그리고는 ë„ë¼ë¡œ ê³ì— ì„  나무 몇 개를 ì°ì–´ 누ì´ê³  거기다가 ë¶ˆì„ ë†“ê³  ê·¸ ë¶ˆê¹€ì— ë…¹ì€ ë•…ì„ ë‘ì–´ ìžë‚˜ 파내고 ê·¸ ì†ì— 드러누웠소. 훈훈한 ê²ƒì´ ì•„ì£¼ 편안하였소. +하늘ì—는 ë³„ì´ ë°˜ì§ê±°ë ¸ì†Œ. Fì—­ì—ì„œ ë³´ë˜ ë°”ì™€ ê°™ì´ í° ë³„ ìž‘ì€ ë³„ë„ ë³´ì´ê³  í‰ì‹œì— 보지 ëª»í•˜ë˜ ë¶‰ì€ ë³„, 푸른 별 ë“¤ë„ ë³´ì˜€ì†Œ. 나는 ì´ ì´ìƒí•œ 하늘, ì´ìƒí•œ ë³„ë“¤ì´ ìžˆëŠ” í•˜ëŠ˜ì„ ë³´ê³  드러누워 있노ë¼ë‹ˆê¹Œ ë¬¸ë“ ì–´ë””ì„œ ë°œìžêµ­ 소리가 들렸소. í‰í‰í‰í‰ 우루루루…… 나는 벌떡 ì¼ì–´ë‚˜ë ¤ 하였으나 ëª¸ì´ ì²œ ê·¼ì´ë‚˜ ë˜ì–´ì„œ 움ì§ì¼ 수가 없었소. 가까스로 고개를 조금 들고 보니 ë¿”ì´ ê¸¸ë‹¤ëž—ê³  ëˆˆì´ ë¶ˆê°™ì´ ë¶‰ì€ ì‚¬ìŠ´ì˜ ë–¼ê°€ ë¬´ì—‡ì— ë†€ëžëŠ”지 껑충껑충 ë›°ì–´ 지나가오. ì´ê²ƒì€ 아마 í¬ë¡œí¬íŠ¸í‚¨ì˜ <ìƒí˜¸ 부조론> ì†ì— ë§í•œ ì‹œë² ë¦¬ì•„ì˜ ì‚¬ìŠ´ì˜ ë–¼ê°€ ê¿ˆì´ ë˜ì–´ 나온 모양ì´ì˜¤. +그러ë”니 ê·¸ ì‚¬ìŠ´ì˜ ë–¼ê°€ 다 지나간 ë’¤ì—, ê·¸ ì‚¬ìŠ´ì˜ ë–¼ê°€ ì˜¤ë˜ ë°©í–¥ìœ¼ë¡œì„œ ì •ìž„ì´ê°€ 걸어오는 ê²ƒì´ ì•„ë‹ˆë¼ ìŠ¤ë¥´ë¥µ 하고 미ë„러져 오오. 마치 ì¸í˜•ì„ 밀어 주는 것같ì´. +"ì •ìž„ì•„!" +하고 나는 소리를 치고 ëª¸ì„ ì¼ìœ¼í‚¤ë ¤ 하였소. +ì •ìž„ì˜ ëª¨ì–‘ì€ ë‚˜ë¥¼ ìž ê¹ ë³´ê³ ëŠ” 미ë„러지는 ë“¯ì´ í˜ëŸ¬ê°€ 버리오. +나는 ì •ìž„ì•„, 정임아를 부르고 팔다리를 부둥거렸소. 그러다가 마침내 ë‚´ ëª¸ì´ ë²ˆì© ì¼ìœ¼ì¼œì§ì„ 깨달았소. 나는 ì •ìž„ì˜ ë’¤ë¥¼ ë”°ëžì†Œ. +나는 눈 위로 삼림 ì†ìœ¼ë¡œ ì •ìž„ì˜ ê·¸ë¦¼ìžë¥¼ ë”°ëžì†Œ. ë³´ì¼ ë“¯ 안 ë³´ì¼ ë“¯, ìž¡íž ë“¯ 안 ìž¡íž ë“¯, 나는 무거운 다리를 ëŒê³  ì •ìž„ì„ ë”°ëžì†Œ. +ì •ìž„ì€ ì´ ì¶”ìš´ ë‚ ì´ì–¸ë§Œ 눈과 ê°™ì´ í° ì˜·ì„ ìž…ì—ˆì†Œ. ê·¸ ì˜·ì€ ì˜›ë‚  로마 ì—¬ì¸ì˜ 옷과 ê°™ì´ ë°”ëžŒê²°ì— íŽ„ë ê±°ë ¸ì†Œ. +"오지 마세요. 저를 ë”°ë¼ì˜¤ì§€ 못하십니다." +하고 ì •ìž„ì€ ëˆˆë³´ë¼ ì†ì— 가리워 버리고 ë§ì•˜ì†Œ. 암만 ë¶ˆëŸ¬ë„ ëŒ€ë‹µì´ ì—†ê³  눈보ë¼ê°€ 다 지나간 ë’¤ì—ë„ ë¶‰ì€ ë³„, 푸른 별과 ë¿” 긴 ì‚¬ìŠ´ì˜ ë–¼ë¿ì´ì˜¤. ì •ìž„ì€ ë³´ì´ì§€ 아니하였소. 나는 미칠 ë“¯ì´ ì •ìž„ì„ ì°¾ê³  부르다가 ìž ì„ ê¹¨ì—ˆì†Œ. +ê¿ˆì€ ì´ê²ƒë¿ì´ì˜¤. ê¿ˆì„ ê¹¨ì–´ì„œ ì°½ ë°–ì„ ë°”ë¼ë³´ë‹ˆ ì–¼ìŒê³¼ ëˆˆì— ë®ì¸ ë°”ì´ì¹¼í˜¸ 위ì—는 ìƒˆë²½ì˜ ê²¨ìš¸ ë‹¬ì´ ë¹„ì¹˜ì–´ 있었소. ì € 멀리 검푸르게 ë³´ì´ëŠ” ê²ƒì´ ì±„ 얼어붙지 아니한 물ì´ê² ì§€ìš”. 오늘 ë°¤ì— ë°”ëžŒì´ ì—†ê³  ê¸°ì˜¨ì´ ë‚´ë¦¬ë©´ 그것마저 얼어붙ì„는지 모르지요. ë²Œì¨ ì‚´ì–¼ìŒì´ ìž¡í˜”ëŠ”ì§€ë„ ëª¨ë¥´ì§€ìš”. ì•„ì•„, ê·¸ ì†ì€ 얼마나 깊ì„까. 나는 ë°”ì´ì¹¼ì˜ 물 ì†ì´ ê´€ì‹¬ì´ ë˜ì–´ì„œ 못 견디겠소. +형! 나는 ìžë°±í•˜ì§€ 아니할 수 없소. ì´ ê¿ˆì€ ë‚´ 마ìŒì˜ ì–´ë–¤ ë¶€ë¶„ì„ ì„¤ëª…í•œ 것ì´ë¼ê³ . 그러나 형! 나는 ì´ê²ƒì„ 부정하려오. 굳세게 부정하려오. 나는 ì´ ê¿ˆì„ ë¶€ì •í•˜ë ¤ì˜¤. 억지로ë¼ë„ 부정하려오. 나는 ê²°ì½” ë‚´ ì†ì— ì¼ì–´ë‚œ í˜ëª…ì„ ìš©ì¸í•˜ì§€ 아니하려오. 나는 ê·¸ê²ƒì„ í˜ëª…으로 ì¸ì •í•˜ì§€ 아니하려오. 아니오! 아니오! ê·¸ê²ƒì€ ë°˜ëž€ì´ì˜¤! ë‚´ ì¸ê²©ì˜ 통ì¼ì— 대한 반란ì´ì˜¤. 단연코 무단ì ìœ¼ë¡œ 진정하지 아니하면 아니 ë  ë°˜ëž€ì´ì˜¤. 보시오! 나는 굳게 서서 í•œ 걸ìŒë„ 뒤로 물러서지 아니할 것ì´ì˜¤. 만ì¼ì— í˜•ì´ ê´‘ì•¼ì— êµ¬ë¥´ëŠ” ë‚´ 시체나 í•´ê³¨ì„ ë³¸ë‹¤ë“ ì§€, ë˜ëŠ” 무슨 ì¸ì—°ìœ¼ë¡œ ë‚´ 무ë¤ì„ 발견하는 ë‚ ì´ ìžˆë‹¤ê³  하면 ê·¸ ë•Œì— í˜•ì€ ë‚´ê°€ ì´ ëª¨ë“  ë°˜ëž€ì„ ì§„ì •í•œ ê°œì„ ì˜ êµ°ì£¼ë¡œ ì£½ì€ ê²ƒì„ ì•Œì•„ 주시오. +ì¸ì œ ë°”ì´ì¹¼ì— ê²¨ìš¸ì˜ ì„ì–‘ì´ ë¹„ì¹˜ì—ˆì†Œ. ëˆˆì„ ì¸ ë‚˜ì§€ë§‰í•œ ì‚°ë“¤ì´ ì§€ëŠ” í–‡ë¹›ì— ìžì¤ë¹›ì„ 발하고 있소. 극히 깨ë—하고 싸늘한 ê´‘ê²½ì´ì˜¤. 아디유! +ì´ íŽ¸ì§€ë¥¼ ìš°íŽ¸ì— ë¶€ì¹˜ê³ ëŠ” 나는 ìµœí›„ì˜ ë°©ëž‘ì˜ ê¸¸ì„ ë– ë‚˜ì˜¤. ì°¾ì„ ìˆ˜ë„ ì—†ê³ , 편지 ë°›ì„ ìˆ˜ë„ ì—†ëŠ” 곳으로. +부디 í‰ì•ˆížˆ 계시오. ì¼ ë§Žì´ í•˜ì‹œì˜¤. 부ì¸ê»˜ 문안 드리오. ë‚´ 가족과 ì •ìž„ì˜ ì¼ ë§¡ê¸°ì˜¤. 아디유! +ì´ê²ƒìœ¼ë¡œ ìµœì„ êµ°ì˜ íŽ¸ì§€ëŠ” ë났다. +나는 ì´ íŽ¸ì§€ë¥¼ 받고 울었다. ì´ê²ƒì´ ì¼ íŽ¸ì˜ ì†Œì„¤ì´ë¼ 하ë”ë¼ë„ 슬픈 ì¼ì´ì–´ë“ , 하물며 ë‚´ê°€ 가장 믿고 사랑하는 ì¹œêµ¬ì˜ ì¼ìž„ì—야. +ì´ íŽ¸ì§€ë¥¼ 받고 나는 곧 ìµœì„ êµ°ì˜ ì§‘ì„ ì°¾ì•˜ë‹¤. 주ì¸ì„ ìžƒì€ ì´ ì§‘ì—서는아ì´ë“¤ì´ 마당ì—ì„œ 떠들고 있었다. +"ì‚¼ì²­ë™ ì•„ìžì”¨ 오셨수. 어머니, ì‚¼ì²­ë™ ì•„ìžì”¨." +하고 ìµœì„ êµ°ì˜ ìž‘ì€ë”¸ì´ 나를 ë³´ê³  뛰어들어갔다. +최ì„ì˜ ë¶€ì¸ì´ 나와 나를 맞았다. +부ì¸ì€ ë¨¸ë¦¬ë„ ë¹—ì§€ 아니하고, 얼굴ì—는 ì¡°ê¸ˆë„ í™”ìž¥ì„ ì•„ë‹ˆí•˜ê³ , ë§¤ë¬´ì‹œë„ í˜ëŸ¬ë‚´ë¦´ 지경으로 ì •ëˆë˜ì§€ 못하였다. ì¼ ì£¼ì¼ì´ë‚˜ 못 만난 ë™ì•ˆì— 부ì¸ì˜ ëª¨ì–‘ì€ ë”ìš± 초췌하였다. +"ë…¸ì„헌테서 무슨 기별ì´ë‚˜ 있습니까." +하고 나는 무슨 ë§ë¡œ ë§ì„ 시작할지 몰ë¼ì„œ ì´ëŸ° ë§ì„ 하였다. +"아니오. 왜 ê·¸ì´ê°€ ì§‘ì— íŽ¸ì§€í•˜ë‚˜ìš”?" +하고 부ì¸ì€ 성난 ë¹›ì„ ë³´ì´ë©°, +"ì§‘ì„ ë– ë‚œ 지가 ê·¼ 사십 ì¼ì´ ë˜ê±´ë§Œ 엽서 í•œ 장 있나요. 집안 ì‹êµ¬ê°€ 다 죽기로 눈ì´ë‚˜ 깜ì§í•  ì¸ê°€ìš”. 그저 ì •ìž„ì´í—Œí…Œë§Œ 미ì³ì„œ 죽ì„지 살지를 모르지요." +하고 울먹울먹한다. +"잘못 아십니다. 부ì¸ê»˜ì„œ ë…¸ì„ì˜ ë§ˆìŒì„ 잘못 아십니다. 그런 ê²ƒì´ ì•„ë‹™ë‹ˆë‹¤." +하고 나는 확신 있는 ë“¯ì´ ë§ì„ 시작하였다. +"ë…¸ì„ì˜ ìƒê°ì„ 부ì¸ê»˜ì„œ 오해하신 ì¤„ì€ ë²Œì¨ë¶€í„° 알았지마는 오늘 ë…¸ì„ì˜ íŽ¸ì§€ë¥¼ 받아보고 ë”ìš± 분명히 알았습니다." +하고 나는 부ì¸ì˜ í‘œì •ì˜ ë³€í™”ë¥¼ 엿보았다. +"편지가 왔어요?" +하고 부ì¸ì€ 놀ë¼ë©´ì„œ, +"지금 ì–´ë”” 있어요? ì¼ë³¸ 있지요?" +하고 ì§ˆíˆ¬ì˜ ë¶ˆê¸¸ì„ ëˆˆìœ¼ë¡œ 토하였다. +"ì¼ë³¸ì´ 아닙니다. ë…¸ì„ì€ ì§€ê¸ˆ ì•„ë¼ì‚¬ì— 있습니다." +"ì•„ë¼ì‚¬ìš”?" +하고 부ì¸ì€ 놀ë¼ëŠ” ë¹›ì„ ë³´ì´ë”니, +"그럼 ì •ìž„ì´ë¥¼ ë°ë¦¬ê³  아주 ì•„ë¼ì‚¬ë¡œ 가케오치를 하였군요." +하고 히스테리컬한 웃ìŒì„ ë³´ì´ê³ ëŠ” ëª¸ì„ í•œ 번 떨었다. +부ì¸ì€ 남편과 ì •ìž„ì˜ ê´€ê³„ë¥¼ ë§í•  때마다 ì´ë ‡ê²Œ 경련ì ì¸ 웃ìŒì„ 웃고 ëª¸ì„ ë– ëŠ” ê²ƒì´ ë²„ë¦‡ì´ì—ˆë‹¤. +"아닙니다. ë…¸ì„ì€ í˜¼ìž ê°€ 있습니다. 그렇게 오해를 마세요." +하고 나는 ë³´ì— ì‹¼ 최ì„ì˜ íŽ¸ì§€ë¥¼ ë‚´ì–´ì„œ 부ì¸ì˜ 앞으로 밀어 놓으며, +"ì´ê²ƒì„ 보시면 다 아실 줄 압니다. 어쨌으나 ë…¸ì„ì€ ê²°ì½” ì •ìž„ì´ë¥¼ ë°ë¦¬ê³  ê°„ ê²ƒì´ ì•„ë‹ˆìš”, ë„리어 ì •ìž„ì´ë¥¼ 멀리 떠나서 ê°„ 것입니다. 그러나 ê·¸ë³´ë‹¤ë„ ì¤‘ëŒ€ 문제가 있습니다. ë…¸ì„ì€ ì´ íŽ¸ì§€ë¥¼ ë³´ë©´ ì£½ì„ ê²°ì‹¬ì„ í•œ 모양입니다." +하고 부ì¸ì˜ 주ì˜ë¥¼ 질투로부터 ê·¸ 남편ì—게 대한 ë™ì •ì— ëŒì–´ ë³´ë ¤ 하였다. +"í¥. 왜요? 시체 정사를 하나요? 좋겠습니다. 머리가 허연 ê²ƒì´ ë”¸ìžì‹ ê°™ì€ ê³„ì§‘ì• í—ˆêµ¬ 정사를 한다면 ê·¸ ê¼´ 좋겠습니다. 죽으ë¼ì§€ìš”. 죽으래요. 죽는 ê²ƒì´ ë‚«ì§€ìš”. 그리구 ì‚´ì•„ì„œ 무엇 í•´ìš”?" +ë‚´ ëœ»ì€ í‹€ë ¤ 버렸다. 부ì¸ì˜ 표정과 ë§ì—서는 ë”ìš±ë”ìš± ë…í•œ ì§ˆíˆ¬ì˜ ì•ˆê°œì™€ 싸늘한 ì–¼ìŒê°€ë£¨ê°€ 날았다. +나는 부ì¸ì˜ ì´ íƒœë„ì— ë°˜ê°ì„ ëŠê¼ˆë‹¤. 아무리 ì§ˆíˆ¬ì˜ ê°ì •ì´ 강하다 하기로, ì‚¬ëžŒì˜ ìƒëª…ì´ ì œ ë‚¨íŽ¸ì˜ ìƒëª…ì´ ìœ„íƒœí•¨ì—ë„ ë¶ˆêµ¬í•˜ê³  ì˜¤ì§ ì œ ì§ˆíˆ¬ì˜ ê°ì •ì—만 충실하려 하는 ê·¸ 태ë„ê°€ 불쾌하였다. 그래서 나는, +"나는 ê·¸ë§Œí¼ ë§ì”€í•´ 드렸으니 ë” í•  ë§ì”€ì€ 없습니다. 아무려나 ì¢€ë” ëƒ‰ì •í•˜ê²Œ ìƒê°í•´ 보세요. 그리고 ì´ê²ƒì„ ì½ì–´ 보세요." +하고 ì¼ì–´ë‚˜ì„œ 집으로 ëŒì•„와 버리고 ë§ì•˜ë‹¤. +ë„무지 불쾌하기 그지없는 ë‚ ì´ë‹¤. 최ì„ì˜ íƒœë„ê¹Œì§€ë„ ë¶ˆì¾Œí•˜ë‹¤. 달아나긴 왜 달아나? 죽기는 왜 죽어? 못난 것! 기운 없는 것! 하고 나는 최ì„ì´ê°€ ê³ì— 섰기나 í•œ 것처럼 ëˆˆì„ í˜ê¸°ê³  중얼거렸다. +최ì„ì˜ ë§ëŒ€ë¡œ 최ì„ì˜ ë¶€ì¸ì€ ì•…í•œ ì‚¬ëžŒì´ ì•„ë‹ˆìš”, 그저 ë³´í†µì¸ ì—¬ì„±ì¼ëŠ”지 모른다. 그렇다 하면 ì—¬ìžì˜ 마ìŒì´ëž€ ë„ˆë¬´ë„ ì§ˆíˆ¬ì˜ ì¢…ì´ ì•„ë‹ê¹Œ. 설사 남편 ë˜ëŠ” 최ì„ì˜ ì‚¬ëž‘ì´ ì•„ë‚´ë¡œë¶€í„° ì •ìž„ì—게로 옮아 갔다고 하ë”ë¼ë„ ê·¸ê²ƒì„ ì§ˆíˆ¬ë¡œ 회복하려는 ê²ƒì€ ì–´ë¦¬ì„ì€ ì¼ì´ë‹¤. ì´ë¯¸ ì‚¬ëž‘ì´ ë– ë‚œ ë‚¨íŽ¸ì„ ë„¤ 마ìŒëŒ€ë¡œ ê°€ê±°ë¼ í•˜ê³  ìžë°œì ìœ¼ë¡œ 내어버릴 것ì´ì§€ë§ˆëŠ” ê·¸ê²ƒì„ ëª» í•  ì‚¬ì •ì´ ìžˆë‹¤ê³  하면 모르는 체하고 내버려 둘 ê²ƒì´ ì•„ë‹Œê°€. ê·¸ëž˜ë„ ì´ê²ƒì€ 우리네 남ìžì˜ ì´ë¡ ì´ìš”, ì—¬ìžë¡œëŠ” ì´ëŸ° ê²½ìš°ì— ì§ˆíˆ¬ë¼ëŠ” ë°˜ì‘ë°–ì— ì—†ë„ë¡ ìƒê¸´ 것ì¼ê¹Œ 나는 ì´ëŸ° ìƒê°ì„ 하고 있었다. +시계가 아홉시를 친다. +남대문 ë°– ì •ê±°ìž¥ì„ ë– ë‚˜ëŠ” ì—´ì°¨ì˜ ê¸°ì  ì†Œë¦¬ê°€ 들린다. +나는 만주를 ìƒê°í•˜ê³ , 시베리아를 ìƒê°í•˜ê³  최ì„ì„ ìƒê°í•˜ì˜€ë‹¤. 마ìŒìœ¼ë¡œëŠ” ì •ìž„ì„ ì‚¬ëž‘í•˜ë©´ì„œ ê·¸ ì‚¬ëž‘ì„ ë°œí‘œí•  수 없어서 ì‹œë² ë¦¬ì•„ì˜ ëˆˆ ë®ì¸ 삼림 ì†ìœ¼ë¡œ 방황하는 최ì„ì˜ ëª¨ì–‘ì´ ìµœì„ì˜ ê¿ˆ ì´ì•¼ê¸°ì— 있는 대로 ëˆˆì•žì— ì„ í•˜ê²Œ 떠나온다. +`ì‚¬ëž‘ì€ ëª©ìˆ¨ì„ ë¹¼ì•—ëŠ”ë‹¤.' +하고 나는 사랑ì¼ëž˜ ì¼ì–´ë‚˜ëŠ” ì¸ìƒì˜ ë¹„ê·¹ì„ ìƒê°í•˜ì˜€ë‹¤. 그러나 최ì„ì˜ ê²½ìš°ëŠ” 보통 있는 ê³µì‹ê³¼ëŠ” 달ë¼ì„œ ì‚¬ëž‘ì„ ì£½ì´ê¸° 위해서 ì œ ëª©ìˆ¨ì„ ì£½ì´ëŠ” 것ì´ì—ˆë‹¤. 그렇다 하ë”ë¼ë„, +`ì‚¬ëž‘ì€ ëª©ìˆ¨ì„ ë¹¼ì•—ëŠ”ë‹¤.' +는 ë°ì—는 ë‹¤ë¦„ì´ ì—†ë‹¤. +나는 ë¶ˆì¾Œë„ í•˜ê³  ëª¸ë„ ìœ¼ìŠ¤ìŠ¤í•˜ì—¬ 얼른 ìžë¦¬ì— 누웠다. ë©°ëŠë¦¬ê°€ 들어온 뒤부터 사랑 ìƒí™œì„ 하는 지가 ë²Œì¨ ì˜¤ ë…„ì´ë‚˜ ë˜ì—ˆë‹¤. 우리 부처란 ì¸ì œëŠ” í•œ ì—­ì‚¬ì  ì¡´ìž¬ìš”, ìœ¤ë¦¬ì  ê´€ê³„ì— ë¶ˆê³¼í•˜ì˜€ë‹¤. 오래 사귄 친구와 ê°™ì€ ìµìˆ™í•¨ì´ 있고, ì§‘ì— ì—†ì§€ 못할 사람ì´ë¼ëŠ” í•„ìš”ê°ë„ 있지마는 ì Šì€ ë¶€ì²˜ê°€ 가지는 듯한 그런 ì •ì€ ë²Œì¨ ì—†ëŠ” 지 오래였다. ì•„ë‚´ë„ ë‚˜ë¥¼ 대하면 본체만체, ë‚˜ë„ ì•„ë‚´ë¥¼ 대하면 본체만체, 무슨 필요가 있어서 ë§ì„ 붙ì´ë”ë¼ë„ ì•„ë¬´ìª¼ë¡ ë“£ê¸° 싫기를 ì›í•˜ëŠ” ë“¯ì´ í†¡í†¡ ë‚´ë˜ì¡Œë‹¤. ì•„ë‚´ë„ ê·¼ëž˜ì— ì™€ì„œëŠ” ì˜·ë„ ì•„ë¬´ë ‡ê²Œë‚˜, ë¨¸ë¦¬ë„ ì•„ë¬´ë ‡ê²Œë‚˜, ì–´ë”” 출입할 때밖ì—는 ë„무지 í™”ìž¥ì„ ì•„ë‹ˆ 하였다. +그러나 그렇다고 우리 ë¶€ì²˜ì˜ ìƒˆê°€ 좋지 못한 ê²ƒë„ ì•„ë‹ˆì—ˆë‹¤. 서로 소중히 여기는 마ìŒë„ 있었다. ì•„ë‚´ê°€ ì•ˆì— ìžˆë‹¤ê³  ìƒê°í•˜ë©´ 마ìŒì´ 든든하고 ë˜ ì•„ë‚´ì˜ ë§ì— ì˜í•˜ê±´ëŒ€ ë‚´ê°€ ì‚¬ëž‘ì— ìžˆê±°ë‹ˆ 하면 마ìŒì´ 든든하다고 한다. +우리 ë¶€ì²˜ì˜ ê´€ê³„ëŠ” ì´ëŸ¬í•œ 관계다. +나는 í•œ ë°©ì—ì„œ í˜¼ìž ìž ì„ ìžëŠ” ê²ƒì´ ìŠµê´€ì´ ë˜ì–´ì„œ 누가 ê³ì— 있으면 ìž ì´ ìž˜ 들지 아니하였다. 혹시 ì–´ë¦°ê²ƒë“¤ì´ ë§¤ë¥¼ 얻어맞고 사랑으로 í”¼ë‚œì„ ì™€ì„œ 울다가 ë‚´ ìžë¦¬ì—ì„œ ìž ì´ ë“¤ë©´ 귀엽기는 ê·€ì—¬ì›Œë„ ìž ìžë¦¬ëŠ” 편안치 아니하였다. 나는 ì±…ì„ ë³´ê³  ê¸€ì„ ì“°ê³  ê³µìƒì„ 하고 있으면 족하였다. 내게는 아무 ì• ìš•ì  ìš”êµ¬ë„ ì—†ì—ˆë‹¤. ì´ê²ƒì€ ë‚´ ì •ë ¥ì´ ì‡ ëª¨í•œ 까닭ì¸ì§€ 모른다. +그러나 최ì„ì˜ íŽ¸ì§€ë¥¼ 본 ê·¸ ë‚  ë°¤ì—는 ë„무지 ìž ì´ ìž˜ 들지 아니하였다. 최ì„ì˜ íŽ¸ì§€ê°€ 최ì„ì˜ ê³ ë¯¼ì´ ë‚´ ì¡¸ë˜ ì˜ì‹ì— 무슨 ìžê·¹ì„ 준 듯하였다. ì ë§‰í•œ 듯하였다. 허전한 듯하였다. 무엇ì¸ì§€ 모르나 그리운 ê²ƒì´ ìžˆëŠ” 것 같았다. +"ì–´, ì´ê±° 안ë˜ì—ˆêµ°." +하고 나는 벌떡 ì¼ì–´ë‚˜ 담배를 피워 물었다. +"나으리 주무셔 곕시오?" +하고 ì•„ë²”ì´ ì „ë³´ë¥¼ 가지고 왔다. +"명조 경성 ì°© 남정임" +ì´ë¼ëŠ” 것ì´ì—ˆë‹¤. +"ì •ìž„ì´ê°€ 와?" +하고 나는 전보를 다시 ì½ì—ˆë‹¤. +최ì„ì˜ ê·¸ 편지를 ë³´ë©´ ìµœì„ ë¶€ì¸ì—게는 ì–´ë–¤ ë°˜ì‘ì´ ì¼ì–´ë‚˜ê³  ì •ìž„ì—게는 ì–´ë–¤ ë°˜ì‘ì´ ì¼ì–´ë‚ ê¹Œ, 하고 ìƒê°í•˜ë©´ ìžëª» 마ìŒì´ 편하지 못하였다. +ì´íŠ¿ë‚  ì•„ì¹¨ì— ë‚˜ëŠ” 부산서 오는 차를 맞으려고 정거장ì—를 나갔다. +차는 ì œ ì‹œê°„ì— ë“¤ì–´ì™”ë‹¤. ë‚¨ì •ìž„ì€ ìŠˆíŠ¸ì¼€ì´ìŠ¤ 하나를 들고 ì°¨ì—ì„œ 내렸다. ê²€ì€ ì™¸íˆ¬ì— ê²€ì€ ëª¨ìžë¥¼ ì“´ ê·¸ì˜ ì–¼êµ´ì€ ë”ìš± 해쓱해 보였다. +"ì„ ìƒë‹˜!" +하고 ì •ìž„ì€ ë‚˜ë¥¼ ë³´ê³  ì†ì— ë“¤ì—ˆë˜ ì§ì„ ë•…ë°”ë‹¥ì— ë‚´ë ¤ë†“ê³ , ë‚´ 앞으로 왔다. +"í’ëž‘ì´ë‚˜ 없었나?" +하고 나는 ë‚´ ì†ì— 잡힌 ì •ìž„ì˜ ì†ì´ 싸늘한 ê²ƒì„ ê·¼ì‹¬í•˜ì˜€ë‹¤. +"네. 아주 잔잔했습니다. ì €ê°™ì´ ì•½í•œ ì‚¬ëžŒë„ ë°–ì— ë‚˜ì™€ì„œ 바다 경치를 구경하였습니다." +하고 ì •ìž„ì€ ì‚¬êµì ì¸ 웃ìŒì„ 웃었다. 그러나 ê·¸ì˜ ëˆˆì—는 ëˆˆë¬¼ì´ ìžˆëŠ” 것 같았다. +"최 ì„ ìƒë‹˜ ì–´ë”” 계신지 아세요?" +하고 ì •ìž„ì€ ë‚˜ë¥¼ ë”°ë¼ ì„œë©´ì„œ 물었다. +"ë‚˜ë„ ì§€ê¸ˆê¹Œì§€ 몰ëžëŠ”ë° ì–´ì œ 편지를 하나 받았지." +하는 ê²ƒì´ ë‚´ 대답ì´ì—ˆë‹¤. +"네? 편지 받으셨어요? ì–´ë”” 계십니까?" +하고 ì •ìž„ì€ ê±¸ìŒì„ 멈추었다. +"ë‚˜ë„ ëª°ë¼." +하고 ë‚˜ë„ ì •ìž„ê³¼ ê°™ì´ ê±¸ìŒì„ 멈추고, +"ê·¸ 편지를 ì“´ ê³³ë„ ì•Œê³  부친 ê³³ë„ ì•Œì§€ë§ˆëŠ” 지금 어디로 갔는지 ê·¸ê²ƒì€ ëª¨ë¥´ì§€. ì°¾ì„ ìƒê°ë„ ë§ê³  편지할 ìƒê°ë„ ë§ë¼ê³  했으니까." +하고 사실대로 대답하였다. +"어디야요? ê·¸ 편지 부치신 ê³³ì´ ì–´ë””ì•¼ìš”? ì € ì´ ì°¨ë¡œ ë”°ë¼ê°ˆ 테야요." +하고 ì •ìž„ì€ ì¡°ê¸‰í•˜ì˜€ë‹¤. +"ê°ˆ ë•Œì—는 ê°€ë”ë¼ë„ ì´ ì°¨ì—야 ê°ˆ 수가 있나." +하고 나는 겨우 ì •ìž„ì„ ëŒê³  들어왔다. +ì •ìž„ì„ ì§‘ìœ¼ë¡œ ë°ë¦¬ê³  와서 대강 ë§ì„ 하고, ì´íŠ¿ë‚  새벽 차로 떠난다는 것ì„, +"가만 있어. 어떻게 계íšì„ 세워 가지고 해야지." +하여 가까스로 붙들어 놓았다. +ì•„ì¹¨ì„ ë¨¹ê³  나서 ìµœì„ ì§‘ì—를 ê°€ 보려고 í•  즈ìŒì— 순임ì´ê°€ 와서 마루 ëì— ì„  채로, +"ì„ ìƒë‹˜, 어머니가 ìž ê¹ë§Œ 오십시사구요." +하였다. +"ì •ìž„ì´ê°€ 왔다." +하고 ë‚´ê°€ 그러니까, +"ì •ìž„ì´ê°€ìš”?" +하고 ìˆœìž„ì€ ê¹œì§ ë†€ë¼ë©´ì„œ, +"ì •ìž„ì´ëŠ” 아버지 계신 ë°ë¥¼ 알아요?" +하고 물었다. +"ì •ìž„ì´ë„ 모른단다. 너 아버지는 ì‹œë² ë¦¬ì•„ì— ê³„ì‹œê³  ì •ìž„ì´ëŠ” ë™ê²½ 있다가 ì™”ëŠ”ë° ì•Œ 리가 있니?" +하고 나는 ìˆœìž„ì˜ ìƒê°ì„ 깨뜨리려 하였다. 순임ì€, +"ì •ìž„ì´ê°€ ì–´ë”” 있어요?" +하고 방들 있는 ê³³ì„ ë‘˜ëŸ¬ë³´ë©°, +"언제 왔어요?" +하고는 그제야 ì •ìž„ì—게 대한 반가운 ì •ì´ ë°œí•˜ëŠ” 듯ì´, +"ì •ìž„ì•„!" +하고 불러 본다. +"언니요? 여기 있수." +하고 ì •ìž„ì´ê°€ 머릿방 ë¬¸ì„ ì—´ê³  ì˜·ì„ ê°ˆì•„ìž…ë˜ ì±„ë¡œ 고개를 내어민다. +ìˆœìž„ì€ êµ¬ë‘를 ì°¨ë‚´ë²„ë¦¬ë“¯ì´ ë²—ì–´ 놓고 ì •ìž„ì˜ ë°©ìœ¼ë¡œ 뛰어들어간다. +나는 최ì„ì˜ ì§‘ì—를 ê°€ëŠë¼ê³  외투를 ìž…ê³  모ìžë¥¼ ì“°ê³  ì •ìž„ì˜ ë°©ë¬¸ì„ ì—´ì–´ 보았다. ë‘ ì²˜ë…€ëŠ” 울고 있었다. +"ì •ìž„ì´ë„ 가지. 아주머니 뵈러 안 ê°€?" +하고 나는 ì •ìž„ì„ ìž¬ì´‰í•˜ì˜€ë‹¤. +"ì„ ìƒë‹˜ 먼저 ê°€ 계셔요." +하고 순임ì´ê°€ ëˆˆë¬¼ì„ ì”»ê³  ì¼ì–´ë‚˜ë©´ì„œ, +"ì´ë”°ê°€ 제가 ì •ìž„ì´í—ˆêµ¬ 갑니다." +하고 내게 ëˆˆì„ ë”ì©ê±°ë ¤ 보였다. ê°‘ìžê¸° ì •ìž„ì´ê°€ 가면 어머니와 ì •ìž„ì´ì™€ 사ì´ì— ì–´ë– í•œ íŒŒëž€ì´ ì¼ì–´ë‚˜ì§€ë‚˜ 아니할까 하고 순임ì´ê°€ 염려하는 것ì´ì—ˆë‹¤. ìˆœìž„ë„ ì¸ì œëŠ” 노성하여졌다고 나는 ìƒê°í•˜ì˜€ë‹¤. +"ì„ ìƒë‹˜ ì´ íŽ¸ì§€ê°€ 다 ì°¸ë§ì¼ê¹Œìš”?" +하고 나를 보는 길로 ìµœì„ ë¶€ì¸ì´ 물었다. ìµœì„ ë¶€ì¸ì€ 히스테리를 ì¼ìœ¼í‚¨ 사람 모양으로 머리와 ì†ì„ 떨었다. +나는 ì°¸ë§ì´ëƒ 하는 ê²ƒì´ ë¬´ì—‡ì„ ê°€ë¦¬í‚¤ëŠ” ë§ì¸ì§€ 분명하지 아니하여서, +"ë…¸ì„ì´ ê±°ì§“ë§í•  사람입니까?" +하고 대체론으로 대답하였다. +"앉으십쇼. 앉으시란 ë§ì”€ë„ 안 하고." +하고 부ì¸ì€ 침착한 ëª¨ì–‘ì„ ë³´ì´ë ¤ê³  빙그레 웃었으나, ê·¸ê²ƒì€ ì‹¤íŒ¨ì˜€ë‹¤. +"그게 ì°¸ë§ì¼ê¹Œìš”? ì •ìž„ì´ê°€ 아기를 ë—€ ê²ƒì´ ì•„ë‹ˆë¼, íê°€ 나빠서 피를 토하고 ìž…ì›í•˜ì˜€ë‹¤ëŠ” 것ì´?" +하고 부ì¸ì€ 중대하다는 í‘œì •ì„ ê°€ì§€ê³  묻는다. +"그럼 ê·¸ê²ƒì´ ì°¸ë§ì´ 아니구요. ì•„ì§ë„ 그런 ì˜ì‹¬ì„ 가지고 계십니까. ì •ìž„ì´ì™€ í•œ ë°©ì— ìžˆëŠ” í•™ìƒì´ 모함한 것ì´ë¼ê³  안 그랬어요? 그게 ë§ì´ ë©ë‹ˆê¹Œ." +하고 ì–¸ì„±ì„ ë†’ì—¬ì„œ 대답하였다. +"그럼 왜 ì •ìž„ì´ê°€ 호텔ì—ì„œ 왜 아버지한테 í•œ 번 안아 달ë¼ê³  그래요? ê·¸ íŽ¸ì§€ì— ì“´ 대로 í•œ 번 안아만 보았ì„까요?" +ì´ê²ƒì€ 부ì¸ì˜ 둘째 물ìŒì´ì—ˆë‹¤. +"나는 ê·¸ë¿ì´ë¼ê³  믿습니다. ê·¸ê²ƒì´ ë„리어 깨ë—하다는 í‘œë¼ê³  믿습니다. 안 그렇습니까?" +하고 나는 딱하다는 í‘œì •ì„ í•˜ì˜€ë‹¤. +"글쎄요." +하고 부ì¸ì€ 한참ì´ë‚˜ ìƒê°í•˜ê³  있다가, +"ì •ë§ ì•  아버지가 í˜¼ìž ë‹¬ì•„ë‚¬ì„까요? ì •ìž„ì´ë¥¼ ë°ë¦¬ê³  가케오치한 ê²ƒì´ ì•„ë‹ê¹Œìš”? ê¼­ ê·¸ëž¬ì„ ê²ƒë§Œ ê°™ì€ë°." +하고 부ì¸ì€ 괴로운 í‘œì •ì„ ê°ì¶”려는 ë“¯ì´ ê³ ê°œë¥¼ 숙ì¸ë‹¤. +나는 남편ì—게 대한 ì•„ë‚´ì˜ ì˜ì‹¬ì´ 어떻게 깊ì€ê°€ì— 아니 놀랄 수가 없어서, +"í—ˆ." +하고 í•œ 마디 웃고, +"그렇게 수십 ë…„ ë™ì•ˆ 부부 ìƒí™œì„ í•˜ì‹œê³ ë„ ê·¸ë ‡ê²Œ ë…¸ì„ì˜ ì¸ê²©ì„ ëª°ë¼ ì£¼ì‹­ë‹ˆê¹Œ. 나는 부ì¸ê»˜ì„œ 하시는 ë§ì”€ì´ 부러 하시는 ë†ë‹´ìœ¼ë¡œë°–ì— ì•„ë‹ˆ 들립니다. ì •ìž„ì´ê°€ 지금 서울 있습니다." +하고 ë˜ í•œ 번 웃었다. ì •ë§ ê¸°ë§‰ížŒ 웃ìŒì´ì—ˆë‹¤. +"ì •ìž„ì´ê°€ 서울 있어요?" +하고 부ì¸ì€ íŽ„ì© ë›°ë©´ì„œ, +"ì–´ë”” 있다가 언제 왔습니까? 그게 ì •ë§ìž…니까?" +하고 ì˜ì•„í•œ ë¹›ì„ ë³´ì¸ë‹¤. ê¼­ 최ì„ì´í•˜ê³  함께 ë‹¬ì•„ë‚¬ì„ ì •ìž„ì´ê°€ ì„œìš¸ì— ìžˆì„ ë¦¬ê°€ 없는 것ì´ì—ˆë‹¤. +"ë™ê²½ì„œ 오늘 ì•„ì¹¨ì— ì™”ìŠµë‹ˆë‹¤. 지금 우리 집ì—ì„œ 순임ì´í—ˆêµ¬ ì´ì•¼ê¸°ë¥¼ 하고 있으니까 조금 있으면 뵈오러 올 것입니다." +하고 나는 ì •ìž„ì´ê°€ 분명히 서울 있는 ê²ƒì„ ì¼ì¼ì´ ì¦ê±°ë¥¼ 들어서 ì¦ëª…하였다. 그리고 우스운 ê²ƒì„ ì†ìœ¼ë¡œ 참았다. 그러나 ë‹¤ìŒ ìˆœê°„ì—는 ì´ ë³‘ë“¤ê³  ëŠ™ì€ ì•„ë‚´ì˜ ì§ˆíˆ¬ì™€ ì˜ì‹¬ìœ¼ë¡œ 괴로워서 ëœëœëœëœ 떨고 앉았는 ê²ƒì„ ê°€ì—¾ê²Œ ìƒê°í•˜ì˜€ë‹¤. +ì •ìž„ì´ê°€ 지금 ì„œìš¸ì— ìžˆëŠ” ê²ƒì´ ë” ì˜ì‹¬í•  여지가 없는 ì‚¬ì‹¤ìž„ì´ íŒëª…ë˜ë§¤, 부ì¸ì€ ë„리어 ë‚™ë§í•˜ëŠ” 듯하였다. 그가 ì œ 마ìŒëŒ€ë¡œ 그려 놓고 믿고 í•˜ë˜ ëª¨ë“  ì² í•™ì˜ ê³„í†µì´ ë¬´ë„ˆì§„ 것ì´ì—ˆë‹¤. +한참ì´ë‚˜ í©ì–´ì§„ ì •ì‹ ì„ ëª» 수습하는 ë“¯ì´ ì•‰ì•„ 있ë”니 아주 기운 없는 ì–´ì¡°ë¡œ, +"ì„ ìƒë‹˜ ì•  아버지가 ì •ë§ ì£½ì„까요? ì •ë§ ì˜ì˜ 집ì—를 안 ëŒì•„올까요?" +하고 묻는다. ê·¸ 눈ì—는 ë²Œì¨ ëˆˆë¬¼ì´ ì–´ë¦¬ì—ˆë‹¤. +"글쎄요. ë‚´ ìƒê° 같아서는 다시는 ì§‘ì— ëŒì•„오지 아니할 것 같습니다. ë˜ ê·¸ë§Œì¹˜ ë§ì‹ ì„ 했으니, ì´ì œ 무슨 낯으로 ëŒì•„옵니까. ë‚´ë¼ë„ 다시 ì§‘ì— ëŒì•„올 ìƒê°ì€ 아니 내겠습니다." +하고 나는 ì˜ì‹ì ìœ¼ë¡œ ì•…ì˜ë¥¼ 가지고 부ì¸ì˜ ê°€ìŠ´ì— ì¹¼ì„ í•˜ë‚˜ 박았다. +ê·¸ ì¹¼ì€ ë¶„ëª…ížˆ 부ì¸ì˜ ê°€ìŠ´ì— ì•„í”„ê²Œ 박힌 모양ì´ì—ˆë‹¤. +"ì„ ìƒë‹˜. 어떡하면 좋습니까. ì•  아버지가 죽지 않게 í•´ 주세요. 그렇지 ì•Šì•„ë„ ìˆœìž„ì´ë…„ì´ ì œê°€ ê±” 아버지를 달아나게나 í•œ 것처럼 ì›ë§ì„ 하는ë°ìš”. 그러다가 ì •ë…• 죽으면 어떻게 합니까. ì œì¼ ë”´ ìžì‹ë“¤ì˜ ì›ë§ì„ 들ì„ê¹Œë´ ê²ì´ 납니다. ì„ ìƒë‹˜, 어떻게 ì•  아버지를 붙들어다 주세요." +하고 마침내 ì°¸ì„ ìˆ˜ ì—†ì´ ìš¸ì—ˆë‹¤. ë§ì€ ë¹„ë¡ ìžì‹ë“¤ì˜ ì›ë§ì´ ë‘렵다고 하지마는 ì§ˆíˆ¬ì˜ ê°ì •ì´ 스러질 ë•Œì— ê·¸ì—게는 남편ì—게 대한 ì•„ë‚´ì˜ ì• ì •ì´ ë§‰í˜”ë˜ ë¬¼ê³¼ ê°™ì´ í„°ì ¸ 나온 것ì´ë¼ê³  나는 í•´ì„하였다. +"글쎄, ì–´ë”” 있는 줄 알고 찾습니까. ë…¸ì„ì˜ ì„±ë¯¸ì— í•œë²ˆ 아니 한다고 했으면 다시 편지할 리는 만무하다고 믿습니다." +하여 나는 부ì¸ì˜ ê°€ìŠ´ì— ë‘˜ì§¸ ì¹¼ë‚ ì„ ë°•ì•˜ë‹¤. +나는 ë¹„ë¡ ìµœì„ì˜ ë¶€ì¸ì´ 청하지 아니하ë”ë¼ë„ 최ì„ì„ ì°¾ìœ¼ëŸ¬ 떠나지 아니하면 아니 ë  ì˜ë¬´ë¥¼ 진다. ì‚° 최ì„ì„ ëª» ì°¾ë”ë¼ë„ 최ì„ì˜ ì‹œì²´ë¼ë„, 무ë¤ì´ë¼ë„, ì£½ì€ ìžë¦¬ë¼ë„, 마지막 ìžˆë˜ ê³³ì´ë¼ë„ 찾아보지 아니하면 아니 ë  ì˜ë¬´ë¥¼ 깨닫는다. +그러나 ì‹œêµ­ì´ ë³€í•˜ì—¬ ê·¸ ë•Œì—는 ì•„ë¼ì‚¬ì— 가는 ê²ƒì€ ì—¬ê°„ 곤란한 ì¼ì´ 아니었다. ê·¸ ë•Œì—는 ë¶ë§Œì˜ í’ìš´ì´ ê¸‰ë°•í•˜ì—¬ 만주리를 통과하기는 ì‚¬ì‹¤ìƒ ë¶ˆê°€ëŠ¥ì— ê°€ê¹Œì› ë‹¤. 마ì ì‚°(馬å å±±) ì¼íŒŒì˜ 군대가 í¥ì•ˆë ¹, 하ì¼ë¼ë¥´ ë“±ì§€ì— ì›…ê±°í•˜ì—¬ 언제 대충ëŒì´ í­ë°œë ëŠ”지 ëª¨ë¥´ë˜ ë•Œì˜€ë‹¤. ì´ ë•Œë¬¸ì— ì‹œë² ë¦¬ì•„ì— ë“¤ì–´ê°€ê¸°ëŠ” ê±°ì˜ ì ˆë§ ìƒíƒœë¼ê³  하겠고, ë˜ ê´€í—Œë„ ì•„ë¼ì‚¬ì— 들어가는 ì—¬í–‰ê¶Œì„ ìž˜ êµë¶€í•  것 같지 아니하였다. +부ì¸ì€ 울고, 나는 ì´ëŸ° ìƒê° 저런 ìƒê° 하고 있는 ë™ì•ˆì— 문 ë°–ì—는 순임ì´, ì •ìž„ì´ê°€ 들어오는 소리가 들렸다. +"ì•„ì´, ì •ìž„ì´ëƒ." +하고 부ì¸ì€ 반갑게 허리 굽혀 ì¸ì‚¬í•˜ëŠ” ì •ìž„ì˜ ì–´ê¹¨ì— ì†ì„ 대고, +"ìž ì•‰ì•„ë¼. 그래 ì¸ì œ ë³‘ì´ ì¢€ 나으ëƒâ€¦â€¦ 수척했구나. ë” ë…¸ì„±í•´ì§€êµ¬ ë°˜ ë…„ë„ ëª» ë˜ì—ˆëŠ”ë°." +하고 ì •ìž„ì—게 대하여 ì• ì •ì„ í‘œí•˜ëŠ” ê²ƒì„ ë³´ê³  나는 ì˜ì™¸ì§€ë§ˆëŠ” 다행으로 ìƒê°í•˜ì˜€ë‹¤. 나는 ì •ìž„ì´ê°€ 오면 보기 ì‹«ì€ í•œ ì‹ ì„ ì—°ì¶œí•˜ì§€ 않나 하고 ê·¼ì‹¬í•˜ì˜€ë˜ ê²ƒì´ë‹¤. +"í¬ ìž˜ ìžë¼ìš”?" +하고 ì •ìž„ì€ í•œì°¸ì´ë‚˜ 있다가 비로소 ìž…ì„ ì—´ì—ˆë‹¤. +"ì‘, 잘 있단다. 컸나 ê°€ ë³´ì•„ë¼." +하고 부ì¸ì€ ë”ìš± 반가운 í‘œì •ì„ ë³´ì¸ë‹¤. +"ì–´ëŠ ë°©ì´ì•¼?" +하고 ì •ìž„ì€ ì„ ë¬¼ ë³´í‰ì´ë¥¼ 들고 순임과 함께 나가 버린다. ì—¬ìžì¸ ì •ìž„ì€ í¬ì™€ 순임과 부ì¸ê³¼ ë˜ ìˆœìž„ì˜ ë‹¤ë¥¸ ë™ìƒì—게 선물 사 오는 ê²ƒì„ ìžŠì–´ë²„ë¦¬ì§€ 아니하였다. +ì •ìž„ê³¼ ìˆœìž„ì€ í•œ ì´ì‚¼ 분 있다가 ëŒì•„왔다. ë°–ì—ì„œ í¬ê°€ 무엇ì´ë¼ê³  지절대는 소리가 들린다. 아마 ì •ìž„ì´ê°€ 사다 준 ì„ ë¬¼ì„ ë°›ê³  좋아하는 모양ì´ë‹¤. +ì •ìž„ì€ ë“¤ê³  온 ë³´í‰ì´ì—ì„œ ì—¬ìžìš© 배스로브 하나를 ë‚´ì–´ì„œ 부ì¸ì—게주며, +"맞으실까?" +하였다. +"ì•„ì´ ê·¸ê±´ 무어ë¼ê³  사 왔니?" +하고 부ì¸ì€ 좋아ë¼ê³  ìž…ì–´ ë³´ê³ , ì´ë¦¬ ë³´ê³  저리 ë³´ê³  하면서, +"ë‚œ ì´ëŸ° ê±° ì²˜ìŒ ìž…ì–´ 본다." +하고 ìžê¾¸ ëˆì„ ë™ì—¬ë§¨ë‹¤. +"ì •ìž„ì´ê°€ ë‚œ 파ìžë§ˆë¥¼ 사다 주었어." +하고 ìˆœìž„ì€ ë”°ë¡œ ìŒŒë˜ êµµì€ ì¤„ 있는 융 파ìžë§ˆë¥¼ ë‚´ì–´ì„œ 경매장 사람 모양으로 í”들어 ë³´ì´ë©°, +"어머니 ê·¸ 배스로브 나 주우. 어머닌 늙ì€ì´ê°€ 그건 ìž…ì–´ì„œ 무엇 하우?" +하고 부ì¸ì´ ìž…ì€ ë°°ìŠ¤ë¡œë¸Œë¥¼ 벗겨서 제가 ìž…ê³  ë‘ í˜¸ì£¼ë¨¸ë‹ˆì— ì†ì„ 넣고 어기죽어기죽하고 서양 부ì¸ë„¤ í‰ë‚´ë¥¼ 낸다. +"저런 ë§ê´„량ì´ê°€ ë„ˆë„ ì •ìž„ì´ì²˜ëŸ¼ 좀 얌전해 ë³´ì•„ë¼." +하고 부ì¸ì€ ìˆœìž„ì„ í–¥í•˜ì—¬ ëˆˆì„ í˜ê¸´ë‹¤. +ì´ ëª¨ì–‘ìœ¼ë¡œ 부ì¸ê³¼ ì •ìž„ê³¼ì˜ ëŒ€ë©´ì€ ê°€ìž¥ ì›ë§Œí•˜ê²Œ ë˜ì—ˆë‹¤. +그러나 부ì¸ì€ ì •ìž„ì—게 최ì„ì˜ íŽ¸ì§€ë¥¼ ë³´ì´ê¸°ë¥¼ ì›ì¹˜ 아니하였다. 편지가 왔다는 ë§ì¡°ì°¨ ìž… ë°–ì— ë‚´ì§€ 아니하였다. 그러나 순임ì´ê°€ ì •ìž„ì—게 대하여 표하는 ì• ì •ì€ ì—¬ê°„ 깊지 아니하였다. ê·¸ ë‘˜ì€ í•˜ë£¨ ì¢…ì¼ ê°™ì´ ìžˆì—ˆë‹¤. ì •ìž„ì€ ê·¸ ë‚  ì €ë…ì— ë‚˜ë¥¼ ë³´ê³ , +"순임ì´í—Œí…Œ 최 ì„ ìƒë‹˜ 편지 ì‚¬ì—°ì€ ë‹¤ 들었어요. 순임ì´ê°€ ê·¸ 편지를 í›”ì³ë‹¤ê°€ 얼른얼른 몇 êµ°ë° ì½ì–´ë„ 보았습니다. 순임ì´ê°€ 저를 í½ ë™ì •í•˜ë©´ì„œ ì ˆë”러 최 ì„ ìƒì„ ë”°ë¼ê°€ ë³´ë¼ê³  그래요. í˜¼ìž ê°€ê¸°ê°€ 어려우면 ìžê¸°í—ˆêµ¬ ê°™ì´ ê°€ìžê³ . 가서 최 ì„ ìƒì„ ë°ë¦¬ê³  오ìžê³ . 어머니가 못 가게 하거든 몰래 ë‘˜ì´ ë„ë§í•´ ê°€ìžê³ . 그래서 그러ìžê³  그랬습니다. 안ë지요. ì„ ìƒë‹˜?" +하고 ì €í¬ë¼ë¦¬ ìž‘ì •ì€ ë‹¤ í•´ 놓고는 ìŠ¬ì© ë‚´ ì˜í–¥ì„ 물었다. +"ì Šì€ ì—¬ìž ë‹¨ë‘˜ì´ì„œ 먼 ì—¬í–‰ì„ ì–´ë–»ê²Œ 한단 ë§ì´ëƒ? 게다가 지금 ë¶ë§Œì£¼ 형세가 대단히 위급한 모양ì¸ë°. ë˜ ì •ìž„ì´ëŠ” ê·¸ ê±´ê°• 가지고 어디를 ê°€, ì´ ì¶”ìš´ 겨울ì—?" +하고 나는 ì´ëŸ° ë§ì´ 다 쓸ë°ì—†ëŠ” ë§ì¸ 줄 ì•Œë©´ì„œë„ ì–´ë¥¸ìœ¼ë¡œì„œ í•œ 마디 안 í•  수 없어서 하였다. ì •ìž„ì€ ë” ì œ ëœ»ì„ ì£¼ìž¥í•˜ì§€ë„ ì•„ë‹ˆí•˜ì˜€ë‹¤. +ê·¸ ë‚  ì €ë…ì— ì •ìž„ì€ ìˆœìž„ì˜ ì§‘ì—ì„œ 잤는지 ì§‘ì— ì˜¤ì§€ë¥¼ 아니하였다. +나는 ì´ ì¼ì„ 어찌하면 좋ì€ê°€, ì´ ë‘ ì—¬ìžì˜ í–‰ë™ì„ 어찌하면 좋ì€ê°€ 하고 í˜¼ìž ë™ë™ ìƒê°í•˜ê³  있었다. +ì´íŠ¿ë‚  나는 ê¶ê¸ˆí•´ì„œ 최ì„ì˜ ì§‘ì—를 ê°”ë”니 부ì¸ì´, +"우리 ìˆœìž„ì´ ëŒì— 갔어요?" +하고 ì˜ì™¸ì˜ ì§ˆë¬¸ì„ í•˜ì˜€ë‹¤. +"아니오." +하고 나는 놀ëžë‹¤. +"그럼, ì´ê²ƒë“¤ì´ 어딜 갔어요? ë‚œ ì •ìž„ì´í—ˆêµ¬ ëŒì—ì„œ ìž” 줄만 알았는ë°." +하고 부ì¸ì€ 무슨 불길한 것ì´ë‚˜ 본 ë“¯ì´ ëª¸ì„ ë–¤ë‹¤. 히스테리가 ì¼ì–´ë‚œ 것ì´ì—ˆë‹¤. +나는 ìž…ë§›ì„ ë‹¤ì‹œì—ˆë‹¤. 분명히 ì´ ë‘ ì—¬ìžê°€ 시베리아를 향하고 떠났구나 하였다. +ê·¸ ë‚ ì€ ì†Œì‹ì´ ì—†ì´ ì§€ë‚¬ë‹¤. ê·¸ ì´íŠ¿ë‚ ë„ 소ì‹ì´ ì—†ì´ ì§€ë‚¬ë‹¤. +ìµœì„ ë¶€ì¸ì€ 딸까지 잃어버리고 미친 ë“¯ì´ ìš¸ê³  애통하다가 머리를 싸매고 누워 버리고 ë§ì•˜ë‹¤. +ì •ìž„ì´ì™€ 순임ì´ê°€ 없어진 지 ì‚¬í˜ ë§Œì— ì•„ì¹¨ ìš°íŽ¸ì— íŽ¸ì§€ í•œ ìž¥ì„ ë°›ì•˜ë‹¤. ê·¸ 봉투는 봉천 ì•¼ë§ˆë„ í˜¸í…” 것ì´ì—ˆë‹¤. ê·¸ ì†ì—는 편지 ë‘ ìž¥ì´ ë“¤ì–´ 있었다. í•œ ìž¥ì€ , +ì„ ìƒë‹˜! 저는 아버지를 위하여, ì •ìž„ì„ ìœ„í•˜ì—¬ ì •ìž„ê³¼ ê°™ì´ ì§‘ì„ ë– ë‚¬ìŠµë‹ˆë‹¤. +어머님께서 슬í¼í•˜ì‹¤ ì¤„ì€ ì•Œì§€ë§ˆëŠ” ì €í¬ë“¤ì´ 다행히 아버지를 찾아서 모시고 오면 ì–´ë¨¸ë‹ˆê»˜ì„œë„ ê¸°ë»í•˜ì‹¤ ê²ƒì„ ë¯¿ìŠµë‹ˆë‹¤. ì €í¬ë“¤ì´ 가지 아니하고는 아버지는 ì‚´ì•„ì„œ ëŒì•„오실 것 같지 아니합니다. 아버지를 ì´ì²˜ëŸ¼ 불행하시게 í•œ 죄는 ì ˆë°˜ì€ ì–´ë¨¸ë‹ˆê»˜ 있고, ì ˆë°˜ì€ ì œê²Œ 있습니다. 저는 아버지 ì¼ì„ ìƒê°í•˜ë©´ ê°€ìŠ´ì´ ë¯¸ì–´ì§€ê³  ì´ê°€ 갈립니다. 저는 아무리 í•´ì„œë¼ë„ 아버지를 찾아내어야겠습니다. +저는 ì •ìž„ì„ ë¬´í•œížˆ ë™ì •í•©ë‹ˆë‹¤. 저는 어려서 ì •ìž„ì„ ë¯¸ì›Œí•˜ê³  아버지를 미워하였지마는 ì§€ê¸ˆì€ ì•„ë²„ì§€ì˜ ë§ˆìŒê³¼ ì •ìž„ì˜ ë§ˆìŒì„ 알아볼 만치 ìžëžìŠµë‹ˆë‹¤. +ì„ ìƒë‹˜! ì €í¬ë“¤ì€ ë‘˜ì´ ì†ì„ ìž¡ê³  어디를 가서든지 아버지를 찾아내겠습니다. í•˜ë‚˜ë‹˜ì˜ ì‚¬ìžê°€ ë‚®ì—는 êµ¬ë¦„ì´ ë˜ê³  ë°¤ì—는 ë³„ì´ ë˜ì–´ì„œ 반드시 ì €í¬ë“¤ì˜ ì•žê¸¸ì„ ì¸ë„í•  줄 믿습니다. +ì„ ìƒë‹˜, ì €í¬ ì–´ë¦°ê²ƒë“¤ì˜ ëœ»ì„ ë¶ˆìŒížˆ 여기셔서 ëˆ ì²œ ì›ë§Œ ì „ë³´ë¡œ ë³´ë‚´ 주시기를 ë°”ëžë‹ˆë‹¤. +ë§Œì¼ ë§Œì£¼ë¦¬ë¡œ 가는 ê¸¸ì´ ëŠì–´ì§€ë©´ 몽고로 ìžë™ì°¨ë¡œë¼ë„ 가려고 합니다. 아버지 íŽ¸ì§€ì— ì ížŒ Fì—­ì˜ R씨를 찾고, 그리고 ë°”ì´ì¹¼ í˜¸ë°˜ì˜ ë°”ì´ì¹¼ë¦¬ìŠ¤ì½”ì—를 찾아, ì´ ëª¨ì–‘ìœ¼ë¡œ 찾으면 반드시 아버지를 찾아 내고야 ë§ ê²ƒì„ ë¯¿ìŠµë‹ˆë‹¤. +ì„ ìƒë‹˜, ëˆ ì²œ ì›ë§Œ 봉천 ì•¼ë§ˆë„ í˜¸í…” 최순임 ì´ë¦„으로 ë¶€ì³ ì£¼ì„¸ìš”. 그리고 어머니헌테는 ì•„ì§ ë§ì”€ ë§ì•„ 주세요. +ì„ ìƒë‹˜. ì´ë ‡ê²Œ 걱정하시게 í•´ì„œ 미안합니다. 용서하세요. +순임 ìƒì„œ +ì´ë ‡ê²Œ ì¨ ìžˆë‹¤. ë˜ í•œ 장ì—는, +ì„ ìƒë‹˜! 저는 마침내 ëŒì•„오지 못할 ê¸¸ì„ ë– ë‚˜ë‚˜ì´ë‹¤. 어디든지 최 ì„ ìƒë‹˜ì„ 뵈옵는 ê³³ì—ì„œ ì´ ëª¸ì„ ë¬»ì–´ 버리려 하나ì´ë‹¤. 지금 ë˜ ëª¸ì— ì—´ì´ ë‚˜ëŠ” 모양ì´ìš”, í˜ˆë‹´ë„ ë³´ì´ì˜¤ë‚˜ 최 ì„ ìƒì„ 뵈올 때까지는 아무리 하여서ë¼ë„ ì´ ëª©ìˆ¨ì„ ë¶€ì§€í•˜ë ¤ 하오며, 최 ì„ ìƒì„ 뵈옵고 제가 진 ì€í˜œë¥¼ ê°ì‚¬í•˜ëŠ” í•œ ë§ì”€ë§Œ 사뢰면 고대 ì£½ì‚¬ì™€ë„ ì—¬í•œì´ ì—†ì„까 하나ì´ë‹¤. +순임 언니가 제게 주시는 사랑과 ë™ì •ì€ ì˜¤ì§ ëˆˆë¬¼ê³¼ ê°ê²©ë°–ì— ë” í‘œí•  ë§ì”€ì´ 없나ì´ë‹¤. 순임 언니가 저를 보호하여 주니 마ìŒì´ 든든하여ì´ë‹¤â€¦â€¦. +ì´ë¼ê³  하였다. +편지를 보아야 별로 놀랄 ê²ƒì€ ì—†ì—ˆë‹¤. 다만 ë§ê´„량ì´ë¡œë§Œ ì•Œì•˜ë˜ ìˆœìž„ì˜ ì†ì— ì–´ëŠìƒˆì— 그러한 ê°ì •ì´ 발달하였나 하는 ê²ƒì„ ë†€ëž„ ë¿ì´ì—ˆë‹¤. +그러나 ê±±ì •ì€ ì´ê²ƒì´ë‹¤. 순임ì´ë‚˜ ì •ìž„ì´ë‚˜ 다 ë‚´ê°€ ê°ë…해야 í•  ì²˜ì§€ì— ìžˆê±°ëŠ˜ ê·¸ë“¤ì´ ë§Œë¦¬ 긴 ì—¬í–‰ì„ ë– ë‚œë‹¤ê³  하니 ê°ë…ìžì¸ ë‚´ 태ë„를 어떻게 할까 하는 것ì´ë‹¤. +나는 편지를 받는 길로 ìš°ì„  ëˆ ì²œ ì›ì„ ì€í–‰ì— 가서 찾아다 놓았다. +ì•”ë§Œí•´ë„ ë‚´ê°€ ì„œìš¸ì— ê°€ë§Œížˆ 앉아서 ë‘ ì•„ì´ì—게 ëˆë§Œ ë¶€ì³ ì£¼ëŠ” ê²ƒì´ ì¸ì •ì— 어그러지는 것 같아서 나는 여러 가지로 ì£¼ì„ ì„ í•˜ì—¬ì„œ ì—¬í–‰ì˜ ì–‘í•´ë¥¼ 얻어 가지고 ë´‰ì²œì„ í–¥í•˜ì—¬ 떠났다. +ë‚´ê°€ ë´‰ì²œì— ë„ì°©í•œ ê²ƒì€ ë°¤ 열시가 지나서였다. 순임과 ì •ìž„ì€ ìžë¦¬ì˜· 바람으로 ë‚´ 방으로 달려와서 반가워하였다. ê·¸ë“¤ì´ ë°˜ê°€ì›Œí•˜ëŠ” ì–‘ì€ ì‹¤ë¡œ ëˆˆë¬¼ì´ í를 만하였다. +"ì•„ì´êµ¬ ì„ ìƒë‹˜!" +"ì•„ì´êµ¬ 어쩌면!" +하는 ê²ƒì´ ê·¸ë“¤ì˜ ë‚´ê²Œ 대한 ì¸ì‚¬ì˜ 전부였다. +"ì •ìž„ì´ ì–´ë– ì˜¤?" +하고 나는 ìˆœìž„ì˜ íŽ¸ì§€ì— ì •ìž„ì´ê°€ ì—´ì´ ìžˆë‹¨ ë§ì„ ìƒê°í•˜ì˜€ë‹¤. +"무어요. 괜찮습니다." +하고 ì •ìž„ì€ ì›ƒì—ˆë‹¤. +ì „ë“±ë¹›ì— ë³´ì´ëŠ” ì •ìž„ì˜ ì–¼êµ´ì€ ê·¸ì•¼ë§ë¡œ 대리ì„으로 ê¹Žì€ ë“¯í•˜ì˜€ë‹¤. 여위고 í•ê¸°ê°€ 없는 ê²ƒì´ ë”ìš± ì •ìž„ì˜ ìš©ëª¨ì— ì—„ìˆ™í•œ ë§›ì„ ì£¼ì—ˆë‹¤. +"ëˆ ê°€ì ¸ì˜¤ì…¨ì–´ìš”?" +하고 순임ì´ê°€ 어리광 절반으로 묻다가 ë‚´ê°€ 웃고 ëŒ€ë‹µì´ ì—†ìŒì„ ë³´ê³ , +"우리를 붙들러 오셨어요?" +하고 성내는 ì–‘ì„ ë³´ì¸ë‹¤. +"그래 둘ì´ì„œë“¤ 간다니 어떻게 간단 ë§ì¸ê°€. 시베리아가 ì–´ë–¤ ê³³ì— ë¶™ì—ˆëŠ”ì§€ ì•Œì§€ë„ ëª»í•˜ë©´ì„œ." +하고 나는 ë‘ ì‚¬ëžŒì´ ê·¸ë¦¬ 슬í¼í•˜ì§€ 아니하는 ìˆœê°„ì„ ë³´ëŠ” ê²ƒì´ ë‹¤í–‰í•˜ì—¬ì„œ ë†ë‹´ì‚¼ì•„ 물었다. +"왜 몰ë¼ìš”? 시베리아가 저기 아니야요?" +하고 순임ì´ê°€ ì‚°í•´ê´€ ìª½ì„ ê°€ë¦¬í‚¤ë©°, +"ìš°ë¦¬ë„ ì§€ë¦¬ì—ì„œ 배워서 다 알아요. 어저께 하루 ì¢…ì¼ ì§€ë„를 사다 놓고 연구를 하였답니다. 봉천서 ì‹ ê²½, 신경서 하얼빈, 하얼빈ì—ì„œ 만주리, 만주리ì—ì„œ ì´ë¥´ì¿ ì¸ í¬, 보세요, 잘 알지 않습니까. ë˜ ë§Œì¼ ì¤‘ë™ ì² ë„ê°€ 불통ì´ë©´ 어떻게 가는고 하니 여기서 ì‚°í•´ê´€ì„ ê°€ê³ , 산해관서 ë¶ê²½ì„ 가지요. 그리고는 ë¶ê²½ì„œ 장가구를 가지 않습니까. 장가구서 ìžë™ì°¨ë¥¼ 타고 몽고를 통과해서 가거든요. 잘 알지 않습니까." +하고 ì •ìž„ì˜ í—ˆë¦¬ë¥¼ 안으며, +"그렇지ì´?" +하고 ìžì‹  있는 ë“¯ì´ ì›ƒëŠ”ë‹¤. +"ë˜ ëª½ê³ ë¡œë„ ëª» 가게 ë˜ì–´ì„œ 구ë¼íŒŒë¥¼ ëŒê²Œ ë˜ë©´?" +하고 나는 êµì‚¬ê°€ ìƒë„ì—게 묻는 모양으로 물었다. +"네, ì € ì¸ë„양으로 í•´ì„œ 지중해로 í•´ì„œ 프랑스로 í•´ì„œ 그렇게 가지요." +"í—ˆ, 잘 아는구나." +하고 나는 웃었다. +"그렇게만 알아요? ë˜ í•´ì‚¼ìœ„ë¡œ í•´ì„œ 가는 ê¸¸ë„ ì•Œì•„ìš”. ì €í¬ë¥¼ 어린애로 아시네." +"잘못했소." +"하하." +"후후." +사실 ê·¸ë“¤ì€ ë²Œì¨ ì–´ë¦°ì• ë“¤ì€ ì•„ë‹ˆì—ˆë‹¤. ìˆœìž„ë„ ë²Œì¨ ê·¸ ì•„ë²„ì§€ì˜ ë§í•  수 없는 ì‚¬ì •ì— ë™ì •í•  나ì´ê°€ ë˜ì—ˆë‹¤. 순임ì´ê°€ 기어다닌 ê²ƒì€ ë³¸ 나로는 ì´ê²ƒë„ ì´ìƒí•˜ê²Œ 보였다. 나는 ë²Œì¨ ë‚˜ì´ ë§Žì•˜êµ¬ë‚˜ 하는 ìƒê°ì´ 나지 아니할 수 없었다. +나는 ìž  안 드는 í•˜ë£»ë°¤ì„ ì§€ë‚´ë©´ì„œ 옆방ì—ì„œ ì •ìž„ì´ê°€ ê¸°ì¹¨ì„ ì§“ëŠ” 소리를 들었다. ê·¸ 소리는 ë‚´ ê°€ìŠ´ì„ ì•„í”„ê²Œ 하였다. +ì´íŠ¿ë‚  나는 ë‘ ì‚¬ëžŒì—게 ëˆ ì²œ ì›ì„ 주어서 ì‹ ê²½ 가는 급행차를 태워 주었다. ëŒ€ë¥™ì˜ ì´ ê±´ì¡°í•˜ê³  추운 ê¸°í›„ì— ì •ìž„ì˜ ë³‘ë“  íê°€ 견디어 날까 하고 마ìŒì´ 놓ì´ì§€ 아니하였다. 그러나 나는 ê·¸ë“¤ì„ ê°€ë¼ê³  권할 수는 ìžˆì–´ë„ ê°€ì§€ ë§ë¼ê³  붙들 수는 없었다. 다만 ì œ 아버지, ì œ ì• ì¸ì„ 죽기 ì „ì— ë§Œë‚  수 있기만 빌 ë¿ì´ì—ˆë‹¤. +나는 ë‘ ì•„ì´ë¥¼ ë¶ìª½ìœ¼ë¡œ 떠나 ë³´ë‚´ê³  í˜¼ìž ì—¬ê´€ì— ë“¤ì–´ì™€ì„œ ë„무지 ì •ì‹ ì„ ì§„ì •í•˜ì§€ 못하여 ìˆ ì„ ë¨¹ê³  잊으려 하였다. 그러다가 ê·¸ ë‚  밤차로 서울로 ëŒì•„왔다. +ì´íŠ¿ë‚  ì•„ì¹¨ì— ë‚˜ëŠ” ìµœì„ ë¶€ì¸ì„ 찾아서 순임과 ì •ìž„ì´ê°€ 시베리아로 갔단 ë§ì„ 전하였다. +ê·¸ ë•Œì— ìµœ 부ì¸ì€ ê±°ì˜ ì•„ë¬´ ì •ì‹ ì´ ì—†ëŠ” 듯하였다. 아무 ë§ë„ 하지 아니하고 울고만 있었다. +얼마 있다가 부ì¸ì€, +"ê·¸ê²ƒë“¤ì´ ì €í¬ë“¤ë¼ë¦¬ 가서 괜찮ì„까요?" +하는 í•œ 마디를 í•  ë¿ì´ì—ˆë‹¤. +ë©°ì¹  í›„ì— ìˆœìž„ì—게서 편지가 왔다. ê·¸ê²ƒì€ í•˜ì–¼ë¹ˆì—ì„œ 부친 것ì´ì—ˆë‹¤. +í•˜ì–¼ë¹ˆì„ ì˜¤ëŠ˜ 떠납니다. í•˜ì–¼ë¹ˆì— ì™€ì„œ 아버지 친구 ë˜ì‹œëŠ” Rì†Œìž¥ì„ ë§Œë‚˜ëµˆì˜µê³  아버지 ì¼ì„ 물어 보았습니다. 그리고 ì €í¬ ë‘˜ì´ì„œ 찾아 떠났다는 ë§ì”€ì„ 하였ë”니 Rì†Œìž¥ì´ ëŒ€ë‹¨ížˆ ë™ì •í•˜ì—¬ì„œ ì—¬í–‰ê¶Œë„ ì¤€ë¹„í•´ 주시기로 ì €í¬ëŠ” 아버지를 찾아서 오늘 오후 모스í¬ë°” 가는 급행으로 떠납니다. 가다가 Fì—­ì— ë‚´ë¦¬ê¸°ëŠ” 어려울 듯합니다. ì •ìž„ì˜ ê±´ê°•ì´ ëŒ€ë‹¨ížˆ 좋지 못합니다. ì¼ê¸°ê°€ ê°‘ìžê¸° 추워지는 관계ì¸ì§€ ì •ìž„ì˜ ì‹ ì—´ì´ ì˜¤í›„ë©´ 삼십팔 ë„를 넘고 ê¸°ì¹¨ë„ ëŒ€ë‹¨í•©ë‹ˆë‹¤. 저는 염려가 ë˜ì–´ì„œ ì •ìž„ë”러 하얼빈ì—ì„œ ìž…ì›í•˜ì—¬ 조리를 하ë¼ê³  권하였지마는 ë„무지 듣지를 아니합니다. 어디까지든지 가는 대로 가다가 ë” ëª» 가게 ë˜ë©´ ê·¸ ê³³ì—ì„œ 죽는다고 합니다. +저는 ê·¸ ë™ì•ˆ ë©°ì¹  ì •ìž„ê³¼ ê°™ì´ ìžˆëŠ” ì¤‘ì— ì •ìž„ì´ê°€ 어떻게 아름답고 높고 굳세게 깨ë—í•œ ì—¬ìžì¸ ê²ƒì„ ë°œê²¬í•˜ì˜€ìŠµë‹ˆë‹¤. 저는 지금까지 ì •ìž„ì„ ëª°ë¼ë³¸ ê²ƒì„ ë¶€ë„럽게 ìƒê°í•©ë‹ˆë‹¤. 그리고 ë˜ ì œ 아버지께서 어떻게 갸륵한 어른ì´ì‹  ê²ƒì„ ì¸ì œì•¼ 깨달았습니다. ìžì‹ ëœ ì €ê¹Œì§€ë„ ì•„ë²„ì§€ì™€ ì •ìž„ê³¼ì˜ ê´€ê³„ë¥¼ ì˜ì‹¬í•˜ì˜€ìŠµë‹ˆë‹¤. ì˜ì‹¬í•˜ëŠ” 것보다는 세ìƒì—ì„œ ë§í•˜ëŠ” 대로 믿고 있었습니다. 그러나 ì •ìž„ì„ ë§Œë‚˜ ë³´ê³  ì •ìž„ì˜ ë§ì„ 듣고 아버지께서 ì„ ìƒë‹˜ê»˜ 드린 편지가 ëª¨ë‘ ì°¸ì¸ ê²ƒì„ ê¹¨ë‹¬ì•˜ìŠµë‹ˆë‹¤. 아버지께서는 ì¹œêµ¬ì˜ ì˜ì§€ 없는 ë”¸ì¸ ì •ìž„ì„ ë‹¹ì‹ ì˜ ì¹œí˜ˆìœ¡ì¸ ì €ì™€ ê¼­ ê°™ì´ ì‚¬ëž‘í•˜ë ¤ê³  하신 것ì´ì—ˆìŠµë‹ˆë‹¤. ê·¸ê²ƒì´ ì–¼ë§ˆë‚˜ 갸륵한 ì¼ìž…니까. ê·¸ëŸ°ë° ì œ 어머니와 저는 ê·¸ 갸륵하신 ì •ì‹ ì„ ëª°ë¼ë³´ê³  오해하였습니다. 어머니는 질투하시고 저는 시기하였습니다. ì´ê²ƒì´ 얼마나 아버지를 그렇게 갸륵하신 아버지를 몰ë¼ëµˆì˜¨ 것입니다. ì´ê²ƒì´ 얼마나 부ë„럽고 ì›í†µí•œ ì¼ìž…니까. +ì„ ìƒë‹˜ê»˜ì„œë„ 여러 번 ì•„ë²„ì§€ì˜ ì¸ê²©ì´ 높다는 ê²ƒì„ ì €í¬ ëª¨ë…€ì—게 설명해 주셨습니다마는 마ìŒì´ 막힌 저는 ì„ ìƒë‹˜ì˜ ë§ì”€ë„ 믿지 아니하였습니다. +ì„ ìƒë‹˜, ì •ìž„ì€ ì°¸ìœ¼ë¡œ 아버지를 사랑합니다. ì •ìž„ì—게는 ì´ ì„¸ìƒì— 아버지밖ì—는 사랑하는 ì•„ë¬´ê²ƒë„ ì—†ì´, 그렇게 외â—으로, 그렇게 열렬하게 아버지를 사모하고 사랑합니다. 저는 잘 압니다. ì •ìž„ì´ê°€ 처ìŒì—는 아버지로 ì‚¬ëž‘í•˜ì˜€ë˜ ê²ƒì„, 그러나 ì–´ëŠ ìƒˆì— ì •ìž„ì˜ ì•„ë²„ì§€ì—게 대한 ì‚¬ëž‘ì´ ë¬´ì—‡ì¸ì§€ 모를 사랑으로 변한 것ì„, ê·¸ê²ƒì´ ì—°ì• ëƒ í•˜ê³  물으면 ì •ìž„ì€ ì•„ë‹ˆë¼ê³  í•  것입니다. ì •ìž„ì˜ ê·¸ ëŒ€ë‹µì€ ê²°ì½” ê±°ì§“ì´ ì•„ë‹™ë‹ˆë‹¤. ì •ìž„ì€ ìˆ™ì„±í•˜ì§€ë§ˆëŠ” ì•„ì§ë„ 극히 순결합니다. ì •ìž„ì€ ë¶€ëª¨ë¥¼ ìžƒì€ í›„ì— ì•„ë²„ì§€ë°–ì— ì‚¬ëž‘í•œ ì‚¬ëžŒì´ ì—†ìŠµë‹ˆë‹¤. ë˜ ì•„ë²„ì§€ì—ê²Œë°–ì— ì‚¬ëž‘ë°›ë˜ ì¼ë„ 없습니다. ê·¸ëŸ¬ë‹ˆê¹ ì •ìž„ì€ ì•„ë²„ì§€ë¥¼ 그저 사랑합니다 ì „ì ìœ¼ë¡œ 사랑합니다. ì„ ìƒë‹˜, ì •ìž„ì˜ ì‚¬ëž‘ì—는 ì•„ë²„ì§€ì— ëŒ€í•œ ìžì‹ì˜ 사랑, 오ë¼ë¹„ì— ëŒ€í•œ 누ì´ì˜ 사랑, 사내 ì¹œêµ¬ì— ëŒ€í•œ ì—¬ìž ì¹œêµ¬ì˜ ì‚¬ëž‘, ì• ì¸ì— 대한 ì• ì¸ì˜ 사랑, ì´ ë°–ì— ì¡´ê²½í•˜ê³  숭배하는 ì„ ìƒì— 대한 ì œìžì˜ 사랑까지, ì‚¬ëž‘ì˜ ëª¨ë“  종류가 í¬í•¨ë˜ì–´ 있는 ê²ƒì„ ì €ëŠ” 발견하였습니다. +ì„ ìƒë‹˜, ì •ìž„ì˜ ì •ìƒì€ 차마 ë³¼ 수가 없습니다. ì•„ë²„ì§€ì˜ ì•ˆë¶€ë¥¼ 근심하는 ì–‘ì€ ì œ 몇십 배나 ë˜ëŠ”지 모르게 간절합니다. ì •ìž„ì€ ì € ë•Œë¬¸ì— ì•„ë²„ì§€ê°€ 불행하게 ë˜ì…¨ë‹¤ê³  í•´ì„œ 차마 ë³¼ 수 없게 애통하고 있습니다. ì§„ì •ì„ ë§ì”€í•˜ì˜¤ë©´ 저는 지금 ì•„ë²„ì§€ë³´ë‹¤ë„ ì–´ë¨¸ë‹ˆë³´ë‹¤ë„ ì •ìž„ì—게 가장 ë™ì •ì´ ëŒë¦½ë‹ˆë‹¤. ì„ ìƒë‹˜, 저는 아버지를 찾아가는 ê²ƒì´ ì•„ë‹ˆë¼ ì •ìž„ì„ ë•ê¸° 위하여 간호하기 위하여 가는 것 같습니다. +ì„ ìƒë‹˜, 저는 ì•„ì§ ì‚¬ëž‘ì´ëž€ ê²ƒì´ ë¬´ì—‡ì¸ì§€ë¥¼ 모릅니다. 그러나 ì •ìž„ì„ ë³´ê³  사랑ì´ëž€ ê²ƒì´ ì–´ë–»ê²Œ 신비하고 열렬하고 놀ë¼ìš´ 것ì¸ê°€ë¥¼ 안 것 같습니다. +ìˆœìž„ì˜ íŽ¸ì§€ëŠ” 계ì†ëœë‹¤. +ì„ ìƒë‹˜, í•˜ì–¼ë¹ˆì— ì˜¤ëŠ” ê¸¸ì— ì†¡í™”ê°• êµ½ì´ë¥¼ ë³¼ ë•Œì—는 ì •ìž„ì´ê°€ 어떻게나 울었는지, ê·¸ê²ƒì€ ì°¨ë§ˆ ë³¼ 수가 없었습니다. 아버지께서 ì†¡í™”ê°•ì„ ë³´ì‹œê³  ê°ìƒì´ 깊으셨ë”란 ê²ƒì„ ìƒê°í•œ 것입니다. 무ì¸ì§€ê²½ìœ¼ë¡œ, 허옇게 ëˆˆì´ ë®ì¸ 벌íŒìœ¼ë¡œ í˜ëŸ¬ê°€ëŠ” 송화강 êµ½ì´, ê·¸ê²ƒì€ ìŠ¬í”ˆ í’경입니다. 아버지께서 여기를 지나실 ë•Œì—는 마른 풀만 있는 ê´‘ì•¼ì˜€ì„ ê²ƒì´ë‹ˆ ê·¸ ë•Œì—는 ë”ìš± í™©ëŸ‰í•˜ì˜€ì„ ê²ƒì´ë¼ê³  ì •ìž„ì€ ë§í•˜ê³  ì›ë‹ˆë‹¤. +ì •ìž„ì€ ì œê°€ 아버지를 아는 것보다 아버지를 잘 아는 것 같습니다. í‰ì†Œì— 아버지와는 그리 ì ‘ì´‰ì´ ì—†ê±´ë§ˆëŠ” ì •ìž„ì€ ì•„ë²„ì§€ì˜ ì˜ì§€ë ¥, ì•„ë²„ì§€ì˜ ìˆ¨ì€ ì—´ì •, ì•„ë²„ì§€ì˜ ì„±ë¯¸ê¹Œì§€ 잘 압니다. 저는 ì •ìž„ì˜ ë§ì„ 듣고야 비로소 ì°¸ 그래, 하는 ê°íƒ„ì„ ë°œí•œ ì¼ì´ 여러 번 있습니다. +ì •ìž„ì˜ ë§ì„ 듣고야 비로소 아버지가 남보다 뛰어나신 ì¸ë¬¼ì¸ ê²ƒì„ ê¹¨ë‹¬ì•˜ìŠµë‹ˆë‹¤. 아버지는 ì •ì˜ê°ì´ 굳세고 겉으로는 싸늘하ë„ë¡ ì´ì§€ì ì´ì§€ë§ˆëŠ” ì†ì—는 불 ê°™ì€ ì—´ì •ì´ ìžˆìœ¼ì‹œê³ , 아버지는 쇠 ê°™ì€ ì˜ì§€ë ¥ê³¼ 칼날 ê°™ì€ íŒë‹¨ë ¥ì´ 있어서 언제나 ì£¼ì €í•˜ì‹¬ì´ ì—†ê³  ë˜ í”ë“¤ë¦¬ì‹¬ì´ ì—†ë‹¤ëŠ” 것, 아버지께서는 모든 ê²ƒì„ ìš©ì„œí•˜ê³  모든 ê²ƒì„ í˜¸ì˜ë¡œ í•´ì„하여서 누구를 미워하거나 ì›ë§í•˜ì‹¬ì´ 없는 등, ì •ìž„ì€ ì•„ë²„ì§€ì˜ ë§ˆìŒì˜ 목ë¡ê³¼ 설명서를 ë”°ë¡œ 외우는 것처럼 ì•„ë²„ì§€ì˜ ì„±ê²©ì„ ì„¤ëª…í•©ë‹ˆë‹¤. 듣고 ë³´ì•„ì„œ 비로소 ì•„ë²„ì§€ì˜ ë”¸ì¸ ì €ëŠ” ë‚´ 아버지가 ì–´ë–¤ 아버지ì¸ê°€ë¥¼ 알았습니다. +ì„ ìƒë‹˜, ì´í•´ê°€ ì‚¬ëž‘ì„ ë‚³ëŠ”ë‹¨ ë§ì”€ì´ 있지마는 저는 ì •ìž„ì„ ë³´ì•„ì„œ ì‚¬ëž‘ì´ ì´í•´ë¥¼ 낳는 ê²ƒì´ ì•„ë‹Œê°€ 합니다. +어쩌면 어머니와 저는 í‰ìƒì„ 아버지를 모시고 ìžˆìœ¼ë©´ì„œë„ ì•„ë²„ì§€ë¥¼ 몰ëžìŠµë‹ˆê¹Œ. ì´ì„±ì´ 무디고 ì–‘ì‹¬ì´ í려서 그랬습니까. ì •ìž„ì€ ì§„ì‹¤ë¡œ 존경할 ì—¬ìžìž…니다. 제가 남ìžë¼ 하ë”ë¼ë„ ì •ìž„ì„ ì•„ë‹ˆ 사랑하고는 못 견디겠습니다. +아버지는 분명 ì •ìž„ì„ ì‚¬ëž‘í•˜ì‹  것입니다. 처ìŒì—는 ì¹œêµ¬ì˜ ë”¸ë¡œ, 다ìŒì—는 친딸과 ê°™ì´, ë˜ ë‹¤ìŒì—는 무엇ì¸ì§€ 모르게 뜨거운 ì‚¬ëž‘ì´ ìƒê²¼ìœ¼ë¦¬ë¼ê³  믿습니다. ê·¸ê²ƒì„ ì•„ë²„ì§€ëŠ” ì£½ì¸ ê²ƒìž…ë‹ˆë‹¤. ê·¸ê²ƒì„ ì£½ì´ë ¤ê³  ì´ ë‹¬í•  수 없는 ì‚¬ëž‘ì„ ì£½ì´ë ¤ê³  시베리아로 달아나신 것입니다. ì¸ì œì•¼ 아버지께서 ì„ ìƒë‹˜ê»˜ 하신 íŽ¸ì§€ì˜ ëœ»ì´ ì•Œì•„ì§„ 것 같습니다. ë°±ì„¤ì´ ë®ì¸ ì‹œë² ë¦¬ì•„ì˜ ì‚¼ë¦¼ ì†ìœ¼ë¡œ í˜¼ìž í—¤ë§¤ë©° ì •ìž„ì—게로 향하는 ì‚¬ëž‘ì„ ì£½ì´ë ¤ê³  무진 애를 쓰시는 ê·¸ ì‹¬ì •ì´ ì•Œì•„ì§€ëŠ” 것 같습니다. +ì„ ìƒë‹˜ ì´ê²ƒì´ 얼마나 비참한 ì¼ìž…니까. 저는 ì •ìž„ì˜ ì§ì— 지니고 온 ì¼ê¸°ë¥¼ 보다가 ì´ëŸ¬í•œ êµ¬ì ˆì„ ë°œê²¬í•˜ì˜€ìŠµë‹ˆë‹¤. +ì„ ìƒë‹˜. 저는 세ì¸íŠ¸ ì˜¤ê±°ìŠ¤í‹´ì˜ <참회ë¡>ì„ ì ˆë°˜ì´ë‚˜ 다 ë³´ê³  ë‚˜ë„ ìž ì´ ë“¤ì§€ 아니합니다. ìž ì´ ë“¤ê¸° ì „ì— ì œê°€ í•­ìƒ ì¦ê²¨í•˜ëŠ” ì•„ë² ë§ˆë¦¬ì•„ì˜ ë…¸ëž˜ë¥¼ 유성기로 듣고 나서 오늘 ì¼ê¸°ë¥¼ 쓰려고 하니 슬픈 소리만 나옵니다. +사랑하는 어른ì´ì—¬. 저는 멀리서 ë‹¹ì‹ ì„ ì¡´ê²½í•˜ê³  신뢰하는 마ìŒì—서만 살아야 í•  ê²ƒì„ ìž˜ 압니다. 여기ì—ì„œ ì˜ì›í•œ 정지를 하지 아니하면 아니 ë©ë‹ˆë‹¤. ë¹„ë¡ ì œ ìƒëª…ì´ ê´´ë¡œì›€ìœ¼ë¡œ ëŠì–´ì§€ê³  ì œ í˜¼ì´ í”¼ì–´ 보지 못하고 스러져 버리ë”ë¼ë„ 저는 ì´ ë©€ë¦¬ì„œ ë°”ë¼ë³´ëŠ” 존경과 ì‹ ë¢°ì˜ ì‹¬ê²½ì—ì„œ í•œ ë°œìžêµ­ì´ë¼ë„ 옮기지 않아야 í•  ê²ƒì„ ìž˜ 압니다. 나를 위하여 놓여진 ìƒì˜ 궤ë„는 ë‚˜ì˜ ìƒëª…ì„ ë¶€ì¸í•˜ëŠ” ì–µì§€ì˜ ê¸¸ìž…ë‹ˆë‹¤. 제가 몇 ë…„ ì „ 기숙사 ë² ë“œì—ì„œ ì´ëŸ° ë°¤ì— ë‚´ë‹¤ë³´ë©´ ì¦ê²ê³  ì•„ë¦„ë‹µë˜ ë‚´ ìƒì˜ ê¿ˆì€ ë‹¤ 깨어졌습니다. +ì œ ì˜í˜¼ì˜ í•œ ì¡°ê°ì´ 먼 ì„¸ìƒ ì•Œì§€ 못할 세계로 떠다니고 있습니다. 잃어버린 ë§ˆìŒ ì¡°ê° ì–´ì°Œí•˜ë‹¤ê°€ 제가 ì´ë ‡ê²Œ ë˜ì—ˆëŠ”지 모릅니다. +피어 오르는 ìƒëª…ì˜ ê´‘ì±„ë¥¼ 스스로 ì‚¬í˜•ì— ì²˜í•˜ì§€ 아니하면 아니 ë  ë•Œ ì–´ì°Œ ìŠ¬í””ì´ ì—†ê² ìŠµë‹ˆê¹Œ. ì´ê²ƒì€ 현실로 ì‚¬ëžŒì˜ ìƒëª…ì„ ì£½ì´ëŠ” 것보다 ë” ë¬´ì„œìš´ 죄가 아니오리까. ë‚˜ì˜ ì„¸ê³„ì—ì„œ 처ìŒì´ìš” 마지막으로 발견한 ë¹›ì„ ì–´ë‘  ì†ì— 소멸해 버리ë¼ëŠ” ì´ ì¼ì´ 얼마나 떨리는 ì§ë¬´ì˜¤ë¦¬ê¹Œ. ì´ í—ˆê¹¨ë¹„ì˜ í˜•ì˜ ì‚¬ëžŒì´ ì‚´ê¸° 위하여 ë‚´ ì†ìœ¼ë¡œ ì¹¼ì„ ë“¤ì–´ ë‚´ ì˜í˜¼ì˜ 환í¬ë¥¼ ì³ì•¼ 옳습니까. 저는 í•˜ë‚˜ë‹˜ì„ ì›ë§í•©ë‹ˆë‹¤. +ì´ë ‡ê²Œ 씌어 있습니다. ì„ ìƒë‹˜ ì´ê²ƒì´ 얼마나 피 í르는 고백입니까. +ì„ ìƒë‹˜, 저는 ì •ìž„ì˜ ì´ ê³ ë°±ì„ ë³´ê³  무조건으로 ì •ìž„ì˜ ì‚¬ëž‘ì„ ì‹œì¸í•©ë‹ˆë‹¤. ì„ ìƒë‹˜, ì œ ëª©ìˆ¨ì„ ë°”ì³ì„œ 하는 ì¼ì— 누가 시비를 하겠습니까. ë”구나 ê·¸ ë™ê¸°ì— í‹°ëŒë§Œí¼ë„ 불순한 ê²ƒì´ ì—†ìŒì—야 무조건으로 ì‹œì¸í•˜ì§€ 아니하고 어찌합니까. +ë°”ë¼ê¸°ëŠ” ì •ìž„ì˜ ë³‘ì´ í¬ê²Œ ë˜ì§€ 아니하고 아버지께서 무사히 계셔서 ì†ížˆ 만나뵙게 ë˜ëŠ” 것입니다마는 ì•žê¸¸ì´ ë§ë§í•˜ì—¬ ê°€ìŠ´ì´ ë‘ê·¼ê±°ë¦¼ì„ ê¸ˆì¹˜ 못합니다. 게다가 ì˜¤ëŠ˜ì€ í•¨ë°•ëˆˆì´ í¼ë¶€ì–´ì„œ 천지가 온통 회색으로 í•œ ë¹›ì´ ë˜ì—ˆìœ¼ë‹ˆ ë”ìš± ì „ë„ê°€ 막막합니다. 그러나 ì„ ìƒë‹˜ 저는 앓는 ì •ìž„ì„ ë°ë¦¬ê³  ìš©ê°í•˜ê²Œ 시베리아 ê¸¸ì„ ë– ë‚©ë‹ˆë‹¤. +í•œ ì¼ ì£¼ì¼ í›„ì— ë˜ íŽ¸ì§€ í•œ ìž¥ì´ ì™”ë‹¤. ê·¸ê²ƒë„ ìˆœìž„ì˜ íŽ¸ì§€ì—¬ì„œ ì´ëŸ¬í•œ ë§ì´ 있었다. +……오늘 ìƒˆë²½ì— í¥ì•ˆë ¹ì„ 지났습니다. 플랫í¼ì˜ 한란계는 ì˜í•˜ ì´ì‹­ì‚¼ ë„를 가리켰습니다. ì‚¬ëžŒë“¤ì˜ ì–¼êµ´ì€ ì†œí„¸ì— ì„±ì—ê°€ 슬어서 남녀 노소 í•  것 ì—†ì´ í•˜ì–—ê²Œ ë¶„ì„ ë°”ë¥¸ 것 같습니다. ìœ ë¦¬ì— ë¹„ì¹œ ë‚´ ì–¼êµ´ë„ ê·¸ì™€ ê°™ì´ í° ê²ƒì„ ë³´ê³  놀ëžìŠµë‹ˆë‹¤. ìˆ¨ì„ ë“¤ì´ì‰´ ë•Œì—는 ì½”í„¸ì´ ì–¼ì–´ì„œ ìˆ¨ì´ ëŠê¸°ê³  ë°”ëžŒê²°ì´ ì§€ë‚˜ê°€ë©´ ëˆˆë¬¼ì´ ì–¼ì–´ì„œ 눈ì¹ì´ 마주 붙습니다. ì‚¬ëžŒë“¤ì€ í„¸ê³¼ ê°€ì£½ì— ì‹¸ì—¬ì„œ ê³°ê°™ì´ ë³´ìž…ë‹ˆë‹¤. +ë˜ ì´ëŸ° ë§ë„ 있었다. +ì•„ë¼ì‚¬ ê³„ì§‘ì• ë“¤ì´ ìš°ìœ ë³‘ë“¤ì„ í’ˆì— í’ˆê³  서서 ì†ë‹˜ì´ 사기를 기다리고 있습니다. ì €ë„ ë‘ ë³‘ì„ ì‚¬ì„œ ì •ìž„ì´ì™€ 나누어 먹었습니다. 우유는 따뜻합니다. ê·¸ê²ƒì„ ì‹ížˆì§€ 아니할 양으로 í’ˆì— í’ˆê³  ì„°ë˜ ê²ƒìž…ë‹ˆë‹¤. +ë˜ ì´ëŸ¬í•œ êµ¬ì ˆë„ ìžˆì—ˆë‹¤. +ì •ê±°ìž¥ì— ë‹¿ì„ ë•Œë§ˆë‹¤ ì €í¬ë“¤ì€ ë°–ì„ ë‚´ë‹¤ë´…ë‹ˆë‹¤. 행여나 아버지가 거기 계시지나 아니할까 하고요. 차가 어길 ë•Œì—는 ë”구나 마ìŒì´ 조입니다. 아버지가 ê·¸ 차를 타고 지나가시지나 아니하는가 하고요. 그리고는 ì •ìž„ì€ ì›ë‹ˆë‹¤. ê¼­ 뵈올 ì–´ë¥¸ì„ ë†“ì³ë‚˜ 버린 듯ì´. +그리고는 ì´ ì£¼ì¼ ë™ì•ˆì´ë‚˜ 소ì‹ì´ 없다가 편지 í•œ ìž¥ì´ ì™”ë‹¤. ê·¸ê²ƒì€ ì •ìž„ì˜ ê¸€ì”¨ì˜€ë‹¤. +ì„ ìƒë‹˜, 저는 지금 최 ì„ ìƒê»˜ì„œ ê³„ì‹œë˜ ë°”ì´ì¹¼ í˜¸ë°˜ì˜ ê·¸ ì§‘ì— ì™€ì„œ 홀로 누웠습니다. ìˆœìž„ì€ ì£¼ì¸ ë…¸íŒŒì™€ 함께 F역으로 최 ì„ ìƒì„ 찾아서 오늘 ì•„ì¹¨ì— ë– ë‚˜ê³  병든 저만 í˜¼ìž ëˆ„ì›Œì„œ ì–¼ìŒì— ì‹¸ì¸ ë°”ì´ì¹¼ í˜¸ì˜ ëˆˆë³´ë¼ì¹˜ëŠ” 바람 소리를 듣고 있습니다. ì—´ì€ ì‚¼ì‹­íŒ” ë„로부터 구 ë„ ì‚¬ì´ë¥¼ 오르내리고 ê¸°ì¹¨ì€ ë‚˜ê³  ëª¸ì˜ ê´´ë¡œì›€ì„ ê²¬ë”œ 수 없습니다. 그러하오나 ì„ ìƒë‹˜, 저는 í•˜ë‚˜ë‹˜ì„ ë¶ˆëŸ¬ì„œ 축ì›í•©ë‹ˆë‹¤. ì´ ì‹¤ë‚± ê°™ì€ ìƒëª…ì´ ë‹¤ 타 버리기 ì „ì— ìµœ ì„ ìƒì˜ ë‚¯ì„ ë‹¤ë§Œ ì¼ ì´ˆ ë™ì•ˆì´ë¼ë„ 보여지ì´ë¼ê³ . 그러하오나 ì„ ìƒë‹˜, ì´ ì¶•ì›ì´ ì´ë£¨ì–´ì§€ê² ìŠµë‹ˆê¹Œ. +저는 한사코 F역까지 가려 하였사오나 순임 í˜•ì´ ìš¸ê³  막사오며 ë˜ ì£¼ì¸ ë…¸íŒŒê°€ 본래 미국 사람과 ì‚´ë˜ ì‚¬ëžŒìœ¼ë¡œ ì˜ì–´ë¥¼ 알아서 순임 í˜•ì˜ ë„ì›€ì´ ë˜ê² ê¸°ë¡œ 저는 ì´ ê³³ì— ëˆ„ì›Œ 있습니다. 순임 í˜•ì€ ê¸°ì–´ì½” 아버지를 찾아 모시고 오마고 약ì†í•˜ì˜€ì‚¬ì˜¤ë‚˜ ì´ ë„“ì€ ì‹œë² ë¦¬ì•„ì—ì„œ ì–´ë”” 가서 찾겠습니까. +ì„ ìƒë‹˜, 저는 죽ìŒì„ 봅니다. 죽ìŒì´ 바로 ì œ ì•žì— ì™€ì„œ ì„  ê²ƒì„ ë´…ë‹ˆë‹¤. ê·¸ì˜ ì†ì€ ì œ 여윈 ì†ì„ 잡으려고 ë“¤ë¨¹ê±°ë¦¼ì„ ë´…ë‹ˆë‹¤. +ì„ ìƒë‹˜, ì£½ì€ ë’¤ì—ë„ ì˜ì‹ì´ 남습니까. ë§Œì¼ ì˜ì‹ì´ 남는다 하면 ì£½ì€ ë’¤ì—ë„ ì´ ì•„í””ê³¼ ê´´ë¡œì›€ì„ ê³„ì†í•˜ì§€ 아니하면 아니 ë©ë‹ˆê¹Œ. ì£½ì€ ë’¤ì—는 ì˜¤ì§ ì˜ì›í•œ ì–´ë‘ ê³¼ ìžŠì–´ë²„ë¦¼ì´ ìžˆìŠµë‹ˆê¹Œ. ì£½ì€ ë’¤ì—는 혹시나 ìƒì „ì— ë¨¹ì—ˆë˜ ë§ˆìŒì„ ìžìœ ë¡œ 펼 ë„리가 있습니까. ì´ ì„¸ìƒì—ì„œ 그립고 ì‚¬ëª¨í•˜ë˜ ì´ë¥¼ ì£½ì€ ë’¤ì—는 ìžìœ ë¡œ 만나 ë³´ê³  언제나 마ìŒê» ê°™ì´í•  수가 있습니까. 그런 ì¼ë„ 있습니까. ì´ëŸ° ì¼ì„ ë°”ë¼ëŠ” ê²ƒë„ ì£„ê°€ ë©ë‹ˆê¹Œ. +ì •ìž„ì˜ íŽ¸ì§€ëŠ” ë”ìš± ì ˆë§ì ì¸ ì–´ì¡°ë¡œ 찬다. +저는 ì²˜ìŒ ë³‘ì´ ë‚¬ì„ ë•Œì—는 죽는 ê²ƒì´ ì‹«ê³  무서웠습니다. 그러나 ì§€ê¸ˆì€ ì£½ëŠ” ê²ƒì´ ì¡°ê¸ˆë„ ë¬´ì„­ì§€ 아니합니다. 다만 차마 죽지 못하는 ê²ƒì´ í•œ. +하고는 `다만 차마' ì´í•˜ë¥¼ ë°•ë°• 지워 버렸다. 그리고는 새로 시작하여 나와내 가족ì—게 대한 ë¬¸ì•ˆì„ í•˜ê³ ëŠ” ëì„ ë§‰ì•˜ë‹¤. +나는 ì´ íŽ¸ì§€ë¥¼ 받고 울었다. 무슨 í° ë¹„ê·¹ì´ ê°€ê¹Œìš´ ê²ƒì„ ì˜ˆìƒí•˜ê²Œ 하였다. +ê·¸ 후 í•œ ì‹­ì—¬ ì¼ì´ë‚˜ 지나서 ì „ë³´ê°€ 왔다. ê·¸ê²ƒì€ ì˜ë¬¸ìœ¼ë¡œ 씌었는ë°, +"아버지 ë³‘ì´ ê¸‰í•˜ë‹¤. 나로는 ì–´ì©” 수 없다. ëˆ ê°€ì§€ê³  곧 오기를 바란다." +하고 ê·¸ ëì— B호텔ì´ë¼ê³  주소를 ì ì—ˆë‹¤. ì „ë³´ ë°œì‹ êµ­ì´ ì´ë¥´ì¿ ì¸ í¬ì¸ ê²ƒì„ ë³´ë‹ˆ B호텔ì´ë¼ í•¨ì€ ì´ë¥´ì¿ ì¸ í¬ì¸ ê²ƒì´ ë¶„ëª…í•˜ì˜€ë‹¤. +나는 ìµœì„ ë¶€ì¸ì—게 최ì„ì´ê°€ ì•„ì§ ì‚´ì•„ 있다는 ê²ƒì„ ì „í•˜ê³  곧 여행권 수ì†ì„ 하였다. ì ˆë§ìœ¼ë¡œ ì•Œì•˜ë˜ ì—¬í–‰ê¶Œì€ ì‚¬ì •ì´ ì‚¬ì •ì¸ë§Œí¼ 곧 발부ë˜ì—ˆë‹¤. +나는 비행기로 ì—¬ì˜ë„를 떠났다. ë°±ì„¤ì— ê°œê°œí•œ ë•…ì„, 남빛으로 푸른 바다를 굽어보는 ë™ì•ˆì— ëŒ€ë ¨ì„ ë“¤ëŸ¬ 거기서 다른 비행기를 갈아타고 봉천, ì‹ ê²½, í•˜ì–¼ë¹ˆì„ ê±°ì³, ì¹˜ì¹˜í•˜ì–¼ì— ë“¤ë €ë‹¤ê°€ 만주리로 급행하였다. +웅대한 ëŒ€ë¥™ì˜ ì„¤ê²½ë„ ë‚˜ì—게 아무러한 ì¸ìƒë„ 주지 못하였다. 다만 푸른 하늘과 í¬ê³  í‰í‰í•œ ë•…ê³¼ì˜ ì‚¬ì´ë¡œ 한량 ì—†ì´ í—ˆê³µì„ ë‚ ì•„ê°„ë‹¤ëŠ” ìƒê°ë°–ì— ì—†ì—ˆë‹¤. ê·¸ê²ƒì€ ì‚¬ëž‘í•˜ëŠ” ë‘ ì¹œêµ¬ê°€ ëª©ìˆ¨ì´ ê²½ê°ì— 달린 ê²ƒì„ ìƒê°í•  ë•Œì— ë§ˆìŒì— 아무 ì—¬ìœ ë„ ì—†ëŠ” 까닭ì´ì—ˆë‹¤. +만주리ì—ì„œë„ ë¹„í–‰ê¸°ë¥¼ 타려 하였으나 소비ì—트 ê´€í—Œì´ í—ˆë½ì„ 아니 하여 열차로 ê°ˆ ìˆ˜ë°–ì— ì—†ì—ˆë‹¤. +초조한 몇 ë°¤ì„ ì§€ë‚˜ê³  ì´ë¥´ì¿ ì¸ í¬ì— 내린 ê²ƒì´ ì˜¤ì „ ë‘ì‹œ. 나는 B호텔로 ì´ìŠ¤ë³´ìŠ¤ì¹˜ì¹´ë¼ëŠ” 마차를 몰았다. 죽ìŒê³¼ ê°™ì´ ê³ ìš”í•˜ê²Œ 눈 ì†ì— ìžëŠ” 시간ì—는 여기저기 ì „ë“±ì´ ë°˜ì§ê±°ë¦´ ë¿, ì´ë”°ê¸ˆ ë°¤ì˜ ì‹œê°€ë¥¼ 경계하는 ë³‘ì •ë“¤ì˜ ëˆˆì´ ë¬´ì„­ê²Œ 빛나는 ê²ƒì´ ë³´ì˜€ë‹¤. +B호텔ì—ì„œ 미스 ì´ˆì´(최 ì–‘)를 찾았으나 ìˆœìž„ì€ ì—†ê³  ì–´ë–¤ 서양 노파가 나와서, +"유 미스터 Y?" +하고 ì˜ì‹¬ìŠ¤ëŸ¬ìš´ 눈으로 나를 보았다. +그렇다는 ë‚´ ëŒ€ë‹µì„ ë“£ê³ ëŠ” 노파는 반갑게 ì†ì„ 내밀어서 ë‚´ ì†ì„ 잡았다. +나는 넉넉하지 못한 ì˜ì–´ë¡œ ê·¸ 노파ì—게서 최ì„ì´ê°€ ì•„ì§ ì‚´ì•˜ë‹¤ëŠ” ë§ê³¼ ì •ìž„ì˜ ì†Œì‹ì€ ë“¤ì€ ì§€ 오래ë¼ëŠ” ë§ê³¼ 최ì„ê³¼ ìˆœìž„ì€ ì—¬ê¸°ì„œ 삼십 마ì¼ì´ë‚˜ 떨어진 Fì—­ì—ì„œë„ ì°ë§¤ë¡œ ë” ê°€ëŠ” 삼림 ì†ì— 있다는 ë§ì„ 들었다. +나는 ê·¸ ë°¤ì„ ì—¬ê¸°ì„œ 지내고 ì´íŠ¿ë‚  ì•„ì¹¨ì— ë– ë‚˜ëŠ” 완행차로 ê·¸ 노파와 함께 ì´ë¥´ì¿ ì¸ í¬ë¥¼ 떠났다. +ì´ ë‚ ë„ ì²œì§€ëŠ” ì˜¤ì§ ëˆˆë¿ì´ì—ˆë‹¤. 차는 ê°€ë” ì‚¼ë¦¼ 중으로 가는 모양ì´ë‚˜ ëª¨ë‘ íšŒìƒ‰ë¹›ì— ê°€ë¦¬ì›Œì„œ 분명히 ë³´ì´ì§€ë¥¼ 아니하였다. +Fì—­ì´ë¼ëŠ” ê²ƒì€ ì‚¼ë¦¼ ì†ì— 있는 조그마한 정거장으로 집ì´ë¼ê³ ëŠ” 정거장 ì§‘ë°–ì— ì—†ì—ˆë‹¤. 역부 ë‘ì—‡ì´ í„¸ì˜·ì— í•˜ì–—ê²Œ ëˆˆì„ ë’¤ì“°ê³  졸리는 ë“¯ì´ ì˜¤ë½ê°€ë½í•  ë¿ì´ì—ˆë‹¤. +우리는 ì°ë§¤ 하나를 얻어 타고 어디가 길ì¸ì§€ ë¶„ëª…ì¹˜ë„ ì•„ë‹ˆí•œ 눈 ì†ìœ¼ë¡œ ë§ì„ 몰았다. +ë°”ëžŒì€ ì—†ëŠ” 듯하지마는 ê·¸ëž˜ë„ ëˆˆë°œì„ í•œíŽ¸ìœ¼ë¡œ 비ë¼ëŠ” 모양ì´ì–´ì„œ 아름드리 ë‚˜ë¬´ë“¤ì˜ í•œìª½ì€ í•˜ì–—ê²Œ 눈으로 쌓ì´ê³  í•œìª½ì€ ê²€ì€ ë¹›ì´ ë”ìš± ë‹ë³´ì˜€ë‹¤. ë°± ì²™ì€ ë„˜ì„ ë“¯í•œ 꼿꼿한 침엽수(전나무 따윈가)ë“¤ì´ ì–´ë””ê¹Œì§€ë“ ì§€, 하늘ì—ì„œ 곧 ë‚´ë ¤ë°•ì€ ëª» 모양으로, ìˆ˜ì—†ì´ ì„œ 있는 사ì´ë¡œ 우리 ì°ë§¤ëŠ” 간다. ë•…ì— ë®ì¸ ëˆˆì€ ìƒˆë¡œ 피워 ë†“ì€ ì†œê°™ì´ í¬ì§€ë§ˆëŠ” 하늘ì—ì„œ 내리는 ëˆˆì€ êµ¬ë¦„ë¹›ê³¼ 공기빛과 어울려서 ë°¥ ìž¦íž ë•Œì— êµ´ëšì—ì„œ 나오는 연기와 ê°™ì´ ì—°íšŒìƒ‰ì´ë‹¤. +ë°”ëžŒë„ ë¶ˆì§€ 아니하고 ìƒˆë„ ë‚ ì§€ 아니하건마는 나무 ë†’ì€ ê°€ì§€ì— ìŒ“ì¸ ëˆˆì´ ì´ë”°ê¸ˆ ë©ì¹˜ë¡œ 떨어져서는 고요한 수풀 ì†ì— ìž‘ì€ ë™ìš”를 ì¼ìœ¼í‚¨ë‹¤. +우리 ì°ë§¤ê°€ 가는 ê¸¸ì´ ìžì—°ìŠ¤ëŸ¬ìš´ 복잡한 커브를 ë„는 ê²ƒì„ ë³´ë©´ í•„ì‹œ ì–¼ìŒ ì–¸ 개천 위로 달리는 모양ì´ì—ˆë‹¤. +í•œ 시간ì´ë‚˜ 달린 ë’¤ì— ìš°ë¦¬ ì°ë§¤ëŠ” ëŠ¦ì€ ê²½ì‚¬ì§€ë¥¼ 올ëžë‹¤. ë§ì„ 어거하는 ì•„ë¼ì‚¬ ì‚¬ëžŒì€ ì­ˆì­ˆì­ˆì­ˆ, 후르르 하고 ì£¼ë¬¸ì„ ì™¸ìš°ë“¯ì´ ìž…ìœ¼ë¡œ ë§ì„ 재촉하고 ê³ ì‚를 ì´ë¦¬ 들고 저리 들어 ë§ì—게 ë°©í–¥ì„ ê°€ë¦¬í‚¬ ë¿ì´ìš”, 채ì°ì€ ë³´ì´ê¸°ë§Œí•˜ê³  í•œ ë²ˆë„ ì“°ì§€ 아니하였다. 그와 ë§ê³¼ëŠ” 완전히 뜻과 ì •ì´ ë§žëŠ” ë™ì§€ì¸ 듯하였다. +처ìŒì—는 몰ëžìœ¼ë‚˜ 차차 추워ì§ì„ 깨달았다. 발과 무르íŒì´ 시렸다. +"얼마나 머오?" +하고 나는 ì˜¤ëž˜ê°„ë§Œì— ìž…ì„ ì—´ì–´ì„œ 노파ì—게 물었다. 노파는 털수건으로 머리를 싸매고 깊숙한 눈만 남겨 가지고 실신한 사람 모양으로 허공만 ë°”ë¼ë³´ê³  있다가, ë‚´ê°€ 묻는 ë§ì— 비로소 ìž ì´ë‚˜ 깬 듯ì´, +"멀지 않소. ì¸ì   í•œ 십오 마ì¼." +하고는 나를 ë°”ë¼ë³´ì•˜ë‹¤. ê·¸ ëˆˆì€ ì•„ë§ˆ 웃는 모양ì´ì—ˆë‹¤. +ê·¸ 얼굴, ê·¸ 눈, ê·¸ ìŒì„±ì´ ëª¨ë‘ ì´ ë…¸íŒŒê°€ ì¸ìƒ í’íŒŒì˜ ìŠ¬í”ˆ ì¼ ê´´ë¡œìš´ ì¼ì— 부대ë¼ê³  지친 ê²ƒì„ í‘œí•˜ì˜€ë‹¤. 그리고 죽는 날까지 살아간다 하는 듯하였다. +경사지를 올ë¼ì„œì„œ 보니 ê·¸ê²ƒì€ í•œ 산등성ì´ì˜€ë‹¤. ë°©í–¥ì€ ì•Œ 수 없으나 우리가 가는 ë°©í–¥ì—는 ë” ë†’ì€ ë“±ì„±ì´ê°€ 있는 모양ì´ë‚˜ 다른 ê³³ì€ ë‹¤ ì´ë³´ë‹¤ ë‚®ì€ ê²ƒ 같아서 하얀 눈바다가 ëì—†ì´ ë³´ì´ëŠ” 듯하였다. ê·¸ 눈보ë¼ëŠ” ë“¤ì‘¹ë‚ ì‘¹ì´ ìžˆëŠ” ê²ƒì„ ë³´ë©´ ì‚¼ë¦¼ì˜ ê¼­ëŒ€ê¸°ì¸ ê²ƒì´ ë¶„ëª…í•˜ì˜€ë‹¤. ë”구나 여기저기 뾰족뾰족 ëˆˆì†¡ì´ ë¶™ì„ ìˆ˜ 없는 마른 나뭇가지가 거뭇거뭇 ë³´ì´ëŠ” ê²ƒì„ ë³´ì•„ì„œ 그러하였다. ë§Œì¼ ëˆˆì´ ê±·í˜€ 주었으면 얼마나 안계가 넓으랴, ìµœì„ êµ°ì´ ê³ ë¯¼í•˜ëŠ” ê°€ìŠ´ì„ ì•ˆê³  ì´ë¦¬ë¡œ 헤매었구나 하면서 나는 ëª©ì„ ë‘˜ëŸ¬ì„œ ì‚¬ë°©ì„ ë°”ë¼ë³´ì•˜ë‹¤. +우리는 ê·¸ 등성ì´ë¥¼ 내려갔다. ë§ì´ 미처 ë°œì„ ë•…ì— ë†“ì„ ìˆ˜ê°€ 없는 ì •ë„ë¡œ 빨리 내려갔다. 여기는 ì‚°ë¶ˆì´ ë‚¬ë˜ ìžë¦¬ì¸ 듯하여 거뭇거뭇 불탄 ìžêµ­ 있는 마른 ë‚˜ë¬´ë“¤ì´ ë“œë¬¸ë“œë¬¸ ì„œ 있었다. ê·¸ ë‚˜ë¬´ë“¤ì€ ì°ì–´ 가는 ì‚¬ëžŒë„ ì—†ìœ¼ë§¤ 저절로 ì©ì–´ì„œ 없어지기를 기다릴 ìˆ˜ë°–ì— ì—†ì—ˆë‹¤. ê·¸ë“¤ì€ ë‚˜ì„œ 아주 ì©ì–´ 버리기까지 천 ë…„ ì´ìƒì€ 걸린다고 하니 ë˜í•œ 장한 ì¼ì´ë‹¤. +ì´ ëŒ€ì‚¼ë¦¼ì— ë¶ˆì´ ë¶™ëŠ”ë‹¤ 하면 ê·¸ê²ƒì€ ìž¥ê´€ì¼ ê²ƒì´ë‹¤. ë‹¬ë°¤ì— ë†’ì€ ê³³ì—ì„œ ì´ ê²½ì¹˜ë¥¼ 내려다본다 하면 ê·¸ë„ ìž¥ê´€ì¼ ê²ƒì´ìš”, ì—¬ë¦„ì— í•œì°½ ê¸°ìš´ì„ íŽ¼ ë•Œë„ ìž¥ê´€ì¼ ê²ƒì´ë‹¤. 나는 ì˜¤ë‰´ì›”ê²½ì— ì‹œë² ë¦¬ì•„ë¥¼ 여행하는 ì´ë“¤ì´ ë없는 꽃바다를 보았다는 기ë¡ì„ ìƒê°í•˜ì˜€ë‹¤. +"저기요!" +하는 ë…¸íŒŒì˜ ë§ì— 나는 ìƒê°ì˜ ì¤„ì„ ëŠì—ˆë‹¤. 저기ë¼ê³  가리키는 ê³³ì„ ë³´ë‹ˆ 거기는 집ì´ë¼ê³  ìƒê°ë˜ëŠ” ë¬¼ê±´ì´ ë‚˜ë¬´ 사ì´ë¡œ 보였다. ì°½ì´ ìžˆìœ¼ë‹ˆ 분명 집ì´ì—ˆë‹¤. +우리 ì´ìŠ¤ë³´ìŠ¤ì¹˜ì¹´ê°€ ê°€ê¹Œì´ ì˜¤ëŠ” ê²ƒì„ ë³´ì•˜ëŠ”ì§€, ê·¸ 집 ê°™ì€ ë¬¼ê±´ì˜ ë¬¸ ê°™ì€ ê²ƒì´ ì—´ë¦¬ë©° ê²€ì€ ì™¸íˆ¬ ìž…ì€ ì—¬ìž í•˜ë‚˜ê°€ íŒ”ì„ í—ˆìš°ì ê±°ë¦¬ë©° 뛰어나온다. 아마 ì†Œë¦¬ë„ ì¹˜ëŠ” 모양ì´ê² ì§€ë§ˆëŠ” ê·¸ 소리는 아니 들렸다. 나는 ê·¸ê²ƒì´ ìˆœìž„ì¸ ì¤„ì„ ì–¼ë¥¸ 알았다. ë˜ ìˆœìž„ì´ë°–ì— ë  ì‚¬ëžŒë„ ì—†ì—ˆë‹¤. +ìˆœìž„ì€ í•œì°¸ 달ìŒë°•ì§ˆë¡œ 오다가 ëˆˆì´ ê¹Šì–´ì„œ 걸ìŒì„ 걷기가 íž˜ì´ ë“œëŠ”ì§€ 멈칫 섰다. ê·¸ì˜ ê²€ì€ ì™¸íˆ¬ëŠ” ì–´ëŠë§ í° ì ìœ¼ë¡œ 얼려져 가지고 어깨는 í¬ê²Œ ë˜ëŠ” ê²ƒì´ ë³´ì˜€ë‹¤. +ìˆœìž„ì˜ ê°¸ë¦„í•œ ì–¼êµ´ì´ ë³´ì˜€ë‹¤. +"ì„ ìƒë‹˜!" +하고 ìˆœìž„ë„ ë‚˜ë¥¼ 알아보고는 ë˜ íŒ”ì„ í—ˆìš°ì ê±°ë¦¬ë©° 소리를 질렀다. +ë‚˜ë„ ë°˜ê°€ì›Œì„œ 모ìžë¥¼ ë²—ì–´ 둘렀다. +"ì•„ì´ ì„ ìƒë‹˜!" +하고 ìˆœìž„ì€ ë‚´ê°€ ì°ë§¤ì—ì„œ ì¼ì–´ì„œê¸°ë„ ì „ì— ë‚´ê²Œ 와서 매달리며 울었다. +"아버지 ì–´ë– ì‹œëƒ?" +하고 나는 ìˆœìž„ì˜ ë“±ì„ ë‘드렸다. 나는 다리가 마비가 ë˜ì–´ì„œ 곧 ì¼ì–´ì„¤ 수가 없었다. +"아버지 ì–´ë– ì‹œëƒ?" +하고 나는 í•œ 번 ë” ë¬¼ì—ˆë‹¤. +ìˆœìž„ì€ ë²Œë–¡ ì¼ì–´ë‚˜ ë‘ ì£¼ë¨¹ìœ¼ë¡œ í르는 ëˆˆë¬¼ì„ ì³ë‚´ 버리며, +"대단하셔요." +í•˜ê³ ë„ ìš¸ìŒì„ 금치 못하였다. +노파는 ë²Œì¨ ì°ë§¤ì—ì„œ 내려서 기운 없는 걸ìŒìœ¼ë¡œ 비틀비틀 걷기를 시작하였다. +나는 ìˆœìž„ì„ ë”°ë¼ì„œ ì–¸ë•ì„ 오르며, +"그래 무슨 병환ì´ì‹œëƒ?" +하고 물었다. +"몰ë¼ìš”. ì‹ ì—´ì´ ëŒ€ë‹¨í•˜ì…”ìš”." +"ì •ì‹ ì€ ì°¨ë¦¬ì‹œë“ ?" +"ì²˜ìŒ ì œê°€ 여기 ì™”ì„ ì ì—는 그렇지 ì•Šë”니 요새ì—는 ê°€ë” í˜¼ìˆ˜ ìƒíƒœì— 빠지시는 모양ì´ì•¼ìš”." +ì´ë§Œí•œ 지ì‹ì„ 가지고 나는 최ì„ì´ê°€ 누워 있는 집 ì•žì— ë‹¤ë‹¤ëžë‹¤. +ì´ ì§‘ì€ í†µë‚˜ë¬´ë¥¼ 댓 ê°œ 우물 ì •ìžë¡œ 가로놓고 ì§€ë¶•ì€ ë¬´ì—‡ìœ¼ë¡œ 했는지 모르나 ëˆˆì´ ë®ì´ê³ , 문 하나 ì°½ 하나를 ë‚´ì—ˆëŠ”ë° ë¬¸ì€ ë‚˜ë¬´ê»ì§ˆì¸ 모양ì´ë‚˜ ì°½ì€ ì –ë¹› 나는 ìœ ë¦¬ì°½ì¸ ì¤„ 알았ë”니 ë’¤ì— ì•Œì•„ë³¸ì¦‰ ê·¸ê²ƒì€ ìœ ë¦¬ê°€ 아니요, ì–‘ëª©ì„ ë°”ë¥´ê³  ë¬¼ì„ ë¿œì–´ì„œ 얼려 ë†“ì€ ê²ƒì´ì—ˆë‹¤. 그리고 통나무와 통나무 틈바구니ì—는 쇠털과 ê°™ì€ ë§ˆë¥¸ í’€ì„ ê¼­ê¼­ ë°•ì•„ì„œ ë°”ëžŒì„ ë§‰ì•˜ë‹¤. +ë¬¸ì„ ì—´ê³  들어서니 ë¶€ì—Œì— ë“¤ì–´ì„œëŠ” 모양으로 ì‘¥ ë¹ ì¡ŒëŠ”ë° í™”ëˆí™”ëˆí•˜ëŠ” ê²ƒì´ í•œì¦ê³¼ 같다. 그렇지 ì•Šì•„ë„ ì¹¨ì¹¨í•œ ë‚ ì— ì–¸ 눈으로 ê´‘ì„  부족한 ë°©ì— ë“¤ì–´ì˜¤ë‹ˆ, 캄캄 절벽ì´ì–´ì„œ ì•„ë¬´ê²ƒë„ ë³´ì´ì§€ 아니하였다. +순임ì´ê°€ 앞서서 ì–‘ì´ˆì— ë¶ˆì„ ì¼ ë‹¤. 촛불 ë¹›ì€ ë°© 한편 쪽 침대ë¼ê³  í•  만한 ë†’ì€ ê³³ì— ë‹´ìš”ë¥¼ ë®ê³  누운 최ì„ì˜ ì‹œì²´ì™€ ê°™ì€ í° ì–¼êµ´ì„ ë¹„ì¶˜ë‹¤. +"아버지, 아버지 샌전 아저씨 오셨어요." +하고 ìˆœìž„ì€ ìµœì„ì˜ ê·€ì— ìž…ì„ ëŒ€ê³  가만히 불렀다. +그러나 ëŒ€ë‹µì´ ì—†ì—ˆë‹¤. +나는 최ì„ì˜ ì´ë§ˆë¥¼ 만져 보았다. 축축하게 ë•€ì´ í˜ë €ë‹¤. 그러나 그리 ë”ìš´ ì¤„ì€ ëª°ëžë‹¤. +ë°© ì•ˆì˜ ê³µê¸°ëŠ” ìˆ¨ì´ ë§‰íž ë“¯í•˜ì˜€ë‹¤. ê·¸ 난방 장치는 ì‚¼êµ¿ì˜ ì›ë¦¬ë¥¼ ì´ìš©í•œ 것ì´ì—ˆë‹¤. ëŒë©©ì´ë¡œ ì•„ê¶ì´ë¥¼ 쌓고 ê·¸ ìœ„ì— í° ëŒë©©ì´ë“¤ì„ ë§Žì´ ìŒ“ê³  거기다가 ë¶ˆì„ ë•Œì–´ì„œ 달게 í•œ ë’¤ì— ê±°ê¸° ëˆˆì„ ë¶€ì–´ 뜨거운 ì¦ê¸°ë¥¼ 발하는 것ì´ì—ˆë‹¤. +ì´ ê±´ì¶•ë²•ì€ ì¡°ì„  ë™í¬ë“¤ì´ 시베리아로 ê¸ˆê´‘ì„ ì°¾ì•„ë‹¤ë‹ˆë©´ì„œ 하는 법ì´ëž€ ë§ì„ 들었으나 최ì„ì´ê°€ 누구ì—게서 배워 가지고 ì–´ë–¤ 모양으로 지었는지는 최ì„ì˜ ë§ì„ 듣기 ì „ì—는 ì•Œ 수 없는 ì¼ì´ë‹¤. +나는 ë‚´ íž˜ì´ ë¯¸ì¹˜ëŠ” ë°ê¹Œì§€ 최ì„ì˜ ë³‘ ì¹˜ë£Œì— ëŒ€í•œ ì†ì„ ì“°ê³  어떻게 해서든지 ì´ë¥´ì¿ ì¸ í¬ì˜ 병ì›ìœ¼ë¡œ 최ì„ì„ ë°ë ¤ë‹¤ê°€ ìž…ì›ì‹œí‚¬ ë„리를 ê¶ë¦¬í•˜ì˜€ë‹¤. 그러나 냉정하게 ìƒê°í•˜ë©´ 최ì„ì€ ì‚´ì•„ë‚  ê°€ë§ì´ 없는 것만 같았다. +ë‚´ê°€ ê°„ 지 ì‚¬í˜ ë§Œì— ìµœì„ì€ ì²˜ìŒìœ¼ë¡œ ì •ì‹ ì„ ì°¨ë ¤ì„œ ëˆˆì„ ëœ¨ê³  나를 알아보았다. +그는 반가운 í‘œì •ì„ í•˜ê³  빙그레 웃기까지 하였다. +"다 ì¼ì—†ë‚˜?" +ì´ëŸ° ë§ë„ ì•Œì•„ë“¤ì„ ìˆ˜ê°€ 있었다. +그러나 심히 ê¸°ìš´ì´ ì—†ëŠ” 모양ì´ê¸°ë¡œ 나는 ë§Žì´ ë§ì„ 하지 아니하였다. +최ì„ì€ í•œì°¸ì´ë‚˜ ëˆˆì„ ê°ê³  있ë”니, +"ì •ìž„ì´ ì†Œì‹ ë“¤ì—ˆë‚˜?" +하였다. +"괜찮대요." +하고 ê³ì—ì„œ 순임ì´ê°€ ë§í•˜ì˜€ë‹¤. +그리고는 ë˜ í˜¼ëª½í•˜ëŠ” 듯하였다. +ê·¸ ë‚  ë˜ í•œ 번 최ì„ì€ ì •ì‹ ì„ ì°¨ë¦¬ê³  순임ë”러는 저리로 ê°€ë¼ëŠ” ëœ»ì„ í‘œí•˜ê³  나ë”러 귀를 ê°€ê¹Œì´ ëŒ€ë¼ëŠ” ëœ»ì„ ë³´ì´ê¸°ë¡œ 그대로 하였ë”니, +"ë‚´ 가방 ì†ì— ì¼ê¸°ê°€ 있으니 그걸 ìžë„¤ë§Œ 보고는 ë¶ˆì‚´ë¼ ë²„ë ¤. ë‚´ê°€ ì£½ì€ ë’¤ì—ë¼ë„ ê·¸ê²ƒì´ ì„¸ìƒ ì‚¬ëžŒì˜ ëˆˆì— ë“¤ë©´ 안 ë˜ì§€. 순임ì´ê°€ 볼까 ê±±ì •ì´ ë˜ì§€ë§ˆëŠ” ë‚´ê°€ ëª¸ì„ ê¼¼ì§í•  수가 있나." +하는 ëœ»ì„ ë§í•˜ì˜€ë‹¤. +"그러지." +하고 나는 고개를 ë„ë•ì—¬ 보였다. +그러고 ë‚œ ë’¤ì— ë‚˜ëŠ” 최ì„ì´ê°€ 시킨 대로 ê°€ë°©ì„ ì—´ê³  ì±…ë“¤ì„ ë’¤ì ¸ì„œ ê·¸ ì¼ê¸°ì±…ì´ë¼ëŠ” ê³µì±…ì„ êº¼ë‚´ì—ˆë‹¤. +"ìˆœìž„ì´ ë„ˆ ì´ê±° 보았니?" +하고 나는 ê³ì—ì„œ ë‚´ê°€ ì±… 찾는 ê²ƒì„ ë³´ê³  ì„°ë˜ ìˆœìž„ì—게 물었다. +"아니오. 그게 무어여요?" +하고 ìˆœìž„ì€ ë‚´ ì†ì— ë“  ì±…ì„ ë¹¼ì•—ìœ¼ë ¤ëŠ” ë“¯ì´ ì†ì„ 내밀었다. +나는 ìˆœìž„ì˜ ì†ì´ 닿지 ì•Šë„ë¡ ì±…ì„ í•œíŽ¸ìœ¼ë¡œ 비키며, +"ì´ê²ƒì´ 네 아버지 ì¼ê¸°ì¸ 모양ì¸ë° 너는 ë³´ì´ì§€ ë§ê³  나만 ë³´ë¼ê³  하셨다. 네 아버지가 네가 ì´ê²ƒì„ 보았ì„까 í•´ì„œ 염려를 í•˜ì‹œëŠ”ë° ì•ˆ 보았으면 다행ì´ë‹¤." +하고 나는 ê·¸ ì±…ì„ ë“¤ê³  밖으로 나왔다. +ë‚ ì´ ë°ë‹¤. 해는 ì¤‘ì²œì— ìžˆë‹¤. 중천ì´ëž˜ì•¼ ì € 남쪽 지í‰ì„  가까운 ë°ë‹¤. ë°¤ì´ ì—´ì—¬ëŸ ì‹œê°„, ë‚®ì´ ëŒ€ì—¬ì„¯ ì‹œê°„ë°–ì— ì•ˆ ë˜ëŠ” ë¶ìª½ 나ë¼ë‹¤. 멀건 햇빛ì´ë‹¤. +나는 ë³•ì´ ìž˜ 드는 ê³³ì„ ê³¨ë¼ì„œ ë‚˜ë¬´ì— ëª¸ì„ ê¸°ëŒ€ê³  최ì„ì˜ ì¼ê¸°ë¥¼ ì½ê¸° 시작하였다. ì½ì€ 중ì—ì„œ 몇 êµ¬ì ˆì„ ê³¨ë¼ ë³¼ê¹Œ. +"ì§‘ì´ ë‹¤ ë˜ì—ˆë‹¤. ì´ ì§‘ì€ ë‚´ê°€ ìƒì „ ì‚´ê³  ê·¸ ì†ì—ì„œ ì´ ì„¸ìƒì„ 마칠 집ì´ë‹¤. 마ìŒì´ 기ì˜ë‹¤. ì‹œë„러운 세ìƒì€ 여기서 멀지 아니하ëƒ. ë‚´ê°€ 여기 홀로 있기로 누가 ì°¾ì„ ì‚¬ëžŒë„ ì—†ì„ ê²ƒì´ë‹¤. ë‚´ê°€ 여기서 죽기로 누가 슬í¼í•´ 줄 ì‚¬ëžŒë„ ì—†ì„ ê²ƒì´ë‹¤. 때로 ê³°ì´ë‚˜ 찾아올까. ì§€ë‚˜ê°€ë˜ ì‚¬ìŠ´ì´ë‚˜ 들여다볼까. +ì´ê²ƒì´ ë‚´ 소ì›ì´ 아니ëƒ. 세ìƒì˜ ì‹œë„ëŸ¬ì›€ì„ ë– ë‚˜ëŠ” ê²ƒì´ ë‚´ 소ì›ì´ 아니ëƒ. ì´ ì†ì—ì„œ 나는 나를 ì´ê¸°ê¸°ë¥¼ 공부하ìž." +ì²«ë‚ ì€ ì´ëŸ° í‰ë²”í•œ 소리를 ì¼ë‹¤. +ê·¸ ì´íŠ¿ë‚ ì—는. +"어떻게나 나는 약한 사람ì¸ê³ . ì œ 마ìŒì„ 제가 지배하지 못하는 사람ì¸ê³ . 밤새ë„ë¡ ë‚˜ëŠ” ì •ìž„ì„ ìƒê°í•˜ì˜€ë‹¤. ì–´ë‘ìš´ í—ˆê³µì„ í–¥í•˜ì—¬ ì •ìž„ì„ ë¶ˆë €ë‹¤. ì •ìž„ì´ê°€ 나를 찾아서 ë™ê²½ì„ 떠나서 ì´ë¦¬ë¡œ 오지나 아니하나 하고 ìƒê°í•˜ì˜€ë‹¤. 어떻게나 부ë„러운 ì¼ì¸ê³ ? 어떻게나 ê°€ì¦í•œ ì¼ì¸ê³ ? +나는 아내를 ìƒê°í•˜ë ¤ 하였다. ì•„ì´ë“¤ì„ ìƒê°í•˜ë ¤ 하였다. 아내와 ì•„ì´ë“¤ì„ ìƒê°í•¨ìœ¼ë¡œ ì •ìž„ì˜ ìƒê°ì„ ì´ê¸°ë ¤ 하였다. +최ì„ì•„, 너는 ë‚¨íŽ¸ì´ ì•„ë‹ˆëƒ. 아버지가 아니ëƒ. ì •ìž„ì€ ë„¤ ë”¸ì´ ì•„ë‹ˆëƒ. ì´ëŸ° ìƒê°ì„ 하였다. +ê·¸ëž˜ë„ ì •ìž„ì˜ ì¼ë¥˜ì „ì€ ì•„ë‚´ì™€ ì•„ì´ë“¤ì˜ ìƒê°ì„ 밀치고 달려오는 절대 ìœ„ë ¥ì„ ê°€ì§„ 듯하였다. +ì•„, 나는 어떻게나 파렴치한 사람ì¸ê³ . ë‚˜ì´ ì‚¬ì‹­ì´ ë„˜ì–´ ì˜¤ì‹­ì„ ë°”ë¼ë³´ëŠ” ë†ˆì´ ì•„ë‹ˆëƒ. ì‚¬ì‹­ì— ë¶ˆí˜¹ì´ë¼ê³  아니 하ëŠëƒ. êµìœ¡ê°€ë¡œ 깨ë—í•œ êµì¸ìœ¼ë¡œ ì¼ìƒì„ ì‚´ì•„ 왔다고 ìžì²˜í•˜ëŠ” ë‚´ê°€ ì•„ë‹ˆëƒ í•˜ê³  나는 ë‚´ 입으로 ë‚´ ì†ê°€ë½ì„ 물어서 ë‘ êµ°ë°ë‚˜ 피를 내었다." +최ì„ì˜ ë‘˜ì§¸ ë‚  ì¼ê¸°ëŠ” 계ì†ëœë‹¤. +"ë‚´ ì†ê°€ë½ì—ì„œ 피가 ë‚  ë•Œì— ë‚˜ëŠ” 유쾌하였다. 나는 ìŠ¹ì²©ì˜ ê¸°ì¨ì„ 깨달았다. +그러나 ì•„ì•„ 그러나 ê·¸ 빨간, ì°¸íšŒì˜ í•ë°©ìš¸ ì†ì—ì„œë„ ì• ìš•ì˜ ë¶ˆê¸¸ì´ ì¼ì§€ 아니하는가. 나는 마침내 ì œë„í•  수 없는 ì¸ìƒì¸ê°€." +ì´ ì§‘ì— ë“  지 ë‘˜ì§¸ë‚ ì— ë²Œì¨ ì´ëŸ¬í•œ ë¹„ê´€ì  ë§ì„ 하였다. +ë˜ ë©°ì¹ ì„ ì§€ë‚œ ë’¤ ì¼ê¸°ì—, +"나는 ë™ê²½ìœ¼ë¡œ ëŒì•„가고 싶다. ì •ìž„ì˜ ê³ìœ¼ë¡œ 가고 싶다. 시베리아ì˜ê´‘ì•¼ì˜ ìœ í˜¹ë„ ì•„ë¬´ íž˜ì´ ì—†ë‹¤. ì–´ì ¯ë°¤ì€ ì‚¼ë¦¼ì˜ ì¢‹ì€ ë‹¬ì„ ë³´ì•˜ìœ¼ë‚˜ ê·¸ ë‹¬ì„ ì•„ë¦„ë‹µê²Œ ë³´ë ¤ 하였으나 아무리 í•˜ì—¬ë„ ì•„ë¦„ë‹µê²Œ ë³´ì´ì§€ë¥¼ 아니하였다. +하늘ì´ë‚˜ 달ì´ë‚˜ 삼림ì´ë‚˜ ëª¨ë‘ ë¬´ì˜ë¯¸í•œ 존재다. ì´ì²˜ëŸ¼ 무ì˜ë¯¸í•œ 존재를 나는 경험한 ì¼ì´ 없다. ê·¸ê²ƒì€ ë‹¤ë§Œ 기ì¨ì„ ìžì•„내지 아니할 ë¿ë”러 ìŠ¬í””ë„ ìžì•„내지 못하였다. ê·¸ê²ƒì€ ìž¿ë”미였다. ì•„ë¬´ë„ ë“£ëŠ” ì´ ì—†ëŠ” ë°ì„œ ë‚´ ì§„ì •ì„ ë§í•˜ë¼ë©´ ê·¸ê²ƒì€ ì´ ì²œì§€ì— ë‚´ê²Œ ì˜ë¯¸ 있는 ê²ƒì€ ì •ìž„ì´ë°–ì— ì—†ë‹¤ëŠ” 것ì´ë‹¤. +나는 ì •ìž„ì˜ ê³ì— 있고 싶다. ì •ìž„ì„ ë‚´ ê³ì— ë‘ê³  싶다. 왜? ê·¸ê²ƒì€ ë‚˜ë„ ëª¨ë¥¸ë‹¤. +ë§Œì¼ ì´ ì›€ ì†ì—ë¼ë„ ì •ìž„ì´ê°€ 있다 하면 얼마나 ì´ê²ƒì´ ì¦ê±°ìš´ ê³³ì´ ë ê¹Œ. +그러나 ì´ê²ƒì€ 불가능한 ì¼ì´ë‹¤. ì´ ì¼ì´ 있어서는 아니 ëœë‹¤. 나는 ì´ ìƒê°ì„ 죽여야 한다. 다시 ê±°ë‘를 못 하ë„ë¡ ëª©ìˆ¨ì„ ëŠì–´ 버려야 한다. +ì´ê²ƒì„ 나는 ì›í•œë‹¤. ì›í•˜ì§€ë§ˆëŠ” 내게는 ê·¸ íž˜ì´ ì—†ëŠ” 모양ì´ë‹¤. +나는 종êµë¥¼ ìƒê°í•˜ì—¬ 본다. ì² í•™ì„ ìƒê°í•˜ì—¬ 본다. ì¸ë¥˜ë¥¼ ìƒê°í•˜ì—¬ 본다. 나ë¼ë¥¼ ìƒê°í•˜ì—¬ 본다. ì´ê²ƒì„ 가지고 ë‚´ ì• ìš•ê³¼ 바꾸려고 ì• ì¨ ë³¸ë‹¤. 그렇지마는 내게 그러한 íž˜ì´ ì—†ë‹¤. 나는 완전히 í—¬í”Œë¦¬ìŠ¤í•¨ì„ ê¹¨ë‹«ëŠ”ë‹¤. +ì•„ì•„ 나는 어찌할꼬? +나는 못ìƒê¸´ 사람ì´ë‹¤. 그까짓 ê²ƒì„ ëª» ì´ê²¨? 그까짓 ê²ƒì„ ëª» ì´ê²¨? +나는 ì˜ˆìˆ˜ì˜ ê´‘ì•¼ì—ì„œì˜ ìœ í˜¹ì„ ìƒê°í•œë‹¤. 천하를 주마 하는 ìœ í˜¹ì„ ìƒê°í•œë‹¤. 나는 싯다르타 태ìžê°€ 왕ê¶ì„ 버리고 나온 ê²ƒì„ ìƒê°í•˜ê³ , ë˜ ìŠ¤í† ì•„ ì² í•™ìžì˜ ì˜ì§€ë ¥ì„ ìƒê°í•˜ì˜€ë‹¤. +그러나 나는 그러한 ìƒê°ìœ¼ë¡œë„ ì´ ìƒê°ì„ ì´ê¸¸ 수가 없는 것 같다. +나는 í˜ëª…가를 ìƒê°í•˜ì˜€ë‹¤. 모든 것 ì‚¬ëž‘ë„ ëª©ìˆ¨ë„ ë‹¤ 헌신ì§ê°™ì´ 집어ë˜ì§€ê³  피 í르는 마당으로 뛰어나가는 용사를 ìƒê°í•˜ì˜€ë‹¤. 나는 ì´ë없는 삼림 ì†ìœ¼ë¡œ í˜ëª…ì˜ ìš©ì‚¬ 모양으로 달ìŒë°•ì§ˆì¹˜ë‹¤ê°€ ê¸°ìš´ì´ ì§„í•œ ê³³ì—ì„œ 죽어 버리는 ê²ƒì´ ì†Œì›ì´ì—ˆë‹¤. 그러나 ê±°ê¸°ê¹Œì§€ë„ ì´ ìƒê°ì€ 따르지 아니할까. +나는 지금 곧 죽어 버릴까. 나는 육혈í¬ë¥¼ ì†ì— 들어 보았다. ì´ ë°©ì•„ì‡ ë¥¼ í•œ 번만 튕기면 ë‚´ ìƒëª…ì€ ì—†ì–´ì§€ëŠ” ê²ƒì´ ì•„ë‹Œê°€. 그리 ë˜ë©´ 모든 ì´ ë§ˆìŒì˜ 움ì§ìž„ì€ ì†Œë©¸ë˜ëŠ” ê²ƒì´ ì•„ë‹Œê°€. ì´ê²ƒìœ¼ë¡œ 만사가 í•´ê²°ë˜ëŠ” ê²ƒì´ ì•„ë‹Œê°€. +ì•„ 하나님ì´ì‹œì—¬, íž˜ì„ ì£¼ì‹œì˜µì†Œì„œ. 천하를 ì´ê¸°ëŠ” íž˜ë³´ë‹¤ë„ ë‚˜ ìžì‹ ì„ ì´ê¸°ëŠ” íž˜ì„ ì£¼ì‹œì˜µì†Œì„œ. ì´ ì£„ì¸ìœ¼ë¡œ 하여금 í•˜ë‚˜ë‹˜ì˜ ëˆˆì— ì˜ë¡­ê³  깨ë—í•œ 사람으로 ì´ ì¼ìƒì„ 마치게 하여 주시옵소서, ì´ë ‡ê²Œ 나는 기ë„를 한다. +그러나 하나님께서는 나를 버리셨다. 하나님께서는 내게 íž˜ì„ ì£¼ì‹œì§€ 아니하시었다. 나를 ì´ ë¹„ì°¸í•œ ìžë¦¬ì—ì„œ ì©ì–´ì ¸ 죽게 하시었다." +최ì„ì€ ì–´ë–¤ ë‚  ì¼ê¸°ì— ë˜ ì´ëŸ° ê²ƒë„ ì¼ë‹¤. ê·¸ê²ƒì€ ì˜ˆì „ 내게 보낸 íŽ¸ì§€ì— ìžˆë˜ ê¿ˆ ì´ì•¼ê¸°ë¥¼ ì—°ìƒì‹œí‚¤ëŠ” 것ì´ì—ˆë‹¤. ê·¸ê²ƒì€ ì´ëŸ¬í•˜ë‹¤. +"오늘 ë°¤ì€ ë‹¬ì´ ì¢‹ë‹¤. ì‹œë² ë¦¬ì•„ì˜ ê²¨ìš¸ 해는 ì°¸ 못ìƒê¸´ ì‚¬ëžŒê³¼ë„ ê°™ì´ ê¸°ìš´ì´ ì—†ì§€ë§ˆëŠ” 하얀 ë•…, 검푸른 í•˜ëŠ˜ì— ì €ìª½ 지í‰ì„ ì„ 향하고 í˜ëŸ¬ê°€ëŠ” ë°˜ë‹¬ì€ ì°¸ìœ¼ë¡œ ë§‘ìŒ ê·¸ê²ƒì´ì—ˆë‹¤. +나는 í‰ìƒ ì²˜ìŒ ì‹œ 비슷한 ê²ƒì„ ì§€ì—ˆë‹¤. +ìž„ê³¼ ì´ë³„í•˜ë˜ ë‚  ë°¤ì—는 남쪽 나ë¼ì— 바람비가 쳤네 +ìž„ 타신 ìžë™ì°¨ì˜ ë’·ë¶ˆì´ ë¹¨ê°„ ë’·ë¶ˆì´ ë¹—ë°œì— ì°¢ê²¼ë„¤ +ìž„ 떠나 í˜¼ìž í—¤ë§¤ëŠ” ì‹œë² ë¦¬ì•„ì˜ ì˜¤ëŠ˜ ë°¤ì—는 +지려는 ìª½ë‹¬ì´ ëˆˆ ë®ì¸ ì‚¼ë¦¼ì— ê±¸ë ¸êµ¬ë‚˜ +ì•„ì•„ ì € 쪽달ì´ì—¬ +억지로 ë°˜ì„ ê°ˆê²¨ì§„ ê²ƒë„ ê°™ì•„ë¼ +ì•„ì•„ ì € 쪽달ì´ì—¬ +잃어진 ì§ì„ 찾아 +차디찬 허공 ì†ì„ ì˜ì›ížˆ 헤매는 ê²ƒë„ ê°™êµ¬ë‚˜ +ë‚˜ë„ ì € 달과 ê°™ì´ ìžƒì–´ë²„ë¦° ë°˜ìª½ì„ ì°¾ì•„ 무ê¶í•œ 시간과 공간ì—ì„œ 헤매는 것만 같다. +ì—ìµ. ë‚´ê°€ 왜 ì´ë¦¬ 약한가. 어찌하여 í¬ë‚˜í° ë§Žì€ ì¼ì„ ëŒì•„보지 못하고 요만한 ì• ìš•ì˜ í¬ë¡œê°€ ë˜ëŠ”ê°€. +그러나 나는 차마 ê·¸ ë‹¬ì„ ë²„ë¦¬ê³  들어올 수가 없었다. ë‚´ê°€ 왜 ì´ë ‡ê²Œ 센티멘털하게 ë˜ì—ˆëŠ”ê³ . ë‚´ 쇠 ê°™ì€ ì˜ì§€ë ¥ì´ 어디로 갔는고. ë‚´ 누를 수 없는 ìžì¡´ì‹¬ì´ 어디로 갔는고. 나는 마치 ìœ ëª¨ì˜ ì†ì— 달린 젖먹ì´ì™€ë„ 같다. ë‚´ ì¼ì‹ ì€ ë„ì‹œ ì• ìš• ë©ì–´ë¦¬ë¡œ 화해 버린 것 같다. +ì´ë¥¸ë°” 사랑 사랑ì´ëž€ ë§ì€ 종êµì  ì˜ë¯¸ì¸ 것 ì´ì™¸ì—ë„ ìž…ì— ë‹´ê¸°ë„ ì‹«ì–´í•˜ë˜ ë§ì´ë‹¤ ì´ëŸ° ê²ƒì€ ë‚´ ì˜ì§€ë ¥ê³¼ ìžì¡´ì‹¬ì„ 녹여 버렸는가. ë˜ ì´ ë¶€ìžì—°í•œ ê³ ë…ì˜ ìƒí™œì´ 나를 ì´ë ‡ê²Œ ë‚´ ì¸ê²©ì„ ì´ë ‡ê²Œ 파괴하였는가. +그렇지 아니하면 ë‚´ ìžì¡´ì‹¬ì´ë¼ëŠ” 것ì´ë‚˜, ì˜ì§€ë ¥ì´ë¼ëŠ” 것ì´ë‚˜, ì¸ê²©ì´ë¼ëŠ” ê²ƒì´ ëª¨ë‘ ì„¸ìƒì˜ 습관과 ì‚¬ì¡°ì— íœ©ì“¸ë¦¬ë˜ ê²ƒì¸ê°€. ë‚¨ë“¤ì´ ê·¸ëŸ¬ë‹ˆê¹Œ ë‚¨ë“¤ì´ ì˜³ë‹¤ë‹ˆê¹Œ ë‚¨ë“¤ì´ ë¬´ì„œìš°ë‹ˆê¹Œ ì´ ì• ìš•ì˜ ë¬´ë¤ì— 회를 ë°œëžë˜ 것ì¸ê°€. 그러다가 ê³ ë…ê³¼ ë°˜ì„±ì˜ ê¸°íšŒë¥¼ 얻으매 모든 회칠과 ê°€ë©´ì„ ë–¼ì–´ 버리고 ë¹¨ê°€ë²—ì€ ì• ìš•ì˜ ë­‰í……ì´ê°€ 나온 것ì¸ê°€. +그렇다 하면, ì´ê²ƒì´ ì°¸ëœ ë‚˜ì¸ê°€. ì´ê²ƒì´ 하나님께서 지어 주신 ëŒ€ë¡œì˜ ë‚˜ì¸ê°€. ê°€ìŠ´ì— íƒ€ì˜¤ë¥´ëŠ” ì• ìš•ì˜ ë¶ˆê¸¸ ì´ ë¶ˆê¸¸ì´ ê³§ ë‚´ ì˜í˜¼ì˜ 불길ì¸ê°€. +어쩌면 ê·¸ 모든 ë†’ì€ ì´ìƒë“¤ ì¸ë¥˜ì— 대한, ë¯¼ì¡±ì— ëŒ€í•œ, ë„ë•ì— 대한, ì‹ ì•™ì— ëŒ€í•œ ê·¸ ë†’ì€ ì´ìƒë“¤ì´ ì´ë ‡ê²Œë„ 만만하게 마치 ë°”ëžŒì— ë¶ˆë¦¬ëŠ” 재 모양으로 ìžì·¨ë„ ì—†ì´ í©ì–´ì ¸ 버리고 ë§ê¹Œ. 그리고 ê·¸ ë’¤ì—는 í‰ì†Œì—ê·¸ë ‡ê²Œë„ ë¯¸ì›Œí•˜ê³  천히 ì—¬ê¸°ë˜ ì• ìš•ì˜ ê²€ì€ í™ë§Œ 남고 ë§ê¹Œ. +ì•„ì•„ ì € 눈 ë®ì¸ ë•…ì´ì—¬, 차고 ë§‘ì€ ë‹¬ì´ì—¬, 허공ì´ì—¬! 나는 너í¬ë“¤ì„ 부러워하노ë¼. +불êµë„ë“¤ì˜ í•´íƒˆì´ë¼ëŠ” ê²ƒì´ ì´ëŸ¬í•œ ì• ìš•ì´ ë¶ˆë¶™ëŠ” 지옥ì—ì„œ 눈과 ê°™ì´ ì‹¸ëŠ˜í•˜ê³  허공과 ê°™ì´ ë¹ˆ 곳으로 들어ê°ì„ ì´ë¦„ì¸ê°€. +ì„ê°€ì˜ íŒ” ë…„ ê°„ 설산 ê³ í–‰ì´ ì´ ì• ìš•ì˜ ë¿Œë¦¬ë¥¼ ëŠìœ¼ë ¤ 함ì´ë¼ 하고 ì˜ˆìˆ˜ì˜ ì‚¬ì‹­ ì¼ ê´‘ì•¼ì˜ ê³ í–‰ê³¼ ê²Ÿì„¸ë§ˆë„¤ì˜ ê³ ë¯¼ë„ ì´ ì• ìš•ì˜ ë¿Œë¦¬ 때문ì´ì—ˆë˜ê°€. +그러나 ê·¸ê²ƒì„ ì´ê¸°ì–´ 낸 ì‚¬ëžŒì´ ì²œì§€ 개벽 ì´ëž˜ì— 몇몇ì´ë‚˜ ë˜ì—ˆëŠ”ê³ ? 나 ê°™ì€ ê²ƒì´ ê·¸ ì¤‘ì— í•œ 사람 ë˜ê¸°ë¥¼ 바랄 수가 있ì„까. +나 같아서는 마침내 ì´ ì• ìš•ì˜ ë¶ˆê¸¸ì— ë‹¤ 타서 재가 ë˜ì–´ 버릴 것만 같다. ì•„ì•„ 어떻게나 힘있고 무서운 불길ì¸ê³ ." +ì´ëŸ¬í•œ ê³ ë¯¼ì˜ ìžë°±ë„ 있었다. +ë˜ ì–´ë–¤ ë‚  ì¼ê¸°ì—는 최ì„ì€ ì´ëŸ° ë§ì„ ì¼ë‹¤. +"나는 단연히 ë™ê²½ìœ¼ë¡œ ëŒì•„가기를 결심하였다." +그리고는 ê·¸ ì´íŠ¿ë‚ ì€, +"나는 단연히 ë™ê²½ìœ¼ë¡œ ëŒì•„가리란 ê²°ì‹¬ì„ í•œ ê²ƒì„ êµ³ì„¸ê²Œ 취소한다. 나는 ì´ëŸ¬í•œ ê²°ì‹¬ì„ í•˜ëŠ” 나 ìžì‹ ì„ 굳세게 부ì¸í•œë‹¤." +ë˜ ì´ëŸ° ë§ë„ 있다. +"나는 ì •ìž„ì„ ì‹œë² ë¦¬ì•„ë¡œ 부르련다." +ë˜ ê·¸ 다ìŒì—는, +"ì•„ì•„ 나는 í•˜ë£¨ë°”ì‚ ì£½ì–´ì•¼ 한다. ì´ ëª©ìˆ¨ì„ ì—°ìž¥í•˜ì˜€ë‹¤ê°€ëŠ” 무슨 ì¼ì„ 저지를는지 모른다. 나는 깨ë—하게 나를 ì´ê¸°ëŠ” ë„ë•ì  ì¸ê²©ìœ¼ë¡œ ì´ ì¼ìƒì„ 마ì³ì•¼ 한다. ì´ ë°–ì— ë‚´ ì‚¬ì—…ì´ ë¬´ì—‡ì´ëƒ." +ë˜ ì–´ë–¤ ê³³ì—는, +"ì•„ì•„ 무서운 하룻밤ì´ì—ˆë‹¤. 나는 지난 í•˜ë£»ë°¤ì„ ëˆ„ë¥¼ 수 없는 ì• ìš•ì˜ ë¶ˆê¸¸ì— íƒ”ë‹¤. 나는 ë‚´ 주먹으로 ë‚´ ê°€ìŠ´ì„ ë‘드리고 머리를 ë²½ì— ë¶€ë”ªì³¤ë‹¤. 나는 주먹으로 ë‹´ë²½ì„ ë‘드려 ì†ë“±ì´ 터져서 피가 í˜ë €ë‹¤. 나는 ë‚´ 머리카ë½ì„ ì¥ì–´ëœ¯ì—ˆë‹¤. 나는 ìˆ˜ì—†ì´ ë°œì„ êµ´ë €ë‹¤. 나는 ì´ ë¬´ì„œìš´ ìœ í˜¹ì„ ì´ê¸°ë ¤ê³  ë‚´ ëª¸ì„ ì•„í”„ê²Œ 하였다. 나는 견디다 못하여 ë¬¸ì„ ë°•ì°¨ê³  뛰어나갔다. ë°–ì—는 ë‹¬ì´ ìžˆê³  ëˆˆì´ ìžˆì—ˆë‹¤. 그러나 ëˆˆì€ í•ë¹›ì´ìš”, ë‹¬ì€ ì°Œê·¸ëŸ¬ì§„ 것 같았다. 나는 눈 ì†ìœ¼ë¡œ 달ìŒë°•ì§ˆì³¤ë‹¤. ë‹¬ì„ ë”°ë¼ì„œ 엎드러지며 ìžë¹ ì§€ë©° 달ìŒì§ˆì³¤ë‹¤. 나는 소리를 질렀다. 나는 미친 사람 같았다." +그러고는 어디까지 갔다가 ì–´ëŠ ë•Œì— ì–´ë– í•œ ì‹¬ê²½ì˜ ë³€í™”ë¥¼ 얻어 가지고 ëŒì•„왔다는 ë§ì€ ì“°ì´ì§€ 아니하였으나 최ì„ì˜ ë³‘ì˜ ì›ì¸ì„ 설명하는 것 같았다. +"ì—´ì´ ë‚˜ê³  ê¸°ì¹¨ì´ ë‚œë‹¤. ê°€ìŠ´ì´ ì•„í”„ë‹¤. ì´ê²ƒì´ íë ´ì´ ë˜ì–´ì„œ í˜¼ìž ê¹¨ë—하게 ì´ ìƒëª…ì„ ë§ˆì¹˜ê²Œ 하여 주소서 하고 빈다. 나는 오늘부터 먹고 마시기를 그치련다." +ì´ëŸ¬í•œ ë§ì„ ì¼ë‹¤. 그러고는, +"ì •ìž„, ì •ìž„, ì •ìž„, ì •ìž„." +하고 ì •ìž„ì˜ ì´ë¦„ì„ ìˆ˜ì—†ì´ ì“´ ê²ƒë„ ìžˆê³ , ì–´ë–¤ ë°ëŠ”, +"Overcome, Overcome." +하고 ì˜ì–´ë¡œ ì“´ ê²ƒë„ ìžˆì—ˆë‹¤. +그리고 마지막ì—, +"나는 죽ìŒê³¼ 대면하였다. 사í˜ì§¸ 굶고 ì•“ì€ ì˜¤ëŠ˜ì— ë‚˜ëŠ” 극히 맑고 침착한 정신으로 죽ìŒê³¼ 대면하였다. 죽ìŒì€ ê²€ì€ ì˜·ì„ ìž…ì—ˆìœ¼ë‚˜ ê·¸ 얼굴ì—는 ìžë¹„ì˜ í‘œì •ì´ ìžˆì—ˆë‹¤. 죽ìŒì€ 곧 ê²€ì€ ì˜·ì„ ìž…ì€ êµ¬ì›ì˜ ì†ì´ì—ˆë‹¤. 죽ìŒì€ 아름다운 그림ìžì˜€ë‹¤. 죽ìŒì€ 반가운 ì• ì¸ì´ìš”, ê²°ì½” 무서운 ì›ìˆ˜ê°€ 아니었다. 나는 죽ìŒì˜ ì†ì„ ìž¡ë…¸ë¼. ê°ì‚¬í•˜ëŠ” 마ìŒìœ¼ë¡œ 죽ìŒì˜ í’ˆì— ì•ˆê¸°ë…¸ë¼. 아멘." +ì´ê²ƒì„ ì“´ ë’¤ì—는 다시는 ì¼ê¸°ê°€ 없었다. ì´ê²ƒìœ¼ë¡œ 최ì„ì´ê°€ ê·¸ ë™ì•ˆ 지난 ì¼ì„ ì ì–´ë„ ì‹¬ë¦¬ì  ë³€í™”ë§Œì€ ëŒ€ê°• 추측할 수가 있었다. +다행히 최ì„ì˜ ë³‘ì€ ì ì  ëŒë¦¬ëŠ” 듯하였다. ì—´ë„ ë‚´ë¦¬ê³  ì‹ì€ë•€ë„ ëœ í˜ë ¸ë‹¤. 안 먹는다고 ê³ ì§‘í•˜ë˜ ìŒì‹ë„ 먹기를 시작하였다. +ì •ìž„ì—게로 ê°”ë˜ ë…¸íŒŒì—게서는 ì •ìž„ë„ ì—´ì´ ë‚´ë¦¬ê³  ì¼ì–´ë‚˜ ì•‰ì„ ë§Œí•˜ë‹¤ëŠ” 편지가 왔다. +나는 ë…¸íŒŒì˜ íŽ¸ì§€ë¥¼ 최ì„ì—게 ì½ì–´ 주었다. 최ì„ì€ ê·¸ 편지를 듣고 매우 í¥ë¶„하는 모양ì´ì—ˆìœ¼ë‚˜ 곧 안심하는 ë¹›ì„ ë³´ì˜€ë‹¤. +나는 최ì„ì˜ ë³‘ì´ ëŒë¦¬ëŠ” ê²ƒì„ ë³´ê³  ì •ìž„ì„ ì°¾ì•„ë³¼ 양으로 떠나려 하였으나 순임ì´ê°€ 듣지 아니하였다. 혼ìžì„œ 앓는 아버지를 맡아 가지고 ìžˆì„ ìˆ˜ëŠ” 없다는 것ì´ì—ˆë‹¤. 그래서 노파가 오기를 기다리기로 하였다. +나는 최ì„ì´ê°€ ë¨¹ì„ ìŒì‹ë„ ì‚´ 겸 우편국ì—ë„ ë“¤ë¥¼ 겸 시가까지 가기로 하고 ì´ ê³³ 온 지 ì¼ ì£¼ì¼ì´ë‚˜ 지나서 처ìŒìœ¼ë¡œ ì‚°ì—ì„œ 나왔다. +나는 ì´ë¥´ì¿ ì¸ í¬ì— 가서 최ì„ì„ ìœ„í•˜ì—¬ 약품과 ë¨¹ì„ ê²ƒì„ ì‚¬ê³  ë˜ ìˆœìž„ì„ ìœ„í•´ì„œë„ ë¨¹ì„ ê²ƒê³¼ ì˜ë³µê³¼ ë˜ í•˜ëª¨ë‹ˆì¹´ì™€ ì†í’ê¸ˆë„ ì‚¬ 가지고 ì •ê±°ìž¥ì— ë‚˜ì™€ì„œ ëŒì•„올 차를 기다리고 있었다. +나는 순후해 ë³´ì´ëŠ” ì•„ë¼ì‚¬ ì‚¬ëžŒë“¤ì´ ì •ê±°ìž¥ì—ì„œ 오ë½ê°€ë½í•˜ëŠ” ê²ƒì„ ë³´ê³  ì†ìœ¼ë¡œëŠ” 최ì„ì´ê°€ ë³‘ì´ ì¢€ ë‚˜ì€ ê²ƒì„ ë‹¤í–‰ìœ¼ë¡œ ìƒê°í•˜ê³ , ë˜ ìµœì„ê³¼ ì •ìž„ì˜ ìž¥ëž˜ê°€ ì–´ì°Œ ë ê¹Œ 하는 ê²ƒë„ ìƒê°í•˜ë©´ì„œ 뷔페(ì‹ë‹¹)ì—ì„œ 뜨거운 ì°¨ì´(ì°¨)를 마시고 있었다. +ì´ ë•Œì— ë°–ì„ ë°”ë¼ë³´ê³  ìžˆë˜ ë‚´ ëˆˆì€ ë¬¸ë“ ì´ìƒí•œ ê²ƒì„ ë³´ì•˜ë‹¤. ê·¸ê²ƒì€ ê·¸ 노파가 ì´ë¦¬ë¡œ 향하고 걸어오는 것ì¸ë° ê·¸ 노파와 íŒ”ì„ ê±¸ì€ ì Šì€ ì—¬ìžê°€ 있는 것ì´ë‹¤. 머리를 ê²€ì€ ìˆ˜ê±´ìœ¼ë¡œ 싸매고 ìž…ê³¼ 코를 가리웠으니 분명히 ì•Œ 수 없으나 í˜¹ì€ ì •ìž„ì´ë‚˜ 아닌가 í•  ìˆ˜ë°–ì— ì—†ì—ˆë‹¤. ì •ìž„ì´ê°€ 몸만 기ë™í•˜ê²Œ ë˜ë©´ 최ì„ì„ ë³´ëŸ¬ 올 ê²ƒì€ ì •ìž„ì˜ ì—´ì •ì ì¸ 성격으로 ë³´ì•„ì„œ 당연한 ì¼ì´ê¸° 때문ì´ì—ˆë‹¤. +나는 반쯤 ë¨¹ë˜ ì°¨ë¥¼ 놓고 뷔페 밖으로 뛰어나갔다. +"오 미시즈 체스터필드?" +하고 나는 노파 ì•žì— ì†ì„ 내어밀었다. 노파는 체스터필드ë¼ëŠ” 미국 ë‚¨íŽ¸ì˜ ì„±ì„ ë”°ë¼ì„œ 부르는 ê²ƒì„ ê¸°ì–µí•˜ì˜€ë‹¤. +"ì„ ìƒë‹˜!" +하는 ê²ƒì€ ì •ìž„ì´ì—ˆë‹¤. ê·¸ ì†Œë¦¬ë§Œì€ ë³€ì¹˜ 아니하였다. 나는 ê²€ì€ ìž¥ê°‘ì„ ë‚€ ì •ìž„ì˜ ì†ì„ 잡았다. 나는 여러 ë§ ì•„ë‹ˆí•˜ê³  노파와 ì •ìž„ì„ ë·”íŽ˜ë¡œ ëŒê³  들어왔다. +ëŠ™ì€ ë·”íŽ˜ ë³´ì´ëŠ” 번ì©ë²ˆì©í•˜ëŠ” 사모바르ì—ì„œ ì°¨ ë‘ ìž”ì„ ë”°ë¼ë‹¤ê°€ 노파와 ì •ìž„ì˜ ì•žì— ë†“ì•˜ë‹¤. +노파는 어린애ì—게 하는 모양으로 ì •ìž„ì˜ ìˆ˜ê±´ì„ ë²—ê²¨ 주었다. ê·¸ ì†ì—서는 해쓱하게 여윈 ì •ìž„ì˜ ì–¼êµ´ì´ ë‚˜ì™”ë‹¤. ë‘ ë³¼ì— ë¶ˆê·¸ë ˆí•˜ê²Œ í™í›ˆì´ ë„는 ê²ƒë„ ë³‘ 때문ì¸ê°€. +"ì–´ë•Œ? ì‹ ì—´ì€ ì—†ë‚˜?" +하고 나는 ì •ìž„ì—게 물었다. +"괜찮아요." +하고 ì •ìž„ì€ ì›ƒìœ¼ë©°, +"최 ì„ ìƒë‹˜ê»˜ì„œëŠ” 어떠세요?" +하고 묻는다. +"좀 나으신 모양ì´ì•¼. 그래서 나는 오늘 ì •ìž„ì„ ì¢€ 보러 가려고 í–ˆëŠ”ë° ì´ ì²´ìŠ¤í„°í•„ë“œ 부ì¸ê»˜ì„œ 아니 오시면 순임ì´ê°€ í˜¼ìž ìžˆì„ ìˆ˜ê°€ 없다고 í•´ì„œ, 그래 ì´ë ‡ê²Œ 최 ì„ ìƒ ìžì‹¤ ê²ƒì„ ì‚¬ 가지고 가는 길ì´ì•¼." +하고 ë§ì„ í•˜ë©´ì„œë„ ë‚˜ëŠ” ì •ìž„ì˜ ëˆˆê³¼ ìž…ê³¼ 목ì—ì„œ ê·¸ì˜ ë³‘ê³¼ 마ìŒì„ 알아보려고 애를 ì¼ë‹¤. +ì¤‘ë³‘ì„ ì•“ì€ ê¹ í•´ì„œëŠ” í•œ 달 ì „ 남대문서 ë³¼ 때보다 얼마 ë” ì´ˆì·Œí•œ 것 같지는 아니하였다. +"네ì—." +하고 ì •ìž„ì€ ê³ ê°œë¥¼ 숙였다. ê·¸ì˜ ì•ˆê²½ì•Œì—는 ì´ìŠ¬ì´ 맺혔다. +"ì„ ìƒë‹˜ ëŒì€ 다 안녕하셔요?" +"ì‘, ë‚´ê°€ ë– ë‚  ë•Œì—는 괜찮았어." +"최 ì„ ìƒë‹˜ ëŒë„?" +"ì‘." +"ì„ ìƒë‹˜ í½ì€ 애를 쓰셨어요." +하고 ì •ìž„ì€ ìš¸ìŒì¸ì§€ 웃ìŒì¸ì§€ 모를 웃ìŒì„ 웃는다. +ë§ì„ 모르는 노파는 우리가 하는 ë§ì„ 눈치나 채려는 ë“¯ì´ ë©€ê±°ë‹ˆ ë³´ê³  있다가 서투른 ì˜ì–´ë¡œ, +"ì•„ì§ ë¯¸ìŠ¤ ë‚¨ì€ ì‹ ì—´ì´ ìžˆë‹µë‹ˆë‹¤. ê·¸ëž˜ë„ ê°€ 본다고, ì£½ì–´ë„ ê°€ 본다고 ë‚´ ë§ì„ 안 듣고 ë”°ë¼ì™”지요." +하고 ì •ìž„ì—게 ì• ì • 있는 눈í˜ê¹€ì„ 주며, +"유 노티 ì°¨ì¼ë“œ(ë§ì½ê¾¼ì´)." +하고 ìž…ì„ ì”°ë£©í•˜ë©° ì •ìž„ì„ ì•ˆê²½ 위로 본다. +"니체워, 마뚜슈까(괜찮아요, 어머니)." +하고 ì •ìž„ì€ ë…¸íŒŒë¥¼ ë³´ê³  웃었다. ì •ìž„ì˜ ì„œì–‘ 사람ì—게 대한 í–‰ë™ì€ 서양ì‹ìœ¼ë¡œ 째었다고 ìƒê°í•˜ì˜€ë‹¤. +ì •ìž„ì€ ë„리어 유쾌한 ë¹›ì„ ë³´ì˜€ë‹¤. 다만 ê·¸ì˜ ë¶‰ì€ë¹› ë¤ ëˆˆê³¼ 마른 ìž…ìˆ ì´ ê·¸ì˜ ëª¸ì— ì—´ì´ ìžˆìŒì„ 보였다. 나는 ê·¸ì˜ ì†ëê³¼ ë°œëì´ ì‹¸ëŠ˜í•˜ê²Œ ì–¼ì—ˆì„ ê²ƒì„ ìƒìƒí•˜ì˜€ë‹¤. +마침 ì´ ë‚ ì€ ë‚ ì´ ì˜¨í™”í•˜ì˜€ë‹¤. ì—·ì€ í–‡ë¹›ë„ ì˜¤ëŠ˜ì€ ë‘꺼워진 듯하였다. +우리 세 ì‚¬ëžŒì€ Fì—­ì—ì„œ 내려서 ì°ë§¤ 하나를 얻어 타고 산으로 향하였다. ì‚°ë„ ì•„ë‹ˆì§€ë§ˆëŠ” ì‚° 있는 나ë¼ì—ì„œ ì‚´ë˜ ìš°ë¦¬ëŠ” 최ì„ì´ê°€ 사는 ê³³ì„ ì‚°ì´ë¼ê³  부르는 ìŠµê´€ì„ ì§€ì—ˆë‹¤. ì‚¼ë¦¼ì´ ìžˆìœ¼ë‹ˆ ì‚°ê°™ì´ ìƒê°ëœ 까닭ì´ì—ˆë‹¤. +노파가 오른편 ëì— ì•‰ê³ , 가운ë°ë‹¤ê°€ ì •ìž„ì„ ì•‰ížˆê³  왼편 ëì— ë‚´ê°€ 앉았다. +ì©Ÿì©Ÿì©Ÿ 하는 ì†Œë¦¬ì— ë§ì€ 달리기 시작하였다. í•œ í•„ì€ í‚¤ í° ë§ì´ìš”, í•œ í•„ì€ í‚¤ê°€ ìž‘ì€ ë§ì¸ë° 키 í° ë§ì€ 아마 ëŠ™ì€ êµ°ë§ˆ 퇴물ì¸ê°€ 싶게 허우대는 좋으나 ëª¸ì´ ì—¬ìœ„ê³  털ì—는 ìœ¤ì´ ì—†ì—ˆë‹¤. 조금만 올ë¼ê°€ëŠ” ê¸¸ì´ ë˜ì–´ë„ 고개를 숙ì´ê³  애를 ì¼ë‹¤. ìž‘ì€ ë§ì€ 까불어서 ê°€ë” ì±„ì°ìœ¼ë¡œ 얻어맞았다. +"ì•„ì´ ì‚¼ë¦¼ì´ ì¢‹ì•„ìš”." +하고 ì •ìž„ì€ ì •ë§ ê¸°ìœ ë“¯ì´ ë‚˜ë¥¼ ëŒì•„보았다. +"좋아?" +하고 나는 ë©‹ì—†ì´ ëŒ€ê¾¸í•˜ê³  나서, 후회ë˜ëŠ” 듯ì´, +"밤낮 삼림 ì†ì—서만 사니까 지루한ë°." +하는 ë§ì„ 붙였다. +"저는 ì € 눈 있는 삼림 ì†ìœ¼ë¡œ 한정 ì—†ì´ ê°€ê³  싶어요. 그러나 저는 ì¸ì œ ê¸°ìš´ì´ ì—†ìœ¼ë‹ˆê¹ ì›¬ê±¸ 그래 ë³´ê² ì–´ìš”?" +하고 í•œìˆ¨ì„ ì‰¬ì—ˆë‹¤. +"왜 그런 소릴 í•´. ì¸ì œ 나ì„걸." +하고 나는 ì •ìž„ì˜ ëˆˆì„ ë“¤ì—¬ë‹¤ë³´ì•˜ë‹¤. 마치 슬픈 눈물 방울ì´ë‚˜ 찾으려는 듯ì´. +"제가 ì§€ê¸ˆë„ ì—´ì´ ì‚¼ì‹­íŒ” ë„ê°€ 넘습니다. ì •ì‹ ì´ í릿해지는 ê²ƒì„ ë³´ë‹ˆê¹Œ 아마 ë” ì˜¬ë¼ê°€ë‚˜ ë´ìš”. ê·¸ëž˜ë„ ê´œì°®ì•„ìš”. 오늘 하루야 못 ì‚´ë¼ê³ ìš”. 오늘 하루만 ì‚´ë©´ 괜찮아요. 최 ì„ ìƒë‹˜ë§Œ í•œ 번 뵙고 죽으면 괜찮아요." +"왜 그런 소릴 í•´?" +하고 나는 ì±…ë§í•˜ëŠ” ë“¯ì´ ì–¸ì„±ì„ ë†’ì˜€ë‹¤. +ì •ìž„ì€ ê¸°ì¹¨ì„ ì‹œìž‘í•˜ì˜€ë‹¤. 한바탕 ê¸°ì¹¨ì„ í•˜ê³ ëŠ” ê¸°ìš´ì´ ì§„í•œ ë“¯ì´ ë…¸íŒŒì—게 기대며 ì¡°ì„ ë§ë¡œ, +"추워요." +하였다. ì´ ì—¬í–‰ì´ ì–´ë–»ê²Œ ì •ìž„ì˜ ë³‘ì— ì¢‹ì§€ 못할 ê²ƒì€ ì˜ì‚¬ê°€ ì•„ë‹Œ ë‚˜ë¡œë„ ì§ìž‘í•  수가 있었다. 그러나 나로는 ë” ì–´ì°Œí•  수가 없었다. +나는 외투를 ë²—ì–´ì„œ ì •ìž„ì—게 입혀 주고 노파는 ì •ìž„ì„ ì•ˆì•„ì„œ ëª¸ì´ ëœ í”들리ë„ë¡ ë˜ ì¶¥ì§€ ì•Šë„ë¡ í•˜ì˜€ë‹¤. +나는 ì •ìž„ì˜ ëª¨ì–‘ì„ ì• ì²˜ë¡œì›Œì„œ 차마 ë³¼ 수가 없었다. 그러나 ì´ê²ƒì€ 하나님밖ì—는 어찌할 ë„리가 없는 ì¼ì´ì—ˆë‹¤. +얼마를 지나서 ì •ìž„ì€ ê°‘ìžê¸° 고개를 들고 ì¼ì–´ë‚˜ë©°, +"ì¸ì œ ëª¸ì´ ì¢€ 녹았습니다. ì„ ìƒë‹˜ 추우시겠어요. ì´ ì™¸íˆ¬ 입으셔요." +하고 ê·¸ì˜ ìž…ë§Œ 웃는 웃ìŒì„ 웃었다. +"ë‚œ 춥지 ì•Šì•„. ì–´ì„œ ìž…ê³  있어." +하고 나는 ì •ìž„ì´ê°€ 외투를 벗는 ê²ƒì„ ë§‰ì•˜ë‹¤. ì •ìž„ì€ ë” ê³ ì§‘í•˜ë ¤ê³ ë„ ì•„ë‹ˆí•˜ê³ , +"ì„ ìƒë‹˜ ì‹œë² ë¦¬ì•„ì˜ ì‚¼ë¦¼ì€ ì°¸ 좋아요. 눈 ë®ì¸ ê²ƒì´ ë” ì¢‹ì€ ê²ƒ 같아요. 저는 ì´ ì¸ì  없고 ìžìœ ë¡œìš´ 삼림 ì†ìœ¼ë¡œ 헤매어 ë³´ê³  싶어요." +하고 아까 í•˜ë˜ ê²ƒê³¼ ê°™ì€ ë§ì„ ë˜ í•˜ì˜€ë‹¤. +"ë©°ì¹  잘 정양하여서, ë‚ ì´ë‚˜ 따뜻하거든 í•œ 번 산보나 í•´ 보지." +하고 나는 ì •ìž„ì˜ ë§ ëœ»ì´ ë‹¤ë¥¸ ë° ìžˆëŠ” ì¤„ì„ ì•Œë©´ì„œë„ ë¶€ëŸ¬ í‰ë²”하게 대답하였다. +ì •ìž„ì€ ëŒ€ë‹µì´ ì—†ì—ˆë‹¤. +"ì—¬ê¸°ì„œë„ ì•„ì§ ë©€ì–´ìš”?" +하고 ì •ìž„ì€ ëª¸ì´ í”들리는 ê²ƒì„ ì‹¬ížˆ 괴로워하는 모양으로 ë‘ ì†ì„ ìžë¦¬ì— 짚어 ëª¸ì„ ë²„í‹°ë©´ì„œ ë§í•˜ì˜€ë‹¤. +"고대야, 최 ì„ ìƒì´ 반가워할 í„°ì´ì§€. 오죽ì´ë‚˜ 반갑겠나." +하고 나는 ì •ìž„ì„ ìœ„ë¡œí•˜ëŠ” 뜻으로 ë§í•˜ì˜€ë‹¤. +"ì•„ì´ ì°¸ 미안해요. 제가 죄ì¸ì´ì•¼ìš”. ì € ë•Œë¬¸ì— ì• ë§¤í•œ ëˆ„ëª…ì„ ì“°ì‹œê³  저렇게 ì‚¬ì—…ë„ ë²„ë¦¬ì‹œê³  병환까지 나시니 저는 어떡허면 ì´ ì£„ë¥¼ 씻습니까?" +하고 눈물 ê³ ì¸ ëˆˆìœ¼ë¡œ ì •ìž„ì€ ë‚˜ë¥¼ ì³ë‹¤ë³´ì•˜ë‹¤. +나는 ì •ìž„ê³¼ 최ì„ì„ ì´ ìžìœ ë¡œìš´ ì‹œë² ë¦¬ì•„ì˜ ì‚¼ë¦¼ ì†ì— ë‹¨ë‘˜ì´ ì‚´ê²Œ 하고 싶었다. 그러나 최ì„ì€ ì‚´ì•„ë‚˜ê°€ê² ì§€ë§ˆëŠ” ì •ìž„ì´ê°€ ì‚´ì•„ë‚  수가 있ì„까, 하고 나는 ì •ìž„ì˜ ì–´ê¹¨ë¥¼ ë°”ë¼ë³´ì•˜ë‹¤. ê·¸ì˜ ëª©ìˆ¨ì€ ì‹¤ë‚± ê°™ì€ ê²ƒ 같았다. 바람받ì´ì— ë†“ì¸ ë“±ìž”ë¶ˆê³¼ë§Œ ê°™ì€ ê²ƒ 같았다. ì´ ëª©ìˆ¨ì´ ëŠì–´ì§€ê¸° ì „ì— ì‚¬ëž‘í•˜ëŠ” ì´ì˜ ì–¼êµ´ì„ í•œ 번 대하겠다는 ê²ƒë°–ì— ì•„ë¬´ 소ì›ì´ 없는 ì •ìž„ì€ ì°¸ìœ¼ë¡œ 가엾어서 ê°€ìŠ´ì´ ë¯¸ì–´ì§€ëŠ” 것 같았다. +"염려 ë§ì–´. 무슨 걱정ì´ì•¼? 최 ì„ ìƒë„ ë³‘ì´ ëŒë¦¬ê³  ì •ìž„ë„ ì¸ì œ 얼마 정양하면 ë‚˜ì„ ê²ƒ 아닌가. 아무 염려 ë§ì•„ìš”." +하고 나는 ë”ìš± 최ì„ê³¼ ì •ìž„ê³¼ ë‘ ì‚¬ëžŒì˜ ì‚¬ëž‘ì„ ë‹¬í•˜ê²Œ í•  ê²°ì‹¬ì„ í•˜ì˜€ë‹¤. 하나님께서 계시다면 ì´ ê°€ì—¾ì€ ê°„ì ˆí•œ ë‘ ì‚¬ëžŒì˜ ë§ˆìŒì„ 가슴 미어지게 아니 ìƒê°í•  리가 없다고 ìƒê°í•˜ì˜€ë‹¤. ìš°ì£¼ì˜ ëª¨ë“  ì¼ ì¤‘ì— ì •ìž„ì˜ ì •ê²½ë³´ë‹¤ ë” ìŠ¬í”„ê³  불ìŒí•œ ì •ê²½ì´ ë˜ ìžˆì„까 하였다. 차디찬 눈으로 ë®ì¸ ì‹œë² ë¦¬ì•„ì˜ ê´‘ì•¼ì— ë³‘ë“  ì •ìž„ì˜ ì‚¬ëž‘ìœ¼ë¡œ 타는 불똥과 ê°™ì´ ë‚ ì•„ê°€ëŠ” ì´ ì •ê²½ì€ ì¸ìƒì´ 가질 수 있는 최대한 ë¹„ê·¹ì¸ ê²ƒ 같았다. +ì •ìž„ì€ ì§€ì³ì„œ 고개를 숙ì´ê³  ìžˆë‹¤ê°€ë„ ê°€ë” ê³ ê°œë¥¼ 들어서는 기운 나는 ì–‘ì„ ë³´ì´ë ¤ê³ , 유쾌한 ì–‘ì„ ë³´ì´ë ¤ê³  애를 ì¼ë‹¤. +"ì € 나무 보셔요. 오백 ë…„ì€ ì‚´ì•˜ê² ì§€ìš”?" +ì´ëŸ° ë§ë„ 하였다. 그러나 ê·¸ê²ƒì€ ë‹¤ 억지로 지어서 하는 것ì´ì—ˆë‹¤. 그러다가는 ë˜ ê¸°ìš´ì´ ì§€ì³ì„œëŠ” 고개를 숙ì´ê³ , í˜¹ì€ ë…¸íŒŒì˜ ì–´ê¹¨ì— í˜¹ì€ ë‚´ ì–´ê¹¨ì— ì“°ëŸ¬ì¡Œë‹¤. +마침내 우리가 향하고 가는 ì›€ì§‘ì´ ë³´ì˜€ë‹¤. +"ì •ìž„ì´, 저기야." +하고 나는 ì›€ì§‘ì„ ê°€ë¦¬ì¼°ë‹¤. +"네ì—?" +하고 ì •ìž„ì€ ë‚´ ì†ê°€ë½ 가는 ê³³ì„ ë³´ê³  다ìŒì—는 ë‚´ ì–¼êµ´ì„ ë³´ì•˜ë‹¤. 잘 ë³´ì´ì§€ 않는 모양ì´ë‹¤. +"저기 저것 ë§ì•¼. 저기 ì € ê³ ìž‘ í° ì „ë‚˜ë¬´ ë‘ ê°œê°€ 있지 ì•Šì•„? ê·¸ 사ì´ë¡œ ë³´ì´ëŠ” ì €, 저거 ë§ì•¼. 옳지 옳지, ìˆœìž„ì´ ì§€ê¸ˆ 나오지 ì•Šì•„?" +하였다. +순임ì´ê°€ ë¬´ì—‡ì„ ê°€ì§€ëŸ¬ 나오는지 ë¬¸ì„ ì—´ê³  나와서는 ë°¥ 짓ëŠë¼ê³  지어 ë†“ì€ ì´ë¥¼í…Œë©´ 부엌ì—를 들어갔다가 나오는 ê¸¸ì— ì´ ìª½ì„ ë°”ë¼ë³´ë‹¤ê°€ 우리를 발견하였는지 몇 ê±¸ìŒ ë¹¨ë¦¬ 오다가는 서서 ë³´ê³  오다가는 서서 ë³´ë”니 ë‚´ê°€ 모ìžë¥¼ ë‚´ë‘르는 ê²ƒì„ ë³´ê³ ì•¼ 우리 ì¼í–‰ì¸ ê²ƒì„ í™•ì‹¤ížˆ 알고 달ìŒë°•ì§ˆì„ ì³ì„œ 나온다. +우리 ì°ë§¤ë¥¼ 만나ìž, +"ì •ìž„ì´ì•¼? 어쩌면 ì´ ì¶”ìš´ë°." +하고 ìˆœìž„ì€ ì •ìž„ì„ ì•ˆê³  ê·¸ 안경으로 ì •ìž„ì˜ ëˆˆì„ ë“¤ì—¬ë‹¤ë³¸ë‹¤. +"어쩌면 앓으면서 ì´ë ‡ê²Œ 와?" +하고 ìˆœìž„ì€ ë…¸íŒŒì™€ 나를 ì±…ë§í•˜ëŠ” ë“¯ì´ ëŒì•„보았다. +"아버지 ì–´ë– ì‹œëƒ?" +하고 나는 ì§ì„ 들고 앞서서 오면서 뒤따르는 순임ì—게 물었다. +"아버지요?" +하고 ìˆœìž„ì€ ì–´ë¥¸ì—게 대한 ê²½ì˜ë¥¼ 표하노ë¼ê³  ë‚´ ê³ì— 와서 걸으며, +"아버지께서 ì˜¤ëŠ˜ì€ ë§ì”€ì„ ë§Žì´ í•˜ì…¨ì–´ìš”. 순임ì´ê°€ ê³ ìƒí•˜ëŠ”구나 고맙다, ì´ëŸ° ë§ì”€ë„ 하시고, 지금 같아서는 ì¼ì–´ë‚  ê²ƒë„ ê°™ì€ë° ê¸°ìš´ì´ ì—†ì–´ì„œ, ì´ëŸ° ë§ì”€ë„ 하시고, ë˜ ì„ ìƒë‹˜ì´ ì´ë¥´ì¿ ì¸ í¬ì—를 들어가셨으니 ë¬´ì—‡ì„ ì‚¬ 오실 듯싶으ëƒ, 알아맞혀 ë³´ì•„ë¼, ì´ëŸ° ë†ë‹´ë„ 하시고, ì •ìž„ì´ê°€ 어떤가 í•œ 번 보았으면, ì´ëŸ° ë§ì”€ë„ 하시겠지요. ë˜ ìˆœìž„ì•„, ë‚´ê°€ 죽ë”ë¼ë„ ì •ìž„ì„ ë„¤ 친ë™ìƒìœ¼ë¡œ 알아서 부디 잘 사랑해 주어ë¼, ì •ìž„ì€ ë¶ˆìŒí•œ 애다, ì°¸ ì •ìž„ì€ ë¶ˆìŒí•´! ì´ëŸ° ë§ì”€ë„ 하시겠지요. 그렇게 여러 가지 ë§ì”€ì„ ë§Žì´ í•˜ì‹œë”니, 순임아 ë‚´ê°€ 죽거든 ì„ ìƒë‹˜ì„ 아버지로 알고 ê·¸ 지ë„를 받아ë¼, 그러시길래 제가 아버지 안 ëŒì•„가셔요! 그랬ë”니 아버지께서 웃으시면서, 죽지 ë§ê¹Œ, 하시고는 어째 ê°€ìŠ´ì´ ì¢€ ê±°ë¶í•œê°€, 하시ë”니 ìž ì´ ë“œì…¨ì–´ìš”. í•œ 시간ì´ë‚˜ ë˜ì—ˆì„까, 온." +집 ì•žì— ê±°ì˜ ë‹¤ 가서는 ìˆœìž„ì€ ì •ìž„ì˜ íŒ”ì„ ê¼ˆë˜ ê²ƒì„ ë†“ê³  빨리 집으로 뛰어들어갔다. +치마í­ì„ 펄럭거리고 뛰는 ì–‘ì—는 ì–´ë ¸ì„ ì  ë§ê´„ëŸ‰ì´ ìˆœìž„ì˜ ëª¨ìŠµì´ ë‚¨ì•„ 있어서 나는 í˜¼ìž ì›ƒì—ˆë‹¤. ìˆœìž„ì€ ì •ìž„ì´ê°€ 왔다는 ê¸°ìœ ì†Œì‹ì„ í•œ ì‹œê°ì´ë¼ë„ 빨리 아버지께 전하고 ì‹¶ì—ˆë˜ ê²ƒì´ë‹¤. +"아버지, 주무시우? ì •ìž„ì´ê°€ 왔어요. ì •ìž„ì´ê°€ 왔습니다." +하고 부르는 소리가 ë°–ì—ì„œë„ ë“¤ë ¸ë‹¤. +ë‚˜ë„ ë°©ì— ë“¤ì–´ì„œê³ , ì •ìž„ë„ ë’¤ë”°ë¼ ë“¤ì–´ì„œê³ , 노파는 부엌으로 ë¬¼ê±´ì„ ë‘러 들어갔다. +ë°©ì€ ì ˆë²½ê°™ì´ ì–´ë‘웠다. +"순임아, ë¶ˆì„ ì¢€ 켜려무나." +하고 최ì„ì˜ ì–¼êµ´ì„ ì°¾ëŠë¼ê³  ëˆˆì„ í¬ê²Œ 뜨고 고개를 숙ì´ë©°, +"ìžë‚˜? ì •ìž„ì´ê°€ 왔네." +하고 불렀다. +ì •ìž„ë„ ê³ì— 와서 선다. +최ì„ì€ ëŒ€ë‹µì´ ì—†ì—ˆë‹¤. +순임ì´ê°€ ì´›ë¶ˆì„ ì¼œìž ìµœì„ì˜ ì–¼êµ´ì´ í™˜í•˜ê²Œ 보였다. +"여보게, ì—¬ë´. ìžë‚˜?" +하고 나는 무서운 예ê°ì„ 가지면서 최ì„ì˜ ì–´ê¹¨ë¥¼ í”들었다. +ê·¸ê²ƒì´ ë¬´ì—‡ì¸ì§€ 모르지마는 최ì„ì€ ì‹œì²´ë¼ í•˜ëŠ” ê²ƒì„ ë‚˜ëŠ” ë‚´ ì†ì„ 통해서 깨달았다. +나는 ê¹œì§ ë†€ë¼ì„œ ì´ë¶ˆì„ 벗기고 최ì„ì˜ íŒ”ì„ ìž¡ì•„ ë§¥ì„ ì§šì–´ 보았다. 거기는 ë§¥ì´ ì—†ì—ˆë‹¤. +나는 최ì„ì˜ ìžë¦¬ì˜· ê°€ìŠ´ì„ í—¤ì¹˜ê³  귀를 ê°€ìŠ´ì— ëŒ€ì—ˆë‹¤. ê·¸ ì‚´ì€ ì–¼ìŒê³¼ ê°™ì´ ì°¨ê³  ê·¸ ê°€ìŠ´ì€ ê³ ìš”í•˜ì˜€ë‹¤. ì‹¬ìž¥ì€ ë›°ê¸°ë¥¼ 그친 것ì´ì—ˆë‹¤. +나는 최ì„ì˜ ê°€ìŠ´ì—ì„œ 귀를 떼고 ì¼ì–´ì„œë©´ì„œ, +"네 아버지는 ëŒì•„가셨다. 네 ì†ìœ¼ë¡œ 눈ì´ë‚˜ ê°ê²¨ 드려ë¼." +하였다. ë‚´ 눈ì—서는 ëˆˆë¬¼ì´ í˜ë €ë‹¤. +"ì„ ìƒë‹˜!" +하고 ì •ìž„ì€ ì „ì—°ížˆ 절제할 íž˜ì„ ìžƒì–´ë²„ë¦° ë“¯ì´ ìµœì„ì˜ ê°€ìŠ´ì— ì—Žì–´ì¡Œë‹¤. 그러고는 소리를 ë‚´ì–´ 울었다. 순임ì€, +"아버지, 아버지!" +하고 최ì„ì˜ ë² ê°œ ê³ì— ì´ë§ˆë¥¼ 대고 울었다. +ì•„ë¼ì‚¬ ë…¸íŒŒë„ ìš¸ì—ˆë‹¤. +ë°© 안ì—는 ì˜¤ì§ ìš¸ìŒ ì†Œë¦¬ë¿ì´ìš”, ë§ì´ 없었다. 최ì„ì€ ë²Œì¨ ì´ ìŠ¬í”ˆ ê´‘ê²½ë„ ëª°ë¼ë³´ëŠ” 사람ì´ì—ˆë‹¤. +최ì„ì´ê°€ ìžê¸°ì˜ ì‹¸ì›€ì„ ì´ê¸°ê³  죽었는지, ë˜ëŠ” ë까지 지다가 죽었는지 ê·¸ê²ƒì€ ì˜ì›í•œ 비밀ì´ì–´ì„œ ì•Œ ë„리가 없었다. 그러나 ì´ê²ƒë§Œì€ 확실하다 ê·¸ì˜ ì˜ì‹ì´ 마지막으로 ë나는 ìˆœê°„ì— ê·¸ì˜ ì˜ì‹ê¸°ì— ë– ì˜¤ë¥´ë˜ ì˜¤ì§ í•˜ë‚˜ê°€ ì •ìž„ì´ì—ˆìœ¼ë¦¬ë¼ëŠ” 것만ì€. +지금 ì •ìž„ì´ê°€ ê·¸ì˜ ê°€ìŠ´ì— ì—Žì–´ì ¸ 울지마는, ì •ìž„ì˜ ëœ¨ê±°ìš´ ëˆˆë¬¼ì´ ê·¸ì˜ ê°€ìŠ´ì„ ì ì‹œê±´ë§ˆëŠ” 최ì„ì˜ ê°€ìŠ´ì€ ë›¸ ì¤„ì„ ëª¨ë¥¸ë‹¤. ì´ê²ƒì´ 죽ìŒì´ëž€ 것ì´ë‹¤. +ë’¤ì— ê²½ì°°ì˜ê°€ 와서 검사한 ê²°ê³¼ì— ì˜í•˜ë©´, 최ì„ì€ í렴으로 ì•“ë˜ ê²°ê³¼ë¡œ 심장마비를 ì¼ìœ¼í‚¨ 것ì´ë¼ê³  하였다. +나는 최ì„ì˜ ìž¥ë¡€ë¥¼ ëë‚´ê³  순임과 ì •ìž„ì„ ë°ë¦¬ê³  오려 하였으나 ì •ìž„ì€ ë“£ì§€ 아니하고 노파와 ê°™ì´ ë°”ì´ì¹¼ 촌으로 ê°€ 버렸다. +그런 뒤로는 ì •ìž„ì—게서는 ì¼ì²´ ìŒì‹ ì´ 없다. 때때로 노파ì—게서 편지가 ì˜¤ëŠ”ë° ì •ìž„ì€ ìµœì„ì´ê°€ ìžˆë˜ ë°©ì— ê°€ë§Œížˆ 있다고만 하였다. +서투른 ì˜ì–´ê°€ ëœ»ì„ ì¶©ë¶„ížˆ 발표하지 못하는 것ì´ì—ˆë‹¤. +나는 ì •ìž„ì—게 안심하고 ë³‘ì„ ì¹˜ë£Œí•˜ë¼ëŠ” íŽ¸ì§€ë„ í•˜ê³  ëˆì´ 필요하거든 청구하ë¼ëŠ” íŽ¸ì§€ë„ í•˜ë‚˜ ì˜ ë‹µìž¥ì´ ì—†ë‹¤. +ë§Œì¼ ì •ìž„ì´ê°€ 죽었다는 ê¸°ë³„ì´ ì˜¤ë©´ 나는 í•œ 번 ë” ì‹œë² ë¦¬ì•„ì— ê°€ì„œ ë‘˜ì„ ê°€ì§€ëŸ°ížˆ 묻고 `ë‘ ë³„ 무ë¤'ì´ë¼ëŠ” 비를 세워 줄 ìƒê°ì´ë‹¤. 그러나 나는 ì •ìž„ì´ê°€ 조선으로 오기를 바란다. +ì—¬ëŸ¬ë¶„ì€ ìµœì„ê³¼ ì •ìž„ì—게 대한 ì´ ê¸°ë¡ì„ 믿고 ê·¸ ë‘ ì‚¬ëžŒì—게 대한 오해를 í’€ë¼. +EOT; +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/lt_LT/Address.php b/vendor/fzaninotto/faker/src/Faker/Provider/lt_LT/Address.php new file mode 100644 index 0000000..5f44640 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/lt_LT/Address.php @@ -0,0 +1,131 @@ +generator->parse($format); + } + + public static function country() + { + return static::randomElement(static::$country); + } + + public static function postcode() + { + return static::toUpper(static::bothify(static::randomElement(static::$postcode))); + } + + public static function regionSuffix() + { + return static::randomElement(static::$regionSuffix); + } + + public static function region() + { + return static::randomElement(static::$region); + } + + public static function citySuffix() + { + return static::randomElement(static::$citySuffix); + } + + public function city() + { + return static::randomElement(static::$city); + } + + public static function streetSuffix() + { + return static::randomElement(static::$streetSuffix); + } + + public static function street() + { + return static::randomElement(static::$street); + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/lt_LT/Company.php b/vendor/fzaninotto/faker/src/Faker/Provider/lt_LT/Company.php new file mode 100644 index 0000000..4a110c2 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/lt_LT/Company.php @@ -0,0 +1,15 @@ +bothify("########"); + } + + /** + * Return passport number + * @return string + * @example 12345678 + */ + public function passportNumber() + { + return $this->bothify("########"); + } + + /** + * National Personal Identity number (asmens kodas) + * @link https://en.wikipedia.org/wiki/National_identification_number#Lithuania + * @link https://lt.wikipedia.org/wiki/Asmens_kodas + * @param string [male|female] + * @param \DateTime $birthdate + * @param string $randomNumber three integers + * @return string on format XXXXXXXXXXX + */ + public function personalIdentityNumber($gender = 'male', \DateTime $birthdate = null, $randomNumber = '') + { + if (!$birthdate) { + $birthdate = \Faker\Provider\DateTime::dateTimeThisCentury(); + } + + $genderNumber = ($gender == 'male') ? (int) 1 : (int) 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); + $partOfPerosnalCode = $firstNumber . $datePart . $randomDigits; + + $sum = self::calculateSum($partOfPerosnalCode, 1); + $liekana = $sum % 11; + + if ($liekana !== 10) { + $lastNumber = $liekana; + return $firstNumber . $datePart . $randomDigits . $lastNumber; + } + + $sum = self::calculateSum($partOfPerosnalCode, 2); + $liekana = (int) $sum % 11; + + $lastNumber = ($liekana !== 10) ? $liekana : 0; + return $firstNumber . $datePart . $randomDigits . $lastNumber; + } + + /** + * Calculate the sum of personal code + * @link https://en.wikipedia.org/wiki/National_identification_number#Lithuania + * @link https://lt.wikipedia.org/wiki/Asmens_kodas + * @param string $numbers + * @param int $time [1|2] + * @return int + */ + private static function calculateSum($numbers, $time = 1) + { + if ($time == 1) { + $multipliers = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 1 ); + } else { + $multipliers = array(3, 4, 5, 6, 7, 8, 9, 1, 2, 3 ); + } + + $sum = 0; + for ($i=1; $i <= 10; $i++) { + $sum += $numbers[$i-1] * $multipliers[$i-1]; + } + + return (int) $sum; + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/lt_LT/PhoneNumber.php b/vendor/fzaninotto/faker/src/Faker/Provider/lt_LT/PhoneNumber.php new file mode 100644 index 0000000..752eb78 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/lt_LT/PhoneNumber.php @@ -0,0 +1,17 @@ +generator->parse($format); + } + + public static function country() + { + return static::randomElement(static::$country); + } + + public static function postcode() + { + return static::toUpper(static::bothify(static::randomElement(static::$postcode))); + } + + public static function regionSuffix() + { + return static::randomElement(static::$regionSuffix); + } + + public static function region() + { + return static::randomElement(static::$region); + } + + public static function cityPrefix() + { + return static::randomElement(static::$cityPrefix); + } + + public function city() + { + return static::randomElement(static::$city); + } + + public static function streetPrefix() + { + return static::randomElement(static::$streetPrefix); + } + + public static function street() + { + return static::randomElement(static::$street); + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/lv_LV/Color.php b/vendor/fzaninotto/faker/src/Faker/Provider/lv_LV/Color.php new file mode 100644 index 0000000..99e681b --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/lv_LV/Color.php @@ -0,0 +1,19 @@ +format('dmy'); + $randomDigits = (string) static::numerify('####'); + + $checksum = Luhn::computeCheckDigit($datePart . $randomDigits); + + return $datePart . '-' . $randomDigits . $checksum; + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/lv_LV/PhoneNumber.php b/vendor/fzaninotto/faker/src/Faker/Provider/lv_LV/PhoneNumber.php new file mode 100644 index 0000000..29c19f6 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/lv_LV/PhoneNumber.php @@ -0,0 +1,15 @@ + static::latitude(42.43, 42.45), + 'longitude' => static::longitude(19.16, 19.27) + ); + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/me_ME/Company.php b/vendor/fzaninotto/faker/src/Faker/Provider/me_ME/Company.php new file mode 100644 index 0000000..1f80312 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/me_ME/Company.php @@ -0,0 +1,49 @@ +generator->parse(static::$idNumberFormat)); + } + + /** + * @return string + * @example 'Ф' + */ + public function alphabet() + { + return static::randomElement(static::$alphabet); + } + + /** + * @return string + * @example 'Э' + */ + public function namePrefix() + { + return static::randomElement(static::$namePrefix); + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/mn_MN/PhoneNumber.php b/vendor/fzaninotto/faker/src/Faker/Provider/mn_MN/PhoneNumber.php new file mode 100644 index 0000000..dd0bb4a --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/mn_MN/PhoneNumber.php @@ -0,0 +1,13 @@ +format('dmy'); + + /** + * @todo These number should be random based on birth year + * @link http://no.wikipedia.org/wiki/F%C3%B8dselsnummer + */ + $randomDigits = (string)static::numerify('##'); + + switch($gender) { + case static::GENDER_MALE: + $genderDigit = static::randomElement(array(1,3,5,7,9)); + break; + case static::GENDER_FEMALE: + $genderDigit = static::randomElement(array(0,2,4,6,8)); + break; + default: + $genderDigit = (string)static::numerify('#'); + } + + + $digits = $datePart.$randomDigits.$genderDigit; + + /** + * @todo Calculate modulo 11 of $digits + * @link http://no.wikipedia.org/wiki/F%C3%B8dselsnummer + */ + $checksum = (string)static::numerify('##'); + + + return $digits.$checksum; + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/nb_NO/PhoneNumber.php b/vendor/fzaninotto/faker/src/Faker/Provider/nb_NO/PhoneNumber.php new file mode 100644 index 0000000..9be2993 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/nb_NO/PhoneNumber.php @@ -0,0 +1,22 @@ + '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', + '161' => 'SGB-Bank SA', + '237' => 'Skandinaviska Enskilda Banken AB (SA) - OddziaÅ‚ w Polsce', + '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', + '213' => 'VOLKSWAGEN BANK POLSKA SA', + ); + + /** + * @example 'Euro Bank SA' + */ + public static function bank() + { + return static::randomElement(static::$banks); + } + + /** + * International Bank Account Number (IBAN) + * @link http://en.wikipedia.org/wiki/International_Bank_Account_Number + * @param string $prefix for generating bank account number of a specific bank + * @param string $countryCode ISO 3166-1 alpha-2 country code + * @param integer $length total length without country code and 2 check digits + * @return string + */ + public static function bankAccountNumber($prefix = '', $countryCode = 'PL', $length = null) + { + return static::iban($countryCode, $prefix, $length); + } + + protected static function addBankCodeChecksum($iban, $countryCode = 'PL') + { + if ($countryCode != "PL" || strlen($iban) <= 8) { + return $iban; + } + $checksum = 0; + $weights = array(7, 1, 3, 9, 7, 1, 3); + for ($i = 0; $i < 7; $i++) { + $checksum += $weights[$i] * (int) $iban[$i]; + } + $checksum = $checksum % 10; + + return substr($iban, 0, 7) . $checksum . substr($iban, 8); + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/pl_PL/Person.php b/vendor/fzaninotto/faker/src/Faker/Provider/pl_PL/Person.php new file mode 100644 index 0000000..c6b2402 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/pl_PL/Person.php @@ -0,0 +1,226 @@ +generator->parse(static::randomElement(static::$lastNameFormat)); + } + + public static function lastNameMale() + { + return static::randomElement(static::$lastNameMale); + } + + public static function lastNameFemale() + { + return static::randomElement(static::$lastNameFemale); + } + + public function title($gender = null) + { + return static::randomElement(static::$title); + } + + /** + * replaced by specific unisex Polish title + */ + public static function titleMale() + { + return static::title(); + } + + /** + * replaced by specific unisex Polish title + */ + public static function titleFemale() + { + return static::title(); + } + + /** + * PESEL - Universal Electronic System for Registration of the Population + * @link http://en.wikipedia.org/wiki/PESEL + * @param DateTime $birthdate + * @param string $sex M for male or F for female + * @return string 11 digit number, like 44051401358 + */ + public static function pesel($birthdate = null, $sex = null) + { + if ($birthdate === null) { + $birthdate = \Faker\Provider\DateTime::dateTimeThisCentury(); + } + + $weights = array(1, 3, 7, 9, 1, 3, 7, 9, 1, 3); + $length = count($weights); + + $fullYear = (int) $birthdate->format('Y'); + $year = (int) $birthdate->format('y'); + $month = $birthdate->format('m') + (((int) ($fullYear/100) - 14) % 5) * 20; + $day = $birthdate->format('d'); + + $result = array((int) ($year / 10), $year % 10, (int) ($month / 10), $month % 10, (int) ($day / 10), $day % 10); + + for ($i = 6; $i < $length; $i++) { + $result[$i] = static::randomDigit(); + } + if ($sex == "M") { + $result[$length - 1] |= 1; + } elseif ($sex == "F") { + $result[$length - 1] ^= 1; + } + $checksum = 0; + for ($i = 0; $i < $length; $i++) { + $checksum += $weights[$i] * $result[$i]; + } + $checksum = (10 - ($checksum % 10)) % 10; + $result[] = $checksum; + + return implode('', $result); + } + + /** + * National Identity Card number + * @link http://en.wikipedia.org/wiki/Polish_National_Identity_Card + * @return string 3 letters and 6 digits, like ABA300000 + */ + public static function personalIdentityNumber() + { + $range = str_split("ABCDEFGHIJKLMNPRSTUVWXYZ"); + $low = array("A", static::randomElement($range), static::randomElement($range)); + $high = array(static::randomDigit(), static::randomDigit(), static::randomDigit(), static::randomDigit(), static::randomDigit()); + $weights = array(7, 3, 1, 7, 3, 1, 7, 3); + $checksum = 0; + for ($i = 0, $size = count($low); $i < $size; $i++) { + $checksum += $weights[$i] * (ord($low[$i]) - 55); + } + for ($i = 0, $size = count($high); $i < $size; $i++) { + $checksum += $weights[$i+3] * $high[$i]; + } + $checksum %= 10; + + return implode('', $low).$checksum.implode('', $high); + } + + /** + * Taxpayer Identification Number (NIP in Polish) + * @link http://en.wikipedia.org/wiki/PESEL#Other_identifiers + * @link http://pl.wikipedia.org/wiki/NIP + * @return string 10 digit number + */ + public static function taxpayerIdentificationNumber() + { + $weights = array(6, 5, 7, 2, 3, 4, 5, 6, 7); + $result = array(); + do { + $result = array( + static::randomDigitNotNull(), static::randomDigitNotNull(), static::randomDigitNotNull(), + static::randomDigit(), static::randomDigit(), static::randomDigit(), + static::randomDigit(), static::randomDigit(), static::randomDigit(), + ); + $checksum = 0; + for ($i = 0, $size = count($result); $i < $size; $i++) { + $checksum += $weights[$i] * $result[$i]; + } + $checksum %= 11; + } while ($checksum == 10); + $result[] = $checksum; + + return implode('', $result); + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/pl_PL/PhoneNumber.php b/vendor/fzaninotto/faker/src/Faker/Provider/pl_PL/PhoneNumber.php new file mode 100644 index 0000000..65bc5c0 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/pl_PL/PhoneNumber.php @@ -0,0 +1,18 @@ + + + Prof. Hart will answer or forward your message. + + We would prefer to send you information by email. + + + **The Legal Small Print** + + + (Three Pages) + + ***START**THE SMALL PRINT!**FOR PUBLIC DOMAIN EBOOKS**START*** + Why is this "Small Print!" statement here? You know: lawyers. + They tell us you might sue us if there is something wrong with + your copy of this eBook, even if you got it for free from + someone other than us, and even if what's wrong is not our + fault. So, among other things, this "Small Print!" statement + disclaims most of our liability to you. It also tells you how + you may distribute copies of this eBook if you want to. + + *BEFORE!* YOU USE OR READ THIS EBOOK + By using or reading any part of this PROJECT GUTENBERG-tm + eBook, you indicate that you understand, agree to and accept + this "Small Print!" statement. If you do not, you can receive + a refund of the money (if any) you paid for this eBook by + sending a request within 30 days of receiving it to the person + you got it from. If you received this eBook on a physical + medium (such as a disk), you must return it with your request. + + ABOUT PROJECT GUTENBERG-TM EBOOKS + This PROJECT GUTENBERG-tm eBook, like most PROJECT GUTENBERG-tm eBooks, + is a "public domain" work distributed by Professor Michael S. Hart + through the Project Gutenberg Association (the "Project"). + Among other things, this means that no one owns a United States copyright + on or for this work, so the Project (and you!) can copy and + distribute it in the United States without permission and + without paying copyright royalties. Special rules, set forth + below, apply if you wish to copy and distribute this eBook + under the "PROJECT GUTENBERG" trademark. + + Please do not use the "PROJECT GUTENBERG" trademark to market + any commercial products without permission. + + To create these eBooks, the Project expends considerable + efforts to identify, transcribe and proofread public domain + works. Despite these efforts, the Project's eBooks and any + medium they may be on may contain "Defects". Among other + things, Defects may take the form of incomplete, inaccurate or + corrupt data, transcription errors, a copyright or other + intellectual property infringement, a defective or damaged + disk or other eBook medium, a computer virus, or computer + codes that damage or cannot be read by your equipment. + + LIMITED WARRANTY; DISCLAIMER OF DAMAGES + But for the "Right of Replacement or Refund" described below, + [1] Michael Hart and the Foundation (and any other party you may + receive this eBook from as a PROJECT GUTENBERG-tm eBook) disclaims + all liability to you for damages, costs and expenses, including + legal fees, and [2] YOU HAVE NO REMEDIES FOR NEGLIGENCE OR + UNDER STRICT LIABILITY, OR FOR BREACH OF WARRANTY OR CONTRACT, + INCLUDING BUT NOT LIMITED TO INDIRECT, CONSEQUENTIAL, PUNITIVE + OR INCIDENTAL DAMAGES, EVEN IF YOU GIVE NOTICE OF THE + POSSIBILITY OF SUCH DAMAGES. + + If you discover a Defect in this eBook within 90 days of + receiving it, you can receive a refund of the money (if any) + you paid for it by sending an explanatory note within that + time to the person you received it from. If you received it + on a physical medium, you must return it with your note, and + such person may choose to alternatively give you a replacement + copy. If you received it electronically, such person may + choose to alternatively give you a second opportunity to + receive it electronically. + + THIS EBOOK IS OTHERWISE PROVIDED TO YOU "AS-IS". NO OTHER + WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED, ARE MADE TO YOU AS + TO THE EBOOK OR ANY MEDIUM IT MAY BE ON, INCLUDING BUT NOT + LIMITED TO WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A + PARTICULAR PURPOSE. + + Some states do not allow disclaimers of implied warranties or + the exclusion or limitation of consequential damages, so the + above disclaimers and exclusions may not apply to you, and you + may have other legal rights. + + INDEMNITY + You will indemnify and hold Michael Hart, the Foundation, + and its trustees and agents, and any volunteers associated + with the production and distribution of Project Gutenberg-tm + texts harmless, from all liability, cost and expense, including + legal fees, that arise directly or indirectly from any of the + following that you do or cause: [1] distribution of this eBook, + [2] alteration, modification, or addition to the eBook, + or [3] any Defect. + + DISTRIBUTION UNDER "PROJECT GUTENBERG-tm" + You may distribute copies of this eBook electronically, or by + disk, book or any other medium if you either delete this + "Small Print!" and all other references to Project Gutenberg, + or: + + [1] Only give exact copies of it. Among other things, this + requires that you do not remove, alter or modify the + eBook or this "small print!" statement. You may however, + if you wish, distribute this eBook in machine readable + binary, compressed, mark-up, or proprietary form, + including any form resulting from conversion by word + processing or hypertext software, but only so long as + *EITHER*: + + [*] The eBook, when displayed, is clearly readable, and + does *not* contain characters other than those + intended by the author of the work, although tilde + (~), asterisk (*) and underline (_) characters may + be used to convey punctuation intended by the + author, and additional characters may be used to + indicate hypertext links; OR + + [*] The eBook may be readily converted by the reader at + no expense into plain ASCII, EBCDIC or equivalent + form by the program that displays the eBook (as is + the case, for instance, with most word processors); + OR + + [*] You provide, or agree to also provide on request at + no additional cost, fee or expense, a copy of the + eBook in its original plain ASCII form (or in EBCDIC + or other equivalent proprietary form). + + [2] Honor the eBook refund and replacement provisions of this + "Small Print!" statement. + + [3] Pay a trademark license fee to the Foundation of 20% of the + gross profits you derive calculated using the method you + already use to calculate your applicable taxes. If you + don't derive profits, no royalty is due. Royalties are + payable to "Project Gutenberg Literary Archive Foundation" + the 60 days following each date you prepare (or were + legally required to prepare) your annual (or equivalent + periodic) tax return. Please contact us beforehand to + let us know your plans and to work out the details. + + WHAT IF YOU *WANT* TO SEND MONEY EVEN IF YOU DON'T HAVE TO? + Project Gutenberg is dedicated to increasing the number of + public domain and licensed works that can be freely distributed + in machine readable form. + + The Project gratefully accepts contributions of money, time, + public domain materials, or royalty free copyright licenses. + Money should be paid to the: + "Project Gutenberg Literary Archive Foundation." + + If you are interested in contributing scanning equipment or + software or other items, please contact Michael Hart at: + hart@pobox.com + + [Portions of this eBook's header and trailer may be reprinted only + when distributed free of all fees. Copyright (C) 2001, 2002 by + Michael S. Hart. Project Gutenberg is a TradeMark and may not be + used in any sales of Project Gutenberg eBooks or other materials be + they hardware or software or any other related product without + express permission.] + + *END THE SMALL PRINT! FOR PUBLIC DOMAIN EBOOKS*Ver.02/11/02*END* + + */ +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/pt_BR/Address.php b/vendor/fzaninotto/faker/src/Faker/Provider/pt_BR/Address.php new file mode 100644 index 0000000..68b6df0 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/pt_BR/Address.php @@ -0,0 +1,154 @@ +generator->numerify('########0001'); + $n .= check_digit($n); + $n .= check_digit($n); + + return $formatted? vsprintf('%d%d.%d%d%d.%d%d%d/%d%d%d%d-%d%d', str_split($n)) : $n; + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/pt_BR/Internet.php b/vendor/fzaninotto/faker/src/Faker/Provider/pt_BR/Internet.php new file mode 100644 index 0000000..7481a6f --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/pt_BR/Internet.php @@ -0,0 +1,9 @@ + array( + "4##############" + ), + 'MasterCard' => array( + "5##############" + ), + 'American Express' => array( + "34############", + "37############" + ), + 'Discover Card' => array( + "6011###########", + "622############", + "64#############", + "65#############" + ), + 'Diners' => array( + "301############", + "301##########", + "305############", + "305##########", + "36#############", + "36###########", + "38#############", + "38###########", + ), + 'Elo' => array( + "636368#########", + "438935#########", + "504175#########", + "451416#########", + "636297#########", + "5067###########", + "4576###########", + "4011###########", + ), + 'Hipercard' => array( + "38#############", + "60#############", + ), + "Aura" => array( + "50#############" + ) + ); + + /** + * International Bank Account Number (IBAN) + * @link http://en.wikipedia.org/wiki/International_Bank_Account_Number + * @param string $prefix for generating bank account number of a specific bank + * @param string $countryCode ISO 3166-1 alpha-2 country code + * @param integer $length total length without country code and 2 check digits + * @return string + */ + public static function bankAccountNumber($prefix = '', $countryCode = 'BR', $length = null) + { + return static::iban($countryCode, $prefix, $length); + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/pt_BR/Person.php b/vendor/fzaninotto/faker/src/Faker/Provider/pt_BR/Person.php new file mode 100644 index 0000000..be39a2e --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/pt_BR/Person.php @@ -0,0 +1,133 @@ +generator->numerify('#########'); + $n .= check_digit($n); + $n .= check_digit($n); + + return $formatted? vsprintf('%d%d%d.%d%d%d.%d%d%d-%d%d', str_split($n)) : $n; + } + + /** + * A random RG number, following Sao Paulo state's rules. + * @link http://pt.wikipedia.org/wiki/C%C3%A9dula_de_identidade + * @param bool $formatted If the number should have dots/dashes or not. + * @return string + */ + public function rg($formatted = true) + { + $n = $this->generator->numerify('########'); + $n .= check_digit($n); + + return $formatted? vsprintf('%d%d.%d%d%d.%d%d%d-%s', str_split($n)) : $n; + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/pt_BR/PhoneNumber.php b/vendor/fzaninotto/faker/src/Faker/Provider/pt_BR/PhoneNumber.php new file mode 100644 index 0000000..e3c87d9 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/pt_BR/PhoneNumber.php @@ -0,0 +1,143 @@ + '')); + } + + return $number; + } + + /** + * Generates an 8-digit landline number without formatting characters. + * @param bool $formatted [def: true] If it should return a formatted number or not. + * @return string + */ + public static function landline($formatted = true) + { + $number = static::numerify(static::randomElement(static::$landlineFormats)); + + if (!$formatted) { + $number = strtr($number, array('-' => '')); + } + + return $number; + } + + /** + * Randomizes between cellphone and landline numbers. + * @param bool $formatted [def: true] If it should return a formatted number or not. + * @return mixed + */ + public static function phone($formatted = true) + { + $options = static::randomElement(array( + array('cellphone', false), + array('cellphone', true), + array('landline', null), + )); + + return call_user_func("static::{$options[0]}", $formatted, $options[1]); + } + + /** + * Generates a complete phone number. + * @param string $type [def: landline] One of "landline" or "cellphone". Defaults to "landline" on invalid values. + * @param bool $formatted [def: true] If the number should be formatted or not. + * @return string + */ + protected static function anyPhoneNumber($type, $formatted = true) + { + $area = static::areaCode(); + $number = ($type == 'cellphone')? + static::cellphone($formatted, in_array($area, static::$ninthDigitAreaCodes)) : + 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. + * @param bool $formatted [def: true] If it should return a formatted number or not. + * @return string + */ + public static function cellphoneNumber($formatted = true) + { + return static::anyPhoneNumber('cellphone', $formatted); + } + + /** + * Concatenates {@link areaCode} and {@link landline} into a national landline number. + * @param bool $formatted [def: true] If it should return a formatted number or not. + * @return string + */ + public static function landlineNumber($formatted = true) + { + return static::anyPhoneNumber('landline', $formatted); + } + + /** + * Randomizes between complete cellphone and landline numbers. + * @return mixed + */ + public function phoneNumber() + { + $method = static::randomElement(array('cellphoneNumber', 'landlineNumber')); + return call_user_func("static::$method", true); + } + + /** + * Randomizes between complete cellphone and landline numbers, cleared from formatting symbols. + * @return mixed + */ + public static function phoneNumberCleared() + { + $method = static::randomElement(array('cellphoneNumber', 'landlineNumber')); + return call_user_func("static::$method", false); + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/pt_BR/check_digit.php b/vendor/fzaninotto/faker/src/Faker/Provider/pt_BR/check_digit.php new file mode 100644 index 0000000..ab67db9 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/pt_BR/check_digit.php @@ -0,0 +1,35 @@ += 12; + $verifier = 0; + + for ($i = 1; $i <= $length; $i++) { + if (!$second_algorithm) { + $multiplier = $i+1; + } else { + $multiplier = ($i >= 9)? $i-7 : $i+1; + } + $verifier += $numbers[$length-$i] * $multiplier; + } + + $verifier = 11 - ($verifier % 11); + if ($verifier >= 10) { + $verifier = 0; + } + + return $verifier; +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/pt_PT/Address.php b/vendor/fzaninotto/faker/src/Faker/Provider/pt_PT/Address.php new file mode 100644 index 0000000..4de0e93 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/pt_PT/Address.php @@ -0,0 +1,124 @@ + 0; $i--) { + $numbers[$i] = substr($number, $i - 1, 1); + $partial[$i] = $numbers[$i] * $factor; + $sum += $partial[$i]; + if ($factor == $base) { + $factor = 1; + } + $factor++; + } + $res = $sum % 11; + + if ($res == 0 || $res == 1) { + $digit = 0; + } else { + $digit = 11 - $res; + } + + return $digit; + } + + /** + * + * @link http://nomesportugueses.blogspot.pt/2012/01/lista-dos-cem-nomes-mais-usados-em.html + */ + + protected static $firstNameMale = array( + 'Rodrigo', 'João', 'Martim', 'Afonso', 'Tomás', 'Gonçalo', 'Francisco', 'Tiago', + 'Diogo', 'Guilherme', 'Pedro', 'Miguel', 'Rafael', 'Gabriel', 'Santiago', 'Dinis', + 'David', 'Duarte', 'José', 'Simão', 'Daniel', 'Lucas', 'Gustavo', 'André', 'Denis', + 'Salvador', 'António', 'Vasco', 'Henrique', 'Lourenço', 'Manuel', 'Eduardo', 'Bernardo', + 'Leandro', 'Luís', 'Diego', 'Leonardo', 'Alexandre', 'Rúben', 'Mateus', 'Ricardo', + 'Vicente', 'Filipe', 'Bruno', 'Nuno', 'Carlos', 'Rui', 'Hugo', 'Samuel', 'Ãlvaro', + 'Matias', 'Fábio', 'Ivo', 'Paulo', 'Jorge', 'Xavier', 'Marco', 'Isaac', 'Raúl','Benjamim', + 'Renato', 'Artur', 'Mário', 'Frederico', 'Cristiano', 'Ivan', 'Sérgio', 'Micael', + 'Vítor', 'Edgar', 'Kevin', 'Joaquim', 'Igor', 'Ângelo', 'Enzo', 'Valentim', 'Flávio', + 'Joel', 'Fernando', 'Sebastião', 'Tomé', 'César', 'Cláudio', 'Nelson', 'Lisandro', 'Jaime', + 'Gil', 'Mauro', 'Sandro', 'Hélder', 'Matheus', 'William', 'Gaspar', 'Márcio', + 'Martinho', 'Emanuel', 'Marcos', 'Telmo', 'Davi', 'Wilson' + ); + + protected static $firstNameFemale = array( + 'Maria', 'Leonor', 'Matilde', 'Mariana', 'Ana', 'Beatriz', 'Inês', 'Lara', 'Carolina', 'Margarida', + 'Joana', 'Sofia', 'Diana', 'Francisca', 'Laura', 'Sara', 'Madalena', 'Rita', 'Mafalda', 'Catarina', + 'Luana', 'Marta', 'Ãris', 'Alice', 'Bianca', 'Constança', 'Gabriela', 'Eva', 'Clara', 'Bruna', 'Daniela', + 'Iara', 'Filipa', 'Vitória', 'Ariana', 'Letícia', 'Bárbara', 'Camila', 'Rafaela', 'Carlota', 'Yara', + 'Núria', 'Raquel', 'Ema', 'Helena', 'Benedita', 'Érica', 'Isabel', 'Nicole', 'Lia', 'Alícia', 'Mara', + 'Jéssica', 'Soraia', 'Júlia', 'Luna', 'Victória', 'Luísa', 'Teresa', 'Miriam', 'Adriana', 'Melissa', + 'Andreia', 'Juliana', 'Alexandra', 'Yasmin', 'Tatiana', 'Leticia', 'Luciana', 'Eduarda', 'Cláudia', + 'Débora', 'Fabiana', 'Renata', 'Kyara', 'Kelly', 'Irina', 'Mélanie', 'Nádia', 'Cristiana', 'Liliana', + 'Patrícia', 'Vera', 'Doriana', 'Ângela', 'Mia', 'Erica', 'Mónica', 'Isabela', 'Salomé', 'Cátia', + 'Verónica', 'Violeta', 'Lorena', 'Érika', 'Vanessa', 'Iris', 'Anna', 'Viviane', 'Rebeca', 'Neuza', + ); + + protected static $lastName = array( + 'Abreu', 'Almeida', 'Alves', 'Amaral', 'Amorim', 'Andrade', 'Anjos', 'Antunes', 'Araújo', 'Assunção', + 'Azevedo', 'Baptista', 'Barbosa', 'Barros', 'Batista', 'Borges', 'Branco', 'Brito', 'Campos', 'Cardoso', + 'Carneiro', 'Carvalho', 'Castro', 'Coelho', 'Correia', 'Costa', 'Cruz', 'Cunha', 'Domingues', 'Esteves', + 'Faria', 'Fernandes', 'Ferreira', 'Figueiredo', 'Fonseca', 'Freitas', 'Garcia', 'Gaspar', 'Gomes', + 'Gonçalves', 'Guerreiro', 'Henriques', 'Jesus', 'Leal', 'Leite', 'Lima', 'Lopes', 'Loureiro', 'Lourenço', + 'Macedo', 'Machado', 'Magalhães', 'Maia', 'Marques', 'Martins', 'Matias', 'Matos', 'Melo', 'Mendes', + 'Miranda', 'Monteiro', 'Morais', 'Moreira', 'Mota', 'Moura', 'Nascimento', 'Neto', 'Neves', 'Nogueira', + 'Nunes', 'Oliveira', 'Pacheco', 'Paiva', 'Pereira', 'Pinheiro', 'Pinho', 'Pinto', 'Pires', 'Ramos', + 'Reis', 'Ribeiro', 'Rocha', 'Rodrigues', 'Santos', 'Silva', 'Simões', 'Soares', 'Sousa', + 'Sá', 'Tavares', 'Teixeira', 'Torres', 'Valente', 'Vaz', 'Vicente', 'Vieira', + ); +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/pt_PT/PhoneNumber.php b/vendor/fzaninotto/faker/src/Faker/Provider/pt_PT/PhoneNumber.php new file mode 100644 index 0000000..618a01c --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/pt_PT/PhoneNumber.php @@ -0,0 +1,50 @@ +generator->parse($format); + } + + public function address() + { + $format = static::randomElement(static::$addressFormats); + + return $this->generator->parse($format); + } + + public function streetAddress() + { + $format = static::randomElement(static::$streetAddressFormats); + + return $this->generator->parse($format); + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/ro_MD/Payment.php b/vendor/fzaninotto/faker/src/Faker/Provider/ro_MD/Payment.php new file mode 100644 index 0000000..5fb9543 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/ro_MD/Payment.php @@ -0,0 +1,19 @@ +generator->parse($format); + } + + /** + * @example 'Cluj' + */ + public function county() + { + return static::randomElement(static::$counties); + } + + public function address() + { + $format = static::randomElement(static::$addressFormats); + + return $this->generator->parse($format); + } + + public function streetAddress() + { + $format = static::randomElement(static::$streetAddressFormats); + + return $this->generator->parse($format); + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/ro_RO/Payment.php b/vendor/fzaninotto/faker/src/Faker/Provider/ro_RO/Payment.php new file mode 100644 index 0000000..980e8bb --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/ro_RO/Payment.php @@ -0,0 +1,19 @@ + '01', 'AR' => '02', 'AG' => '03', 'B' => '40', 'BC' => '04', 'BH' => '05', + 'BN' => '06', 'BT' => '07', 'BV' => '08', 'BR' => '09', 'BZ' => '10', 'CS' => '11', + 'CL' => '51', 'CJ' => '12', 'CT' => '13', 'CV' => '14', 'DB' => '15', 'DJ' => '16', + 'GL' => '17', 'GR' => '52', 'GJ' => '18', 'HR' => '19', 'HD' => '20', 'IL' => '21', + 'IS' => '22', 'IF' => '23', 'MM' => '24', 'MH' => '25', 'MS' => '26', 'NT' => '27', + 'OT' => '28', 'PH' => '29', 'SM' => '30', 'SJ' => '31', 'SB' => '32', 'SV' => '33', + 'TR' => '34', 'TM' => '35', 'TL' => '36', 'VS' => '37', 'VL' => '38', 'VN' => '39', + + 'B1' => '41', 'B2' => '42', 'B3' => '43', 'B4' => '44', 'B5' => '45', 'B6' => '46' + ); + + /** + * Personal Numerical Code (CNP) + * + * @link http://ro.wikipedia.org/wiki/Cod_numeric_personal + * @example 1111111111118 + * + * @param string $gender Valid values: m, f, 1, 2 + * @param integer $century Valid values: 1800, 1900, 2000, 1, 2, 3, 4, 5, 6 + * @param string $county Valid values: 2 letter ISO 3166-2:RO county codes and B1-B6 for Bucharest's 6 sectors + * @return string + * + */ + public function cnp($gender = null, $century = null, $county = null) + { + if (is_null($county) || !array_key_exists($county, static::$cnpCountyCodes)) { + $countyCode = static::randomElement(array_values(static::$cnpCountyCodes)); + } 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 = static::cnpAddChecksum($cnp); + + return $cnp; + } + + /** + * 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 + */ + protected static function cnpFirstDigit($gender = null, $century = null) + { + switch ($century) { + case 1800: + 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)); + } + + switch (strtolower($gender)) { + case 'm': + case 1: + $genderCode = 1; + break; + case 'f': + case 2: + $genderCode = 2; + break; + default: + $genderCode = static::randomElement(array(1, 2)); + } + + $firstDigit = $centuryCode + $genderCode; + + return ($firstDigit > 9) ? 9 : $firstDigit; + } + + /** + * 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 + */ + protected static function cnpAddChecksum($cnp) + { + $checkNumber = 279146358279; + + $checksum = 0; + foreach (range(0, 11) as $digit) { + $checksum += substr($cnp, $digit, 1) * substr($checkNumber, $digit, 1); + } + $checksum = $checksum % 11; + + return substr($cnp, 0, 12) . ($checksum == 10 ? 1 : $checksum); + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/ro_RO/PhoneNumber.php b/vendor/fzaninotto/faker/src/Faker/Provider/ro_RO/PhoneNumber.php new file mode 100644 index 0000000..e8af810 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/ro_RO/PhoneNumber.php @@ -0,0 +1,67 @@ + array( + '021#######', // Bucharest + '023#######', + '024#######', + '025#######', + '026#######', + '027#######', // non-geographic + '031#######', // Bucharest + '033#######', + '034#######', + '035#######', + '036#######', + '037#######', // non-geographic + ), + 'mobile' => array( + '07########', + ) + ); + + protected static $specialFormats = array( + 'toll-free' => array( + '0800######', + '0801######', // shared-cost numbers + '0802######', // personal numbering + '0806######', // virtual cards + '0807######', // pre-paid cards + '0870######', // internet dial-up + ), + 'premium-rate' => array( + '0900######', + '0903######', // financial information + '0906######', // adult entertainment + ) + ); + + /** + * @link http://en.wikipedia.org/wiki/Telephone_numbers_in_Romania#Last_years + */ + public function phoneNumber() + { + $type = static::randomElement(array_keys(static::$normalFormats)); + $number = static::numerify(static::randomElement(static::$normalFormats[$type])); + + return $number; + } + + public static function tollFreePhoneNumber() + { + $number = static::numerify(static::randomElement(static::$specialFormats['toll-free'])); + + return $number; + } + + public static function premiumRatePhoneNumber() + { + $number = static::numerify(static::randomElement(static::$specialFormats['premium-rate'])); + + return $number; + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/ru_RU/Address.php b/vendor/fzaninotto/faker/src/Faker/Provider/ru_RU/Address.php new file mode 100644 index 0000000..6174ced --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/ru_RU/Address.php @@ -0,0 +1,156 @@ +generator->parse($format); + } + + public static function country() + { + return static::randomElement(static::$country); + } + + public static function postcode() + { + return static::toUpper(static::bothify(static::randomElement(static::$postcode))); + } + + public static function regionSuffix() + { + return static::randomElement(static::$regionSuffix); + } + + public static function region() + { + return static::randomElement(static::$region); + } + + public static function cityPrefix() + { + return static::randomElement(static::$cityPrefix); + } + + public function city() + { + return static::randomElement(static::$city); + } + + public static function streetPrefix() + { + return static::randomElement(static::$streetPrefix); + } + + public static function street() + { + return static::randomElement(static::$street); + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/ru_RU/Color.php b/vendor/fzaninotto/faker/src/Faker/Provider/ru_RU/Color.php new file mode 100644 index 0000000..e1af033 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/ru_RU/Color.php @@ -0,0 +1,23 @@ +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/vendor/fzaninotto/faker/src/Faker/Provider/ru_RU/Internet.php b/vendor/fzaninotto/faker/src/Faker/Provider/ru_RU/Internet.php new file mode 100644 index 0000000..53870ee --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/ru_RU/Internet.php @@ -0,0 +1,9 @@ +.*<' | \ + * sed -r 's/—//' | sed -r 's/[\<\>]//g' | sed -r "s/(^|$)/'/g" | sed -r 's/$/,/' | sed -r 's/\&(laquo|raquo);/"/g' | \ + * sed -r 's/\s+/ /g'" + */ + protected static $banks = array( + 'Ðовый Промышленный Банк', + 'Ðовый Символ', + 'ÐокÑÑбанк', + 'ÐооÑфера', + 'Ðордеа Банк', + 'Ðота-Банк', + 'ÐС Банк', + 'ÐСТ-Банк', + 'ÐÑклиÑ-Банк', + 'Образование', + 'Объединенный Банк Промышленных ИнвеÑтиций', + 'Объединенный Банк РеÑпублики', + 'Объединенный Капитал', + 'Объединенный Кредитный Банк', + 'Объединенный Кредитный Банк МоÑковÑкий филиал', + 'Объединенный Ðациональный Банк', + 'Объединенный Резервный Банк', + 'Океан Банк', + 'ОЛМÐ-Банк', + 'Онего', + 'Оней Банк', + 'ОПМ-Банк', + 'Оргбанк', + 'Оренбург', + 'ОТП Банк', + 'ОФК Банк', + 'Охабанк', + 'Первобанк', + 'ПервомайÑкий', + 'ПервоуральÑкбанк', + 'Первый ДортранÑбанк', + 'Первый ИнвеÑтиционный банк', + 'Первый КлиентÑкий Банк', + 'Первый ЧешÑко-РоÑÑийÑкий Банк', + 'ПереÑвет', + 'Пермь', + 'ПетербургÑкий Социальный КоммерчеÑкий Банк', + 'Петрокоммерц', + 'ПИР Банк', + 'Платина', + 'Плато-Банк', + 'ÐŸÐ»ÑŽÑ Ð‘Ð°Ð½Ðº', + 'Пойдем!', + 'Почтобанк', + 'Прайм ФинанÑ', + 'Преодоление', + 'Приморье', + 'ПримÑоцбанк', + 'Примтеркомбанк', + 'Прио-Внешторгбанк', + 'Приобье', + 'ПриполÑрный', + 'ПриÑко Капитал Банк', + 'ПробизнеÑбанк', + 'ПроинвеÑтбанк', + 'Прокоммерцбанк', + 'ПроминвеÑтбанк', + 'Промрегионбанк', + 'ПромÑвÑзьбанк', + 'ПромÑвÑзьинвеÑтбанк', + 'ПромÑельхозбанк', + 'ПромтранÑбанк', + 'Промышленно-ФинанÑовое СотрудничеÑтво', + 'ПромÑнергобанк', + 'ПрофеÑÑионал Банк', + 'Профит Банк', + 'Прохладный', + 'ÐŸÑƒÐ»ÑŒÑ Ð¡Ñ‚Ð¾Ð»Ð¸Ñ†Ñ‹', + 'Радиотехбанк', + 'Развитие', + 'Развитие-Столица', + 'Райффайзенбанк', + 'РаÑчетно-Кредитный Банк', + 'РаÑчетный Дом', + 'РБÐ', + 'Региональный Банк РазвитиÑ', + 'Региональный Банк Сбережений', + 'Региональный КоммерчеÑкий Банк', + 'Региональный Кредит', + 'РегионфинанÑбанк', + 'Регнум', + 'Резерв', + 'РенеÑÑанÑ', + 'РенеÑÑÐ°Ð½Ñ ÐšÑ€ÐµÐ´Ð¸Ñ‚', + 'Рента-Банк', + 'РЕСО Кредит', + 'РеÑпубликанÑкий Кредитный ÐльÑнÑ', + 'РеÑурÑ-ТраÑÑ‚', + 'Риабанк', + 'Риал-Кредит', + 'РинвеÑтбанк', + 'РинвеÑтбанк МоÑковÑкий офиÑ', + 'РИТ-Банк', + 'РРБанк', + 'РоÑавтобанк', + 'РоÑбанк', + 'РоÑбизнеÑбанк', + 'РоÑгоÑÑтрах Банк', + 'РоÑдорбанк', + 'РоÑЕвроБанк', + 'РоÑинтерБанк', + 'РоÑпромбанк', + 'РоÑÑельхозбанк', + 'РоÑÑийÑÐºÐ°Ñ Ð¤Ð¸Ð½Ð°Ð½ÑÐ¾Ð²Ð°Ñ ÐšÐ¾Ñ€Ð¿Ð¾Ñ€Ð°Ñ†Ð¸Ñ', + 'РоÑÑийÑкий Капитал', + 'РоÑÑийÑкий Кредит', + 'РоÑÑийÑкий Ðациональный КоммерчеÑкий Банк', + 'РоÑÑита-Банк', + 'РоÑÑиÑ', + 'РоÑÑ‚ Банк', + 'РоÑтфинанÑ', + 'РоÑÑкÑимбанк', + 'РоÑÑнергобанк', + 'РоÑл Кредит Банк', + 'РСКБ', + 'РТС-Банк', + 'РУБанк', + 'Рублев', + 'Руна-Банк', + 'РунÑтбанк', + 'РуÑкобанк', + 'РуÑнарбанк', + 'РуÑÑкий Банк Сбережений', + 'РуÑÑкий Ипотечный Банк', + 'РуÑÑкий Международный Банк', + 'РуÑÑкий Ðациональный Банк', + 'РуÑÑкий Стандарт', + 'РуÑÑкий Торговый Банк', + 'РуÑÑкий ТраÑтовый Банк', + 'РуÑÑкий ФинанÑовый ÐльÑнÑ', + 'РуÑÑкий Элитарный Банк', + 'РуÑÑлавбанк', + 'РуÑÑобанк', + 'РуÑÑтройбанк', + 'РуÑÑ„Ð¸Ð½Ð°Ð½Ñ Ð‘Ð°Ð½Ðº', + 'РуÑÑŒ', + 'РуÑьРегионБанк', + 'РуÑьуниверÑалбанк', + 'РуÑЮгбанк', + 'РФИ Банк', + 'Саммит Банк', + 'Санкт-ПетербургÑкий Банк ИнвеÑтиций', + 'Саратов', + 'СаровбизнеÑбанк', + 'Сбербанк РоÑÑии', + 'СвÑзной Банк', + 'СвÑзь-Банк', + 'СДМ-Банк', + 'СеваÑтопольÑкий МорÑкой банк', + 'Северный Кредит', + 'Северный Ðародный Банк', + 'Северо-ВоÑточный ÐльÑнÑ', + 'Северо-Западный 1 ÐльÑÐ½Ñ Ð‘Ð°Ð½Ðº', + 'СеверÑтройбанк', + 'СевзапинвеÑтпромбанк', + 'Сельмашбанк', + 'СервиÑ-Резерв', + 'Сетелем Банк', + 'СИÐБ', + 'СибирÑкий Банк РеконÑтрукции и РазвитиÑ', + 'Сибнефтебанк', + 'СибÑоцбанк', + 'СибÑÑ', + 'СибÑÑ ÐœÐ¾ÑковÑкий офиÑ', + 'СинергиÑ', + 'Синко-Банк', + 'СиÑтема', + 'Сити ИнвеÑÑ‚ Банк', + 'Ситибанк', + 'СКÐ-Банк', + 'СКБ-Банк', + 'СлавиÑ', + 'СлавÑнбанк', + 'СлавÑнÑкий Кредит', + 'Смартбанк', + 'СМБ-Банк', + 'Смолевич', + 'СМП Банк', + 'СнежинÑкий', + 'Собинбанк', + 'Соверен Банк', + 'СоветÑкий', + 'Совкомбанк', + 'Современные Стандарты БизнеÑа', + 'СодружеÑтво', + 'СоколовÑкий', + 'Солид Банк', + 'СолидарноÑÑ‚ÑŒ (МоÑква)', + 'СолидарноÑÑ‚ÑŒ (Самара)', + 'СоцинвеÑтбанк', + 'СоцинвеÑтбанк МоÑковÑкий филиал', + 'Социум-Банк', + 'Союз', + 'Союзный', + 'СпецÑтройбанк', + 'Спиритбанк', + 'Спурт Банк', + 'Спутник', + 'СтавропольпромÑтройбанк', + 'Сталь Банк', + 'Стандарт-Кредит', + 'Стар ÐльÑнÑ', + 'СтарБанк', + 'СтарооÑкольÑкий Ðгропромбанк', + 'Старый Кремль', + 'Стелла-Банк', + 'Столичный Кредит', + 'СтратегиÑ', + 'Строительно-КоммерчеÑкий Банк', + 'СтройлеÑбанк', + 'Сумитомо Мицуи', + 'Сургутнефтегазбанк', + 'СЭБ Банк', + 'Таатта', + 'ТавричеÑкий', + 'Таганрогбанк', + 'Тагилбанк', + 'Тайдон', + 'Тайм Банк', + 'Тальменка-Банк', + 'Тальменка-Банк МоÑковÑкий филиал', + 'Тамбовкредитпромбанк', + 'Татагропромбанк', + 'ТатÑоцбанк', + 'Татфондбанк', + 'Ð¢Ð°ÑƒÑ€ÑƒÑ Ð‘Ð°Ð½Ðº', + 'ТверьУниверÑалБанк', + 'ТекÑбанк', + 'Темпбанк', + 'Тендер-Банк', + 'Терра', + 'ТетраполиÑ', + 'Тимер Банк', + 'Тинькофф Банк', + 'ТихоокеанÑкий Внешторгбанк', + 'Тойота Банк', + 'ТольÑттихимбанк', + 'ТомÑкпромÑтройбанк', + 'Торгово-Промышленный Банк КитаÑ', + 'Торговый ГородÑкой Банк', + 'ТоржокуниверÑалбанк', + 'ТранÑкапиталбанк', + 'ТранÑнациональный Банк', + 'ТранÑпортный', + 'ТранÑÑтройбанк', + 'ТраÑÑ‚ Капитал Банк', + 'Тройка-Д Банк', + 'ТульÑкий Промышленник', + 'ТульÑкий Промышленник МоÑковÑкий офиÑ', + 'ТульÑкий РаÑчетный Центр', + 'Турбобанк', + 'ТуÑар', + 'ТЭМБР-Банк', + 'ТЭСТ', + 'Углеметбанк', + 'Уздан', + 'Унифин', + 'Унифондбанк', + 'Уралкапиталбанк', + 'Уралприватбанк', + 'Уралпромбанк', + 'УралÑиб', + 'УралтранÑбанк', + 'УралфинанÑ', + 'УральÑкий Банк РеконÑтрукции и РазвитиÑ', + 'УральÑкий Межрегиональный Банк', + 'УральÑкий ФинанÑовый Дом', + 'Ури Банк', + 'УÑÑури', + 'ФДБ', + 'ФИÐ-Банк', + 'Финам Банк', + 'Ð¤Ð¸Ð½Ð°Ð½Ñ Ð‘Ð¸Ð·Ð½ÐµÑ Ð‘Ð°Ð½Ðº', + 'ФинанÑово-Промышленный Капитал', + 'ФинанÑовый Капитал', + 'ФинанÑовый Стандарт', + 'Ð¤Ð¸Ð½Ð°Ñ€Ñ Ð‘Ð°Ð½Ðº', + 'Финпромбанк (ФПБ Банк)', + 'ФинтраÑтбанк', + 'ФК Открытие (бывш. ÐОМОС-Банк)', + 'Флора-МоÑква', + 'ФолькÑваген Банк РуÑ', + 'ФондÑервиÑбанк', + 'Фора-Банк', + 'Форбанк', + 'Ð¤Ð¾Ñ€ÑƒÑ Ð‘Ð°Ð½Ðº', + 'Форштадт', + 'Фьючер', + 'ХакаÑÑкий Муниципальный Банк', + 'Ханты-МанÑийÑкий банк Открытие', + 'Химик', + 'Хлынов', + 'ХованÑкий', + 'ХолдинвеÑтбанк', + 'ХолмÑк', + 'Хоум Кредит Банк', + 'Центр-инвеÑÑ‚', + 'Центрально-ÐзиатÑкий', + 'Центрально-ЕвропейÑкий Банк', + 'Центркомбанк', + 'ЦентроКредит', + 'Церих', + 'Чайна КонÑтракшн', + 'ЧайнаÑельхозбанк', + 'Челиндбанк', + 'ЧелÑбинвеÑтбанк', + 'ЧерноморÑкий банк Ñ€Ð°Ð·Ð²Ð¸Ñ‚Ð¸Ñ Ð¸ реконÑтрукции', + 'Чувашкредитпромбанк', + 'Эйч-ЭÑ-Би-Си Банк (HSBC)', + 'Эко-ИнвеÑÑ‚', + 'Экономбанк', + 'ЭкономикÑ-Банк', + 'ЭкÑи-Банк', + 'ЭкÑперт Банк', + 'ЭкÑпобанк', + 'ЭкÑпреÑÑ-Волга', + 'ЭкÑпреÑÑ-Кредит', + 'Эл Банк', + 'Элита', + 'Эльбин', + 'Энергобанк', + 'Энергомашбанк', + 'ЭнерготранÑбанк', + 'Эно', + 'ЭнтузиаÑтбанк', + 'Эргобанк', + 'Ю Би Ð­Ñ Ð‘Ð°Ð½Ðº', + 'ЮГ-ИнвеÑтбанк', + 'Югра', + 'Южный Региональный Банк', + 'ЮМК', + 'ЮниаÑтрум Банк', + 'ЮниКредит Банк', + 'ЮниÑтрим', + 'Япы Креди Банк МоÑква', + 'ЯР-Банк', + 'Яринтербанк', + 'ЯроÑлавич', + 'K2 Банк', + 'ÐББ', + 'ÐбÑолют Банк', + 'Ðвангард', + 'ÐверÑ', + 'Ðвтоградбанк', + 'ÐвтоКредитБанк', + 'Ðвтоторгбанк', + 'Ðгроинкомбанк', + 'Ðгропромкредит', + 'ÐгророÑ', + 'ÐгроÑоюз', + 'Ðдамон Банк', + 'Ðдамон Банк МоÑковÑкий филиал', + 'Ðделантбанк', + 'ÐдмиралтейÑкий', + 'ÐзиатÑко-ТихоокеанÑкий Банк', + 'Ðзимут', + 'ÐÐ·Ð¸Ñ Ð‘Ð°Ð½Ðº', + 'ÐзиÑ-ИнвеÑÑ‚ Банк', + 'Ðй-Си-Ðй-Си-Ðй Банк (ICICI)', + 'Ðйви Банк', + 'ÐйМаниБанк', + 'Ðк БарÑ', + 'Ðкибанк', + 'Ðккобанк', + 'Ðкрополь', + 'ÐкÑонбанк', + 'Ðктив Банк', + 'ÐктивКапитал Банк', + 'ÐктивКапитал Банк МоÑковÑкий филиал', + 'ÐктивКапитал Банк Санкт-ПетербургÑкий филиал', + 'Ðкцент', + 'Ðкцепт', + 'ÐкциÑ', + 'Ðлданзолотобанк', + 'ÐлекÑандровÑкий', + 'Ðлеф-Банк', + 'Ðлжан', + 'ÐлмазÑргиÑнбанк', + 'ÐлтайБизнеÑ-Банк', + 'Ðлтайкапиталбанк', + 'Ðлтынбанк', + 'Ðльба ÐльÑнÑ', + 'Ðльта-Банк', + 'Ðльтернатива', + 'Ðльфа-Банк', + 'ÐМБ Банк', + 'ÐмерикÑн ЭкÑпреÑÑ Ð‘Ð°Ð½Ðº', + 'Ðнелик РУ', + 'Ðнкор Банк', + 'Ðнталбанк', + 'Ðпабанк', + 'ÐреÑбанк', + 'ÐрзамаÑ', + 'ÐркÑбанк', + 'ÐÑ€Ñенал', + 'ÐÑпект', + 'ÐÑÑоциациÑ', + 'БайкалБанк', + 'БайкалИнвеÑтБанк', + 'Байкалкредобанк', + 'Балаково-Банк', + 'БалтийÑкий Банк', + 'Балтика', + 'БалтинвеÑтбанк', + 'Банк "Ðкцент" МоÑковÑкий филиал', + 'Банк "МБÐ-МоÑква"', + 'Банк "Санкт-Петербург"', + 'Банк ÐВБ', + 'Банк БКФ', + 'Банк БФÐ', + 'Банк БЦК-МоÑква', + 'Банк Город', + 'Банк Жилищного ФинанÑированиÑ', + 'Банк Инноваций и РазвитиÑ', + 'Банк Интеза', + 'Банк ИТБ', + 'Банк Казани', + 'Банк ÐšÐ¸Ñ‚Ð°Ñ (ЭлоÑ)', + 'Банк Кредит СвиÑÑ', + 'Банк МБФИ', + 'Банк МоÑквы', + 'Банк на КраÑных Воротах', + 'Банк Оранжевый (бывш. ПромÑервиÑбанк)', + 'Банк оф Токио-МицубиÑи', + 'Банк Премьер Кредит', + 'Банк ÐŸÐ¡Ð Ð¤Ð¸Ð½Ð°Ð½Ñ Ð ÑƒÑ', + 'Банк Ð Ð°Ð·Ð²Ð¸Ñ‚Ð¸Ñ Ð¢ÐµÑ…Ð½Ð¾Ð»Ð¾Ð³Ð¸Ð¹', + 'Банк РаÑчетов и Сбережений', + 'Банк Раунд', + 'Банк РСИ', + 'Банк Сберегательно-кредитного ÑервиÑа', + 'Банк СГБ', + 'Банк Торгового ФинанÑированиÑ', + 'Банк ФинÑервиÑ', + 'Банк ЭкономичеÑкий Союз', + 'БанкирÑкий Дом', + 'Ð‘Ð°Ð½ÐºÑ…Ð°ÑƒÑ Ð­Ñ€Ð±Ðµ', + 'БашкомÑнаббанк', + 'Башпромбанк', + 'ББР Банк', + 'БелгородÑоцбанк', + 'Бенифит-Банк', + 'Берейт', + 'БеÑÑ‚ Ð­Ñ„Ñ„Ð¾Ñ€Ñ‚Ñ Ð‘Ð°Ð½Ðº', + 'Ð‘Ð¸Ð·Ð½ÐµÑ Ð´Ð»Ñ Ð‘Ð¸Ð·Ð½ÐµÑа', + 'Бинбанк', + 'БИÐБÐÐК кредитные карты', + 'Бинбанк МурманÑк', + 'БКС ИнвеÑтиционный Банк', + 'БМВ Банк', + 'БÐП Париба Банк', + 'БогородÑкий', + 'БогородÑкий Муниципальный Банк', + 'БратÑкий ÐÐКБ', + 'БСТ-Банк', + 'Булгар Банк', + 'Бум-Банк', + 'Бумеранг', + 'БФГ-Кредит', + 'БыÑтроБанк', + 'Вакобанк', + 'Вега-Банк', + 'Век', + 'Великие Луки Банк', + 'Венец', + 'ВерхневолжÑкий', + 'ВерхневолжÑкий КрымÑкий филиал', + 'ВерхневолжÑкий МоÑковÑкий филиал', + 'ВерхневолжÑкий ÐевÑкий филиал', + 'ВерхневолжÑкий ТавричеÑкий филиал', + 'ВерхневолжÑкий ЯроÑлавÑкий филиал', + 'ВеÑта', + 'ВеÑтинтербанк', + 'ВзаимодейÑтвие', + 'Викинг', + 'Витабанк', + 'ВитÑзь', + 'Вкабанк', + 'ВладбизнеÑбанк', + 'Владпромбанк', + 'Внешпромбанк', + 'Внешфинбанк', + 'ВнешÑкономбанк', + 'Военно-Промышленный Банк', + 'Возрождение', + 'Вокбанк', + 'Вологдабанк', + 'Вологжанин', + 'Воронеж', + 'ВоÑточно-ЕвропейÑкий ТраÑтовый Банк', + 'ВоÑточный ЭкÑпреÑÑ Ð‘Ð°Ð½Ðº', + 'ВоÑтСибтранÑкомбанк', + 'ВРБ МоÑква', + 'Ð’ÑероÑÑийÑкий Банк Ð Ð°Ð·Ð²Ð¸Ñ‚Ð¸Ñ Ð ÐµÐ³Ð¸Ð¾Ð½Ð¾Ð²', + 'ВТБ', + 'ВТБ 24', + 'ВУЗ-Банк', + 'Выборг-Банк', + 'Выборг-Банк МоÑковÑкий филиал', + 'Ð’Ñлтон Банк', + 'Ð’Ñтич', + 'Ð’Ñтка-Банк', + 'ГагаринÑкий', + 'Газбанк', + 'Газнефтьбанк', + 'Газпромбанк', + 'ГазÑтройбанк', + 'ГазтранÑбанк', + 'ГазÑнергобанк', + 'Ганзакомбанк', + 'Гарант-ИнвеÑÑ‚', + 'Гаранти Банк МоÑква', + 'Геленджик-Банк', + 'Генбанк', + 'Геобанк', + 'ГефеÑÑ‚', + 'ГлобуÑ', + 'ГлобÑкÑ', + 'Голдман Ð¡Ð°ÐºÑ Ð‘Ð°Ð½Ðº', + 'Горбанк', + 'ГПБ-Ипотека', + 'Гранд ИнвеÑÑ‚ Банк', + 'Гринкомбанк', + 'Гринфилдбанк', + 'ГриÑ-Банк', + 'Гута-Банк', + 'Далена', + 'Далетбанк', + 'Далта-Банк', + 'ДальневоÑточный Банк', + 'ДанÑке Банк', + 'Девон-Кредит', + 'ДельтаКредит', + 'Денизбанк МоÑква', + 'Держава', + 'Дж. П. ÐœÐ¾Ñ€Ð³Ð°Ð½ Банк', + 'ДжаÑÑ‚ Банк', + 'Джей Ñнд Ти Банк', + 'Дил-Банк', + 'Динамичные СиÑтемы', + 'Дойче Банк', + 'ДолинÑк', + 'Дом-Банк', + 'Дон-ТекÑбанк', + 'Донкомбанк', + 'Донхлеббанк', + 'Ð”Ð¾Ñ€Ð¸Ñ Ð‘Ð°Ð½Ðº', + 'Дружба', + 'ЕÐТП Банк', + 'ЕвразийÑкий Банк', + 'ЕвроазиатÑкий ИнвеÑтиционный Банк', + 'ЕвроÐкÑÐ¸Ñ Ð‘Ð°Ð½Ðº', + 'ЕвроальÑнÑ', + 'Еврокапитал-ÐльÑнÑ', + 'Еврокоммерц', + 'Еврокредит', + 'Евромет', + 'ЕвропейÑкий Стандарт', + 'Европлан Банк', + 'ЕвроÑитиБанк', + 'Ð•Ð²Ñ€Ð¾Ñ„Ð¸Ð½Ð°Ð½Ñ ÐœÐ¾Ñнарбанк', + 'ЕдинÑтвенный', + 'Единый Строительный Банк', + 'Екатеринбург', + 'ЕкатерининÑкий', + 'ЕниÑей', + 'ЕниÑейÑкий Объединенный Банк', + 'Ермак', + 'Живаго-Банк', + 'Жилкредит', + 'ЖилÑтройбанк', + 'ЗапÑибкомбанк', + 'Заречье', + 'Заубер Банк', + 'Земкомбанк', + 'ЗемÑкий Банк', + 'Зенит', + 'Зенит Сочи', + 'Зернобанк', + 'Зираат Банк', + 'Златкомбанк', + 'И.Д.Е.Ð. Банк', + 'Иваново', + 'Идеалбанк', + 'Ижкомбанк', + 'ИК Банк', + 'Икано Банк', + 'Инбанк', + 'ИнвеÑÑ‚-Экобанк', + 'ИнвеÑтиционный Банк Кубани', + 'ИнвеÑтиционный РеÑпубликанÑкий Банк', + 'ИнвеÑтиционный Союз', + 'ИнвеÑткапиталбанк', + 'ИнвеÑÑ‚Ñоцбанк', + 'ИнвеÑтторгбанк', + 'ИÐГ Банк', + 'ИндуÑтриальный Сберегательный Банк', + 'Инкаробанк', + 'Интерактивный Банк', + 'Интеркоммерц Банк', + 'Интеркоопбанк', + 'Интеркредит', + 'Интернациональный Торговый Банк', + 'ИнтерпрогреÑÑбанк', + 'Интерпромбанк', + 'Интехбанк', + 'ИнформпрогреÑÑ', + 'Ипозембанк', + 'ИпоТек Банк', + 'Иронбанк', + 'ИРС', + 'Итуруп', + 'Ишбанк', + 'Йошкар-Ола', + 'Калуга', + 'КамÑкий Горизонт', + 'КамÑкий КоммерчеÑкий Банк', + 'Камчаткомагропромбанк', + 'КанÑкий', + 'Капитал', + 'Капиталбанк', + 'Кедр', + 'КемÑоцинбанк', + 'КетовÑкий КоммерчеÑкий Банк', + 'Киви Банк', + 'КлаÑÑик Эконом Банк', + 'КлиентÑкий', + 'Кольцо Урала', + 'Коммерцбанк (ЕвразиÑ)', + 'КоммерчеÑкий Банк РазвитиÑ', + 'КоммерчеÑкий Индо Банк', + 'КонÑервативный КоммерчеÑкий Банк', + 'КонÑтанÑ-Банк', + 'Континенталь', + 'КонфидÑÐ½Ñ Ð‘Ð°Ð½Ðº', + 'Кор', + 'Кореа ЭкÑчендж Банк РуÑ', + 'КоролевÑкий Банк Шотландии', + 'КоÑмоÑ', + 'КоÑтромаÑелькомбанк', + 'Кошелев-Банк', + 'КрайинвеÑтбанк', + 'Кранбанк', + 'Креди Ðгриколь КИБ', + 'Кредит Европа Банк', + 'Кредит Урал Банк', + 'Кредит ЭкÑпреÑÑ', + 'Кредит-МоÑква', + 'КредитинвеÑÑ‚', + 'Кредо ФинанÑ', + 'Кредпромбанк', + 'КремлевÑкий', + 'КрокуÑ-Банк', + 'Крона-Банк', + 'КроÑна-Банк', + 'КроÑÑинвеÑтбанк', + 'КрыловÑкий', + 'КС Банк', + 'КубанÑкий УниверÑальный Банк', + 'Кубань Кредит', + 'Кубаньторгбанк', + 'КузбаÑÑхимбанк', + 'КузнецкбизнеÑбанк', + 'Кузнецкий', + 'Кузнецкий МоÑÑ‚', + 'Курган', + 'КурÑкпромбанк', + 'Лада-Кредит', + 'Лайтбанк', + 'Ланта-Банк', + 'Левобережный', + 'Легион', + 'Леноблбанк', + 'ЛеÑбанк', + 'Лето Банк', + 'Липецккомбанк', + 'ЛогоÑ', + 'Локо-Банк', + 'ЛÑнд-Банк', + 'Ðœ2Ðœ Прайвет Банк', + 'Майкопбанк', + 'МайÑкий', + 'ÐœÐК-Банк', + 'МакÑима', + 'МакÑимум', + 'ÐœÐСТ-Банк', + 'МаÑтер-Капитал', + 'МВС Банк', + 'МДМ Банк', + 'МегаполиÑ', + 'Международный Ðкционерный Банк', + 'Международный Банк РазвитиÑ', + 'Международный Банк Санкт-Петербурга (МБСП)', + 'Международный КоммерчеÑкий Банк', + 'Международный РаÑчетный Банк', + 'Международный Строительный Банк', + 'Международный ФинанÑовый Клуб', + 'МежотраÑÐ»ÐµÐ²Ð°Ñ Ð‘Ð°Ð½ÐºÐ¾Ð²ÑÐºÐ°Ñ ÐšÐ¾Ñ€Ð¿Ð¾Ñ€Ð°Ñ†Ð¸Ñ', + 'Межрегиональный Банк РеконÑтрукции', + 'Межрегиональный Клиринговый Банк', + 'Межрегиональный Почтовый Банк', + 'Межрегиональный промышленно-Ñтроительный банк', + 'Межрегионбанк', + 'МежтопÑнергобанк', + 'МежтраÑтбанк', + 'МерÑедеÑ-Бенц Банк РуÑ', + 'МеталлинвеÑтбанк', + 'Металлург', + 'Меткомбанк (КаменÑк-УральÑкий)', + 'Меткомбанк (Череповец)', + 'Метробанк', + 'Метрополь', + 'Мидзухо Банк', + 'Мико-Банк', + 'Милбанк', + 'Миллениум Банк', + 'Мир Ð‘Ð¸Ð·Ð½ÐµÑ Ð‘Ð°Ð½Ðº', + 'Мираф-Банк', + 'Мираф-Банк МоÑковÑкий филиал', + 'Миръ', + 'МихайловÑкий ПЖСБ', + 'Морган СтÑнли Банк', + 'МорÑкой Банк', + 'МоÑводоканалбанк', + 'МоÑква', + 'МоÑква-Сити', + 'МоÑковÑкий ВекÑельный Банк', + 'МоÑковÑкий ИндуÑтриальный Банк', + 'МоÑковÑкий КоммерчеÑкий Банк', + 'МоÑковÑкий Кредитный Банк', + 'МоÑковÑкий Ðациональный ИнвеÑтиционный Банк', + 'МоÑковÑкий ÐефтехимичеÑкий Банк', + 'МоÑковÑкий ОблаÑтной Банк', + 'МоÑковÑко-ПарижÑкий Банк', + 'МоÑковÑкое Ипотечное ÐгентÑтво', + 'МоÑкоммерцбанк', + 'МоÑÑтройÑкономбанк (Ðœ Банк)', + 'МоÑтранÑбанк', + 'МоÑуралбанк', + 'МС Банк РуÑ', + 'МСП Банк', + 'МТИ-Банк', + 'МТС Банк', + 'Муниципальный Камчатпрофитбанк', + 'МурманÑкий Социальный КоммерчеÑкий Банк', + 'МФБанк', + 'Ð-Банк', + 'Ðальчик', + 'Ðаратбанк', + 'Ðародный Банк', + 'Ðародный Банк РеÑпублики Тыва', + 'Ðародный Доверительный Банк', + 'Ðародный Земельно-Промышленный Банк', + 'Ðародный ИнвеÑтиционный Банк', + 'ÐатикÑÐ¸Ñ Ð‘Ð°Ð½Ðº', + 'ÐацинвеÑтпромбанк', + 'ÐÐ°Ñ†Ð¸Ð¾Ð½Ð°Ð»ÑŒÐ½Ð°Ñ Ð¤Ð°ÐºÑ‚Ð¾Ñ€Ð¸Ð½Ð³Ð¾Ð²Ð°Ñ ÐšÐ¾Ð¼Ð¿Ð°Ð½Ð¸Ñ', + 'Ðациональный Банк "ТраÑÑ‚"', + 'Ðациональный Банк Взаимного Кредита', + 'Ðациональный Банк Сбережений', + 'Ðациональный Залоговый Банк', + 'Ðациональный Клиринговый Банк', + 'Ðациональный Клиринговый Центр', + 'Ðациональный Корпоративный Банк', + 'Ðациональный Резервный Банк', + 'Ðациональный Стандарт', + 'Ðаш Дом', + 'ÐБД-Банк', + 'ÐБК-Банк', + 'ÐеваÑтройинвеÑÑ‚', + 'ÐевÑкий Банк', + 'Ðейва', + 'Ðерюнгрибанк', + 'Ðефтепромбанк', + 'ÐефтÑной ÐльÑнÑ', + 'ÐижневолжÑкий КоммерчеÑкий Банк', + 'Ðико-Банк', + 'ÐК Банк', + 'ÐоваховКапиталБанк', + 'ÐовациÑ', + 'Ðовикомбанк', + 'Ðовобанк', + 'Ðовое ВремÑ', + 'Ðовокиб', + 'ÐовопокровÑкий', + 'Ðовый Век', + 'Ðовый Кредитный Союз', + 'Ðовый МоÑковÑкий Банк', + ); + + /** + * @example 'Ðовый МоÑковÑкий Банк' + */ + public static function bank() + { + return static::randomElement(static::$banks); + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/ru_RU/Person.php b/vendor/fzaninotto/faker/src/Faker/Provider/ru_RU/Person.php new file mode 100644 index 0000000..09a59f6 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/ru_RU/Person.php @@ -0,0 +1,135 @@ +generator->parse(static::randomElement(static::$lastNameFormat)); + } + + public static function lastNameMale() + { + return static::randomElement(static::$lastNameMale); + } + + public static function lastNameFemale() + { + return static::randomElement(static::$lastNameFemale); + } + + /** + * @example 'PhD' + */ + public static function suffix() + { + return static::randomElement(static::$suffix); + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/sk_SK/PhoneNumber.php b/vendor/fzaninotto/faker/src/Faker/Provider/sk_SK/PhoneNumber.php new file mode 100644 index 0000000..1baf7cc --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/sk_SK/PhoneNumber.php @@ -0,0 +1,15 @@ +format('ymd'); + + if ($gender && $gender == static::GENDER_MALE) { + $randomDigits = (string)static::numerify('##') . static::randomElement(array(1,3,5,7,9)); + } elseif ($gender && $gender == static::GENDER_FEMALE) { + $randomDigits = (string)static::numerify('##') . static::randomElement(array(0,2,4,6,8)); + } else { + $randomDigits = (string)static::numerify('###'); + } + + + $checksum = Luhn::computeCheckDigit($datePart . $randomDigits); + + return $datePart . '-' . $randomDigits . $checksum; + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/sv_SE/PhoneNumber.php b/vendor/fzaninotto/faker/src/Faker/Provider/sv_SE/PhoneNumber.php new file mode 100644 index 0000000..d15e5dd --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/sv_SE/PhoneNumber.php @@ -0,0 +1,37 @@ +format('a') === 'am' ? 'öö' : 'ös'; + } + + public static function dayOfWeek($max = 'now') + { + $map = array( + 'Sunday' => 'Pazar', + 'Monday' => 'Pazartesi', + 'Tuesday' => 'Salı', + 'Wednesday' => 'ÇarÅŸamba', + 'Thursday' => 'PerÅŸembe', + 'Friday' => 'Cuma', + 'Saturday' => 'Cumartesi', + ); + $week = static::dateTime($max)->format('l'); + return isset($map[$week]) ? $map[$week] : $week; + } + + public static function monthName($max = 'now') + { + $map = array( + 'January' => 'Ocak', + 'February' => 'Åžubat', + 'March' => 'Mart', + 'April' => 'Nisan', + 'May' => 'Mayıs', + 'June' => 'Haziran', + 'July' => 'Temmuz', + 'August' => 'AÄŸustos', + 'September' => 'Eylül', + 'October' => 'Ekim', + 'November' => 'Kasım', + 'December' => 'Aralık', + ); + $month = static::dateTime($max)->format('F'); + return isset($map[$month]) ? $map[$month] : $month; + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/tr_TR/Internet.php b/vendor/fzaninotto/faker/src/Faker/Provider/tr_TR/Internet.php new file mode 100644 index 0000000..ef907d4 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/tr_TR/Internet.php @@ -0,0 +1,9 @@ +generator->parse($format); + } + + public static function streetPrefix() + { + return static::randomElement(static::$streetPrefix); + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/uk_UA/Color.php b/vendor/fzaninotto/faker/src/Faker/Provider/uk_UA/Color.php new file mode 100644 index 0000000..197cc3b --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/uk_UA/Color.php @@ -0,0 +1,23 @@ +generator->parse($format); + } + + public static function companyPrefix() + { + return static::randomElement(static::$companyPrefix); + } + + public static function companyName() + { + return static::randomElement(static::$companyName); + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/uk_UA/Internet.php b/vendor/fzaninotto/faker/src/Faker/Provider/uk_UA/Internet.php new file mode 100644 index 0000000..33214d6 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/uk_UA/Internet.php @@ -0,0 +1,9 @@ +generator->parse($format)); + } + + public function hamletPrefix() + { + return static::randomElement(static::$hamletPrefix); + } + + public function wardName() + { + $format = static::randomElement(static::$wardNameFormats); + + return static::bothify($this->generator->parse($format)); + } + + public function wardPrefix() + { + return static::randomElement(static::$wardPrefix); + } + + public function districtName() + { + $format = static::randomElement(static::$districtNameFormats); + + return static::bothify($this->generator->parse($format)); + } + + public function districtPrefix() + { + return static::randomElement(static::$districtPrefix); + } + + /** + * @example 'Hà Ná»™i' + */ + public function city() + { + return static::randomElement(static::$city); + } + + /** + * @example 'Bắc Giang' + */ + public static function province() + { + return static::randomElement(static::$province); + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/vi_VN/Color.php b/vendor/fzaninotto/faker/src/Faker/Provider/vi_VN/Color.php new file mode 100644 index 0000000..4deaa2f --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/vi_VN/Color.php @@ -0,0 +1,36 @@ +generator->parse(static::randomElement(static::$middleNameFormat)); + } + + public static function middleNameMale() + { + return static::randomElement(static::$middleNameMale); + } + + public static function middleNameFemale() + { + return static::randomElement(static::$middleNameFemale); + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/vi_VN/PhoneNumber.php b/vendor/fzaninotto/faker/src/Faker/Provider/vi_VN/PhoneNumber.php new file mode 100644 index 0000000..5f9f60a --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/vi_VN/PhoneNumber.php @@ -0,0 +1,61 @@ + array( + '0[a] ### ####', + '(0[a]) ### ####', + '0[a]-###-####', + '(0[a])###-####', + '84-[a]-###-####', + '(84)([a])###-####', + '+84-[a]-###-####', + ), + '8' => array( + '0[a] #### ####', + '(0[a]) #### ####', + '0[a]-####-####', + '(0[a])####-####', + '84-[a]-####-####', + '(84)([a])####-####', + '+84-[a]-####-####', + ), + ); + + public function phoneNumber() + { + $areaCode = static::randomElement(static::$areaCodes); + $areaCodeLength = strlen($areaCode); + $digits = 7; + + if ($areaCodeLength < 2) { + $digits = 8; + } + + return static::numerify(str_replace('[a]', $areaCode, static::randomElement(static::$formats[$digits]))); + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/zh_CN/Address.php b/vendor/fzaninotto/faker/src/Faker/Provider/zh_CN/Address.php new file mode 100644 index 0000000..19d1c94 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/zh_CN/Address.php @@ -0,0 +1,149 @@ +city() . static::area(); + } + + public static function postcode() + { + $prefix = str_pad(mt_rand(1, 85), 2, 0, STR_PAD_LEFT); + $suffix = '00'; + + return $prefix . mt_rand(10, 88) . $suffix; + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/zh_CN/Color.php b/vendor/fzaninotto/faker/src/Faker/Provider/zh_CN/Color.php new file mode 100644 index 0000000..12d29e3 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/zh_CN/Color.php @@ -0,0 +1,66 @@ +format('a') === 'am' ? '上åˆ' : '下åˆ'; + } + + public static function dayOfWeek($max = 'now') + { + $map = array( + 'Sunday' => '星期日', + 'Monday' => '星期一', + 'Tuesday' => '星期二', + 'Wednesday' => '星期三', + 'Thursday' => '星期四', + 'Friday' => '星期五', + 'Saturday' => '星期六', + ); + $week = static::dateTime($max)->format('l'); + return isset($map[$week]) ? $map[$week] : $week; + } + + public static function monthName($max = 'now') + { + $map = array( + 'January' => '一月', + 'February' => '二月', + 'March' => '三月', + 'April' => '四月', + 'May' => '五月', + 'June' => '六月', + 'July' => '七月', + 'August' => '八月', + 'September' => 'ä¹æœˆ', + 'October' => 'å月', + 'November' => 'å一月', + 'December' => 'å二月', + ); + $month = static::dateTime($max)->format('F'); + return isset($map[$month]) ? $map[$month] : $month; + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/zh_CN/Internet.php b/vendor/fzaninotto/faker/src/Faker/Provider/zh_CN/Internet.php new file mode 100644 index 0000000..ca10822 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/zh_CN/Internet.php @@ -0,0 +1,24 @@ + array( + 'æ¿æ©‹å€', '三é‡å€', '中和å€', '永和å€', + '新莊å€', '新店å€', '樹林å€', '鶯歌å€', + '三峽å€', 'æ·¡æ°´å€', 'æ±æ­¢å€', '瑞芳å€', + '土城å€', '蘆洲å€', '五股å€', 'æ³°å±±å€', + 'æž—å£å€', 'æ·±å‘å€', '石碇å€', 'åªæž—å€', + '三èŠå€', '石門å€', '八里å€', '平溪å€', + '雙溪å€', '貢寮å€', '金山å€', 'è¬é‡Œå€', + 'çƒä¾†å€', + ), + '宜蘭縣' => array( + '宜蘭市', 'ç¾…æ±éŽ®', '蘇澳鎮', '頭城鎮', 'ç¤æºªé„‰', + '壯åœé„‰', '員山鄉', '冬山鄉', '五çµé„‰', '三星鄉', + '大åŒé„‰', 'å—澳鄉', + ), + '桃園縣' => array( + '桃園市', '中壢市', '大溪鎮', '楊梅鎮', '蘆竹鄉', + '大園鄉', '龜山鄉', '八德市', 'é¾æ½­é„‰', '平鎮市', + '新屋鄉', '觀音鄉', '復興鄉', + ), + '新竹縣' => array( + '竹北市', '竹æ±éŽ®', '新埔鎮', '關西鎮', 'æ¹–å£é„‰', + 'æ–°è±é„‰', '芎林鄉', '橫山鄉', '北埔鄉', '寶山鄉', + '峨眉鄉', '尖石鄉', '五峰鄉', + ), + '苗栗縣' => array( + '苗栗市', '苑裡鎮', '通霄鎮', '竹å—鎮', '頭份鎮', + '後é¾éŽ®', 'å“蘭鎮', '大湖鄉', '公館鄉', '銅鑼鄉', + 'å—庄鄉', '頭屋鄉', '三義鄉', '西湖鄉', '造橋鄉', + '三ç£é„‰', 'ç…潭鄉', '泰安鄉', + ), + '臺中市' => array( + 'è±åŽŸå€', 'æ±å‹¢å€', '大甲å€', '清水å€', '沙鹿å€', + '梧棲å€', 'åŽé‡Œå€', '神岡å€', 'æ½­å­å€', '大雅å€', + '新社å€', '石岡å€', '外埔å€', '大安å€', 'çƒæ—¥å€', + '大肚å€', 'é¾äº•å€', '霧峰å€', '太平å€', '大里å€', + '和平å€', '中å€', 'æ±å€', 'å—å€', '西å€', '北å€', + '西屯å€', 'å—屯å€', '北屯å€', + ), + '彰化縣' => array( + '彰化市', '鹿港鎮', '和美鎮', '線西鄉', '伸港鄉', + 'ç¦èˆˆé„‰', '秀水鄉', '花壇鄉', '芬園鄉', '員林鎮', + '溪湖鎮', '田中鎮', '大æ‘鄉', '埔鹽鄉', '埔心鄉', + 'æ°¸é–鄉', '社頭鄉', '二水鄉', '北斗鎮', '二林鎮', + '田尾鄉', '埤頭鄉', '芳苑鄉', '大城鄉', '竹塘鄉', + '溪州鄉', + ), + 'å—投縣' => array( + 'å—投市', '埔里鎮', 'è‰å±¯éŽ®', '竹山鎮', '集集鎮', + 'å間鄉', '鹿谷鄉', '中寮鄉', '魚池鄉', '國姓鄉', + '水里鄉', '信義鄉', 'ä»æ„›é„‰', + ), + '雲林縣' => array( + '斗六市', 'æ–—å—鎮', '虎尾鎮', '西螺鎮', '土庫鎮', + '北港鎮', 'å¤å‘鄉', '大埤鄉', '莿æ¡é„‰', '林內鄉', + '二崙鄉', '崙背鄉', '麥寮鄉', 'æ±å‹¢é„‰', '褒忠鄉', + '臺西鄉', '元長鄉', '四湖鄉', 'å£æ¹–鄉', '水林鄉', + ), + '嘉義縣' => array( + '太ä¿å¸‚', '朴å­å¸‚', '布袋鎮', '大林鎮', '民雄鄉', + '溪å£é„‰', '新港鄉', '六腳鄉', 'æ±çŸ³é„‰', '義竹鄉', + '鹿è‰é„‰', '水上鄉', '中埔鄉', '竹崎鄉', '梅山鄉', + '番路鄉', '大埔鄉', '阿里山鄉', + ), + '臺å—市' => array( + '新營å€', '鹽水å€', '白河å€', '柳營å€', '後å£å€', + 'æ±å±±å€', '麻豆å€', '下營å€', '六甲å€', '官田å€', + '大內å€', '佳里å€', '學甲å€', '西港å€', '七股å€', + 'å°‡è»å€', '北門å€', '新化å€', '善化å€', '新市å€', + '安定å€', '山上å€', '玉井å€', '楠西å€', 'å—化å€', + '左鎮å€', 'ä»å¾·å€', 'æ­¸ä»å€', '關廟å€', 'é¾å´Žå€', + '永康å€', 'æ±å€', 'å—å€', '西å€', '北å€', '中å€', + '安å—å€', '安平å€', + ), + '高雄市' => array( + '鳳山å€', '林園å€', '大寮å€', '大樹å€', '大社å€', + 'ä»æ­¦å€', 'é³¥æ¾å€', '岡山å€', 'æ©‹é ­å€', '燕巢å€', + '田寮å€', '阿蓮å€', '路竹å€', 'æ¹–å…§å€', '茄è£å€', + '永安å€', '彌陀å€', '梓官å€', 'æ——å±±å€', '美濃å€', + '六龜å€', '甲仙å€', 'æ‰æž—å€', '內門å€', '茂林å€', + '桃æºå€', '三民å€', '鹽埕å€', '鼓山å€', '左營å€', + '楠梓å€', '三民å€', '新興å€', 'å‰é‡‘å€', 'è‹“é›…å€', + 'å‰éŽ®å€', 'æ——æ´¥å€', 'å°æ¸¯å€', + ), + 'å±æ±ç¸£' => array( + 'å±æ±å¸‚', '潮州鎮', 'æ±æ¸¯éŽ®', 'æ†æ˜¥éŽ®', 'è¬ä¸¹é„‰', + '長治鄉', '麟洛鄉', 'ä¹å¦‚鄉', '里港鄉', '鹽埔鄉', + '高樹鄉', 'è¬å·’鄉', '內埔鄉', '竹田鄉', '新埤鄉', + '枋寮鄉', '新園鄉', 'å´é ‚鄉', '林邊鄉', 'å—州鄉', + '佳冬鄉', 'ç‰çƒé„‰', '車城鄉', '滿州鄉', '枋山鄉', + '三地門鄉', '霧臺鄉', '瑪家鄉', '泰武鄉', '來義鄉', + '春日鄉', 'ç…å­é„‰', '牡丹鄉', + ), + '臺æ±ç¸£' => array( + '臺æ±å¸‚', 'æˆåŠŸéŽ®', '關山鎮', 'å‘å—鄉', '鹿野鄉', + '池上鄉', 'æ±æ²³é„‰', '長濱鄉', '太麻里鄉', '大武鄉', + '綠島鄉', '海端鄉', '延平鄉', '金峰鄉', 'é”ä»é„‰', + '蘭嶼鄉', + ), + '花蓮縣' => array( + '花蓮市', '鳳林鎮', '玉里鎮', '新城鄉', 'å‰å®‰é„‰', + '壽è±é„‰', '光復鄉', 'è±æ¿±é„‰', '瑞穗鄉', '富里鄉', + '秀林鄉', 'è¬æ¦®é„‰', 'å“溪鄉', + ), + '澎湖縣' => array( + '馬公市', '湖西鄉', '白沙鄉', '西嶼鄉', '望安鄉', + '七美鄉', + ), + '基隆市' => array( + '中正å€', '七堵å€', 'æš–æš–å€', 'ä»æ„›å€', '中山å€', + '安樂å€', '信義å€', + ), + '新竹市' => array( + 'æ±å€', '北å€', '香山å€', + ), + '嘉義市' => array( + 'æ±å€', '西å€', + ), + '臺北市' => array( + 'æ¾å±±å€', '信義å€', '大安å€', '中山å€', '中正å€', + '大åŒå€', 'è¬è¯å€', '文山å€', 'å—港å€', '內湖å€', + '士林å€', '北投å€', + ), + '連江縣' => array( + 'å—竿鄉', '北竿鄉', '莒光鄉', 'æ±å¼•é„‰', + ), + '金門縣' => array( + '金城鎮', '金沙鎮', '金湖鎮', '金寧鄉', '烈嶼鄉', 'çƒåµé„‰', + ), + ); + + /** + * @link http://terms.naer.edu.tw/download/287/ + */ + protected static $country = array( + 'ä¸ä¸¹', '中éž', '丹麥', '伊朗', '冰島', '剛果', + '加彭', '北韓', 'å—éž', 'å¡é”', 'å°å°¼', 'å°åº¦', + 'å¤å·´', '哥德', '埃åŠ', '多哥', '寮國', '尼日', + '巴曼', 'å·´æž—', 'å·´ç´', '巴西', '希臘', '帛ç‰', + '德國', '挪å¨', 'æ·å…‹', '教廷', 'æ–æ¿Ÿ', '日本', + '智利', 'æ±åŠ ', '查德', '汶èŠ', '法國', '波蘭', + '波赫', '泰國', '海地', 'ç‘žå…¸', '瑞士', '祕魯', + '秘魯', 'ç´„æ—¦', 'ç´åŸƒ', '緬甸', '美國', 'è–å°¼', + 'è–æ™®', '肯亞', '芬蘭', '英國', 'è·è˜­', '葉門', + '蘇丹', '諾魯', 'è²å—', '越å—', '迦彭', + '迦ç´', '阿曼', '阿è¯', '韓國', '馬利', + '以色列', '以色利', '伊拉克', 'ä¿„ç¾…æ–¯', + '利比亞', '加拿大', '匈牙利', 'å—極洲', + 'å—蘇丹', '厄瓜多', 'å‰å¸ƒåœ°', 'å瓦魯', + '哈撒克', '哈薩克', '喀麥隆', '喬治亞', + '土庫曼', '土耳其', 'å¡”å‰å…‹', '塞席爾', + '墨西哥', '大西洋', '奧地利', '孟加拉', + '安哥拉', '安地å¡', '安é“爾', '尚比亞', + '尼伯爾', '尼泊爾', '巴哈馬', '巴拉圭', + '巴拿馬', 'å·´è²å¤š', '幾內亞', '愛爾蘭', + '所在國', '摩洛哥', 'æ‘©ç´å“¥', 'æ•åˆ©äºž', + '敘利亞', '新加å¡', 'æ±å¸æ±¶', '柬埔寨', + '比利時', '波扎那', '波札那', 'çƒå…‹è˜­', + 'çƒå¹²é”', 'çƒæ‹‰åœ­', '牙買加', 'ç…å­å±±', + '甘比亞', '盧安é”', '盧森堡', '科å¨ç‰¹', + '科索夫', '科索沃', '立陶宛', 'ç´è¥¿è˜­', + '維德角', '義大利', 'è–文森', '艾塞亞', + 'è²å¾‹è³“', 'è¬é‚£æœ', 'è‘¡è„牙', '蒲隆地', + '蓋亞ç´', '薩摩亞', '蘇利å—', '西ç­ç‰™', + 'è²é‡Œæ–¯', '賴索托', '辛巴å¨', '阿富汗', + '阿根廷', '馬其頓', '馬拉å¨', '馬爾他', + '黎巴嫩', '亞塞拜然', '亞美尼亞', 'ä¿åŠ åˆ©äºž', + 'å—斯拉夫', '厄利垂亞', 'å²ç“¦æ¿Ÿè˜­', 'å‰çˆ¾å‰æ–¯', + 'å‰é‡Œå·´æ–¯', '哥倫比亞', 'å¦å°šå°¼äºž', '塞內加爾', + '塞内加爾', '塞爾維亞', '多明尼加', '多米尼克', + '奈åŠåˆ©äºž', '委內瑞拉', 'å®éƒ½æ‹‰æ–¯', '尼加拉瓜', + '巴基斯å¦', '庫克群島', '愛沙尼亞', '拉脫維亞', + '摩爾多瓦', '摩里西斯', '斯洛ä¼å…‹', '斯里蘭å¡', + '格瑞那é”', '模里西斯', '波多黎å„', '澳大利亞', + 'çƒèŒ²åˆ¥å…‹', '玻利維亞', '瓜地馬拉', '白俄羅斯', + 'çªå°¼è¥¿äºž', 'ç´ç±³æ¯”亞', '索馬利亞', '索馬尼亞', + '羅馬尼亞', 'è–露西亞', 'è–馬利諾', '莫三比克', + '莫三鼻克', '葛摩è¯ç›Ÿ', '薩爾瓦多', '衣索比亞', + '西薩摩亞', '象牙海岸', '賴比瑞亞', '賽普勒斯', + '馬來西亞', '馬爾地夫', '克羅埃西亞', + '列支敦斯登', '哥斯大黎加', '布å‰ç´æ³•ç´¢', + '布å‰é‚£æ³•ç´¢', '幾內亞比索', '幾內亞比紹', + '斯洛維尼亞', '索羅門群島', '茅利塔尼亞', + '蒙特內哥羅', '赤é“幾內亞', '阿爾åŠåˆ©äºž', + '阿爾åŠå°¼äºž', '阿爾巴尼亞', '馬紹爾群島', + '馬é”加斯加', '密克羅尼西亞', 'æ²™çƒåœ°é˜¿æ‹‰ä¼¯', + 'åƒé‡Œé”åŠæ‰˜å·´å“¥', + ); + + protected static $postcode = array('###-##', '###'); + + public function street() + { + return static::randomElement(static::$street); + } + + public static function randomChineseNumber() + { + $digits = array( + '', '一', '二', '三', 'å››', '五', 'å…­', '七', 'å…«', 'ä¹', + ); + return $digits[static::randomDigitNotNull()]; + } + + public static function randomNumber2() + { + return static::randomNumber(2) + 1; + } + + public static function randomNumber3() + { + return static::randomNumber(3) + 1; + } + + public static function localLatitude() + { + return number_format(mt_rand(22000000, 25000000)/1000000, 6); + } + + public static function localLongitude() + { + return number_format(mt_rand(120000000, 122000000)/1000000, 6); + } + + public function city() + { + $county = static::randomElement(array_keys(static::$city)); + $city = static::randomElement(static::$city[$county]); + return $county.$city; + } + + public function state() + { + return '臺ç£çœ'; + } + + public static function stateAbbr() + { + return '臺'; + } + + public static function cityPrefix() + { + return ''; + } + + public static function citySuffix() + { + return ''; + } + + public static function secondaryAddress() + { + return (static::randomNumber(2)+1).static::randomElement(static::$secondaryAddressSuffix); + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/zh_TW/Color.php b/vendor/fzaninotto/faker/src/Faker/Provider/zh_TW/Color.php new file mode 100644 index 0000000..7be5953 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/zh_TW/Color.php @@ -0,0 +1,66 @@ +generator->parse($format); + } + + public static function companyModifier() + { + return static::randomElement(static::$companyModifier); + } + + public static function companyPrefix() + { + return static::randomElement(static::$companyPrefix); + } + + public function catchPhrase() + { + return static::randomElement(static::$catchPhrase); + } + + public function bs() + { + $result = ''; + foreach (static::$bsWords as &$word) { + $result .= static::randomElement($word); + } + return $result; + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/zh_TW/DateTime.php b/vendor/fzaninotto/faker/src/Faker/Provider/zh_TW/DateTime.php new file mode 100644 index 0000000..6df5e92 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/zh_TW/DateTime.php @@ -0,0 +1,46 @@ +format('a') === 'am' ? '上åˆ' : '下åˆ'; + } + + public static function dayOfWeek($max = 'now') + { + $map = array( + 'Sunday' => '星期日', + 'Monday' => '星期一', + 'Tuesday' => '星期二', + 'Wednesday' => '星期三', + 'Thursday' => '星期四', + 'Friday' => '星期五', + 'Saturday' => '星期六', + ); + $week = static::dateTime($max)->format('l'); + return isset($map[$week]) ? $map[$week] : $week; + } + + public static function monthName($max = 'now') + { + $map = array( + 'January' => '一月', + 'February' => '二月', + 'March' => '三月', + 'April' => '四月', + 'May' => '五月', + 'June' => '六月', + 'July' => '七月', + 'August' => '八月', + 'September' => 'ä¹æœˆ', + 'October' => 'å月', + 'November' => 'å一月', + 'December' => 'å二月', + ); + $month = static::dateTime($max)->format('F'); + return isset($map[$month]) ? $map[$month] : $month; + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/zh_TW/Internet.php b/vendor/fzaninotto/faker/src/Faker/Provider/zh_TW/Internet.php new file mode 100644 index 0000000..4035ea8 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/zh_TW/Internet.php @@ -0,0 +1,16 @@ +userName(); + } + + public function domainWord() + { + return \Faker\Factory::create('en_US')->domainWord(); + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/zh_TW/Payment.php b/vendor/fzaninotto/faker/src/Faker/Provider/zh_TW/Payment.php new file mode 100644 index 0000000..6b1a582 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/zh_TW/Payment.php @@ -0,0 +1,11 @@ +creditCardDetails($valid); + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/zh_TW/Person.php b/vendor/fzaninotto/faker/src/Faker/Provider/zh_TW/Person.php new file mode 100644 index 0000000..71f248b --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/Provider/zh_TW/Person.php @@ -0,0 +1,132 @@ + 251: + $temp .= $chars[++$i]; + // no break + case $ord > 247: + $temp .= $chars[++$i]; + // no break + case $ord > 239: + $temp .= $chars[++$i]; + // no break + case $ord > 223: + $temp .= $chars[++$i]; + // no break + case $ord > 191: + $temp .= $chars[++$i]; + // no break + } + + $encoding[] = $temp; + } + + return $encoding; + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/UniqueGenerator.php b/vendor/fzaninotto/faker/src/Faker/UniqueGenerator.php new file mode 100644 index 0000000..389dbfe --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/UniqueGenerator.php @@ -0,0 +1,58 @@ +unique() + */ +class UniqueGenerator +{ + protected $generator; + protected $maxRetries; + protected $uniques = array(); + + /** + * @param Generator $generator + * @param $maxRetries + */ + public function __construct(Generator $generator, $maxRetries) + { + $this->generator = $generator; + $this->maxRetries = $maxRetries; + } + + /** + * Catch and proxy all generator calls but return only unique values + * @param string $attribute + * @return mixed + */ + public function __get($attribute) + { + return $this->__call($attribute, array()); + } + + /** + * Catch and proxy all generator calls with arguments but return only unique values + * @param string $name + * @param array $arguments + * @return mixed + */ + public function __call($name, $arguments) + { + if (!isset($this->uniques[$name])) { + $this->uniques[$name] = array(); + } + $i = 0; + do { + $res = call_user_func_array(array($this->generator, $name), $arguments); + $i++; + if ($i > $this->maxRetries) { + throw new \OverflowException(sprintf('Maximum retries of %d reached without finding a unique value', $this->maxRetries)); + } + } while (array_key_exists(serialize($res), $this->uniques[$name])); + $this->uniques[$name][serialize($res)]= null; + + return $res; + } +} diff --git a/vendor/fzaninotto/faker/src/Faker/ValidGenerator.php b/vendor/fzaninotto/faker/src/Faker/ValidGenerator.php new file mode 100644 index 0000000..1a31857 --- /dev/null +++ b/vendor/fzaninotto/faker/src/Faker/ValidGenerator.php @@ -0,0 +1,59 @@ +valid() + */ +class ValidGenerator +{ + protected $generator; + protected $validator; + protected $maxRetries; + + /** + * @param Generator $generator + */ + public function __construct(Generator $generator, $validator = null, $maxRetries = 10000) + { + if (is_null($validator)) { + $validator = function () { + return true; + }; + } elseif (!is_callable($validator)) { + throw new \InvalidArgumentException('valid() only accepts callables as first argument'); + } + $this->generator = $generator; + $this->validator = $validator; + $this->maxRetries = $maxRetries; + } + + /** + * Catch and proxy all generator calls but return only valid values + * @param string $attribute + */ + public function __get($attribute) + { + return $this->__call($attribute, array()); + } + + /** + * Catch and proxy all generator calls with arguments but return only valid values + * @param string $name + * @param array $arguments + */ + public function __call($name, $arguments) + { + $i = 0; + do { + $res = call_user_func_array(array($this->generator, $name), $arguments); + $i++; + if ($i > $this->maxRetries) { + throw new \OverflowException(sprintf('Maximum retries of %d reached without finding a valid value', $this->maxRetries)); + } + } while (!call_user_func($this->validator, $res)); + + return $res; + } +} diff --git a/vendor/fzaninotto/faker/src/autoload.php b/vendor/fzaninotto/faker/src/autoload.php new file mode 100644 index 0000000..f55914d --- /dev/null +++ b/vendor/fzaninotto/faker/src/autoload.php @@ -0,0 +1,26 @@ +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/vendor/fzaninotto/faker/test/Faker/Calculator/LuhnTest.php b/vendor/fzaninotto/faker/test/Faker/Calculator/LuhnTest.php new file mode 100644 index 0000000..c217017 --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Calculator/LuhnTest.php @@ -0,0 +1,62 @@ +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/vendor/fzaninotto/faker/test/Faker/DefaultGeneratorTest.php b/vendor/fzaninotto/faker/test/Faker/DefaultGeneratorTest.php new file mode 100644 index 0000000..262243d --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/DefaultGeneratorTest.php @@ -0,0 +1,27 @@ +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/vendor/fzaninotto/faker/test/Faker/GeneratorTest.php b/vendor/fzaninotto/faker/test/Faker/GeneratorTest.php new file mode 100644 index 0000000..e437292 --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/GeneratorTest.php @@ -0,0 +1,147 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/AddressTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/AddressTest.php new file mode 100644 index 0000000..5a5f66d --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/AddressTest.php @@ -0,0 +1,46 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/BarcodeTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/BarcodeTest.php new file mode 100644 index 0000000..1373b2b --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/BarcodeTest.php @@ -0,0 +1,45 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/BaseTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/BaseTest.php new file mode 100644 index 0000000..6fc0cc9 --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/BaseTest.php @@ -0,0 +1,551 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/BiasedTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/BiasedTest.php new file mode 100644 index 0000000..1f7a99a --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/BiasedTest.php @@ -0,0 +1,73 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/ColorTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/ColorTest.php new file mode 100644 index 0000000..f73831b --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/ColorTest.php @@ -0,0 +1,53 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/CompanyTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/CompanyTest.php new file mode 100644 index 0000000..ac26c5a --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/CompanyTest.php @@ -0,0 +1,30 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/DateTimeTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/DateTimeTest.php new file mode 100644 index 0000000..252662b --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/DateTimeTest.php @@ -0,0 +1,172 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/ImageTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/ImageTest.php new file mode 100644 index 0000000..9f68ba8 --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/ImageTest.php @@ -0,0 +1,75 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/InternetTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/InternetTest.php new file mode 100644 index 0000000..e715e82 --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/InternetTest.php @@ -0,0 +1,130 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/LocalizationTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/LocalizationTest.php new file mode 100644 index 0000000..347b135 --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/LocalizationTest.php @@ -0,0 +1,26 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/LoremTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/LoremTest.php new file mode 100644 index 0000000..62785d4 --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/LoremTest.php @@ -0,0 +1,108 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/MiscellaneousTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/MiscellaneousTest.php new file mode 100644 index 0000000..6a4c559 --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/MiscellaneousTest.php @@ -0,0 +1,54 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/PaymentTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/PaymentTest.php new file mode 100644 index 0000000..4e22e2c --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/PaymentTest.php @@ -0,0 +1,206 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/PersonTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/PersonTest.php new file mode 100644 index 0000000..a8d1c0f --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/PersonTest.php @@ -0,0 +1,86 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/PhoneNumberTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/PhoneNumberTest.php new file mode 100644 index 0000000..f73bda8 --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/PhoneNumberTest.php @@ -0,0 +1,35 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/ProviderOverrideTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/ProviderOverrideTest.php new file mode 100644 index 0000000..68f75ae --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/ProviderOverrideTest.php @@ -0,0 +1,189 @@ + + */ + +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/vendor/fzaninotto/faker/test/Faker/Provider/TextTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/TextTest.php new file mode 100644 index 0000000..3baf49f --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/TextTest.php @@ -0,0 +1,54 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/UserAgentTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/UserAgentTest.php new file mode 100644 index 0000000..b45b9f8 --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/UserAgentTest.php @@ -0,0 +1,38 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/UuidTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/UuidTest.php new file mode 100644 index 0000000..fceb8df --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/UuidTest.php @@ -0,0 +1,26 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/ar_JO/InternetTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/ar_JO/InternetTest.php new file mode 100644 index 0000000..d323f1e --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/ar_JO/InternetTest.php @@ -0,0 +1,32 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/ar_SA/InternetTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/ar_SA/InternetTest.php new file mode 100644 index 0000000..3765a10 --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/ar_SA/InternetTest.php @@ -0,0 +1,32 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/at_AT/PaymentTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/at_AT/PaymentTest.php new file mode 100644 index 0000000..afc8c27 --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/at_AT/PaymentTest.php @@ -0,0 +1,30 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/bg_BG/PaymentTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/bg_BG/PaymentTest.php new file mode 100644 index 0000000..31c6325 --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/bg_BG/PaymentTest.php @@ -0,0 +1,30 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/bn_BD/PersonTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/bn_BD/PersonTest.php new file mode 100644 index 0000000..606599f --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/bn_BD/PersonTest.php @@ -0,0 +1,29 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/cs_CZ/PersonTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/cs_CZ/PersonTest.php new file mode 100644 index 0000000..bd33c3d --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/cs_CZ/PersonTest.php @@ -0,0 +1,46 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/da_DK/InternetTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/da_DK/InternetTest.php new file mode 100644 index 0000000..ddbdd7a --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/da_DK/InternetTest.php @@ -0,0 +1,32 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/de_AT/InternetTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/de_AT/InternetTest.php new file mode 100644 index 0000000..91ce5ca --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/de_AT/InternetTest.php @@ -0,0 +1,32 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/de_AT/PhoneNumberTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/de_AT/PhoneNumberTest.php new file mode 100644 index 0000000..2d61ad5 --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/de_AT/PhoneNumberTest.php @@ -0,0 +1,28 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/de_CH/AddressTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/de_CH/AddressTest.php new file mode 100644 index 0000000..2f2de27 --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/de_CH/AddressTest.php @@ -0,0 +1,69 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/de_CH/InternetTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/de_CH/InternetTest.php new file mode 100644 index 0000000..907af21 --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/de_CH/InternetTest.php @@ -0,0 +1,35 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/de_CH/PhoneNumberTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/de_CH/PhoneNumberTest.php new file mode 100644 index 0000000..0c5f937 --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/de_CH/PhoneNumberTest.php @@ -0,0 +1,32 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/de_DE/InternetTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/de_DE/InternetTest.php new file mode 100644 index 0000000..8d39ff0 --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/de_DE/InternetTest.php @@ -0,0 +1,32 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/en_AU/AddressTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/en_AU/AddressTest.php new file mode 100644 index 0000000..ef8e9f2 --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/en_AU/AddressTest.php @@ -0,0 +1,48 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/en_CA/AddressTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/en_CA/AddressTest.php new file mode 100644 index 0000000..fb17c09 --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/en_CA/AddressTest.php @@ -0,0 +1,68 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/en_IN/AddressTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/en_IN/AddressTest.php new file mode 100644 index 0000000..a5e965b --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/en_IN/AddressTest.php @@ -0,0 +1,56 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/en_NZ/PhoneNumberTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/en_NZ/PhoneNumberTest.php new file mode 100644 index 0000000..f8a8f6c --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/en_NZ/PhoneNumberTest.php @@ -0,0 +1,35 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/en_PH/AddressTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/en_PH/AddressTest.php new file mode 100644 index 0000000..d3b4682 --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/en_PH/AddressTest.php @@ -0,0 +1,49 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/en_SG/AddressTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/en_SG/AddressTest.php new file mode 100644 index 0000000..a62e1c6 --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/en_SG/AddressTest.php @@ -0,0 +1,26 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/en_SG/PhoneNumberTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/en_SG/PhoneNumberTest.php new file mode 100644 index 0000000..60828b2 --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/en_SG/PhoneNumberTest.php @@ -0,0 +1,43 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/en_UG/AddressTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/en_UG/AddressTest.php new file mode 100644 index 0000000..484b125 --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/en_UG/AddressTest.php @@ -0,0 +1,52 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/en_US/PaymentTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/en_US/PaymentTest.php new file mode 100644 index 0000000..d17593f --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/en_US/PaymentTest.php @@ -0,0 +1,84 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/en_US/PhoneNumberTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/en_US/PhoneNumberTest.php new file mode 100644 index 0000000..ae2951a --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/en_US/PhoneNumberTest.php @@ -0,0 +1,84 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/en_ZA/CompanyTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/en_ZA/CompanyTest.php new file mode 100644 index 0000000..678a388 --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/en_ZA/CompanyTest.php @@ -0,0 +1,26 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/en_ZA/InternetTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/en_ZA/InternetTest.php new file mode 100644 index 0000000..7edd63f --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/en_ZA/InternetTest.php @@ -0,0 +1,32 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/en_ZA/PhoneNumberTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/en_ZA/PhoneNumberTest.php new file mode 100644 index 0000000..bfb516a --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/en_ZA/PhoneNumberTest.php @@ -0,0 +1,65 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/es_ES/PersonTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/es_ES/PersonTest.php new file mode 100644 index 0000000..55360ba --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/es_ES/PersonTest.php @@ -0,0 +1,38 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/fi_FI/InternetTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/fi_FI/InternetTest.php new file mode 100644 index 0000000..3f0e506 --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/fi_FI/InternetTest.php @@ -0,0 +1,32 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/fr_BE/PaymentTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/fr_BE/PaymentTest.php new file mode 100644 index 0000000..46c1cd7 --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/fr_BE/PaymentTest.php @@ -0,0 +1,29 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/fr_CH/AddressTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/fr_CH/AddressTest.php new file mode 100644 index 0000000..f589c1f --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/fr_CH/AddressTest.php @@ -0,0 +1,69 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/fr_CH/InternetTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/fr_CH/InternetTest.php new file mode 100644 index 0000000..2f20871 --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/fr_CH/InternetTest.php @@ -0,0 +1,35 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/fr_CH/PhoneNumberTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/fr_CH/PhoneNumberTest.php new file mode 100644 index 0000000..1f3fc20 --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/fr_CH/PhoneNumberTest.php @@ -0,0 +1,32 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/fr_FR/CompanyTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/fr_FR/CompanyTest.php new file mode 100644 index 0000000..5486cf9 --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/fr_FR/CompanyTest.php @@ -0,0 +1,74 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/id_ID/PersonTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/id_ID/PersonTest.php new file mode 100644 index 0000000..abd039f --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/id_ID/PersonTest.php @@ -0,0 +1,40 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/it_CH/AddressTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/it_CH/AddressTest.php new file mode 100644 index 0000000..7612253 --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/it_CH/AddressTest.php @@ -0,0 +1,69 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/it_CH/InternetTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/it_CH/InternetTest.php new file mode 100644 index 0000000..16616c7 --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/it_CH/InternetTest.php @@ -0,0 +1,35 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/it_CH/PhoneNumberTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/it_CH/PhoneNumberTest.php new file mode 100644 index 0000000..d3f17b8 --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/it_CH/PhoneNumberTest.php @@ -0,0 +1,32 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/it_IT/CompanyTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/it_IT/CompanyTest.php new file mode 100644 index 0000000..7bef3fa --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/it_IT/CompanyTest.php @@ -0,0 +1,23 @@ +addProvider(new Company($faker)); + $this->faker = $faker; + } + + public function testIfTaxIdCanReturnData() + { + $vatId = $this->faker->vatId(); + $this->assertRegExp('/^IT[0-9]{11}$/', $vatId); + } + +} diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/it_IT/PersonTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/it_IT/PersonTest.php new file mode 100644 index 0000000..5d0dc23 --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/it_IT/PersonTest.php @@ -0,0 +1,23 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/ja_JP/PersonTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/ja_JP/PersonTest.php new file mode 100644 index 0000000..97fc566 --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/ja_JP/PersonTest.php @@ -0,0 +1,36 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/mn_MN/PersonTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/mn_MN/PersonTest.php new file mode 100644 index 0000000..f3c9572 --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/mn_MN/PersonTest.php @@ -0,0 +1,27 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/nl_BE/PaymentTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/nl_BE/PaymentTest.php new file mode 100644 index 0000000..9216de7 --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/nl_BE/PaymentTest.php @@ -0,0 +1,29 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/nl_NL/CompanyTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/nl_NL/CompanyTest.php new file mode 100644 index 0000000..4775b14 --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/nl_NL/CompanyTest.php @@ -0,0 +1,34 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/pt_BR/CompanyTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/pt_BR/CompanyTest.php new file mode 100644 index 0000000..f59142b --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/pt_BR/CompanyTest.php @@ -0,0 +1,25 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/pt_BR/PersonTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/pt_BR/PersonTest.php new file mode 100644 index 0000000..767c188 --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/pt_BR/PersonTest.php @@ -0,0 +1,33 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/pt_PT/AddressTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/pt_PT/AddressTest.php new file mode 100644 index 0000000..d2adc15 --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/pt_PT/AddressTest.php @@ -0,0 +1,30 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/pt_PT/PersonTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/pt_PT/PersonTest.php new file mode 100644 index 0000000..9bfb7a2 --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/pt_PT/PersonTest.php @@ -0,0 +1,52 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/pt_PT/PhoneNumberTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/pt_PT/PhoneNumberTest.php new file mode 100644 index 0000000..04b2f63 --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/pt_PT/PhoneNumberTest.php @@ -0,0 +1,25 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/ro_RO/PersonTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/ro_RO/PersonTest.php new file mode 100644 index 0000000..5816b63 --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/ro_RO/PersonTest.php @@ -0,0 +1,95 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/ro_RO/PhoneNumberTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/ro_RO/PhoneNumberTest.php new file mode 100644 index 0000000..97314d5 --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/ro_RO/PhoneNumberTest.php @@ -0,0 +1,31 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/sv_SE/PersonTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/sv_SE/PersonTest.php new file mode 100644 index 0000000..623723a --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/sv_SE/PersonTest.php @@ -0,0 +1,60 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/uk_UA/AddressTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/uk_UA/AddressTest.php new file mode 100644 index 0000000..a3e38d7 --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/uk_UA/AddressTest.php @@ -0,0 +1,80 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/uk_UA/PhoneNumberTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/uk_UA/PhoneNumberTest.php new file mode 100644 index 0000000..13620c7 --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/uk_UA/PhoneNumberTest.php @@ -0,0 +1,35 @@ +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/vendor/fzaninotto/faker/test/Faker/Provider/zh_TW/TextTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/zh_TW/TextTest.php new file mode 100644 index 0000000..01d6b5b --- /dev/null +++ b/vendor/fzaninotto/faker/test/Faker/Provider/zh_TW/TextTest.php @@ -0,0 +1,77 @@ +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/vendor/fzaninotto/faker/test/documentor.php b/vendor/fzaninotto/faker/test/documentor.php new file mode 100644 index 0000000..1051ea2 --- /dev/null +++ b/vendor/fzaninotto/faker/test/documentor.php @@ -0,0 +1,16 @@ +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/vendor/hamcrest/hamcrest-php/.coveralls.yml b/vendor/hamcrest/hamcrest-php/.coveralls.yml new file mode 100644 index 0000000..f2f9ed5 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/.coveralls.yml @@ -0,0 +1 @@ +src_dir: hamcrest diff --git a/vendor/hamcrest/hamcrest-php/.gitignore b/vendor/hamcrest/hamcrest-php/.gitignore new file mode 100644 index 0000000..7579f74 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/.gitignore @@ -0,0 +1,2 @@ +vendor +composer.lock diff --git a/vendor/hamcrest/hamcrest-php/.gush.yml b/vendor/hamcrest/hamcrest-php/.gush.yml new file mode 100644 index 0000000..b7c226d --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/.gush.yml @@ -0,0 +1,7 @@ +adapter: github +issue_tracker: github +meta-header: "Copyright (c) 2009-2015 hamcrest.org" +table-pr: + fixed_tickets: ['Fixed Tickets', ''] + license: ['License', MIT] +base: master diff --git a/vendor/hamcrest/hamcrest-php/.travis.yml b/vendor/hamcrest/hamcrest-php/.travis.yml new file mode 100644 index 0000000..b360fd5 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/.travis.yml @@ -0,0 +1,18 @@ +language: php +php: + - 5.4 + - 5.3 + +install: + - composer install + +script: + - mkdir -p build/logs + - cd tests + - phpunit --coverage-clover=../build/logs/clover.xml . + - cd ../ + +after_script: + - php vendor/bin/coveralls -v + - wget https://scrutinizer-ci.com/ocular.phar + - php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml diff --git a/vendor/hamcrest/hamcrest-php/CHANGES.txt b/vendor/hamcrest/hamcrest-php/CHANGES.txt new file mode 100644 index 0000000..971060a --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/CHANGES.txt @@ -0,0 +1,163 @@ +== Version 1.1.0: Released Feb 2 2012 == + +Issues Fixed: 121, 138, 147 + +* Added non-empty matchers to complement the emptiness-matching forms. + + - nonEmptyString() + - nonEmptyArray() + - nonEmptyTraversable() + +* Added ability to pass variable arguments to several array-based matcher + factory methods so they work like allOf() et al. + + - anArray() + - arrayContainingInAnyOrder(), containsInAnyOrder() + - arrayContaining(), contains() + - stringContainsInOrder() + +* Matchers that accept an array of matchers now also accept variable arguments. + Any non-matcher arguments are wrapped by IsEqual. + +* Added noneOf() as a shortcut for not(anyOf()). + + +== Version 1.0.0: Released Jan 20 2012 == + +Issues Fixed: 119, 136, 139, 141, 148, 149, 172 + +* Moved hamcrest.php into Hamcrest folder and renamed to Hamcrest.php. + This is more in line with PEAR packaging standards. + +* Renamed callable() to callableValue() for compatibility with PHP 5.4. + +* Added Hamcrest_Text_StringContainsIgnoringCase to assert using stripos(). + + assertThat('fOObAr', containsStringIgnoringCase('oba')); + assertThat('fOObAr', containsString('oba')->ignoringCase()); + +* Fixed Hamcrest_Core_IsInstanceOf to return false for native types. + +* Moved string-based matchers to Hamcrest_Text package. + StringContains, StringEndsWith, StringStartsWith, and SubstringMatcher + +* Hamcrest.php and Hamcrest_Matchers.php are now built from @factory doctags. + Added @factory doctag to every static factory method. + +* Hamcrest_Matchers and Hamcrest.php now import each matcher as-needed + and Hamcrest.php calls the matchers directly instead of Hamcrest_Matchers. + + +== Version 0.3.0: Released Jul 26 2010 == + +* Added running count to Hamcrest_MatcherAssert with methods to get and reset it. + This can be used by unit testing frameworks for reporting. + +* Added Hamcrest_Core_HasToString to assert return value of toString() or __toString(). + + assertThat($anObject, hasToString('foo')); + +* Added Hamcrest_Type_IsScalar to assert is_scalar(). + Matches values of type bool, int, float, double, and string. + + assertThat($count, scalarValue()); + assertThat('foo', scalarValue()); + +* Added Hamcrest_Collection package. + + - IsEmptyTraversable + - IsTraversableWithSize + + assertThat($iterator, emptyTraversable()); + assertThat($iterator, traversableWithSize(5)); + +* Added Hamcrest_Xml_HasXPath to assert XPath expressions or the content of nodes in an XML/HTML DOM. + + assertThat($dom, hasXPath('books/book/title')); + assertThat($dom, hasXPath('books/book[contains(title, "Alice")]', 3)); + assertThat($dom, hasXPath('books/book/title', 'Alice in Wonderland')); + assertThat($dom, hasXPath('count(books/book)', greaterThan(10))); + +* Added aliases to match the Java API. + + hasEntry() -> hasKeyValuePair() + hasValue() -> hasItemInArray() + contains() -> arrayContaining() + containsInAnyOrder() -> arrayContainingInAnyOrder() + +* Added optional subtype to Hamcrest_TypeSafeMatcher to enforce object class or resource type. + +* Hamcrest_TypeSafeDiagnosingMatcher now extends Hamcrest_TypeSafeMatcher. + + +== Version 0.2.0: Released Jul 14 2010 == + +Issues Fixed: 109, 111, 114, 115 + +* Description::appendValues() and appendValueList() accept Iterator and IteratorAggregate. [111] + BaseDescription::appendValue() handles IteratorAggregate. + +* assertThat() accepts a single boolean parameter and + wraps any non-Matcher third parameter with equalTo(). + +* Removed null return value from assertThat(). [114] + +* Fixed wrong variable name in contains(). [109] + +* Added Hamcrest_Core_IsSet to assert isset(). + + assertThat(array('foo' => 'bar'), set('foo')); + assertThat(array('foo' => 'bar'), notSet('bar')); + +* Added Hamcrest_Core_IsTypeOf to assert built-in types with gettype(). [115] + Types: array, boolean, double, integer, null, object, resource, and string. + Note that gettype() returns "double" for float values. + + assertThat($count, typeOf('integer')); + assertThat(3.14159, typeOf('double')); + assertThat(array('foo', 'bar'), typeOf('array')); + assertThat(new stdClass(), typeOf('object')); + +* Added type-specific matchers in new Hamcrest_Type package. + + - IsArray + - IsBoolean + - IsDouble (includes float values) + - IsInteger + - IsObject + - IsResource + - IsString + + assertThat($count, integerValue()); + assertThat(3.14159, floatValue()); + assertThat('foo', stringValue()); + +* Added Hamcrest_Type_IsNumeric to assert is_numeric(). + Matches values of type int and float/double or strings that are formatted as numbers. + + assertThat(5, numericValue()); + assertThat('-5e+3', numericValue()); + +* Added Hamcrest_Type_IsCallable to assert is_callable(). + + assertThat('preg_match', callable()); + assertThat(array('SomeClass', 'SomeMethod'), callable()); + assertThat(array($object, 'SomeMethod'), callable()); + assertThat($object, callable()); + assertThat(function ($x, $y) { return $x + $y; }, callable()); + +* Added Hamcrest_Text_MatchesPattern for regex matching with preg_match(). + + assertThat('foobar', matchesPattern('/o+b/')); + +* Added aliases: + - atLeast() for greaterThanOrEqualTo() + - atMost() for lessThanOrEqualTo() + + +== Version 0.1.0: Released Jul 7 2010 == + +* Created PEAR package + +* Core matchers + diff --git a/vendor/hamcrest/hamcrest-php/LICENSE.txt b/vendor/hamcrest/hamcrest-php/LICENSE.txt new file mode 100644 index 0000000..91cd329 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/LICENSE.txt @@ -0,0 +1,27 @@ +BSD License + +Copyright (c) 2000-2014, www.hamcrest.org +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +Redistributions of source code must retain the above copyright notice, this list of +conditions and the following disclaimer. Redistributions in binary form must reproduce +the above copyright notice, this list of conditions and the following disclaimer in +the documentation and/or other materials provided with the distribution. + +Neither the name of Hamcrest nor the names of its contributors may be used to endorse +or promote products derived from this software without specific prior written +permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT +SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY +WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +DAMAGE. diff --git a/vendor/hamcrest/hamcrest-php/README.md b/vendor/hamcrest/hamcrest-php/README.md new file mode 100644 index 0000000..47c24f1 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/README.md @@ -0,0 +1,51 @@ +This is the PHP port of Hamcrest Matchers +========================================= + +[![Scrutinizer Quality Score](https://scrutinizer-ci.com/g/hamcrest/hamcrest-php/badges/quality-score.png?s=754f5c0556419fc6204917ca9a9dcf2fa2b45ed0)](https://scrutinizer-ci.com/g/hamcrest/hamcrest-php/) +[![Build Status](https://travis-ci.org/hamcrest/hamcrest-php.png?branch=master)](https://travis-ci.org/hamcrest/hamcrest-php) +[![Coverage Status](https://coveralls.io/repos/hamcrest/hamcrest-php/badge.png)](https://coveralls.io/r/hamcrest/hamcrest-php) + +Hamcrest is a matching library originally written for Java, but +subsequently ported to many other languages. hamcrest-php is the +official PHP port of Hamcrest and essentially follows a literal +translation of the original Java API for Hamcrest, with a few +Exceptions, mostly down to PHP language barriers: + + 1. `instanceOf($theClass)` is actually `anInstanceOf($theClass)` + + 2. `both(containsString('a'))->and(containsString('b'))` + is actually `both(containsString('a'))->andAlso(containsString('b'))` + + 3. `either(containsString('a'))->or(containsString('b'))` + is actually `either(containsString('a'))->orElse(containsString('b'))` + + 4. Unless it would be non-semantic for a matcher to do so, hamcrest-php + allows dynamic typing for it's input, in "the PHP way". Exception are + where semantics surrounding the type itself would suggest otherwise, + such as stringContains() and greaterThan(). + + 5. Several official matchers have not been ported because they don't + make sense or don't apply in PHP: + + - `typeCompatibleWith($theClass)` + - `eventFrom($source)` + - `hasProperty($name)` ** + - `samePropertyValuesAs($obj)` ** + + 6. When most of the collections matchers are finally ported, PHP-specific + aliases will probably be created due to a difference in naming + conventions between Java's Arrays, Collections, Sets and Maps compared + with PHP's Arrays. + +Usage +----- + +Hamcrest matchers are easy to use as: + +```php +Hamcrest_MatcherAssert::assertThat('a', Hamcrest_Matchers::equalToIgnoringCase('A')); +``` + + ** [Unless we consider POPO's (Plain Old PHP Objects) akin to JavaBeans] + - The POPO thing is a joke. Java devs coin the term POJO's (Plain Old + Java Objects). diff --git a/vendor/hamcrest/hamcrest-php/TODO.txt b/vendor/hamcrest/hamcrest-php/TODO.txt new file mode 100644 index 0000000..92e1190 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/TODO.txt @@ -0,0 +1,22 @@ +Still TODO Before Complete for PHP +---------------------------------- + +Port: + + - Hamcrest_Collection_* + - IsCollectionWithSize + - IsEmptyCollection + - IsIn + - IsTraversableContainingInAnyOrder + - IsTraversableContainingInOrder + - IsMapContaining (aliases) + +Aliasing/Deprecation (questionable): + + - Find and fix any factory methods that start with "is". + +Namespaces: + + - Investigate adding PHP 5.3+ namespace support in a way that still permits + use in PHP 5.2. + - Other than a parallel codebase, I don't see how this could be possible. diff --git a/vendor/hamcrest/hamcrest-php/composer.json b/vendor/hamcrest/hamcrest-php/composer.json new file mode 100644 index 0000000..a1b48c1 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/composer.json @@ -0,0 +1,32 @@ +{ + "name": "hamcrest/hamcrest-php", + "type": "library", + "description": "This is the PHP port of Hamcrest Matchers", + "keywords": ["test"], + "license": "BSD", + "authors": [ + ], + + "autoload": { + "classmap": ["hamcrest"], + "files": ["hamcrest/Hamcrest.php"] + }, + "autoload-dev": { + "classmap": ["tests", "generator"] + }, + + "require": { + "php": ">=5.3.2" + }, + + "require-dev": { + "satooshi/php-coveralls": "dev-master", + "phpunit/php-file-iterator": "1.3.3" + }, + + "replace": { + "kodova/hamcrest-php": "*", + "davedevelopment/hamcrest-php": "*", + "cordoval/hamcrest-php": "*" + } +} diff --git a/vendor/hamcrest/hamcrest-php/generator/FactoryCall.php b/vendor/hamcrest/hamcrest-php/generator/FactoryCall.php new file mode 100644 index 0000000..83965b2 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/generator/FactoryCall.php @@ -0,0 +1,41 @@ +method = $method; + $this->name = $name; + } + + public function getMethod() + { + return $this->method; + } + + public function getName() + { + return $this->name; + } +} diff --git a/vendor/hamcrest/hamcrest-php/generator/FactoryClass.php b/vendor/hamcrest/hamcrest-php/generator/FactoryClass.php new file mode 100644 index 0000000..0c6bf78 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/generator/FactoryClass.php @@ -0,0 +1,72 @@ +file = $file; + $this->reflector = $class; + $this->extractFactoryMethods(); + } + + public function extractFactoryMethods() + { + $this->methods = array(); + foreach ($this->getPublicStaticMethods() as $method) { + if ($method->isFactory()) { +// echo $this->getName() . '::' . $method->getName() . ' : ' . count($method->getCalls()) . PHP_EOL; + $this->methods[] = $method; + } + } + } + + public function getPublicStaticMethods() + { + $methods = array(); + foreach ($this->reflector->getMethods(ReflectionMethod::IS_STATIC) as $method) { + if ($method->isPublic() && $method->getDeclaringClass() == $this->reflector) { + $methods[] = new FactoryMethod($this, $method); + } + } + return $methods; + } + + public function getFile() + { + return $this->file; + } + + public function getName() + { + return $this->reflector->name; + } + + public function isFactory() + { + return !empty($this->methods); + } + + public function getMethods() + { + return $this->methods; + } +} diff --git a/vendor/hamcrest/hamcrest-php/generator/FactoryFile.php b/vendor/hamcrest/hamcrest-php/generator/FactoryFile.php new file mode 100644 index 0000000..ac3d6c7 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/generator/FactoryFile.php @@ -0,0 +1,122 @@ +file = $file; + $this->indent = $indent; + } + + abstract public function addCall(FactoryCall $call); + + abstract public function build(); + + public function addFileHeader() + { + $this->code = ''; + $this->addPart('file_header'); + } + + public function addPart($name) + { + $this->addCode($this->readPart($name)); + } + + public function addCode($code) + { + $this->code .= $code; + } + + public function readPart($name) + { + return file_get_contents(__DIR__ . "/parts/$name.txt"); + } + + public function generateFactoryCall(FactoryCall $call) + { + $method = $call->getMethod(); + $code = $method->getComment($this->indent) . PHP_EOL; + $code .= $this->generateDeclaration($call->getName(), $method); + // $code .= $this->generateImport($method); + $code .= $this->generateCall($method); + $code .= $this->generateClosing(); + return $code; + } + + public function generateDeclaration($name, FactoryMethod $method) + { + $code = $this->indent . $this->getDeclarationModifiers() + . 'function ' . $name . '(' + . $this->generateDeclarationArguments($method) + . ')' . PHP_EOL . $this->indent . '{' . PHP_EOL; + return $code; + } + + public function getDeclarationModifiers() + { + return ''; + } + + public function generateDeclarationArguments(FactoryMethod $method) + { + if ($method->acceptsVariableArguments()) { + return '/* args... */'; + } else { + return $method->getParameterDeclarations(); + } + } + + public function generateImport(FactoryMethod $method) + { + return $this->indent . self::INDENT . "require_once '" . $method->getClass()->getFile() . "';" . PHP_EOL; + } + + public function generateCall(FactoryMethod $method) + { + $code = ''; + if ($method->acceptsVariableArguments()) { + $code .= $this->indent . self::INDENT . '$args = func_get_args();' . PHP_EOL; + } + + $code .= $this->indent . self::INDENT . 'return '; + if ($method->acceptsVariableArguments()) { + $code .= 'call_user_func_array(array(\'' + . '\\' . $method->getClassName() . '\', \'' + . $method->getName() . '\'), $args);' . PHP_EOL; + } else { + $code .= '\\' . $method->getClassName() . '::' + . $method->getName() . '(' + . $method->getParameterInvocations() . ');' . PHP_EOL; + } + + return $code; + } + + public function generateClosing() + { + return $this->indent . '}' . PHP_EOL; + } + + public function write() + { + file_put_contents($this->file, $this->code); + } +} diff --git a/vendor/hamcrest/hamcrest-php/generator/FactoryGenerator.php b/vendor/hamcrest/hamcrest-php/generator/FactoryGenerator.php new file mode 100644 index 0000000..37f80b6 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/generator/FactoryGenerator.php @@ -0,0 +1,115 @@ +path = $path; + $this->factoryFiles = array(); + } + + public function addFactoryFile(FactoryFile $factoryFile) + { + $this->factoryFiles[] = $factoryFile; + } + + public function generate() + { + $classes = $this->getClassesWithFactoryMethods(); + foreach ($classes as $class) { + foreach ($class->getMethods() as $method) { + foreach ($method->getCalls() as $call) { + foreach ($this->factoryFiles as $file) { + $file->addCall($call); + } + } + } + } + } + + public function write() + { + foreach ($this->factoryFiles as $file) { + $file->build(); + $file->write(); + } + } + + public function getClassesWithFactoryMethods() + { + $classes = array(); + $files = $this->getSortedFiles(); + foreach ($files as $file) { + $class = $this->getFactoryClass($file); + if ($class !== null) { + $classes[] = $class; + } + } + + return $classes; + } + + public function getSortedFiles() + { + $iter = \File_Iterator_Factory::getFileIterator($this->path, '.php'); + $files = array(); + foreach ($iter as $file) { + $files[] = $file; + } + sort($files, SORT_STRING); + + return $files; + } + + public function getFactoryClass($file) + { + $name = $this->getFactoryClassName($file); + if ($name !== null) { + require_once $file; + + if (class_exists($name)) { + $class = new FactoryClass(substr($file, strpos($file, 'Hamcrest/')), new ReflectionClass($name)); + if ($class->isFactory()) { + return $class; + } + } + } + + return null; + } + + public function getFactoryClassName($file) + { + $content = file_get_contents($file); + if (preg_match('/namespace\s+(.+);/', $content, $namespace) + && preg_match('/\n\s*class\s+(\w+)\s+extends\b/', $content, $className) + && preg_match('/@factory\b/', $content) + ) { + return $namespace[1] . '\\' . $className[1]; + } + + return null; + } +} diff --git a/vendor/hamcrest/hamcrest-php/generator/FactoryMethod.php b/vendor/hamcrest/hamcrest-php/generator/FactoryMethod.php new file mode 100644 index 0000000..44f8dc5 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/generator/FactoryMethod.php @@ -0,0 +1,231 @@ +class = $class; + $this->reflector = $reflector; + $this->extractCommentWithoutLeadingShashesAndStars(); + $this->extractFactoryNamesFromComment(); + $this->extractParameters(); + } + + public function extractCommentWithoutLeadingShashesAndStars() + { + $this->comment = explode("\n", $this->reflector->getDocComment()); + foreach ($this->comment as &$line) { + $line = preg_replace('#^\s*(/\\*+|\\*+/|\\*)\s?#', '', $line); + } + $this->trimLeadingBlankLinesFromComment(); + $this->trimTrailingBlankLinesFromComment(); + } + + public function trimLeadingBlankLinesFromComment() + { + while (count($this->comment) > 0) { + $line = array_shift($this->comment); + if (trim($line) != '') { + array_unshift($this->comment, $line); + break; + } + } + } + + public function trimTrailingBlankLinesFromComment() + { + while (count($this->comment) > 0) { + $line = array_pop($this->comment); + if (trim($line) != '') { + array_push($this->comment, $line); + break; + } + } + } + + public function extractFactoryNamesFromComment() + { + $this->calls = array(); + for ($i = 0; $i < count($this->comment); $i++) { + if ($this->extractFactoryNamesFromLine($this->comment[$i])) { + unset($this->comment[$i]); + } + } + $this->trimTrailingBlankLinesFromComment(); + } + + public function extractFactoryNamesFromLine($line) + { + if (preg_match('/^\s*@factory(\s+(.+))?$/', $line, $match)) { + $this->createCalls( + $this->extractFactoryNamesFromAnnotation( + isset($match[2]) ? trim($match[2]) : null + ) + ); + return true; + } + return false; + } + + public function extractFactoryNamesFromAnnotation($value) + { + $primaryName = $this->reflector->getName(); + if (empty($value)) { + return array($primaryName); + } + preg_match_all('/(\.{3}|-|[a-zA-Z_][a-zA-Z_0-9]*)/', $value, $match); + $names = $match[0]; + if (in_array('...', $names)) { + $this->isVarArgs = true; + } + if (!in_array('-', $names) && !in_array($primaryName, $names)) { + array_unshift($names, $primaryName); + } + return $names; + } + + public function createCalls(array $names) + { + $names = array_unique($names); + foreach ($names as $name) { + if ($name != '-' && $name != '...') { + $this->calls[] = new FactoryCall($this, $name); + } + } + } + + public function extractParameters() + { + $this->parameters = array(); + if (!$this->isVarArgs) { + foreach ($this->reflector->getParameters() as $parameter) { + $this->parameters[] = new FactoryParameter($this, $parameter); + } + } + } + + public function getParameterDeclarations() + { + if ($this->isVarArgs || !$this->hasParameters()) { + return ''; + } + $params = array(); + foreach ($this->parameters as /** @var $parameter FactoryParameter */ + $parameter) { + $params[] = $parameter->getDeclaration(); + } + return implode(', ', $params); + } + + public function getParameterInvocations() + { + if ($this->isVarArgs) { + return ''; + } + $params = array(); + foreach ($this->parameters as $parameter) { + $params[] = $parameter->getInvocation(); + } + return implode(', ', $params); + } + + + public function getClass() + { + return $this->class; + } + + public function getClassName() + { + return $this->class->getName(); + } + + public function getName() + { + return $this->reflector->name; + } + + public function isFactory() + { + return count($this->calls) > 0; + } + + public function getCalls() + { + return $this->calls; + } + + public function acceptsVariableArguments() + { + return $this->isVarArgs; + } + + public function hasParameters() + { + return !empty($this->parameters); + } + + public function getParameters() + { + return $this->parameters; + } + + public function getFullName() + { + return $this->getClassName() . '::' . $this->getName(); + } + + public function getCommentText() + { + return implode(PHP_EOL, $this->comment); + } + + public function getComment($indent = '') + { + $comment = $indent . '/**'; + foreach ($this->comment as $line) { + $comment .= PHP_EOL . rtrim($indent . ' * ' . $line); + } + $comment .= PHP_EOL . $indent . ' */'; + return $comment; + } +} diff --git a/vendor/hamcrest/hamcrest-php/generator/FactoryParameter.php b/vendor/hamcrest/hamcrest-php/generator/FactoryParameter.php new file mode 100644 index 0000000..93a76b3 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/generator/FactoryParameter.php @@ -0,0 +1,69 @@ +method = $method; + $this->reflector = $reflector; + } + + public function getDeclaration() + { + if ($this->reflector->isArray()) { + $code = 'array '; + } else { + $class = $this->reflector->getClass(); + if ($class !== null) { + $code = '\\' . $class->name . ' '; + } else { + $code = ''; + } + } + $code .= '$' . $this->reflector->name; + if ($this->reflector->isOptional()) { + $default = $this->reflector->getDefaultValue(); + if (is_null($default)) { + $default = 'null'; + } elseif (is_bool($default)) { + $default = $default ? 'true' : 'false'; + } elseif (is_string($default)) { + $default = "'" . $default . "'"; + } elseif (is_numeric($default)) { + $default = strval($default); + } elseif (is_array($default)) { + $default = 'array()'; + } else { + echo 'Warning: unknown default type for ' . $this->getMethod()->getFullName() . PHP_EOL; + var_dump($default); + $default = 'null'; + } + $code .= ' = ' . $default; + } + return $code; + } + + public function getInvocation() + { + return '$' . $this->reflector->name; + } + + public function getMethod() + { + return $this->method; + } +} diff --git a/vendor/hamcrest/hamcrest-php/generator/GlobalFunctionFile.php b/vendor/hamcrest/hamcrest-php/generator/GlobalFunctionFile.php new file mode 100644 index 0000000..5ee1b69 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/generator/GlobalFunctionFile.php @@ -0,0 +1,42 @@ +functions = ''; + } + + public function addCall(FactoryCall $call) + { + $this->functions .= PHP_EOL . $this->generateFactoryCall($call); + } + + public function build() + { + $this->addFileHeader(); + $this->addPart('functions_imports'); + $this->addPart('functions_header'); + $this->addCode($this->functions); + $this->addPart('functions_footer'); + } + + public function generateFactoryCall(FactoryCall $call) + { + $code = "if (!function_exists('{$call->getName()}')) {"; + $code.= parent::generateFactoryCall($call); + $code.= "}\n"; + + return $code; + } +} diff --git a/vendor/hamcrest/hamcrest-php/generator/StaticMethodFile.php b/vendor/hamcrest/hamcrest-php/generator/StaticMethodFile.php new file mode 100644 index 0000000..44cec02 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/generator/StaticMethodFile.php @@ -0,0 +1,38 @@ +methods = ''; + } + + public function addCall(FactoryCall $call) + { + $this->methods .= PHP_EOL . $this->generateFactoryCall($call); + } + + public function getDeclarationModifiers() + { + return 'public static '; + } + + public function build() + { + $this->addFileHeader(); + $this->addPart('matchers_imports'); + $this->addPart('matchers_header'); + $this->addCode($this->methods); + $this->addPart('matchers_footer'); + } +} diff --git a/vendor/hamcrest/hamcrest-php/generator/parts/file_header.txt b/vendor/hamcrest/hamcrest-php/generator/parts/file_header.txt new file mode 100644 index 0000000..7b352e4 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/generator/parts/file_header.txt @@ -0,0 +1,7 @@ + + * //With an identifier + * assertThat("assertion identifier", $apple->flavour(), equalTo("tasty")); + * //Without an identifier + * assertThat($apple->flavour(), equalTo("tasty")); + * //Evaluating a boolean expression + * assertThat("some error", $a > $b); + * + */ + function assertThat() + { + $args = func_get_args(); + call_user_func_array( + array('Hamcrest\MatcherAssert', 'assertThat'), + $args + ); + } +} diff --git a/vendor/hamcrest/hamcrest-php/generator/parts/functions_imports.txt b/vendor/hamcrest/hamcrest-php/generator/parts/functions_imports.txt new file mode 100644 index 0000000..e69de29 diff --git a/vendor/hamcrest/hamcrest-php/generator/parts/matchers_footer.txt b/vendor/hamcrest/hamcrest-php/generator/parts/matchers_footer.txt new file mode 100644 index 0000000..5c34318 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/generator/parts/matchers_footer.txt @@ -0,0 +1 @@ +} diff --git a/vendor/hamcrest/hamcrest-php/generator/parts/matchers_header.txt b/vendor/hamcrest/hamcrest-php/generator/parts/matchers_header.txt new file mode 100644 index 0000000..4f8bb2b --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/generator/parts/matchers_header.txt @@ -0,0 +1,7 @@ + + +/** + * A series of static factories for all hamcrest matchers. + */ +class Matchers +{ diff --git a/vendor/hamcrest/hamcrest-php/generator/parts/matchers_imports.txt b/vendor/hamcrest/hamcrest-php/generator/parts/matchers_imports.txt new file mode 100644 index 0000000..7dd6849 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/generator/parts/matchers_imports.txt @@ -0,0 +1,2 @@ + +namespace Hamcrest; \ No newline at end of file diff --git a/vendor/hamcrest/hamcrest-php/generator/run.php b/vendor/hamcrest/hamcrest-php/generator/run.php new file mode 100644 index 0000000..924d752 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/generator/run.php @@ -0,0 +1,37 @@ +addFactoryFile(new StaticMethodFile(STATIC_MATCHERS_FILE)); +$generator->addFactoryFile(new GlobalFunctionFile(GLOBAL_FUNCTIONS_FILE)); +$generator->generate(); +$generator->write(); diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest.php new file mode 100644 index 0000000..8a719eb --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest.php @@ -0,0 +1,805 @@ + + * //With an identifier + * assertThat("assertion identifier", $apple->flavour(), equalTo("tasty")); + * //Without an identifier + * assertThat($apple->flavour(), equalTo("tasty")); + * //Evaluating a boolean expression + * assertThat("some error", $a > $b); + * + */ + function assertThat() + { + $args = func_get_args(); + call_user_func_array( + array('Hamcrest\MatcherAssert', 'assertThat'), + $args + ); + } +} + +if (!function_exists('anArray')) { /** + * Evaluates to true only if each $matcher[$i] is satisfied by $array[$i]. + */ + function anArray(/* args... */) + { + $args = func_get_args(); + return call_user_func_array(array('\Hamcrest\Arrays\IsArray', 'anArray'), $args); + } +} + +if (!function_exists('hasItemInArray')) { /** + * Evaluates to true if any item in an array satisfies the given matcher. + * + * @param mixed $item as a {@link Hamcrest\Matcher} or a value. + * + * @return \Hamcrest\Arrays\IsArrayContaining + */ + function hasItemInArray($item) + { + return \Hamcrest\Arrays\IsArrayContaining::hasItemInArray($item); + } +} + +if (!function_exists('hasValue')) { /** + * Evaluates to true if any item in an array satisfies the given matcher. + * + * @param mixed $item as a {@link Hamcrest\Matcher} or a value. + * + * @return \Hamcrest\Arrays\IsArrayContaining + */ + function hasValue($item) + { + return \Hamcrest\Arrays\IsArrayContaining::hasItemInArray($item); + } +} + +if (!function_exists('arrayContainingInAnyOrder')) { /** + * An array with elements that match the given matchers. + */ + function arrayContainingInAnyOrder(/* args... */) + { + $args = func_get_args(); + return call_user_func_array(array('\Hamcrest\Arrays\IsArrayContainingInAnyOrder', 'arrayContainingInAnyOrder'), $args); + } +} + +if (!function_exists('containsInAnyOrder')) { /** + * An array with elements that match the given matchers. + */ + function containsInAnyOrder(/* args... */) + { + $args = func_get_args(); + return call_user_func_array(array('\Hamcrest\Arrays\IsArrayContainingInAnyOrder', 'arrayContainingInAnyOrder'), $args); + } +} + +if (!function_exists('arrayContaining')) { /** + * An array with elements that match the given matchers in the same order. + */ + function arrayContaining(/* args... */) + { + $args = func_get_args(); + return call_user_func_array(array('\Hamcrest\Arrays\IsArrayContainingInOrder', 'arrayContaining'), $args); + } +} + +if (!function_exists('contains')) { /** + * An array with elements that match the given matchers in the same order. + */ + function contains(/* args... */) + { + $args = func_get_args(); + return call_user_func_array(array('\Hamcrest\Arrays\IsArrayContainingInOrder', 'arrayContaining'), $args); + } +} + +if (!function_exists('hasKeyInArray')) { /** + * Evaluates to true if any key in an array matches the given matcher. + * + * @param mixed $key as a {@link Hamcrest\Matcher} or a value. + * + * @return \Hamcrest\Arrays\IsArrayContainingKey + */ + function hasKeyInArray($key) + { + return \Hamcrest\Arrays\IsArrayContainingKey::hasKeyInArray($key); + } +} + +if (!function_exists('hasKey')) { /** + * Evaluates to true if any key in an array matches the given matcher. + * + * @param mixed $key as a {@link Hamcrest\Matcher} or a value. + * + * @return \Hamcrest\Arrays\IsArrayContainingKey + */ + function hasKey($key) + { + return \Hamcrest\Arrays\IsArrayContainingKey::hasKeyInArray($key); + } +} + +if (!function_exists('hasKeyValuePair')) { /** + * Test if an array has both an key and value in parity with each other. + */ + function hasKeyValuePair($key, $value) + { + return \Hamcrest\Arrays\IsArrayContainingKeyValuePair::hasKeyValuePair($key, $value); + } +} + +if (!function_exists('hasEntry')) { /** + * Test if an array has both an key and value in parity with each other. + */ + function hasEntry($key, $value) + { + return \Hamcrest\Arrays\IsArrayContainingKeyValuePair::hasKeyValuePair($key, $value); + } +} + +if (!function_exists('arrayWithSize')) { /** + * Does array size satisfy a given matcher? + * + * @param \Hamcrest\Matcher|int $size as a {@link Hamcrest\Matcher} or a value. + * + * @return \Hamcrest\Arrays\IsArrayWithSize + */ + function arrayWithSize($size) + { + return \Hamcrest\Arrays\IsArrayWithSize::arrayWithSize($size); + } +} + +if (!function_exists('emptyArray')) { /** + * Matches an empty array. + */ + function emptyArray() + { + return \Hamcrest\Arrays\IsArrayWithSize::emptyArray(); + } +} + +if (!function_exists('nonEmptyArray')) { /** + * Matches an empty array. + */ + function nonEmptyArray() + { + return \Hamcrest\Arrays\IsArrayWithSize::nonEmptyArray(); + } +} + +if (!function_exists('emptyTraversable')) { /** + * Returns true if traversable is empty. + */ + function emptyTraversable() + { + return \Hamcrest\Collection\IsEmptyTraversable::emptyTraversable(); + } +} + +if (!function_exists('nonEmptyTraversable')) { /** + * Returns true if traversable is not empty. + */ + function nonEmptyTraversable() + { + return \Hamcrest\Collection\IsEmptyTraversable::nonEmptyTraversable(); + } +} + +if (!function_exists('traversableWithSize')) { /** + * Does traversable size satisfy a given matcher? + */ + function traversableWithSize($size) + { + return \Hamcrest\Collection\IsTraversableWithSize::traversableWithSize($size); + } +} + +if (!function_exists('allOf')) { /** + * Evaluates to true only if ALL of the passed in matchers evaluate to true. + */ + function allOf(/* args... */) + { + $args = func_get_args(); + return call_user_func_array(array('\Hamcrest\Core\AllOf', 'allOf'), $args); + } +} + +if (!function_exists('anyOf')) { /** + * Evaluates to true if ANY of the passed in matchers evaluate to true. + */ + function anyOf(/* args... */) + { + $args = func_get_args(); + return call_user_func_array(array('\Hamcrest\Core\AnyOf', 'anyOf'), $args); + } +} + +if (!function_exists('noneOf')) { /** + * Evaluates to false if ANY of the passed in matchers evaluate to true. + */ + function noneOf(/* args... */) + { + $args = func_get_args(); + return call_user_func_array(array('\Hamcrest\Core\AnyOf', 'noneOf'), $args); + } +} + +if (!function_exists('both')) { /** + * This is useful for fluently combining matchers that must both pass. + * For example: + *
+     *   assertThat($string, both(containsString("a"))->andAlso(containsString("b")));
+     * 
+ */ + function both(\Hamcrest\Matcher $matcher) + { + return \Hamcrest\Core\CombinableMatcher::both($matcher); + } +} + +if (!function_exists('either')) { /** + * This is useful for fluently combining matchers where either may pass, + * for example: + *
+     *   assertThat($string, either(containsString("a"))->orElse(containsString("b")));
+     * 
+ */ + function either(\Hamcrest\Matcher $matcher) + { + return \Hamcrest\Core\CombinableMatcher::either($matcher); + } +} + +if (!function_exists('describedAs')) { /** + * Wraps an existing matcher and overrides the description when it fails. + */ + function describedAs(/* args... */) + { + $args = func_get_args(); + return call_user_func_array(array('\Hamcrest\Core\DescribedAs', 'describedAs'), $args); + } +} + +if (!function_exists('everyItem')) { /** + * @param Matcher $itemMatcher + * A matcher to apply to every element in an array. + * + * @return \Hamcrest\Core\Every + * Evaluates to TRUE for a collection in which every item matches $itemMatcher + */ + function everyItem(\Hamcrest\Matcher $itemMatcher) + { + return \Hamcrest\Core\Every::everyItem($itemMatcher); + } +} + +if (!function_exists('hasToString')) { /** + * Does array size satisfy a given matcher? + */ + function hasToString($matcher) + { + return \Hamcrest\Core\HasToString::hasToString($matcher); + } +} + +if (!function_exists('is')) { /** + * Decorates another Matcher, retaining the behavior but allowing tests + * to be slightly more expressive. + * + * For example: assertThat($cheese, equalTo($smelly)) + * vs. assertThat($cheese, is(equalTo($smelly))) + */ + function is($value) + { + return \Hamcrest\Core\Is::is($value); + } +} + +if (!function_exists('anything')) { /** + * This matcher always evaluates to true. + * + * @param string $description A meaningful string used when describing itself. + * + * @return \Hamcrest\Core\IsAnything + */ + function anything($description = 'ANYTHING') + { + return \Hamcrest\Core\IsAnything::anything($description); + } +} + +if (!function_exists('hasItem')) { /** + * Test if the value is an array containing this matcher. + * + * Example: + *
+     * assertThat(array('a', 'b'), hasItem(equalTo('b')));
+     * //Convenience defaults to equalTo()
+     * assertThat(array('a', 'b'), hasItem('b'));
+     * 
+ */ + function hasItem(/* args... */) + { + $args = func_get_args(); + return call_user_func_array(array('\Hamcrest\Core\IsCollectionContaining', 'hasItem'), $args); + } +} + +if (!function_exists('hasItems')) { /** + * Test if the value is an array containing elements that match all of these + * matchers. + * + * Example: + *
+     * assertThat(array('a', 'b', 'c'), hasItems(equalTo('a'), equalTo('b')));
+     * 
+ */ + function hasItems(/* args... */) + { + $args = func_get_args(); + return call_user_func_array(array('\Hamcrest\Core\IsCollectionContaining', 'hasItems'), $args); + } +} + +if (!function_exists('equalTo')) { /** + * Is the value equal to another value, as tested by the use of the "==" + * comparison operator? + */ + function equalTo($item) + { + return \Hamcrest\Core\IsEqual::equalTo($item); + } +} + +if (!function_exists('identicalTo')) { /** + * Tests of the value is identical to $value as tested by the "===" operator. + */ + function identicalTo($value) + { + return \Hamcrest\Core\IsIdentical::identicalTo($value); + } +} + +if (!function_exists('anInstanceOf')) { /** + * Is the value an instance of a particular type? + * This version assumes no relationship between the required type and + * the signature of the method that sets it up, for example in + * assertThat($anObject, anInstanceOf('Thing')); + */ + function anInstanceOf($theClass) + { + return \Hamcrest\Core\IsInstanceOf::anInstanceOf($theClass); + } +} + +if (!function_exists('any')) { /** + * Is the value an instance of a particular type? + * This version assumes no relationship between the required type and + * the signature of the method that sets it up, for example in + * assertThat($anObject, anInstanceOf('Thing')); + */ + function any($theClass) + { + return \Hamcrest\Core\IsInstanceOf::anInstanceOf($theClass); + } +} + +if (!function_exists('not')) { /** + * Matches if value does not match $value. + */ + function not($value) + { + return \Hamcrest\Core\IsNot::not($value); + } +} + +if (!function_exists('nullValue')) { /** + * Matches if value is null. + */ + function nullValue() + { + return \Hamcrest\Core\IsNull::nullValue(); + } +} + +if (!function_exists('notNullValue')) { /** + * Matches if value is not null. + */ + function notNullValue() + { + return \Hamcrest\Core\IsNull::notNullValue(); + } +} + +if (!function_exists('sameInstance')) { /** + * Creates a new instance of IsSame. + * + * @param mixed $object + * The predicate evaluates to true only when the argument is + * this object. + * + * @return \Hamcrest\Core\IsSame + */ + function sameInstance($object) + { + return \Hamcrest\Core\IsSame::sameInstance($object); + } +} + +if (!function_exists('typeOf')) { /** + * Is the value a particular built-in type? + */ + function typeOf($theType) + { + return \Hamcrest\Core\IsTypeOf::typeOf($theType); + } +} + +if (!function_exists('set')) { /** + * Matches if value (class, object, or array) has named $property. + */ + function set($property) + { + return \Hamcrest\Core\Set::set($property); + } +} + +if (!function_exists('notSet')) { /** + * Matches if value (class, object, or array) does not have named $property. + */ + function notSet($property) + { + return \Hamcrest\Core\Set::notSet($property); + } +} + +if (!function_exists('closeTo')) { /** + * Matches if value is a number equal to $value within some range of + * acceptable error $delta. + */ + function closeTo($value, $delta) + { + return \Hamcrest\Number\IsCloseTo::closeTo($value, $delta); + } +} + +if (!function_exists('comparesEqualTo')) { /** + * The value is not > $value, nor < $value. + */ + function comparesEqualTo($value) + { + return \Hamcrest\Number\OrderingComparison::comparesEqualTo($value); + } +} + +if (!function_exists('greaterThan')) { /** + * The value is > $value. + */ + function greaterThan($value) + { + return \Hamcrest\Number\OrderingComparison::greaterThan($value); + } +} + +if (!function_exists('greaterThanOrEqualTo')) { /** + * The value is >= $value. + */ + function greaterThanOrEqualTo($value) + { + return \Hamcrest\Number\OrderingComparison::greaterThanOrEqualTo($value); + } +} + +if (!function_exists('atLeast')) { /** + * The value is >= $value. + */ + function atLeast($value) + { + return \Hamcrest\Number\OrderingComparison::greaterThanOrEqualTo($value); + } +} + +if (!function_exists('lessThan')) { /** + * The value is < $value. + */ + function lessThan($value) + { + return \Hamcrest\Number\OrderingComparison::lessThan($value); + } +} + +if (!function_exists('lessThanOrEqualTo')) { /** + * The value is <= $value. + */ + function lessThanOrEqualTo($value) + { + return \Hamcrest\Number\OrderingComparison::lessThanOrEqualTo($value); + } +} + +if (!function_exists('atMost')) { /** + * The value is <= $value. + */ + function atMost($value) + { + return \Hamcrest\Number\OrderingComparison::lessThanOrEqualTo($value); + } +} + +if (!function_exists('isEmptyString')) { /** + * Matches if value is a zero-length string. + */ + function isEmptyString() + { + return \Hamcrest\Text\IsEmptyString::isEmptyString(); + } +} + +if (!function_exists('emptyString')) { /** + * Matches if value is a zero-length string. + */ + function emptyString() + { + return \Hamcrest\Text\IsEmptyString::isEmptyString(); + } +} + +if (!function_exists('isEmptyOrNullString')) { /** + * Matches if value is null or a zero-length string. + */ + function isEmptyOrNullString() + { + return \Hamcrest\Text\IsEmptyString::isEmptyOrNullString(); + } +} + +if (!function_exists('nullOrEmptyString')) { /** + * Matches if value is null or a zero-length string. + */ + function nullOrEmptyString() + { + return \Hamcrest\Text\IsEmptyString::isEmptyOrNullString(); + } +} + +if (!function_exists('isNonEmptyString')) { /** + * Matches if value is a non-zero-length string. + */ + function isNonEmptyString() + { + return \Hamcrest\Text\IsEmptyString::isNonEmptyString(); + } +} + +if (!function_exists('nonEmptyString')) { /** + * Matches if value is a non-zero-length string. + */ + function nonEmptyString() + { + return \Hamcrest\Text\IsEmptyString::isNonEmptyString(); + } +} + +if (!function_exists('equalToIgnoringCase')) { /** + * Matches if value is a string equal to $string, regardless of the case. + */ + function equalToIgnoringCase($string) + { + return \Hamcrest\Text\IsEqualIgnoringCase::equalToIgnoringCase($string); + } +} + +if (!function_exists('equalToIgnoringWhiteSpace')) { /** + * Matches if value is a string equal to $string, regardless of whitespace. + */ + function equalToIgnoringWhiteSpace($string) + { + return \Hamcrest\Text\IsEqualIgnoringWhiteSpace::equalToIgnoringWhiteSpace($string); + } +} + +if (!function_exists('matchesPattern')) { /** + * Matches if value is a string that matches regular expression $pattern. + */ + function matchesPattern($pattern) + { + return \Hamcrest\Text\MatchesPattern::matchesPattern($pattern); + } +} + +if (!function_exists('containsString')) { /** + * Matches if value is a string that contains $substring. + */ + function containsString($substring) + { + return \Hamcrest\Text\StringContains::containsString($substring); + } +} + +if (!function_exists('containsStringIgnoringCase')) { /** + * Matches if value is a string that contains $substring regardless of the case. + */ + function containsStringIgnoringCase($substring) + { + return \Hamcrest\Text\StringContainsIgnoringCase::containsStringIgnoringCase($substring); + } +} + +if (!function_exists('stringContainsInOrder')) { /** + * Matches if value contains $substrings in a constrained order. + */ + function stringContainsInOrder(/* args... */) + { + $args = func_get_args(); + return call_user_func_array(array('\Hamcrest\Text\StringContainsInOrder', 'stringContainsInOrder'), $args); + } +} + +if (!function_exists('endsWith')) { /** + * Matches if value is a string that ends with $substring. + */ + function endsWith($substring) + { + return \Hamcrest\Text\StringEndsWith::endsWith($substring); + } +} + +if (!function_exists('startsWith')) { /** + * Matches if value is a string that starts with $substring. + */ + function startsWith($substring) + { + return \Hamcrest\Text\StringStartsWith::startsWith($substring); + } +} + +if (!function_exists('arrayValue')) { /** + * Is the value an array? + */ + function arrayValue() + { + return \Hamcrest\Type\IsArray::arrayValue(); + } +} + +if (!function_exists('booleanValue')) { /** + * Is the value a boolean? + */ + function booleanValue() + { + return \Hamcrest\Type\IsBoolean::booleanValue(); + } +} + +if (!function_exists('boolValue')) { /** + * Is the value a boolean? + */ + function boolValue() + { + return \Hamcrest\Type\IsBoolean::booleanValue(); + } +} + +if (!function_exists('callableValue')) { /** + * Is the value callable? + */ + function callableValue() + { + return \Hamcrest\Type\IsCallable::callableValue(); + } +} + +if (!function_exists('doubleValue')) { /** + * Is the value a float/double? + */ + function doubleValue() + { + return \Hamcrest\Type\IsDouble::doubleValue(); + } +} + +if (!function_exists('floatValue')) { /** + * Is the value a float/double? + */ + function floatValue() + { + return \Hamcrest\Type\IsDouble::doubleValue(); + } +} + +if (!function_exists('integerValue')) { /** + * Is the value an integer? + */ + function integerValue() + { + return \Hamcrest\Type\IsInteger::integerValue(); + } +} + +if (!function_exists('intValue')) { /** + * Is the value an integer? + */ + function intValue() + { + return \Hamcrest\Type\IsInteger::integerValue(); + } +} + +if (!function_exists('numericValue')) { /** + * Is the value a numeric? + */ + function numericValue() + { + return \Hamcrest\Type\IsNumeric::numericValue(); + } +} + +if (!function_exists('objectValue')) { /** + * Is the value an object? + */ + function objectValue() + { + return \Hamcrest\Type\IsObject::objectValue(); + } +} + +if (!function_exists('anObject')) { /** + * Is the value an object? + */ + function anObject() + { + return \Hamcrest\Type\IsObject::objectValue(); + } +} + +if (!function_exists('resourceValue')) { /** + * Is the value a resource? + */ + function resourceValue() + { + return \Hamcrest\Type\IsResource::resourceValue(); + } +} + +if (!function_exists('scalarValue')) { /** + * Is the value a scalar (boolean, integer, double, or string)? + */ + function scalarValue() + { + return \Hamcrest\Type\IsScalar::scalarValue(); + } +} + +if (!function_exists('stringValue')) { /** + * Is the value a string? + */ + function stringValue() + { + return \Hamcrest\Type\IsString::stringValue(); + } +} + +if (!function_exists('hasXPath')) { /** + * Wraps $matcher with {@link Hamcrest\Core\IsEqual) + * if it's not a matcher and the XPath in count() + * if it's an integer. + */ + function hasXPath($xpath, $matcher = null) + { + return \Hamcrest\Xml\HasXPath::hasXPath($xpath, $matcher); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArray.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArray.php new file mode 100644 index 0000000..9ea5697 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArray.php @@ -0,0 +1,118 @@ +_elementMatchers = $elementMatchers; + } + + protected function matchesSafely($array) + { + if (array_keys($array) != array_keys($this->_elementMatchers)) { + return false; + } + + /** @var $matcher \Hamcrest\Matcher */ + foreach ($this->_elementMatchers as $k => $matcher) { + if (!$matcher->matches($array[$k])) { + return false; + } + } + + return true; + } + + protected function describeMismatchSafely($actual, Description $mismatchDescription) + { + if (count($actual) != count($this->_elementMatchers)) { + $mismatchDescription->appendText('array length was ' . count($actual)); + + return; + } elseif (array_keys($actual) != array_keys($this->_elementMatchers)) { + $mismatchDescription->appendText('array keys were ') + ->appendValueList( + $this->descriptionStart(), + $this->descriptionSeparator(), + $this->descriptionEnd(), + array_keys($actual) + ) + ; + + return; + } + + /** @var $matcher \Hamcrest\Matcher */ + foreach ($this->_elementMatchers as $k => $matcher) { + if (!$matcher->matches($actual[$k])) { + $mismatchDescription->appendText('element ')->appendValue($k) + ->appendText(' was ')->appendValue($actual[$k]); + + return; + } + } + } + + public function describeTo(Description $description) + { + $description->appendList( + $this->descriptionStart(), + $this->descriptionSeparator(), + $this->descriptionEnd(), + $this->_elementMatchers + ); + } + + /** + * Evaluates to true only if each $matcher[$i] is satisfied by $array[$i]. + * + * @factory ... + */ + public static function anArray(/* args... */) + { + $args = func_get_args(); + + return new self(Util::createMatcherArray($args)); + } + + // -- Protected Methods + + protected function descriptionStart() + { + return '['; + } + + protected function descriptionSeparator() + { + return ', '; + } + + protected function descriptionEnd() + { + return ']'; + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContaining.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContaining.php new file mode 100644 index 0000000..0e4a1ed --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContaining.php @@ -0,0 +1,63 @@ +_elementMatcher = $elementMatcher; + } + + protected function matchesSafely($array) + { + foreach ($array as $element) { + if ($this->_elementMatcher->matches($element)) { + return true; + } + } + + return false; + } + + protected function describeMismatchSafely($array, Description $mismatchDescription) + { + $mismatchDescription->appendText('was ')->appendValue($array); + } + + public function describeTo(Description $description) + { + $description + ->appendText('an array containing ') + ->appendDescriptionOf($this->_elementMatcher) + ; + } + + /** + * Evaluates to true if any item in an array satisfies the given matcher. + * + * @param mixed $item as a {@link Hamcrest\Matcher} or a value. + * + * @return \Hamcrest\Arrays\IsArrayContaining + * @factory hasValue + */ + public static function hasItemInArray($item) + { + return new self(Util::wrapValueWithIsEqual($item)); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingInAnyOrder.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingInAnyOrder.php new file mode 100644 index 0000000..9009026 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingInAnyOrder.php @@ -0,0 +1,59 @@ +_elementMatchers = $elementMatchers; + } + + protected function matchesSafelyWithDiagnosticDescription($array, Description $mismatchDescription) + { + $matching = new MatchingOnce($this->_elementMatchers, $mismatchDescription); + + foreach ($array as $element) { + if (!$matching->matches($element)) { + return false; + } + } + + return $matching->isFinished($array); + } + + public function describeTo(Description $description) + { + $description->appendList('[', ', ', ']', $this->_elementMatchers) + ->appendText(' in any order') + ; + } + + /** + * An array with elements that match the given matchers. + * + * @factory containsInAnyOrder ... + */ + public static function arrayContainingInAnyOrder(/* args... */) + { + $args = func_get_args(); + + return new self(Util::createMatcherArray($args)); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingInOrder.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingInOrder.php new file mode 100644 index 0000000..6115740 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingInOrder.php @@ -0,0 +1,57 @@ +_elementMatchers = $elementMatchers; + } + + protected function matchesSafelyWithDiagnosticDescription($array, Description $mismatchDescription) + { + $series = new SeriesMatchingOnce($this->_elementMatchers, $mismatchDescription); + + foreach ($array as $element) { + if (!$series->matches($element)) { + return false; + } + } + + return $series->isFinished(); + } + + public function describeTo(Description $description) + { + $description->appendList('[', ', ', ']', $this->_elementMatchers); + } + + /** + * An array with elements that match the given matchers in the same order. + * + * @factory contains ... + */ + public static function arrayContaining(/* args... */) + { + $args = func_get_args(); + + return new self(Util::createMatcherArray($args)); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingKey.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingKey.php new file mode 100644 index 0000000..523477e --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingKey.php @@ -0,0 +1,75 @@ +_keyMatcher = $keyMatcher; + } + + protected function matchesSafely($array) + { + foreach ($array as $key => $element) { + if ($this->_keyMatcher->matches($key)) { + return true; + } + } + + return false; + } + + protected function describeMismatchSafely($array, Description $mismatchDescription) + { + //Not using appendValueList() so that keys can be shown + $mismatchDescription->appendText('array was ') + ->appendText('[') + ; + $loop = false; + foreach ($array as $key => $value) { + if ($loop) { + $mismatchDescription->appendText(', '); + } + $mismatchDescription->appendValue($key)->appendText(' => ')->appendValue($value); + $loop = true; + } + $mismatchDescription->appendText(']'); + } + + public function describeTo(Description $description) + { + $description + ->appendText('array with key ') + ->appendDescriptionOf($this->_keyMatcher) + ; + } + + /** + * Evaluates to true if any key in an array matches the given matcher. + * + * @param mixed $key as a {@link Hamcrest\Matcher} or a value. + * + * @return \Hamcrest\Arrays\IsArrayContainingKey + * @factory hasKey + */ + public static function hasKeyInArray($key) + { + return new self(Util::wrapValueWithIsEqual($key)); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingKeyValuePair.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingKeyValuePair.php new file mode 100644 index 0000000..9ac3eba --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingKeyValuePair.php @@ -0,0 +1,80 @@ +_keyMatcher = $keyMatcher; + $this->_valueMatcher = $valueMatcher; + } + + protected function matchesSafely($array) + { + foreach ($array as $key => $value) { + if ($this->_keyMatcher->matches($key) && $this->_valueMatcher->matches($value)) { + return true; + } + } + + return false; + } + + protected function describeMismatchSafely($array, Description $mismatchDescription) + { + //Not using appendValueList() so that keys can be shown + $mismatchDescription->appendText('array was ') + ->appendText('[') + ; + $loop = false; + foreach ($array as $key => $value) { + if ($loop) { + $mismatchDescription->appendText(', '); + } + $mismatchDescription->appendValue($key)->appendText(' => ')->appendValue($value); + $loop = true; + } + $mismatchDescription->appendText(']'); + } + + public function describeTo(Description $description) + { + $description->appendText('array containing [') + ->appendDescriptionOf($this->_keyMatcher) + ->appendText(' => ') + ->appendDescriptionOf($this->_valueMatcher) + ->appendText(']') + ; + } + + /** + * Test if an array has both an key and value in parity with each other. + * + * @factory hasEntry + */ + public static function hasKeyValuePair($key, $value) + { + return new self( + Util::wrapValueWithIsEqual($key), + Util::wrapValueWithIsEqual($value) + ); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayWithSize.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayWithSize.php new file mode 100644 index 0000000..074375c --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayWithSize.php @@ -0,0 +1,73 @@ +_elementMatchers = $elementMatchers; + $this->_mismatchDescription = $mismatchDescription; + } + + public function matches($item) + { + return $this->_isNotSurplus($item) && $this->_isMatched($item); + } + + public function isFinished($items) + { + if (empty($this->_elementMatchers)) { + return true; + } + + $this->_mismatchDescription + ->appendText('No item matches: ')->appendList('', ', ', '', $this->_elementMatchers) + ->appendText(' in ')->appendValueList('[', ', ', ']', $items) + ; + + return false; + } + + // -- Private Methods + + private function _isNotSurplus($item) + { + if (empty($this->_elementMatchers)) { + $this->_mismatchDescription->appendText('Not matched: ')->appendValue($item); + + return false; + } + + return true; + } + + private function _isMatched($item) + { + /** @var $matcher \Hamcrest\Matcher */ + foreach ($this->_elementMatchers as $i => $matcher) { + if ($matcher->matches($item)) { + unset($this->_elementMatchers[$i]); + + return true; + } + } + + $this->_mismatchDescription->appendText('Not matched: ')->appendValue($item); + + return false; + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/SeriesMatchingOnce.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/SeriesMatchingOnce.php new file mode 100644 index 0000000..12a912d --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/SeriesMatchingOnce.php @@ -0,0 +1,75 @@ +_elementMatchers = $elementMatchers; + $this->_keys = array_keys($elementMatchers); + $this->_mismatchDescription = $mismatchDescription; + } + + public function matches($item) + { + return $this->_isNotSurplus($item) && $this->_isMatched($item); + } + + public function isFinished() + { + if (!empty($this->_elementMatchers)) { + $nextMatcher = current($this->_elementMatchers); + $this->_mismatchDescription->appendText('No item matched: ')->appendDescriptionOf($nextMatcher); + + return false; + } + + return true; + } + + // -- Private Methods + + private function _isNotSurplus($item) + { + if (empty($this->_elementMatchers)) { + $this->_mismatchDescription->appendText('Not matched: ')->appendValue($item); + + return false; + } + + return true; + } + + private function _isMatched($item) + { + $this->_nextMatchKey = array_shift($this->_keys); + $nextMatcher = array_shift($this->_elementMatchers); + + if (!$nextMatcher->matches($item)) { + $this->_describeMismatch($nextMatcher, $item); + + return false; + } + + return true; + } + + private function _describeMismatch(Matcher $matcher, $item) + { + $this->_mismatchDescription->appendText('item with key ' . $this->_nextMatchKey . ': '); + $matcher->describeMismatch($item, $this->_mismatchDescription); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/AssertionError.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/AssertionError.php new file mode 100644 index 0000000..3a2a0e7 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/AssertionError.php @@ -0,0 +1,10 @@ +append($text); + + return $this; + } + + public function appendDescriptionOf(SelfDescribing $value) + { + $value->describeTo($this); + + return $this; + } + + public function appendValue($value) + { + if (is_null($value)) { + $this->append('null'); + } elseif (is_string($value)) { + $this->_toPhpSyntax($value); + } elseif (is_float($value)) { + $this->append('<'); + $this->append($value); + $this->append('F>'); + } elseif (is_bool($value)) { + $this->append('<'); + $this->append($value ? 'true' : 'false'); + $this->append('>'); + } elseif (is_array($value) || $value instanceof \Iterator || $value instanceof \IteratorAggregate) { + $this->appendValueList('[', ', ', ']', $value); + } elseif (is_object($value) && !method_exists($value, '__toString')) { + $this->append('<'); + $this->append(get_class($value)); + $this->append('>'); + } else { + $this->append('<'); + $this->append($value); + $this->append('>'); + } + + return $this; + } + + public function appendValueList($start, $separator, $end, $values) + { + $list = array(); + foreach ($values as $v) { + $list[] = new SelfDescribingValue($v); + } + + $this->appendList($start, $separator, $end, $list); + + return $this; + } + + public function appendList($start, $separator, $end, $values) + { + $this->append($start); + + $separate = false; + + foreach ($values as $value) { + /*if (!($value instanceof Hamcrest\SelfDescribing)) { + $value = new Hamcrest\Internal\SelfDescribingValue($value); + }*/ + + if ($separate) { + $this->append($separator); + } + + $this->appendDescriptionOf($value); + + $separate = true; + } + + $this->append($end); + + return $this; + } + + // -- Protected Methods + + /** + * Append the String $str to the description. + */ + abstract protected function append($str); + + // -- Private Methods + + private function _toPhpSyntax($value) + { + $str = '"'; + for ($i = 0, $len = strlen($value); $i < $len; ++$i) { + switch ($value[$i]) { + case '"': + $str .= '\\"'; + break; + + case "\t": + $str .= '\\t'; + break; + + case "\r": + $str .= '\\r'; + break; + + case "\n": + $str .= '\\n'; + break; + + default: + $str .= $value[$i]; + } + } + $str .= '"'; + $this->append($str); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/BaseMatcher.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/BaseMatcher.php new file mode 100644 index 0000000..286db3e --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/BaseMatcher.php @@ -0,0 +1,25 @@ +appendText('was ')->appendValue($item); + } + + public function __toString() + { + return StringDescription::toString($this); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Collection/IsEmptyTraversable.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Collection/IsEmptyTraversable.php new file mode 100644 index 0000000..8ab58ea --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Collection/IsEmptyTraversable.php @@ -0,0 +1,71 @@ +_empty = $empty; + } + + public function matches($item) + { + if (!$item instanceof \Traversable) { + return false; + } + + foreach ($item as $value) { + return !$this->_empty; + } + + return $this->_empty; + } + + public function describeTo(Description $description) + { + $description->appendText($this->_empty ? 'an empty traversable' : 'a non-empty traversable'); + } + + /** + * Returns true if traversable is empty. + * + * @factory + */ + public static function emptyTraversable() + { + if (!self::$_INSTANCE) { + self::$_INSTANCE = new self; + } + + return self::$_INSTANCE; + } + + /** + * Returns true if traversable is not empty. + * + * @factory + */ + public static function nonEmptyTraversable() + { + if (!self::$_NOT_INSTANCE) { + self::$_NOT_INSTANCE = new self(false); + } + + return self::$_NOT_INSTANCE; + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Collection/IsTraversableWithSize.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Collection/IsTraversableWithSize.php new file mode 100644 index 0000000..c95edc5 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Collection/IsTraversableWithSize.php @@ -0,0 +1,47 @@ +false. + */ +class AllOf extends DiagnosingMatcher +{ + + private $_matchers; + + public function __construct(array $matchers) + { + Util::checkAllAreMatchers($matchers); + + $this->_matchers = $matchers; + } + + public function matchesWithDiagnosticDescription($item, Description $mismatchDescription) + { + /** @var $matcher \Hamcrest\Matcher */ + foreach ($this->_matchers as $matcher) { + if (!$matcher->matches($item)) { + $mismatchDescription->appendDescriptionOf($matcher)->appendText(' '); + $matcher->describeMismatch($item, $mismatchDescription); + + return false; + } + } + + return true; + } + + public function describeTo(Description $description) + { + $description->appendList('(', ' and ', ')', $this->_matchers); + } + + /** + * Evaluates to true only if ALL of the passed in matchers evaluate to true. + * + * @factory ... + */ + public static function allOf(/* args... */) + { + $args = func_get_args(); + + return new self(Util::createMatcherArray($args)); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/AnyOf.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/AnyOf.php new file mode 100644 index 0000000..4504279 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/AnyOf.php @@ -0,0 +1,58 @@ +true. + */ +class AnyOf extends ShortcutCombination +{ + + public function __construct(array $matchers) + { + parent::__construct($matchers); + } + + public function matches($item) + { + return $this->matchesWithShortcut($item, true); + } + + public function describeTo(Description $description) + { + $this->describeToWithOperator($description, 'or'); + } + + /** + * Evaluates to true if ANY of the passed in matchers evaluate to true. + * + * @factory ... + */ + public static function anyOf(/* args... */) + { + $args = func_get_args(); + + return new self(Util::createMatcherArray($args)); + } + + /** + * Evaluates to false if ANY of the passed in matchers evaluate to true. + * + * @factory ... + */ + public static function noneOf(/* args... */) + { + $args = func_get_args(); + + return IsNot::not( + new self(Util::createMatcherArray($args)) + ); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/CombinableMatcher.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/CombinableMatcher.php new file mode 100644 index 0000000..e3b4aa7 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/CombinableMatcher.php @@ -0,0 +1,78 @@ +_matcher = $matcher; + } + + public function matches($item) + { + return $this->_matcher->matches($item); + } + + public function describeTo(Description $description) + { + $description->appendDescriptionOf($this->_matcher); + } + + /** Diversion from Hamcrest-Java... Logical "and" not permitted */ + public function andAlso(Matcher $other) + { + return new self(new AllOf($this->_templatedListWith($other))); + } + + /** Diversion from Hamcrest-Java... Logical "or" not permitted */ + public function orElse(Matcher $other) + { + return new self(new AnyOf($this->_templatedListWith($other))); + } + + /** + * This is useful for fluently combining matchers that must both pass. + * For example: + *
+     *   assertThat($string, both(containsString("a"))->andAlso(containsString("b")));
+     * 
+ * + * @factory + */ + public static function both(Matcher $matcher) + { + return new self($matcher); + } + + /** + * This is useful for fluently combining matchers where either may pass, + * for example: + *
+     *   assertThat($string, either(containsString("a"))->orElse(containsString("b")));
+     * 
+ * + * @factory + */ + public static function either(Matcher $matcher) + { + return new self($matcher); + } + + // -- Private Methods + + private function _templatedListWith(Matcher $other) + { + return array($this->_matcher, $other); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/DescribedAs.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/DescribedAs.php new file mode 100644 index 0000000..5b2583f --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/DescribedAs.php @@ -0,0 +1,68 @@ +_descriptionTemplate = $descriptionTemplate; + $this->_matcher = $matcher; + $this->_values = $values; + } + + public function matches($item) + { + return $this->_matcher->matches($item); + } + + public function describeTo(Description $description) + { + $textStart = 0; + while (preg_match(self::ARG_PATTERN, $this->_descriptionTemplate, $matches, PREG_OFFSET_CAPTURE, $textStart)) { + $text = $matches[0][0]; + $index = $matches[1][0]; + $offset = $matches[0][1]; + + $description->appendText(substr($this->_descriptionTemplate, $textStart, $offset - $textStart)); + $description->appendValue($this->_values[$index]); + + $textStart = $offset + strlen($text); + } + + if ($textStart < strlen($this->_descriptionTemplate)) { + $description->appendText(substr($this->_descriptionTemplate, $textStart)); + } + } + + /** + * Wraps an existing matcher and overrides the description when it fails. + * + * @factory ... + */ + public static function describedAs(/* $description, Hamcrest\Matcher $matcher, $values... */) + { + $args = func_get_args(); + $description = array_shift($args); + $matcher = array_shift($args); + $values = $args; + + return new self($description, $matcher, $values); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Every.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Every.php new file mode 100644 index 0000000..d686f8d --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Every.php @@ -0,0 +1,56 @@ +_matcher = $matcher; + } + + protected function matchesSafelyWithDiagnosticDescription($items, Description $mismatchDescription) + { + foreach ($items as $item) { + if (!$this->_matcher->matches($item)) { + $mismatchDescription->appendText('an item '); + $this->_matcher->describeMismatch($item, $mismatchDescription); + + return false; + } + } + + return true; + } + + public function describeTo(Description $description) + { + $description->appendText('every item is ')->appendDescriptionOf($this->_matcher); + } + + /** + * @param Matcher $itemMatcher + * A matcher to apply to every element in an array. + * + * @return \Hamcrest\Core\Every + * Evaluates to TRUE for a collection in which every item matches $itemMatcher + * + * @factory + */ + public static function everyItem(Matcher $itemMatcher) + { + return new self($itemMatcher); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/HasToString.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/HasToString.php new file mode 100644 index 0000000..45bd910 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/HasToString.php @@ -0,0 +1,56 @@ +toString(); + } + + return (string) $actual; + } + + /** + * Does array size satisfy a given matcher? + * + * @factory + */ + public static function hasToString($matcher) + { + return new self(Util::wrapValueWithIsEqual($matcher)); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Is.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Is.php new file mode 100644 index 0000000..41266dc --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Is.php @@ -0,0 +1,57 @@ +_matcher = $matcher; + } + + public function matches($arg) + { + return $this->_matcher->matches($arg); + } + + public function describeTo(Description $description) + { + $description->appendText('is ')->appendDescriptionOf($this->_matcher); + } + + public function describeMismatch($item, Description $mismatchDescription) + { + $this->_matcher->describeMismatch($item, $mismatchDescription); + } + + /** + * Decorates another Matcher, retaining the behavior but allowing tests + * to be slightly more expressive. + * + * For example: assertThat($cheese, equalTo($smelly)) + * vs. assertThat($cheese, is(equalTo($smelly))) + * + * @factory + */ + public static function is($value) + { + return new self(Util::wrapValueWithIsEqual($value)); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsAnything.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsAnything.php new file mode 100644 index 0000000..f20e6c0 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsAnything.php @@ -0,0 +1,45 @@ +true. + */ +class IsAnything extends BaseMatcher +{ + + private $_message; + + public function __construct($message = 'ANYTHING') + { + $this->_message = $message; + } + + public function matches($item) + { + return true; + } + + public function describeTo(Description $description) + { + $description->appendText($this->_message); + } + + /** + * This matcher always evaluates to true. + * + * @param string $description A meaningful string used when describing itself. + * + * @return \Hamcrest\Core\IsAnything + * @factory + */ + public static function anything($description = 'ANYTHING') + { + return new self($description); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsCollectionContaining.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsCollectionContaining.php new file mode 100644 index 0000000..5e60426 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsCollectionContaining.php @@ -0,0 +1,93 @@ +_elementMatcher = $elementMatcher; + } + + protected function matchesSafely($items) + { + foreach ($items as $item) { + if ($this->_elementMatcher->matches($item)) { + return true; + } + } + + return false; + } + + protected function describeMismatchSafely($items, Description $mismatchDescription) + { + $mismatchDescription->appendText('was ')->appendValue($items); + } + + public function describeTo(Description $description) + { + $description + ->appendText('a collection containing ') + ->appendDescriptionOf($this->_elementMatcher) + ; + } + + /** + * Test if the value is an array containing this matcher. + * + * Example: + *
+     * assertThat(array('a', 'b'), hasItem(equalTo('b')));
+     * //Convenience defaults to equalTo()
+     * assertThat(array('a', 'b'), hasItem('b'));
+     * 
+ * + * @factory ... + */ + public static function hasItem() + { + $args = func_get_args(); + $firstArg = array_shift($args); + + return new self(Util::wrapValueWithIsEqual($firstArg)); + } + + /** + * Test if the value is an array containing elements that match all of these + * matchers. + * + * Example: + *
+     * assertThat(array('a', 'b', 'c'), hasItems(equalTo('a'), equalTo('b')));
+     * 
+ * + * @factory ... + */ + public static function hasItems(/* args... */) + { + $args = func_get_args(); + $matchers = array(); + + foreach ($args as $arg) { + $matchers[] = self::hasItem($arg); + } + + return AllOf::allOf($matchers); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsEqual.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsEqual.php new file mode 100644 index 0000000..523fba0 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsEqual.php @@ -0,0 +1,44 @@ +_item = $item; + } + + public function matches($arg) + { + return (($arg == $this->_item) && ($this->_item == $arg)); + } + + public function describeTo(Description $description) + { + $description->appendValue($this->_item); + } + + /** + * Is the value equal to another value, as tested by the use of the "==" + * comparison operator? + * + * @factory + */ + public static function equalTo($item) + { + return new self($item); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsIdentical.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsIdentical.php new file mode 100644 index 0000000..28f7b36 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsIdentical.php @@ -0,0 +1,38 @@ +_value = $value; + } + + public function describeTo(Description $description) + { + $description->appendValue($this->_value); + } + + /** + * Tests of the value is identical to $value as tested by the "===" operator. + * + * @factory + */ + public static function identicalTo($value) + { + return new self($value); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsInstanceOf.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsInstanceOf.php new file mode 100644 index 0000000..7a5c92a --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsInstanceOf.php @@ -0,0 +1,67 @@ +_theClass = $theClass; + } + + protected function matchesWithDiagnosticDescription($item, Description $mismatchDescription) + { + if (!is_object($item)) { + $mismatchDescription->appendText('was ')->appendValue($item); + + return false; + } + + if (!($item instanceof $this->_theClass)) { + $mismatchDescription->appendText('[' . get_class($item) . '] ') + ->appendValue($item); + + return false; + } + + return true; + } + + public function describeTo(Description $description) + { + $description->appendText('an instance of ') + ->appendText($this->_theClass) + ; + } + + /** + * Is the value an instance of a particular type? + * This version assumes no relationship between the required type and + * the signature of the method that sets it up, for example in + * assertThat($anObject, anInstanceOf('Thing')); + * + * @factory any + */ + public static function anInstanceOf($theClass) + { + return new self($theClass); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsNot.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsNot.php new file mode 100644 index 0000000..167f0d0 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsNot.php @@ -0,0 +1,44 @@ +_matcher = $matcher; + } + + public function matches($arg) + { + return !$this->_matcher->matches($arg); + } + + public function describeTo(Description $description) + { + $description->appendText('not ')->appendDescriptionOf($this->_matcher); + } + + /** + * Matches if value does not match $value. + * + * @factory + */ + public static function not($value) + { + return new self(Util::wrapValueWithIsEqual($value)); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsNull.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsNull.php new file mode 100644 index 0000000..91a454c --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsNull.php @@ -0,0 +1,56 @@ +appendText('null'); + } + + /** + * Matches if value is null. + * + * @factory + */ + public static function nullValue() + { + if (!self::$_INSTANCE) { + self::$_INSTANCE = new self(); + } + + return self::$_INSTANCE; + } + + /** + * Matches if value is not null. + * + * @factory + */ + public static function notNullValue() + { + if (!self::$_NOT_INSTANCE) { + self::$_NOT_INSTANCE = IsNot::not(self::nullValue()); + } + + return self::$_NOT_INSTANCE; + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsSame.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsSame.php new file mode 100644 index 0000000..8107870 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsSame.php @@ -0,0 +1,51 @@ +_object = $object; + } + + public function matches($object) + { + return ($object === $this->_object) && ($this->_object === $object); + } + + public function describeTo(Description $description) + { + $description->appendText('sameInstance(') + ->appendValue($this->_object) + ->appendText(')') + ; + } + + /** + * Creates a new instance of IsSame. + * + * @param mixed $object + * The predicate evaluates to true only when the argument is + * this object. + * + * @return \Hamcrest\Core\IsSame + * @factory + */ + public static function sameInstance($object) + { + return new self($object); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsTypeOf.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsTypeOf.php new file mode 100644 index 0000000..d24f0f9 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsTypeOf.php @@ -0,0 +1,71 @@ +_theType = strtolower($theType); + } + + public function matches($item) + { + return strtolower(gettype($item)) == $this->_theType; + } + + public function describeTo(Description $description) + { + $description->appendText(self::getTypeDescription($this->_theType)); + } + + public function describeMismatch($item, Description $description) + { + if ($item === null) { + $description->appendText('was null'); + } else { + $description->appendText('was ') + ->appendText(self::getTypeDescription(strtolower(gettype($item)))) + ->appendText(' ') + ->appendValue($item) + ; + } + } + + public static function getTypeDescription($type) + { + if ($type == 'null') { + return 'null'; + } + + return (strpos('aeiou', substr($type, 0, 1)) === false ? 'a ' : 'an ') + . $type; + } + + /** + * Is the value a particular built-in type? + * + * @factory + */ + public static function typeOf($theType) + { + return new self($theType); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Set.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Set.php new file mode 100644 index 0000000..cdc45d5 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Set.php @@ -0,0 +1,95 @@ + + * assertThat(array('a', 'b'), set('b')); + * assertThat($foo, set('bar')); + * assertThat('Server', notSet('defaultPort')); + * + * + * @todo Replace $property with a matcher and iterate all property names. + */ +class Set extends BaseMatcher +{ + + private $_property; + private $_not; + + public function __construct($property, $not = false) + { + $this->_property = $property; + $this->_not = $not; + } + + public function matches($item) + { + if ($item === null) { + return false; + } + $property = $this->_property; + if (is_array($item)) { + $result = isset($item[$property]); + } elseif (is_object($item)) { + $result = isset($item->$property); + } elseif (is_string($item)) { + $result = isset($item::$$property); + } else { + throw new \InvalidArgumentException('Must pass an object, array, or class name'); + } + + return $this->_not ? !$result : $result; + } + + public function describeTo(Description $description) + { + $description->appendText($this->_not ? 'unset property ' : 'set property ')->appendText($this->_property); + } + + public function describeMismatch($item, Description $description) + { + $value = ''; + if (!$this->_not) { + $description->appendText('was not set'); + } else { + $property = $this->_property; + if (is_array($item)) { + $value = $item[$property]; + } elseif (is_object($item)) { + $value = $item->$property; + } elseif (is_string($item)) { + $value = $item::$$property; + } + parent::describeMismatch($value, $description); + } + } + + /** + * Matches if value (class, object, or array) has named $property. + * + * @factory + */ + public static function set($property) + { + return new self($property); + } + + /** + * Matches if value (class, object, or array) does not have named $property. + * + * @factory + */ + public static function notSet($property) + { + return new self($property, true); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/ShortcutCombination.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/ShortcutCombination.php new file mode 100644 index 0000000..d93db74 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/ShortcutCombination.php @@ -0,0 +1,43 @@ + + */ + private $_matchers; + + public function __construct(array $matchers) + { + Util::checkAllAreMatchers($matchers); + + $this->_matchers = $matchers; + } + + protected function matchesWithShortcut($item, $shortcut) + { + /** @var $matcher \Hamcrest\Matcher */ + foreach ($this->_matchers as $matcher) { + if ($matcher->matches($item) == $shortcut) { + return $shortcut; + } + } + + return !$shortcut; + } + + public function describeToWithOperator(Description $description, $operator) + { + $description->appendList('(', ' ' . $operator . ' ', ')', $this->_matchers); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Description.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Description.php new file mode 100644 index 0000000..9a482db --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Description.php @@ -0,0 +1,70 @@ +matchesWithDiagnosticDescription($item, new NullDescription()); + } + + public function describeMismatch($item, Description $mismatchDescription) + { + $this->matchesWithDiagnosticDescription($item, $mismatchDescription); + } + + abstract protected function matchesWithDiagnosticDescription($item, Description $mismatchDescription); +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/FeatureMatcher.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/FeatureMatcher.php new file mode 100644 index 0000000..59f6cc7 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/FeatureMatcher.php @@ -0,0 +1,67 @@ +featureValueOf() in a subclass to pull out the feature to be + * matched against. + */ +abstract class FeatureMatcher extends TypeSafeDiagnosingMatcher +{ + + private $_subMatcher; + private $_featureDescription; + private $_featureName; + + /** + * Constructor. + * + * @param string $type + * @param string $subtype + * @param \Hamcrest\Matcher $subMatcher The matcher to apply to the feature + * @param string $featureDescription Descriptive text to use in describeTo + * @param string $featureName Identifying text for mismatch message + */ + public function __construct($type, $subtype, Matcher $subMatcher, $featureDescription, $featureName) + { + parent::__construct($type, $subtype); + + $this->_subMatcher = $subMatcher; + $this->_featureDescription = $featureDescription; + $this->_featureName = $featureName; + } + + /** + * Implement this to extract the interesting feature. + * + * @param mixed $actual the target object + * + * @return mixed the feature to be matched + */ + abstract protected function featureValueOf($actual); + + public function matchesSafelyWithDiagnosticDescription($actual, Description $mismatchDescription) + { + $featureValue = $this->featureValueOf($actual); + + if (!$this->_subMatcher->matches($featureValue)) { + $mismatchDescription->appendText($this->_featureName) + ->appendText(' was ')->appendValue($featureValue); + + return false; + } + + return true; + } + + final public function describeTo(Description $description) + { + $description->appendText($this->_featureDescription)->appendText(' ') + ->appendDescriptionOf($this->_subMatcher) + ; + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Internal/SelfDescribingValue.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Internal/SelfDescribingValue.php new file mode 100644 index 0000000..995da71 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Internal/SelfDescribingValue.php @@ -0,0 +1,27 @@ +_value = $value; + } + + public function describeTo(Description $description) + { + $description->appendValue($this->_value); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Matcher.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Matcher.php new file mode 100644 index 0000000..e5dcf09 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Matcher.php @@ -0,0 +1,50 @@ + + * Matcher implementations should NOT directly implement this interface. + * Instead, extend the {@link Hamcrest\BaseMatcher} abstract class, + * which will ensure that the Matcher API can grow to support + * new features and remain compatible with all Matcher implementations. + *

+ * For easy access to common Matcher implementations, use the static factory + * methods in {@link Hamcrest\CoreMatchers}. + * + * @see Hamcrest\CoreMatchers + * @see Hamcrest\BaseMatcher + */ +interface Matcher extends SelfDescribing +{ + + /** + * Evaluates the matcher for argument $item. + * + * @param mixed $item the object against which the matcher is evaluated. + * + * @return boolean true if $item matches, + * otherwise false. + * + * @see Hamcrest\BaseMatcher + */ + public function matches($item); + + /** + * Generate a description of why the matcher has not accepted the item. + * The description will be part of a larger description of why a matching + * failed, so it should be concise. + * This method assumes that matches($item) is false, but + * will not check this. + * + * @param mixed $item The item that the Matcher has rejected. + * @param Description $description + * @return + */ + public function describeMismatch($item, Description $description); +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/MatcherAssert.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/MatcherAssert.php new file mode 100644 index 0000000..d546dbe --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/MatcherAssert.php @@ -0,0 +1,118 @@ + + * // With an identifier + * assertThat("apple flavour", $apple->flavour(), equalTo("tasty")); + * // Without an identifier + * assertThat($apple->flavour(), equalTo("tasty")); + * // Evaluating a boolean expression + * assertThat("some error", $a > $b); + * assertThat($a > $b); + * + */ + public static function assertThat(/* $args ... */) + { + $args = func_get_args(); + switch (count($args)) { + case 1: + self::$_count++; + if (!$args[0]) { + throw new AssertionError(); + } + break; + + case 2: + self::$_count++; + if ($args[1] instanceof Matcher) { + self::doAssert('', $args[0], $args[1]); + } elseif (!$args[1]) { + throw new AssertionError($args[0]); + } + break; + + case 3: + self::$_count++; + self::doAssert( + $args[0], + $args[1], + Util::wrapValueWithIsEqual($args[2]) + ); + break; + + default: + throw new \InvalidArgumentException('assertThat() requires one to three arguments'); + } + } + + /** + * Returns the number of assertions performed. + * + * @return int + */ + public static function getCount() + { + return self::$_count; + } + + /** + * Resets the number of assertions performed to zero. + */ + public static function resetCount() + { + self::$_count = 0; + } + + /** + * Performs the actual assertion logic. + * + * If $matcher doesn't match $actual, + * throws a {@link Hamcrest\AssertionError} with a description + * of the failure along with the optional $identifier. + * + * @param string $identifier added to the message upon failure + * @param mixed $actual value to compare against $matcher + * @param \Hamcrest\Matcher $matcher applied to $actual + * @throws AssertionError + */ + private static function doAssert($identifier, $actual, Matcher $matcher) + { + if (!$matcher->matches($actual)) { + $description = new StringDescription(); + if (!empty($identifier)) { + $description->appendText($identifier . PHP_EOL); + } + $description->appendText('Expected: ') + ->appendDescriptionOf($matcher) + ->appendText(PHP_EOL . ' but: '); + + $matcher->describeMismatch($actual, $description); + + throw new AssertionError((string) $description); + } + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Matchers.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Matchers.php new file mode 100644 index 0000000..23232e4 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Matchers.php @@ -0,0 +1,713 @@ + + * assertThat($string, both(containsString("a"))->andAlso(containsString("b"))); + * + */ + public static function both(\Hamcrest\Matcher $matcher) + { + return \Hamcrest\Core\CombinableMatcher::both($matcher); + } + + /** + * This is useful for fluently combining matchers where either may pass, + * for example: + *

+     *   assertThat($string, either(containsString("a"))->orElse(containsString("b")));
+     * 
+ */ + public static function either(\Hamcrest\Matcher $matcher) + { + return \Hamcrest\Core\CombinableMatcher::either($matcher); + } + + /** + * Wraps an existing matcher and overrides the description when it fails. + */ + public static function describedAs(/* args... */) + { + $args = func_get_args(); + return call_user_func_array(array('\Hamcrest\Core\DescribedAs', 'describedAs'), $args); + } + + /** + * @param Matcher $itemMatcher + * A matcher to apply to every element in an array. + * + * @return \Hamcrest\Core\Every + * Evaluates to TRUE for a collection in which every item matches $itemMatcher + */ + public static function everyItem(\Hamcrest\Matcher $itemMatcher) + { + return \Hamcrest\Core\Every::everyItem($itemMatcher); + } + + /** + * Does array size satisfy a given matcher? + */ + public static function hasToString($matcher) + { + return \Hamcrest\Core\HasToString::hasToString($matcher); + } + + /** + * Decorates another Matcher, retaining the behavior but allowing tests + * to be slightly more expressive. + * + * For example: assertThat($cheese, equalTo($smelly)) + * vs. assertThat($cheese, is(equalTo($smelly))) + */ + public static function is($value) + { + return \Hamcrest\Core\Is::is($value); + } + + /** + * This matcher always evaluates to true. + * + * @param string $description A meaningful string used when describing itself. + * + * @return \Hamcrest\Core\IsAnything + */ + public static function anything($description = 'ANYTHING') + { + return \Hamcrest\Core\IsAnything::anything($description); + } + + /** + * Test if the value is an array containing this matcher. + * + * Example: + *
+     * assertThat(array('a', 'b'), hasItem(equalTo('b')));
+     * //Convenience defaults to equalTo()
+     * assertThat(array('a', 'b'), hasItem('b'));
+     * 
+ */ + public static function hasItem(/* args... */) + { + $args = func_get_args(); + return call_user_func_array(array('\Hamcrest\Core\IsCollectionContaining', 'hasItem'), $args); + } + + /** + * Test if the value is an array containing elements that match all of these + * matchers. + * + * Example: + *
+     * assertThat(array('a', 'b', 'c'), hasItems(equalTo('a'), equalTo('b')));
+     * 
+ */ + public static function hasItems(/* args... */) + { + $args = func_get_args(); + return call_user_func_array(array('\Hamcrest\Core\IsCollectionContaining', 'hasItems'), $args); + } + + /** + * Is the value equal to another value, as tested by the use of the "==" + * comparison operator? + */ + public static function equalTo($item) + { + return \Hamcrest\Core\IsEqual::equalTo($item); + } + + /** + * Tests of the value is identical to $value as tested by the "===" operator. + */ + public static function identicalTo($value) + { + return \Hamcrest\Core\IsIdentical::identicalTo($value); + } + + /** + * Is the value an instance of a particular type? + * This version assumes no relationship between the required type and + * the signature of the method that sets it up, for example in + * assertThat($anObject, anInstanceOf('Thing')); + */ + public static function anInstanceOf($theClass) + { + return \Hamcrest\Core\IsInstanceOf::anInstanceOf($theClass); + } + + /** + * Is the value an instance of a particular type? + * This version assumes no relationship between the required type and + * the signature of the method that sets it up, for example in + * assertThat($anObject, anInstanceOf('Thing')); + */ + public static function any($theClass) + { + return \Hamcrest\Core\IsInstanceOf::anInstanceOf($theClass); + } + + /** + * Matches if value does not match $value. + */ + public static function not($value) + { + return \Hamcrest\Core\IsNot::not($value); + } + + /** + * Matches if value is null. + */ + public static function nullValue() + { + return \Hamcrest\Core\IsNull::nullValue(); + } + + /** + * Matches if value is not null. + */ + public static function notNullValue() + { + return \Hamcrest\Core\IsNull::notNullValue(); + } + + /** + * Creates a new instance of IsSame. + * + * @param mixed $object + * The predicate evaluates to true only when the argument is + * this object. + * + * @return \Hamcrest\Core\IsSame + */ + public static function sameInstance($object) + { + return \Hamcrest\Core\IsSame::sameInstance($object); + } + + /** + * Is the value a particular built-in type? + */ + public static function typeOf($theType) + { + return \Hamcrest\Core\IsTypeOf::typeOf($theType); + } + + /** + * Matches if value (class, object, or array) has named $property. + */ + public static function set($property) + { + return \Hamcrest\Core\Set::set($property); + } + + /** + * Matches if value (class, object, or array) does not have named $property. + */ + public static function notSet($property) + { + return \Hamcrest\Core\Set::notSet($property); + } + + /** + * Matches if value is a number equal to $value within some range of + * acceptable error $delta. + */ + public static function closeTo($value, $delta) + { + return \Hamcrest\Number\IsCloseTo::closeTo($value, $delta); + } + + /** + * The value is not > $value, nor < $value. + */ + public static function comparesEqualTo($value) + { + return \Hamcrest\Number\OrderingComparison::comparesEqualTo($value); + } + + /** + * The value is > $value. + */ + public static function greaterThan($value) + { + return \Hamcrest\Number\OrderingComparison::greaterThan($value); + } + + /** + * The value is >= $value. + */ + public static function greaterThanOrEqualTo($value) + { + return \Hamcrest\Number\OrderingComparison::greaterThanOrEqualTo($value); + } + + /** + * The value is >= $value. + */ + public static function atLeast($value) + { + return \Hamcrest\Number\OrderingComparison::greaterThanOrEqualTo($value); + } + + /** + * The value is < $value. + */ + public static function lessThan($value) + { + return \Hamcrest\Number\OrderingComparison::lessThan($value); + } + + /** + * The value is <= $value. + */ + public static function lessThanOrEqualTo($value) + { + return \Hamcrest\Number\OrderingComparison::lessThanOrEqualTo($value); + } + + /** + * The value is <= $value. + */ + public static function atMost($value) + { + return \Hamcrest\Number\OrderingComparison::lessThanOrEqualTo($value); + } + + /** + * Matches if value is a zero-length string. + */ + public static function isEmptyString() + { + return \Hamcrest\Text\IsEmptyString::isEmptyString(); + } + + /** + * Matches if value is a zero-length string. + */ + public static function emptyString() + { + return \Hamcrest\Text\IsEmptyString::isEmptyString(); + } + + /** + * Matches if value is null or a zero-length string. + */ + public static function isEmptyOrNullString() + { + return \Hamcrest\Text\IsEmptyString::isEmptyOrNullString(); + } + + /** + * Matches if value is null or a zero-length string. + */ + public static function nullOrEmptyString() + { + return \Hamcrest\Text\IsEmptyString::isEmptyOrNullString(); + } + + /** + * Matches if value is a non-zero-length string. + */ + public static function isNonEmptyString() + { + return \Hamcrest\Text\IsEmptyString::isNonEmptyString(); + } + + /** + * Matches if value is a non-zero-length string. + */ + public static function nonEmptyString() + { + return \Hamcrest\Text\IsEmptyString::isNonEmptyString(); + } + + /** + * Matches if value is a string equal to $string, regardless of the case. + */ + public static function equalToIgnoringCase($string) + { + return \Hamcrest\Text\IsEqualIgnoringCase::equalToIgnoringCase($string); + } + + /** + * Matches if value is a string equal to $string, regardless of whitespace. + */ + public static function equalToIgnoringWhiteSpace($string) + { + return \Hamcrest\Text\IsEqualIgnoringWhiteSpace::equalToIgnoringWhiteSpace($string); + } + + /** + * Matches if value is a string that matches regular expression $pattern. + */ + public static function matchesPattern($pattern) + { + return \Hamcrest\Text\MatchesPattern::matchesPattern($pattern); + } + + /** + * Matches if value is a string that contains $substring. + */ + public static function containsString($substring) + { + return \Hamcrest\Text\StringContains::containsString($substring); + } + + /** + * Matches if value is a string that contains $substring regardless of the case. + */ + public static function containsStringIgnoringCase($substring) + { + return \Hamcrest\Text\StringContainsIgnoringCase::containsStringIgnoringCase($substring); + } + + /** + * Matches if value contains $substrings in a constrained order. + */ + public static function stringContainsInOrder(/* args... */) + { + $args = func_get_args(); + return call_user_func_array(array('\Hamcrest\Text\StringContainsInOrder', 'stringContainsInOrder'), $args); + } + + /** + * Matches if value is a string that ends with $substring. + */ + public static function endsWith($substring) + { + return \Hamcrest\Text\StringEndsWith::endsWith($substring); + } + + /** + * Matches if value is a string that starts with $substring. + */ + public static function startsWith($substring) + { + return \Hamcrest\Text\StringStartsWith::startsWith($substring); + } + + /** + * Is the value an array? + */ + public static function arrayValue() + { + return \Hamcrest\Type\IsArray::arrayValue(); + } + + /** + * Is the value a boolean? + */ + public static function booleanValue() + { + return \Hamcrest\Type\IsBoolean::booleanValue(); + } + + /** + * Is the value a boolean? + */ + public static function boolValue() + { + return \Hamcrest\Type\IsBoolean::booleanValue(); + } + + /** + * Is the value callable? + */ + public static function callableValue() + { + return \Hamcrest\Type\IsCallable::callableValue(); + } + + /** + * Is the value a float/double? + */ + public static function doubleValue() + { + return \Hamcrest\Type\IsDouble::doubleValue(); + } + + /** + * Is the value a float/double? + */ + public static function floatValue() + { + return \Hamcrest\Type\IsDouble::doubleValue(); + } + + /** + * Is the value an integer? + */ + public static function integerValue() + { + return \Hamcrest\Type\IsInteger::integerValue(); + } + + /** + * Is the value an integer? + */ + public static function intValue() + { + return \Hamcrest\Type\IsInteger::integerValue(); + } + + /** + * Is the value a numeric? + */ + public static function numericValue() + { + return \Hamcrest\Type\IsNumeric::numericValue(); + } + + /** + * Is the value an object? + */ + public static function objectValue() + { + return \Hamcrest\Type\IsObject::objectValue(); + } + + /** + * Is the value an object? + */ + public static function anObject() + { + return \Hamcrest\Type\IsObject::objectValue(); + } + + /** + * Is the value a resource? + */ + public static function resourceValue() + { + return \Hamcrest\Type\IsResource::resourceValue(); + } + + /** + * Is the value a scalar (boolean, integer, double, or string)? + */ + public static function scalarValue() + { + return \Hamcrest\Type\IsScalar::scalarValue(); + } + + /** + * Is the value a string? + */ + public static function stringValue() + { + return \Hamcrest\Type\IsString::stringValue(); + } + + /** + * Wraps $matcher with {@link Hamcrest\Core\IsEqual) + * if it's not a matcher and the XPath in count() + * if it's an integer. + */ + public static function hasXPath($xpath, $matcher = null) + { + return \Hamcrest\Xml\HasXPath::hasXPath($xpath, $matcher); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/NullDescription.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/NullDescription.php new file mode 100644 index 0000000..aae8e46 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/NullDescription.php @@ -0,0 +1,43 @@ +_value = $value; + $this->_delta = $delta; + } + + protected function matchesSafely($item) + { + return $this->_actualDelta($item) <= 0.0; + } + + protected function describeMismatchSafely($item, Description $mismatchDescription) + { + $mismatchDescription->appendValue($item) + ->appendText(' differed by ') + ->appendValue($this->_actualDelta($item)) + ; + } + + public function describeTo(Description $description) + { + $description->appendText('a numeric value within ') + ->appendValue($this->_delta) + ->appendText(' of ') + ->appendValue($this->_value) + ; + } + + /** + * Matches if value is a number equal to $value within some range of + * acceptable error $delta. + * + * @factory + */ + public static function closeTo($value, $delta) + { + return new self($value, $delta); + } + + // -- Private Methods + + private function _actualDelta($item) + { + return (abs(($item - $this->_value)) - $this->_delta); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Number/OrderingComparison.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Number/OrderingComparison.php new file mode 100644 index 0000000..369d0cf --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Number/OrderingComparison.php @@ -0,0 +1,132 @@ +_value = $value; + $this->_minCompare = $minCompare; + $this->_maxCompare = $maxCompare; + } + + protected function matchesSafely($other) + { + $compare = $this->_compare($this->_value, $other); + + return ($this->_minCompare <= $compare) && ($compare <= $this->_maxCompare); + } + + protected function describeMismatchSafely($item, Description $mismatchDescription) + { + $mismatchDescription + ->appendValue($item)->appendText(' was ') + ->appendText($this->_comparison($this->_compare($this->_value, $item))) + ->appendText(' ')->appendValue($this->_value) + ; + } + + public function describeTo(Description $description) + { + $description->appendText('a value ') + ->appendText($this->_comparison($this->_minCompare)) + ; + if ($this->_minCompare != $this->_maxCompare) { + $description->appendText(' or ') + ->appendText($this->_comparison($this->_maxCompare)) + ; + } + $description->appendText(' ')->appendValue($this->_value); + } + + /** + * The value is not > $value, nor < $value. + * + * @factory + */ + public static function comparesEqualTo($value) + { + return new self($value, 0, 0); + } + + /** + * The value is > $value. + * + * @factory + */ + public static function greaterThan($value) + { + return new self($value, -1, -1); + } + + /** + * The value is >= $value. + * + * @factory atLeast + */ + public static function greaterThanOrEqualTo($value) + { + return new self($value, -1, 0); + } + + /** + * The value is < $value. + * + * @factory + */ + public static function lessThan($value) + { + return new self($value, 1, 1); + } + + /** + * The value is <= $value. + * + * @factory atMost + */ + public static function lessThanOrEqualTo($value) + { + return new self($value, 0, 1); + } + + // -- Private Methods + + private function _compare($left, $right) + { + $a = $left; + $b = $right; + + if ($a < $b) { + return -1; + } elseif ($a == $b) { + return 0; + } else { + return 1; + } + } + + private function _comparison($compare) + { + if ($compare > 0) { + return 'less than'; + } elseif ($compare == 0) { + return 'equal to'; + } else { + return 'greater than'; + } + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/SelfDescribing.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/SelfDescribing.php new file mode 100644 index 0000000..872fdf9 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/SelfDescribing.php @@ -0,0 +1,23 @@ +_out = (string) $out; + } + + public function __toString() + { + return $this->_out; + } + + /** + * Return the description of a {@link Hamcrest\SelfDescribing} object as a + * String. + * + * @param \Hamcrest\SelfDescribing $selfDescribing + * The object to be described. + * + * @return string + * The description of the object. + */ + public static function toString(SelfDescribing $selfDescribing) + { + $self = new self(); + + return (string) $self->appendDescriptionOf($selfDescribing); + } + + /** + * Alias for {@link toString()}. + */ + public static function asString(SelfDescribing $selfDescribing) + { + return self::toString($selfDescribing); + } + + // -- Protected Methods + + protected function append($str) + { + $this->_out .= $str; + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEmptyString.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEmptyString.php new file mode 100644 index 0000000..2ae61b9 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEmptyString.php @@ -0,0 +1,85 @@ +_empty = $empty; + } + + public function matches($item) + { + return $this->_empty + ? ($item === '') + : is_string($item) && $item !== ''; + } + + public function describeTo(Description $description) + { + $description->appendText($this->_empty ? 'an empty string' : 'a non-empty string'); + } + + /** + * Matches if value is a zero-length string. + * + * @factory emptyString + */ + public static function isEmptyString() + { + if (!self::$_INSTANCE) { + self::$_INSTANCE = new self(true); + } + + return self::$_INSTANCE; + } + + /** + * Matches if value is null or a zero-length string. + * + * @factory nullOrEmptyString + */ + public static function isEmptyOrNullString() + { + if (!self::$_NULL_OR_EMPTY_INSTANCE) { + self::$_NULL_OR_EMPTY_INSTANCE = AnyOf::anyOf( + IsNull::nullvalue(), + self::isEmptyString() + ); + } + + return self::$_NULL_OR_EMPTY_INSTANCE; + } + + /** + * Matches if value is a non-zero-length string. + * + * @factory nonEmptyString + */ + public static function isNonEmptyString() + { + if (!self::$_NOT_INSTANCE) { + self::$_NOT_INSTANCE = new self(false); + } + + return self::$_NOT_INSTANCE; + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEqualIgnoringCase.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEqualIgnoringCase.php new file mode 100644 index 0000000..3836a8c --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEqualIgnoringCase.php @@ -0,0 +1,52 @@ +_string = $string; + } + + protected function matchesSafely($item) + { + return strtolower($this->_string) === strtolower($item); + } + + protected function describeMismatchSafely($item, Description $mismatchDescription) + { + $mismatchDescription->appendText('was ')->appendText($item); + } + + public function describeTo(Description $description) + { + $description->appendText('equalToIgnoringCase(') + ->appendValue($this->_string) + ->appendText(')') + ; + } + + /** + * Matches if value is a string equal to $string, regardless of the case. + * + * @factory + */ + public static function equalToIgnoringCase($string) + { + return new self($string); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEqualIgnoringWhiteSpace.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEqualIgnoringWhiteSpace.php new file mode 100644 index 0000000..853692b --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEqualIgnoringWhiteSpace.php @@ -0,0 +1,66 @@ +_string = $string; + } + + protected function matchesSafely($item) + { + return (strtolower($this->_stripSpace($item)) + === strtolower($this->_stripSpace($this->_string))); + } + + protected function describeMismatchSafely($item, Description $mismatchDescription) + { + $mismatchDescription->appendText('was ')->appendText($item); + } + + public function describeTo(Description $description) + { + $description->appendText('equalToIgnoringWhiteSpace(') + ->appendValue($this->_string) + ->appendText(')') + ; + } + + /** + * Matches if value is a string equal to $string, regardless of whitespace. + * + * @factory + */ + public static function equalToIgnoringWhiteSpace($string) + { + return new self($string); + } + + // -- Private Methods + + private function _stripSpace($string) + { + $parts = preg_split("/[\r\n\t ]+/", $string); + foreach ($parts as $i => $part) { + $parts[$i] = trim($part, " \r\n\t"); + } + + return trim(implode(' ', $parts), " \r\n\t"); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/MatchesPattern.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/MatchesPattern.php new file mode 100644 index 0000000..fa0d68e --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/MatchesPattern.php @@ -0,0 +1,40 @@ +_substring, (string) $item) >= 1; + } + + protected function relationship() + { + return 'matching'; + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContains.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContains.php new file mode 100644 index 0000000..b92786b --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContains.php @@ -0,0 +1,45 @@ +_substring); + } + + /** + * Matches if value is a string that contains $substring. + * + * @factory + */ + public static function containsString($substring) + { + return new self($substring); + } + + // -- Protected Methods + + protected function evalSubstringOf($item) + { + return (false !== strpos((string) $item, $this->_substring)); + } + + protected function relationship() + { + return 'containing'; + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContainsIgnoringCase.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContainsIgnoringCase.php new file mode 100644 index 0000000..69f37c2 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContainsIgnoringCase.php @@ -0,0 +1,40 @@ +_substring)); + } + + protected function relationship() + { + return 'containing in any case'; + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContainsInOrder.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContainsInOrder.php new file mode 100644 index 0000000..e75de65 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContainsInOrder.php @@ -0,0 +1,66 @@ +_substrings = $substrings; + } + + protected function matchesSafely($item) + { + $fromIndex = 0; + + foreach ($this->_substrings as $substring) { + if (false === $fromIndex = strpos($item, $substring, $fromIndex)) { + return false; + } + } + + return true; + } + + protected function describeMismatchSafely($item, Description $mismatchDescription) + { + $mismatchDescription->appendText('was ')->appendText($item); + } + + public function describeTo(Description $description) + { + $description->appendText('a string containing ') + ->appendValueList('', ', ', '', $this->_substrings) + ->appendText(' in order') + ; + } + + /** + * Matches if value contains $substrings in a constrained order. + * + * @factory ... + */ + public static function stringContainsInOrder(/* args... */) + { + $args = func_get_args(); + + if (isset($args[0]) && is_array($args[0])) { + $args = $args[0]; + } + + return new self($args); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringEndsWith.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringEndsWith.php new file mode 100644 index 0000000..f802ee4 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringEndsWith.php @@ -0,0 +1,40 @@ +_substring))) === $this->_substring); + } + + protected function relationship() + { + return 'ending with'; + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringStartsWith.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringStartsWith.php new file mode 100644 index 0000000..79c9565 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringStartsWith.php @@ -0,0 +1,40 @@ +_substring)) === $this->_substring); + } + + protected function relationship() + { + return 'starting with'; + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/SubstringMatcher.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/SubstringMatcher.php new file mode 100644 index 0000000..e560ad6 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/SubstringMatcher.php @@ -0,0 +1,45 @@ +_substring = $substring; + } + + protected function matchesSafely($item) + { + return $this->evalSubstringOf($item); + } + + protected function describeMismatchSafely($item, Description $mismatchDescription) + { + $mismatchDescription->appendText('was "')->appendText($item)->appendText('"'); + } + + public function describeTo(Description $description) + { + $description->appendText('a string ') + ->appendText($this->relationship()) + ->appendText(' ') + ->appendValue($this->_substring) + ; + } + + abstract protected function evalSubstringOf($string); + + abstract protected function relationship(); +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsArray.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsArray.php new file mode 100644 index 0000000..9179102 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsArray.php @@ -0,0 +1,32 @@ +matchesSafelyWithDiagnosticDescription($item, new NullDescription()); + } + + final public function describeMismatchSafely($item, Description $mismatchDescription) + { + $this->matchesSafelyWithDiagnosticDescription($item, $mismatchDescription); + } + + // -- Protected Methods + + /** + * Subclasses should implement these. The item will already have been checked for + * the specific type. + */ + abstract protected function matchesSafelyWithDiagnosticDescription($item, Description $mismatchDescription); +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/TypeSafeMatcher.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/TypeSafeMatcher.php new file mode 100644 index 0000000..56e299a --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/TypeSafeMatcher.php @@ -0,0 +1,107 @@ +_expectedType = $expectedType; + $this->_expectedSubtype = $expectedSubtype; + } + + final public function matches($item) + { + return $this->_isSafeType($item) && $this->matchesSafely($item); + } + + final public function describeMismatch($item, Description $mismatchDescription) + { + if (!$this->_isSafeType($item)) { + parent::describeMismatch($item, $mismatchDescription); + } else { + $this->describeMismatchSafely($item, $mismatchDescription); + } + } + + // -- Protected Methods + + /** + * The item will already have been checked for the specific type and subtype. + */ + abstract protected function matchesSafely($item); + + /** + * The item will already have been checked for the specific type and subtype. + */ + abstract protected function describeMismatchSafely($item, Description $mismatchDescription); + + // -- Private Methods + + private function _isSafeType($value) + { + switch ($this->_expectedType) { + + case self::TYPE_ANY: + return true; + + case self::TYPE_STRING: + return is_string($value) || is_numeric($value); + + case self::TYPE_NUMERIC: + return is_numeric($value) || is_string($value); + + case self::TYPE_ARRAY: + return is_array($value); + + case self::TYPE_OBJECT: + return is_object($value) + && ($this->_expectedSubtype === null + || $value instanceof $this->_expectedSubtype); + + case self::TYPE_RESOURCE: + return is_resource($value) + && ($this->_expectedSubtype === null + || get_resource_type($value) == $this->_expectedSubtype); + + case self::TYPE_BOOLEAN: + return true; + + default: + return true; + + } + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Util.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Util.php new file mode 100644 index 0000000..50f9201 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Util.php @@ -0,0 +1,72 @@ + all items are + */ + public static function createMatcherArray(array $items) + { + //Extract single array item + if (count($items) == 1 && is_array($items[0])) { + $items = $items[0]; + } + + //Replace non-matchers + foreach ($items as &$item) { + if (!($item instanceof Matcher)) { + $item = Core\IsEqual::equalTo($item); + } + } + + return $items; + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Xml/HasXPath.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Xml/HasXPath.php new file mode 100644 index 0000000..d9764e4 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Xml/HasXPath.php @@ -0,0 +1,195 @@ +_xpath = $xpath; + $this->_matcher = $matcher; + } + + /** + * Matches if the XPath matches against the DOM node and the matcher. + * + * @param string|\DOMNode $actual + * @param Description $mismatchDescription + * @return bool + */ + protected function matchesWithDiagnosticDescription($actual, Description $mismatchDescription) + { + if (is_string($actual)) { + $actual = $this->createDocument($actual); + } elseif (!$actual instanceof \DOMNode) { + $mismatchDescription->appendText('was ')->appendValue($actual); + + return false; + } + $result = $this->evaluate($actual); + if ($result instanceof \DOMNodeList) { + return $this->matchesContent($result, $mismatchDescription); + } else { + return $this->matchesExpression($result, $mismatchDescription); + } + } + + /** + * Creates and returns a DOMDocument from the given + * XML or HTML string. + * + * @param string $text + * @return \DOMDocument built from $text + * @throws \InvalidArgumentException if the document is not valid + */ + protected function createDocument($text) + { + $document = new \DOMDocument(); + if (preg_match('/^\s*<\?xml/', $text)) { + if (!@$document->loadXML($text)) { + throw new \InvalidArgumentException('Must pass a valid XML document'); + } + } else { + if (!@$document->loadHTML($text)) { + throw new \InvalidArgumentException('Must pass a valid HTML or XHTML document'); + } + } + + return $document; + } + + /** + * Applies the configured XPath to the DOM node and returns either + * the result if it's an expression or the node list if it's a query. + * + * @param \DOMNode $node context from which to issue query + * @return mixed result of expression or DOMNodeList from query + */ + protected function evaluate(\DOMNode $node) + { + if ($node instanceof \DOMDocument) { + $xpathDocument = new \DOMXPath($node); + + return $xpathDocument->evaluate($this->_xpath); + } else { + $xpathDocument = new \DOMXPath($node->ownerDocument); + + return $xpathDocument->evaluate($this->_xpath, $node); + } + } + + /** + * Matches if the list of nodes is not empty and the content of at least + * one node matches the configured matcher, if supplied. + * + * @param \DOMNodeList $nodes selected by the XPath query + * @param Description $mismatchDescription + * @return bool + */ + protected function matchesContent(\DOMNodeList $nodes, Description $mismatchDescription) + { + if ($nodes->length == 0) { + $mismatchDescription->appendText('XPath returned no results'); + } elseif ($this->_matcher === null) { + return true; + } else { + foreach ($nodes as $node) { + if ($this->_matcher->matches($node->textContent)) { + return true; + } + } + $content = array(); + foreach ($nodes as $node) { + $content[] = $node->textContent; + } + $mismatchDescription->appendText('XPath returned ') + ->appendValue($content); + } + + return false; + } + + /** + * Matches if the result of the XPath expression matches the configured + * matcher or evaluates to true if there is none. + * + * @param mixed $result result of the XPath expression + * @param Description $mismatchDescription + * @return bool + */ + protected function matchesExpression($result, Description $mismatchDescription) + { + if ($this->_matcher === null) { + if ($result) { + return true; + } + $mismatchDescription->appendText('XPath expression result was ') + ->appendValue($result); + } else { + if ($this->_matcher->matches($result)) { + return true; + } + $mismatchDescription->appendText('XPath expression result '); + $this->_matcher->describeMismatch($result, $mismatchDescription); + } + + return false; + } + + public function describeTo(Description $description) + { + $description->appendText('XML or HTML document with XPath "') + ->appendText($this->_xpath) + ->appendText('"'); + if ($this->_matcher !== null) { + $description->appendText(' '); + $this->_matcher->describeTo($description); + } + } + + /** + * Wraps $matcher with {@link Hamcrest\Core\IsEqual) + * if it's not a matcher and the XPath in count() + * if it's an integer. + * + * @factory + */ + public static function hasXPath($xpath, $matcher = null) + { + if ($matcher === null || $matcher instanceof Matcher) { + return new self($xpath, $matcher); + } elseif (is_int($matcher) && strpos($xpath, 'count(') !== 0) { + $xpath = 'count(' . $xpath . ')'; + } + + return new self($xpath, IsEqual::equalTo($matcher)); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/AbstractMatcherTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/AbstractMatcherTest.php new file mode 100644 index 0000000..6c52c0e --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/AbstractMatcherTest.php @@ -0,0 +1,66 @@ +assertTrue($matcher->matches($arg), $message); + } + + public function assertDoesNotMatch(\Hamcrest\Matcher $matcher, $arg, $message) + { + $this->assertFalse($matcher->matches($arg), $message); + } + + public function assertDescription($expected, \Hamcrest\Matcher $matcher) + { + $description = new \Hamcrest\StringDescription(); + $description->appendDescriptionOf($matcher); + $this->assertEquals($expected, (string) $description, 'Expected description'); + } + + public function assertMismatchDescription($expected, \Hamcrest\Matcher $matcher, $arg) + { + $description = new \Hamcrest\StringDescription(); + $this->assertFalse( + $matcher->matches($arg), + 'Precondtion: Matcher should not match item' + ); + $matcher->describeMismatch($arg, $description); + $this->assertEquals( + $expected, + (string) $description, + 'Expected mismatch description' + ); + } + + public function testIsNullSafe() + { + //Should not generate any notices + $this->createMatcher()->matches(null); + $this->createMatcher()->describeMismatch( + null, + new \Hamcrest\NullDescription() + ); + } + + public function testCopesWithUnknownTypes() + { + //Should not generate any notices + $this->createMatcher()->matches(new UnknownType()); + $this->createMatcher()->describeMismatch( + new UnknownType(), + new NullDescription() + ); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingInAnyOrderTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingInAnyOrderTest.php new file mode 100644 index 0000000..45d9f13 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingInAnyOrderTest.php @@ -0,0 +1,54 @@ +assertDescription('[<1>, <2>] in any order', containsInAnyOrder(array(1, 2))); + } + + public function testMatchesItemsInAnyOrder() + { + $this->assertMatches(containsInAnyOrder(array(1, 2, 3)), array(1, 2, 3), 'in order'); + $this->assertMatches(containsInAnyOrder(array(1, 2, 3)), array(3, 2, 1), 'out of order'); + $this->assertMatches(containsInAnyOrder(array(1)), array(1), 'single'); + } + + public function testAppliesMatchersInAnyOrder() + { + $this->assertMatches( + containsInAnyOrder(array(1, 2, 3)), + array(1, 2, 3), + 'in order' + ); + $this->assertMatches( + containsInAnyOrder(array(1, 2, 3)), + array(3, 2, 1), + 'out of order' + ); + $this->assertMatches( + containsInAnyOrder(array(1)), + array(1), + 'single' + ); + } + + public function testMismatchesItemsInAnyOrder() + { + $matcher = containsInAnyOrder(array(1, 2, 3)); + + $this->assertMismatchDescription('was null', $matcher, null); + $this->assertMismatchDescription('No item matches: <1>, <2>, <3> in []', $matcher, array()); + $this->assertMismatchDescription('No item matches: <2>, <3> in [<1>]', $matcher, array(1)); + $this->assertMismatchDescription('Not matched: <4>', $matcher, array(4, 3, 2, 1)); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingInOrderTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingInOrderTest.php new file mode 100644 index 0000000..1868343 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingInOrderTest.php @@ -0,0 +1,44 @@ +assertDescription('[<1>, <2>]', arrayContaining(array(1, 2))); + } + + public function testMatchesItemsInOrder() + { + $this->assertMatches(arrayContaining(array(1, 2, 3)), array(1, 2, 3), 'in order'); + $this->assertMatches(arrayContaining(array(1)), array(1), 'single'); + } + + public function testAppliesMatchersInOrder() + { + $this->assertMatches( + arrayContaining(array(1, 2, 3)), + array(1, 2, 3), + 'in order' + ); + $this->assertMatches(arrayContaining(array(1)), array(1), 'single'); + } + + public function testMismatchesItemsInAnyOrder() + { + $matcher = arrayContaining(array(1, 2, 3)); + $this->assertMismatchDescription('was null', $matcher, null); + $this->assertMismatchDescription('No item matched: <1>', $matcher, array()); + $this->assertMismatchDescription('No item matched: <2>', $matcher, array(1)); + $this->assertMismatchDescription('item with key 0: was <4>', $matcher, array(4, 3, 2, 1)); + $this->assertMismatchDescription('item with key 2: was <4>', $matcher, array(1, 2, 4)); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingKeyTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingKeyTest.php new file mode 100644 index 0000000..31770d8 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingKeyTest.php @@ -0,0 +1,62 @@ +1); + + $this->assertMatches(hasKey('a'), $array, 'Matches single key'); + } + + public function testMatchesArrayContainingKey() + { + $array = array('a'=>1, 'b'=>2, 'c'=>3); + + $this->assertMatches(hasKey('a'), $array, 'Matches a'); + $this->assertMatches(hasKey('c'), $array, 'Matches c'); + } + + public function testMatchesArrayContainingKeyWithIntegerKeys() + { + $array = array(1=>'A', 2=>'B'); + + assertThat($array, hasKey(1)); + } + + public function testMatchesArrayContainingKeyWithNumberKeys() + { + $array = array(1=>'A', 2=>'B'); + + assertThat($array, hasKey(1)); + + // very ugly version! + assertThat($array, IsArrayContainingKey::hasKeyInArray(2)); + } + + public function testHasReadableDescription() + { + $this->assertDescription('array with key "a"', hasKey('a')); + } + + public function testDoesNotMatchEmptyArray() + { + $this->assertMismatchDescription('array was []', hasKey('Foo'), array()); + } + + public function testDoesNotMatchArrayMissingKey() + { + $array = array('a'=>1, 'b'=>2, 'c'=>3); + + $this->assertMismatchDescription('array was ["a" => <1>, "b" => <2>, "c" => <3>]', hasKey('d'), $array); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingKeyValuePairTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingKeyValuePairTest.php new file mode 100644 index 0000000..a415f9f --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingKeyValuePairTest.php @@ -0,0 +1,36 @@ +1, 'b'=>2); + + $this->assertMatches(hasKeyValuePair(equalTo('a'), equalTo(1)), $array, 'matcherA'); + $this->assertMatches(hasKeyValuePair(equalTo('b'), equalTo(2)), $array, 'matcherB'); + $this->assertMismatchDescription( + 'array was ["a" => <1>, "b" => <2>]', + hasKeyValuePair(equalTo('c'), equalTo(3)), + $array + ); + } + + public function testDoesNotMatchNull() + { + $this->assertMismatchDescription('was null', hasKeyValuePair(anything(), anything()), null); + } + + public function testHasReadableDescription() + { + $this->assertDescription('array containing ["a" => <2>]', hasKeyValuePair(equalTo('a'), equalTo(2))); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingTest.php new file mode 100644 index 0000000..8d5bd81 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingTest.php @@ -0,0 +1,50 @@ +assertMatches( + hasItemInArray('a'), + array('a', 'b', 'c'), + "should matches array that contains 'a'" + ); + } + + public function testDoesNotMatchAnArrayThatDoesntContainAnElementMatchingTheGivenMatcher() + { + $this->assertDoesNotMatch( + hasItemInArray('a'), + array('b', 'c'), + "should not matches array that doesn't contain 'a'" + ); + $this->assertDoesNotMatch( + hasItemInArray('a'), + array(), + 'should not match empty array' + ); + } + + public function testDoesNotMatchNull() + { + $this->assertDoesNotMatch( + hasItemInArray('a'), + null, + 'should not match null' + ); + } + + public function testHasAReadableDescription() + { + $this->assertDescription('an array containing "a"', hasItemInArray('a')); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayTest.php new file mode 100644 index 0000000..e4db53e --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayTest.php @@ -0,0 +1,89 @@ +assertMatches( + anArray(array(equalTo('a'), equalTo('b'), equalTo('c'))), + array('a', 'b', 'c'), + 'should match array with matching elements' + ); + } + + public function testDoesNotMatchAnArrayWhenElementsDoNotMatch() + { + $this->assertDoesNotMatch( + anArray(array(equalTo('a'), equalTo('b'))), + array('b', 'c'), + 'should not match array with different elements' + ); + } + + public function testDoesNotMatchAnArrayOfDifferentSize() + { + $this->assertDoesNotMatch( + anArray(array(equalTo('a'), equalTo('b'))), + array('a', 'b', 'c'), + 'should not match larger array' + ); + $this->assertDoesNotMatch( + anArray(array(equalTo('a'), equalTo('b'))), + array('a'), + 'should not match smaller array' + ); + } + + public function testDoesNotMatchNull() + { + $this->assertDoesNotMatch( + anArray(array(equalTo('a'))), + null, + 'should not match null' + ); + } + + public function testHasAReadableDescription() + { + $this->assertDescription( + '["a", "b"]', + anArray(array(equalTo('a'), equalTo('b'))) + ); + } + + public function testHasAReadableMismatchDescriptionWhenKeysDontMatch() + { + $this->assertMismatchDescription( + 'array keys were [<1>, <2>]', + anArray(array(equalTo('a'), equalTo('b'))), + array(1 => 'a', 2 => 'b') + ); + } + + public function testSupportsMatchesAssociativeArrays() + { + $this->assertMatches( + anArray(array('x'=>equalTo('a'), 'y'=>equalTo('b'), 'z'=>equalTo('c'))), + array('x'=>'a', 'y'=>'b', 'z'=>'c'), + 'should match associative array with matching elements' + ); + } + + public function testDoesNotMatchAnAssociativeArrayWhenKeysDoNotMatch() + { + $this->assertDoesNotMatch( + anArray(array('x'=>equalTo('a'), 'y'=>equalTo('b'))), + array('x'=>'b', 'z'=>'c'), + 'should not match array with different keys' + ); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayWithSizeTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayWithSizeTest.php new file mode 100644 index 0000000..8413c89 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayWithSizeTest.php @@ -0,0 +1,37 @@ +assertMatches(arrayWithSize(equalTo(3)), array(1, 2, 3), 'correct size'); + $this->assertDoesNotMatch(arrayWithSize(equalTo(2)), array(1, 2, 3), 'incorrect size'); + } + + public function testProvidesConvenientShortcutForArrayWithSizeEqualTo() + { + $this->assertMatches(arrayWithSize(3), array(1, 2, 3), 'correct size'); + $this->assertDoesNotMatch(arrayWithSize(2), array(1, 2, 3), 'incorrect size'); + } + + public function testEmptyArray() + { + $this->assertMatches(emptyArray(), array(), 'correct size'); + $this->assertDoesNotMatch(emptyArray(), array(1), 'incorrect size'); + } + + public function testHasAReadableDescription() + { + $this->assertDescription('an array with size <3>', arrayWithSize(equalTo(3))); + $this->assertDescription('an empty array', emptyArray()); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/BaseMatcherTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/BaseMatcherTest.php new file mode 100644 index 0000000..833e2c3 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/BaseMatcherTest.php @@ -0,0 +1,23 @@ +appendText('SOME DESCRIPTION'); + } + + public function testDescribesItselfWithToStringMethod() + { + $someMatcher = new \Hamcrest\SomeMatcher(); + $this->assertEquals('SOME DESCRIPTION', (string) $someMatcher); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Collection/IsEmptyTraversableTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Collection/IsEmptyTraversableTest.php new file mode 100644 index 0000000..2f15fb4 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Collection/IsEmptyTraversableTest.php @@ -0,0 +1,77 @@ +assertMatches( + emptyTraversable(), + new \ArrayObject(array()), + 'an empty traversable' + ); + } + + public function testEmptyMatcherDoesNotMatchWhenNotEmpty() + { + $this->assertDoesNotMatch( + emptyTraversable(), + new \ArrayObject(array(1, 2, 3)), + 'a non-empty traversable' + ); + } + + public function testEmptyMatcherDoesNotMatchNull() + { + $this->assertDoesNotMatch( + emptyTraversable(), + null, + 'should not match null' + ); + } + + public function testEmptyMatcherHasAReadableDescription() + { + $this->assertDescription('an empty traversable', emptyTraversable()); + } + + public function testNonEmptyDoesNotMatchNull() + { + $this->assertDoesNotMatch( + nonEmptyTraversable(), + null, + 'should not match null' + ); + } + + public function testNonEmptyDoesNotMatchWhenEmpty() + { + $this->assertDoesNotMatch( + nonEmptyTraversable(), + new \ArrayObject(array()), + 'an empty traversable' + ); + } + + public function testNonEmptyMatchesWhenNotEmpty() + { + $this->assertMatches( + nonEmptyTraversable(), + new \ArrayObject(array(1, 2, 3)), + 'a non-empty traversable' + ); + } + + public function testNonEmptyNonEmptyMatcherHasAReadableDescription() + { + $this->assertDescription('a non-empty traversable', nonEmptyTraversable()); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Collection/IsTraversableWithSizeTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Collection/IsTraversableWithSizeTest.php new file mode 100644 index 0000000..c1c67a7 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Collection/IsTraversableWithSizeTest.php @@ -0,0 +1,57 @@ +assertMatches( + traversableWithSize(equalTo(3)), + new \ArrayObject(array(1, 2, 3)), + 'correct size' + ); + } + + public function testDoesNotMatchWhenSizeIsIncorrect() + { + $this->assertDoesNotMatch( + traversableWithSize(equalTo(2)), + new \ArrayObject(array(1, 2, 3)), + 'incorrect size' + ); + } + + public function testDoesNotMatchNull() + { + $this->assertDoesNotMatch( + traversableWithSize(3), + null, + 'should not match null' + ); + } + + public function testProvidesConvenientShortcutForTraversableWithSizeEqualTo() + { + $this->assertMatches( + traversableWithSize(3), + new \ArrayObject(array(1, 2, 3)), + 'correct size' + ); + } + + public function testHasAReadableDescription() + { + $this->assertDescription( + 'a traversable with size <3>', + traversableWithSize(equalTo(3)) + ); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/AllOfTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/AllOfTest.php new file mode 100644 index 0000000..86b8c27 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/AllOfTest.php @@ -0,0 +1,56 @@ +assertDescription( + '("good" and "bad" and "ugly")', + allOf('good', 'bad', 'ugly') + ); + } + + public function testMismatchDescriptionDescribesFirstFailingMatch() + { + $this->assertMismatchDescription( + '"good" was "bad"', + allOf('bad', 'good'), + 'bad' + ); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/AnyOfTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/AnyOfTest.php new file mode 100644 index 0000000..3d62b93 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/AnyOfTest.php @@ -0,0 +1,79 @@ +assertDescription( + '("good" or "bad" or "ugly")', + anyOf('good', 'bad', 'ugly') + ); + } + + public function testNoneOfEvaluatesToTheLogicalDisjunctionOfTwoOtherMatchers() + { + assertThat('good', not(noneOf('bad', 'good'))); + assertThat('good', not(noneOf('good', 'good'))); + assertThat('good', not(noneOf('good', 'bad'))); + + assertThat('good', noneOf('bad', startsWith('b'))); + } + + public function testNoneOfEvaluatesToTheLogicalDisjunctionOfManyOtherMatchers() + { + assertThat('good', not(noneOf('bad', 'good', 'bad', 'bad', 'bad'))); + assertThat('good', noneOf('bad', 'bad', 'bad', 'bad', 'bad')); + } + + public function testNoneOfSupportsMixedTypes() + { + $combined = noneOf( + equalTo(new \Hamcrest\Core\SampleBaseClass('good')), + equalTo(new \Hamcrest\Core\SampleBaseClass('ugly')), + equalTo(new \Hamcrest\Core\SampleSubClass('good')) + ); + + assertThat(new \Hamcrest\Core\SampleSubClass('bad'), $combined); + } + + public function testNoneOfHasAReadableDescription() + { + $this->assertDescription( + 'not ("good" or "bad" or "ugly")', + noneOf('good', 'bad', 'ugly') + ); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/CombinableMatcherTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/CombinableMatcherTest.php new file mode 100644 index 0000000..4c22614 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/CombinableMatcherTest.php @@ -0,0 +1,59 @@ +_either_3_or_4 = \Hamcrest\Core\CombinableMatcher::either(equalTo(3))->orElse(equalTo(4)); + $this->_not_3_and_not_4 = \Hamcrest\Core\CombinableMatcher::both(not(equalTo(3)))->andAlso(not(equalTo(4))); + } + + protected function createMatcher() + { + return \Hamcrest\Core\CombinableMatcher::either(equalTo('irrelevant'))->orElse(equalTo('ignored')); + } + + public function testBothAcceptsAndRejects() + { + assertThat(2, $this->_not_3_and_not_4); + assertThat(3, not($this->_not_3_and_not_4)); + } + + public function testAcceptsAndRejectsThreeAnds() + { + $tripleAnd = $this->_not_3_and_not_4->andAlso(equalTo(2)); + assertThat(2, $tripleAnd); + assertThat(3, not($tripleAnd)); + } + + public function testBothDescribesItself() + { + $this->assertEquals('(not <3> and not <4>)', (string) $this->_not_3_and_not_4); + $this->assertMismatchDescription('was <3>', $this->_not_3_and_not_4, 3); + } + + public function testEitherAcceptsAndRejects() + { + assertThat(3, $this->_either_3_or_4); + assertThat(6, not($this->_either_3_or_4)); + } + + public function testAcceptsAndRejectsThreeOrs() + { + $orTriple = $this->_either_3_or_4->orElse(greaterThan(10)); + + assertThat(11, $orTriple); + assertThat(9, not($orTriple)); + } + + public function testEitherDescribesItself() + { + $this->assertEquals('(<3> or <4>)', (string) $this->_either_3_or_4); + $this->assertMismatchDescription('was <6>', $this->_either_3_or_4, 6); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/DescribedAsTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/DescribedAsTest.php new file mode 100644 index 0000000..673ab41 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/DescribedAsTest.php @@ -0,0 +1,36 @@ +assertDescription('m1 description', $m1); + $this->assertDescription('m2 description', $m2); + } + + public function testAppendsValuesToDescription() + { + $m = describedAs('value 1 = %0, value 2 = %1', anything(), 33, 97); + + $this->assertDescription('value 1 = <33>, value 2 = <97>', $m); + } + + public function testDelegatesMatchingToAnotherMatcher() + { + $m1 = describedAs('irrelevant', anything()); + $m2 = describedAs('irrelevant', not(anything())); + + $this->assertTrue($m1->matches(new \stdClass())); + $this->assertFalse($m2->matches('hi')); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/EveryTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/EveryTest.php new file mode 100644 index 0000000..5eb153c --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/EveryTest.php @@ -0,0 +1,30 @@ +assertEquals('every item is a string containing "a"', (string) $each); + + $this->assertMismatchDescription('an item was "BbB"', $each, array('BbB')); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/HasToStringTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/HasToStringTest.php new file mode 100644 index 0000000..e2e136d --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/HasToStringTest.php @@ -0,0 +1,108 @@ +assertMatches( + hasToString(equalTo('php')), + new \Hamcrest\Core\PhpForm(), + 'correct __toString' + ); + $this->assertMatches( + hasToString(equalTo('java')), + new \Hamcrest\Core\JavaForm(), + 'correct toString' + ); + } + + public function testPicksJavaOverPhpToString() + { + $this->assertMatches( + hasToString(equalTo('java')), + new \Hamcrest\Core\BothForms(), + 'correct toString' + ); + } + + public function testDoesNotMatchWhenToStringDoesNotMatch() + { + $this->assertDoesNotMatch( + hasToString(equalTo('mismatch')), + new \Hamcrest\Core\PhpForm(), + 'incorrect __toString' + ); + $this->assertDoesNotMatch( + hasToString(equalTo('mismatch')), + new \Hamcrest\Core\JavaForm(), + 'incorrect toString' + ); + $this->assertDoesNotMatch( + hasToString(equalTo('mismatch')), + new \Hamcrest\Core\BothForms(), + 'incorrect __toString' + ); + } + + public function testDoesNotMatchNull() + { + $this->assertDoesNotMatch( + hasToString(equalTo('a')), + null, + 'should not match null' + ); + } + + public function testProvidesConvenientShortcutForTraversableWithSizeEqualTo() + { + $this->assertMatches( + hasToString(equalTo('php')), + new \Hamcrest\Core\PhpForm(), + 'correct __toString' + ); + } + + public function testHasAReadableDescription() + { + $this->assertDescription( + 'an object with toString() "php"', + hasToString(equalTo('php')) + ); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsAnythingTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsAnythingTest.php new file mode 100644 index 0000000..f68032e --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsAnythingTest.php @@ -0,0 +1,29 @@ +assertDescription('ANYTHING', anything()); + } + + public function testCanOverrideDescription() + { + $description = 'description'; + $this->assertDescription($description, anything($description)); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsCollectionContainingTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsCollectionContainingTest.php new file mode 100644 index 0000000..a3929b5 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsCollectionContainingTest.php @@ -0,0 +1,91 @@ +assertMatches( + $itemMatcher, + array('a', 'b', 'c'), + "should match list that contains 'a'" + ); + } + + public function testDoesNotMatchCollectionThatDoesntContainAnElementMatchingTheGivenMatcher() + { + $matcher1 = hasItem(equalTo('a')); + $this->assertDoesNotMatch( + $matcher1, + array('b', 'c'), + "should not match list that doesn't contain 'a'" + ); + + $matcher2 = hasItem(equalTo('a')); + $this->assertDoesNotMatch( + $matcher2, + array(), + 'should not match the empty list' + ); + } + + public function testDoesNotMatchNull() + { + $this->assertDoesNotMatch( + hasItem(equalTo('a')), + null, + 'should not match null' + ); + } + + public function testHasAReadableDescription() + { + $this->assertDescription('a collection containing "a"', hasItem(equalTo('a'))); + } + + public function testMatchesAllItemsInCollection() + { + $matcher1 = hasItems(equalTo('a'), equalTo('b'), equalTo('c')); + $this->assertMatches( + $matcher1, + array('a', 'b', 'c'), + 'should match list containing all items' + ); + + $matcher2 = hasItems('a', 'b', 'c'); + $this->assertMatches( + $matcher2, + array('a', 'b', 'c'), + 'should match list containing all items (without matchers)' + ); + + $matcher3 = hasItems(equalTo('a'), equalTo('b'), equalTo('c')); + $this->assertMatches( + $matcher3, + array('c', 'b', 'a'), + 'should match list containing all items in any order' + ); + + $matcher4 = hasItems(equalTo('a'), equalTo('b'), equalTo('c')); + $this->assertMatches( + $matcher4, + array('e', 'c', 'b', 'a', 'd'), + 'should match list containing all items plus others' + ); + + $matcher5 = hasItems(equalTo('a'), equalTo('b'), equalTo('c')); + $this->assertDoesNotMatch( + $matcher5, + array('e', 'c', 'b', 'd'), // 'a' missing + 'should not match list unless it contains all items' + ); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsEqualTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsEqualTest.php new file mode 100644 index 0000000..73e3ff0 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsEqualTest.php @@ -0,0 +1,102 @@ +_arg = $arg; + } + + public function __toString() + { + return $this->_arg; + } +} + +class IsEqualTest extends \Hamcrest\AbstractMatcherTest +{ + + protected function createMatcher() + { + return \Hamcrest\Core\IsEqual::equalTo('irrelevant'); + } + + public function testComparesObjectsUsingEqualityOperator() + { + assertThat("hi", equalTo("hi")); + assertThat("bye", not(equalTo("hi"))); + + assertThat(1, equalTo(1)); + assertThat(1, not(equalTo(2))); + + assertThat("2", equalTo(2)); + } + + public function testCanCompareNullValues() + { + assertThat(null, equalTo(null)); + + assertThat(null, not(equalTo('hi'))); + assertThat('hi', not(equalTo(null))); + } + + public function testComparesTheElementsOfAnArray() + { + $s1 = array('a', 'b'); + $s2 = array('a', 'b'); + $s3 = array('c', 'd'); + $s4 = array('a', 'b', 'c', 'd'); + + assertThat($s1, equalTo($s1)); + assertThat($s2, equalTo($s1)); + assertThat($s3, not(equalTo($s1))); + assertThat($s4, not(equalTo($s1))); + } + + public function testComparesTheElementsOfAnArrayOfPrimitiveTypes() + { + $i1 = array(1, 2); + $i2 = array(1, 2); + $i3 = array(3, 4); + $i4 = array(1, 2, 3, 4); + + assertThat($i1, equalTo($i1)); + assertThat($i2, equalTo($i1)); + assertThat($i3, not(equalTo($i1))); + assertThat($i4, not(equalTo($i1))); + } + + public function testRecursivelyTestsElementsOfArrays() + { + $i1 = array(array(1, 2), array(3, 4)); + $i2 = array(array(1, 2), array(3, 4)); + $i3 = array(array(5, 6), array(7, 8)); + $i4 = array(array(1, 2, 3, 4), array(3, 4)); + + assertThat($i1, equalTo($i1)); + assertThat($i2, equalTo($i1)); + assertThat($i3, not(equalTo($i1))); + assertThat($i4, not(equalTo($i1))); + } + + public function testIncludesTheResultOfCallingToStringOnItsArgumentInTheDescription() + { + $argumentDescription = 'ARGUMENT DESCRIPTION'; + $argument = new \Hamcrest\Core\DummyToStringClass($argumentDescription); + $this->assertDescription('<' . $argumentDescription . '>', equalTo($argument)); + } + + public function testReturnsAnObviousDescriptionIfCreatedWithANestedMatcherByMistake() + { + $innerMatcher = equalTo('NestedMatcher'); + $this->assertDescription('<' . (string) $innerMatcher . '>', equalTo($innerMatcher)); + } + + public function testReturnsGoodDescriptionIfCreatedWithNullReference() + { + $this->assertDescription('null', equalTo(null)); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsIdenticalTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsIdenticalTest.php new file mode 100644 index 0000000..9cc2794 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsIdenticalTest.php @@ -0,0 +1,30 @@ +assertDescription('"ARG"', identicalTo('ARG')); + } + + public function testReturnsReadableDescriptionFromToStringWhenInitialisedWithNull() + { + $this->assertDescription('null', identicalTo(null)); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsInstanceOfTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsInstanceOfTest.php new file mode 100644 index 0000000..7a5f095 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsInstanceOfTest.php @@ -0,0 +1,51 @@ +_baseClassInstance = new \Hamcrest\Core\SampleBaseClass('good'); + $this->_subClassInstance = new \Hamcrest\Core\SampleSubClass('good'); + } + + protected function createMatcher() + { + return \Hamcrest\Core\IsInstanceOf::anInstanceOf('stdClass'); + } + + public function testEvaluatesToTrueIfArgumentIsInstanceOfASpecificClass() + { + assertThat($this->_baseClassInstance, anInstanceOf('Hamcrest\Core\SampleBaseClass')); + assertThat($this->_subClassInstance, anInstanceOf('Hamcrest\Core\SampleSubClass')); + assertThat(null, not(anInstanceOf('Hamcrest\Core\SampleBaseClass'))); + assertThat(new \stdClass(), not(anInstanceOf('Hamcrest\Core\SampleBaseClass'))); + } + + public function testEvaluatesToFalseIfArgumentIsNotAnObject() + { + assertThat(null, not(anInstanceOf('Hamcrest\Core\SampleBaseClass'))); + assertThat(false, not(anInstanceOf('Hamcrest\Core\SampleBaseClass'))); + assertThat(5, not(anInstanceOf('Hamcrest\Core\SampleBaseClass'))); + assertThat('foo', not(anInstanceOf('Hamcrest\Core\SampleBaseClass'))); + assertThat(array(1, 2, 3), not(anInstanceOf('Hamcrest\Core\SampleBaseClass'))); + } + + public function testHasAReadableDescription() + { + $this->assertDescription('an instance of stdClass', anInstanceOf('stdClass')); + } + + public function testDecribesActualClassInMismatchMessage() + { + $this->assertMismatchDescription( + '[Hamcrest\Core\SampleBaseClass] ', + anInstanceOf('Hamcrest\Core\SampleSubClass'), + $this->_baseClassInstance + ); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsNotTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsNotTest.php new file mode 100644 index 0000000..09d4a65 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsNotTest.php @@ -0,0 +1,31 @@ +assertMatches(not(equalTo('A')), 'B', 'should match'); + $this->assertDoesNotMatch(not(equalTo('B')), 'B', 'should not match'); + } + + public function testProvidesConvenientShortcutForNotEqualTo() + { + $this->assertMatches(not('A'), 'B', 'should match'); + $this->assertMatches(not('B'), 'A', 'should match'); + $this->assertDoesNotMatch(not('A'), 'A', 'should not match'); + $this->assertDoesNotMatch(not('B'), 'B', 'should not match'); + } + + public function testUsesDescriptionOfNegatedMatcherWithPrefix() + { + $this->assertDescription('not a value greater than <2>', not(greaterThan(2))); + $this->assertDescription('not "A"', not('A')); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsNullTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsNullTest.php new file mode 100644 index 0000000..bfa4255 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsNullTest.php @@ -0,0 +1,20 @@ +assertDescription('sameInstance("ARG")', sameInstance('ARG')); + } + + public function testReturnsReadableDescriptionFromToStringWhenInitialisedWithNull() + { + $this->assertDescription('sameInstance(null)', sameInstance(null)); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsTest.php new file mode 100644 index 0000000..bbd848b --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsTest.php @@ -0,0 +1,33 @@ +assertMatches(is(equalTo(true)), true, 'should match'); + $this->assertMatches(is(equalTo(false)), false, 'should match'); + $this->assertDoesNotMatch(is(equalTo(true)), false, 'should not match'); + $this->assertDoesNotMatch(is(equalTo(false)), true, 'should not match'); + } + + public function testGeneratesIsPrefixInDescription() + { + $this->assertDescription('is ', is(equalTo(true))); + } + + public function testProvidesConvenientShortcutForIsEqualTo() + { + $this->assertMatches(is('A'), 'A', 'should match'); + $this->assertMatches(is('B'), 'B', 'should match'); + $this->assertDoesNotMatch(is('A'), 'B', 'should not match'); + $this->assertDoesNotMatch(is('B'), 'A', 'should not match'); + $this->assertDescription('is "A"', is('A')); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsTypeOfTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsTypeOfTest.php new file mode 100644 index 0000000..3f48dea --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsTypeOfTest.php @@ -0,0 +1,45 @@ +assertDescription('a double', typeOf('double')); + $this->assertDescription('an integer', typeOf('integer')); + } + + public function testDecribesActualTypeInMismatchMessage() + { + $this->assertMismatchDescription('was null', typeOf('boolean'), null); + $this->assertMismatchDescription('was an integer <5>', typeOf('float'), 5); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/SampleBaseClass.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/SampleBaseClass.php new file mode 100644 index 0000000..c953e7c --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/SampleBaseClass.php @@ -0,0 +1,18 @@ +_arg = $arg; + } + + public function __toString() + { + return $this->_arg; + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/SampleSubClass.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/SampleSubClass.php new file mode 100644 index 0000000..822f1b6 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/SampleSubClass.php @@ -0,0 +1,6 @@ +_instanceProperty); + } + + protected function createMatcher() + { + return \Hamcrest\Core\Set::set('property_name'); + } + + public function testEvaluatesToTrueIfArrayPropertyIsSet() + { + assertThat(array('foo' => 'bar'), set('foo')); + } + + public function testNegatedEvaluatesToFalseIfArrayPropertyIsSet() + { + assertThat(array('foo' => 'bar'), not(notSet('foo'))); + } + + public function testEvaluatesToTrueIfClassPropertyIsSet() + { + self::$_classProperty = 'bar'; + assertThat('Hamcrest\Core\SetTest', set('_classProperty')); + } + + public function testNegatedEvaluatesToFalseIfClassPropertyIsSet() + { + self::$_classProperty = 'bar'; + assertThat('Hamcrest\Core\SetTest', not(notSet('_classProperty'))); + } + + public function testEvaluatesToTrueIfObjectPropertyIsSet() + { + $this->_instanceProperty = 'bar'; + assertThat($this, set('_instanceProperty')); + } + + public function testNegatedEvaluatesToFalseIfObjectPropertyIsSet() + { + $this->_instanceProperty = 'bar'; + assertThat($this, not(notSet('_instanceProperty'))); + } + + public function testEvaluatesToFalseIfArrayPropertyIsNotSet() + { + assertThat(array('foo' => 'bar'), not(set('baz'))); + } + + public function testNegatedEvaluatesToTrueIfArrayPropertyIsNotSet() + { + assertThat(array('foo' => 'bar'), notSet('baz')); + } + + public function testEvaluatesToFalseIfClassPropertyIsNotSet() + { + assertThat('Hamcrest\Core\SetTest', not(set('_classProperty'))); + } + + public function testNegatedEvaluatesToTrueIfClassPropertyIsNotSet() + { + assertThat('Hamcrest\Core\SetTest', notSet('_classProperty')); + } + + public function testEvaluatesToFalseIfObjectPropertyIsNotSet() + { + assertThat($this, not(set('_instanceProperty'))); + } + + public function testNegatedEvaluatesToTrueIfObjectPropertyIsNotSet() + { + assertThat($this, notSet('_instanceProperty')); + } + + public function testHasAReadableDescription() + { + $this->assertDescription('set property foo', set('foo')); + $this->assertDescription('unset property bar', notSet('bar')); + } + + public function testDecribesPropertySettingInMismatchMessage() + { + $this->assertMismatchDescription( + 'was not set', + set('bar'), + array('foo' => 'bar') + ); + $this->assertMismatchDescription( + 'was "bar"', + notSet('foo'), + array('foo' => 'bar') + ); + self::$_classProperty = 'bar'; + $this->assertMismatchDescription( + 'was "bar"', + notSet('_classProperty'), + 'Hamcrest\Core\SetTest' + ); + $this->_instanceProperty = 'bar'; + $this->assertMismatchDescription( + 'was "bar"', + notSet('_instanceProperty'), + $this + ); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/FeatureMatcherTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/FeatureMatcherTest.php new file mode 100644 index 0000000..7543294 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/FeatureMatcherTest.php @@ -0,0 +1,73 @@ +_result = $result; + } + public function getResult() + { + return $this->_result; + } +} + +/* Test-specific subclass only */ +class ResultMatcher extends \Hamcrest\FeatureMatcher +{ + public function __construct() + { + parent::__construct(self::TYPE_ANY, null, equalTo('bar'), 'Thingy with result', 'result'); + } + public function featureValueOf($actual) + { + if ($actual instanceof \Hamcrest\Thingy) { + return $actual->getResult(); + } + } +} + +class FeatureMatcherTest extends \Hamcrest\AbstractMatcherTest +{ + + private $_resultMatcher; + + public function setUp() + { + $this->_resultMatcher = $this->_resultMatcher(); + } + + protected function createMatcher() + { + return $this->_resultMatcher(); + } + + public function testMatchesPartOfAnObject() + { + $this->assertMatches($this->_resultMatcher, new \Hamcrest\Thingy('bar'), 'feature'); + $this->assertDescription('Thingy with result "bar"', $this->_resultMatcher); + } + + public function testMismatchesPartOfAnObject() + { + $this->assertMismatchDescription( + 'result was "foo"', + $this->_resultMatcher, + new \Hamcrest\Thingy('foo') + ); + } + + public function testDoesNotGenerateNoticesForNull() + { + $this->assertMismatchDescription('result was null', $this->_resultMatcher, null); + } + + // -- Creation Methods + + private function _resultMatcher() + { + return new \Hamcrest\ResultMatcher(); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/MatcherAssertTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/MatcherAssertTest.php new file mode 100644 index 0000000..2183712 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/MatcherAssertTest.php @@ -0,0 +1,190 @@ +getMessage()); + } + try { + \Hamcrest\MatcherAssert::assertThat(null); + self::fail('expected assertion failure'); + } catch (\Hamcrest\AssertionError $ex) { + self::assertEquals('', $ex->getMessage()); + } + try { + \Hamcrest\MatcherAssert::assertThat(''); + self::fail('expected assertion failure'); + } catch (\Hamcrest\AssertionError $ex) { + self::assertEquals('', $ex->getMessage()); + } + try { + \Hamcrest\MatcherAssert::assertThat(0); + self::fail('expected assertion failure'); + } catch (\Hamcrest\AssertionError $ex) { + self::assertEquals('', $ex->getMessage()); + } + try { + \Hamcrest\MatcherAssert::assertThat(0.0); + self::fail('expected assertion failure'); + } catch (\Hamcrest\AssertionError $ex) { + self::assertEquals('', $ex->getMessage()); + } + try { + \Hamcrest\MatcherAssert::assertThat(array()); + self::fail('expected assertion failure'); + } catch (\Hamcrest\AssertionError $ex) { + self::assertEquals('', $ex->getMessage()); + } + self::assertEquals(6, \Hamcrest\MatcherAssert::getCount(), 'assertion count'); + } + + public function testAssertThatWithIdentifierAndTrueArgPasses() + { + \Hamcrest\MatcherAssert::assertThat('identifier', true); + \Hamcrest\MatcherAssert::assertThat('identifier', 'non-empty'); + \Hamcrest\MatcherAssert::assertThat('identifier', 1); + \Hamcrest\MatcherAssert::assertThat('identifier', 3.14159); + \Hamcrest\MatcherAssert::assertThat('identifier', array(true)); + self::assertEquals(5, \Hamcrest\MatcherAssert::getCount(), 'assertion count'); + } + + public function testAssertThatWithIdentifierAndFalseArgFails() + { + try { + \Hamcrest\MatcherAssert::assertThat('identifier', false); + self::fail('expected assertion failure'); + } catch (\Hamcrest\AssertionError $ex) { + self::assertEquals('identifier', $ex->getMessage()); + } + try { + \Hamcrest\MatcherAssert::assertThat('identifier', null); + self::fail('expected assertion failure'); + } catch (\Hamcrest\AssertionError $ex) { + self::assertEquals('identifier', $ex->getMessage()); + } + try { + \Hamcrest\MatcherAssert::assertThat('identifier', ''); + self::fail('expected assertion failure'); + } catch (\Hamcrest\AssertionError $ex) { + self::assertEquals('identifier', $ex->getMessage()); + } + try { + \Hamcrest\MatcherAssert::assertThat('identifier', 0); + self::fail('expected assertion failure'); + } catch (\Hamcrest\AssertionError $ex) { + self::assertEquals('identifier', $ex->getMessage()); + } + try { + \Hamcrest\MatcherAssert::assertThat('identifier', 0.0); + self::fail('expected assertion failure'); + } catch (\Hamcrest\AssertionError $ex) { + self::assertEquals('identifier', $ex->getMessage()); + } + try { + \Hamcrest\MatcherAssert::assertThat('identifier', array()); + self::fail('expected assertion failure'); + } catch (\Hamcrest\AssertionError $ex) { + self::assertEquals('identifier', $ex->getMessage()); + } + self::assertEquals(6, \Hamcrest\MatcherAssert::getCount(), 'assertion count'); + } + + public function testAssertThatWithActualValueAndMatcherArgsThatMatchPasses() + { + \Hamcrest\MatcherAssert::assertThat(true, is(true)); + self::assertEquals(1, \Hamcrest\MatcherAssert::getCount(), 'assertion count'); + } + + public function testAssertThatWithActualValueAndMatcherArgsThatDontMatchFails() + { + $expected = 'expected'; + $actual = 'actual'; + + $expectedMessage = + 'Expected: "expected"' . PHP_EOL . + ' but: was "actual"'; + + try { + \Hamcrest\MatcherAssert::assertThat($actual, equalTo($expected)); + self::fail('expected assertion failure'); + } catch (\Hamcrest\AssertionError $ex) { + self::assertEquals($expectedMessage, $ex->getMessage()); + self::assertEquals(1, \Hamcrest\MatcherAssert::getCount(), 'assertion count'); + } + } + + public function testAssertThatWithIdentifierAndActualValueAndMatcherArgsThatMatchPasses() + { + \Hamcrest\MatcherAssert::assertThat('identifier', true, is(true)); + self::assertEquals(1, \Hamcrest\MatcherAssert::getCount(), 'assertion count'); + } + + public function testAssertThatWithIdentifierAndActualValueAndMatcherArgsThatDontMatchFails() + { + $expected = 'expected'; + $actual = 'actual'; + + $expectedMessage = + 'identifier' . PHP_EOL . + 'Expected: "expected"' . PHP_EOL . + ' but: was "actual"'; + + try { + \Hamcrest\MatcherAssert::assertThat('identifier', $actual, equalTo($expected)); + self::fail('expected assertion failure'); + } catch (\Hamcrest\AssertionError $ex) { + self::assertEquals($expectedMessage, $ex->getMessage()); + self::assertEquals(1, \Hamcrest\MatcherAssert::getCount(), 'assertion count'); + } + } + + public function testAssertThatWithNoArgsThrowsErrorAndDoesntIncrementCount() + { + try { + \Hamcrest\MatcherAssert::assertThat(); + self::fail('expected invalid argument exception'); + } catch (\InvalidArgumentException $ex) { + self::assertEquals(0, \Hamcrest\MatcherAssert::getCount(), 'assertion count'); + } + } + + public function testAssertThatWithFourArgsThrowsErrorAndDoesntIncrementCount() + { + try { + \Hamcrest\MatcherAssert::assertThat(1, 2, 3, 4); + self::fail('expected invalid argument exception'); + } catch (\InvalidArgumentException $ex) { + self::assertEquals(0, \Hamcrest\MatcherAssert::getCount(), 'assertion count'); + } + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Number/IsCloseToTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Number/IsCloseToTest.php new file mode 100644 index 0000000..987d552 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Number/IsCloseToTest.php @@ -0,0 +1,27 @@ +assertTrue($p->matches(1.0)); + $this->assertTrue($p->matches(0.5)); + $this->assertTrue($p->matches(1.5)); + + $this->assertDoesNotMatch($p, 2.0, 'too large'); + $this->assertMismatchDescription('<2F> differed by <0.5F>', $p, 2.0); + $this->assertDoesNotMatch($p, 0.0, 'number too small'); + $this->assertMismatchDescription('<0F> differed by <0.5F>', $p, 0.0); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Number/OrderingComparisonTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Number/OrderingComparisonTest.php new file mode 100644 index 0000000..a4c94d3 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Number/OrderingComparisonTest.php @@ -0,0 +1,41 @@ +_text = $text; + } + + public function describeTo(\Hamcrest\Description $description) + { + $description->appendText($this->_text); + } +} + +class StringDescriptionTest extends \PhpUnit_Framework_TestCase +{ + + private $_description; + + public function setUp() + { + $this->_description = new \Hamcrest\StringDescription(); + } + + public function testAppendTextAppendsTextInformation() + { + $this->_description->appendText('foo')->appendText('bar'); + $this->assertEquals('foobar', (string) $this->_description); + } + + public function testAppendValueCanAppendTextTypes() + { + $this->_description->appendValue('foo'); + $this->assertEquals('"foo"', (string) $this->_description); + } + + public function testSpecialCharactersAreEscapedForStringTypes() + { + $this->_description->appendValue("foo\\bar\"zip\r\n"); + $this->assertEquals('"foo\\bar\\"zip\r\n"', (string) $this->_description); + } + + public function testIntegerValuesCanBeAppended() + { + $this->_description->appendValue(42); + $this->assertEquals('<42>', (string) $this->_description); + } + + public function testFloatValuesCanBeAppended() + { + $this->_description->appendValue(42.78); + $this->assertEquals('<42.78F>', (string) $this->_description); + } + + public function testNullValuesCanBeAppended() + { + $this->_description->appendValue(null); + $this->assertEquals('null', (string) $this->_description); + } + + public function testArraysCanBeAppended() + { + $this->_description->appendValue(array('foo', 42.78)); + $this->assertEquals('["foo", <42.78F>]', (string) $this->_description); + } + + public function testObjectsCanBeAppended() + { + $this->_description->appendValue(new \stdClass()); + $this->assertEquals('', (string) $this->_description); + } + + public function testBooleanValuesCanBeAppended() + { + $this->_description->appendValue(false); + $this->assertEquals('', (string) $this->_description); + } + + public function testListsOfvaluesCanBeAppended() + { + $this->_description->appendValue(array('foo', 42.78)); + $this->assertEquals('["foo", <42.78F>]', (string) $this->_description); + } + + public function testIterableOfvaluesCanBeAppended() + { + $items = new \ArrayObject(array('foo', 42.78)); + $this->_description->appendValue($items); + $this->assertEquals('["foo", <42.78F>]', (string) $this->_description); + } + + public function testIteratorOfvaluesCanBeAppended() + { + $items = new \ArrayObject(array('foo', 42.78)); + $this->_description->appendValue($items->getIterator()); + $this->assertEquals('["foo", <42.78F>]', (string) $this->_description); + } + + public function testListsOfvaluesCanBeAppendedManually() + { + $this->_description->appendValueList('@start@', '@sep@ ', '@end@', array('foo', 42.78)); + $this->assertEquals('@start@"foo"@sep@ <42.78F>@end@', (string) $this->_description); + } + + public function testIterableOfvaluesCanBeAppendedManually() + { + $items = new \ArrayObject(array('foo', 42.78)); + $this->_description->appendValueList('@start@', '@sep@ ', '@end@', $items); + $this->assertEquals('@start@"foo"@sep@ <42.78F>@end@', (string) $this->_description); + } + + public function testIteratorOfvaluesCanBeAppendedManually() + { + $items = new \ArrayObject(array('foo', 42.78)); + $this->_description->appendValueList('@start@', '@sep@ ', '@end@', $items->getIterator()); + $this->assertEquals('@start@"foo"@sep@ <42.78F>@end@', (string) $this->_description); + } + + public function testSelfDescribingObjectsCanBeAppended() + { + $this->_description + ->appendDescriptionOf(new \Hamcrest\SampleSelfDescriber('foo')) + ->appendDescriptionOf(new \Hamcrest\SampleSelfDescriber('bar')) + ; + $this->assertEquals('foobar', (string) $this->_description); + } + + public function testSelfDescribingObjectsCanBeAppendedAsLists() + { + $this->_description->appendList('@start@', '@sep@ ', '@end@', array( + new \Hamcrest\SampleSelfDescriber('foo'), + new \Hamcrest\SampleSelfDescriber('bar') + )); + $this->assertEquals('@start@foo@sep@ bar@end@', (string) $this->_description); + } + + public function testSelfDescribingObjectsCanBeAppendedAsIteratedLists() + { + $items = new \ArrayObject(array( + new \Hamcrest\SampleSelfDescriber('foo'), + new \Hamcrest\SampleSelfDescriber('bar') + )); + $this->_description->appendList('@start@', '@sep@ ', '@end@', $items); + $this->assertEquals('@start@foo@sep@ bar@end@', (string) $this->_description); + } + + public function testSelfDescribingObjectsCanBeAppendedAsIterators() + { + $items = new \ArrayObject(array( + new \Hamcrest\SampleSelfDescriber('foo'), + new \Hamcrest\SampleSelfDescriber('bar') + )); + $this->_description->appendList('@start@', '@sep@ ', '@end@', $items->getIterator()); + $this->assertEquals('@start@foo@sep@ bar@end@', (string) $this->_description); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/IsEmptyStringTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/IsEmptyStringTest.php new file mode 100644 index 0000000..8d5c56b --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/IsEmptyStringTest.php @@ -0,0 +1,86 @@ +assertDoesNotMatch(emptyString(), null, 'null'); + } + + public function testEmptyDoesNotMatchZero() + { + $this->assertDoesNotMatch(emptyString(), 0, 'zero'); + } + + public function testEmptyDoesNotMatchFalse() + { + $this->assertDoesNotMatch(emptyString(), false, 'false'); + } + + public function testEmptyDoesNotMatchEmptyArray() + { + $this->assertDoesNotMatch(emptyString(), array(), 'empty array'); + } + + public function testEmptyMatchesEmptyString() + { + $this->assertMatches(emptyString(), '', 'empty string'); + } + + public function testEmptyDoesNotMatchNonEmptyString() + { + $this->assertDoesNotMatch(emptyString(), 'foo', 'non-empty string'); + } + + public function testEmptyHasAReadableDescription() + { + $this->assertDescription('an empty string', emptyString()); + } + + public function testEmptyOrNullMatchesNull() + { + $this->assertMatches(nullOrEmptyString(), null, 'null'); + } + + public function testEmptyOrNullMatchesEmptyString() + { + $this->assertMatches(nullOrEmptyString(), '', 'empty string'); + } + + public function testEmptyOrNullDoesNotMatchNonEmptyString() + { + $this->assertDoesNotMatch(nullOrEmptyString(), 'foo', 'non-empty string'); + } + + public function testEmptyOrNullHasAReadableDescription() + { + $this->assertDescription('(null or an empty string)', nullOrEmptyString()); + } + + public function testNonEmptyDoesNotMatchNull() + { + $this->assertDoesNotMatch(nonEmptyString(), null, 'null'); + } + + public function testNonEmptyDoesNotMatchEmptyString() + { + $this->assertDoesNotMatch(nonEmptyString(), '', 'empty string'); + } + + public function testNonEmptyMatchesNonEmptyString() + { + $this->assertMatches(nonEmptyString(), 'foo', 'non-empty string'); + } + + public function testNonEmptyHasAReadableDescription() + { + $this->assertDescription('a non-empty string', nonEmptyString()); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/IsEqualIgnoringCaseTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/IsEqualIgnoringCaseTest.php new file mode 100644 index 0000000..0539fd5 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/IsEqualIgnoringCaseTest.php @@ -0,0 +1,40 @@ +assertDescription( + 'equalToIgnoringCase("heLLo")', + equalToIgnoringCase('heLLo') + ); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/IsEqualIgnoringWhiteSpaceTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/IsEqualIgnoringWhiteSpaceTest.php new file mode 100644 index 0000000..6c2304f --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/IsEqualIgnoringWhiteSpaceTest.php @@ -0,0 +1,51 @@ +_matcher = \Hamcrest\Text\IsEqualIgnoringWhiteSpace::equalToIgnoringWhiteSpace( + "Hello World how\n are we? " + ); + } + + protected function createMatcher() + { + return $this->_matcher; + } + + public function testPassesIfWordsAreSameButWhitespaceDiffers() + { + assertThat('Hello World how are we?', $this->_matcher); + assertThat(" Hello \rWorld \t how are\nwe?", $this->_matcher); + } + + public function testFailsIfTextOtherThanWhitespaceDiffers() + { + assertThat('Hello PLANET how are we?', not($this->_matcher)); + assertThat('Hello World how are we', not($this->_matcher)); + } + + public function testFailsIfWhitespaceIsAddedOrRemovedInMidWord() + { + assertThat('HelloWorld how are we?', not($this->_matcher)); + assertThat('Hello Wo rld how are we?', not($this->_matcher)); + } + + public function testFailsIfMatchingAgainstNull() + { + assertThat(null, not($this->_matcher)); + } + + public function testHasAReadableDescription() + { + $this->assertDescription( + "equalToIgnoringWhiteSpace(\"Hello World how\\n are we? \")", + $this->_matcher + ); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/MatchesPatternTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/MatchesPatternTest.php new file mode 100644 index 0000000..4891598 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/MatchesPatternTest.php @@ -0,0 +1,30 @@ +assertDescription('a string matching "pattern"', matchesPattern('pattern')); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringContainsIgnoringCaseTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringContainsIgnoringCaseTest.php new file mode 100644 index 0000000..3b5b08e --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringContainsIgnoringCaseTest.php @@ -0,0 +1,80 @@ +_stringContains = \Hamcrest\Text\StringContainsIgnoringCase::containsStringIgnoringCase( + strtolower(self::EXCERPT) + ); + } + + protected function createMatcher() + { + return $this->_stringContains; + } + + public function testEvaluatesToTrueIfArgumentContainsSpecifiedSubstring() + { + $this->assertTrue( + $this->_stringContains->matches(self::EXCERPT . 'END'), + 'should be true if excerpt at beginning' + ); + $this->assertTrue( + $this->_stringContains->matches('START' . self::EXCERPT), + 'should be true if excerpt at end' + ); + $this->assertTrue( + $this->_stringContains->matches('START' . self::EXCERPT . 'END'), + 'should be true if excerpt in middle' + ); + $this->assertTrue( + $this->_stringContains->matches(self::EXCERPT . self::EXCERPT), + 'should be true if excerpt is repeated' + ); + + $this->assertFalse( + $this->_stringContains->matches('Something else'), + 'should not be true if excerpt is not in string' + ); + $this->assertFalse( + $this->_stringContains->matches(substr(self::EXCERPT, 1)), + 'should not be true if part of excerpt is in string' + ); + } + + public function testEvaluatesToTrueIfArgumentIsEqualToSubstring() + { + $this->assertTrue( + $this->_stringContains->matches(self::EXCERPT), + 'should be true if excerpt is entire string' + ); + } + + public function testEvaluatesToTrueIfArgumentContainsExactSubstring() + { + $this->assertTrue( + $this->_stringContains->matches(strtolower(self::EXCERPT)), + 'should be false if excerpt is entire string ignoring case' + ); + $this->assertTrue( + $this->_stringContains->matches('START' . strtolower(self::EXCERPT) . 'END'), + 'should be false if excerpt is contained in string ignoring case' + ); + } + + public function testHasAReadableDescription() + { + $this->assertDescription( + 'a string containing in any case "' + . strtolower(self::EXCERPT) . '"', + $this->_stringContains + ); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringContainsInOrderTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringContainsInOrderTest.php new file mode 100644 index 0000000..0be7062 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringContainsInOrderTest.php @@ -0,0 +1,42 @@ +_m = \Hamcrest\Text\StringContainsInOrder::stringContainsInOrder(array('a', 'b', 'c')); + } + + protected function createMatcher() + { + return $this->_m; + } + + public function testMatchesOnlyIfStringContainsGivenSubstringsInTheSameOrder() + { + $this->assertMatches($this->_m, 'abc', 'substrings in order'); + $this->assertMatches($this->_m, '1a2b3c4', 'substrings separated'); + + $this->assertDoesNotMatch($this->_m, 'cab', 'substrings out of order'); + $this->assertDoesNotMatch($this->_m, 'xyz', 'no substrings in string'); + $this->assertDoesNotMatch($this->_m, 'ac', 'substring missing'); + $this->assertDoesNotMatch($this->_m, '', 'empty string'); + } + + public function testAcceptsVariableArguments() + { + $this->assertMatches(stringContainsInOrder('a', 'b', 'c'), 'abc', 'substrings as variable arguments'); + } + + public function testHasAReadableDescription() + { + $this->assertDescription( + 'a string containing "a", "b", "c" in order', + $this->_m + ); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringContainsTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringContainsTest.php new file mode 100644 index 0000000..203fd91 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringContainsTest.php @@ -0,0 +1,86 @@ +_stringContains = \Hamcrest\Text\StringContains::containsString(self::EXCERPT); + } + + protected function createMatcher() + { + return $this->_stringContains; + } + + public function testEvaluatesToTrueIfArgumentContainsSubstring() + { + $this->assertTrue( + $this->_stringContains->matches(self::EXCERPT . 'END'), + 'should be true if excerpt at beginning' + ); + $this->assertTrue( + $this->_stringContains->matches('START' . self::EXCERPT), + 'should be true if excerpt at end' + ); + $this->assertTrue( + $this->_stringContains->matches('START' . self::EXCERPT . 'END'), + 'should be true if excerpt in middle' + ); + $this->assertTrue( + $this->_stringContains->matches(self::EXCERPT . self::EXCERPT), + 'should be true if excerpt is repeated' + ); + + $this->assertFalse( + $this->_stringContains->matches('Something else'), + 'should not be true if excerpt is not in string' + ); + $this->assertFalse( + $this->_stringContains->matches(substr(self::EXCERPT, 1)), + 'should not be true if part of excerpt is in string' + ); + } + + public function testEvaluatesToTrueIfArgumentIsEqualToSubstring() + { + $this->assertTrue( + $this->_stringContains->matches(self::EXCERPT), + 'should be true if excerpt is entire string' + ); + } + + public function testEvaluatesToFalseIfArgumentContainsSubstringIgnoringCase() + { + $this->assertFalse( + $this->_stringContains->matches(strtolower(self::EXCERPT)), + 'should be false if excerpt is entire string ignoring case' + ); + $this->assertFalse( + $this->_stringContains->matches('START' . strtolower(self::EXCERPT) . 'END'), + 'should be false if excerpt is contained in string ignoring case' + ); + } + + public function testIgnoringCaseReturnsCorrectMatcher() + { + $this->assertTrue( + $this->_stringContains->ignoringCase()->matches('EXceRpT'), + 'should be true if excerpt is entire string ignoring case' + ); + } + + public function testHasAReadableDescription() + { + $this->assertDescription( + 'a string containing "' + . self::EXCERPT . '"', + $this->_stringContains + ); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringEndsWithTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringEndsWithTest.php new file mode 100644 index 0000000..fffa3c9 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringEndsWithTest.php @@ -0,0 +1,62 @@ +_stringEndsWith = \Hamcrest\Text\StringEndsWith::endsWith(self::EXCERPT); + } + + protected function createMatcher() + { + return $this->_stringEndsWith; + } + + public function testEvaluatesToTrueIfArgumentContainsSpecifiedSubstring() + { + $this->assertFalse( + $this->_stringEndsWith->matches(self::EXCERPT . 'END'), + 'should be false if excerpt at beginning' + ); + $this->assertTrue( + $this->_stringEndsWith->matches('START' . self::EXCERPT), + 'should be true if excerpt at end' + ); + $this->assertFalse( + $this->_stringEndsWith->matches('START' . self::EXCERPT . 'END'), + 'should be false if excerpt in middle' + ); + $this->assertTrue( + $this->_stringEndsWith->matches(self::EXCERPT . self::EXCERPT), + 'should be true if excerpt is at end and repeated' + ); + + $this->assertFalse( + $this->_stringEndsWith->matches('Something else'), + 'should be false if excerpt is not in string' + ); + $this->assertFalse( + $this->_stringEndsWith->matches(substr(self::EXCERPT, 0, strlen(self::EXCERPT) - 2)), + 'should be false if part of excerpt is at end of string' + ); + } + + public function testEvaluatesToTrueIfArgumentIsEqualToSubstring() + { + $this->assertTrue( + $this->_stringEndsWith->matches(self::EXCERPT), + 'should be true if excerpt is entire string' + ); + } + + public function testHasAReadableDescription() + { + $this->assertDescription('a string ending with "EXCERPT"', $this->_stringEndsWith); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringStartsWithTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringStartsWithTest.php new file mode 100644 index 0000000..fc3761b --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringStartsWithTest.php @@ -0,0 +1,62 @@ +_stringStartsWith = \Hamcrest\Text\StringStartsWith::startsWith(self::EXCERPT); + } + + protected function createMatcher() + { + return $this->_stringStartsWith; + } + + public function testEvaluatesToTrueIfArgumentContainsSpecifiedSubstring() + { + $this->assertTrue( + $this->_stringStartsWith->matches(self::EXCERPT . 'END'), + 'should be true if excerpt at beginning' + ); + $this->assertFalse( + $this->_stringStartsWith->matches('START' . self::EXCERPT), + 'should be false if excerpt at end' + ); + $this->assertFalse( + $this->_stringStartsWith->matches('START' . self::EXCERPT . 'END'), + 'should be false if excerpt in middle' + ); + $this->assertTrue( + $this->_stringStartsWith->matches(self::EXCERPT . self::EXCERPT), + 'should be true if excerpt is at beginning and repeated' + ); + + $this->assertFalse( + $this->_stringStartsWith->matches('Something else'), + 'should be false if excerpt is not in string' + ); + $this->assertFalse( + $this->_stringStartsWith->matches(substr(self::EXCERPT, 1)), + 'should be false if part of excerpt is at start of string' + ); + } + + public function testEvaluatesToTrueIfArgumentIsEqualToSubstring() + { + $this->assertTrue( + $this->_stringStartsWith->matches(self::EXCERPT), + 'should be true if excerpt is entire string' + ); + } + + public function testHasAReadableDescription() + { + $this->assertDescription('a string starting with "EXCERPT"', $this->_stringStartsWith); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsArrayTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsArrayTest.php new file mode 100644 index 0000000..d13c24d --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsArrayTest.php @@ -0,0 +1,35 @@ +assertDescription('an array', arrayValue()); + } + + public function testDecribesActualTypeInMismatchMessage() + { + $this->assertMismatchDescription('was null', arrayValue(), null); + $this->assertMismatchDescription('was a string "foo"', arrayValue(), 'foo'); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsBooleanTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsBooleanTest.php new file mode 100644 index 0000000..24309fc --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsBooleanTest.php @@ -0,0 +1,35 @@ +assertDescription('a boolean', booleanValue()); + } + + public function testDecribesActualTypeInMismatchMessage() + { + $this->assertMismatchDescription('was null', booleanValue(), null); + $this->assertMismatchDescription('was a string "foo"', booleanValue(), 'foo'); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsCallableTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsCallableTest.php new file mode 100644 index 0000000..5098e21 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsCallableTest.php @@ -0,0 +1,103 @@ +=')) { + $this->markTestSkipped('Closures require php 5.3'); + } + eval('assertThat(function () {}, callableValue());'); + } + + public function testEvaluatesToTrueIfArgumentImplementsInvoke() + { + if (!version_compare(PHP_VERSION, '5.3', '>=')) { + $this->markTestSkipped('Magic method __invoke() requires php 5.3'); + } + assertThat($this, callableValue()); + } + + public function testEvaluatesToFalseIfArgumentIsInvalidFunctionName() + { + if (function_exists('not_a_Hamcrest_function')) { + $this->markTestSkipped('Function "not_a_Hamcrest_function" must not exist'); + } + + assertThat('not_a_Hamcrest_function', not(callableValue())); + } + + public function testEvaluatesToFalseIfArgumentIsInvalidStaticMethodCallback() + { + assertThat( + array('Hamcrest\Type\IsCallableTest', 'noMethod'), + not(callableValue()) + ); + } + + public function testEvaluatesToFalseIfArgumentIsInvalidInstanceMethodCallback() + { + assertThat(array($this, 'noMethod'), not(callableValue())); + } + + public function testEvaluatesToFalseIfArgumentDoesntImplementInvoke() + { + assertThat(new \stdClass(), not(callableValue())); + } + + public function testEvaluatesToFalseIfArgumentDoesntMatchType() + { + assertThat(false, not(callableValue())); + assertThat(5.2, not(callableValue())); + } + + public function testHasAReadableDescription() + { + $this->assertDescription('a callable', callableValue()); + } + + public function testDecribesActualTypeInMismatchMessage() + { + $this->assertMismatchDescription( + 'was a string "invalid-function"', + callableValue(), + 'invalid-function' + ); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsDoubleTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsDoubleTest.php new file mode 100644 index 0000000..85c2a96 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsDoubleTest.php @@ -0,0 +1,35 @@ +assertDescription('a double', doubleValue()); + } + + public function testDecribesActualTypeInMismatchMessage() + { + $this->assertMismatchDescription('was null', doubleValue(), null); + $this->assertMismatchDescription('was a string "foo"', doubleValue(), 'foo'); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsIntegerTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsIntegerTest.php new file mode 100644 index 0000000..ce5a51a --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsIntegerTest.php @@ -0,0 +1,36 @@ +assertDescription('an integer', integerValue()); + } + + public function testDecribesActualTypeInMismatchMessage() + { + $this->assertMismatchDescription('was null', integerValue(), null); + $this->assertMismatchDescription('was a string "foo"', integerValue(), 'foo'); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsNumericTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsNumericTest.php new file mode 100644 index 0000000..e718485 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsNumericTest.php @@ -0,0 +1,49 @@ +assertDescription('a number', numericValue()); + } + + public function testDecribesActualTypeInMismatchMessage() + { + $this->assertMismatchDescription('was null', numericValue(), null); + $this->assertMismatchDescription('was a string "foo"', numericValue(), 'foo'); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsObjectTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsObjectTest.php new file mode 100644 index 0000000..a3b617c --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsObjectTest.php @@ -0,0 +1,34 @@ +assertDescription('an object', objectValue()); + } + + public function testDecribesActualTypeInMismatchMessage() + { + $this->assertMismatchDescription('was null', objectValue(), null); + $this->assertMismatchDescription('was a string "foo"', objectValue(), 'foo'); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsResourceTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsResourceTest.php new file mode 100644 index 0000000..d6ea534 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsResourceTest.php @@ -0,0 +1,34 @@ +assertDescription('a resource', resourceValue()); + } + + public function testDecribesActualTypeInMismatchMessage() + { + $this->assertMismatchDescription('was null', resourceValue(), null); + $this->assertMismatchDescription('was a string "foo"', resourceValue(), 'foo'); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsScalarTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsScalarTest.php new file mode 100644 index 0000000..72a188d --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsScalarTest.php @@ -0,0 +1,39 @@ +assertDescription('a scalar', scalarValue()); + } + + public function testDecribesActualTypeInMismatchMessage() + { + $this->assertMismatchDescription('was null', scalarValue(), null); + $this->assertMismatchDescription('was an array ["foo"]', scalarValue(), array('foo')); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsStringTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsStringTest.php new file mode 100644 index 0000000..557d591 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsStringTest.php @@ -0,0 +1,35 @@ +assertDescription('a string', stringValue()); + } + + public function testDecribesActualTypeInMismatchMessage() + { + $this->assertMismatchDescription('was null', stringValue(), null); + $this->assertMismatchDescription('was a double <5.2F>', stringValue(), 5.2); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/UtilTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/UtilTest.php new file mode 100644 index 0000000..0c2cd04 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/UtilTest.php @@ -0,0 +1,80 @@ +assertSame($matcher, $newMatcher); + } + + public function testWrapValueWithIsEqualWrapsPrimitive() + { + $matcher = \Hamcrest\Util::wrapValueWithIsEqual('foo'); + $this->assertInstanceOf('Hamcrest\Core\IsEqual', $matcher); + $this->assertTrue($matcher->matches('foo')); + } + + public function testCheckAllAreMatchersAcceptsMatchers() + { + \Hamcrest\Util::checkAllAreMatchers(array( + new \Hamcrest\Text\MatchesPattern('/fo+/'), + new \Hamcrest\Core\IsEqual('foo'), + )); + } + + /** + * @expectedException InvalidArgumentException + */ + public function testCheckAllAreMatchersFailsForPrimitive() + { + \Hamcrest\Util::checkAllAreMatchers(array( + new \Hamcrest\Text\MatchesPattern('/fo+/'), + 'foo', + )); + } + + private function callAndAssertCreateMatcherArray($items) + { + $matchers = \Hamcrest\Util::createMatcherArray($items); + $this->assertInternalType('array', $matchers); + $this->assertSameSize($items, $matchers); + foreach ($matchers as $matcher) { + $this->assertInstanceOf('\Hamcrest\Matcher', $matcher); + } + + return $matchers; + } + + public function testCreateMatcherArrayLeavesMatchersUntouched() + { + $matcher = new \Hamcrest\Text\MatchesPattern('/fo+/'); + $items = array($matcher); + $matchers = $this->callAndAssertCreateMatcherArray($items); + $this->assertSame($matcher, $matchers[0]); + } + + public function testCreateMatcherArrayWrapsPrimitiveWithIsEqualMatcher() + { + $matchers = $this->callAndAssertCreateMatcherArray(array('foo')); + $this->assertInstanceOf('Hamcrest\Core\IsEqual', $matchers[0]); + $this->assertTrue($matchers[0]->matches('foo')); + } + + public function testCreateMatcherArrayDoesntModifyOriginalArray() + { + $items = array('foo'); + $this->callAndAssertCreateMatcherArray($items); + $this->assertSame('foo', $items[0]); + } + + public function testCreateMatcherArrayUnwrapsSingleArrayElement() + { + $matchers = $this->callAndAssertCreateMatcherArray(array(array('foo'))); + $this->assertInstanceOf('Hamcrest\Core\IsEqual', $matchers[0]); + $this->assertTrue($matchers[0]->matches('foo')); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Xml/HasXPathTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Xml/HasXPathTest.php new file mode 100644 index 0000000..6774887 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Xml/HasXPathTest.php @@ -0,0 +1,198 @@ + + + + alice + Alice Frankel + admin + + + bob + Bob Frankel + user + + + charlie + Charlie Chan + user + + +XML; + self::$doc = new \DOMDocument(); + self::$doc->loadXML(self::$xml); + + self::$html = << + + Home Page + + +

Heading

+

Some text

+ + +HTML; + } + + protected function createMatcher() + { + return \Hamcrest\Xml\HasXPath::hasXPath('/users/user'); + } + + public function testMatchesWhenXPathIsFound() + { + assertThat('one match', self::$doc, hasXPath('user[id = "bob"]')); + assertThat('two matches', self::$doc, hasXPath('user[role = "user"]')); + } + + public function testDoesNotMatchWhenXPathIsNotFound() + { + assertThat( + 'no match', + self::$doc, + not(hasXPath('user[contains(id, "frank")]')) + ); + } + + public function testMatchesWhenExpressionWithoutMatcherEvaluatesToTrue() + { + assertThat( + 'one match', + self::$doc, + hasXPath('count(user[id = "bob"])') + ); + } + + public function testDoesNotMatchWhenExpressionWithoutMatcherEvaluatesToFalse() + { + assertThat( + 'no matches', + self::$doc, + not(hasXPath('count(user[id = "frank"])')) + ); + } + + public function testMatchesWhenExpressionIsEqual() + { + assertThat( + 'one match', + self::$doc, + hasXPath('count(user[id = "bob"])', 1) + ); + assertThat( + 'two matches', + self::$doc, + hasXPath('count(user[role = "user"])', 2) + ); + } + + public function testDoesNotMatchWhenExpressionIsNotEqual() + { + assertThat( + 'no match', + self::$doc, + not(hasXPath('count(user[id = "frank"])', 2)) + ); + assertThat( + 'one match', + self::$doc, + not(hasXPath('count(user[role = "admin"])', 2)) + ); + } + + public function testMatchesWhenContentMatches() + { + assertThat( + 'one match', + self::$doc, + hasXPath('user/name', containsString('ice')) + ); + assertThat( + 'two matches', + self::$doc, + hasXPath('user/role', equalTo('user')) + ); + } + + public function testDoesNotMatchWhenContentDoesNotMatch() + { + assertThat( + 'no match', + self::$doc, + not(hasXPath('user/name', containsString('Bobby'))) + ); + assertThat( + 'no matches', + self::$doc, + not(hasXPath('user/role', equalTo('owner'))) + ); + } + + public function testProvidesConvenientShortcutForHasXPathEqualTo() + { + assertThat('matches', self::$doc, hasXPath('count(user)', 3)); + assertThat('matches', self::$doc, hasXPath('user[2]/id', 'bob')); + } + + public function testProvidesConvenientShortcutForHasXPathCountEqualTo() + { + assertThat('matches', self::$doc, hasXPath('user[id = "charlie"]', 1)); + } + + public function testMatchesAcceptsXmlString() + { + assertThat('accepts XML string', self::$xml, hasXPath('user')); + } + + public function testMatchesAcceptsHtmlString() + { + assertThat('accepts HTML string', self::$html, hasXPath('body/h1', 'Heading')); + } + + public function testHasAReadableDescription() + { + $this->assertDescription( + 'XML or HTML document with XPath "/users/user"', + hasXPath('/users/user') + ); + $this->assertDescription( + 'XML or HTML document with XPath "count(/users/user)" <2>', + hasXPath('/users/user', 2) + ); + $this->assertDescription( + 'XML or HTML document with XPath "/users/user/name"' + . ' a string starting with "Alice"', + hasXPath('/users/user/name', startsWith('Alice')) + ); + } + + public function testHasAReadableMismatchDescription() + { + $this->assertMismatchDescription( + 'XPath returned no results', + hasXPath('/users/name'), + self::$doc + ); + $this->assertMismatchDescription( + 'XPath expression result was <3F>', + hasXPath('/users/user', 2), + self::$doc + ); + $this->assertMismatchDescription( + 'XPath returned ["alice", "bob", "charlie"]', + hasXPath('/users/user/id', 'Frank'), + self::$doc + ); + } +} diff --git a/vendor/hamcrest/hamcrest-php/tests/bootstrap.php b/vendor/hamcrest/hamcrest-php/tests/bootstrap.php new file mode 100644 index 0000000..35a696c --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/tests/bootstrap.php @@ -0,0 +1,18 @@ + + + + . + + + + + + ../hamcrest + + + diff --git a/vendor/jakub-onderka/php-console-color/.gitignore b/vendor/jakub-onderka/php-console-color/.gitignore new file mode 100644 index 0000000..05ab16b --- /dev/null +++ b/vendor/jakub-onderka/php-console-color/.gitignore @@ -0,0 +1,3 @@ +build +vendor +composer.lock diff --git a/vendor/jakub-onderka/php-console-color/.travis.yml b/vendor/jakub-onderka/php-console-color/.travis.yml new file mode 100644 index 0000000..4671dca --- /dev/null +++ b/vendor/jakub-onderka/php-console-color/.travis.yml @@ -0,0 +1,15 @@ +language: php + +php: + - 5.3.3 + - 5.4 + - 5.5 + +before_script: + - composer self-update + - composer install --no-interaction --prefer-source --dev + +script: + - ant phplint + - ant phpcs + - ant phpunit \ No newline at end of file diff --git a/vendor/jakub-onderka/php-console-color/build.xml b/vendor/jakub-onderka/php-console-color/build.xml new file mode 100644 index 0000000..bb4ba66 --- /dev/null +++ b/vendor/jakub-onderka/php-console-color/build.xml @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vendor/jakub-onderka/php-console-color/composer.json b/vendor/jakub-onderka/php-console-color/composer.json new file mode 100644 index 0000000..0721abc --- /dev/null +++ b/vendor/jakub-onderka/php-console-color/composer.json @@ -0,0 +1,24 @@ +{ + "name": "jakub-onderka/php-console-color", + "license": "BSD-2-Clause", + "version": "0.1", + "authors": [ + { + "name": "Jakub Onderka", + "email": "jakub.onderka@gmail.com" + } + ], + "autoload": { + "psr-0": {"JakubOnderka\\PhpConsoleColor": "src/"} + }, + "require": { + "php": ">=5.3.2" + }, + "require-dev": { + "phpunit/phpunit": "3.7.*", + "jakub-onderka/php-parallel-lint": "0.*", + "jakub-onderka/php-var-dump-check": "0.*", + "squizlabs/php_codesniffer": "1.*", + "jakub-onderka/php-code-style": "1.0" + } +} \ No newline at end of file diff --git a/vendor/jakub-onderka/php-console-color/example.php b/vendor/jakub-onderka/php-console-color/example.php new file mode 100644 index 0000000..5e698a2 --- /dev/null +++ b/vendor/jakub-onderka/php-console-color/example.php @@ -0,0 +1,38 @@ +isSupported() ? 'Yes' : 'No') . "\n"; +echo "256 colors are supported: " . ($consoleColor->are256ColorsSupported() ? 'Yes' : 'No') . "\n\n"; + +if ($consoleColor->isSupported()) { + foreach ($consoleColor->getPossibleStyles() as $style) { + echo $consoleColor->apply($style, $style) . "\n"; + } +} + +echo "\n"; + +if ($consoleColor->are256ColorsSupported()) { + echo "Foreground colors:\n"; + for ($i = 1; $i <= 255; $i++) { + echo $consoleColor->apply("color_$i", str_pad($i, 6, ' ', STR_PAD_BOTH)); + + if ($i % 15 === 0) { + echo "\n"; + } + } + + echo "\nBackground colors:\n"; + + for ($i = 1; $i <= 255; $i++) { + echo $consoleColor->apply("bg_color_$i", str_pad($i, 6, ' ', STR_PAD_BOTH)); + + if ($i % 15 === 0) { + echo "\n"; + } + } + + echo "\n"; +} diff --git a/vendor/jakub-onderka/php-console-color/phpunit.xml b/vendor/jakub-onderka/php-console-color/phpunit.xml new file mode 100644 index 0000000..74011d9 --- /dev/null +++ b/vendor/jakub-onderka/php-console-color/phpunit.xml @@ -0,0 +1,15 @@ + + + + + tests/* + + + + + + + vendor + + + \ No newline at end of file diff --git a/vendor/jakub-onderka/php-console-color/src/JakubOnderka/PhpConsoleColor/ConsoleColor.php b/vendor/jakub-onderka/php-console-color/src/JakubOnderka/PhpConsoleColor/ConsoleColor.php new file mode 100644 index 0000000..c367a76 --- /dev/null +++ b/vendor/jakub-onderka/php-console-color/src/JakubOnderka/PhpConsoleColor/ConsoleColor.php @@ -0,0 +1,280 @@ + null, + 'bold' => '1', + 'dark' => '2', + 'italic' => '3', + 'underline' => '4', + 'blink' => '5', + 'reverse' => '7', + 'concealed' => '8', + + 'default' => '39', + 'black' => '30', + 'red' => '31', + 'green' => '32', + 'yellow' => '33', + 'blue' => '34', + 'magenta' => '35', + 'cyan' => '36', + 'light_gray' => '37', + + 'dark_gray' => '90', + 'light_red' => '91', + 'light_green' => '92', + 'light_yellow' => '93', + 'light_blue' => '94', + 'light_magenta' => '95', + 'light_cyan' => '96', + 'white' => '97', + + 'bg_default' => '49', + 'bg_black' => '40', + 'bg_red' => '41', + 'bg_green' => '42', + 'bg_yellow' => '43', + 'bg_blue' => '44', + 'bg_magenta' => '45', + 'bg_cyan' => '46', + 'bg_light_gray' => '47', + + 'bg_dark_gray' => '100', + 'bg_light_red' => '101', + 'bg_light_green' => '102', + 'bg_light_yellow' => '103', + 'bg_light_blue' => '104', + 'bg_light_magenta' => '105', + 'bg_light_cyan' => '106', + 'bg_white' => '107', + ); + + /** @var array */ + private $themes = array(); + + public function __construct() + { + $this->isSupported = $this->isSupported(); + } + + /** + * @param string|array $style + * @param string $text + * @return string + * @throws InvalidStyleException + * @throws \InvalidArgumentException + */ + public function apply($style, $text) + { + if (!$this->isStyleForced() && !$this->isSupported()) { + return $text; + } + + if (is_string($style)) { + $style = array($style); + } + if (!is_array($style)) { + throw new \InvalidArgumentException("Style must be string or array."); + } + + $sequences = array(); + + foreach ($style as $s) { + if (isset($this->themes[$s])) { + $sequences = array_merge($sequences, $this->themeSequence($s)); + } else if ($this->isValidStyle($s)) { + $sequences[] = $this->styleSequence($s); + } else { + throw new InvalidStyleException($s); + } + } + + $sequences = array_filter($sequences, function ($val) { + return $val !== null; + }); + + if (empty($sequences)) { + return $text; + } + + return $this->escSequence(implode(';', $sequences)) . $text . $this->escSequence(self::RESET_STYLE); + } + + /** + * @param bool $forceStyle + */ + public function setForceStyle($forceStyle) + { + $this->forceStyle = (bool) $forceStyle; + } + + /** + * @return bool + */ + public function isStyleForced() + { + return $this->forceStyle; + } + + /** + * @param array $themes + * @throws InvalidStyleException + * @throws \InvalidArgumentException + */ + public function setThemes(array $themes) + { + $this->themes = array(); + foreach ($themes as $name => $styles) { + $this->addTheme($name, $styles); + } + } + + /** + * @param string $name + * @param array|string $styles + * @throws \InvalidArgumentException + * @throws InvalidStyleException + */ + public function addTheme($name, $styles) + { + if (is_string($styles)) { + $styles = array($styles); + } + if (!is_array($styles)) { + throw new \InvalidArgumentException("Style must be string or array."); + } + + foreach ($styles as $style) { + if (!$this->isValidStyle($style)) { + throw new InvalidStyleException($style); + } + } + + $this->themes[$name] = $styles; + } + + /** + * @return array + */ + public function getThemes() + { + return $this->themes; + } + + /** + * @param string $name + * @return bool + */ + public function hasTheme($name) + { + return isset($this->themes[$name]); + } + + /** + * @param string $name + */ + public function removeTheme($name) + { + unset($this->themes[$name]); + } + + /** + * @return bool + */ + public function isSupported() + { + if (DIRECTORY_SEPARATOR === '\\') { + return getenv('ANSICON') !== false || getenv('ConEmuANSI') === 'ON'; + } + + return function_exists('posix_isatty') && @posix_isatty(STDOUT); + } + + /** + * @return bool + */ + public function are256ColorsSupported() + { + return DIRECTORY_SEPARATOR === '/' && strpos(getenv('TERM'), '256color') !== false; + } + + /** + * @return array + */ + public function getPossibleStyles() + { + return array_keys($this->styles); + } + + /** + * @param string $name + * @return string + * @throws InvalidStyleException + */ + private function themeSequence($name) + { + $sequences = array(); + foreach ($this->themes[$name] as $style) { + $sequences[] = $this->styleSequence($style); + } + return $sequences; + } + + /** + * @param string $style + * @return string + * @throws InvalidStyleException + */ + private function styleSequence($style) + { + if (array_key_exists($style, $this->styles)) { + return $this->styles[$style]; + } + + if (!$this->are256ColorsSupported()) { + return null; + } + + preg_match(self::COLOR256_REGEXP, $style, $matches); + + $type = $matches[1] === 'bg_' ? self::BACKGROUND : self::FOREGROUND; + $value = $matches[2]; + + return "$type;5;$value"; + } + + /** + * @param string $style + * @return bool + */ + private function isValidStyle($style) + { + return array_key_exists($style, $this->styles) || preg_match(self::COLOR256_REGEXP, $style); + } + + /** + * @param string|int $value + * @return string + */ + private function escSequence($value) + { + return "\033[{$value}m"; + } +} \ No newline at end of file diff --git a/vendor/jakub-onderka/php-console-color/src/JakubOnderka/PhpConsoleColor/InvalidStyleException.php b/vendor/jakub-onderka/php-console-color/src/JakubOnderka/PhpConsoleColor/InvalidStyleException.php new file mode 100644 index 0000000..6f1586f --- /dev/null +++ b/vendor/jakub-onderka/php-console-color/src/JakubOnderka/PhpConsoleColor/InvalidStyleException.php @@ -0,0 +1,10 @@ +isSupportedForce = $isSupported; + } + + public function isSupported() + { + return $this->isSupportedForce; + } + + public function setAre256ColorsSupported($are256ColorsSupported) + { + $this->are256ColorsSupportedForce = $are256ColorsSupported; + } + + public function are256ColorsSupported() + { + return $this->are256ColorsSupportedForce; + } +} + +class ConsoleColorTest extends \PHPUnit_Framework_TestCase +{ + /** @var ConsoleColorWithForceSupport */ + private $uut; + + protected function setUp() + { + $this->uut = new ConsoleColorWithForceSupport(); + } + + public function testNone() + { + $output = $this->uut->apply('none', 'text'); + $this->assertEquals("text", $output); + } + + public function testBold() + { + $output = $this->uut->apply('bold', 'text'); + $this->assertEquals("\033[1mtext\033[0m", $output); + } + + public function testBoldColorsAreNotSupported() + { + $this->uut->setIsSupported(false); + + $output = $this->uut->apply('bold', 'text'); + $this->assertEquals("text", $output); + } + + public function testBoldColorsAreNotSupportedButAreForced() + { + $this->uut->setIsSupported(false); + $this->uut->setForceStyle(true); + + $output = $this->uut->apply('bold', 'text'); + $this->assertEquals("\033[1mtext\033[0m", $output); + } + + public function testDark() + { + $output = $this->uut->apply('dark', 'text'); + $this->assertEquals("\033[2mtext\033[0m", $output); + } + + public function testBoldAndDark() + { + $output = $this->uut->apply(array('bold', 'dark'), 'text'); + $this->assertEquals("\033[1;2mtext\033[0m", $output); + } + + public function test256ColorForeground() + { + $output = $this->uut->apply('color_255', 'text'); + $this->assertEquals("\033[38;5;255mtext\033[0m", $output); + } + + public function test256ColorWithoutSupport() + { + $this->uut->setAre256ColorsSupported(false); + + $output = $this->uut->apply('color_255', 'text'); + $this->assertEquals("text", $output); + } + + public function test256ColorBackground() + { + $output = $this->uut->apply('bg_color_255', 'text'); + $this->assertEquals("\033[48;5;255mtext\033[0m", $output); + } + + public function test256ColorForegroundAndBackground() + { + $output = $this->uut->apply(array('color_200', 'bg_color_255'), 'text'); + $this->assertEquals("\033[38;5;200;48;5;255mtext\033[0m", $output); + } + + public function testSetOwnTheme() + { + $this->uut->setThemes(array('bold_dark' => array('bold', 'dark'))); + $output = $this->uut->apply(array('bold_dark'), 'text'); + $this->assertEquals("\033[1;2mtext\033[0m", $output); + } + + public function testAddOwnTheme() + { + $this->uut->addTheme('bold_own', 'bold'); + $output = $this->uut->apply(array('bold_own'), 'text'); + $this->assertEquals("\033[1mtext\033[0m", $output); + } + + public function testAddOwnThemeArray() + { + $this->uut->addTheme('bold_dark', array('bold', 'dark')); + $output = $this->uut->apply(array('bold_dark'), 'text'); + $this->assertEquals("\033[1;2mtext\033[0m", $output); + } + + public function testOwnWithStyle() + { + $this->uut->addTheme('bold_dark', array('bold', 'dark')); + $output = $this->uut->apply(array('bold_dark', 'italic'), 'text'); + $this->assertEquals("\033[1;2;3mtext\033[0m", $output); + } + + public function testHasAndRemoveTheme() + { + $this->assertFalse($this->uut->hasTheme('bold_dark')); + + $this->uut->addTheme('bold_dark', array('bold', 'dark')); + $this->assertTrue($this->uut->hasTheme('bold_dark')); + + $this->uut->removeTheme('bold_dark'); + $this->assertFalse($this->uut->hasTheme('bold_dark')); + } + + public function testApplyInvalidArgument() + { + $this->setExpectedException('\InvalidArgumentException'); + $this->uut->apply(new stdClass(), 'text'); + } + + public function testApplyInvalidStyleName() + { + $this->setExpectedException('\JakubOnderka\PhpConsoleColor\InvalidStyleException'); + $this->uut->apply('invalid', 'text'); + } + + public function testApplyInvalid256Color() + { + $this->setExpectedException('\JakubOnderka\PhpConsoleColor\InvalidStyleException'); + $this->uut->apply('color_2134', 'text'); + } + + public function testThemeInvalidStyle() + { + $this->setExpectedException('\JakubOnderka\PhpConsoleColor\InvalidStyleException'); + $this->uut->addTheme('invalid', array('invalid')); + } + + public function testForceStyle() + { + $this->assertFalse($this->uut->isStyleForced()); + $this->uut->setForceStyle(true); + $this->assertTrue($this->uut->isStyleForced()); + } + + public function testGetPossibleStyles() + { + $this->assertInternalType('array', $this->uut->getPossibleStyles()); + $this->assertNotEmpty($this->uut->getPossibleStyles()); + } +} + diff --git a/vendor/jakub-onderka/php-console-color/tests/bootstrap.php b/vendor/jakub-onderka/php-console-color/tests/bootstrap.php new file mode 100644 index 0000000..7500417 --- /dev/null +++ b/vendor/jakub-onderka/php-console-color/tests/bootstrap.php @@ -0,0 +1,2 @@ +getWholeFile($fileContent); +``` + +------ + +[![Build Status](https://travis-ci.org/JakubOnderka/PHP-Console-Highlighter.svg?branch=master)](https://travis-ci.org/JakubOnderka/PHP-Console-Highlighter) diff --git a/vendor/jakub-onderka/php-console-highlighter/build.xml b/vendor/jakub-onderka/php-console-highlighter/build.xml new file mode 100644 index 0000000..d656ea9 --- /dev/null +++ b/vendor/jakub-onderka/php-console-highlighter/build.xml @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vendor/jakub-onderka/php-console-highlighter/composer.json b/vendor/jakub-onderka/php-console-highlighter/composer.json new file mode 100644 index 0000000..bd2f47a --- /dev/null +++ b/vendor/jakub-onderka/php-console-highlighter/composer.json @@ -0,0 +1,26 @@ +{ + "name": "jakub-onderka/php-console-highlighter", + "type": "library", + "license": "MIT", + "authors": [ + { + "name": "Jakub Onderka", + "email": "acci@acci.cz", + "homepage": "http://www.acci.cz/" + } + ], + "autoload": { + "psr-0": {"JakubOnderka\\PhpConsoleHighlighter": "src/"} + }, + "require": { + "php": ">=5.3.0", + "jakub-onderka/php-console-color": "~0.1" + }, + "require-dev": { + "phpunit/phpunit": "~4.0", + "jakub-onderka/php-parallel-lint": "~0.5", + "jakub-onderka/php-var-dump-check": "~0.1", + "squizlabs/php_codesniffer": "~1.5", + "jakub-onderka/php-code-style": "~1.0" + } +} diff --git a/vendor/jakub-onderka/php-console-highlighter/examples/snippet.php b/vendor/jakub-onderka/php-console-highlighter/examples/snippet.php new file mode 100644 index 0000000..1bf6ac3 --- /dev/null +++ b/vendor/jakub-onderka/php-console-highlighter/examples/snippet.php @@ -0,0 +1,10 @@ +getCodeSnippet($fileContent, 3); \ No newline at end of file diff --git a/vendor/jakub-onderka/php-console-highlighter/examples/whole_file.php b/vendor/jakub-onderka/php-console-highlighter/examples/whole_file.php new file mode 100644 index 0000000..2a023d8 --- /dev/null +++ b/vendor/jakub-onderka/php-console-highlighter/examples/whole_file.php @@ -0,0 +1,10 @@ +getWholeFile($fileContent); \ No newline at end of file diff --git a/vendor/jakub-onderka/php-console-highlighter/examples/whole_file_line_numbers.php b/vendor/jakub-onderka/php-console-highlighter/examples/whole_file_line_numbers.php new file mode 100644 index 0000000..f9178f2 --- /dev/null +++ b/vendor/jakub-onderka/php-console-highlighter/examples/whole_file_line_numbers.php @@ -0,0 +1,10 @@ +getWholeFileWithLineNumbers($fileContent); \ No newline at end of file diff --git a/vendor/jakub-onderka/php-console-highlighter/phpunit.xml b/vendor/jakub-onderka/php-console-highlighter/phpunit.xml new file mode 100644 index 0000000..74011d9 --- /dev/null +++ b/vendor/jakub-onderka/php-console-highlighter/phpunit.xml @@ -0,0 +1,15 @@ + + + + + tests/* + + + + + + + vendor + + + \ No newline at end of file diff --git a/vendor/jakub-onderka/php-console-highlighter/src/JakubOnderka/PhpConsoleHighlighter/Highlighter.php b/vendor/jakub-onderka/php-console-highlighter/src/JakubOnderka/PhpConsoleHighlighter/Highlighter.php new file mode 100644 index 0000000..b908e93 --- /dev/null +++ b/vendor/jakub-onderka/php-console-highlighter/src/JakubOnderka/PhpConsoleHighlighter/Highlighter.php @@ -0,0 +1,267 @@ + 'red', + self::TOKEN_COMMENT => 'yellow', + self::TOKEN_KEYWORD => 'green', + self::TOKEN_DEFAULT => 'default', + self::TOKEN_HTML => 'cyan', + + self::ACTUAL_LINE_MARK => 'red', + self::LINE_NUMBER => 'dark_gray', + ); + + /** + * @param ConsoleColor $color + */ + public function __construct(ConsoleColor $color) + { + $this->color = $color; + + foreach ($this->defaultTheme as $name => $styles) { + if (!$this->color->hasTheme($name)) { + $this->color->addTheme($name, $styles); + } + } + } + + /** + * @param string $source + * @param int $lineNumber + * @param int $linesBefore + * @param int $linesAfter + * @return string + * @throws \JakubOnderka\PhpConsoleColor\InvalidStyleException + * @throws \InvalidArgumentException + */ + public function getCodeSnippet($source, $lineNumber, $linesBefore = 2, $linesAfter = 2) + { + $tokenLines = $this->getHighlightedLines($source); + + $offset = $lineNumber - $linesBefore - 1; + $offset = max($offset, 0); + $length = $linesAfter + $linesBefore + 1; + $tokenLines = array_slice($tokenLines, $offset, $length, $preserveKeys = true); + + $lines = $this->colorLines($tokenLines); + + return $this->lineNumbers($lines, $lineNumber); + } + + /** + * @param string $source + * @return string + * @throws \JakubOnderka\PhpConsoleColor\InvalidStyleException + * @throws \InvalidArgumentException + */ + public function getWholeFile($source) + { + $tokenLines = $this->getHighlightedLines($source); + $lines = $this->colorLines($tokenLines); + return implode(PHP_EOL, $lines); + } + + /** + * @param string $source + * @return string + * @throws \JakubOnderka\PhpConsoleColor\InvalidStyleException + * @throws \InvalidArgumentException + */ + public function getWholeFileWithLineNumbers($source) + { + $tokenLines = $this->getHighlightedLines($source); + $lines = $this->colorLines($tokenLines); + return $this->lineNumbers($lines); + } + + /** + * @param string $source + * @return array + */ + private function getHighlightedLines($source) + { + $source = str_replace(array("\r\n", "\r"), "\n", $source); + $tokens = $this->tokenize($source); + return $this->splitToLines($tokens); + } + + /** + * @param string $source + * @return array + */ + private function tokenize($source) + { + $tokens = token_get_all($source); + + $output = array(); + $currentType = null; + $buffer = ''; + + foreach ($tokens as $token) { + if (is_array($token)) { + switch ($token[0]) { + case T_INLINE_HTML: + $newType = self::TOKEN_HTML; + break; + + case T_COMMENT: + case T_DOC_COMMENT: + $newType = self::TOKEN_COMMENT; + break; + + case T_ENCAPSED_AND_WHITESPACE: + case T_CONSTANT_ENCAPSED_STRING: + $newType = self::TOKEN_STRING; + break; + + case T_WHITESPACE: + break; + + case T_OPEN_TAG: + case T_OPEN_TAG_WITH_ECHO: + case T_CLOSE_TAG: + case T_STRING: + case T_VARIABLE: + + // Constants + case T_DIR: + case T_FILE: + case T_METHOD_C: + case T_DNUMBER: + case T_LNUMBER: + case T_NS_C: + case T_LINE: + case T_CLASS_C: + case T_FUNC_C: + //case T_TRAIT_C: + $newType = self::TOKEN_DEFAULT; + break; + + default: + // Compatibility with PHP 5.3 + if (defined('T_TRAIT_C') && $token[0] === T_TRAIT_C) { + $newType = self::TOKEN_DEFAULT; + } else { + $newType = self::TOKEN_KEYWORD; + } + } + } else { + $newType = $token === '"' ? self::TOKEN_STRING : self::TOKEN_KEYWORD; + } + + if ($currentType === null) { + $currentType = $newType; + } + + if ($currentType != $newType) { + $output[] = array($currentType, $buffer); + $buffer = ''; + $currentType = $newType; + } + + $buffer .= is_array($token) ? $token[1] : $token; + } + + if (isset($newType)) { + $output[] = array($newType, $buffer); + } + + return $output; + } + + /** + * @param array $tokens + * @return array + */ + private function splitToLines(array $tokens) + { + $lines = array(); + + $line = array(); + foreach ($tokens as $token) { + foreach (explode("\n", $token[1]) as $count => $tokenLine) { + if ($count > 0) { + $lines[] = $line; + $line = array(); + } + + if ($tokenLine === '') { + continue; + } + + $line[] = array($token[0], $tokenLine); + } + } + + $lines[] = $line; + + return $lines; + } + + /** + * @param array $tokenLines + * @return array + * @throws \JakubOnderka\PhpConsoleColor\InvalidStyleException + * @throws \InvalidArgumentException + */ + private function colorLines(array $tokenLines) + { + $lines = array(); + foreach ($tokenLines as $lineCount => $tokenLine) { + $line = ''; + foreach ($tokenLine as $token) { + list($tokenType, $tokenValue) = $token; + if ($this->color->hasTheme($tokenType)) { + $line .= $this->color->apply($tokenType, $tokenValue); + } else { + $line .= $tokenValue; + } + } + $lines[$lineCount] = $line; + } + + return $lines; + } + + /** + * @param array $lines + * @param null|int $markLine + * @return string + * @throws \JakubOnderka\PhpConsoleColor\InvalidStyleException + */ + private function lineNumbers(array $lines, $markLine = null) + { + end($lines); + $lineStrlen = strlen(key($lines) + 1); + + $snippet = ''; + foreach ($lines as $i => $line) { + if ($markLine !== null) { + $snippet .= ($markLine === $i + 1 ? $this->color->apply(self::ACTUAL_LINE_MARK, ' > ') : ' '); + } + + $snippet .= $this->color->apply(self::LINE_NUMBER, str_pad($i + 1, $lineStrlen, ' ', STR_PAD_LEFT) . '| '); + $snippet .= $line . PHP_EOL; + } + + return $snippet; + } +} \ No newline at end of file diff --git a/vendor/jakub-onderka/php-console-highlighter/tests/JakubOnderka/PhpConsoleHighligter/HigligterTest.php b/vendor/jakub-onderka/php-console-highlighter/tests/JakubOnderka/PhpConsoleHighligter/HigligterTest.php new file mode 100644 index 0000000..269d03d --- /dev/null +++ b/vendor/jakub-onderka/php-console-highlighter/tests/JakubOnderka/PhpConsoleHighligter/HigligterTest.php @@ -0,0 +1,263 @@ +getMock('\JakubOnderka\PhpConsoleColor\ConsoleColor'); + + $mock->expects($this->any()) + ->method('apply') + ->will($this->returnCallback(function ($style, $text) { + return "<$style>$text"; + })); + + $mock->expects($this->any()) + ->method('hasTheme') + ->will($this->returnValue(true)); + + return $mock; + } + + protected function setUp() + { + $this->uut = new Highlighter($this->getConsoleColorMock()); + } + + protected function compare($original, $expected) + { + $output = $this->uut->getWholeFile($original); + $this->assertEquals($expected, $output); + } + + public function testVariable() + { + $this->compare( + << +echo \$a; +EOL + ); + } + + public function testInteger() + { + $this->compare( + << +echo 43; +EOL + ); + } + + public function testFloat() + { + $this->compare( + << +echo 43.3; +EOL + ); + } + + public function testHex() + { + $this->compare( + << +echo 0x43; +EOL + ); + } + + public function testBasicFunction() + { + $this->compare( + << +function plus(\$a, \$b) { + return \$a + \$b; +} +EOL + ); + } + + public function testStringNormal() + { + $this->compare( + << +echo 'Ahoj světe'; +EOL + ); + } + + public function testStringDouble() + { + $this->compare( + << +echo "Ahoj světe"; +EOL + ); + } + + public function testInstanceof() + { + $this->compare( + << +\$a instanceof stdClass; +EOL + ); + } + + /* + * Constants + */ + public function testConstant() + { + $constants = array( + '__FILE__', + '__LINE__', + '__CLASS__', + '__FUNCTION__', + '__METHOD__', + '__TRAIT__', + '__DIR__', + '__NAMESPACE__' + ); + + foreach ($constants as $constant) { + $this->compare( + << +$constant; +EOL + ); + } + } + + /* + * Comments + */ + public function testComment() + { + $this->compare( + << +/* Ahoj */ +EOL + ); + } + + public function testDocComment() + { + $this->compare( + << +/** Ahoj */ +EOL + ); + } + + public function testInlineComment() + { + $this->compare( + << +// Ahoj +EOL + ); + } + + public function testHashComment() + { + $this->compare( + << +# Ahoj +EOL + ); + } + + public function testEmpty() + { + $this->compare( + '' + , + '' + ); + } +} \ No newline at end of file diff --git a/vendor/jakub-onderka/php-console-highlighter/tests/bootstrap.php b/vendor/jakub-onderka/php-console-highlighter/tests/bootstrap.php new file mode 100644 index 0000000..7500417 --- /dev/null +++ b/vendor/jakub-onderka/php-console-highlighter/tests/bootstrap.php @@ -0,0 +1,2 @@ +

+ +

+Build Status +Total Downloads +Latest Stable Version +License +

+ +## About Laravel + +> **Note:** This repository contains the core code of the Laravel framework. If you want to build an application using Laravel 5, visit the main [Laravel repository](https://github.com/laravel/laravel). + +Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable, creative experience to be truly fulfilling. Laravel attempts to take the pain out of development by easing common tasks used in the majority of web projects, such as: + +- [Simple, fast routing engine](https://laravel.com/docs/routing). +- [Powerful dependency injection container](https://laravel.com/docs/container). +- Multiple back-ends for [session](https://laravel.com/docs/session) and [cache](https://laravel.com/docs/cache) storage. +- Database agnostic [schema migrations](https://laravel.com/docs/migrations). +- [Robust background job processing](https://laravel.com/docs/queues). +- [Real-time event broadcasting](https://laravel.com/docs/broadcasting). + +Laravel is accessible, yet powerful, providing tools needed for large, robust applications. A superb combination of simplicity, elegance, and innovation give you tools you need to build any application with which you are tasked. + +## Learning Laravel + +Laravel has the most extensive and thorough documentation and video tutorial library of any modern web application framework. The [Laravel documentation](https://laravel.com/docs) is thorough, complete, and makes it a breeze to get started learning the framework. + +If you're not in the mood to read, [Laracasts](https://laracasts.com) contains over 900 video tutorial on a range of topics including Laravel, modern PHP, unit testing, JavaScript, and more. Boost the skill level of yourself and your entire team by digging into our comprehensive video library. + +## Contributing + +Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](http://laravel.com/docs/contributions). + +## Security Vulnerabilities + +If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell at taylor@laravel.com. All security vulnerabilities will be promptly addressed. + +## License + +The Laravel framework is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT). diff --git a/vendor/laravel/framework/composer.json b/vendor/laravel/framework/composer.json new file mode 100644 index 0000000..88f81b3 --- /dev/null +++ b/vendor/laravel/framework/composer.json @@ -0,0 +1,126 @@ +{ + "name": "laravel/framework", + "description": "The Laravel Framework.", + "keywords": ["framework", "laravel"], + "license": "MIT", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "require": { + "php": ">=5.6.4", + "ext-mbstring": "*", + "ext-openssl": "*", + "doctrine/inflector": "~1.0", + "erusev/parsedown": "~1.6", + "league/flysystem": "~1.0", + "monolog/monolog": "~1.11", + "mtdowling/cron-expression": "~1.0", + "nesbot/carbon": "~1.20", + "paragonie/random_compat": "~1.4|~2.0", + "ramsey/uuid": "~3.0", + "swiftmailer/swiftmailer": "~5.4", + "symfony/console": "~3.2", + "symfony/debug": "~3.2", + "symfony/finder": "~3.2", + "symfony/http-foundation": "~3.2", + "symfony/http-kernel": "~3.2", + "symfony/process": "~3.2", + "symfony/routing": "~3.2", + "symfony/var-dumper": "~3.2", + "tijsverkoyen/css-to-inline-styles": "~2.2", + "vlucas/phpdotenv": "~2.2" + }, + "replace": { + "illuminate/auth": "self.version", + "illuminate/broadcasting": "self.version", + "illuminate/bus": "self.version", + "illuminate/cache": "self.version", + "illuminate/config": "self.version", + "illuminate/console": "self.version", + "illuminate/container": "self.version", + "illuminate/contracts": "self.version", + "illuminate/cookie": "self.version", + "illuminate/database": "self.version", + "illuminate/encryption": "self.version", + "illuminate/events": "self.version", + "illuminate/exception": "self.version", + "illuminate/filesystem": "self.version", + "illuminate/hashing": "self.version", + "illuminate/http": "self.version", + "illuminate/log": "self.version", + "illuminate/mail": "self.version", + "illuminate/notifications": "self.version", + "illuminate/pagination": "self.version", + "illuminate/pipeline": "self.version", + "illuminate/queue": "self.version", + "illuminate/redis": "self.version", + "illuminate/routing": "self.version", + "illuminate/session": "self.version", + "illuminate/support": "self.version", + "illuminate/translation": "self.version", + "illuminate/validation": "self.version", + "illuminate/view": "self.version", + "tightenco/collect": "self.version" + }, + "require-dev": { + "aws/aws-sdk-php": "~3.0", + "doctrine/dbal": "~2.5", + "mockery/mockery": "~0.9.4", + "pda/pheanstalk": "~3.0", + "phpunit/phpunit": "~5.7", + "predis/predis": "~1.0", + "symfony/css-selector": "~3.2", + "symfony/dom-crawler": "~3.2" + }, + "autoload": { + "files": [ + "src/Illuminate/Foundation/helpers.php", + "src/Illuminate/Support/helpers.php" + ], + "psr-4": { + "Illuminate\\": "src/Illuminate/" + } + }, + "autoload-dev": { + "files": [ + "tests/Database/stubs/MigrationCreatorFakeMigration.php" + ], + "psr-4": { + "Illuminate\\Tests\\": "tests/" + } + }, + "extra": { + "branch-alias": { + "dev-master": "5.4-dev" + } + }, + "suggest": { + "aws/aws-sdk-php": "Required to use the SQS queue driver and SES mail driver (~3.0).", + "doctrine/dbal": "Required to rename columns and drop SQLite columns (~2.5).", + "fzaninotto/faker": "Required to use the eloquent factory builder (~1.4).", + "guzzlehttp/guzzle": "Required to use the Mailgun and Mandrill mail drivers and the ping methods on schedules (~6.0).", + "laravel/tinker": "Required to use the tinker console command (~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).", + "nexmo/client": "Required to use the Nexmo transport (~1.0).", + "pda/pheanstalk": "Required to use the beanstalk queue driver (~3.0).", + "predis/predis": "Required to use the redis cache and queue drivers (~1.0).", + "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (~2.0).", + "symfony/css-selector": "Required to use some of the crawler integration testing tools (~3.2).", + "symfony/dom-crawler": "Required to use most of the crawler integration testing tools (~3.2).", + "symfony/psr-http-message-bridge": "Required to psr7 bridging features (0.2.*)." + }, + "config": { + "sort-packages": true + }, + "minimum-stability": "dev", + "prefer-stable": true +} diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Access/AuthorizationException.php b/vendor/laravel/framework/src/Illuminate/Auth/Access/AuthorizationException.php new file mode 100644 index 0000000..dc0753e --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Auth/Access/AuthorizationException.php @@ -0,0 +1,10 @@ +policies = $policies; + $this->container = $container; + $this->abilities = $abilities; + $this->userResolver = $userResolver; + $this->afterCallbacks = $afterCallbacks; + $this->beforeCallbacks = $beforeCallbacks; + } + + /** + * Determine if a given ability has been defined. + * + * @param string $ability + * @return bool + */ + public function has($ability) + { + return isset($this->abilities[$ability]); + } + + /** + * Define a new ability. + * + * @param string $ability + * @param callable|string $callback + * @return $this + * + * @throws \InvalidArgumentException + */ + public function define($ability, $callback) + { + if (is_callable($callback)) { + $this->abilities[$ability] = $callback; + } elseif (is_string($callback) && Str::contains($callback, '@')) { + $this->abilities[$ability] = $this->buildAbilityCallback($callback); + } else { + throw new InvalidArgumentException("Callback must be a callable or a 'Class@method' string."); + } + + return $this; + } + + /** + * Create the ability callback for a callback string. + * + * @param string $callback + * @return \Closure + */ + protected function buildAbilityCallback($callback) + { + return function () use ($callback) { + list($class, $method) = Str::parseCallback($callback); + + return $this->resolvePolicy($class)->{$method}(...func_get_args()); + }; + } + + /** + * Define a policy class for a given class type. + * + * @param string $class + * @param string $policy + * @return $this + */ + public function policy($class, $policy) + { + $this->policies[$class] = $policy; + + return $this; + } + + /** + * Register a callback to run before all Gate checks. + * + * @param callable $callback + * @return $this + */ + public function before(callable $callback) + { + $this->beforeCallbacks[] = $callback; + + return $this; + } + + /** + * Register a callback to run after all Gate checks. + * + * @param callable $callback + * @return $this + */ + public function after(callable $callback) + { + $this->afterCallbacks[] = $callback; + + return $this; + } + + /** + * Determine if the given ability should be granted for the current user. + * + * @param string $ability + * @param array|mixed $arguments + * @return bool + */ + public function allows($ability, $arguments = []) + { + return $this->check($ability, $arguments); + } + + /** + * Determine if the given ability should be denied for the current user. + * + * @param string $ability + * @param array|mixed $arguments + * @return bool + */ + public function denies($ability, $arguments = []) + { + return ! $this->allows($ability, $arguments); + } + + /** + * Determine if the given ability should be granted for the current user. + * + * @param string $ability + * @param array|mixed $arguments + * @return bool + */ + public function check($ability, $arguments = []) + { + try { + return (bool) $this->raw($ability, $arguments); + } catch (AuthorizationException $e) { + return false; + } + } + + /** + * Determine if the given ability should be granted for the current user. + * + * @param string $ability + * @param array|mixed $arguments + * @return \Illuminate\Auth\Access\Response + * + * @throws \Illuminate\Auth\Access\AuthorizationException + */ + public function authorize($ability, $arguments = []) + { + $result = $this->raw($ability, $arguments); + + if ($result instanceof Response) { + return $result; + } + + return $result ? $this->allow() : $this->deny(); + } + + /** + * Get the raw result from the authorization callback. + * + * @param string $ability + * @param array|mixed $arguments + * @return mixed + */ + protected function raw($ability, $arguments = []) + { + if (! $user = $this->resolveUser()) { + return false; + } + + $arguments = array_wrap($arguments); + + // First we will call the "before" callbacks for the Gate. If any of these give + // back a non-null response, we will immediately return that result in order + // to let the developers override all checks for some authorization cases. + $result = $this->callBeforeCallbacks( + $user, $ability, $arguments + ); + + if (is_null($result)) { + $result = $this->callAuthCallback($user, $ability, $arguments); + } + + // After calling the authorization callback, we will call the "after" callbacks + // that are registered with the Gate, which allows a developer to do logging + // if that is required for this application. Then we'll return the result. + $this->callAfterCallbacks( + $user, $ability, $arguments, $result + ); + + return $result; + } + + /** + * Resolve and call the appropriate authorization callback. + * + * @param \Illuminate\Contracts\Auth\Authenticatable $user + * @param string $ability + * @param array $arguments + * @return bool + */ + protected function callAuthCallback($user, $ability, array $arguments) + { + $callback = $this->resolveAuthCallback($user, $ability, $arguments); + + return $callback($user, ...$arguments); + } + + /** + * Call all of the before callbacks and return if a result is given. + * + * @param \Illuminate\Contracts\Auth\Authenticatable $user + * @param string $ability + * @param array $arguments + * @return bool|null + */ + protected function callBeforeCallbacks($user, $ability, array $arguments) + { + $arguments = array_merge([$user, $ability], [$arguments]); + + foreach ($this->beforeCallbacks as $before) { + if (! is_null($result = $before(...$arguments))) { + return $result; + } + } + } + + /** + * Call all of the after callbacks with check result. + * + * @param \Illuminate\Contracts\Auth\Authenticatable $user + * @param string $ability + * @param array $arguments + * @param bool $result + * @return void + */ + protected function callAfterCallbacks($user, $ability, array $arguments, $result) + { + $arguments = array_merge([$user, $ability, $result], [$arguments]); + + foreach ($this->afterCallbacks as $after) { + $after(...$arguments); + } + } + + /** + * Resolve the callable for the given ability and arguments. + * + * @param \Illuminate\Contracts\Auth\Authenticatable $user + * @param string $ability + * @param array $arguments + * @return callable + */ + protected function resolveAuthCallback($user, $ability, array $arguments) + { + if (isset($arguments[0])) { + if (! is_null($policy = $this->getPolicyFor($arguments[0]))) { + return $this->resolvePolicyCallback($user, $ability, $arguments, $policy); + } + } + + if (isset($this->abilities[$ability])) { + return $this->abilities[$ability]; + } else { + return function () { + return false; + }; + } + } + + /** + * Get a policy instance for a given class. + * + * @param object|string $class + * @return mixed + */ + public function getPolicyFor($class) + { + if (is_object($class)) { + $class = get_class($class); + } + + if (! is_string($class)) { + return null; + } + + if (isset($this->policies[$class])) { + return $this->resolvePolicy($this->policies[$class]); + } + + foreach ($this->policies as $expected => $policy) { + if (is_subclass_of($class, $expected)) { + return $this->resolvePolicy($policy); + } + } + } + + /** + * Build a policy class instance of the given type. + * + * @param object|string $class + * @return mixed + */ + public function resolvePolicy($class) + { + return $this->container->make($class); + } + + /** + * Resolve the callback for a policy check. + * + * @param \Illuminate\Contracts\Auth\Authenticatable $user + * @param string $ability + * @param array $arguments + * @param mixed $policy + * @return callable + */ + protected function resolvePolicyCallback($user, $ability, array $arguments, $policy) + { + return function () use ($user, $ability, $arguments, $policy) { + // This callback will be responsible for calling the policy's before method and + // running this policy method if necessary. This is used to when objects are + // mapped to policy objects in the user's configurations or on this class. + $result = $this->callPolicyBefore( + $policy, $user, $ability, $arguments + ); + + // When we receive a non-null result from this before method, we will return it + // as the "final" results. This will allow developers to override the checks + // in this policy to return the result for all rules defined in the class. + if (! is_null($result)) { + return $result; + } + + $ability = $this->formatAbilityToMethod($ability); + + // If this first argument is a string, that means they are passing a class name + // to the policy. We will remove the first argument from this argument array + // because this policy already knows what type of models it can authorize. + if (isset($arguments[0]) && is_string($arguments[0])) { + array_shift($arguments); + } + + return is_callable([$policy, $ability]) + ? $policy->{$ability}($user, ...$arguments) + : false; + }; + } + + /** + * Call the "before" method on the given policy, if applicable. + * + * @param mixed $policy + * @param \Illuminate\Contracts\Auth\Authenticatable $user + * @param string $ability + * @param array $arguments + * @return mixed + */ + protected function callPolicyBefore($policy, $user, $ability, $arguments) + { + if (method_exists($policy, 'before')) { + return $policy->before($user, $ability, ...$arguments); + } + } + + /** + * Format the policy ability into a method name. + * + * @param string $ability + * @return string + */ + protected function formatAbilityToMethod($ability) + { + return strpos($ability, '-') !== false ? Str::camel($ability) : $ability; + } + + /** + * Get a gate instance for the given user. + * + * @param \Illuminate\Contracts\Auth\Authenticatable|mixed $user + * @return static + */ + public function forUser($user) + { + $callback = function () use ($user) { + return $user; + }; + + return new static( + $this->container, $callback, $this->abilities, + $this->policies, $this->beforeCallbacks, $this->afterCallbacks + ); + } + + /** + * Resolve the user from the user resolver. + * + * @return mixed + */ + protected function resolveUser() + { + return call_user_func($this->userResolver); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Access/HandlesAuthorization.php b/vendor/laravel/framework/src/Illuminate/Auth/Access/HandlesAuthorization.php new file mode 100644 index 0000000..1a597bb --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Auth/Access/HandlesAuthorization.php @@ -0,0 +1,30 @@ +message = $message; + } + + /** + * Get the response message. + * + * @return string|null + */ + public function message() + { + return $this->message; + } + + /** + * Get the string representation of the message. + * + * @return string + */ + public function __toString() + { + return $this->message(); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Auth/AuthManager.php b/vendor/laravel/framework/src/Illuminate/Auth/AuthManager.php new file mode 100755 index 0000000..9844672 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Auth/AuthManager.php @@ -0,0 +1,296 @@ +app = $app; + + $this->userResolver = function ($guard = null) { + return $this->guard($guard)->user(); + }; + } + + /** + * Attempt to get the guard from the local cache. + * + * @param string $name + * @return \Illuminate\Contracts\Auth\Guard|\Illuminate\Contracts\Auth\StatefulGuard + */ + public function guard($name = null) + { + $name = $name ?: $this->getDefaultDriver(); + + return isset($this->guards[$name]) + ? $this->guards[$name] + : $this->guards[$name] = $this->resolve($name); + } + + /** + * Resolve the given guard. + * + * @param string $name + * @return \Illuminate\Contracts\Auth\Guard|\Illuminate\Contracts\Auth\StatefulGuard + * + * @throws \InvalidArgumentException + */ + protected function resolve($name) + { + $config = $this->getConfig($name); + + if (is_null($config)) { + throw new InvalidArgumentException("Auth guard [{$name}] is not defined."); + } + + if (isset($this->customCreators[$config['driver']])) { + return $this->callCustomCreator($name, $config); + } + + $driverMethod = 'create'.ucfirst($config['driver']).'Driver'; + + if (method_exists($this, $driverMethod)) { + return $this->{$driverMethod}($name, $config); + } + + throw new InvalidArgumentException("Auth guard driver [{$name}] is not defined."); + } + + /** + * Call a custom driver creator. + * + * @param string $name + * @param array $config + * @return mixed + */ + protected function callCustomCreator($name, array $config) + { + return $this->customCreators[$config['driver']]($this->app, $name, $config); + } + + /** + * Create a session based authentication guard. + * + * @param string $name + * @param array $config + * @return \Illuminate\Auth\SessionGuard + */ + public function createSessionDriver($name, $config) + { + $provider = $this->createUserProvider($config['provider']); + + $guard = new SessionGuard($name, $provider, $this->app['session.store']); + + // When using the remember me functionality of the authentication services we + // will need to be set the encryption instance of the guard, which allows + // secure, encrypted cookie values to get generated for those cookies. + if (method_exists($guard, 'setCookieJar')) { + $guard->setCookieJar($this->app['cookie']); + } + + if (method_exists($guard, 'setDispatcher')) { + $guard->setDispatcher($this->app['events']); + } + + if (method_exists($guard, 'setRequest')) { + $guard->setRequest($this->app->refresh('request', $guard, 'setRequest')); + } + + return $guard; + } + + /** + * Create a token based authentication guard. + * + * @param string $name + * @param array $config + * @return \Illuminate\Auth\TokenGuard + */ + public function createTokenDriver($name, $config) + { + // The token guard implements a basic API token based guard implementation + // that takes an API token field from the request and matches it to the + // user in the database or another persistence layer where users are. + $guard = new TokenGuard( + $this->createUserProvider($config['provider']), + $this->app['request'] + ); + + $this->app->refresh('request', $guard, 'setRequest'); + + return $guard; + } + + /** + * Get the guard configuration. + * + * @param string $name + * @return array + */ + protected function getConfig($name) + { + return $this->app['config']["auth.guards.{$name}"]; + } + + /** + * Get the default authentication driver name. + * + * @return string + */ + public function getDefaultDriver() + { + return $this->app['config']['auth.defaults.guard']; + } + + /** + * Set the default guard driver the factory should serve. + * + * @param string $name + * @return void + */ + public function shouldUse($name) + { + $name = $name ?: $this->getDefaultDriver(); + + $this->setDefaultDriver($name); + + $this->userResolver = function ($name = null) { + return $this->guard($name)->user(); + }; + } + + /** + * Set the default authentication driver name. + * + * @param string $name + * @return void + */ + public function setDefaultDriver($name) + { + $this->app['config']['auth.defaults.guard'] = $name; + } + + /** + * Register a new callback based request guard. + * + * @param string $driver + * @param callable $callback + * @return $this + */ + public function viaRequest($driver, callable $callback) + { + return $this->extend($driver, function () use ($callback) { + $guard = new RequestGuard($callback, $this->app['request']); + + $this->app->refresh('request', $guard, 'setRequest'); + + return $guard; + }); + } + + /** + * Get the user resolver callback. + * + * @return \Closure + */ + public function userResolver() + { + return $this->userResolver; + } + + /** + * Set the callback to be used to resolve users. + * + * @param \Closure $userResolver + * @return $this + */ + public function resolveUsersUsing(Closure $userResolver) + { + $this->userResolver = $userResolver; + + return $this; + } + + /** + * Register a custom driver creator Closure. + * + * @param string $driver + * @param \Closure $callback + * @return $this + */ + public function extend($driver, Closure $callback) + { + $this->customCreators[$driver] = $callback; + + return $this; + } + + /** + * Register a custom provider creator Closure. + * + * @param string $name + * @param \Closure $callback + * @return $this + */ + public function provider($name, Closure $callback) + { + $this->customProviderCreators[$name] = $callback; + + return $this; + } + + /** + * Dynamically call the default driver instance. + * + * @param string $method + * @param array $parameters + * @return mixed + */ + public function __call($method, $parameters) + { + return $this->guard()->{$method}(...$parameters); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Auth/AuthServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Auth/AuthServiceProvider.php new file mode 100755 index 0000000..2820beb --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Auth/AuthServiceProvider.php @@ -0,0 +1,90 @@ +registerAuthenticator(); + + $this->registerUserResolver(); + + $this->registerAccessGate(); + + $this->registerRequestRebindHandler(); + } + + /** + * Register the authenticator services. + * + * @return void + */ + protected function registerAuthenticator() + { + $this->app->singleton('auth', function ($app) { + // Once the authentication service has actually been requested by the developer + // we will set a variable in the application indicating such. This helps us + // know that we need to set any queued cookies in the after event later. + $app['auth.loaded'] = true; + + return new AuthManager($app); + }); + + $this->app->singleton('auth.driver', function ($app) { + return $app['auth']->guard(); + }); + } + + /** + * Register a resolver for the authenticated user. + * + * @return void + */ + protected function registerUserResolver() + { + $this->app->bind( + AuthenticatableContract::class, function ($app) { + return call_user_func($app['auth']->userResolver()); + } + ); + } + + /** + * Register the access gate service. + * + * @return void + */ + protected function registerAccessGate() + { + $this->app->singleton(GateContract::class, function ($app) { + return new Gate($app, function () use ($app) { + return call_user_func($app['auth']->userResolver()); + }); + }); + } + + /** + * Register a resolver for the authenticated user. + * + * @return void + */ + protected function registerRequestRebindHandler() + { + $this->app->rebinding('request', function ($app, $request) { + $request->setUserResolver(function ($guard = null) use ($app) { + return call_user_func($app['auth']->userResolver(), $guard); + }); + }); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Authenticatable.php b/vendor/laravel/framework/src/Illuminate/Auth/Authenticatable.php new file mode 100644 index 0000000..0c4f12c --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Auth/Authenticatable.php @@ -0,0 +1,78 @@ +getKeyName(); + } + + /** + * Get the unique identifier for the user. + * + * @return mixed + */ + public function getAuthIdentifier() + { + return $this->getKey(); + } + + /** + * Get the password for the user. + * + * @return string + */ + public function getAuthPassword() + { + return $this->password; + } + + /** + * Get the token value for the "remember me" session. + * + * @return string + */ + public function getRememberToken() + { + if (! empty($this->getRememberTokenName())) { + return $this->{$this->getRememberTokenName()}; + } + } + + /** + * Set the token value for the "remember me" session. + * + * @param string $value + * @return void + */ + public function setRememberToken($value) + { + if (! empty($this->getRememberTokenName())) { + $this->{$this->getRememberTokenName()} = $value; + } + } + + /** + * Get the column name for the "remember me" token. + * + * @return string + */ + public function getRememberTokenName() + { + return $this->rememberTokenName; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Auth/AuthenticationException.php b/vendor/laravel/framework/src/Illuminate/Auth/AuthenticationException.php new file mode 100644 index 0000000..3445b23 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Auth/AuthenticationException.php @@ -0,0 +1,39 @@ +guards = $guards; + } + + /** + * Get the guards that were checked. + * + * @return array + */ + public function guards() + { + return $this->guards; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Console/ClearResetsCommand.php b/vendor/laravel/framework/src/Illuminate/Auth/Console/ClearResetsCommand.php new file mode 100644 index 0000000..320e934 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Auth/Console/ClearResetsCommand.php @@ -0,0 +1,34 @@ +laravel['auth.password']->broker($this->argument('name'))->getRepository()->deleteExpired(); + + $this->info('Expired reset tokens cleared!'); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Console/MakeAuthCommand.php b/vendor/laravel/framework/src/Illuminate/Auth/Console/MakeAuthCommand.php new file mode 100644 index 0000000..b1db7db --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Auth/Console/MakeAuthCommand.php @@ -0,0 +1,119 @@ + 'auth/login.blade.php', + 'auth/register.stub' => 'auth/register.blade.php', + 'auth/passwords/email.stub' => 'auth/passwords/email.blade.php', + 'auth/passwords/reset.stub' => 'auth/passwords/reset.blade.php', + 'layouts/app.stub' => 'layouts/app.blade.php', + 'home.stub' => 'home.blade.php', + ]; + + /** + * Execute the console command. + * + * @return void + */ + public function fire() + { + $this->createDirectories(); + + $this->exportViews(); + + if (! $this->option('views')) { + file_put_contents( + app_path('Http/Controllers/HomeController.php'), + $this->compileControllerStub() + ); + + file_put_contents( + base_path('routes/web.php'), + file_get_contents(__DIR__.'/stubs/make/routes.stub'), + FILE_APPEND + ); + } + + $this->info('Authentication scaffolding generated successfully.'); + } + + /** + * Create the directories for the files. + * + * @return void + */ + protected function createDirectories() + { + if (! is_dir(resource_path('views/layouts'))) { + mkdir(resource_path('views/layouts'), 0755, true); + } + + if (! is_dir(resource_path('views/auth/passwords'))) { + mkdir(resource_path('views/auth/passwords'), 0755, true); + } + } + + /** + * Export the authentication views. + * + * @return void + */ + protected function exportViews() + { + foreach ($this->views as $key => $value) { + if (file_exists(resource_path('views/'.$value)) && ! $this->option('force')) { + if (! $this->confirm("The [{$value}] view already exists. Do you want to replace it?")) { + continue; + } + } + + copy( + __DIR__.'/stubs/make/views/'.$key, + resource_path('views/'.$value) + ); + } + } + + /** + * Compiles the HomeController stub. + * + * @return string + */ + protected function compileControllerStub() + { + return str_replace( + '{{namespace}}', + $this->getAppNamespace(), + file_get_contents(__DIR__.'/stubs/make/controllers/HomeController.stub') + ); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Console/stubs/make/controllers/HomeController.stub b/vendor/laravel/framework/src/Illuminate/Auth/Console/stubs/make/controllers/HomeController.stub new file mode 100644 index 0000000..8e0007a --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Auth/Console/stubs/make/controllers/HomeController.stub @@ -0,0 +1,28 @@ +middleware('auth'); + } + + /** + * Show the application dashboard. + * + * @return \Illuminate\Http\Response + */ + public function index() + { + return view('home'); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Console/stubs/make/routes.stub b/vendor/laravel/framework/src/Illuminate/Auth/Console/stubs/make/routes.stub new file mode 100644 index 0000000..70f3513 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Auth/Console/stubs/make/routes.stub @@ -0,0 +1,4 @@ + +Auth::routes(); + +Route::get('/home', 'HomeController@index'); diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Console/stubs/make/views/auth/login.stub b/vendor/laravel/framework/src/Illuminate/Auth/Console/stubs/make/views/auth/login.stub new file mode 100644 index 0000000..757d821 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Auth/Console/stubs/make/views/auth/login.stub @@ -0,0 +1,68 @@ +@extends('layouts.app') + +@section('content') +
+
+
+
+
Login
+
+
+ {{ csrf_field() }} + +
+ + +
+ + + @if ($errors->has('email')) + + {{ $errors->first('email') }} + + @endif +
+
+ +
+ + +
+ + + @if ($errors->has('password')) + + {{ $errors->first('password') }} + + @endif +
+
+ +
+
+
+ +
+
+
+ +
+
+ + + + Forgot Your Password? + +
+
+
+
+
+
+
+
+@endsection diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Console/stubs/make/views/auth/passwords/email.stub b/vendor/laravel/framework/src/Illuminate/Auth/Console/stubs/make/views/auth/passwords/email.stub new file mode 100644 index 0000000..e566cfb --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Auth/Console/stubs/make/views/auth/passwords/email.stub @@ -0,0 +1,46 @@ +@extends('layouts.app') + +@section('content') +
+
+
+
+
Reset Password
+
+ @if (session('status')) +
+ {{ session('status') }} +
+ @endif + +
+ {{ csrf_field() }} + +
+ + +
+ + + @if ($errors->has('email')) + + {{ $errors->first('email') }} + + @endif +
+
+ +
+
+ +
+
+
+
+
+
+
+
+@endsection diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Console/stubs/make/views/auth/passwords/reset.stub b/vendor/laravel/framework/src/Illuminate/Auth/Console/stubs/make/views/auth/passwords/reset.stub new file mode 100644 index 0000000..6ed9298 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Auth/Console/stubs/make/views/auth/passwords/reset.stub @@ -0,0 +1,76 @@ +@extends('layouts.app') + +@section('content') +
+
+
+
+
Reset Password
+ +
+ @if (session('status')) +
+ {{ session('status') }} +
+ @endif + +
+ {{ csrf_field() }} + + + +
+ + +
+ + + @if ($errors->has('email')) + + {{ $errors->first('email') }} + + @endif +
+
+ +
+ + +
+ + + @if ($errors->has('password')) + + {{ $errors->first('password') }} + + @endif +
+
+ +
+ +
+ + + @if ($errors->has('password_confirmation')) + + {{ $errors->first('password_confirmation') }} + + @endif +
+
+ +
+
+ +
+
+
+
+
+
+
+
+@endsection diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Console/stubs/make/views/auth/register.stub b/vendor/laravel/framework/src/Illuminate/Auth/Console/stubs/make/views/auth/register.stub new file mode 100644 index 0000000..83b9f0d --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Auth/Console/stubs/make/views/auth/register.stub @@ -0,0 +1,76 @@ +@extends('layouts.app') + +@section('content') +
+
+
+
+
Register
+
+
+ {{ csrf_field() }} + +
+ + +
+ + + @if ($errors->has('name')) + + {{ $errors->first('name') }} + + @endif +
+
+ +
+ + +
+ + + @if ($errors->has('email')) + + {{ $errors->first('email') }} + + @endif +
+
+ +
+ + +
+ + + @if ($errors->has('password')) + + {{ $errors->first('password') }} + + @endif +
+
+ +
+ + +
+ +
+
+ +
+
+ +
+
+
+
+
+
+
+
+@endsection diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Console/stubs/make/views/home.stub b/vendor/laravel/framework/src/Illuminate/Auth/Console/stubs/make/views/home.stub new file mode 100644 index 0000000..de73a98 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Auth/Console/stubs/make/views/home.stub @@ -0,0 +1,17 @@ +@extends('layouts.app') + +@section('content') +
+
+
+
+
Dashboard
+ +
+ You are logged in! +
+
+
+
+
+@endsection diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Console/stubs/make/views/layouts/app.stub b/vendor/laravel/framework/src/Illuminate/Auth/Console/stubs/make/views/layouts/app.stub new file mode 100644 index 0000000..6fec5f6 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Auth/Console/stubs/make/views/layouts/app.stub @@ -0,0 +1,87 @@ + + + + + + + + + + + {{ config('app.name', 'Laravel') }} + + + + + + + + +
+ + + @yield('content') +
+ + + + + diff --git a/vendor/laravel/framework/src/Illuminate/Auth/CreatesUserProviders.php b/vendor/laravel/framework/src/Illuminate/Auth/CreatesUserProviders.php new file mode 100644 index 0000000..715dee0 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Auth/CreatesUserProviders.php @@ -0,0 +1,67 @@ +app['config']['auth.providers.'.$provider]; + + if (isset($this->customProviderCreators[$config['driver']])) { + return call_user_func( + $this->customProviderCreators[$config['driver']], $this->app, $config + ); + } + + switch ($config['driver']) { + case 'database': + return $this->createDatabaseProvider($config); + case 'eloquent': + return $this->createEloquentProvider($config); + default: + throw new InvalidArgumentException("Authentication user provider [{$config['driver']}] is not defined."); + } + } + + /** + * Create an instance of the database user provider. + * + * @param array $config + * @return \Illuminate\Auth\DatabaseUserProvider + */ + protected function createDatabaseProvider($config) + { + $connection = $this->app['db']->connection(); + + return new DatabaseUserProvider($connection, $this->app['hash'], $config['table']); + } + + /** + * Create an instance of the Eloquent user provider. + * + * @param array $config + * @return \Illuminate\Auth\EloquentUserProvider + */ + protected function createEloquentProvider($config) + { + return new EloquentUserProvider($this->app['hash'], $config['model']); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Auth/DatabaseUserProvider.php b/vendor/laravel/framework/src/Illuminate/Auth/DatabaseUserProvider.php new file mode 100755 index 0000000..a94b74b --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Auth/DatabaseUserProvider.php @@ -0,0 +1,146 @@ +conn = $conn; + $this->table = $table; + $this->hasher = $hasher; + } + + /** + * Retrieve a user by their unique identifier. + * + * @param mixed $identifier + * @return \Illuminate\Contracts\Auth\Authenticatable|null + */ + public function retrieveById($identifier) + { + $user = $this->conn->table($this->table)->find($identifier); + + return $this->getGenericUser($user); + } + + /** + * Retrieve a user by their unique identifier and "remember me" token. + * + * @param mixed $identifier + * @param string $token + * @return \Illuminate\Contracts\Auth\Authenticatable|null + */ + public function retrieveByToken($identifier, $token) + { + $user = $this->conn->table($this->table) + ->where('id', $identifier) + ->where('remember_token', $token) + ->first(); + + return $this->getGenericUser($user); + } + + /** + * Update the "remember me" token for the given user in storage. + * + * @param \Illuminate\Contracts\Auth\Authenticatable $user + * @param string $token + * @return void + */ + public function updateRememberToken(UserContract $user, $token) + { + $this->conn->table($this->table) + ->where('id', $user->getAuthIdentifier()) + ->update(['remember_token' => $token]); + } + + /** + * Retrieve a user by the given credentials. + * + * @param array $credentials + * @return \Illuminate\Contracts\Auth\Authenticatable|null + */ + public function retrieveByCredentials(array $credentials) + { + // First we will add each credential element to the query as a where clause. + // Then we can execute the query and, if we found a user, return it in a + // generic "user" object that will be utilized by the Guard instances. + $query = $this->conn->table($this->table); + + foreach ($credentials as $key => $value) { + if (! Str::contains($key, 'password')) { + $query->where($key, $value); + } + } + + // Now we are ready to execute the query to see if we have an user matching + // the given credentials. If not, we will just return nulls and indicate + // that there are no matching users for these given credential arrays. + $user = $query->first(); + + return $this->getGenericUser($user); + } + + /** + * Get the generic user. + * + * @param mixed $user + * @return \Illuminate\Auth\GenericUser|null + */ + protected function getGenericUser($user) + { + if (! is_null($user)) { + return new GenericUser((array) $user); + } + } + + /** + * Validate a user against the given credentials. + * + * @param \Illuminate\Contracts\Auth\Authenticatable $user + * @param array $credentials + * @return bool + */ + public function validateCredentials(UserContract $user, array $credentials) + { + return $this->hasher->check( + $credentials['password'], $user->getAuthPassword() + ); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Auth/EloquentUserProvider.php b/vendor/laravel/framework/src/Illuminate/Auth/EloquentUserProvider.php new file mode 100755 index 0000000..423594e --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Auth/EloquentUserProvider.php @@ -0,0 +1,184 @@ +model = $model; + $this->hasher = $hasher; + } + + /** + * Retrieve a user by their unique identifier. + * + * @param mixed $identifier + * @return \Illuminate\Contracts\Auth\Authenticatable|null + */ + public function retrieveById($identifier) + { + return $this->createModel()->newQuery()->find($identifier); + } + + /** + * Retrieve a user by their unique identifier and "remember me" token. + * + * @param mixed $identifier + * @param string $token + * @return \Illuminate\Contracts\Auth\Authenticatable|null + */ + public function retrieveByToken($identifier, $token) + { + $model = $this->createModel(); + + return $model->newQuery() + ->where($model->getAuthIdentifierName(), $identifier) + ->where($model->getRememberTokenName(), $token) + ->first(); + } + + /** + * Update the "remember me" token for the given user in storage. + * + * @param \Illuminate\Contracts\Auth\Authenticatable $user + * @param string $token + * @return void + */ + public function updateRememberToken(UserContract $user, $token) + { + $user->setRememberToken($token); + + $timestamps = $user->timestamps; + + $user->timestamps = false; + + $user->save(); + + $user->timestamps = $timestamps; + } + + /** + * Retrieve a user by the given credentials. + * + * @param array $credentials + * @return \Illuminate\Contracts\Auth\Authenticatable|null + */ + public function retrieveByCredentials(array $credentials) + { + if (empty($credentials)) { + return; + } + + // First we will add each credential element to the query as a where clause. + // Then we can execute the query and, if we found a user, return it in a + // Eloquent User "model" that will be utilized by the Guard instances. + $query = $this->createModel()->newQuery(); + + foreach ($credentials as $key => $value) { + if (! Str::contains($key, 'password')) { + $query->where($key, $value); + } + } + + return $query->first(); + } + + /** + * Validate a user against the given credentials. + * + * @param \Illuminate\Contracts\Auth\Authenticatable $user + * @param array $credentials + * @return bool + */ + public function validateCredentials(UserContract $user, array $credentials) + { + $plain = $credentials['password']; + + return $this->hasher->check($plain, $user->getAuthPassword()); + } + + /** + * Create a new instance of the model. + * + * @return \Illuminate\Database\Eloquent\Model + */ + public function createModel() + { + $class = '\\'.ltrim($this->model, '\\'); + + return new $class; + } + + /** + * Gets the hasher implementation. + * + * @return \Illuminate\Contracts\Hashing\Hasher + */ + public function getHasher() + { + return $this->hasher; + } + + /** + * Sets the hasher implementation. + * + * @param \Illuminate\Contracts\Hashing\Hasher $hasher + * @return $this + */ + public function setHasher(HasherContract $hasher) + { + $this->hasher = $hasher; + + return $this; + } + + /** + * Gets the name of the Eloquent user model. + * + * @return string + */ + public function getModel() + { + return $this->model; + } + + /** + * Sets the name of the Eloquent user model. + * + * @param string $model + * @return $this + */ + public function setModel($model) + { + $this->model = $model; + + return $this; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Events/Attempting.php b/vendor/laravel/framework/src/Illuminate/Auth/Events/Attempting.php new file mode 100644 index 0000000..3d04730 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Auth/Events/Attempting.php @@ -0,0 +1,32 @@ +remember = $remember; + $this->credentials = $credentials; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Events/Authenticated.php b/vendor/laravel/framework/src/Illuminate/Auth/Events/Authenticated.php new file mode 100644 index 0000000..f33c198 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Auth/Events/Authenticated.php @@ -0,0 +1,28 @@ +user = $user; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Events/Failed.php b/vendor/laravel/framework/src/Illuminate/Auth/Events/Failed.php new file mode 100644 index 0000000..5807e8e --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Auth/Events/Failed.php @@ -0,0 +1,32 @@ +user = $user; + $this->credentials = $credentials; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Events/Lockout.php b/vendor/laravel/framework/src/Illuminate/Auth/Events/Lockout.php new file mode 100644 index 0000000..347943f --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Auth/Events/Lockout.php @@ -0,0 +1,26 @@ +request = $request; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Events/Login.php b/vendor/laravel/framework/src/Illuminate/Auth/Events/Login.php new file mode 100644 index 0000000..8816745 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Auth/Events/Login.php @@ -0,0 +1,37 @@ +user = $user; + $this->remember = $remember; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Events/Logout.php b/vendor/laravel/framework/src/Illuminate/Auth/Events/Logout.php new file mode 100644 index 0000000..ea788e7 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Auth/Events/Logout.php @@ -0,0 +1,28 @@ +user = $user; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Events/Registered.php b/vendor/laravel/framework/src/Illuminate/Auth/Events/Registered.php new file mode 100644 index 0000000..f84058c --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Auth/Events/Registered.php @@ -0,0 +1,28 @@ +user = $user; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Auth/GenericUser.php b/vendor/laravel/framework/src/Illuminate/Auth/GenericUser.php new file mode 100755 index 0000000..b6880c0 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Auth/GenericUser.php @@ -0,0 +1,134 @@ +attributes = $attributes; + } + + /** + * Get the name of the unique identifier for the user. + * + * @return string + */ + public function getAuthIdentifierName() + { + return 'id'; + } + + /** + * Get the unique identifier for the user. + * + * @return mixed + */ + public function getAuthIdentifier() + { + $name = $this->getAuthIdentifierName(); + + return $this->attributes[$name]; + } + + /** + * Get the password for the user. + * + * @return string + */ + public function getAuthPassword() + { + return $this->attributes['password']; + } + + /** + * Get the "remember me" token value. + * + * @return string + */ + public function getRememberToken() + { + return $this->attributes[$this->getRememberTokenName()]; + } + + /** + * Set the "remember me" token value. + * + * @param string $value + * @return void + */ + public function setRememberToken($value) + { + $this->attributes[$this->getRememberTokenName()] = $value; + } + + /** + * Get the column name for the "remember me" token. + * + * @return string + */ + public function getRememberTokenName() + { + return 'remember_token'; + } + + /** + * Dynamically access the user's attributes. + * + * @param string $key + * @return mixed + */ + public function __get($key) + { + return $this->attributes[$key]; + } + + /** + * Dynamically set an attribute on the user. + * + * @param string $key + * @param mixed $value + * @return void + */ + public function __set($key, $value) + { + $this->attributes[$key] = $value; + } + + /** + * Dynamically check if a value is set on the user. + * + * @param string $key + * @return bool + */ + public function __isset($key) + { + return isset($this->attributes[$key]); + } + + /** + * Dynamically unset a value on the user. + * + * @param string $key + * @return void + */ + public function __unset($key) + { + unset($this->attributes[$key]); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Auth/GuardHelpers.php b/vendor/laravel/framework/src/Illuminate/Auth/GuardHelpers.php new file mode 100644 index 0000000..5a22796 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Auth/GuardHelpers.php @@ -0,0 +1,86 @@ +user())) { + return $user; + } + + throw new AuthenticationException; + } + + /** + * Determine if the current user is authenticated. + * + * @return bool + */ + public function check() + { + return ! is_null($this->user()); + } + + /** + * Determine if the current user is a guest. + * + * @return bool + */ + public function guest() + { + return ! $this->check(); + } + + /** + * Get the ID for the currently authenticated user. + * + * @return int|null + */ + public function id() + { + if ($this->user()) { + return $this->user()->getAuthIdentifier(); + } + } + + /** + * Set the current user. + * + * @param \Illuminate\Contracts\Auth\Authenticatable $user + * @return $this + */ + public function setUser(AuthenticatableContract $user) + { + $this->user = $user; + + return $this; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authenticate.php b/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authenticate.php new file mode 100644 index 0000000..21ea4b2 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authenticate.php @@ -0,0 +1,68 @@ +auth = $auth; + } + + /** + * Handle an incoming request. + * + * @param \Illuminate\Http\Request $request + * @param \Closure $next + * @param string[] ...$guards + * @return mixed + * + * @throws \Illuminate\Auth\AuthenticationException + */ + public function handle($request, Closure $next, ...$guards) + { + $this->authenticate($guards); + + return $next($request); + } + + /** + * Determine if the user is logged in to any of the given guards. + * + * @param array $guards + * @return void + * + * @throws \Illuminate\Auth\AuthenticationException + */ + protected function authenticate(array $guards) + { + if (empty($guards)) { + return $this->auth->authenticate(); + } + + foreach ($guards as $guard) { + if ($this->auth->guard($guard)->check()) { + return $this->auth->shouldUse($guard); + } + } + + throw new AuthenticationException('Unauthenticated.', $guards); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Middleware/AuthenticateWithBasicAuth.php b/vendor/laravel/framework/src/Illuminate/Auth/Middleware/AuthenticateWithBasicAuth.php new file mode 100644 index 0000000..71f8be8 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Auth/Middleware/AuthenticateWithBasicAuth.php @@ -0,0 +1,40 @@ +auth = $auth; + } + + /** + * Handle an incoming request. + * + * @param \Illuminate\Http\Request $request + * @param \Closure $next + * @param string|null $guard + * @return mixed + */ + public function handle($request, Closure $next, $guard = null) + { + return $this->auth->guard($guard)->basic() ?: $next($request); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authorize.php b/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authorize.php new file mode 100644 index 0000000..9220e58 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authorize.php @@ -0,0 +1,100 @@ +auth = $auth; + $this->gate = $gate; + } + + /** + * Handle an incoming request. + * + * @param \Illuminate\Http\Request $request + * @param \Closure $next + * @param string $ability + * @param array|null $models + * @return mixed + * + * @throws \Illuminate\Auth\AuthenticationException + * @throws \Illuminate\Auth\Access\AuthorizationException + */ + public function handle($request, Closure $next, $ability, ...$models) + { + $this->auth->authenticate(); + + $this->gate->authorize($ability, $this->getGateArguments($request, $models)); + + return $next($request); + } + + /** + * Get the arguments parameter for the gate. + * + * @param \Illuminate\Http\Request $request + * @param array|null $models + * @return array|string|\Illuminate\Database\Eloquent\Model + */ + protected function getGateArguments($request, $models) + { + if (is_null($models)) { + return []; + } + + return collect($models)->map(function ($model) use ($request) { + return $model instanceof Model ? $model : $this->getModel($request, $model); + })->all(); + } + + /** + * Get the model to authorize. + * + * @param \Illuminate\Http\Request $request + * @param string $model + * @return string|\Illuminate\Database\Eloquent\Model + */ + protected function getModel($request, $model) + { + return $this->isClassName($model) ? $model : $request->route($model); + } + + /** + * Checks if the given string looks like a fully qualified class name. + * + * @param string $value + * @return bool + */ + protected function isClassName($value) + { + return strpos($value, '\\') !== false; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Notifications/ResetPassword.php b/vendor/laravel/framework/src/Illuminate/Auth/Notifications/ResetPassword.php new file mode 100644 index 0000000..a329c08 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Auth/Notifications/ResetPassword.php @@ -0,0 +1,52 @@ +token = $token; + } + + /** + * Get the notification's channels. + * + * @param mixed $notifiable + * @return array|string + */ + public function via($notifiable) + { + return ['mail']; + } + + /** + * Build the mail representation of the notification. + * + * @param mixed $notifiable + * @return \Illuminate\Notifications\Messages\MailMessage + */ + public function toMail($notifiable) + { + 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)) + ->line('If you did not request a password reset, no further action is required.'); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Passwords/CanResetPassword.php b/vendor/laravel/framework/src/Illuminate/Auth/Passwords/CanResetPassword.php new file mode 100644 index 0000000..918a288 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Auth/Passwords/CanResetPassword.php @@ -0,0 +1,29 @@ +email; + } + + /** + * Send the password reset notification. + * + * @param string $token + * @return void + */ + public function sendPasswordResetNotification($token) + { + $this->notify(new ResetPasswordNotification($token)); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Passwords/DatabaseTokenRepository.php b/vendor/laravel/framework/src/Illuminate/Auth/Passwords/DatabaseTokenRepository.php new file mode 100755 index 0000000..aff32ca --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Auth/Passwords/DatabaseTokenRepository.php @@ -0,0 +1,204 @@ +table = $table; + $this->hasher = $hasher; + $this->hashKey = $hashKey; + $this->expires = $expires * 60; + $this->connection = $connection; + } + + /** + * Create a new token record. + * + * @param \Illuminate\Contracts\Auth\CanResetPassword $user + * @return string + */ + public function create(CanResetPasswordContract $user) + { + $email = $user->getEmailForPasswordReset(); + + $this->deleteExisting($user); + + // We will create a new, random token for the user so that we can e-mail them + // a safe link to the password reset form. Then we will insert a record in + // the database so that we can verify the token within the actual reset. + $token = $this->createNewToken(); + + $this->getTable()->insert($this->getPayload($email, $token)); + + return $token; + } + + /** + * Delete all existing reset tokens from the database. + * + * @param \Illuminate\Contracts\Auth\CanResetPassword $user + * @return int + */ + protected function deleteExisting(CanResetPasswordContract $user) + { + return $this->getTable()->where('email', $user->getEmailForPasswordReset())->delete(); + } + + /** + * Build the record payload for the table. + * + * @param string $email + * @param string $token + * @return array + */ + protected function getPayload($email, $token) + { + return ['email' => $email, 'token' => $this->hasher->make($token), 'created_at' => new Carbon]; + } + + /** + * Determine if a token record exists and is valid. + * + * @param \Illuminate\Contracts\Auth\CanResetPassword $user + * @param string $token + * @return bool + */ + public function exists(CanResetPasswordContract $user, $token) + { + $record = (array) $this->getTable()->where( + 'email', $user->getEmailForPasswordReset() + )->first(); + + return $record && + ! $this->tokenExpired($record['created_at']) && + $this->hasher->check($token, $record['token']); + } + + /** + * Determine if the token has expired. + * + * @param string $createdAt + * @return bool + */ + protected function tokenExpired($createdAt) + { + return Carbon::parse($createdAt)->addSeconds($this->expires)->isPast(); + } + + /** + * Delete a token record by user. + * + * @param \Illuminate\Contracts\Auth\CanResetPassword $user + * @return void + */ + public function delete(CanResetPasswordContract $user) + { + $this->deleteExisting($user); + } + + /** + * Delete expired tokens. + * + * @return void + */ + public function deleteExpired() + { + $expiredAt = Carbon::now()->subSeconds($this->expires); + + $this->getTable()->where('created_at', '<', $expiredAt)->delete(); + } + + /** + * Create a new token for the user. + * + * @return string + */ + public function createNewToken() + { + return hash_hmac('sha256', Str::random(40), $this->hashKey); + } + + /** + * Get the database connection instance. + * + * @return \Illuminate\Database\ConnectionInterface + */ + public function getConnection() + { + return $this->connection; + } + + /** + * Begin a new database query against the table. + * + * @return \Illuminate\Database\Query\Builder + */ + protected function getTable() + { + return $this->connection->table($this->table); + } + + /** + * Get the hasher instance. + * + * @return \Illuminate\Contracts\Hashing\Hasher + */ + public function getHasher() + { + return $this->hasher; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Passwords/PasswordBroker.php b/vendor/laravel/framework/src/Illuminate/Auth/Passwords/PasswordBroker.php new file mode 100755 index 0000000..e935409 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Auth/Passwords/PasswordBroker.php @@ -0,0 +1,242 @@ +users = $users; + $this->tokens = $tokens; + } + + /** + * Send a password reset link to a user. + * + * @param array $credentials + * @return string + */ + public function sendResetLink(array $credentials) + { + // First we will check to see if we found a user at the given credentials and + // if we did not we will redirect back to this current URI with a piece of + // "flash" data in the session to indicate to the developers the errors. + $user = $this->getUser($credentials); + + if (is_null($user)) { + return static::INVALID_USER; + } + + // Once we have the reset token, we are ready to send the message out to this + // user with a link to reset their password. We will then redirect back to + // the current URI having nothing set in the session to indicate errors. + $user->sendPasswordResetNotification( + $this->tokens->create($user) + ); + + return static::RESET_LINK_SENT; + } + + /** + * Reset the password for the given token. + * + * @param array $credentials + * @param \Closure $callback + * @return mixed + */ + public function reset(array $credentials, Closure $callback) + { + // If the responses from the validate method is not a user instance, we will + // assume that it is a redirect and simply return it from this method and + // the user is properly redirected having an error message on the post. + $user = $this->validateReset($credentials); + + if (! $user instanceof CanResetPasswordContract) { + return $user; + } + + $password = $credentials['password']; + + // Once the reset has been validated, we'll call the given callback with the + // new password. This gives the user an opportunity to store the password + // in their persistent storage. Then we'll delete the token and return. + $callback($user, $password); + + $this->tokens->delete($user); + + return static::PASSWORD_RESET; + } + + /** + * Validate a password reset for the given credentials. + * + * @param array $credentials + * @return \Illuminate\Contracts\Auth\CanResetPassword + */ + protected function validateReset(array $credentials) + { + if (is_null($user = $this->getUser($credentials))) { + return static::INVALID_USER; + } + + if (! $this->validateNewPassword($credentials)) { + return static::INVALID_PASSWORD; + } + + if (! $this->tokens->exists($user, $credentials['token'])) { + return static::INVALID_TOKEN; + } + + return $user; + } + + /** + * Set a custom password validator. + * + * @param \Closure $callback + * @return void + */ + public function validator(Closure $callback) + { + $this->passwordValidator = $callback; + } + + /** + * Determine if the passwords match for the request. + * + * @param array $credentials + * @return bool + */ + public function validateNewPassword(array $credentials) + { + if (isset($this->passwordValidator)) { + list($password, $confirm) = [ + $credentials['password'], + $credentials['password_confirmation'], + ]; + + return call_user_func( + $this->passwordValidator, $credentials + ) && $password === $confirm; + } + + return $this->validatePasswordWithDefaults($credentials); + } + + /** + * Determine if the passwords are valid for the request. + * + * @param array $credentials + * @return bool + */ + protected function validatePasswordWithDefaults(array $credentials) + { + list($password, $confirm) = [ + $credentials['password'], + $credentials['password_confirmation'], + ]; + + return $password === $confirm && mb_strlen($password) >= 6; + } + + /** + * Get the user for the given credentials. + * + * @param array $credentials + * @return \Illuminate\Contracts\Auth\CanResetPassword + * + * @throws \UnexpectedValueException + */ + public function getUser(array $credentials) + { + $credentials = Arr::except($credentials, ['token']); + + $user = $this->users->retrieveByCredentials($credentials); + + if ($user && ! $user instanceof CanResetPasswordContract) { + throw new UnexpectedValueException('User must implement CanResetPassword interface.'); + } + + return $user; + } + + /** + * Create a new password reset token for the given user. + * + * @param CanResetPasswordContract $user + * @return string + */ + public function createToken(CanResetPasswordContract $user) + { + return $this->tokens->create($user); + } + + /** + * Delete password reset tokens of the given user. + * + * @param \Illuminate\Contracts\Auth\CanResetPassword $user + * @return void + */ + public function deleteToken(CanResetPasswordContract $user) + { + $this->tokens->delete($user); + } + + /** + * Validate the given password reset token. + * + * @param CanResetPasswordContract $user + * @param string $token + * @return bool + */ + public function tokenExists(CanResetPasswordContract $user, $token) + { + return $this->tokens->exists($user, $token); + } + + /** + * Get the password reset token repository implementation. + * + * @return \Illuminate\Auth\Passwords\TokenRepositoryInterface + */ + public function getRepository() + { + return $this->tokens; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Passwords/PasswordBrokerManager.php b/vendor/laravel/framework/src/Illuminate/Auth/Passwords/PasswordBrokerManager.php new file mode 100644 index 0000000..0f3f262 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Auth/Passwords/PasswordBrokerManager.php @@ -0,0 +1,144 @@ +app = $app; + } + + /** + * Attempt to get the broker from the local cache. + * + * @param string $name + * @return \Illuminate\Contracts\Auth\PasswordBroker + */ + public function broker($name = null) + { + $name = $name ?: $this->getDefaultDriver(); + + return isset($this->brokers[$name]) + ? $this->brokers[$name] + : $this->brokers[$name] = $this->resolve($name); + } + + /** + * Resolve the given broker. + * + * @param string $name + * @return \Illuminate\Contracts\Auth\PasswordBroker + * + * @throws \InvalidArgumentException + */ + protected function resolve($name) + { + $config = $this->getConfig($name); + + if (is_null($config)) { + throw new InvalidArgumentException("Password resetter [{$name}] is not defined."); + } + + // The password broker uses a token repository to validate tokens and send user + // password e-mails, as well as validating that password reset process as an + // aggregate service of sorts providing a convenient interface for resets. + return new PasswordBroker( + $this->createTokenRepository($config), + $this->app['auth']->createUserProvider($config['provider']) + ); + } + + /** + * Create a token repository instance based on the given configuration. + * + * @param array $config + * @return \Illuminate\Auth\Passwords\TokenRepositoryInterface + */ + protected function createTokenRepository(array $config) + { + $key = $this->app['config']['app.key']; + + if (Str::startsWith($key, 'base64:')) { + $key = base64_decode(substr($key, 7)); + } + + $connection = isset($config['connection']) ? $config['connection'] : null; + + return new DatabaseTokenRepository( + $this->app['db']->connection($connection), + $this->app['hash'], + $config['table'], + $key, + $config['expire'] + ); + } + + /** + * Get the password broker configuration. + * + * @param string $name + * @return array + */ + protected function getConfig($name) + { + return $this->app['config']["auth.passwords.{$name}"]; + } + + /** + * Get the default password broker name. + * + * @return string + */ + public function getDefaultDriver() + { + return $this->app['config']['auth.defaults.passwords']; + } + + /** + * Set the default password broker name. + * + * @param string $name + * @return void + */ + public function setDefaultDriver($name) + { + $this->app['config']['auth.defaults.passwords'] = $name; + } + + /** + * Dynamically call the default driver instance. + * + * @param string $method + * @param array $parameters + * @return mixed + */ + public function __call($method, $parameters) + { + return $this->broker()->{$method}(...$parameters); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Passwords/PasswordResetServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Auth/Passwords/PasswordResetServiceProvider.php new file mode 100755 index 0000000..165ecaf --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Auth/Passwords/PasswordResetServiceProvider.php @@ -0,0 +1,51 @@ +registerPasswordBroker(); + } + + /** + * Register the password broker instance. + * + * @return void + */ + protected function registerPasswordBroker() + { + $this->app->singleton('auth.password', function ($app) { + return new PasswordBrokerManager($app); + }); + + $this->app->bind('auth.password.broker', function ($app) { + return $app->make('auth.password')->broker(); + }); + } + + /** + * Get the services provided by the provider. + * + * @return array + */ + public function provides() + { + return ['auth.password', 'auth.password.broker']; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Passwords/TokenRepositoryInterface.php b/vendor/laravel/framework/src/Illuminate/Auth/Passwords/TokenRepositoryInterface.php new file mode 100755 index 0000000..dcd06e8 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Auth/Passwords/TokenRepositoryInterface.php @@ -0,0 +1,40 @@ +recaller = $recaller; + } + + /** + * Get the user ID from the recaller. + * + * @return string + */ + public function id() + { + return explode('|', $this->recaller, 2)[0]; + } + + /** + * Get the "remember token" token from the recaller. + * + * @return string + */ + public function token() + { + return explode('|', $this->recaller, 2)[1]; + } + + /** + * Determine if the recaller is valid. + * + * @return bool + */ + public function valid() + { + return $this->properString() && $this->hasBothSegments(); + } + + /** + * Determine if the recaller is an invalid string. + * + * @return bool + */ + protected function properString() + { + return is_string($this->recaller) && Str::contains($this->recaller, '|'); + } + + /** + * Determine if the recaller has both segments. + * + * @return bool + */ + protected function hasBothSegments() + { + $segments = explode('|', $this->recaller); + + return count($segments) == 2 && trim($segments[0]) !== '' && trim($segments[1]) !== ''; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Auth/RequestGuard.php b/vendor/laravel/framework/src/Illuminate/Auth/RequestGuard.php new file mode 100644 index 0000000..30b3a1d --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Auth/RequestGuard.php @@ -0,0 +1,83 @@ +request = $request; + $this->callback = $callback; + } + + /** + * Get the currently authenticated user. + * + * @return \Illuminate\Contracts\Auth\Authenticatable|null + */ + public function user() + { + // If we've already retrieved the user for the current request we can just + // return it back immediately. We do not want to fetch the user data on + // every call to this method because that would be tremendously slow. + if (! is_null($this->user)) { + return $this->user; + } + + return $this->user = call_user_func( + $this->callback, $this->request + ); + } + + /** + * Validate a user's credentials. + * + * @param array $credentials + * @return bool + */ + public function validate(array $credentials = []) + { + return ! is_null((new static( + $this->callback, $credentials['request'] + ))->user()); + } + + /** + * Set the current request instance. + * + * @param \Illuminate\Http\Request $request + * @return $this + */ + public function setRequest(Request $request) + { + $this->request = $request; + + return $this; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Auth/SessionGuard.php b/vendor/laravel/framework/src/Illuminate/Auth/SessionGuard.php new file mode 100644 index 0000000..39d7166 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Auth/SessionGuard.php @@ -0,0 +1,775 @@ +name = $name; + $this->session = $session; + $this->request = $request; + $this->provider = $provider; + } + + /** + * Get the currently authenticated user. + * + * @return \Illuminate\Contracts\Auth\Authenticatable|null + */ + public function user() + { + if ($this->loggedOut) { + return; + } + + // If we've already retrieved the user for the current request we can just + // return it back immediately. We do not want to fetch the user data on + // every call to this method because that would be tremendously slow. + if (! is_null($this->user)) { + return $this->user; + } + + $id = $this->session->get($this->getName()); + + // First we will try to load the user using the identifier in the session if + // one exists. Otherwise we will check for a "remember me" cookie in this + // request, and if one exists, attempt to retrieve the user using that. + $user = null; + + if (! is_null($id)) { + if ($user = $this->provider->retrieveById($id)) { + $this->fireAuthenticatedEvent($user); + } + } + + // If the user is null, but we decrypt a "recaller" cookie we can attempt to + // pull the user data on that cookie which serves as a remember cookie on + // the application. Once we have a user we can return it to the caller. + $recaller = $this->recaller(); + + if (is_null($user) && ! is_null($recaller)) { + $user = $this->userFromRecaller($recaller); + + if ($user) { + $this->updateSession($user->getAuthIdentifier()); + + $this->fireLoginEvent($user, true); + } + } + + return $this->user = $user; + } + + /** + * Pull a user from the repository by its "remember me" cookie token. + * + * @param \Illuminate\Auth\Recaller $recaller + * @return mixed + */ + protected function userFromRecaller($recaller) + { + if (! $recaller->valid() || $this->recallAttempted) { + return; + } + + // If the user is null, but we decrypt a "recaller" cookie we can attempt to + // pull the user data on that cookie which serves as a remember cookie on + // the application. Once we have a user we can return it to the caller. + $this->recallAttempted = true; + + $this->viaRemember = ! is_null($user = $this->provider->retrieveByToken( + $recaller->id(), $recaller->token() + )); + + return $user; + } + + /** + * Get the decrypted recaller cookie for the request. + * + * @return \Illuminate\Auth\Recaller|null + */ + protected function recaller() + { + if (is_null($this->request)) { + return; + } + + if ($recaller = $this->request->cookies->get($this->getRecallerName())) { + return new Recaller($recaller); + } + } + + /** + * Get the ID for the currently authenticated user. + * + * @return int|null + */ + public function id() + { + if ($this->loggedOut) { + return; + } + + return $this->user() + ? $this->user()->getAuthIdentifier() + : $this->session->get($this->getName()); + } + + /** + * Log a user into the application without sessions or cookies. + * + * @param array $credentials + * @return bool + */ + public function once(array $credentials = []) + { + $this->fireAttemptEvent($credentials); + + if ($this->validate($credentials)) { + $this->setUser($this->lastAttempted); + + return true; + } + + return false; + } + + /** + * Log the given user ID into the application without sessions or cookies. + * + * @param mixed $id + * @return \Illuminate\Contracts\Auth\Authenticatable|false + */ + public function onceUsingId($id) + { + if (! is_null($user = $this->provider->retrieveById($id))) { + $this->setUser($user); + + return $user; + } + + return false; + } + + /** + * Validate a user's credentials. + * + * @param array $credentials + * @return bool + */ + public function validate(array $credentials = []) + { + $this->lastAttempted = $user = $this->provider->retrieveByCredentials($credentials); + + return $this->hasValidCredentials($user, $credentials); + } + + /** + * Attempt to authenticate using HTTP Basic Auth. + * + * @param string $field + * @param array $extraConditions + * @return \Symfony\Component\HttpFoundation\Response|null + */ + public function basic($field = 'email', $extraConditions = []) + { + if ($this->check()) { + return; + } + + // If a username is set on the HTTP basic request, we will return out without + // interrupting the request lifecycle. Otherwise, we'll need to generate a + // request indicating that the given credentials were invalid for login. + if ($this->attemptBasic($this->getRequest(), $field, $extraConditions)) { + return; + } + + return $this->failedBasicResponse(); + } + + /** + * Perform a stateless HTTP Basic login attempt. + * + * @param string $field + * @param array $extraConditions + * @return \Symfony\Component\HttpFoundation\Response|null + */ + public function onceBasic($field = 'email', $extraConditions = []) + { + $credentials = $this->basicCredentials($this->getRequest(), $field); + + if (! $this->once(array_merge($credentials, $extraConditions))) { + return $this->failedBasicResponse(); + } + } + + /** + * Attempt to authenticate using basic authentication. + * + * @param \Symfony\Component\HttpFoundation\Request $request + * @param string $field + * @param array $extraConditions + * @return bool + */ + protected function attemptBasic(Request $request, $field, $extraConditions = []) + { + if (! $request->getUser()) { + return false; + } + + return $this->attempt(array_merge( + $this->basicCredentials($request, $field), $extraConditions + )); + } + + /** + * Get the credential array for a HTTP Basic request. + * + * @param \Symfony\Component\HttpFoundation\Request $request + * @param string $field + * @return array + */ + protected function basicCredentials(Request $request, $field) + { + return [$field => $request->getUser(), 'password' => $request->getPassword()]; + } + + /** + * Get the response for basic authentication. + * + * @return \Symfony\Component\HttpFoundation\Response + */ + protected function failedBasicResponse() + { + return new Response('Invalid credentials.', 401, ['WWW-Authenticate' => 'Basic']); + } + + /** + * Attempt to authenticate a user using the given credentials. + * + * @param array $credentials + * @param bool $remember + * @return bool + */ + public function attempt(array $credentials = [], $remember = false) + { + $this->fireAttemptEvent($credentials, $remember); + + $this->lastAttempted = $user = $this->provider->retrieveByCredentials($credentials); + + // If an implementation of UserInterface was returned, we'll ask the provider + // to validate the user against the given credentials, and if they are in + // fact valid we'll log the users into the application and return true. + if ($this->hasValidCredentials($user, $credentials)) { + $this->login($user, $remember); + + return true; + } + + // If the authentication attempt fails we will fire an event so that the user + // may be notified of any suspicious attempts to access their account from + // an unrecognized user. A developer may listen to this event as needed. + $this->fireFailedEvent($user, $credentials); + + return false; + } + + /** + * Determine if the user matches the credentials. + * + * @param mixed $user + * @param array $credentials + * @return bool + */ + protected function hasValidCredentials($user, $credentials) + { + return ! is_null($user) && $this->provider->validateCredentials($user, $credentials); + } + + /** + * Log the given user ID into the application. + * + * @param mixed $id + * @param bool $remember + * @return \Illuminate\Contracts\Auth\Authenticatable|false + */ + public function loginUsingId($id, $remember = false) + { + if (! is_null($user = $this->provider->retrieveById($id))) { + $this->login($user, $remember); + + return $user; + } + + return false; + } + + /** + * Log a user into the application. + * + * @param \Illuminate\Contracts\Auth\Authenticatable $user + * @param bool $remember + * @return void + */ + public function login(AuthenticatableContract $user, $remember = false) + { + $this->updateSession($user->getAuthIdentifier()); + + // If the user should be permanently "remembered" by the application we will + // queue a permanent cookie that contains the encrypted copy of the user + // identifier. We will then decrypt this later to retrieve the users. + if ($remember) { + $this->ensureRememberTokenIsSet($user); + + $this->queueRecallerCookie($user); + } + + // If we have an event dispatcher instance set we will fire an event so that + // any listeners will hook into the authentication events and run actions + // based on the login and logout events fired from the guard instances. + $this->fireLoginEvent($user, $remember); + + $this->setUser($user); + } + + /** + * Update the session with the given ID. + * + * @param string $id + * @return void + */ + protected function updateSession($id) + { + $this->session->put($this->getName(), $id); + + $this->session->migrate(true); + } + + /** + * Create a new "remember me" token for the user if one doesn't already exist. + * + * @param \Illuminate\Contracts\Auth\Authenticatable $user + * @return void + */ + protected function ensureRememberTokenIsSet(AuthenticatableContract $user) + { + if (empty($user->getRememberToken())) { + $this->cycleRememberToken($user); + } + } + + /** + * Queue the recaller cookie into the cookie jar. + * + * @param \Illuminate\Contracts\Auth\Authenticatable $user + * @return void + */ + protected function queueRecallerCookie(AuthenticatableContract $user) + { + $this->getCookieJar()->queue($this->createRecaller( + $user->getAuthIdentifier().'|'.$user->getRememberToken() + )); + } + + /** + * Create a "remember me" cookie for a given ID. + * + * @param string $value + * @return \Symfony\Component\HttpFoundation\Cookie + */ + protected function createRecaller($value) + { + return $this->getCookieJar()->forever($this->getRecallerName(), $value); + } + + /** + * Log the user out of the application. + * + * @return void + */ + public function logout() + { + $user = $this->user(); + + // If we have an event dispatcher instance, we can fire off the logout event + // so any further processing can be done. This allows the developer to be + // listening for anytime a user signs out of this application manually. + $this->clearUserDataFromStorage(); + + if (! is_null($this->user)) { + $this->cycleRememberToken($user); + } + + if (isset($this->events)) { + $this->events->dispatch(new Events\Logout($user)); + } + + // Once we have fired the logout event we will clear the users out of memory + // so they are no longer available as the user is no longer considered as + // being signed into this application and should not be available here. + $this->user = null; + + $this->loggedOut = true; + } + + /** + * Remove the user data from the session and cookies. + * + * @return void + */ + protected function clearUserDataFromStorage() + { + $this->session->remove($this->getName()); + + if (! is_null($this->recaller())) { + $this->getCookieJar()->queue($this->getCookieJar() + ->forget($this->getRecallerName())); + } + } + + /** + * Refresh the "remember me" token for the user. + * + * @param \Illuminate\Contracts\Auth\Authenticatable $user + * @return void + */ + protected function cycleRememberToken(AuthenticatableContract $user) + { + $user->setRememberToken($token = Str::random(60)); + + $this->provider->updateRememberToken($user, $token); + } + + /** + * Register an authentication attempt event listener. + * + * @param mixed $callback + * @return void + */ + public function attempting($callback) + { + if (isset($this->events)) { + $this->events->listen(Events\Attempting::class, $callback); + } + } + + /** + * Fire the attempt event with the arguments. + * + * @param array $credentials + * @param bool $remember + * @return void + */ + protected function fireAttemptEvent(array $credentials, $remember = false) + { + if (isset($this->events)) { + $this->events->dispatch(new Events\Attempting( + $credentials, $remember + )); + } + } + + /** + * Fire the login event if the dispatcher is set. + * + * @param \Illuminate\Contracts\Auth\Authenticatable $user + * @param bool $remember + * @return void + */ + protected function fireLoginEvent($user, $remember = false) + { + if (isset($this->events)) { + $this->events->dispatch(new Events\Login($user, $remember)); + } + } + + /** + * Fire the authenticated event if the dispatcher is set. + * + * @param \Illuminate\Contracts\Auth\Authenticatable $user + * @return void + */ + protected function fireAuthenticatedEvent($user) + { + if (isset($this->events)) { + $this->events->dispatch(new Events\Authenticated($user)); + } + } + + /** + * Fire the failed authentication attempt event with the given arguments. + * + * @param \Illuminate\Contracts\Auth\Authenticatable|null $user + * @param array $credentials + * @return void + */ + protected function fireFailedEvent($user, array $credentials) + { + if (isset($this->events)) { + $this->events->dispatch(new Events\Failed($user, $credentials)); + } + } + + /** + * Get the last user we attempted to authenticate. + * + * @return \Illuminate\Contracts\Auth\Authenticatable + */ + public function getLastAttempted() + { + return $this->lastAttempted; + } + + /** + * Get a unique identifier for the auth session value. + * + * @return string + */ + public function getName() + { + return 'login_'.$this->name.'_'.sha1(static::class); + } + + /** + * Get the name of the cookie used to store the "recaller". + * + * @return string + */ + public function getRecallerName() + { + return 'remember_'.$this->name.'_'.sha1(static::class); + } + + /** + * Determine if the user was authenticated via "remember me" cookie. + * + * @return bool + */ + public function viaRemember() + { + return $this->viaRemember; + } + + /** + * Get the cookie creator instance used by the guard. + * + * @return \Illuminate\Contracts\Cookie\QueueingFactory + * + * @throws \RuntimeException + */ + public function getCookieJar() + { + if (! isset($this->cookie)) { + throw new RuntimeException('Cookie jar has not been set.'); + } + + return $this->cookie; + } + + /** + * Set the cookie creator instance used by the guard. + * + * @param \Illuminate\Contracts\Cookie\QueueingFactory $cookie + * @return void + */ + public function setCookieJar(CookieJar $cookie) + { + $this->cookie = $cookie; + } + + /** + * Get the event dispatcher instance. + * + * @return \Illuminate\Contracts\Events\Dispatcher + */ + public function getDispatcher() + { + return $this->events; + } + + /** + * Set the event dispatcher instance. + * + * @param \Illuminate\Contracts\Events\Dispatcher $events + * @return void + */ + public function setDispatcher(Dispatcher $events) + { + $this->events = $events; + } + + /** + * Get the session store used by the guard. + * + * @return \Illuminate\Session\Store + */ + public function getSession() + { + return $this->session; + } + + /** + * Get the user provider used by the guard. + * + * @return \Illuminate\Contracts\Auth\UserProvider + */ + public function getProvider() + { + return $this->provider; + } + + /** + * Set the user provider used by the guard. + * + * @param \Illuminate\Contracts\Auth\UserProvider $provider + * @return void + */ + public function setProvider(UserProvider $provider) + { + $this->provider = $provider; + } + + /** + * Return the currently cached user. + * + * @return \Illuminate\Contracts\Auth\Authenticatable|null + */ + public function getUser() + { + return $this->user; + } + + /** + * Set the current user. + * + * @param \Illuminate\Contracts\Auth\Authenticatable $user + * @return $this + */ + public function setUser(AuthenticatableContract $user) + { + $this->user = $user; + + $this->loggedOut = false; + + $this->fireAuthenticatedEvent($user); + + return $this; + } + + /** + * Get the current request instance. + * + * @return \Symfony\Component\HttpFoundation\Request + */ + public function getRequest() + { + return $this->request ?: Request::createFromGlobals(); + } + + /** + * Set the current request instance. + * + * @param \Symfony\Component\HttpFoundation\Request $request + * @return $this + */ + public function setRequest(Request $request) + { + $this->request = $request; + + return $this; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Auth/TokenGuard.php b/vendor/laravel/framework/src/Illuminate/Auth/TokenGuard.php new file mode 100644 index 0000000..dec39f4 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Auth/TokenGuard.php @@ -0,0 +1,133 @@ +request = $request; + $this->provider = $provider; + $this->inputKey = 'api_token'; + $this->storageKey = 'api_token'; + } + + /** + * Get the currently authenticated user. + * + * @return \Illuminate\Contracts\Auth\Authenticatable|null + */ + public function user() + { + // If we've already retrieved the user for the current request we can just + // return it back immediately. We do not want to fetch the user data on + // every call to this method because that would be tremendously slow. + if (! is_null($this->user)) { + return $this->user; + } + + $user = null; + + $token = $this->getTokenForRequest(); + + if (! empty($token)) { + $user = $this->provider->retrieveByCredentials( + [$this->storageKey => $token] + ); + } + + return $this->user = $user; + } + + /** + * Get the token for the current request. + * + * @return string + */ + public function getTokenForRequest() + { + $token = $this->request->query($this->inputKey); + + if (empty($token)) { + $token = $this->request->input($this->inputKey); + } + + if (empty($token)) { + $token = $this->request->bearerToken(); + } + + if (empty($token)) { + $token = $this->request->getPassword(); + } + + return $token; + } + + /** + * Validate a user's credentials. + * + * @param array $credentials + * @return bool + */ + public function validate(array $credentials = []) + { + if (empty($credentials[$this->inputKey])) { + return false; + } + + $credentials = [$this->storageKey => $credentials[$this->inputKey]]; + + if ($this->provider->retrieveByCredentials($credentials)) { + return true; + } + + return false; + } + + /** + * Set the current request instance. + * + * @param \Illuminate\Http\Request $request + * @return $this + */ + public function setRequest(Request $request) + { + $this->request = $request; + + return $this; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Auth/composer.json b/vendor/laravel/framework/src/Illuminate/Auth/composer.json new file mode 100644 index 0000000..528c125 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Auth/composer.json @@ -0,0 +1,42 @@ +{ + "name": "illuminate/auth", + "description": "The Illuminate Auth package.", + "license": "MIT", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "require": { + "php": ">=5.6.4", + "illuminate/contracts": "5.4.*", + "illuminate/http": "5.4.*", + "illuminate/support": "5.4.*", + "nesbot/carbon": "~1.20" + }, + "autoload": { + "psr-4": { + "Illuminate\\Auth\\": "" + } + }, + "extra": { + "branch-alias": { + "dev-master": "5.4-dev" + } + }, + "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.*)." + }, + "config": { + "sort-packages": true + }, + "minimum-stability": "dev" +} diff --git a/vendor/laravel/framework/src/Illuminate/Broadcasting/BroadcastController.php b/vendor/laravel/framework/src/Illuminate/Broadcasting/BroadcastController.php new file mode 100644 index 0000000..f71c923 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Broadcasting/BroadcastController.php @@ -0,0 +1,21 @@ +event = $event; + } + + /** + * Handle the queued job. + * + * @param \Illuminate\Contracts\Broadcasting\Broadcaster $broadcaster + * @return void + */ + public function handle(Broadcaster $broadcaster) + { + $name = method_exists($this->event, 'broadcastAs') + ? $this->event->broadcastAs() : get_class($this->event); + + $broadcaster->broadcast( + array_wrap($this->event->broadcastOn()), $name, + $this->getPayloadFromEvent($this->event) + ); + } + + /** + * Get the payload for the given event. + * + * @param mixed $event + * @return array + */ + protected function getPayloadFromEvent($event) + { + if (method_exists($event, 'broadcastWith')) { + return array_merge( + $event->broadcastWith(), ['socket' => data_get($event, 'socket')] + ); + } + + $payload = []; + + foreach ((new ReflectionClass($event))->getProperties(ReflectionProperty::IS_PUBLIC) as $property) { + $payload[$property->getName()] = $this->formatProperty($property->getValue($event)); + } + + return $payload; + } + + /** + * Format the given value for a property. + * + * @param mixed $value + * @return mixed + */ + protected function formatProperty($value) + { + if ($value instanceof Arrayable) { + return $value->toArray(); + } + + return $value; + } + + /** + * Get the display name for the queued job. + * + * @return string + */ + public function displayName() + { + return get_class($this->event); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Broadcasting/BroadcastException.php b/vendor/laravel/framework/src/Illuminate/Broadcasting/BroadcastException.php new file mode 100644 index 0000000..8fd55f7 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Broadcasting/BroadcastException.php @@ -0,0 +1,10 @@ +app = $app; + } + + /** + * Register the routes for handling broadcast authentication and sockets. + * + * @param array|null $attributes + * @return void + */ + public function routes(array $attributes = null) + { + if ($this->app->routesAreCached()) { + return; + } + + $attributes = $attributes ?: ['middleware' => ['web']]; + + $this->app['router']->group($attributes, function ($router) { + $router->post('/broadcasting/auth', BroadcastController::class.'@authenticate'); + }); + } + + /** + * Get the socket ID for the given request. + * + * @param \Illuminate\Http\Request|null $request + * @return string|null + */ + public function socket($request = null) + { + if (! $request && ! $this->app->bound('request')) { + return; + } + + $request = $request ?: $this->app['request']; + + if ($request->hasHeader('X-Socket-ID')) { + return $request->header('X-Socket-ID'); + } + } + + /** + * Begin broadcasting an event. + * + * @param mixed|null $event + * @return \Illuminate\Broadcasting\PendingBroadcast|void + */ + public function event($event = null) + { + return new PendingBroadcast($this->app->make('events'), $event); + } + + /** + * Queue the given event for broadcast. + * + * @param mixed $event + * @return void + */ + public function queue($event) + { + $connection = $event instanceof ShouldBroadcastNow ? 'sync' : null; + + if (is_null($connection) && isset($event->connection)) { + $connection = $event->connection; + } + + $queue = null; + + if (isset($event->broadcastQueue)) { + $queue = $event->broadcastQueue; + } elseif (isset($event->queue)) { + $queue = $event->queue; + } + + $this->app->make('queue')->connection($connection)->pushOn( + $queue, new BroadcastEvent(clone $event) + ); + } + + /** + * Get a driver instance. + * + * @param string $driver + * @return mixed + */ + public function connection($driver = null) + { + return $this->driver($driver); + } + + /** + * Get a driver instance. + * + * @param string $name + * @return mixed + */ + public function driver($name = null) + { + $name = $name ?: $this->getDefaultDriver(); + + return $this->drivers[$name] = $this->get($name); + } + + /** + * Attempt to get the connection from the local cache. + * + * @param string $name + * @return \Illuminate\Contracts\Broadcasting\Broadcaster + */ + protected function get($name) + { + return isset($this->drivers[$name]) ? $this->drivers[$name] : $this->resolve($name); + } + + /** + * Resolve the given store. + * + * @param string $name + * @return \Illuminate\Contracts\Broadcasting\Broadcaster + * + * @throws \InvalidArgumentException + */ + protected function resolve($name) + { + $config = $this->getConfig($name); + + if (is_null($config)) { + throw new InvalidArgumentException("Broadcaster [{$name}] is not defined."); + } + + if (isset($this->customCreators[$config['driver']])) { + return $this->callCustomCreator($config); + } + + $driverMethod = 'create'.ucfirst($config['driver']).'Driver'; + + if (! method_exists($this, $driverMethod)) { + throw new InvalidArgumentException("Driver [{$config['driver']}] is not supported."); + } + + return $this->{$driverMethod}($config); + } + + /** + * Call a custom driver creator. + * + * @param array $config + * @return mixed + */ + protected function callCustomCreator(array $config) + { + return $this->customCreators[$config['driver']]($this->app, $config); + } + + /** + * Create an instance of the driver. + * + * @param array $config + * @return \Illuminate\Contracts\Broadcasting\Broadcaster + */ + protected function createPusherDriver(array $config) + { + return new PusherBroadcaster( + new Pusher($config['key'], $config['secret'], + $config['app_id'], Arr::get($config, 'options', [])) + ); + } + + /** + * Create an instance of the driver. + * + * @param array $config + * @return \Illuminate\Contracts\Broadcasting\Broadcaster + */ + protected function createRedisDriver(array $config) + { + return new RedisBroadcaster( + $this->app->make('redis'), Arr::get($config, 'connection') + ); + } + + /** + * Create an instance of the driver. + * + * @param array $config + * @return \Illuminate\Contracts\Broadcasting\Broadcaster + */ + protected function createLogDriver(array $config) + { + return new LogBroadcaster( + $this->app->make(LoggerInterface::class) + ); + } + + /** + * Create an instance of the driver. + * + * @param array $config + * @return \Illuminate\Contracts\Broadcasting\Broadcaster + */ + protected function createNullDriver(array $config) + { + return new NullBroadcaster; + } + + /** + * Get the connection configuration. + * + * @param string $name + * @return array + */ + protected function getConfig($name) + { + return $this->app['config']["broadcasting.connections.{$name}"]; + } + + /** + * Get the default driver name. + * + * @return string + */ + public function getDefaultDriver() + { + return $this->app['config']['broadcasting.default']; + } + + /** + * Set the default driver name. + * + * @param string $name + * @return void + */ + public function setDefaultDriver($name) + { + $this->app['config']['broadcasting.default'] = $name; + } + + /** + * Register a custom driver creator Closure. + * + * @param string $driver + * @param \Closure $callback + * @return $this + */ + public function extend($driver, Closure $callback) + { + $this->customCreators[$driver] = $callback; + + return $this; + } + + /** + * Dynamically call the default driver instance. + * + * @param string $method + * @param array $parameters + * @return mixed + */ + public function __call($method, $parameters) + { + return $this->driver()->$method(...$parameters); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Broadcasting/BroadcastServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Broadcasting/BroadcastServiceProvider.php new file mode 100644 index 0000000..adf88a6 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Broadcasting/BroadcastServiceProvider.php @@ -0,0 +1,51 @@ +app->singleton(BroadcastManager::class, function ($app) { + return new BroadcastManager($app); + }); + + $this->app->singleton(BroadcasterContract::class, function ($app) { + return $app->make(BroadcastManager::class)->connection(); + }); + + $this->app->alias( + BroadcastManager::class, BroadcastingFactory::class + ); + } + + /** + * Get the services provided by the provider. + * + * @return array + */ + public function provides() + { + return [ + BroadcastManager::class, + BroadcastingFactory::class, + BroadcasterContract::class, + ]; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/Broadcaster.php b/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/Broadcaster.php new file mode 100644 index 0000000..ed1c946 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/Broadcaster.php @@ -0,0 +1,201 @@ +channels[$channel] = $callback; + + return $this; + } + + /** + * Authenticate the incoming request for a given channel. + * + * @param \Illuminate\Http\Request $request + * @param string $channel + * @return mixed + */ + protected function verifyUserCanAccessChannel($request, $channel) + { + foreach ($this->channels as $pattern => $callback) { + if (! Str::is(preg_replace('/\{(.*?)\}/', '*', $pattern), $channel)) { + continue; + } + + $parameters = $this->extractAuthParameters($pattern, $channel, $callback); + + if ($result = $callback($request->user(), ...$parameters)) { + return $this->validAuthenticationResponse($request, $result); + } + } + + throw new HttpException(403); + } + + /** + * Extract the parameters from the given pattern and channel. + * + * @param string $pattern + * @param string $channel + * @param callable $callback + * @return array + */ + protected function extractAuthParameters($pattern, $channel, $callback) + { + $callbackParameters = (new ReflectionFunction($callback))->getParameters(); + + return collect($this->extractChannelKeys($pattern, $channel))->reject(function ($value, $key) { + return is_numeric($key); + })->map(function ($value, $key) use ($callbackParameters) { + return $this->resolveBinding($key, $value, $callbackParameters); + })->values()->all(); + } + + /** + * Extract the channel keys from the incoming channel name. + * + * @param string $pattern + * @param string $channel + * @return array + */ + protected function extractChannelKeys($pattern, $channel) + { + preg_match('/^'.preg_replace('/\{(.*?)\}/', '(?<$1>[^\.]+)', $pattern).'/', $channel, $keys); + + return $keys; + } + + /** + * Resolve the given parameter binding. + * + * @param string $key + * @param string $value + * @param array $callbackParameters + * @return mixed + */ + protected function resolveBinding($key, $value, $callbackParameters) + { + $newValue = $this->resolveExplicitBindingIfPossible($key, $value); + + return $newValue === $value ? $this->resolveImplicitBindingIfPossible( + $key, $value, $callbackParameters + ) : $newValue; + } + + /** + * Resolve an explicit parameter binding if applicable. + * + * @param string $key + * @param mixed $value + * @return mixed + */ + protected function resolveExplicitBindingIfPossible($key, $value) + { + $binder = $this->binder(); + + if ($binder && $binder->getBindingCallback($key)) { + return call_user_func($binder->getBindingCallback($key), $value); + } + + return $value; + } + + /** + * Resolve an implicit parameter binding if applicable. + * + * @param string $key + * @param mixed $value + * @param array $callbackParameters + * @return mixed + */ + protected function resolveImplicitBindingIfPossible($key, $value, $callbackParameters) + { + foreach ($callbackParameters as $parameter) { + if (! $this->isImplicitlyBindable($key, $parameter)) { + continue; + } + + $model = $parameter->getClass()->newInstance(); + + return $model->where($model->getRouteKeyName(), $value)->firstOr(function () { + throw new HttpException(403); + }); + } + + return $value; + } + + /** + * Determine if a given key and parameter is implicitly bindable. + * + * @param string $key + * @param ReflectionParameter $parameter + * @return bool + */ + protected function isImplicitlyBindable($key, $parameter) + { + return $parameter->name === $key && $parameter->getClass() && + $parameter->getClass()->isSubclassOf(Model::class); + } + + /** + * Format the channel array into an array of strings. + * + * @param array $channels + * @return array + */ + protected function formatChannels(array $channels) + { + return array_map(function ($channel) { + return (string) $channel; + }, $channels); + } + + /** + * Get the model binding registrar instance. + * + * @return BindingRegistrar + */ + protected function binder() + { + if (! $this->bindingRegistrar) { + $this->bindingRegistrar = Container::getInstance()->bound(BindingRegistrar::class) + ? Container::getInstance()->make(BindingRegistrar::class) : null; + } + + return $this->bindingRegistrar; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/LogBroadcaster.php b/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/LogBroadcaster.php new file mode 100644 index 0000000..50877dc --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/LogBroadcaster.php @@ -0,0 +1,54 @@ +logger = $logger; + } + + /** + * {@inheritdoc} + */ + public function auth($request) + { + // + } + + /** + * {@inheritdoc} + */ + public function validAuthenticationResponse($request, $result) + { + // + } + + /** + * {@inheritdoc} + */ + public function broadcast(array $channels, $event, array $payload = []) + { + $channels = implode(', ', $this->formatChannels($channels)); + + $payload = json_encode($payload, JSON_PRETTY_PRINT); + + $this->logger->info('Broadcasting ['.$event.'] on channels ['.$channels.'] with payload:'.PHP_EOL.$payload); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/NullBroadcaster.php b/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/NullBroadcaster.php new file mode 100644 index 0000000..6205c90 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/NullBroadcaster.php @@ -0,0 +1,30 @@ +pusher = $pusher; + } + + /** + * Authenticate the incoming request for a given channel. + * + * @param \Illuminate\Http\Request $request + * @return mixed + */ + public function auth($request) + { + if (Str::startsWith($request->channel_name, ['private-', 'presence-']) && + ! $request->user()) { + throw new HttpException(403); + } + + $channelName = Str::startsWith($request->channel_name, 'private-') + ? Str::replaceFirst('private-', '', $request->channel_name) + : Str::replaceFirst('presence-', '', $request->channel_name); + + return parent::verifyUserCanAccessChannel( + $request, $channelName + ); + } + + /** + * Return the valid authentication response. + * + * @param \Illuminate\Http\Request $request + * @param mixed $result + * @return mixed + */ + public function validAuthenticationResponse($request, $result) + { + if (Str::startsWith($request->channel_name, 'private')) { + 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) + ); + } + } + + /** + * Decode the given Pusher response. + * + * @param mixed $response + * @return array + */ + protected function decodePusherResponse($response) + { + return json_decode($response, true); + } + + /** + * Broadcast the given event. + * + * @param array $channels + * @param string $event + * @param array $payload + * @return void + */ + public function broadcast(array $channels, $event, array $payload = []) + { + $socket = Arr::pull($payload, 'socket'); + + $response = $this->pusher->trigger( + $this->formatChannels($channels), $event, $payload, $socket, true + ); + + if ((is_array($response) && $response['status'] >= 200 && $response['status'] <= 299) + || $response === true) { + return; + } + + throw new BroadcastException( + is_bool($response) ? 'Failed to connect to Pusher.' : $response['body'] + ); + } + + /** + * Get the Pusher SDK instance. + * + * @return \Pusher + */ + public function getPusher() + { + return $this->pusher; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/RedisBroadcaster.php b/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/RedisBroadcaster.php new file mode 100644 index 0000000..999899f --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/RedisBroadcaster.php @@ -0,0 +1,102 @@ +redis = $redis; + $this->connection = $connection; + } + + /** + * Authenticate the incoming request for a given channel. + * + * @param \Illuminate\Http\Request $request + * @return mixed + */ + public function auth($request) + { + if (Str::startsWith($request->channel_name, ['private-', 'presence-']) && + ! $request->user()) { + throw new HttpException(403); + } + + $channelName = Str::startsWith($request->channel_name, 'private-') + ? Str::replaceFirst('private-', '', $request->channel_name) + : Str::replaceFirst('presence-', '', $request->channel_name); + + return parent::verifyUserCanAccessChannel( + $request, $channelName + ); + } + + /** + * Return the valid authentication response. + * + * @param \Illuminate\Http\Request $request + * @param mixed $result + * @return mixed + */ + public function validAuthenticationResponse($request, $result) + { + if (is_bool($result)) { + return json_encode($result); + } + + return json_encode(['channel_data' => [ + 'user_id' => $request->user()->getAuthIdentifier(), + 'user_info' => $result, + ]]); + } + + /** + * Broadcast the given event. + * + * @param array $channels + * @param string $event + * @param array $payload + * @return void + */ + public function broadcast(array $channels, $event, array $payload = []) + { + $connection = $this->redis->connection($this->connection); + + $payload = json_encode([ + 'event' => $event, + 'data' => $payload, + 'socket' => Arr::pull($payload, 'socket'), + ]); + + foreach ($this->formatChannels($channels) as $channel) { + $connection->publish($channel, $payload); + } + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Broadcasting/Channel.php b/vendor/laravel/framework/src/Illuminate/Broadcasting/Channel.php new file mode 100644 index 0000000..798d602 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Broadcasting/Channel.php @@ -0,0 +1,34 @@ +name = $name; + } + + /** + * Convert the channel instance to a string. + * + * @return string + */ + public function __toString() + { + return $this->name; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Broadcasting/InteractsWithSockets.php b/vendor/laravel/framework/src/Illuminate/Broadcasting/InteractsWithSockets.php new file mode 100644 index 0000000..6be0791 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Broadcasting/InteractsWithSockets.php @@ -0,0 +1,39 @@ +socket = Broadcast::socket(); + + return $this; + } + + /** + * Broadcast the event to everyone. + * + * @return $this + */ + public function broadcastToEveryone() + { + $this->socket = null; + + return $this; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Broadcasting/PendingBroadcast.php b/vendor/laravel/framework/src/Illuminate/Broadcasting/PendingBroadcast.php new file mode 100644 index 0000000..b755029 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Broadcasting/PendingBroadcast.php @@ -0,0 +1,59 @@ +event = $event; + $this->events = $events; + } + + /** + * Broadcast the event to everyone except the current user. + * + * @return $this + */ + public function toOthers() + { + if (method_exists($this->event, 'dontBroadcastToCurrentUser')) { + $this->event->dontBroadcastToCurrentUser(); + } + + return $this; + } + + /** + * Handle the object's destruction. + * + * @return void + */ + public function __destruct() + { + $this->events->dispatch($this->event); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Broadcasting/PresenceChannel.php b/vendor/laravel/framework/src/Illuminate/Broadcasting/PresenceChannel.php new file mode 100644 index 0000000..22de12d --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Broadcasting/PresenceChannel.php @@ -0,0 +1,17 @@ +=5.6.4", + "illuminate/bus": "5.4.*", + "illuminate/contracts": "5.4.*", + "illuminate/queue": "5.4.*", + "illuminate/support": "5.4.*" + }, + "autoload": { + "psr-4": { + "Illuminate\\Broadcasting\\": "" + } + }, + "extra": { + "branch-alias": { + "dev-master": "5.4-dev" + } + }, + "suggest": { + "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (~2.0)." + }, + "config": { + "sort-packages": true + }, + "minimum-stability": "dev" +} diff --git a/vendor/laravel/framework/src/Illuminate/Bus/BusServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Bus/BusServiceProvider.php new file mode 100644 index 0000000..ade4a77 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Bus/BusServiceProvider.php @@ -0,0 +1,54 @@ +app->singleton(Dispatcher::class, function ($app) { + return new Dispatcher($app, function ($connection = null) use ($app) { + return $app[QueueFactoryContract::class]->connection($connection); + }); + }); + + $this->app->alias( + Dispatcher::class, DispatcherContract::class + ); + + $this->app->alias( + Dispatcher::class, QueueingDispatcherContract::class + ); + } + + /** + * Get the services provided by the provider. + * + * @return array + */ + public function provides() + { + return [ + Dispatcher::class, + DispatcherContract::class, + QueueingDispatcherContract::class, + ]; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php b/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php new file mode 100644 index 0000000..2690fe7 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php @@ -0,0 +1,212 @@ +container = $container; + $this->queueResolver = $queueResolver; + $this->pipeline = new Pipeline($container); + } + + /** + * Dispatch a command to its appropriate handler. + * + * @param mixed $command + * @return mixed + */ + public function dispatch($command) + { + if ($this->queueResolver && $this->commandShouldBeQueued($command)) { + return $this->dispatchToQueue($command); + } else { + return $this->dispatchNow($command); + } + } + + /** + * Dispatch a command to its appropriate handler in the current process. + * + * @param mixed $command + * @param mixed $handler + * @return mixed + */ + public function dispatchNow($command, $handler = null) + { + if ($handler || $handler = $this->getCommandHandler($command)) { + $callback = function ($command) use ($handler) { + return $handler->handle($command); + }; + } else { + $callback = function ($command) { + return $this->container->call([$command, 'handle']); + }; + } + + return $this->pipeline->send($command)->through($this->pipes)->then($callback); + } + + /** + * Determine if the given command has a handler. + * + * @param mixed $command + * @return bool + */ + public function hasCommandHandler($command) + { + return array_key_exists(get_class($command), $this->handlers); + } + + /** + * Retrieve the handler for a command. + * + * @param mixed $command + * @return bool|mixed + */ + public function getCommandHandler($command) + { + if ($this->hasCommandHandler($command)) { + return $this->container->make($this->handlers[get_class($command)]); + } + + return false; + } + + /** + * Determine if the given command should be queued. + * + * @param mixed $command + * @return bool + */ + protected function commandShouldBeQueued($command) + { + return $command instanceof ShouldQueue; + } + + /** + * Dispatch a command to its appropriate handler behind a queue. + * + * @param mixed $command + * @return mixed + * + * @throws \RuntimeException + */ + public function dispatchToQueue($command) + { + $connection = isset($command->connection) ? $command->connection : null; + + $queue = call_user_func($this->queueResolver, $connection); + + if (! $queue instanceof Queue) { + throw new RuntimeException('Queue resolver did not return a Queue implementation.'); + } + + if (method_exists($command, 'queue')) { + return $command->queue($queue, $command); + } else { + return $this->pushCommandToQueue($queue, $command); + } + } + + /** + * Push the command onto the given queue instance. + * + * @param \Illuminate\Contracts\Queue\Queue $queue + * @param mixed $command + * @return mixed + */ + protected function pushCommandToQueue($queue, $command) + { + if (isset($command->queue, $command->delay)) { + return $queue->laterOn($command->queue, $command->delay, $command); + } + + if (isset($command->queue)) { + return $queue->pushOn($command->queue, $command); + } + + if (isset($command->delay)) { + return $queue->later($command->delay, $command); + } + + return $queue->push($command); + } + + /** + * Set the pipes through which commands should be piped before dispatching. + * + * @param array $pipes + * @return $this + */ + public function pipeThrough(array $pipes) + { + $this->pipes = $pipes; + + return $this; + } + + /** + * Map a command to a handler. + * + * @param array $map + * @return $this + */ + public function map(array $map) + { + $this->handlers = array_merge($this->handlers, $map); + + return $this; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Bus/Queueable.php b/vendor/laravel/framework/src/Illuminate/Bus/Queueable.php new file mode 100644 index 0000000..6813363 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Bus/Queueable.php @@ -0,0 +1,66 @@ +connection = $connection; + + return $this; + } + + /** + * Set the desired queue for the job. + * + * @param string|null $queue + * @return $this + */ + public function onQueue($queue) + { + $this->queue = $queue; + + return $this; + } + + /** + * Set the desired delay for the job. + * + * @param \DateTime|int|null $delay + * @return $this + */ + public function delay($delay) + { + $this->delay = $delay; + + return $this; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Bus/composer.json b/vendor/laravel/framework/src/Illuminate/Bus/composer.json new file mode 100644 index 0000000..1f29f62 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Bus/composer.json @@ -0,0 +1,36 @@ +{ + "name": "illuminate/bus", + "description": "The Illuminate Bus package.", + "license": "MIT", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "require": { + "php": ">=5.6.4", + "illuminate/contracts": "5.4.*", + "illuminate/pipeline": "5.4.*", + "illuminate/support": "5.4.*" + }, + "autoload": { + "psr-4": { + "Illuminate\\Bus\\": "" + } + }, + "extra": { + "branch-alias": { + "dev-master": "5.4-dev" + } + }, + "config": { + "sort-packages": true + }, + "minimum-stability": "dev" +} diff --git a/vendor/laravel/framework/src/Illuminate/Cache/ApcStore.php b/vendor/laravel/framework/src/Illuminate/Cache/ApcStore.php new file mode 100755 index 0000000..db11ea4 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Cache/ApcStore.php @@ -0,0 +1,132 @@ +apc = $apc; + $this->prefix = $prefix; + } + + /** + * Retrieve an item from the cache by key. + * + * @param string|array $key + * @return mixed + */ + public function get($key) + { + $value = $this->apc->get($this->prefix.$key); + + if ($value !== false) { + return $value; + } + } + + /** + * Store an item in the cache for a given number of minutes. + * + * @param string $key + * @param mixed $value + * @param float|int $minutes + * @return void + */ + public function put($key, $value, $minutes) + { + $this->apc->put($this->prefix.$key, $value, (int) ($minutes * 60)); + } + + /** + * Increment the value of an item in the cache. + * + * @param string $key + * @param mixed $value + * @return int|bool + */ + public function increment($key, $value = 1) + { + return $this->apc->increment($this->prefix.$key, $value); + } + + /** + * Decrement the value of an item in the cache. + * + * @param string $key + * @param mixed $value + * @return int|bool + */ + public function decrement($key, $value = 1) + { + return $this->apc->decrement($this->prefix.$key, $value); + } + + /** + * Store an item in the cache indefinitely. + * + * @param string $key + * @param mixed $value + * @return void + */ + public function forever($key, $value) + { + $this->put($key, $value, 0); + } + + /** + * Remove an item from the cache. + * + * @param string $key + * @return bool + */ + public function forget($key) + { + return $this->apc->delete($this->prefix.$key); + } + + /** + * Remove all items from the cache. + * + * @return bool + */ + public function flush() + { + return $this->apc->flush(); + } + + /** + * Get the cache key prefix. + * + * @return string + */ + public function getPrefix() + { + return $this->prefix; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Cache/ApcWrapper.php b/vendor/laravel/framework/src/Illuminate/Cache/ApcWrapper.php new file mode 100755 index 0000000..42e76aa --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Cache/ApcWrapper.php @@ -0,0 +1,92 @@ +apcu = function_exists('apcu_fetch'); + } + + /** + * Get an item from the cache. + * + * @param string $key + * @return mixed + */ + public function get($key) + { + return $this->apcu ? apcu_fetch($key) : apc_fetch($key); + } + + /** + * Store an item in the cache. + * + * @param string $key + * @param mixed $value + * @param int $seconds + * @return array|bool + */ + public function put($key, $value, $seconds) + { + return $this->apcu ? apcu_store($key, $value, $seconds) : apc_store($key, $value, $seconds); + } + + /** + * Increment the value of an item in the cache. + * + * @param string $key + * @param mixed $value + * @return int|bool + */ + public function increment($key, $value) + { + return $this->apcu ? apcu_inc($key, $value) : apc_inc($key, $value); + } + + /** + * Decrement the value of an item in the cache. + * + * @param string $key + * @param mixed $value + * @return int|bool + */ + public function decrement($key, $value) + { + return $this->apcu ? apcu_dec($key, $value) : apc_dec($key, $value); + } + + /** + * Remove an item from the cache. + * + * @param string $key + * @return bool + */ + public function delete($key) + { + return $this->apcu ? apcu_delete($key) : apc_delete($key); + } + + /** + * Remove all items from the cache. + * + * @return bool + */ + public function flush() + { + return $this->apcu ? apcu_clear_cache() : apc_clear_cache('user'); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Cache/ArrayStore.php b/vendor/laravel/framework/src/Illuminate/Cache/ArrayStore.php new file mode 100644 index 0000000..d2f9140 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Cache/ArrayStore.php @@ -0,0 +1,116 @@ +storage)) { + return $this->storage[$key]; + } + } + + /** + * Store an item in the cache for a given number of minutes. + * + * @param string $key + * @param mixed $value + * @param float|int $minutes + * @return void + */ + public function put($key, $value, $minutes) + { + $this->storage[$key] = $value; + } + + /** + * Increment the value of an item in the cache. + * + * @param string $key + * @param mixed $value + * @return int + */ + public function increment($key, $value = 1) + { + $this->storage[$key] = ((int) $this->storage[$key]) + $value; + + return $this->storage[$key]; + } + + /** + * Decrement the value of an item in the cache. + * + * @param string $key + * @param mixed $value + * @return int + */ + public function decrement($key, $value = 1) + { + return $this->increment($key, $value * -1); + } + + /** + * Store an item in the cache indefinitely. + * + * @param string $key + * @param mixed $value + * @return void + */ + public function forever($key, $value) + { + $this->put($key, $value, 0); + } + + /** + * Remove an item from the cache. + * + * @param string $key + * @return bool + */ + public function forget($key) + { + unset($this->storage[$key]); + + return true; + } + + /** + * Remove all items from the cache. + * + * @return bool + */ + public function flush() + { + $this->storage = []; + + return true; + } + + /** + * Get the cache key prefix. + * + * @return string + */ + public function getPrefix() + { + return ''; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php b/vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php new file mode 100755 index 0000000..dfe64b5 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php @@ -0,0 +1,304 @@ +app = $app; + } + + /** + * Get a cache store instance by name. + * + * @param string|null $name + * @return mixed + */ + public function store($name = null) + { + $name = $name ?: $this->getDefaultDriver(); + + return $this->stores[$name] = $this->get($name); + } + + /** + * Get a cache driver instance. + * + * @param string $driver + * @return mixed + */ + public function driver($driver = null) + { + return $this->store($driver); + } + + /** + * Attempt to get the store from the local cache. + * + * @param string $name + * @return \Illuminate\Contracts\Cache\Repository + */ + protected function get($name) + { + return isset($this->stores[$name]) ? $this->stores[$name] : $this->resolve($name); + } + + /** + * Resolve the given store. + * + * @param string $name + * @return \Illuminate\Contracts\Cache\Repository + * + * @throws \InvalidArgumentException + */ + protected function resolve($name) + { + $config = $this->getConfig($name); + + if (is_null($config)) { + throw new InvalidArgumentException("Cache store [{$name}] is not defined."); + } + + if (isset($this->customCreators[$config['driver']])) { + return $this->callCustomCreator($config); + } else { + $driverMethod = 'create'.ucfirst($config['driver']).'Driver'; + + if (method_exists($this, $driverMethod)) { + return $this->{$driverMethod}($config); + } else { + throw new InvalidArgumentException("Driver [{$config['driver']}] is not supported."); + } + } + } + + /** + * Call a custom driver creator. + * + * @param array $config + * @return mixed + */ + protected function callCustomCreator(array $config) + { + return $this->customCreators[$config['driver']]($this->app, $config); + } + + /** + * Create an instance of the APC cache driver. + * + * @param array $config + * @return \Illuminate\Cache\ApcStore + */ + protected function createApcDriver(array $config) + { + $prefix = $this->getPrefix($config); + + return $this->repository(new ApcStore(new ApcWrapper, $prefix)); + } + + /** + * Create an instance of the array cache driver. + * + * @return \Illuminate\Cache\ArrayStore + */ + protected function createArrayDriver() + { + return $this->repository(new ArrayStore); + } + + /** + * Create an instance of the file cache driver. + * + * @param array $config + * @return \Illuminate\Cache\FileStore + */ + protected function createFileDriver(array $config) + { + return $this->repository(new FileStore($this->app['files'], $config['path'])); + } + + /** + * Create an instance of the Memcached cache driver. + * + * @param array $config + * @return \Illuminate\Cache\MemcachedStore + */ + protected function createMemcachedDriver(array $config) + { + $prefix = $this->getPrefix($config); + + $memcached = $this->app['memcached.connector']->connect( + $config['servers'], + array_get($config, 'persistent_id'), + array_get($config, 'options', []), + array_filter(array_get($config, 'sasl', [])) + ); + + return $this->repository(new MemcachedStore($memcached, $prefix)); + } + + /** + * Create an instance of the Null cache driver. + * + * @return \Illuminate\Cache\NullStore + */ + protected function createNullDriver() + { + return $this->repository(new NullStore); + } + + /** + * Create an instance of the Redis cache driver. + * + * @param array $config + * @return \Illuminate\Cache\RedisStore + */ + protected function createRedisDriver(array $config) + { + $redis = $this->app['redis']; + + $connection = Arr::get($config, 'connection', 'default'); + + return $this->repository(new RedisStore($redis, $this->getPrefix($config), $connection)); + } + + /** + * Create an instance of the database cache driver. + * + * @param array $config + * @return \Illuminate\Cache\DatabaseStore + */ + protected function createDatabaseDriver(array $config) + { + $connection = $this->app['db']->connection(Arr::get($config, 'connection')); + + return $this->repository( + new DatabaseStore( + $connection, $this->app['encrypter'], $config['table'], $this->getPrefix($config) + ) + ); + } + + /** + * Create a new cache repository with the given implementation. + * + * @param \Illuminate\Contracts\Cache\Store $store + * @return \Illuminate\Cache\Repository + */ + public function repository(Store $store) + { + $repository = new Repository($store); + + if ($this->app->bound(DispatcherContract::class)) { + $repository->setEventDispatcher( + $this->app[DispatcherContract::class] + ); + } + + return $repository; + } + + /** + * Get the cache prefix. + * + * @param array $config + * @return string + */ + protected function getPrefix(array $config) + { + return Arr::get($config, 'prefix') ?: $this->app['config']['cache.prefix']; + } + + /** + * Get the cache connection configuration. + * + * @param string $name + * @return array + */ + protected function getConfig($name) + { + return $this->app['config']["cache.stores.{$name}"]; + } + + /** + * Get the default cache driver name. + * + * @return string + */ + public function getDefaultDriver() + { + return $this->app['config']['cache.default']; + } + + /** + * Set the default cache driver name. + * + * @param string $name + * @return void + */ + public function setDefaultDriver($name) + { + $this->app['config']['cache.default'] = $name; + } + + /** + * Register a custom driver creator Closure. + * + * @param string $driver + * @param \Closure $callback + * @return $this + */ + public function extend($driver, Closure $callback) + { + $this->customCreators[$driver] = $callback->bindTo($this, $this); + + return $this; + } + + /** + * Dynamically call the default driver instance. + * + * @param string $method + * @param array $parameters + * @return mixed + */ + public function __call($method, $parameters) + { + return $this->store()->$method(...$parameters); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Cache/CacheServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Cache/CacheServiceProvider.php new file mode 100755 index 0000000..8eb5ed6 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Cache/CacheServiceProvider.php @@ -0,0 +1,47 @@ +app->singleton('cache', function ($app) { + return new CacheManager($app); + }); + + $this->app->singleton('cache.store', function ($app) { + return $app['cache']->driver(); + }); + + $this->app->singleton('memcached.connector', function () { + return new MemcachedConnector; + }); + } + + /** + * Get the services provided by the provider. + * + * @return array + */ + public function provides() + { + return [ + 'cache', 'cache.store', 'memcached.connector', + ]; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Cache/Console/CacheTableCommand.php b/vendor/laravel/framework/src/Illuminate/Cache/Console/CacheTableCommand.php new file mode 100644 index 0000000..7c3f4b6 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Cache/Console/CacheTableCommand.php @@ -0,0 +1,81 @@ +files = $files; + $this->composer = $composer; + } + + /** + * Execute the console command. + * + * @return void + */ + public function fire() + { + $fullPath = $this->createBaseMigration(); + + $this->files->put($fullPath, $this->files->get(__DIR__.'/stubs/cache.stub')); + + $this->info('Migration created successfully!'); + + $this->composer->dumpAutoloads(); + } + + /** + * Create a base migration file for the table. + * + * @return string + */ + protected function createBaseMigration() + { + $name = 'create_cache_table'; + + $path = $this->laravel->databasePath().'/migrations'; + + return $this->laravel['migration.creator']->create($name, $path); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Cache/Console/ClearCommand.php b/vendor/laravel/framework/src/Illuminate/Cache/Console/ClearCommand.php new file mode 100755 index 0000000..48c5763 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Cache/Console/ClearCommand.php @@ -0,0 +1,107 @@ +cache = $cache; + } + + /** + * Execute the console command. + * + * @return void + */ + public function handle() + { + $this->laravel['events']->fire('cache:clearing', [$this->argument('store'), $this->tags()]); + + $this->cache()->flush(); + + $this->laravel['events']->fire('cache:cleared', [$this->argument('store'), $this->tags()]); + + $this->info('Cache cleared successfully.'); + } + + /** + * Get the cache instance for the command. + * + * @return \Illuminate\Cache\Repository + */ + protected function cache() + { + $cache = $this->cache->store($this->argument('store')); + + return empty($this->tags()) ? $cache : $cache->tags($this->tags()); + } + + /** + * Get the tags passed to the command. + * + * @return array + */ + protected function tags() + { + return array_filter(explode(',', $this->option('tags'))); + } + + /** + * Get the console command arguments. + * + * @return array + */ + protected function getArguments() + { + return [ + ['store', InputArgument::OPTIONAL, 'The name of the store you would like to clear.'], + ]; + } + + /** + * Get the console command options. + * + * @return array + */ + protected function getOptions() + { + return [ + ['tags', null, InputOption::VALUE_OPTIONAL, 'The cache tags you would like to clear.', null], + ]; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Cache/Console/ForgetCommand.php b/vendor/laravel/framework/src/Illuminate/Cache/Console/ForgetCommand.php new file mode 100755 index 0000000..646dc14 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Cache/Console/ForgetCommand.php @@ -0,0 +1,57 @@ +cache = $cache; + } + + /** + * Execute the console command. + * + * @return void + */ + public function handle() + { + $this->cache->store($this->argument('store'))->forget( + $this->argument('key') + ); + + $this->info('The ['.$this->argument('key').'] key has been removed from the cache.'); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Cache/Console/stubs/cache.stub b/vendor/laravel/framework/src/Illuminate/Cache/Console/stubs/cache.stub new file mode 100644 index 0000000..1f7761c --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Cache/Console/stubs/cache.stub @@ -0,0 +1,32 @@ +string('key')->unique(); + $table->text('value'); + $table->integer('expiration'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('cache'); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Cache/DatabaseStore.php b/vendor/laravel/framework/src/Illuminate/Cache/DatabaseStore.php new file mode 100755 index 0000000..c120c97 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Cache/DatabaseStore.php @@ -0,0 +1,280 @@ +table = $table; + $this->prefix = $prefix; + $this->encrypter = $encrypter; + $this->connection = $connection; + } + + /** + * Retrieve an item from the cache by key. + * + * @param string|array $key + * @return mixed + */ + public function get($key) + { + $prefixed = $this->prefix.$key; + + $cache = $this->table()->where('key', '=', $prefixed)->first(); + + // If we have a cache record we will check the expiration time against current + // time on the system and see if the record has expired. If it has, we will + // remove the records from the database table so it isn't returned again. + if (is_null($cache)) { + return; + } + + $cache = is_array($cache) ? (object) $cache : $cache; + + // If this cache expiration date is past the current time, we will remove this + // item from the cache. Then we will return a null value since the cache is + // expired. We will use "Carbon" to make this comparison with the column. + if (Carbon::now()->getTimestamp() >= $cache->expiration) { + $this->forget($key); + + return; + } + + return $this->encrypter->decrypt($cache->value); + } + + /** + * Store an item in the cache for a given number of minutes. + * + * @param string $key + * @param mixed $value + * @param float|int $minutes + * @return void + */ + public function put($key, $value, $minutes) + { + $key = $this->prefix.$key; + + // All of the cached values in the database are encrypted in case this is used + // as a session data store by the consumer. We'll also calculate the expire + // time and place that on the table so we will check it on our retrieval. + $value = $this->encrypter->encrypt($value); + + $expiration = $this->getTime() + (int) ($minutes * 60); + + try { + $this->table()->insert(compact('key', 'value', 'expiration')); + } catch (Exception $e) { + $this->table()->where('key', $key)->update(compact('value', 'expiration')); + } + } + + /** + * Increment the value of an item in the cache. + * + * @param string $key + * @param mixed $value + * @return int|bool + */ + public function increment($key, $value = 1) + { + return $this->incrementOrDecrement($key, $value, function ($current, $value) { + return $current + $value; + }); + } + + /** + * Decrement the value of an item in the cache. + * + * @param string $key + * @param mixed $value + * @return int|bool + */ + public function decrement($key, $value = 1) + { + return $this->incrementOrDecrement($key, $value, function ($current, $value) { + return $current - $value; + }); + } + + /** + * Increment or decrement an item in the cache. + * + * @param string $key + * @param mixed $value + * @param \Closure $callback + * @return int|bool + */ + protected function incrementOrDecrement($key, $value, Closure $callback) + { + return $this->connection->transaction(function () use ($key, $value, $callback) { + $prefixed = $this->prefix.$key; + + $cache = $this->table()->where('key', $prefixed) + ->lockForUpdate()->first(); + + // If there is no value in the cache, we will return false here. Otherwise the + // value will be decrypted and we will proceed with this function to either + // increment or decrement this value based on the given action callbacks. + if (is_null($cache)) { + return false; + } + + $cache = is_array($cache) ? (object) $cache : $cache; + + $current = $this->encrypter->decrypt($cache->value); + + // Here we'll call this callback function that was given to the function which + // is used to either increment or decrement the function. We use a callback + // so we do not have to recreate all this logic in each of the functions. + $new = $callback((int) $current, $value); + + if (! is_numeric($current)) { + return false; + } + + // Here we will update the values in the table. We will also encrypt the value + // since database cache values are encrypted by default with secure storage + // that can't be easily read. We will return the new value after storing. + $this->table()->where('key', $prefixed)->update([ + 'value' => $this->encrypter->encrypt($new), + ]); + + return $new; + }); + } + + /** + * Get the current system time. + * + * @return int + */ + protected function getTime() + { + return Carbon::now()->getTimestamp(); + } + + /** + * Store an item in the cache indefinitely. + * + * @param string $key + * @param mixed $value + * @return void + */ + public function forever($key, $value) + { + $this->put($key, $value, 5256000); + } + + /** + * Remove an item from the cache. + * + * @param string $key + * @return bool + */ + public function forget($key) + { + $this->table()->where('key', '=', $this->prefix.$key)->delete(); + + return true; + } + + /** + * Remove all items from the cache. + * + * @return bool + */ + public function flush() + { + return (bool) $this->table()->delete(); + } + + /** + * Get a query builder for the cache table. + * + * @return \Illuminate\Database\Query\Builder + */ + protected function table() + { + return $this->connection->table($this->table); + } + + /** + * Get the underlying database connection. + * + * @return \Illuminate\Database\ConnectionInterface + */ + public function getConnection() + { + return $this->connection; + } + + /** + * Get the encrypter instance. + * + * @return \Illuminate\Contracts\Encryption\Encrypter + */ + public function getEncrypter() + { + return $this->encrypter; + } + + /** + * Get the cache key prefix. + * + * @return string + */ + public function getPrefix() + { + return $this->prefix; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Cache/Events/CacheEvent.php b/vendor/laravel/framework/src/Illuminate/Cache/Events/CacheEvent.php new file mode 100644 index 0000000..6c9d42c --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Cache/Events/CacheEvent.php @@ -0,0 +1,46 @@ +key = $key; + $this->tags = $tags; + } + + /** + * Set the tags for the cache event. + * + * @param array $tags + * @return $this + */ + public function setTags($tags) + { + $this->tags = $tags; + + return $this; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Cache/Events/CacheHit.php b/vendor/laravel/framework/src/Illuminate/Cache/Events/CacheHit.php new file mode 100644 index 0000000..976c9e4 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Cache/Events/CacheHit.php @@ -0,0 +1,28 @@ +value = $value; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Cache/Events/CacheMissed.php b/vendor/laravel/framework/src/Illuminate/Cache/Events/CacheMissed.php new file mode 100644 index 0000000..d2a5c9f --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Cache/Events/CacheMissed.php @@ -0,0 +1,8 @@ +value = $value; + $this->minutes = $minutes; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Cache/FileStore.php b/vendor/laravel/framework/src/Illuminate/Cache/FileStore.php new file mode 100755 index 0000000..90d49c0 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Cache/FileStore.php @@ -0,0 +1,263 @@ +files = $files; + $this->directory = $directory; + } + + /** + * Retrieve an item from the cache by key. + * + * @param string|array $key + * @return mixed + */ + public function get($key) + { + return Arr::get($this->getPayload($key), 'data'); + } + + /** + * Store an item in the cache for a given number of minutes. + * + * @param string $key + * @param mixed $value + * @param float|int $minutes + * @return void + */ + public function put($key, $value, $minutes) + { + $this->ensureCacheDirectoryExists($path = $this->path($key)); + + $this->files->put( + $path, $this->expiration($minutes).serialize($value), true + ); + } + + /** + * Create the file cache directory if necessary. + * + * @param string $path + * @return void + */ + protected function ensureCacheDirectoryExists($path) + { + if (! $this->files->exists(dirname($path))) { + $this->files->makeDirectory(dirname($path), 0777, true, true); + } + } + + /** + * Increment the value of an item in the cache. + * + * @param string $key + * @param mixed $value + * @return int + */ + public function increment($key, $value = 1) + { + $raw = $this->getPayload($key); + + return tap(((int) $raw['data']) + $value, function ($newValue) use ($key, $raw) { + $this->put($key, $newValue, $raw['time']); + }); + } + + /** + * Decrement the value of an item in the cache. + * + * @param string $key + * @param mixed $value + * @return int + */ + public function decrement($key, $value = 1) + { + return $this->increment($key, $value * -1); + } + + /** + * Store an item in the cache indefinitely. + * + * @param string $key + * @param mixed $value + * @return void + */ + public function forever($key, $value) + { + $this->put($key, $value, 0); + } + + /** + * Remove an item from the cache. + * + * @param string $key + * @return bool + */ + public function forget($key) + { + if ($this->files->exists($file = $this->path($key))) { + return $this->files->delete($file); + } + + return false; + } + + /** + * Remove all items from the cache. + * + * @return bool + */ + public function flush() + { + if (! $this->files->isDirectory($this->directory)) { + return false; + } + + foreach ($this->files->directories($this->directory) as $directory) { + if (! $this->files->deleteDirectory($directory)) { + return false; + } + } + + return true; + } + + /** + * Retrieve an item and expiry time from the cache by key. + * + * @param string $key + * @return array + */ + protected function getPayload($key) + { + $path = $this->path($key); + + // If the file doesn't exists, we obviously can't return the cache so we will + // just return null. Otherwise, we'll get the contents of the file and get + // the expiration UNIX timestamps from the start of the file's contents. + try { + $expire = substr( + $contents = $this->files->get($path, true), 0, 10 + ); + } catch (Exception $e) { + return $this->emptyPayload(); + } + + // If the current time is greater than expiration timestamps we will delete + // the file and return null. This helps clean up the old files and keeps + // this directory much cleaner for us as old files aren't hanging out. + if (Carbon::now()->getTimestamp() >= $expire) { + $this->forget($key); + + return $this->emptyPayload(); + } + + $data = unserialize(substr($contents, 10)); + + // Next, we'll extract the number of minutes that are remaining for a cache + // so that we can properly retain the time for things like the increment + // operation that may be performed on this cache on a later operation. + $time = ($expire - Carbon::now()->getTimestamp()) / 60; + + return compact('data', 'time'); + } + + /** + * Get a default empty payload for the cache. + * + * @return array + */ + protected function emptyPayload() + { + return ['data' => null, 'time' => null]; + } + + /** + * Get the full path for the given cache key. + * + * @param string $key + * @return string + */ + protected function path($key) + { + $parts = array_slice(str_split($hash = sha1($key), 2), 0, 2); + + return $this->directory.'/'.implode('/', $parts).'/'.$hash; + } + + /** + * Get the expiration time based on the given minutes. + * + * @param float|int $minutes + * @return int + */ + protected function expiration($minutes) + { + $time = Carbon::now()->getTimestamp() + (int) ($minutes * 60); + + return $minutes === 0 || $time > 9999999999 ? 9999999999 : (int) $time; + } + + /** + * Get the Filesystem instance. + * + * @return \Illuminate\Filesystem\Filesystem + */ + public function getFilesystem() + { + return $this->files; + } + + /** + * Get the working directory of the cache. + * + * @return string + */ + public function getDirectory() + { + return $this->directory; + } + + /** + * Get the cache key prefix. + * + * @return string + */ + public function getPrefix() + { + return ''; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Cache/MemcachedConnector.php b/vendor/laravel/framework/src/Illuminate/Cache/MemcachedConnector.php new file mode 100755 index 0000000..d152476 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Cache/MemcachedConnector.php @@ -0,0 +1,111 @@ +getMemcached( + $connectionId, $credentials, $options + ); + + if (! $memcached->getServerList()) { + // For each server in the array, we'll just extract the configuration and add + // the server to the Memcached connection. Once we have added all of these + // servers we'll verify the connection is successful and return it back. + foreach ($servers as $server) { + $memcached->addServer( + $server['host'], $server['port'], $server['weight'] + ); + } + } + + return $this->validateConnection($memcached); + } + + /** + * Get a new Memcached instance. + * + * @param string|null $connectionId + * @param array $credentials + * @param array $options + * @return \Memcached + */ + protected function getMemcached($connectionId, array $credentials, array $options) + { + $memcached = $this->createMemcachedInstance($connectionId); + + if (count($credentials) == 2) { + $this->setCredentials($memcached, $credentials); + } + + if (count($options)) { + $memcached->setOptions($options); + } + + return $memcached; + } + + /** + * Create the Memcached instance. + * + * @param string|null $connectionId + * @return \Memcached + */ + protected function createMemcachedInstance($connectionId) + { + return empty($connectionId) ? new Memcached : new Memcached($connectionId); + } + + /** + * Set the SASL credentials on the Memcached connection. + * + * @param \Memcached $memcached + * @param array $credentials + * @return void + */ + protected function setCredentials($memcached, $credentials) + { + list($username, $password) = $credentials; + + $memcached->setOption(Memcached::OPT_BINARY_PROTOCOL, true); + + $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/vendor/laravel/framework/src/Illuminate/Cache/MemcachedStore.php b/vendor/laravel/framework/src/Illuminate/Cache/MemcachedStore.php new file mode 100755 index 0000000..dfd616b --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Cache/MemcachedStore.php @@ -0,0 +1,235 @@ += 3.0.0. + * + * @var bool + */ + protected $onVersionThree; + + /** + * Create a new Memcached store. + * + * @param \Memcached $memcached + * @param string $prefix + * @return void + */ + public function __construct($memcached, $prefix = '') + { + $this->setPrefix($prefix); + $this->memcached = $memcached; + + $this->onVersionThree = (new ReflectionMethod('Memcached', 'getMulti')) + ->getNumberOfParameters() == 2; + } + + /** + * Retrieve an item from the cache by key. + * + * @param string $key + * @return mixed + */ + public function get($key) + { + $value = $this->memcached->get($this->prefix.$key); + + if ($this->memcached->getResultCode() == 0) { + return $value; + } + } + + /** + * Retrieve multiple items from the cache by key. + * + * Items not found in the cache will have a null value. + * + * @param array $keys + * @return array + */ + public function many(array $keys) + { + $prefixedKeys = array_map(function ($key) { + return $this->prefix.$key; + }, $keys); + + if ($this->onVersionThree) { + $values = $this->memcached->getMulti($prefixedKeys, Memcached::GET_PRESERVE_ORDER); + } else { + $null = null; + + $values = $this->memcached->getMulti($prefixedKeys, $null, Memcached::GET_PRESERVE_ORDER); + } + + if ($this->memcached->getResultCode() != 0) { + return array_fill_keys($keys, null); + } + + return array_combine($keys, $values); + } + + /** + * Store an item in the cache for a given number of minutes. + * + * @param string $key + * @param mixed $value + * @param float|int $minutes + * @return void + */ + public function put($key, $value, $minutes) + { + $this->memcached->set($this->prefix.$key, $value, $this->toTimestamp($minutes)); + } + + /** + * Store multiple items in the cache for a given number of minutes. + * + * @param array $values + * @param float|int $minutes + * @return void + */ + public function putMany(array $values, $minutes) + { + $prefixedValues = []; + + foreach ($values as $key => $value) { + $prefixedValues[$this->prefix.$key] = $value; + } + + $this->memcached->setMulti($prefixedValues, $this->toTimestamp($minutes)); + } + + /** + * Store an item in the cache if the key doesn't exist. + * + * @param string $key + * @param mixed $value + * @param float|int $minutes + * @return bool + */ + public function add($key, $value, $minutes) + { + return $this->memcached->add($this->prefix.$key, $value, $this->toTimestamp($minutes)); + } + + /** + * Increment the value of an item in the cache. + * + * @param string $key + * @param mixed $value + * @return int|bool + */ + public function increment($key, $value = 1) + { + return $this->memcached->increment($this->prefix.$key, $value); + } + + /** + * Decrement the value of an item in the cache. + * + * @param string $key + * @param mixed $value + * @return int|bool + */ + public function decrement($key, $value = 1) + { + return $this->memcached->decrement($this->prefix.$key, $value); + } + + /** + * Store an item in the cache indefinitely. + * + * @param string $key + * @param mixed $value + * @return void + */ + public function forever($key, $value) + { + $this->put($key, $value, 0); + } + + /** + * Remove an item from the cache. + * + * @param string $key + * @return bool + */ + public function forget($key) + { + return $this->memcached->delete($this->prefix.$key); + } + + /** + * Remove all items from the cache. + * + * @return bool + */ + public function flush() + { + return $this->memcached->flush(); + } + + /** + * Get the UNIX timestamp for the given number of minutes. + * + * @param int $minutes + * @return int + */ + protected function toTimestamp($minutes) + { + return $minutes > 0 ? Carbon::now()->addSeconds($minutes * 60)->getTimestamp() : 0; + } + + /** + * Get the underlying Memcached connection. + * + * @return \Memcached + */ + public function getMemcached() + { + return $this->memcached; + } + + /** + * Get the cache key prefix. + * + * @return string + */ + public function getPrefix() + { + return $this->prefix; + } + + /** + * Set the cache key prefix. + * + * @param string $prefix + * @return void + */ + public function setPrefix($prefix) + { + $this->prefix = ! empty($prefix) ? $prefix.':' : ''; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Cache/NullStore.php b/vendor/laravel/framework/src/Illuminate/Cache/NullStore.php new file mode 100755 index 0000000..16e869c --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Cache/NullStore.php @@ -0,0 +1,108 @@ +cache = $cache; + } + + /** + * Determine if the given key has been "accessed" too many times. + * + * @param string $key + * @param int $maxAttempts + * @param float|int $decayMinutes + * @return bool + */ + public function tooManyAttempts($key, $maxAttempts, $decayMinutes = 1) + { + if ($this->cache->has($key.':lockout')) { + return true; + } + + if ($this->attempts($key) >= $maxAttempts) { + $this->lockout($key, $decayMinutes); + + $this->resetAttempts($key); + + return true; + } + + return false; + } + + /** + * Add the lockout key to the cache. + * + * @param string $key + * @param int $decayMinutes + * @return void + */ + protected function lockout($key, $decayMinutes) + { + $this->cache->add( + $key.':lockout', Carbon::now()->getTimestamp() + ($decayMinutes * 60), $decayMinutes + ); + } + + /** + * Increment the counter for a given key for a given decay time. + * + * @param string $key + * @param float|int $decayMinutes + * @return int + */ + public function hit($key, $decayMinutes = 1) + { + $this->cache->add($key, 0, $decayMinutes); + + return (int) $this->cache->increment($key); + } + + /** + * Get the number of attempts for the given key. + * + * @param string $key + * @return mixed + */ + public function attempts($key) + { + return $this->cache->get($key, 0); + } + + /** + * Reset the number of attempts for the given key. + * + * @param string $key + * @return mixed + */ + public function resetAttempts($key) + { + return $this->cache->forget($key); + } + + /** + * Get the number of retries left for the given key. + * + * @param string $key + * @param int $maxAttempts + * @return int + */ + public function retriesLeft($key, $maxAttempts) + { + $attempts = $this->attempts($key); + + return $maxAttempts - $attempts; + } + + /** + * Clear the hits and lockout for the given key. + * + * @param string $key + * @return void + */ + public function clear($key) + { + $this->resetAttempts($key); + + $this->cache->forget($key.':lockout'); + } + + /** + * Get the number of seconds until the "key" is accessible again. + * + * @param string $key + * @return int + */ + public function availableIn($key) + { + return $this->cache->get($key.':lockout') - Carbon::now()->getTimestamp(); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Cache/RedisStore.php b/vendor/laravel/framework/src/Illuminate/Cache/RedisStore.php new file mode 100755 index 0000000..6c7b30b --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Cache/RedisStore.php @@ -0,0 +1,277 @@ +redis = $redis; + $this->setPrefix($prefix); + $this->setConnection($connection); + } + + /** + * Retrieve an item from the cache by key. + * + * @param string|array $key + * @return mixed + */ + public function get($key) + { + $value = $this->connection()->get($this->prefix.$key); + + return ! is_null($value) ? $this->unserialize($value) : null; + } + + /** + * Retrieve multiple items from the cache by key. + * + * Items not found in the cache will have a null value. + * + * @param array $keys + * @return array + */ + public function many(array $keys) + { + $results = []; + + $values = $this->connection()->mget(array_map(function ($key) { + return $this->prefix.$key; + }, $keys)); + + foreach ($values as $index => $value) { + $results[$keys[$index]] = $this->unserialize($value); + } + + return $results; + } + + /** + * Store an item in the cache for a given number of minutes. + * + * @param string $key + * @param mixed $value + * @param float|int $minutes + * @return void + */ + public function put($key, $value, $minutes) + { + $this->connection()->setex( + $this->prefix.$key, (int) max(1, $minutes * 60), $this->serialize($value) + ); + } + + /** + * Store multiple items in the cache for a given number of minutes. + * + * @param array $values + * @param float|int $minutes + * @return void + */ + public function putMany(array $values, $minutes) + { + $this->connection()->multi(); + + foreach ($values as $key => $value) { + $this->put($key, $value, $minutes); + } + + $this->connection()->exec(); + } + + /** + * Store an item in the cache if the key doesn't exist. + * + * @param string $key + * @param mixed $value + * @param float|int $minutes + * @return bool + */ + public function add($key, $value, $minutes) + { + $lua = "return redis.call('exists',KEYS[1])<1 and redis.call('setex',KEYS[1],ARGV[2],ARGV[1])"; + + return (bool) $this->connection()->eval( + $lua, 1, $this->prefix.$key, $this->serialize($value), (int) max(1, $minutes * 60) + ); + } + + /** + * Increment the value of an item in the cache. + * + * @param string $key + * @param mixed $value + * @return int + */ + public function increment($key, $value = 1) + { + return $this->connection()->incrby($this->prefix.$key, $value); + } + + /** + * Decrement the value of an item in the cache. + * + * @param string $key + * @param mixed $value + * @return int + */ + public function decrement($key, $value = 1) + { + return $this->connection()->decrby($this->prefix.$key, $value); + } + + /** + * Store an item in the cache indefinitely. + * + * @param string $key + * @param mixed $value + * @return void + */ + public function forever($key, $value) + { + $this->connection()->set($this->prefix.$key, $this->serialize($value)); + } + + /** + * Remove an item from the cache. + * + * @param string $key + * @return bool + */ + public function forget($key) + { + return (bool) $this->connection()->del($this->prefix.$key); + } + + /** + * Remove all items from the cache. + * + * @return bool + */ + public function flush() + { + $this->connection()->flushdb(); + + return true; + } + + /** + * Begin executing a new tags operation. + * + * @param array|mixed $names + * @return \Illuminate\Cache\RedisTaggedCache + */ + public function tags($names) + { + return new RedisTaggedCache( + $this, new TagSet($this, is_array($names) ? $names : func_get_args()) + ); + } + + /** + * Get the Redis connection instance. + * + * @return \Predis\ClientInterface + */ + public function connection() + { + return $this->redis->connection($this->connection); + } + + /** + * Set the connection name to be used. + * + * @param string $connection + * @return void + */ + public function setConnection($connection) + { + $this->connection = $connection; + } + + /** + * Get the Redis database instance. + * + * @return \Illuminate\Contracts\Redis\Factory + */ + public function getRedis() + { + return $this->redis; + } + + /** + * Get the cache key prefix. + * + * @return string + */ + public function getPrefix() + { + return $this->prefix; + } + + /** + * Set the cache key prefix. + * + * @param string $prefix + * @return void + */ + public function setPrefix($prefix) + { + $this->prefix = ! empty($prefix) ? $prefix.':' : ''; + } + + /** + * Serialize the value. + * + * @param mixed $value + * @return mixed + */ + protected function serialize($value) + { + return is_numeric($value) ? $value : serialize($value); + } + + /** + * Unserialize the value. + * + * @param mixed $value + * @return mixed + */ + protected function unserialize($value) + { + return is_numeric($value) ? $value : unserialize($value); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Cache/RedisTaggedCache.php b/vendor/laravel/framework/src/Illuminate/Cache/RedisTaggedCache.php new file mode 100644 index 0000000..d2325a0 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Cache/RedisTaggedCache.php @@ -0,0 +1,166 @@ +pushStandardKeys($this->tags->getNamespace(), $key); + + parent::put($key, $value, $minutes); + } + + /** + * Store an item in the cache indefinitely. + * + * @param string $key + * @param mixed $value + * @return void + */ + public function forever($key, $value) + { + $this->pushForeverKeys($this->tags->getNamespace(), $key); + + parent::forever($key, $value); + } + + /** + * Remove all items from the cache. + * + * @return void + */ + public function flush() + { + $this->deleteForeverKeys(); + $this->deleteStandardKeys(); + + parent::flush(); + } + + /** + * Store standard key references into store. + * + * @param string $namespace + * @param string $key + * @return void + */ + protected function pushStandardKeys($namespace, $key) + { + $this->pushKeys($namespace, $key, self::REFERENCE_KEY_STANDARD); + } + + /** + * Store forever key references into store. + * + * @param string $namespace + * @param string $key + * @return void + */ + protected function pushForeverKeys($namespace, $key) + { + $this->pushKeys($namespace, $key, self::REFERENCE_KEY_FOREVER); + } + + /** + * Store a reference to the cache key against the reference key. + * + * @param string $namespace + * @param string $key + * @param string $reference + * @return void + */ + protected function pushKeys($namespace, $key, $reference) + { + $fullKey = $this->store->getPrefix().sha1($namespace).':'.$key; + + foreach (explode('|', $namespace) as $segment) { + $this->store->connection()->sadd($this->referenceKey($segment, $reference), $fullKey); + } + } + + /** + * Delete all of the items that were stored forever. + * + * @return void + */ + protected function deleteForeverKeys() + { + $this->deleteKeysByReference(self::REFERENCE_KEY_FOREVER); + } + + /** + * Delete all standard items. + * + * @return void + */ + protected function deleteStandardKeys() + { + $this->deleteKeysByReference(self::REFERENCE_KEY_STANDARD); + } + + /** + * Find and delete all of the items that were stored against a reference. + * + * @param string $reference + * @return void + */ + protected function deleteKeysByReference($reference) + { + foreach (explode('|', $this->tags->getNamespace()) as $segment) { + $this->deleteValues($segment = $this->referenceKey($segment, $reference)); + + $this->store->connection()->del($segment); + } + } + + /** + * Delete item keys that have been stored against a reference. + * + * @param string $referenceKey + * @return void + */ + protected function deleteValues($referenceKey) + { + $values = array_unique($this->store->connection()->smembers($referenceKey)); + + if (count($values) > 0) { + foreach (array_chunk($values, 1000) as $valuesChunk) { + call_user_func_array([$this->store->connection(), 'del'], $valuesChunk); + } + } + } + + /** + * Get the reference key for the segment. + * + * @param string $segment + * @param string $suffix + * @return string + */ + protected function referenceKey($segment, $suffix) + { + return $this->store->getPrefix().$segment.':'.$suffix; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Cache/Repository.php b/vendor/laravel/framework/src/Illuminate/Cache/Repository.php new file mode 100755 index 0000000..8498d9f --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Cache/Repository.php @@ -0,0 +1,517 @@ +store = $store; + } + + /** + * Determine if an item exists in the cache. + * + * @param string $key + * @return bool + */ + public function has($key) + { + return ! is_null($this->get($key)); + } + + /** + * Retrieve an item from the cache by key. + * + * @param string $key + * @param mixed $default + * @return mixed + */ + public function get($key, $default = null) + { + if (is_array($key)) { + return $this->many($key); + } + + $value = $this->store->get($this->itemKey($key)); + + // If we could not find the cache value, we will fire the missed event and get + // the default value for this cache value. This default could be a callback + // so we will execute the value function which will resolve it if needed. + if (is_null($value)) { + $this->event(new CacheMissed($key)); + + $value = value($default); + } else { + $this->event(new CacheHit($key, $value)); + } + + return $value; + } + + /** + * Retrieve multiple items from the cache by key. + * + * Items not found in the cache will have a null value. + * + * @param array $keys + * @return array + */ + public function many(array $keys) + { + $values = $this->store->many(collect($keys)->map(function ($value, $key) { + return is_string($key) ? $key : $value; + })->values()->all()); + + return collect($values)->map(function ($value, $key) use ($keys) { + return $this->handleManyResult($keys, $key, $value); + })->all(); + } + + /** + * Handle a result for the "many" method. + * + * @param array $keys + * @param string $key + * @param mixed $value + * @return mixed + */ + protected function handleManyResult($keys, $key, $value) + { + // If we could not find the cache value, we will fire the missed event and get + // the default value for this cache value. This default could be a callback + // so we will execute the value function which will resolve it if needed. + if (is_null($value)) { + $this->event(new CacheMissed($key)); + + return isset($keys[$key]) ? value($keys[$key]) : null; + } + + // If we found a valid value we will fire the "hit" event and return the value + // back from this function. The "hit" event gives developers an opportunity + // to listen for every possible cache "hit" throughout this applications. + $this->event(new CacheHit($key, $value)); + + return $value; + } + + /** + * Retrieve an item from the cache and delete it. + * + * @param string $key + * @param mixed $default + * @return mixed + */ + public function pull($key, $default = null) + { + return tap($this->get($key, $default), function ($value) use ($key) { + $this->forget($key); + }); + } + + /** + * Store an item in the cache. + * + * @param string $key + * @param mixed $value + * @param \DateTime|float|int $minutes + * @return void + */ + public function put($key, $value, $minutes = null) + { + if (is_array($key)) { + return $this->putMany($key, $value); + } + + if (! is_null($minutes = $this->getMinutes($minutes))) { + $this->store->put($this->itemKey($key), $value, $minutes); + + $this->event(new KeyWritten($key, $value, $minutes)); + } + } + + /** + * Store multiple items in the cache for a given number of minutes. + * + * @param array $values + * @param float|int $minutes + * @return void + */ + public function putMany(array $values, $minutes) + { + if (! is_null($minutes = $this->getMinutes($minutes))) { + $this->store->putMany($values, $minutes); + + foreach ($values as $key => $value) { + $this->event(new KeyWritten($key, $value, $minutes)); + } + } + } + + /** + * Store an item in the cache if the key does not exist. + * + * @param string $key + * @param mixed $value + * @param \DateTime|float|int $minutes + * @return bool + */ + public function add($key, $value, $minutes) + { + if (is_null($minutes = $this->getMinutes($minutes))) { + return false; + } + + // If the store has an "add" method we will call the method on the store so it + // has a chance to override this logic. Some drivers better support the way + // this operation should work with a total "atomic" implementation of it. + if (method_exists($this->store, 'add')) { + return $this->store->add( + $this->itemKey($key), $value, $minutes + ); + } + + // If the value did not exist in the cache, we will put the value in the cache + // so it exists for subsequent requests. Then, we will return true so it is + // easy to know if the value gets added. Otherwise, we will return false. + if (is_null($this->get($key))) { + $this->put($key, $value, $minutes); + + return true; + } + + return false; + } + + /** + * Increment the value of an item in the cache. + * + * @param string $key + * @param mixed $value + * @return int|bool + */ + public function increment($key, $value = 1) + { + return $this->store->increment($key, $value); + } + + /** + * Decrement the value of an item in the cache. + * + * @param string $key + * @param mixed $value + * @return int|bool + */ + public function decrement($key, $value = 1) + { + return $this->store->decrement($key, $value); + } + + /** + * Store an item in the cache indefinitely. + * + * @param string $key + * @param mixed $value + * @return void + */ + public function forever($key, $value) + { + $this->store->forever($this->itemKey($key), $value); + + $this->event(new KeyWritten($key, $value, 0)); + } + + /** + * Get an item from the cache, or store the default value. + * + * @param string $key + * @param \DateTime|float|int $minutes + * @param \Closure $callback + * @return mixed + */ + public function remember($key, $minutes, Closure $callback) + { + $value = $this->get($key); + + // If the item exists in the cache we will just return this immediately and if + // not we will execute the given Closure and cache the result of that for a + // given number of minutes so it's available for all subsequent requests. + if (! is_null($value)) { + return $value; + } + + $this->put($key, $value = $callback(), $minutes); + + return $value; + } + + /** + * Get an item from the cache, or store the default value forever. + * + * @param string $key + * @param \Closure $callback + * @return mixed + */ + public function sear($key, Closure $callback) + { + return $this->rememberForever($key, $callback); + } + + /** + * Get an item from the cache, or store the default value forever. + * + * @param string $key + * @param \Closure $callback + * @return mixed + */ + public function rememberForever($key, Closure $callback) + { + $value = $this->get($key); + + // If the item exists in the cache we will just return this immediately and if + // not we will execute the given Closure and cache the result of that for a + // given number of minutes so it's available for all subsequent requests. + if (! is_null($value)) { + return $value; + } + + $this->forever($key, $value = $callback()); + + return $value; + } + + /** + * Remove an item from the cache. + * + * @param string $key + * @return bool + */ + public function forget($key) + { + return tap($this->store->forget($this->itemKey($key)), function () use ($key) { + $this->event(new KeyForgotten($key)); + }); + } + + /** + * Begin executing a new tags operation if the store supports it. + * + * @param array|mixed $names + * @return \Illuminate\Cache\TaggedCache + * + * @throws \BadMethodCallException + */ + public function tags($names) + { + if (! method_exists($this->store, 'tags')) { + throw new BadMethodCallException('This cache store does not support tagging.'); + } + + $cache = $this->store->tags($names); + + if (! is_null($this->events)) { + $cache->setEventDispatcher($this->events); + } + + return $cache->setDefaultCacheTime($this->default); + } + + /** + * Format the key for a cache item. + * + * @param string $key + * @return string + */ + protected function itemKey($key) + { + return $key; + } + + /** + * Get the default cache time. + * + * @return float|int + */ + public function getDefaultCacheTime() + { + return $this->default; + } + + /** + * Set the default cache time in minutes. + * + * @param float|int $minutes + * @return $this + */ + public function setDefaultCacheTime($minutes) + { + $this->default = $minutes; + + return $this; + } + + /** + * Get the cache store implementation. + * + * @return \Illuminate\Contracts\Cache\Store + */ + public function getStore() + { + return $this->store; + } + + /** + * Fire an event for this cache instance. + * + * @param string $event + * @return void + */ + protected function event($event) + { + if (isset($this->events)) { + $this->events->dispatch($event); + } + } + + /** + * Set the event dispatcher instance. + * + * @param \Illuminate\Contracts\Events\Dispatcher $events + * @return void + */ + public function setEventDispatcher(Dispatcher $events) + { + $this->events = $events; + } + + /** + * Determine if a cached value exists. + * + * @param string $key + * @return bool + */ + public function offsetExists($key) + { + return $this->has($key); + } + + /** + * Retrieve an item from the cache by key. + * + * @param string $key + * @return mixed + */ + public function offsetGet($key) + { + return $this->get($key); + } + + /** + * Store an item in the cache for the default time. + * + * @param string $key + * @param mixed $value + * @return void + */ + public function offsetSet($key, $value) + { + $this->put($key, $value, $this->default); + } + + /** + * Remove an item from the cache. + * + * @param string $key + * @return void + */ + public function offsetUnset($key) + { + $this->forget($key); + } + + /** + * Calculate the number of minutes with the given duration. + * + * @param \DateTime|float|int $duration + * @return float|int|null + */ + protected function getMinutes($duration) + { + if ($duration instanceof DateTime) { + $duration = Carbon::now()->diffInSeconds(Carbon::instance($duration), false) / 60; + } + + return (int) ($duration * 60) > 0 ? $duration : null; + } + + /** + * Handle dynamic calls into macros or pass missing methods to the store. + * + * @param string $method + * @param array $parameters + * @return mixed + */ + public function __call($method, $parameters) + { + if (static::hasMacro($method)) { + return $this->macroCall($method, $parameters); + } + + return $this->store->$method(...$parameters); + } + + /** + * Clone cache repository instance. + * + * @return void + */ + public function __clone() + { + $this->store = clone $this->store; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Cache/RetrievesMultipleKeys.php b/vendor/laravel/framework/src/Illuminate/Cache/RetrievesMultipleKeys.php new file mode 100644 index 0000000..4d46797 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Cache/RetrievesMultipleKeys.php @@ -0,0 +1,39 @@ +get($key); + } + + return $return; + } + + /** + * Store multiple items in the cache for a given number of minutes. + * + * @param array $values + * @param float|int $minutes + * @return void + */ + public function putMany(array $values, $minutes) + { + foreach ($values as $key => $value) { + $this->put($key, $value, $minutes); + } + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Cache/TagSet.php b/vendor/laravel/framework/src/Illuminate/Cache/TagSet.php new file mode 100644 index 0000000..214d648 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Cache/TagSet.php @@ -0,0 +1,110 @@ +store = $store; + $this->names = $names; + } + + /** + * Reset all tags in the set. + * + * @return void + */ + public function reset() + { + array_walk($this->names, [$this, 'resetTag']); + } + + /** + * Reset the tag and return the new tag identifier. + * + * @param string $name + * @return string + */ + public function resetTag($name) + { + $this->store->forever($this->tagKey($name), $id = str_replace('.', '', uniqid('', true))); + + return $id; + } + + /** + * Get a unique namespace that changes when any of the tags are flushed. + * + * @return string + */ + public function getNamespace() + { + return implode('|', $this->tagIds()); + } + + /** + * Get an array of tag identifiers for all of the tags in the set. + * + * @return array + */ + protected function tagIds() + { + return array_map([$this, 'tagId'], $this->names); + } + + /** + * Get the unique tag identifier for a given tag. + * + * @param string $name + * @return string + */ + public function tagId($name) + { + return $this->store->get($this->tagKey($name)) ?: $this->resetTag($name); + } + + /** + * Get the tag identifier key for a given tag. + * + * @param string $name + * @return string + */ + public function tagKey($name) + { + return 'tag:'.$name.':key'; + } + + /** + * Get all of the tag names in the set. + * + * @return array + */ + public function getNames() + { + return $this->names; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Cache/TaggableStore.php b/vendor/laravel/framework/src/Illuminate/Cache/TaggableStore.php new file mode 100644 index 0000000..ba00fa4 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Cache/TaggableStore.php @@ -0,0 +1,17 @@ +tags = $tags; + } + + /** + * Increment the value of an item in the cache. + * + * @param string $key + * @param mixed $value + * @return void + */ + public function increment($key, $value = 1) + { + $this->store->increment($this->itemKey($key), $value); + } + + /** + * Increment the value of an item in the cache. + * + * @param string $key + * @param mixed $value + * @return void + */ + public function decrement($key, $value = 1) + { + $this->store->decrement($this->itemKey($key), $value); + } + + /** + * Remove all items from the cache. + * + * @return void + */ + public function flush() + { + $this->tags->reset(); + } + + /** + * {@inheritdoc} + */ + protected function itemKey($key) + { + return $this->taggedItemKey($key); + } + + /** + * Get a fully qualified key for a tagged item. + * + * @param string $key + * @return string + */ + public function taggedItemKey($key) + { + return sha1($this->tags->getNamespace()).':'.$key; + } + + /** + * Fire an event for this cache instance. + * + * @param string $event + * @return void + */ + protected function event($event) + { + parent::event($event->setTags($this->tags->getNames())); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Cache/composer.json b/vendor/laravel/framework/src/Illuminate/Cache/composer.json new file mode 100755 index 0000000..0b9f812 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Cache/composer.json @@ -0,0 +1,41 @@ +{ + "name": "illuminate/cache", + "description": "The Illuminate Cache package.", + "license": "MIT", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "require": { + "php": ">=5.6.4", + "illuminate/contracts": "5.4.*", + "illuminate/support": "5.4.*", + "nesbot/carbon": "~1.20" + }, + "autoload": { + "psr-4": { + "Illuminate\\Cache\\": "" + } + }, + "extra": { + "branch-alias": { + "dev-master": "5.4-dev" + } + }, + "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.*)." + }, + "config": { + "sort-packages": true + }, + "minimum-stability": "dev" +} diff --git a/vendor/laravel/framework/src/Illuminate/Config/Repository.php b/vendor/laravel/framework/src/Illuminate/Config/Repository.php new file mode 100644 index 0000000..2c00686 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Config/Repository.php @@ -0,0 +1,154 @@ +items = $items; + } + + /** + * Determine if the given configuration value exists. + * + * @param string $key + * @return bool + */ + public function has($key) + { + return Arr::has($this->items, $key); + } + + /** + * Get the specified configuration value. + * + * @param string $key + * @param mixed $default + * @return mixed + */ + public function get($key, $default = null) + { + return Arr::get($this->items, $key, $default); + } + + /** + * Set a given configuration value. + * + * @param array|string $key + * @param mixed $value + * @return void + */ + public function set($key, $value = null) + { + $keys = is_array($key) ? $key : [$key => $value]; + + foreach ($keys as $key => $value) { + Arr::set($this->items, $key, $value); + } + } + + /** + * Prepend a value onto an array configuration value. + * + * @param string $key + * @param mixed $value + * @return void + */ + public function prepend($key, $value) + { + $array = $this->get($key); + + array_unshift($array, $value); + + $this->set($key, $array); + } + + /** + * Push a value onto an array configuration value. + * + * @param string $key + * @param mixed $value + * @return void + */ + public function push($key, $value) + { + $array = $this->get($key); + + $array[] = $value; + + $this->set($key, $array); + } + + /** + * Get all of the configuration items for the application. + * + * @return array + */ + public function all() + { + return $this->items; + } + + /** + * Determine if the given configuration option exists. + * + * @param string $key + * @return bool + */ + public function offsetExists($key) + { + return $this->has($key); + } + + /** + * Get a configuration option. + * + * @param string $key + * @return mixed + */ + public function offsetGet($key) + { + return $this->get($key); + } + + /** + * Set a configuration option. + * + * @param string $key + * @param mixed $value + * @return void + */ + public function offsetSet($key, $value) + { + $this->set($key, $value); + } + + /** + * Unset a configuration option. + * + * @param string $key + * @return void + */ + public function offsetUnset($key) + { + $this->set($key, null); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Config/composer.json b/vendor/laravel/framework/src/Illuminate/Config/composer.json new file mode 100755 index 0000000..69ab6e7 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Config/composer.json @@ -0,0 +1,35 @@ +{ + "name": "illuminate/config", + "description": "The Illuminate Config package.", + "license": "MIT", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "require": { + "php": ">=5.6.4", + "illuminate/contracts": "5.4.*", + "illuminate/support": "5.4.*" + }, + "autoload": { + "psr-4": { + "Illuminate\\Config\\": "" + } + }, + "extra": { + "branch-alias": { + "dev-master": "5.4-dev" + } + }, + "config": { + "sort-packages": true + }, + "minimum-stability": "dev" +} diff --git a/vendor/laravel/framework/src/Illuminate/Console/Application.php b/vendor/laravel/framework/src/Illuminate/Console/Application.php new file mode 100755 index 0000000..d004c74 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Console/Application.php @@ -0,0 +1,247 @@ +laravel = $laravel; + $this->setAutoExit(false); + $this->setCatchExceptions(false); + + $events->dispatch(new Events\ArtisanStarting($this)); + + $this->bootstrap(); + } + + /** + * Determine the proper PHP executable. + * + * @return string + */ + public static function phpBinary() + { + return ProcessUtils::escapeArgument((new PhpExecutableFinder)->find(false)); + } + + /** + * Determine the proper Artisan executable. + * + * @return string + */ + public static function artisanBinary() + { + return defined('ARTISAN_BINARY') ? ProcessUtils::escapeArgument(ARTISAN_BINARY) : 'artisan'; + } + + /** + * Format the given command as a fully-qualified executable command. + * + * @param string $string + * @return string + */ + public static function formatCommandString($string) + { + return sprintf('%s %s %s', static::phpBinary(), static::artisanBinary(), $string); + } + + /** + * Register a console "starting" bootstrapper. + * + * @param \Closure $callback + * @return void + */ + public static function starting(Closure $callback) + { + static::$bootstrappers[] = $callback; + } + + /** + * Bootstrap the console application. + * + * @return void + */ + protected function bootstrap() + { + foreach (static::$bootstrappers as $bootstrapper) { + $bootstrapper($this); + } + } + + /* + * Clear the console application bootstrappers. + * + * @return void + */ + public static function forgetBootstrappers() + { + static::$bootstrappers = []; + } + + /** + * Run an Artisan console command by name. + * + * @param string $command + * @param array $parameters + * @param \Symfony\Component\Console\Output\OutputInterface $outputBuffer + * @return int + */ + public function call($command, array $parameters = [], $outputBuffer = null) + { + $parameters = collect($parameters)->prepend($command); + + $this->lastOutput = $outputBuffer ?: new BufferedOutput; + + $this->setCatchExceptions(false); + + $result = $this->run(new ArrayInput($parameters->toArray()), $this->lastOutput); + + $this->setCatchExceptions(true); + + return $result; + } + + /** + * Get the output for the last run command. + * + * @return string + */ + public function output() + { + return $this->lastOutput ? $this->lastOutput->fetch() : ''; + } + + /** + * Add a command to the console. + * + * @param \Symfony\Component\Console\Command\Command $command + * @return \Symfony\Component\Console\Command\Command + */ + public function add(SymfonyCommand $command) + { + if ($command instanceof Command) { + $command->setLaravel($this->laravel); + } + + return $this->addToParent($command); + } + + /** + * Add the command to the parent instance. + * + * @param \Symfony\Component\Console\Command\Command $command + * @return \Symfony\Component\Console\Command\Command + */ + protected function addToParent(SymfonyCommand $command) + { + return parent::add($command); + } + + /** + * Add a command, resolving through the application. + * + * @param string $command + * @return \Symfony\Component\Console\Command\Command + */ + public function resolve($command) + { + return $this->add($this->laravel->make($command)); + } + + /** + * Resolve an array of commands through the application. + * + * @param array|mixed $commands + * @return $this + */ + public function resolveCommands($commands) + { + $commands = is_array($commands) ? $commands : func_get_args(); + + foreach ($commands as $command) { + $this->resolve($command); + } + + return $this; + } + + /** + * Get the default input definitions for the applications. + * + * This is used to add the --env option to every available command. + * + * @return \Symfony\Component\Console\Input\InputDefinition + */ + protected function getDefaultInputDefinition() + { + return tap(parent::getDefaultInputDefinition(), function ($definition) { + $definition->addOption($this->getEnvironmentOption()); + }); + } + + /** + * Get the global environment option for the definition. + * + * @return \Symfony\Component\Console\Input\InputOption + */ + protected function getEnvironmentOption() + { + $message = 'The environment the command should run under'; + + return new InputOption('--env', null, InputOption::VALUE_OPTIONAL, $message); + } + + /** + * Get the Laravel application instance. + * + * @return \Illuminate\Contracts\Foundation\Application + */ + public function getLaravel() + { + return $this->laravel; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Console/Command.php b/vendor/laravel/framework/src/Illuminate/Console/Command.php new file mode 100755 index 0000000..0ae9662 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Console/Command.php @@ -0,0 +1,571 @@ + OutputInterface::VERBOSITY_VERBOSE, + 'vv' => OutputInterface::VERBOSITY_VERY_VERBOSE, + 'vvv' => OutputInterface::VERBOSITY_DEBUG, + 'quiet' => OutputInterface::VERBOSITY_QUIET, + 'normal' => OutputInterface::VERBOSITY_NORMAL, + ]; + + /** + * Create a new console command instance. + * + * @return void + */ + public function __construct() + { + // We will go ahead and set the name, description, and parameters on console + // commands just to make things a little easier on the developer. This is + // so they don't have to all be manually specified in the constructors. + if (isset($this->signature)) { + $this->configureUsingFluentDefinition(); + } else { + parent::__construct($this->name); + } + + // Once we have constructed the command, we'll set the description and other + // related properties of the command. If a signature wasn't used to build + // the command we'll set the arguments and the options on this command. + $this->setDescription($this->description); + + $this->setHidden($this->hidden); + + if (! isset($this->signature)) { + $this->specifyParameters(); + } + } + + /** + * Configure the console command using a fluent definition. + * + * @return void + */ + protected function configureUsingFluentDefinition() + { + list($name, $arguments, $options) = Parser::parse($this->signature); + + parent::__construct($this->name = $name); + + // After parsing the signature we will spin through the arguments and options + // and set them on this command. These will already be changed into proper + // instances of these "InputArgument" and "InputOption" Symfony classes. + foreach ($arguments as $argument) { + $this->getDefinition()->addArgument($argument); + } + + foreach ($options as $option) { + $this->getDefinition()->addOption($option); + } + } + + /** + * Specify the arguments and options on the command. + * + * @return void + */ + protected function specifyParameters() + { + // We will loop through all of the arguments and options for the command and + // set them all on the base command instance. This specifies what can get + // passed into these commands as "parameters" to control the execution. + foreach ($this->getArguments() as $arguments) { + call_user_func_array([$this, 'addArgument'], $arguments); + } + + foreach ($this->getOptions() as $options) { + call_user_func_array([$this, 'addOption'], $options); + } + } + + /** + * Run the console command. + * + * @param \Symfony\Component\Console\Input\InputInterface $input + * @param \Symfony\Component\Console\Output\OutputInterface $output + * @return int + */ + public function run(InputInterface $input, OutputInterface $output) + { + return parent::run( + $this->input = $input, $this->output = new OutputStyle($input, $output) + ); + } + + /** + * Execute the console command. + * + * @param \Symfony\Component\Console\Input\InputInterface $input + * @param \Symfony\Component\Console\Output\OutputInterface $output + * @return mixed + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + $method = method_exists($this, 'handle') ? 'handle' : 'fire'; + + return $this->laravel->call([$this, $method]); + } + + /** + * Call another console command. + * + * @param string $command + * @param array $arguments + * @return int + */ + public function call($command, array $arguments = []) + { + $arguments['command'] = $command; + + return $this->getApplication()->find($command)->run( + new ArrayInput($arguments), $this->output + ); + } + + /** + * Call another console command silently. + * + * @param string $command + * @param array $arguments + * @return int + */ + public function callSilent($command, array $arguments = []) + { + $arguments['command'] = $command; + + return $this->getApplication()->find($command)->run( + new ArrayInput($arguments), new NullOutput + ); + } + + /** + * Determine if the given argument is present. + * + * @param string|int $name + * @return bool + */ + public function hasArgument($name) + { + return $this->input->hasArgument($name); + } + + /** + * Get the value of a command argument. + * + * @param string $key + * @return string|array + */ + public function argument($key = null) + { + if (is_null($key)) { + return $this->input->getArguments(); + } + + return $this->input->getArgument($key); + } + + /** + * Get all of the arguments passed to the command. + * + * @return array + */ + public function arguments() + { + return $this->argument(); + } + + /** + * Determine if the given option is present. + * + * @param string $name + * @return bool + */ + public function hasOption($name) + { + return $this->input->hasOption($name); + } + + /** + * Get the value of a command option. + * + * @param string $key + * @return string|array + */ + public function option($key = null) + { + if (is_null($key)) { + return $this->input->getOptions(); + } + + return $this->input->getOption($key); + } + + /** + * Get all of the options passed to the command. + * + * @return array + */ + public function options() + { + return $this->option(); + } + + /** + * Confirm a question with the user. + * + * @param string $question + * @param bool $default + * @return bool + */ + public function confirm($question, $default = false) + { + return $this->output->confirm($question, $default); + } + + /** + * Prompt the user for input. + * + * @param string $question + * @param string $default + * @return string + */ + public function ask($question, $default = null) + { + return $this->output->ask($question, $default); + } + + /** + * Prompt the user for input with auto completion. + * + * @param string $question + * @param array $choices + * @param string $default + * @return string + */ + public function anticipate($question, array $choices, $default = null) + { + return $this->askWithCompletion($question, $choices, $default); + } + + /** + * Prompt the user for input with auto completion. + * + * @param string $question + * @param array $choices + * @param string $default + * @return string + */ + public function askWithCompletion($question, array $choices, $default = null) + { + $question = new Question($question, $default); + + $question->setAutocompleterValues($choices); + + return $this->output->askQuestion($question); + } + + /** + * Prompt the user for input but hide the answer from the console. + * + * @param string $question + * @param bool $fallback + * @return string + */ + public function secret($question, $fallback = true) + { + $question = new Question($question); + + $question->setHidden(true)->setHiddenFallback($fallback); + + return $this->output->askQuestion($question); + } + + /** + * Give the user a single choice from an array of answers. + * + * @param string $question + * @param array $choices + * @param string $default + * @param mixed $attempts + * @param bool $multiple + * @return string + */ + public function choice($question, array $choices, $default = null, $attempts = null, $multiple = null) + { + $question = new ChoiceQuestion($question, $choices, $default); + + $question->setMaxAttempts($attempts)->setMultiselect($multiple); + + return $this->output->askQuestion($question); + } + + /** + * Format input to textual table. + * + * @param array $headers + * @param \Illuminate\Contracts\Support\Arrayable|array $rows + * @param string $style + * @return void + */ + public function table(array $headers, $rows, $style = 'default') + { + $table = new Table($this->output); + + if ($rows instanceof Arrayable) { + $rows = $rows->toArray(); + } + + $table->setHeaders($headers)->setRows($rows)->setStyle($style)->render(); + } + + /** + * Write a string as information output. + * + * @param string $string + * @param null|int|string $verbosity + * @return void + */ + public function info($string, $verbosity = null) + { + $this->line($string, 'info', $verbosity); + } + + /** + * Write a string as standard output. + * + * @param string $string + * @param string $style + * @param null|int|string $verbosity + * @return void + */ + public function line($string, $style = null, $verbosity = null) + { + $styled = $style ? "<$style>$string" : $string; + + $this->output->writeln($styled, $this->parseVerbosity($verbosity)); + } + + /** + * Write a string as comment output. + * + * @param string $string + * @param null|int|string $verbosity + * @return void + */ + public function comment($string, $verbosity = null) + { + $this->line($string, 'comment', $verbosity); + } + + /** + * Write a string as question output. + * + * @param string $string + * @param null|int|string $verbosity + * @return void + */ + public function question($string, $verbosity = null) + { + $this->line($string, 'question', $verbosity); + } + + /** + * Write a string as error output. + * + * @param string $string + * @param null|int|string $verbosity + * @return void + */ + public function error($string, $verbosity = null) + { + $this->line($string, 'error', $verbosity); + } + + /** + * Write a string as warning output. + * + * @param string $string + * @param null|int|string $verbosity + * @return void + */ + public function warn($string, $verbosity = null) + { + if (! $this->output->getFormatter()->hasStyle('warning')) { + $style = new OutputFormatterStyle('yellow'); + + $this->output->getFormatter()->setStyle('warning', $style); + } + + $this->line($string, 'warning', $verbosity); + } + + /** + * Write a string in an alert box. + * + * @param string $string + * @return void + */ + public function alert($string) + { + $this->comment(str_repeat('*', strlen($string) + 12)); + $this->comment('* '.$string.' *'); + $this->comment(str_repeat('*', strlen($string) + 12)); + + $this->output->writeln(''); + } + + /** + * Set the verbosity level. + * + * @param string|int $level + * @return void + */ + protected function setVerbosity($level) + { + $this->verbosity = $this->parseVerbosity($level); + } + + /** + * Get the verbosity level in terms of Symfony's OutputInterface level. + * + * @param string|int $level + * @return int + */ + protected function parseVerbosity($level = null) + { + if (isset($this->verbosityMap[$level])) { + $level = $this->verbosityMap[$level]; + } elseif (! is_int($level)) { + $level = $this->verbosity; + } + + return $level; + } + + /** + * Get the console command arguments. + * + * @return array + */ + protected function getArguments() + { + return []; + } + + /** + * Get the console command options. + * + * @return array + */ + protected function getOptions() + { + return []; + } + + /** + * Get the output implementation. + * + * @return \Symfony\Component\Console\Output\OutputInterface + */ + public function getOutput() + { + return $this->output; + } + + /** + * Get the Laravel application instance. + * + * @return \Illuminate\Contracts\Foundation\Application + */ + public function getLaravel() + { + return $this->laravel; + } + + /** + * Set the Laravel application instance. + * + * @param \Illuminate\Contracts\Container\Container $laravel + * @return void + */ + public function setLaravel($laravel) + { + $this->laravel = $laravel; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Console/ConfirmableTrait.php b/vendor/laravel/framework/src/Illuminate/Console/ConfirmableTrait.php new file mode 100644 index 0000000..7172215 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Console/ConfirmableTrait.php @@ -0,0 +1,54 @@ +getDefaultConfirmCallback() : $callback; + + $shouldConfirm = $callback instanceof Closure ? call_user_func($callback) : $callback; + + if ($shouldConfirm) { + if ($this->option('force')) { + return true; + } + + $this->alert($warning); + + $confirmed = $this->confirm('Do you really wish to run this command?'); + + if (! $confirmed) { + $this->comment('Command Cancelled!'); + + return false; + } + } + + return true; + } + + /** + * Get the default confirmation callback. + * + * @return \Closure + */ + protected function getDefaultConfirmCallback() + { + return function () { + return $this->getLaravel()->environment() == 'production'; + }; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Console/DetectsApplicationNamespace.php b/vendor/laravel/framework/src/Illuminate/Console/DetectsApplicationNamespace.php new file mode 100644 index 0000000..cb5e8e8 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Console/DetectsApplicationNamespace.php @@ -0,0 +1,18 @@ +getNamespace(); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Console/Events/ArtisanStarting.php b/vendor/laravel/framework/src/Illuminate/Console/Events/ArtisanStarting.php new file mode 100644 index 0000000..f228ac5 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Console/Events/ArtisanStarting.php @@ -0,0 +1,24 @@ +artisan = $artisan; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Console/GeneratorCommand.php b/vendor/laravel/framework/src/Illuminate/Console/GeneratorCommand.php new file mode 100644 index 0000000..c9522e7 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Console/GeneratorCommand.php @@ -0,0 +1,233 @@ +files = $files; + } + + /** + * Get the stub file for the generator. + * + * @return string + */ + abstract protected function getStub(); + + /** + * Execute the console command. + * + * @return bool|null + */ + public function fire() + { + $name = $this->qualifyClass($this->getNameInput()); + + $path = $this->getPath($name); + + // First we will check to see if the class already exists. If it does, we don't want + // to create the class and overwrite the user's code. So, we will bail out so the + // code is untouched. Otherwise, we will continue generating this class' files. + if ($this->alreadyExists($this->getNameInput())) { + $this->error($this->type.' already exists!'); + + return false; + } + + // Next, we will generate the path to the location where this class' file should get + // written. Then, we will build the class and make the proper replacements on the + // stub files so that it gets the correctly formatted namespace and class name. + $this->makeDirectory($path); + + $this->files->put($path, $this->buildClass($name)); + + $this->info($this->type.' created successfully.'); + } + + /** + * Parse the class name and format according to the root namespace. + * + * @param string $name + * @return string + */ + protected function qualifyClass($name) + { + $rootNamespace = $this->rootNamespace(); + + if (Str::startsWith($name, $rootNamespace)) { + return $name; + } + + $name = str_replace('/', '\\', $name); + + return $this->qualifyClass( + $this->getDefaultNamespace(trim($rootNamespace, '\\')).'\\'.$name + ); + } + + /** + * Get the default namespace for the class. + * + * @param string $rootNamespace + * @return string + */ + protected function getDefaultNamespace($rootNamespace) + { + return $rootNamespace; + } + + /** + * Determine if the class already exists. + * + * @param string $rawName + * @return bool + */ + protected function alreadyExists($rawName) + { + return $this->files->exists($this->getPath($this->qualifyClass($rawName))); + } + + /** + * Get the destination class path. + * + * @param string $name + * @return string + */ + protected function getPath($name) + { + $name = str_replace_first($this->rootNamespace(), '', $name); + + return $this->laravel['path'].'/'.str_replace('\\', '/', $name).'.php'; + } + + /** + * Build the directory for the class if necessary. + * + * @param string $path + * @return string + */ + protected function makeDirectory($path) + { + if (! $this->files->isDirectory(dirname($path))) { + $this->files->makeDirectory(dirname($path), 0777, true, true); + } + + return $path; + } + + /** + * Build the class with the given name. + * + * @param string $name + * @return string + */ + protected function buildClass($name) + { + $stub = $this->files->get($this->getStub()); + + return $this->replaceNamespace($stub, $name)->replaceClass($stub, $name); + } + + /** + * Replace the namespace for the given stub. + * + * @param string $stub + * @param string $name + * @return $this + */ + protected function replaceNamespace(&$stub, $name) + { + $stub = str_replace( + ['DummyNamespace', 'DummyRootNamespace'], + [$this->getNamespace($name), $this->rootNamespace()], + $stub + ); + + return $this; + } + + /** + * Get the full namespace for a given class, without the class name. + * + * @param string $name + * @return string + */ + protected function getNamespace($name) + { + return trim(implode('\\', array_slice(explode('\\', $name), 0, -1)), '\\'); + } + + /** + * Replace the class name for the given stub. + * + * @param string $stub + * @param string $name + * @return string + */ + protected function replaceClass($stub, $name) + { + $class = str_replace($this->getNamespace($name).'\\', '', $name); + + return str_replace('DummyClass', $class, $stub); + } + + /** + * Get the desired class name from the input. + * + * @return string + */ + protected function getNameInput() + { + return trim($this->argument('name')); + } + + /** + * Get the root namespace for the class. + * + * @return string + */ + protected function rootNamespace() + { + return $this->laravel->getNamespace(); + } + + /** + * Get the console command arguments. + * + * @return array + */ + protected function getArguments() + { + return [ + ['name', InputArgument::REQUIRED, 'The name of the class'], + ]; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Console/OutputStyle.php b/vendor/laravel/framework/src/Illuminate/Console/OutputStyle.php new file mode 100644 index 0000000..925e66d --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Console/OutputStyle.php @@ -0,0 +1,71 @@ +output = $output; + + parent::__construct($input, $output); + } + + /** + * Returns whether verbosity is quiet (-q). + * + * @return bool + */ + public function isQuiet() + { + return $this->output->isQuiet(); + } + + /** + * Returns whether verbosity is verbose (-v). + * + * @return bool + */ + public function isVerbose() + { + return $this->output->isVerbose(); + } + + /** + * Returns whether verbosity is very verbose (-vv). + * + * @return bool + */ + public function isVeryVerbose() + { + return $this->output->isVeryVerbose(); + } + + /** + * Returns whether verbosity is debug (-vvv). + * + * @return bool + */ + public function isDebug() + { + return $this->output->isDebug(); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Console/Parser.php b/vendor/laravel/framework/src/Illuminate/Console/Parser.php new file mode 100644 index 0000000..4ccc88d --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Console/Parser.php @@ -0,0 +1,142 @@ +cache = $cache; + } + + /** + * Attempt to obtain a mutex for the given event. + * + * @param \Illuminate\Console\Scheduling\Event $event + * @return bool + */ + public function create(Event $event) + { + return $this->cache->add($event->mutexName(), true, 1440); + } + + /** + * Determine if a mutex exists for the given event. + * + * @param \Illuminate\Console\Scheduling\Event $event + * @return bool + */ + public function exists(Event $event) + { + return $this->cache->has($event->mutexName()); + } + + /** + * Clear the mutex for the given event. + * + * @param \Illuminate\Console\Scheduling\Event $event + * @return void + */ + public function forget(Event $event) + { + $this->cache->forget($event->mutexName()); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Console/Scheduling/CallbackEvent.php b/vendor/laravel/framework/src/Illuminate/Console/Scheduling/CallbackEvent.php new file mode 100644 index 0000000..aabe357 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Console/Scheduling/CallbackEvent.php @@ -0,0 +1,128 @@ +mutex = $mutex; + $this->callback = $callback; + $this->parameters = $parameters; + } + + /** + * Run the given event. + * + * @param \Illuminate\Contracts\Container\Container $container + * @return mixed + * + * @throws \Exception + */ + public function run(Container $container) + { + if ($this->description) { + $this->mutex->create($this); + } + + try { + $response = $container->call($this->callback, $this->parameters); + } finally { + $this->removeMutex(); + } + + parent::callAfterCallbacks($container); + + return $response; + } + + /** + * Remove the mutex file from disk. + * + * @return void + */ + protected function removeMutex() + { + if ($this->description) { + $this->mutex->forget($this); + } + } + + /** + * Do not allow the event to overlap each other. + * + * @return $this + * + * @throws \LogicException + */ + public function withoutOverlapping() + { + if (! isset($this->description)) { + throw new LogicException( + "A scheduled event name is required to prevent overlapping. Use the 'name' method before 'withoutOverlapping'." + ); + } + + return $this->skip(function () { + return $this->mutex->exists($this); + }); + } + + /** + * Get the mutex name for the scheduled command. + * + * @return string + */ + public function mutexName() + { + return 'framework/schedule-'.sha1($this->description); + } + + /** + * Get the summary of the event for display. + * + * @return string + */ + public function getSummaryForDisplay() + { + if (is_string($this->description)) { + return $this->description; + } + + return is_string($this->callback) ? $this->callback : 'Closure'; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Console/Scheduling/CommandBuilder.php b/vendor/laravel/framework/src/Illuminate/Console/Scheduling/CommandBuilder.php new file mode 100644 index 0000000..20c65c5 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Console/Scheduling/CommandBuilder.php @@ -0,0 +1,71 @@ +runInBackground) { + return $this->buildBackgroundCommand($event); + } else { + return $this->buildForegroundCommand($event); + } + } + + /** + * Build the command for running the event in the foreground. + * + * @param \Illuminate\Console\Scheduling\Event $event + * @return string + */ + protected function buildForegroundCommand(Event $event) + { + $output = ProcessUtils::escapeArgument($event->output); + + return $this->ensureCorrectUser( + $event, $event->command.($event->shouldAppendOutput ? ' >> ' : ' > ').$output.' 2>&1' + ); + } + + /** + * Build the command for running the event in the foreground. + * + * @param \Illuminate\Console\Scheduling\Event $event + * @return string + */ + protected function buildBackgroundCommand(Event $event) + { + $output = ProcessUtils::escapeArgument($event->output); + + $redirect = $event->shouldAppendOutput ? ' >> ' : ' > '; + + $finished = Application::formatCommandString('schedule:finish').' "'.$event->mutexName().'"'; + + return $this->ensureCorrectUser($event, + '('.$event->command.$redirect.$output.' 2>&1 '.(windows_os() ? '&' : ';').' '.$finished.') > ' + .ProcessUtils::escapeArgument($event->getDefaultOutput()).' 2>&1 &' + ); + } + + /** + * Finalize the event's command syntax with the correct user. + * + * @param \Illuminate\Console\Scheduling\Event $event + * @param string $command + * @return string + */ + protected function ensureCorrectUser(Event $event, $command) + { + return $event->user && ! windows_os() ? 'sudo -u '.$event->user.' -- sh -c \''.$command.'\'' : $command; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Console/Scheduling/Event.php b/vendor/laravel/framework/src/Illuminate/Console/Scheduling/Event.php new file mode 100644 index 0000000..105db23 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Console/Scheduling/Event.php @@ -0,0 +1,648 @@ +mutex = $mutex; + $this->command = $command; + $this->output = $this->getDefaultOutput(); + } + + /** + * Get the default output depending on the OS. + * + * @return string + */ + public function getDefaultOutput() + { + return (DIRECTORY_SEPARATOR == '\\') ? 'NUL' : '/dev/null'; + } + + /** + * Run the given event. + * + * @param \Illuminate\Contracts\Container\Container $container + * @return void + */ + public function run(Container $container) + { + if ($this->withoutOverlapping && + ! $this->mutex->create($this)) { + return; + } + + $this->runInBackground + ? $this->runCommandInBackground($container) + : $this->runCommandInForeground($container); + } + + /** + * Get the mutex name for the scheduled command. + * + * @return string + */ + public function mutexName() + { + return 'framework'.DIRECTORY_SEPARATOR.'schedule-'.sha1($this->expression.$this->command); + } + + /** + * Run the command in the foreground. + * + * @param \Illuminate\Contracts\Container\Container $container + * @return void + */ + protected function runCommandInForeground(Container $container) + { + $this->callBeforeCallbacks($container); + + (new Process( + $this->buildCommand(), base_path(), null, null, null + ))->run(); + + $this->callAfterCallbacks($container); + } + + /** + * Run the command in the background. + * + * @param \Illuminate\Contracts\Container\Container $container + * @return void + */ + protected function runCommandInBackground(Container $container) + { + $this->callBeforeCallbacks($container); + + (new Process( + $this->buildCommand(), base_path(), null, null, null + ))->run(); + } + + /** + * Call all of the "before" callbacks for the event. + * + * @param \Illuminate\Contracts\Container\Container $container + * @return void + */ + public function callBeforeCallbacks(Container $container) + { + foreach ($this->beforeCallbacks as $callback) { + $container->call($callback); + } + } + + /** + * Call all of the "after" callbacks for the event. + * + * @param \Illuminate\Contracts\Container\Container $container + * @return void + */ + public function callAfterCallbacks(Container $container) + { + foreach ($this->afterCallbacks as $callback) { + $container->call($callback); + } + } + + /** + * Build the command string. + * + * @return string + */ + public function buildCommand() + { + return (new CommandBuilder)->buildCommand($this); + } + + /** + * Determine if the given event should run based on the Cron expression. + * + * @param \Illuminate\Contracts\Foundation\Application $app + * @return bool + */ + public function isDue($app) + { + if (! $this->runsInMaintenanceMode() && $app->isDownForMaintenance()) { + return false; + } + + return $this->expressionPasses() && + $this->runsInEnvironment($app->environment()); + } + + /** + * Determine if the event runs in maintenance mode. + * + * @return bool + */ + public function runsInMaintenanceMode() + { + return $this->evenInMaintenanceMode; + } + + /** + * Determine if the Cron expression passes. + * + * @return bool + */ + protected function expressionPasses() + { + $date = Carbon::now(); + + if ($this->timezone) { + $date->setTimezone($this->timezone); + } + + return CronExpression::factory($this->expression)->isDue($date->toDateTimeString()); + } + + /** + * Determine if the event runs in the given environment. + * + * @param string $environment + * @return bool + */ + public function runsInEnvironment($environment) + { + return empty($this->environments) || in_array($environment, $this->environments); + } + + /** + * Determine if the filters pass for the event. + * + * @param \Illuminate\Contracts\Foundation\Application $app + * @return bool + */ + public function filtersPass($app) + { + foreach ($this->filters as $callback) { + if (! $app->call($callback)) { + return false; + } + } + + foreach ($this->rejects as $callback) { + if ($app->call($callback)) { + return false; + } + } + + return true; + } + + /** + * Send the output of the command to a given location. + * + * @param string $location + * @param bool $append + * @return $this + */ + public function sendOutputTo($location, $append = false) + { + $this->output = $location; + + $this->shouldAppendOutput = $append; + + return $this; + } + + /** + * Append the output of the command to a given location. + * + * @param string $location + * @return $this + */ + public function appendOutputTo($location) + { + return $this->sendOutputTo($location, true); + } + + /** + * E-mail the results of the scheduled operation. + * + * @param array|mixed $addresses + * @param bool $onlyIfOutputExists + * @return $this + * + * @throws \LogicException + */ + public function emailOutputTo($addresses, $onlyIfOutputExists = false) + { + $this->ensureOutputIsBeingCapturedForEmail(); + + $addresses = is_array($addresses) ? $addresses : func_get_args(); + + return $this->then(function (Mailer $mailer) use ($addresses, $onlyIfOutputExists) { + $this->emailOutput($mailer, $addresses, $onlyIfOutputExists); + }); + } + + /** + * E-mail the results of the scheduled operation if it produces output. + * + * @param array|mixed $addresses + * @return $this + * + * @throws \LogicException + */ + public function emailWrittenOutputTo($addresses) + { + return $this->emailOutputTo($addresses, true); + } + + /** + * Ensure that output is being captured for email. + * + * @return void + */ + protected function ensureOutputIsBeingCapturedForEmail() + { + if (is_null($this->output) || $this->output == $this->getDefaultOutput()) { + $this->sendOutputTo(storage_path('logs/schedule-'.sha1($this->mutexName()).'.log')); + } + } + + /** + * E-mail the output of the event to the recipients. + * + * @param \Illuminate\Contracts\Mail\Mailer $mailer + * @param array $addresses + * @param bool $onlyIfOutputExists + * @return void + */ + protected function emailOutput(Mailer $mailer, $addresses, $onlyIfOutputExists = false) + { + $text = file_exists($this->output) ? file_get_contents($this->output) : ''; + + if ($onlyIfOutputExists && empty($text)) { + return; + } + + $mailer->raw($text, function ($m) use ($addresses) { + $m->to($addresses)->subject($this->getEmailSubject()); + }); + } + + /** + * Get the e-mail subject line for output results. + * + * @return string + */ + protected function getEmailSubject() + { + if ($this->description) { + return $this->description; + } + + return 'Scheduled Job Output'; + } + + /** + * Register a callback to ping a given URL before the job runs. + * + * @param string $url + * @return $this + */ + public function pingBefore($url) + { + return $this->before(function () use ($url) { + (new HttpClient)->get($url); + }); + } + + /** + * Register a callback to ping a given URL after the job runs. + * + * @param string $url + * @return $this + */ + public function thenPing($url) + { + return $this->then(function () use ($url) { + (new HttpClient)->get($url); + }); + } + + /** + * State that the command should run in background. + * + * @return $this + */ + public function runInBackground() + { + $this->runInBackground = true; + + return $this; + } + + /** + * Set which user the command should run as. + * + * @param string $user + * @return $this + */ + public function user($user) + { + $this->user = $user; + + return $this; + } + + /** + * Limit the environments the command should run in. + * + * @param array|mixed $environments + * @return $this + */ + public function environments($environments) + { + $this->environments = is_array($environments) ? $environments : func_get_args(); + + return $this; + } + + /** + * State that the command should run even in maintenance mode. + * + * @return $this + */ + public function evenInMaintenanceMode() + { + $this->evenInMaintenanceMode = true; + + return $this; + } + + /** + * Do not allow the event to overlap each other. + * + * @return $this + */ + public function withoutOverlapping() + { + $this->withoutOverlapping = true; + + return $this->then(function () { + $this->mutex->forget($this); + })->skip(function () { + return $this->mutex->exists($this); + }); + } + + /** + * Register a callback to further filter the schedule. + * + * @param \Closure $callback + * @return $this + */ + public function when(Closure $callback) + { + $this->filters[] = $callback; + + return $this; + } + + /** + * Register a callback to further filter the schedule. + * + * @param \Closure $callback + * @return $this + */ + public function skip(Closure $callback) + { + $this->rejects[] = $callback; + + return $this; + } + + /** + * Register a callback to be called before the operation. + * + * @param \Closure $callback + * @return $this + */ + public function before(Closure $callback) + { + $this->beforeCallbacks[] = $callback; + + return $this; + } + + /** + * Register a callback to be called after the operation. + * + * @param \Closure $callback + * @return $this + */ + public function after(Closure $callback) + { + return $this->then($callback); + } + + /** + * Register a callback to be called after the operation. + * + * @param \Closure $callback + * @return $this + */ + public function then(Closure $callback) + { + $this->afterCallbacks[] = $callback; + + return $this; + } + + /** + * Set the human-friendly description of the event. + * + * @param string $description + * @return $this + */ + public function name($description) + { + return $this->description($description); + } + + /** + * Set the human-friendly description of the event. + * + * @param string $description + * @return $this + */ + public function description($description) + { + $this->description = $description; + + return $this; + } + + /** + * Get the summary of the event for display. + * + * @return string + */ + public function getSummaryForDisplay() + { + if (is_string($this->description)) { + return $this->description; + } + + return $this->buildCommand(); + } + + /** + * Get the Cron expression for the event. + * + * @return string + */ + public function getExpression() + { + return $this->expression; + } + + /** + * Set the mutex implementation to be used. + * + * @param \Illuminate\Console\Scheduling\Mutex $mutex + * @return $this + */ + public function preventOverlapsUsing(Mutex $mutex) + { + $this->mutex = $mutex; + + return $this; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Console/Scheduling/ManagesFrequencies.php b/vendor/laravel/framework/src/Illuminate/Console/Scheduling/ManagesFrequencies.php new file mode 100644 index 0000000..b80f6d9 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Console/Scheduling/ManagesFrequencies.php @@ -0,0 +1,383 @@ +expression = $expression; + + return $this; + } + + /** + * Schedule the event to run between start and end time. + * + * @param string $startTime + * @param string $endTime + * @return $this + */ + public function between($startTime, $endTime) + { + return $this->when($this->inTimeInterval($startTime, $endTime)); + } + + /** + * Schedule the event to not run between start and end time. + * + * @param string $startTime + * @param string $endTime + * @return $this + */ + public function unlessBetween($startTime, $endTime) + { + return $this->skip($this->inTimeInterval($startTime, $endTime)); + } + + /** + * Schedule the event to run between start and end time. + * + * @param string $startTime + * @param string $endTime + * @return \Closure + */ + private function inTimeInterval($startTime, $endTime) + { + return function () use ($startTime, $endTime) { + $now = Carbon::now()->getTimestamp(); + + return $now >= strtotime($startTime) && $now <= strtotime($endTime); + }; + } + + /** + * Schedule the event to run hourly. + * + * @return $this + */ + public function hourly() + { + return $this->spliceIntoPosition(1, 0); + } + + /** + * Schedule the event to run hourly at a given offset in the hour. + * + * @param int $offset + * @return $this + */ + public function hourlyAt($offset) + { + return $this->spliceIntoPosition(1, $offset); + } + + /** + * Schedule the event to run daily. + * + * @return $this + */ + public function daily() + { + return $this->spliceIntoPosition(1, 0) + ->spliceIntoPosition(2, 0); + } + + /** + * Schedule the command at a given time. + * + * @param string $time + * @return $this + */ + public function at($time) + { + return $this->dailyAt($time); + } + + /** + * Schedule the event to run daily at a given time (10:00, 19:30, etc). + * + * @param string $time + * @return $this + */ + public function dailyAt($time) + { + $segments = explode(':', $time); + + return $this->spliceIntoPosition(2, (int) $segments[0]) + ->spliceIntoPosition(1, count($segments) == 2 ? (int) $segments[1] : '0'); + } + + /** + * Schedule the event to run twice daily. + * + * @param int $first + * @param int $second + * @return $this + */ + public function twiceDaily($first = 1, $second = 13) + { + $hours = $first.','.$second; + + return $this->spliceIntoPosition(1, 0) + ->spliceIntoPosition(2, $hours); + } + + /** + * Schedule the event to run only on weekdays. + * + * @return $this + */ + public function weekdays() + { + return $this->spliceIntoPosition(5, '1-5'); + } + + /** + * Schedule the event to run only on weekends. + * + * @return $this + */ + public function weekends() + { + return $this->spliceIntoPosition(5, '0,6'); + } + + /** + * Schedule the event to run only on Mondays. + * + * @return $this + */ + public function mondays() + { + return $this->days(1); + } + + /** + * Schedule the event to run only on Tuesdays. + * + * @return $this + */ + public function tuesdays() + { + return $this->days(2); + } + + /** + * Schedule the event to run only on Wednesdays. + * + * @return $this + */ + public function wednesdays() + { + return $this->days(3); + } + + /** + * Schedule the event to run only on Thursdays. + * + * @return $this + */ + public function thursdays() + { + return $this->days(4); + } + + /** + * Schedule the event to run only on Fridays. + * + * @return $this + */ + public function fridays() + { + return $this->days(5); + } + + /** + * Schedule the event to run only on Saturdays. + * + * @return $this + */ + public function saturdays() + { + return $this->days(6); + } + + /** + * Schedule the event to run only on Sundays. + * + * @return $this + */ + public function sundays() + { + return $this->days(0); + } + + /** + * Schedule the event to run weekly. + * + * @return $this + */ + public function weekly() + { + return $this->spliceIntoPosition(1, 0) + ->spliceIntoPosition(2, 0) + ->spliceIntoPosition(5, 0); + } + + /** + * Schedule the event to run weekly on a given day and time. + * + * @param int $day + * @param string $time + * @return $this + */ + public function weeklyOn($day, $time = '0:0') + { + $this->dailyAt($time); + + return $this->spliceIntoPosition(5, $day); + } + + /** + * Schedule the event to run monthly. + * + * @return $this + */ + public function monthly() + { + return $this->spliceIntoPosition(1, 0) + ->spliceIntoPosition(2, 0) + ->spliceIntoPosition(3, 1); + } + + /** + * Schedule the event to run monthly on a given day and time. + * + * @param int $day + * @param string $time + * @return $this + */ + public function monthlyOn($day = 1, $time = '0:0') + { + $this->dailyAt($time); + + return $this->spliceIntoPosition(3, $day); + } + + /** + * Schedule the event to run quarterly. + * + * @return $this + */ + public function quarterly() + { + return $this->spliceIntoPosition(1, 0) + ->spliceIntoPosition(2, 0) + ->spliceIntoPosition(3, 1) + ->spliceIntoPosition(4, '*/3'); + } + + /** + * Schedule the event to run yearly. + * + * @return $this + */ + public function yearly() + { + return $this->spliceIntoPosition(1, 0) + ->spliceIntoPosition(2, 0) + ->spliceIntoPosition(3, 1) + ->spliceIntoPosition(4, 1); + } + + /** + * Schedule the event to run every minute. + * + * @return $this + */ + public function everyMinute() + { + return $this->spliceIntoPosition(1, '*'); + } + + /** + * Schedule the event to run every five minutes. + * + * @return $this + */ + public function everyFiveMinutes() + { + return $this->spliceIntoPosition(1, '*/5'); + } + + /** + * Schedule the event to run every ten minutes. + * + * @return $this + */ + public function everyTenMinutes() + { + return $this->spliceIntoPosition(1, '*/10'); + } + + /** + * Schedule the event to run every thirty minutes. + * + * @return $this + */ + public function everyThirtyMinutes() + { + return $this->spliceIntoPosition(1, '0,30'); + } + + /** + * Set the days of the week the command should run on. + * + * @param array|mixed $days + * @return $this + */ + public function days($days) + { + $days = is_array($days) ? $days : func_get_args(); + + return $this->spliceIntoPosition(5, implode(',', $days)); + } + + /** + * Set the timezone the date should be evaluated on. + * + * @param \DateTimeZone|string $timezone + * @return $this + */ + public function timezone($timezone) + { + $this->timezone = $timezone; + + return $this; + } + + /** + * Splice the given value into the given position of the expression. + * + * @param int $position + * @param string $value + * @return $this + */ + protected function spliceIntoPosition($position, $value) + { + $segments = explode(' ', $this->expression); + + $segments[$position - 1] = $value; + + return $this->cron(implode(' ', $segments)); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Console/Scheduling/Mutex.php b/vendor/laravel/framework/src/Illuminate/Console/Scheduling/Mutex.php new file mode 100644 index 0000000..47ca939 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Console/Scheduling/Mutex.php @@ -0,0 +1,30 @@ +mutex = $container->bound(Mutex::class) + ? $container->make(Mutex::class) + : $container->make(CacheMutex::class); + } + + /** + * Add a new callback event to the schedule. + * + * @param string|callable $callback + * @param array $parameters + * @return \Illuminate\Console\Scheduling\Event + */ + public function call($callback, array $parameters = []) + { + $this->events[] = $event = new CallbackEvent( + $this->mutex, $callback, $parameters + ); + + return $event; + } + + /** + * Add a new Artisan command event to the schedule. + * + * @param string $command + * @param array $parameters + * @return \Illuminate\Console\Scheduling\Event + */ + public function command($command, array $parameters = []) + { + if (class_exists($command)) { + $command = Container::getInstance()->make($command)->getName(); + } + + return $this->exec( + Application::formatCommandString($command), $parameters + ); + } + + /** + * Add a new job callback event to the schedule. + * + * @param object|string $job + * @return \Illuminate\Console\Scheduling\Event + */ + public function job($job) + { + return $this->call(function () use ($job) { + dispatch(is_string($job) ? resolve($job) : $job); + })->name(is_string($job) ? $job : get_class($job)); + } + + /** + * Add a new command event to the schedule. + * + * @param string $command + * @param array $parameters + * @return \Illuminate\Console\Scheduling\Event + */ + public function exec($command, array $parameters = []) + { + if (count($parameters)) { + $command .= ' '.$this->compileParameters($parameters); + } + + $this->events[] = $event = new Event($this->mutex, $command); + + return $event; + } + + /** + * Compile parameters for a command. + * + * @param array $parameters + * @return string + */ + protected function compileParameters(array $parameters) + { + return collect($parameters)->map(function ($value, $key) { + if (is_array($value)) { + $value = collect($value)->map(function ($value) { + return ProcessUtils::escapeArgument($value); + })->implode(' '); + } elseif (! is_numeric($value) && ! preg_match('/^(-.$|--.*)/i', $value)) { + $value = ProcessUtils::escapeArgument($value); + } + + return is_numeric($key) ? $value : "{$key}={$value}"; + })->implode(' '); + } + + /** + * Get all of the events on the schedule that are due. + * + * @param \Illuminate\Contracts\Foundation\Application $app + * @return array + */ + public function dueEvents($app) + { + return collect($this->events)->filter->isDue($app); + } + + /** + * Get all of the events on the schedule. + * + * @return array + */ + public function events() + { + return $this->events; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Console/Scheduling/ScheduleFinishCommand.php b/vendor/laravel/framework/src/Illuminate/Console/Scheduling/ScheduleFinishCommand.php new file mode 100644 index 0000000..f22a0c5 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Console/Scheduling/ScheduleFinishCommand.php @@ -0,0 +1,61 @@ +schedule = $schedule; + + parent::__construct(); + } + + /** + * Execute the console command. + * + * @return void + */ + public function fire() + { + collect($this->schedule->events())->filter(function ($value) { + return $value->mutexName() == $this->argument('id'); + })->each->callAfterCallbacks($this->laravel); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Console/Scheduling/ScheduleRunCommand.php b/vendor/laravel/framework/src/Illuminate/Console/Scheduling/ScheduleRunCommand.php new file mode 100644 index 0000000..8bf7c90 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Console/Scheduling/ScheduleRunCommand.php @@ -0,0 +1,68 @@ +schedule = $schedule; + + parent::__construct(); + } + + /** + * Execute the console command. + * + * @return void + */ + public function fire() + { + $eventsRan = false; + + foreach ($this->schedule->dueEvents($this->laravel) as $event) { + if (! $event->filtersPass($this->laravel)) { + continue; + } + + $this->line('Running scheduled command: '.$event->getSummaryForDisplay()); + + $event->run($this->laravel); + + $eventsRan = true; + } + + if (! $eventsRan) { + $this->info('No scheduled commands are ready to run.'); + } + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Console/composer.json b/vendor/laravel/framework/src/Illuminate/Console/composer.json new file mode 100755 index 0000000..60a138b --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Console/composer.json @@ -0,0 +1,42 @@ +{ + "name": "illuminate/console", + "description": "The Illuminate Console package.", + "license": "MIT", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "require": { + "php": ">=5.6.4", + "illuminate/contracts": "5.4.*", + "illuminate/support": "5.4.*", + "nesbot/carbon": "~1.20", + "symfony/console": "~3.2" + }, + "autoload": { + "psr-4": { + "Illuminate\\Console\\": "" + } + }, + "extra": { + "branch-alias": { + "dev-master": "5.4-dev" + } + }, + "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)." + }, + "config": { + "sort-packages": true + }, + "minimum-stability": "dev" +} diff --git a/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php b/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php new file mode 100644 index 0000000..d422ea4 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php @@ -0,0 +1,172 @@ +make($segments[0]), $method], $parameters + ); + } + + /** + * Call a method that has been bound to the container. + * + * @param \Illuminate\Container\Container $container + * @param callable $callback + * @param mixed $default + * @return mixed + */ + protected static function callBoundMethod($container, $callback, $default) + { + if (! is_array($callback)) { + return $default instanceof Closure ? $default() : $default; + } + + // Here we need to turn the array callable into a Class@method string we can use to + // examine the container and see if there are any method bindings for this given + // method. If there are, we can call this method binding callback immediately. + $method = static::normalizeMethod($callback); + + if ($container->hasMethodBinding($method)) { + return $container->callMethodBinding($method, $callback[0]); + } + + return $default instanceof Closure ? $default() : $default; + } + + /** + * Normalize the given callback into a Class@method string. + * + * @param callable $callback + * @return string + */ + protected static function normalizeMethod($callback) + { + $class = is_string($callback[0]) ? $callback[0] : get_class($callback[0]); + + return "{$class}@{$callback[1]}"; + } + + /** + * Get all dependencies for a given method. + * + * @param \Illuminate\Container\Container + * @param callable|string $callback + * @param array $parameters + * @return array + */ + protected static function getMethodDependencies($container, $callback, array $parameters = []) + { + $dependencies = []; + + foreach (static::getCallReflector($callback)->getParameters() as $parameter) { + static::addDependencyForCallParameter($container, $parameter, $parameters, $dependencies); + } + + return array_merge($dependencies, $parameters); + } + + /** + * Get the proper reflection instance for the given callback. + * + * @param callable|string $callback + * @return \ReflectionFunctionAbstract + */ + protected static function getCallReflector($callback) + { + if (is_string($callback) && strpos($callback, '::') !== false) { + $callback = explode('::', $callback); + } + + return is_array($callback) + ? new ReflectionMethod($callback[0], $callback[1]) + : new ReflectionFunction($callback); + } + + /** + * Get the dependency for the given call parameter. + * + * @param \Illuminate\Container\Container $container + * @param \ReflectionParameter $parameter + * @param array $parameters + * @param array $dependencies + * @return mixed + */ + protected static function addDependencyForCallParameter($container, $parameter, + array &$parameters, &$dependencies) + { + if (array_key_exists($parameter->name, $parameters)) { + $dependencies[] = $parameters[$parameter->name]; + + unset($parameters[$parameter->name]); + } elseif ($parameter->getClass()) { + $dependencies[] = $container->make($parameter->getClass()->name); + } elseif ($parameter->isDefaultValueAvailable()) { + $dependencies[] = $parameter->getDefaultValue(); + } + } + + /** + * Determine if the given string is in Class@method syntax. + * + * @param mixed $callback + * @return bool + */ + protected static function isCallableWithAtSign($callback) + { + return is_string($callback) && strpos($callback, '@') !== false; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Container/Container.php b/vendor/laravel/framework/src/Illuminate/Container/Container.php new file mode 100755 index 0000000..1b2bad9 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Container/Container.php @@ -0,0 +1,1189 @@ +getAlias($concrete)); + } + + /** + * Determine if the given abstract type has been bound. + * + * @param string $abstract + * @return bool + */ + public function bound($abstract) + { + return isset($this->bindings[$abstract]) || + isset($this->instances[$abstract]) || + $this->isAlias($abstract); + } + + /** + * Determine if the given abstract type has been resolved. + * + * @param string $abstract + * @return bool + */ + public function resolved($abstract) + { + if ($this->isAlias($abstract)) { + $abstract = $this->getAlias($abstract); + } + + return isset($this->resolved[$abstract]) || + isset($this->instances[$abstract]); + } + + /** + * Determine if a given type is shared. + * + * @param string $abstract + * @return bool + */ + public function isShared($abstract) + { + return isset($this->instances[$abstract]) || + (isset($this->bindings[$abstract]['shared']) && + $this->bindings[$abstract]['shared'] === true); + } + + /** + * Determine if a given string is an alias. + * + * @param string $name + * @return bool + */ + public function isAlias($name) + { + return isset($this->aliases[$name]); + } + + /** + * Register a binding with the container. + * + * @param string|array $abstract + * @param \Closure|string|null $concrete + * @param bool $shared + * @return void + */ + public function bind($abstract, $concrete = null, $shared = false) + { + // If no concrete type was given, we will simply set the concrete type to the + // abstract type. After that, the concrete type to be registered as shared + // without being forced to state their classes in both of the parameters. + $this->dropStaleInstances($abstract); + + if (is_null($concrete)) { + $concrete = $abstract; + } + + // If the factory is not a Closure, it means it is just a class name which is + // bound into this container to the abstract type and we will just wrap it + // up inside its own Closure to give us more convenience when extending. + if (! $concrete instanceof Closure) { + $concrete = $this->getClosure($abstract, $concrete); + } + + $this->bindings[$abstract] = compact('concrete', 'shared'); + + // If the abstract type was already resolved in this container we'll fire the + // rebound listener so that any objects which have already gotten resolved + // can have their copy of the object updated via the listener callbacks. + if ($this->resolved($abstract)) { + $this->rebound($abstract); + } + } + + /** + * Get the Closure to be used when building a type. + * + * @param string $abstract + * @param string $concrete + * @return \Closure + */ + protected function getClosure($abstract, $concrete) + { + return function ($container, $parameters = []) use ($abstract, $concrete) { + $method = ($abstract == $concrete) ? 'build' : 'make'; + + return $container->$method($concrete, $parameters); + }; + } + + /** + * Determine if the container has a method binding. + * + * @param string $method + * @return bool + */ + public function hasMethodBinding($method) + { + return isset($this->methodBindings[$method]); + } + + /** + * Bind a callback to resolve with Container::call. + * + * @param string $method + * @param \Closure $callback + * @return void + */ + public function bindMethod($method, $callback) + { + $this->methodBindings[$method] = $callback; + } + + /** + * Get the method binding for the given method. + * + * @param string $method + * @param mixed $instance + * @return mixed + */ + public function callMethodBinding($method, $instance) + { + return call_user_func($this->methodBindings[$method], $instance, $this); + } + + /** + * Add a contextual binding to the container. + * + * @param string $concrete + * @param string $abstract + * @param \Closure|string $implementation + * @return void + */ + public function addContextualBinding($concrete, $abstract, $implementation) + { + $this->contextual[$concrete][$this->getAlias($abstract)] = $implementation; + } + + /** + * Register a binding if it hasn't already been registered. + * + * @param string $abstract + * @param \Closure|string|null $concrete + * @param bool $shared + * @return void + */ + public function bindIf($abstract, $concrete = null, $shared = false) + { + if (! $this->bound($abstract)) { + $this->bind($abstract, $concrete, $shared); + } + } + + /** + * Register a shared binding in the container. + * + * @param string|array $abstract + * @param \Closure|string|null $concrete + * @return void + */ + public function singleton($abstract, $concrete = null) + { + $this->bind($abstract, $concrete, true); + } + + /** + * "Extend" an abstract type in the container. + * + * @param string $abstract + * @param \Closure $closure + * @return void + * + * @throws \InvalidArgumentException + */ + public function extend($abstract, Closure $closure) + { + $abstract = $this->getAlias($abstract); + + if (isset($this->instances[$abstract])) { + $this->instances[$abstract] = $closure($this->instances[$abstract], $this); + + $this->rebound($abstract); + } else { + $this->extenders[$abstract][] = $closure; + } + } + + /** + * Register an existing instance as shared in the container. + * + * @param string $abstract + * @param mixed $instance + * @return void + */ + public function instance($abstract, $instance) + { + $this->removeAbstractAlias($abstract); + + unset($this->aliases[$abstract]); + + // We'll check to determine if this type has been bound before, and if it has + // we will fire the rebound callbacks registered with the container and it + // can be updated with consuming classes that have gotten resolved here. + $this->instances[$abstract] = $instance; + + if ($this->bound($abstract)) { + $this->rebound($abstract); + } + } + + /** + * Remove an alias from the contextual binding alias cache. + * + * @param string $searched + * @return void + */ + protected function removeAbstractAlias($searched) + { + if (! isset($this->aliases[$searched])) { + return; + } + + foreach ($this->abstractAliases as $abstract => $aliases) { + foreach ($aliases as $index => $alias) { + if ($alias == $searched) { + unset($this->abstractAliases[$abstract][$index]); + } + } + } + } + + /** + * Assign a set of tags to a given binding. + * + * @param array|string $abstracts + * @param array|mixed ...$tags + * @return void + */ + public function tag($abstracts, $tags) + { + $tags = is_array($tags) ? $tags : array_slice(func_get_args(), 1); + + foreach ($tags as $tag) { + if (! isset($this->tags[$tag])) { + $this->tags[$tag] = []; + } + + foreach ((array) $abstracts as $abstract) { + $this->tags[$tag][] = $abstract; + } + } + } + + /** + * Resolve all of the bindings for a given tag. + * + * @param string $tag + * @return array + */ + public function tagged($tag) + { + $results = []; + + if (isset($this->tags[$tag])) { + foreach ($this->tags[$tag] as $abstract) { + $results[] = $this->make($abstract); + } + } + + return $results; + } + + /** + * Alias a type to a different name. + * + * @param string $abstract + * @param string $alias + * @return void + */ + public function alias($abstract, $alias) + { + $this->aliases[$alias] = $abstract; + + $this->abstractAliases[$abstract][] = $alias; + } + + /** + * Bind a new callback to an abstract's rebind event. + * + * @param string $abstract + * @param \Closure $callback + * @return mixed + */ + public function rebinding($abstract, Closure $callback) + { + $this->reboundCallbacks[$abstract = $this->getAlias($abstract)][] = $callback; + + if ($this->bound($abstract)) { + return $this->make($abstract); + } + } + + /** + * Refresh an instance on the given target and method. + * + * @param string $abstract + * @param mixed $target + * @param string $method + * @return mixed + */ + public function refresh($abstract, $target, $method) + { + return $this->rebinding($abstract, function ($app, $instance) use ($target, $method) { + $target->{$method}($instance); + }); + } + + /** + * Fire the "rebound" callbacks for the given abstract type. + * + * @param string $abstract + * @return void + */ + protected function rebound($abstract) + { + $instance = $this->make($abstract); + + foreach ($this->getReboundCallbacks($abstract) as $callback) { + call_user_func($callback, $this, $instance); + } + } + + /** + * Get the rebound callbacks for a given type. + * + * @param string $abstract + * @return array + */ + protected function getReboundCallbacks($abstract) + { + if (isset($this->reboundCallbacks[$abstract])) { + return $this->reboundCallbacks[$abstract]; + } + + return []; + } + + /** + * Wrap the given closure such that its dependencies will be injected when executed. + * + * @param \Closure $callback + * @param array $parameters + * @return \Closure + */ + public function wrap(Closure $callback, array $parameters = []) + { + return function () use ($callback, $parameters) { + return $this->call($callback, $parameters); + }; + } + + /** + * Call the given Closure / class@method and inject its dependencies. + * + * @param callable|string $callback + * @param array $parameters + * @param string|null $defaultMethod + * @return mixed + */ + public function call($callback, array $parameters = [], $defaultMethod = null) + { + return BoundMethod::call($this, $callback, $parameters, $defaultMethod); + } + + /** + * Get a closure to resolve the given type from the container. + * + * @param string $abstract + * @return \Closure + */ + public function factory($abstract) + { + return function () use ($abstract) { + return $this->make($abstract); + }; + } + + /** + * Resolve the given type with the given parameter overrides. + * + * @param string $abstract + * @param array $parameters + * @return mixed + */ + public function makeWith($abstract, array $parameters) + { + return $this->resolve($abstract, $parameters); + } + + /** + * Resolve the given type from the container. + * + * @param string $abstract + * @return mixed + */ + public function make($abstract) + { + return $this->resolve($abstract); + } + + /** + * Resolve the given type from the container. + * + * @param string $abstract + * @param array $parameters + * @return mixed + */ + protected function resolve($abstract, $parameters = []) + { + $needsContextualBuild = ! empty($parameters) || ! is_null( + $this->getContextualConcrete($abstract = $this->getAlias($abstract)) + ); + + // If an instance of the type is currently being managed as a singleton we'll + // just return an existing instance instead of instantiating new instances + // so the developer can keep using the same objects instance every time. + if (isset($this->instances[$abstract]) && ! $needsContextualBuild) { + return $this->instances[$abstract]; + } + + $this->with[] = $parameters; + + $concrete = $this->getConcrete($abstract); + + // We're ready to instantiate an instance of the concrete type registered for + // the binding. This will instantiate the types, as well as resolve any of + // its "nested" dependencies recursively until all have gotten resolved. + if ($this->isBuildable($concrete, $abstract)) { + $object = $this->build($concrete); + } else { + $object = $this->make($concrete); + } + + // If we defined any extenders for this type, we'll need to spin through them + // and apply them to the object being built. This allows for the extension + // of services, such as changing configuration or decorating the object. + foreach ($this->getExtenders($abstract) as $extender) { + $object = $extender($object, $this); + } + + // If the requested type is registered as a singleton we'll want to cache off + // the instances in "memory" so we can return it later without creating an + // entirely new instance of an object on each subsequent request for it. + if ($this->isShared($abstract) && ! $needsContextualBuild) { + $this->instances[$abstract] = $object; + } + + $this->fireResolvingCallbacks($abstract, $object); + + // Before returning, we will also set the resolved flag to "true" and pop off + // the parameter overrides for this build. After those two things are done + // we will be ready to return back the fully constructed class instance. + $this->resolved[$abstract] = true; + + array_pop($this->with); + + return $object; + } + + /** + * Get the concrete type for a given abstract. + * + * @param string $abstract + * @return mixed $concrete + */ + protected function getConcrete($abstract) + { + if (! is_null($concrete = $this->getContextualConcrete($abstract))) { + return $concrete; + } + + // If we don't have a registered resolver or concrete for the type, we'll just + // assume each type is a concrete name and will attempt to resolve it as is + // since the container should be able to resolve concretes automatically. + if (isset($this->bindings[$abstract])) { + return $this->bindings[$abstract]['concrete']; + } + + return $abstract; + } + + /** + * Get the contextual concrete binding for the given abstract. + * + * @param string $abstract + * @return string|null + */ + protected function getContextualConcrete($abstract) + { + if (! is_null($binding = $this->findInContextualBindings($abstract))) { + return $binding; + } + + // Next we need to see if a contextual binding might be bound under an alias of the + // given abstract type. So, we will need to check if any aliases exist with this + // type and then spin through them and check for contextual bindings on these. + if (empty($this->abstractAliases[$abstract])) { + return; + } + + foreach ($this->abstractAliases[$abstract] as $alias) { + if (! is_null($binding = $this->findInContextualBindings($alias))) { + return $binding; + } + } + } + + /** + * Find the concrete binding for the given abstract in the contextual binding array. + * + * @param string $abstract + * @return string|null + */ + protected function findInContextualBindings($abstract) + { + if (isset($this->contextual[end($this->buildStack)][$abstract])) { + return $this->contextual[end($this->buildStack)][$abstract]; + } + } + + /** + * Determine if the given concrete is buildable. + * + * @param mixed $concrete + * @param string $abstract + * @return bool + */ + protected function isBuildable($concrete, $abstract) + { + return $concrete === $abstract || $concrete instanceof Closure; + } + + /** + * Instantiate a concrete instance of the given type. + * + * @param string $concrete + * @return mixed + * + * @throws \Illuminate\Contracts\Container\BindingResolutionException + */ + public function build($concrete) + { + // If the concrete type is actually a Closure, we will just execute it and + // 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)); + } + + $reflector = new ReflectionClass($concrete); + + // If the type is not instantiable, the developer is attempting to resolve + // an abstract type such as an Interface of Abstract Class and there is + // no binding registered for the abstractions so we need to bail out. + if (! $reflector->isInstantiable()) { + return $this->notInstantiable($concrete); + } + + $this->buildStack[] = $concrete; + + $constructor = $reflector->getConstructor(); + + // If there are no constructors, that means there are no dependencies then + // we can just resolve the instances of the objects right away, without + // resolving any other types or dependencies out of these containers. + if (is_null($constructor)) { + array_pop($this->buildStack); + + return new $concrete; + } + + $dependencies = $constructor->getParameters(); + + // Once we have all the constructor's parameters we can create each of the + // dependency instances and then use the reflection instances to make a + // new instance of this class, injecting the created dependencies in. + $instances = $this->resolveDependencies( + $dependencies + ); + + array_pop($this->buildStack); + + return $reflector->newInstanceArgs($instances); + } + + /** + * Resolve all of the dependencies from the ReflectionParameters. + * + * @param array $dependencies + * @return array + */ + protected function resolveDependencies(array $dependencies) + { + $results = []; + + foreach ($dependencies as $dependency) { + // If this dependency has a override for this particular build we will use + // that instead as the value. Otherwise, we will continue with this run + // of resolutions and let reflection attempt to determine the result. + if ($this->hasParameterOverride($dependency)) { + $results[] = $this->getParameterOverride($dependency); + + continue; + } + + // If the class is null, it means the dependency is a string or some other + // primitive type which we can not resolve since it is not a class and + // we will just bomb out with an error since we have no-where to go. + $results[] = is_null($class = $dependency->getClass()) + ? $this->resolvePrimitive($dependency) + : $this->resolveClass($dependency); + } + + return $results; + } + + /** + * Determine if the given dependency has a parameter override from makeWith. + * + * @param \ReflectionParameter $dependency + * @return bool + */ + protected function hasParameterOverride($dependency) + { + return array_key_exists($dependency->name, end($this->with)); + } + + /** + * Get a parameter override for a dependency. + * + * @param \ReflectionParameter $dependency + * @return mixed + */ + protected function getParameterOverride($dependency) + { + return end($this->with)[$dependency->name]; + } + + /** + * Resolve a non-class hinted primitive dependency. + * + * @param \ReflectionParameter $parameter + * @return mixed + * + * @throws \Illuminate\Contracts\Container\BindingResolutionException + */ + protected function resolvePrimitive(ReflectionParameter $parameter) + { + if (! is_null($concrete = $this->getContextualConcrete('$'.$parameter->name))) { + return $concrete instanceof Closure ? $concrete($this) : $concrete; + } + + if ($parameter->isDefaultValueAvailable()) { + return $parameter->getDefaultValue(); + } + + $this->unresolvablePrimitive($parameter); + } + + /** + * Resolve a class based dependency from the container. + * + * @param \ReflectionParameter $parameter + * @return mixed + * + * @throws \Illuminate\Contracts\Container\BindingResolutionException + */ + protected function resolveClass(ReflectionParameter $parameter) + { + try { + return $this->make($parameter->getClass()->name); + } + + // If we can not resolve the class instance, we will check to see if the value + // is optional, and if it is we will return the optional parameter value as + // the value of the dependency, similarly to how we do this with scalars. + catch (BindingResolutionException $e) { + if ($parameter->isOptional()) { + return $parameter->getDefaultValue(); + } + + throw $e; + } + } + + /** + * Throw an exception that the concrete is not instantiable. + * + * @param string $concrete + * @return void + * + * @throws \Illuminate\Contracts\Container\BindingResolutionException + */ + protected function notInstantiable($concrete) + { + if (! empty($this->buildStack)) { + $previous = implode(', ', $this->buildStack); + + $message = "Target [$concrete] is not instantiable while building [$previous]."; + } else { + $message = "Target [$concrete] is not instantiable."; + } + + throw new BindingResolutionException($message); + } + + /** + * Throw an exception for an unresolvable primitive. + * + * @param \ReflectionParameter $parameter + * @return void + * + * @throws \Illuminate\Contracts\Container\BindingResolutionException + */ + protected function unresolvablePrimitive(ReflectionParameter $parameter) + { + $message = "Unresolvable dependency resolving [$parameter] in class {$parameter->getDeclaringClass()->getName()}"; + + throw new BindingResolutionException($message); + } + + /** + * Register a new resolving callback. + * + * @param string $abstract + * @param \Closure|null $callback + * @return void + */ + public function resolving($abstract, Closure $callback = null) + { + if (is_string($abstract)) { + $abstract = $this->getAlias($abstract); + } + + if (is_null($callback) && $abstract instanceof Closure) { + $this->globalResolvingCallbacks[] = $abstract; + } else { + $this->resolvingCallbacks[$abstract][] = $callback; + } + } + + /** + * Register a new after resolving callback for all types. + * + * @param string $abstract + * @param \Closure|null $callback + * @return void + */ + public function afterResolving($abstract, Closure $callback = null) + { + if (is_string($abstract)) { + $abstract = $this->getAlias($abstract); + } + + if ($abstract instanceof Closure && is_null($callback)) { + $this->globalAfterResolvingCallbacks[] = $abstract; + } else { + $this->afterResolvingCallbacks[$abstract][] = $callback; + } + } + + /** + * Fire all of the resolving callbacks. + * + * @param string $abstract + * @param mixed $object + * @return void + */ + protected function fireResolvingCallbacks($abstract, $object) + { + $this->fireCallbackArray($object, $this->globalResolvingCallbacks); + + $this->fireCallbackArray( + $object, $this->getCallbacksForType($abstract, $object, $this->resolvingCallbacks) + ); + + $this->fireAfterResolvingCallbacks($abstract, $object); + } + + /** + * Fire all of the after resolving callbacks. + * + * @param string $abstract + * @param mixed $object + * @return void + */ + protected function fireAfterResolvingCallbacks($abstract, $object) + { + $this->fireCallbackArray($object, $this->globalAfterResolvingCallbacks); + + $this->fireCallbackArray( + $object, $this->getCallbacksForType($abstract, $object, $this->afterResolvingCallbacks) + ); + } + + /** + * Get all callbacks for a given type. + * + * @param string $abstract + * @param object $object + * @param array $callbacksPerType + * + * @return array + */ + protected function getCallbacksForType($abstract, $object, array $callbacksPerType) + { + $results = []; + + foreach ($callbacksPerType as $type => $callbacks) { + if ($type === $abstract || $object instanceof $type) { + $results = array_merge($results, $callbacks); + } + } + + return $results; + } + + /** + * Fire an array of callbacks with an object. + * + * @param mixed $object + * @param array $callbacks + * @return void + */ + protected function fireCallbackArray($object, array $callbacks) + { + foreach ($callbacks as $callback) { + $callback($object, $this); + } + } + + /** + * Get the container's bindings. + * + * @return array + */ + public function getBindings() + { + return $this->bindings; + } + + /** + * Get the alias for an abstract if available. + * + * @param string $abstract + * @return string + * + * @throws \LogicException + */ + public function getAlias($abstract) + { + if (! isset($this->aliases[$abstract])) { + return $abstract; + } + + if ($this->aliases[$abstract] === $abstract) { + throw new LogicException("[{$abstract}] is aliased to itself."); + } + + return $this->getAlias($this->aliases[$abstract]); + } + + /** + * Get the extender callbacks for a given type. + * + * @param string $abstract + * @return array + */ + protected function getExtenders($abstract) + { + $abstract = $this->getAlias($abstract); + + if (isset($this->extenders[$abstract])) { + return $this->extenders[$abstract]; + } + + return []; + } + + /** + * Drop all of the stale instances and aliases. + * + * @param string $abstract + * @return void + */ + protected function dropStaleInstances($abstract) + { + unset($this->instances[$abstract], $this->aliases[$abstract]); + } + + /** + * Remove a resolved instance from the instance cache. + * + * @param string $abstract + * @return void + */ + public function forgetInstance($abstract) + { + unset($this->instances[$abstract]); + } + + /** + * Clear all of the instances from the container. + * + * @return void + */ + public function forgetInstances() + { + $this->instances = []; + } + + /** + * Flush the container of all bindings and resolved instances. + * + * @return void + */ + public function flush() + { + $this->aliases = []; + $this->resolved = []; + $this->bindings = []; + $this->instances = []; + $this->abstractAliases = []; + } + + /** + * Set the globally available instance of the container. + * + * @return static + */ + public static function getInstance() + { + if (is_null(static::$instance)) { + static::$instance = new static; + } + + return static::$instance; + } + + /** + * Set the shared instance of the container. + * + * @param \Illuminate\Contracts\Container\Container|null $container + * @return static + */ + public static function setInstance(ContainerContract $container = null) + { + return static::$instance = $container; + } + + /** + * Determine if a given offset exists. + * + * @param string $key + * @return bool + */ + public function offsetExists($key) + { + return $this->bound($key); + } + + /** + * Get the value at a given offset. + * + * @param string $key + * @return mixed + */ + public function offsetGet($key) + { + return $this->make($key); + } + + /** + * Set the value at a given offset. + * + * @param string $key + * @param mixed $value + * @return void + */ + public function offsetSet($key, $value) + { + $this->bind($key, $value instanceof Closure ? $value : function () use ($value) { + return $value; + }); + } + + /** + * Unset the value at a given offset. + * + * @param string $key + * @return void + */ + public function offsetUnset($key) + { + unset($this->bindings[$key], $this->instances[$key], $this->resolved[$key]); + } + + /** + * Dynamically access container services. + * + * @param string $key + * @return mixed + */ + public function __get($key) + { + return $this[$key]; + } + + /** + * Dynamically set container services. + * + * @param string $key + * @param mixed $value + * @return void + */ + public function __set($key, $value) + { + $this[$key] = $value; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Container/ContextualBindingBuilder.php b/vendor/laravel/framework/src/Illuminate/Container/ContextualBindingBuilder.php new file mode 100644 index 0000000..58b70ce --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Container/ContextualBindingBuilder.php @@ -0,0 +1,68 @@ +concrete = $concrete; + $this->container = $container; + } + + /** + * Define the abstract target that depends on the context. + * + * @param string $abstract + * @return $this + */ + public function needs($abstract) + { + $this->needs = $abstract; + + return $this; + } + + /** + * Define the implementation for the contextual binding. + * + * @param \Closure|string $implementation + * @return void + */ + public function give($implementation) + { + $this->container->addContextualBinding( + $this->concrete, $this->needs, $implementation + ); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Container/composer.json b/vendor/laravel/framework/src/Illuminate/Container/composer.json new file mode 100755 index 0000000..97a919b --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Container/composer.json @@ -0,0 +1,34 @@ +{ + "name": "illuminate/container", + "description": "The Illuminate Container package.", + "license": "MIT", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "require": { + "php": ">=5.6.4", + "illuminate/contracts": "5.4.*" + }, + "autoload": { + "psr-4": { + "Illuminate\\Container\\": "" + } + }, + "extra": { + "branch-alias": { + "dev-master": "5.4-dev" + } + }, + "config": { + "sort-packages": true + }, + "minimum-stability": "dev" +} diff --git a/vendor/laravel/framework/src/Illuminate/Contracts/Auth/Access/Authorizable.php b/vendor/laravel/framework/src/Illuminate/Contracts/Auth/Access/Authorizable.php new file mode 100644 index 0000000..2f9657c --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Contracts/Auth/Access/Authorizable.php @@ -0,0 +1,15 @@ +id = $id; + $this->class = $class; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Contracts/Debug/ExceptionHandler.php b/vendor/laravel/framework/src/Illuminate/Contracts/Debug/ExceptionHandler.php new file mode 100644 index 0000000..e3f18a5 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Contracts/Debug/ExceptionHandler.php @@ -0,0 +1,34 @@ +=5.6.4" + }, + "autoload": { + "psr-4": { + "Illuminate\\Contracts\\": "" + } + }, + "extra": { + "branch-alias": { + "dev-master": "5.4-dev" + } + }, + "config": { + "sort-packages": true + }, + "minimum-stability": "dev" +} diff --git a/vendor/laravel/framework/src/Illuminate/Cookie/CookieJar.php b/vendor/laravel/framework/src/Illuminate/Cookie/CookieJar.php new file mode 100755 index 0000000..93f53f5 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Cookie/CookieJar.php @@ -0,0 +1,178 @@ +getPathAndDomain($path, $domain, $secure); + + $time = ($minutes == 0) ? 0 : Carbon::now()->getTimestamp() + ($minutes * 60); + + return new Cookie($name, $value, $time, $path, $domain, $secure, $httpOnly); + } + + /** + * Create a cookie that lasts "forever" (five years). + * + * @param string $name + * @param string $value + * @param string $path + * @param string $domain + * @param bool $secure + * @param bool $httpOnly + * @return \Symfony\Component\HttpFoundation\Cookie + */ + public function forever($name, $value, $path = null, $domain = null, $secure = false, $httpOnly = true) + { + return $this->make($name, $value, 2628000, $path, $domain, $secure, $httpOnly); + } + + /** + * Expire the given cookie. + * + * @param string $name + * @param string $path + * @param string $domain + * @return \Symfony\Component\HttpFoundation\Cookie + */ + public function forget($name, $path = null, $domain = null) + { + return $this->make($name, null, -2628000, $path, $domain); + } + + /** + * Determine if a cookie has been queued. + * + * @param string $key + * @return bool + */ + public function hasQueued($key) + { + return ! is_null($this->queued($key)); + } + + /** + * Get a queued cookie instance. + * + * @param string $key + * @param mixed $default + * @return \Symfony\Component\HttpFoundation\Cookie + */ + public function queued($key, $default = null) + { + return Arr::get($this->queued, $key, $default); + } + + /** + * Queue a cookie to send with the next response. + * + * @param array $parameters + * @return void + */ + public function queue(...$parameters) + { + if (head($parameters) instanceof Cookie) { + $cookie = head($parameters); + } else { + $cookie = call_user_func_array([$this, 'make'], $parameters); + } + + $this->queued[$cookie->getName()] = $cookie; + } + + /** + * Remove a cookie from the queue. + * + * @param string $name + * @return void + */ + public function unqueue($name) + { + unset($this->queued[$name]); + } + + /** + * Get the path and domain, or the default values. + * + * @param string $path + * @param string $domain + * @param bool $secure + * @return array + */ + protected function getPathAndDomain($path, $domain, $secure = false) + { + return [$path ?: $this->path, $domain ?: $this->domain, $secure ?: $this->secure]; + } + + /** + * Set the default path and domain for the jar. + * + * @param string $path + * @param string $domain + * @param bool $secure + * @return $this + */ + public function setDefaultPathAndDomain($path, $domain, $secure = false) + { + list($this->path, $this->domain, $this->secure) = [$path, $domain, $secure]; + + return $this; + } + + /** + * Get the cookies which have been queued for the next request. + * + * @return array + */ + public function getQueuedCookies() + { + return $this->queued; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Cookie/CookieServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Cookie/CookieServiceProvider.php new file mode 100755 index 0000000..faeaa2a --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Cookie/CookieServiceProvider.php @@ -0,0 +1,22 @@ +app->singleton('cookie', function ($app) { + $config = $app->make('config')->get('session'); + + return (new CookieJar)->setDefaultPathAndDomain($config['path'], $config['domain'], $config['secure']); + }); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php b/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php new file mode 100644 index 0000000..4caa574 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php @@ -0,0 +1,45 @@ +cookies = $cookies; + } + + /** + * Handle an incoming request. + * + * @param \Illuminate\Http\Request $request + * @param \Closure $next + * @return mixed + */ + public function handle($request, Closure $next) + { + $response = $next($request); + + foreach ($this->cookies->getQueuedCookies() as $cookie) { + $response->headers->setCookie($cookie); + } + + return $response; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php b/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php new file mode 100644 index 0000000..1e63011 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php @@ -0,0 +1,163 @@ +encrypter = $encrypter; + } + + /** + * Disable encryption for the given cookie name(s). + * + * @param string|array $cookieName + * @return void + */ + public function disableFor($cookieName) + { + $this->except = array_merge($this->except, (array) $cookieName); + } + + /** + * Handle an incoming request. + * + * @param \Illuminate\Http\Request $request + * @param \Closure $next + * @return mixed + */ + public function handle($request, Closure $next) + { + return $this->encrypt($next($this->decrypt($request))); + } + + /** + * Decrypt the cookies on the request. + * + * @param \Symfony\Component\HttpFoundation\Request $request + * @return \Symfony\Component\HttpFoundation\Request + */ + protected function decrypt(Request $request) + { + foreach ($request->cookies as $key => $c) { + if ($this->isDisabled($key)) { + continue; + } + + try { + $request->cookies->set($key, $this->decryptCookie($c)); + } catch (DecryptException $e) { + $request->cookies->set($key, null); + } + } + + return $request; + } + + /** + * Decrypt the given cookie and return the value. + * + * @param string|array $cookie + * @return string|array + */ + protected function decryptCookie($cookie) + { + return is_array($cookie) + ? $this->decryptArray($cookie) + : $this->encrypter->decrypt($cookie); + } + + /** + * Decrypt an array based cookie. + * + * @param array $cookie + * @return array + */ + protected function decryptArray(array $cookie) + { + $decrypted = []; + + foreach ($cookie as $key => $value) { + if (is_string($value)) { + $decrypted[$key] = $this->encrypter->decrypt($value); + } + } + + return $decrypted; + } + + /** + * Encrypt the cookies on an outgoing response. + * + * @param \Symfony\Component\HttpFoundation\Response $response + * @return \Symfony\Component\HttpFoundation\Response + */ + protected function encrypt(Response $response) + { + foreach ($response->headers->getCookies() as $cookie) { + if ($this->isDisabled($cookie->getName())) { + continue; + } + + $response->headers->setCookie($this->duplicate( + $cookie, $this->encrypter->encrypt($cookie->getValue()) + )); + } + + return $response; + } + + /** + * Duplicate a cookie with a new value. + * + * @param \Symfony\Component\HttpFoundation\Cookie $c + * @param mixed $value + * @return \Symfony\Component\HttpFoundation\Cookie + */ + protected function duplicate(Cookie $c, $value) + { + return new Cookie( + $c->getName(), $value, $c->getExpiresTime(), $c->getPath(), + $c->getDomain(), $c->isSecure(), $c->isHttpOnly() + ); + } + + /** + * Determine whether encryption has been disabled for the given cookie. + * + * @param string $name + * @return bool + */ + public function isDisabled($name) + { + return in_array($name, $this->except); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Cookie/composer.json b/vendor/laravel/framework/src/Illuminate/Cookie/composer.json new file mode 100755 index 0000000..d412bad --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Cookie/composer.json @@ -0,0 +1,37 @@ +{ + "name": "illuminate/cookie", + "description": "The Illuminate Cookie package.", + "license": "MIT", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "require": { + "php": ">=5.6.4", + "illuminate/contracts": "5.4.*", + "illuminate/support": "5.4.*", + "symfony/http-foundation": "~3.2", + "symfony/http-kernel": "~3.2" + }, + "autoload": { + "psr-4": { + "Illuminate\\Cookie\\": "" + } + }, + "extra": { + "branch-alias": { + "dev-master": "5.4-dev" + } + }, + "config": { + "sort-packages": true + }, + "minimum-stability": "dev" +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Capsule/Manager.php b/vendor/laravel/framework/src/Illuminate/Database/Capsule/Manager.php new file mode 100755 index 0000000..b82a792 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Capsule/Manager.php @@ -0,0 +1,201 @@ +setupContainer($container ?: new Container); + + // Once we have the container setup, we will setup the default configuration + // options in the container "config" binding. This will make the database + // manager work correctly out of the box without extreme configuration. + $this->setupDefaultConfiguration(); + + $this->setupManager(); + } + + /** + * Setup the default database configuration options. + * + * @return void + */ + protected function setupDefaultConfiguration() + { + $this->container['config']['database.fetch'] = PDO::FETCH_OBJ; + + $this->container['config']['database.default'] = 'default'; + } + + /** + * Build the database manager instance. + * + * @return void + */ + protected function setupManager() + { + $factory = new ConnectionFactory($this->container); + + $this->manager = new DatabaseManager($this->container, $factory); + } + + /** + * Get a connection instance from the global manager. + * + * @param string $connection + * @return \Illuminate\Database\Connection + */ + public static function connection($connection = null) + { + return static::$instance->getConnection($connection); + } + + /** + * Get a fluent query builder instance. + * + * @param string $table + * @param string $connection + * @return \Illuminate\Database\Query\Builder + */ + public static function table($table, $connection = null) + { + return static::$instance->connection($connection)->table($table); + } + + /** + * Get a schema builder instance. + * + * @param string $connection + * @return \Illuminate\Database\Schema\Builder + */ + public static function schema($connection = null) + { + return static::$instance->connection($connection)->getSchemaBuilder(); + } + + /** + * Get a registered connection instance. + * + * @param string $name + * @return \Illuminate\Database\Connection + */ + public function getConnection($name = null) + { + return $this->manager->connection($name); + } + + /** + * Register a connection with the manager. + * + * @param array $config + * @param string $name + * @return void + */ + public function addConnection(array $config, $name = 'default') + { + $connections = $this->container['config']['database.connections']; + + $connections[$name] = $config; + + $this->container['config']['database.connections'] = $connections; + } + + /** + * Bootstrap Eloquent so it is ready for usage. + * + * @return void + */ + public function bootEloquent() + { + Eloquent::setConnectionResolver($this->manager); + + // If we have an event dispatcher instance, we will go ahead and register it + // with the Eloquent ORM, allowing for model callbacks while creating and + // updating "model" instances; however, it is not necessary to operate. + if ($dispatcher = $this->getEventDispatcher()) { + Eloquent::setEventDispatcher($dispatcher); + } + } + + /** + * Set the fetch mode for the database connections. + * + * @param int $fetchMode + * @return $this + */ + public function setFetchMode($fetchMode) + { + $this->container['config']['database.fetch'] = $fetchMode; + + return $this; + } + + /** + * Get the database manager instance. + * + * @return \Illuminate\Database\DatabaseManager + */ + public function getDatabaseManager() + { + return $this->manager; + } + + /** + * Get the current event dispatcher instance. + * + * @return \Illuminate\Contracts\Events\Dispatcher|null + */ + public function getEventDispatcher() + { + if ($this->container->bound('events')) { + return $this->container['events']; + } + } + + /** + * Set the event dispatcher instance to be used by connections. + * + * @param \Illuminate\Contracts\Events\Dispatcher $dispatcher + * @return void + */ + public function setEventDispatcher(Dispatcher $dispatcher) + { + $this->container->instance('events', $dispatcher); + } + + /** + * Dynamically pass methods to the default connection. + * + * @param string $method + * @param array $parameters + * @return mixed + */ + public static function __callStatic($method, $parameters) + { + return static::connection()->$method(...$parameters); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Concerns/BuildsQueries.php b/vendor/laravel/framework/src/Illuminate/Database/Concerns/BuildsQueries.php new file mode 100644 index 0000000..e56e020 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Concerns/BuildsQueries.php @@ -0,0 +1,92 @@ +enforceOrderBy(); + + $page = 1; + + do { + // We'll execute the query for the given page and get the results. If there are + // no results we can just break and return from here. When there are results + // we will call the callback with the current chunk of these results here. + $results = $this->forPage($page, $count)->get(); + + $countResults = $results->count(); + + if ($countResults == 0) { + break; + } + + // On each chunk result set, we will pass them to the callback and then let the + // developer take care of everything within the callback, which allows us to + // keep the memory low for spinning through large result sets for working. + if ($callback($results) === false) { + return false; + } + + $page++; + } while ($countResults == $count); + + return true; + } + + /** + * Execute a callback over each item while chunking. + * + * @param callable $callback + * @param int $count + * @return bool + */ + public function each(callable $callback, $count = 1000) + { + return $this->chunk($count, function ($results) use ($callback) { + foreach ($results as $key => $value) { + if ($callback($value, $key) === false) { + return false; + } + } + }); + } + + /** + * Execute the query and get the first result. + * + * @param array $columns + * @return mixed + */ + public function first($columns = ['*']) + { + return $this->take(1)->get($columns)->first(); + } + + /** + * Apply the callback's query changes if the given "value" is true. + * + * @param mixed $value + * @param \Closure $callback + * @param \Closure $default + * @return mixed + */ + public function when($value, $callback, $default = null) + { + if ($value) { + return $callback($this, $value) ?: $this; + } elseif ($default) { + return $default($this, $value) ?: $this; + } + + return $this; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Concerns/ManagesTransactions.php b/vendor/laravel/framework/src/Illuminate/Database/Concerns/ManagesTransactions.php new file mode 100644 index 0000000..9b1dcd1 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Concerns/ManagesTransactions.php @@ -0,0 +1,219 @@ +beginTransaction(); + + // We'll simply execute the given callback within a try / catch block and if we + // catch any exception we can rollback this transaction so that none of this + // gets actually persisted to a database or stored in a permanent fashion. + try { + return tap($callback($this), function ($result) { + $this->commit(); + }); + } + + // If we catch an exception we'll rollback this transaction and try again if we + // are not out of attempts. If we are out of attempts we will just throw the + // exception back out and let the developer handle an uncaught exceptions. + catch (Exception $e) { + $this->handleTransactionException( + $e, $currentAttempt, $attempts + ); + } catch (Throwable $e) { + $this->rollBack(); + + throw $e; + } + } + } + + /** + * Handle an exception encountered when running a transacted statement. + * + * @param \Exception $e + * @param int $currentAttempt + * @param int $maxAttempts + * @return void + * + * @throws \Exception + */ + protected function handleTransactionException($e, $currentAttempt, $maxAttempts) + { + // On a deadlock, MySQL rolls back the entire transaction so we can't just + // retry the query. We have to throw this exception all the way out and + // let the developer handle it in another way. We will decrement too. + if ($this->causedByDeadlock($e) && + $this->transactions > 1) { + --$this->transactions; + + throw $e; + } + + // If there was an exception we will rollback this transaction and then we + // can check if we have exceeded the maximum attempt count for this and + // if we haven't we will return and try this query again in our loop. + $this->rollBack(); + + if ($this->causedByDeadlock($e) && + $currentAttempt < $maxAttempts) { + return; + } + + throw $e; + } + + /** + * Start a new database transaction. + * + * @return void + * @throws \Exception + */ + public function beginTransaction() + { + $this->createTransaction(); + + ++$this->transactions; + + $this->fireConnectionEvent('beganTransaction'); + } + + /** + * Create a transaction within the database. + * + * @return void + */ + protected function createTransaction() + { + if ($this->transactions == 0) { + try { + $this->getPdo()->beginTransaction(); + } catch (Exception $e) { + $this->handleBeginTransactionException($e); + } + } elseif ($this->transactions >= 1 && $this->queryGrammar->supportsSavepoints()) { + $this->createSavepoint(); + } + } + + /** + * Create a save point within the database. + * + * @return void + */ + protected function createSavepoint() + { + $this->getPdo()->exec( + $this->queryGrammar->compileSavepoint('trans'.($this->transactions + 1)) + ); + } + + /** + * Handle an exception from a transaction beginning. + * + * @param \Exception $e + * @return void + * + * @throws \Exception + */ + protected function handleBeginTransactionException($e) + { + if ($this->causedByLostConnection($e)) { + $this->reconnect(); + + $this->pdo->beginTransaction(); + } else { + throw $e; + } + } + + /** + * Commit the active database transaction. + * + * @return void + */ + public function commit() + { + if ($this->transactions == 1) { + $this->getPdo()->commit(); + } + + $this->transactions = max(0, $this->transactions - 1); + + $this->fireConnectionEvent('committed'); + } + + /** + * Rollback the active database transaction. + * + * @param int|null $toLevel + * @return void + */ + public function rollBack($toLevel = null) + { + // We allow developers to rollback to a certain transaction level. We will verify + // that this given transaction level is valid before attempting to rollback to + // that level. If it's not we will just return out and not attempt anything. + $toLevel = is_null($toLevel) + ? $this->transactions - 1 + : $toLevel; + + if ($toLevel < 0 || $toLevel >= $this->transactions) { + return; + } + + // Next, we will actually perform this rollback within this database and fire the + // rollback event. We will also set the current transaction level to the given + // level that was passed into this method so it will be right from here out. + $this->performRollBack($toLevel); + + $this->transactions = $toLevel; + + $this->fireConnectionEvent('rollingBack'); + } + + /** + * Perform a rollback within the database. + * + * @param int $toLevel + * @return void + */ + protected function performRollBack($toLevel) + { + if ($toLevel == 0) { + $this->getPdo()->rollBack(); + } elseif ($this->queryGrammar->supportsSavepoints()) { + $this->getPdo()->exec( + $this->queryGrammar->compileSavepointRollBack('trans'.($toLevel + 1)) + ); + } + } + + /** + * Get the number of active transactions. + * + * @return int + */ + public function transactionLevel() + { + return $this->transactions; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Connection.php b/vendor/laravel/framework/src/Illuminate/Database/Connection.php new file mode 100755 index 0000000..0a55bb4 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Connection.php @@ -0,0 +1,1202 @@ +pdo = $pdo; + + // First we will setup the default properties. We keep track of the DB + // name we are connected to since it is needed when some reflective + // type commands are run such as checking whether a table exists. + $this->database = $database; + + $this->tablePrefix = $tablePrefix; + + $this->config = $config; + + // We need to initialize a query grammar and the query post processors + // which are both very important parts of the database abstractions + // so we initialize these to their default values while starting. + $this->useDefaultQueryGrammar(); + + $this->useDefaultPostProcessor(); + } + + /** + * Set the query grammar to the default implementation. + * + * @return void + */ + public function useDefaultQueryGrammar() + { + $this->queryGrammar = $this->getDefaultQueryGrammar(); + } + + /** + * Get the default query grammar instance. + * + * @return \Illuminate\Database\Query\Grammars\Grammar + */ + protected function getDefaultQueryGrammar() + { + return new QueryGrammar; + } + + /** + * Set the schema grammar to the default implementation. + * + * @return void + */ + public function useDefaultSchemaGrammar() + { + $this->schemaGrammar = $this->getDefaultSchemaGrammar(); + } + + /** + * Get the default schema grammar instance. + * + * @return \Illuminate\Database\Schema\Grammars\Grammar + */ + protected function getDefaultSchemaGrammar() + { + // + } + + /** + * Set the query post processor to the default implementation. + * + * @return void + */ + public function useDefaultPostProcessor() + { + $this->postProcessor = $this->getDefaultPostProcessor(); + } + + /** + * Get the default post processor instance. + * + * @return \Illuminate\Database\Query\Processors\Processor + */ + protected function getDefaultPostProcessor() + { + return new Processor; + } + + /** + * Get a schema builder instance for the connection. + * + * @return \Illuminate\Database\Schema\Builder + */ + public function getSchemaBuilder() + { + if (is_null($this->schemaGrammar)) { + $this->useDefaultSchemaGrammar(); + } + + return new SchemaBuilder($this); + } + + /** + * Begin a fluent query against a database table. + * + * @param string $table + * @return \Illuminate\Database\Query\Builder + */ + public function table($table) + { + return $this->query()->from($table); + } + + /** + * Get a new query builder instance. + * + * @return \Illuminate\Database\Query\Builder + */ + public function query() + { + return new QueryBuilder( + $this, $this->getQueryGrammar(), $this->getPostProcessor() + ); + } + + /** + * Run a select statement and return a single result. + * + * @param string $query + * @param array $bindings + * @param bool $useReadPdo + * @return mixed + */ + public function selectOne($query, $bindings = [], $useReadPdo = true) + { + $records = $this->select($query, $bindings, $useReadPdo); + + return array_shift($records); + } + + /** + * Run a select statement against the database. + * + * @param string $query + * @param array $bindings + * @return array + */ + public function selectFromWriteConnection($query, $bindings = []) + { + return $this->select($query, $bindings, false); + } + + /** + * Run a select statement against the database. + * + * @param string $query + * @param array $bindings + * @param bool $useReadPdo + * @return array + */ + public function select($query, $bindings = [], $useReadPdo = true) + { + return $this->run($query, $bindings, function ($query, $bindings) use ($useReadPdo) { + if ($this->pretending()) { + return []; + } + + // For select statements, we'll simply execute the query and return an array + // of the database result set. Each element in the array will be a single + // row from the database table, and will either be an array or objects. + $statement = $this->prepared($this->getPdoForSelect($useReadPdo) + ->prepare($query)); + + $this->bindValues($statement, $this->prepareBindings($bindings)); + + $statement->execute(); + + return $statement->fetchAll(); + }); + } + + /** + * Run a select statement against the database and returns a generator. + * + * @param string $query + * @param array $bindings + * @param bool $useReadPdo + * @return \Generator + */ + public function cursor($query, $bindings = [], $useReadPdo = true) + { + $statement = $this->run($query, $bindings, function ($query, $bindings) use ($useReadPdo) { + if ($this->pretending()) { + return []; + } + + // First we will create a statement for the query. Then, we will set the fetch + // mode and prepare the bindings for the query. Once that's done we will be + // ready to execute the query against the database and return the cursor. + $statement = $this->prepared($this->getPdoForSelect($useReadPdo) + ->prepare($query)); + + $this->bindValues( + $statement, $this->prepareBindings($bindings) + ); + + // Next, we'll execute the query against the database and return the statement + // so we can return the cursor. The cursor will use a PHP generator to give + // back one row at a time without using a bunch of memory to render them. + $statement->execute(); + + return $statement; + }); + + while ($record = $statement->fetch()) { + yield $record; + } + } + + /** + * Configure the PDO prepared statement. + * + * @param \PDOStatement $statement + * @return \PDOStatement + */ + protected function prepared(PDOStatement $statement) + { + $statement->setFetchMode($this->fetchMode); + + $this->event(new Events\StatementPrepared( + $this, $statement + )); + + return $statement; + } + + /** + * Get the PDO connection to use for a select query. + * + * @param bool $useReadPdo + * @return \PDO + */ + protected function getPdoForSelect($useReadPdo = true) + { + return $useReadPdo ? $this->getReadPdo() : $this->getPdo(); + } + + /** + * Run an insert statement against the database. + * + * @param string $query + * @param array $bindings + * @return bool + */ + public function insert($query, $bindings = []) + { + return $this->statement($query, $bindings); + } + + /** + * Run an update statement against the database. + * + * @param string $query + * @param array $bindings + * @return int + */ + public function update($query, $bindings = []) + { + return $this->affectingStatement($query, $bindings); + } + + /** + * Run a delete statement against the database. + * + * @param string $query + * @param array $bindings + * @return int + */ + public function delete($query, $bindings = []) + { + return $this->affectingStatement($query, $bindings); + } + + /** + * Execute an SQL statement and return the boolean result. + * + * @param string $query + * @param array $bindings + * @return bool + */ + public function statement($query, $bindings = []) + { + return $this->run($query, $bindings, function ($query, $bindings) { + if ($this->pretending()) { + return true; + } + + $statement = $this->getPdo()->prepare($query); + + $this->bindValues($statement, $this->prepareBindings($bindings)); + + return $statement->execute(); + }); + } + + /** + * Run an SQL statement and get the number of rows affected. + * + * @param string $query + * @param array $bindings + * @return int + */ + public function affectingStatement($query, $bindings = []) + { + return $this->run($query, $bindings, function ($query, $bindings) { + if ($this->pretending()) { + return 0; + } + + // For update or delete statements, we want to get the number of rows affected + // by the statement and return that back to the developer. We'll first need + // to execute the statement and then we'll use PDO to fetch the affected. + $statement = $this->getPdo()->prepare($query); + + $this->bindValues($statement, $this->prepareBindings($bindings)); + + $statement->execute(); + + return $statement->rowCount(); + }); + } + + /** + * Run a raw, unprepared query against the PDO connection. + * + * @param string $query + * @return bool + */ + public function unprepared($query) + { + return $this->run($query, [], function ($query) { + if ($this->pretending()) { + return true; + } + + return (bool) $this->getPdo()->exec($query); + }); + } + + /** + * Execute the given callback in "dry run" mode. + * + * @param \Closure $callback + * @return array + */ + public function pretend(Closure $callback) + { + return $this->withFreshQueryLog(function () use ($callback) { + $this->pretending = true; + + // Basically to make the database connection "pretend", we will just return + // the default values for all the query methods, then we will return an + // array of queries that were "executed" within the Closure callback. + $callback($this); + + $this->pretending = false; + + return $this->queryLog; + }); + } + + /** + * Execute the given callback in "dry run" mode. + * + * @param \Closure $callback + * @return array + */ + protected function withFreshQueryLog($callback) + { + $loggingQueries = $this->loggingQueries; + + // First we will back up the value of the logging queries property and then + // we'll be ready to run callbacks. This query log will also get cleared + // so we will have a new log of all the queries that are executed now. + $this->enableQueryLog(); + + $this->queryLog = []; + + // Now we'll execute this callback and capture the result. Once it has been + // executed we will restore the value of query logging and give back the + // value of hte callback so the original callers can have the results. + $result = $callback(); + + $this->loggingQueries = $loggingQueries; + + return $result; + } + + /** + * Bind values to their parameters in the given statement. + * + * @param \PDOStatement $statement + * @param array $bindings + * @return void + */ + public function bindValues($statement, $bindings) + { + foreach ($bindings as $key => $value) { + $statement->bindValue( + is_string($key) ? $key : $key + 1, $value, + is_int($value) ? PDO::PARAM_INT : PDO::PARAM_STR + ); + } + } + + /** + * Prepare the query bindings for execution. + * + * @param array $bindings + * @return array + */ + public function prepareBindings(array $bindings) + { + $grammar = $this->getQueryGrammar(); + + foreach ($bindings as $key => $value) { + // We need to transform all instances of DateTimeInterface into the actual + // date string. Each query grammar maintains its own date string format + // so we'll just ask the grammar for the format to get from the date. + if ($value instanceof DateTimeInterface) { + $bindings[$key] = $value->format($grammar->getDateFormat()); + } elseif ($value === false) { + $bindings[$key] = 0; + } + } + + return $bindings; + } + + /** + * Run a SQL statement and log its execution context. + * + * @param string $query + * @param array $bindings + * @param \Closure $callback + * @return mixed + * + * @throws \Illuminate\Database\QueryException + */ + protected function run($query, $bindings, Closure $callback) + { + $this->reconnectIfMissingConnection(); + + $start = microtime(true); + + // Here we will run this query. If an exception occurs we'll determine if it was + // caused by a connection that has been lost. If that is the cause, we'll try + // to re-establish connection and re-run the query with a fresh connection. + try { + $result = $this->runQueryCallback($query, $bindings, $callback); + } catch (QueryException $e) { + $result = $this->handleQueryException( + $e, $query, $bindings, $callback + ); + } + + // Once we have run the query we will calculate the time that it took to run and + // then log the query, bindings, and execution time so we will report them on + // the event that the developer needs them. We'll log time in milliseconds. + $this->logQuery( + $query, $bindings, $this->getElapsedTime($start) + ); + + return $result; + } + + /** + * Run a SQL statement. + * + * @param string $query + * @param array $bindings + * @param \Closure $callback + * @return mixed + * + * @throws \Illuminate\Database\QueryException + */ + protected function runQueryCallback($query, $bindings, Closure $callback) + { + // To execute the statement, we'll simply call the callback, which will actually + // run the SQL against the PDO connection. Then we can calculate the time it + // took to execute and log the query SQL, bindings and time in our memory. + try { + $result = $callback($query, $bindings); + } + + // If an exception occurs when attempting to run a query, we'll format the error + // message to include the bindings with SQL, which will make this exception a + // lot more helpful to the developer instead of just the database's errors. + catch (Exception $e) { + throw new QueryException( + $query, $this->prepareBindings($bindings), $e + ); + } + + return $result; + } + + /** + * Log a query in the connection's query log. + * + * @param string $query + * @param array $bindings + * @param float|null $time + * @return void + */ + public function logQuery($query, $bindings, $time = null) + { + $this->event(new QueryExecuted($query, $bindings, $time, $this)); + + if ($this->loggingQueries) { + $this->queryLog[] = compact('query', 'bindings', 'time'); + } + } + + /** + * Get the elapsed time since a given starting point. + * + * @param int $start + * @return float + */ + protected function getElapsedTime($start) + { + return round((microtime(true) - $start) * 1000, 2); + } + + /** + * Handle a query exception. + * + * @param \Exception $e + * @param string $query + * @param array $bindings + * @param \Closure $callback + * @return mixed + */ + protected function handleQueryException($e, $query, $bindings, Closure $callback) + { + if ($this->transactions >= 1) { + throw $e; + } + + return $this->tryAgainIfCausedByLostConnection( + $e, $query, $bindings, $callback + ); + } + + /** + * Handle a query exception that occurred during query execution. + * + * @param \Illuminate\Database\QueryException $e + * @param string $query + * @param array $bindings + * @param \Closure $callback + * @return mixed + * + * @throws \Illuminate\Database\QueryException + */ + protected function tryAgainIfCausedByLostConnection(QueryException $e, $query, $bindings, Closure $callback) + { + if ($this->causedByLostConnection($e->getPrevious())) { + $this->reconnect(); + + return $this->runQueryCallback($query, $bindings, $callback); + } + + throw $e; + } + + /** + * Reconnect to the database. + * + * @return void + * + * @throws \LogicException + */ + public function reconnect() + { + if (is_callable($this->reconnector)) { + return call_user_func($this->reconnector, $this); + } + + throw new LogicException('Lost connection and no reconnector available.'); + } + + /** + * Reconnect to the database if a PDO connection is missing. + * + * @return void + */ + protected function reconnectIfMissingConnection() + { + if (is_null($this->pdo)) { + $this->reconnect(); + } + } + + /** + * Disconnect from the underlying PDO connection. + * + * @return void + */ + public function disconnect() + { + $this->setPdo(null)->setReadPdo(null); + } + + /** + * Register a database query listener with the connection. + * + * @param \Closure $callback + * @return void + */ + public function listen(Closure $callback) + { + if (isset($this->events)) { + $this->events->listen(Events\QueryExecuted::class, $callback); + } + } + + /** + * Fire an event for this connection. + * + * @param string $event + * @return void + */ + protected function fireConnectionEvent($event) + { + if (! isset($this->events)) { + return; + } + + switch ($event) { + case 'beganTransaction': + return $this->events->dispatch(new Events\TransactionBeginning($this)); + case 'committed': + return $this->events->dispatch(new Events\TransactionCommitted($this)); + case 'rollingBack': + return $this->events->dispatch(new Events\TransactionRolledBack($this)); + } + } + + /** + * Fire the given event if possible. + * + * @param mixed $event + * @return void + */ + protected function event($event) + { + if (isset($this->events)) { + $this->events->dispatch($event); + } + } + + /** + * Get a new raw query expression. + * + * @param mixed $value + * @return \Illuminate\Database\Query\Expression + */ + public function raw($value) + { + return new Expression($value); + } + + /** + * Is Doctrine available? + * + * @return bool + */ + public function isDoctrineAvailable() + { + return class_exists('Doctrine\DBAL\Connection'); + } + + /** + * Get a Doctrine Schema Column instance. + * + * @param string $table + * @param string $column + * @return \Doctrine\DBAL\Schema\Column + */ + public function getDoctrineColumn($table, $column) + { + $schema = $this->getDoctrineSchemaManager(); + + return $schema->listTableDetails($table)->getColumn($column); + } + + /** + * Get the Doctrine DBAL schema manager for the connection. + * + * @return \Doctrine\DBAL\Schema\AbstractSchemaManager + */ + public function getDoctrineSchemaManager() + { + return $this->getDoctrineDriver()->getSchemaManager($this->getDoctrineConnection()); + } + + /** + * Get the Doctrine DBAL database connection instance. + * + * @return \Doctrine\DBAL\Connection + */ + public function getDoctrineConnection() + { + if (is_null($this->doctrineConnection)) { + $data = ['pdo' => $this->getPdo(), 'dbname' => $this->getConfig('database')]; + + $this->doctrineConnection = new DoctrineConnection( + $data, $this->getDoctrineDriver() + ); + } + + return $this->doctrineConnection; + } + + /** + * Get the current PDO connection. + * + * @return \PDO + */ + public function getPdo() + { + if ($this->pdo instanceof Closure) { + return $this->pdo = call_user_func($this->pdo); + } + + return $this->pdo; + } + + /** + * Get the current PDO connection used for reading. + * + * @return \PDO + */ + public function getReadPdo() + { + if ($this->transactions >= 1) { + return $this->getPdo(); + } + + if ($this->readPdo instanceof Closure) { + return $this->readPdo = call_user_func($this->readPdo); + } + + return $this->readPdo ?: $this->getPdo(); + } + + /** + * Set the PDO connection. + * + * @param \PDO|null $pdo + * @return $this + */ + public function setPdo($pdo) + { + $this->transactions = 0; + + $this->pdo = $pdo; + + return $this; + } + + /** + * Set the PDO connection used for reading. + * + * @param \PDO|null $pdo + * @return $this + */ + public function setReadPdo($pdo) + { + $this->readPdo = $pdo; + + return $this; + } + + /** + * Set the reconnect instance on the connection. + * + * @param callable $reconnector + * @return $this + */ + public function setReconnector(callable $reconnector) + { + $this->reconnector = $reconnector; + + return $this; + } + + /** + * Get the database connection name. + * + * @return string|null + */ + public function getName() + { + return $this->getConfig('name'); + } + + /** + * Get an option from the configuration options. + * + * @param string|null $option + * @return mixed + */ + public function getConfig($option = null) + { + return Arr::get($this->config, $option); + } + + /** + * Get the PDO driver name. + * + * @return string + */ + public function getDriverName() + { + return $this->getConfig('driver'); + } + + /** + * Get the query grammar used by the connection. + * + * @return \Illuminate\Database\Query\Grammars\Grammar + */ + public function getQueryGrammar() + { + return $this->queryGrammar; + } + + /** + * Set the query grammar used by the connection. + * + * @param \Illuminate\Database\Query\Grammars\Grammar $grammar + * @return void + */ + public function setQueryGrammar(Query\Grammars\Grammar $grammar) + { + $this->queryGrammar = $grammar; + } + + /** + * Get the schema grammar used by the connection. + * + * @return \Illuminate\Database\Schema\Grammars\Grammar + */ + public function getSchemaGrammar() + { + return $this->schemaGrammar; + } + + /** + * Set the schema grammar used by the connection. + * + * @param \Illuminate\Database\Schema\Grammars\Grammar $grammar + * @return void + */ + public function setSchemaGrammar(Schema\Grammars\Grammar $grammar) + { + $this->schemaGrammar = $grammar; + } + + /** + * Get the query post processor used by the connection. + * + * @return \Illuminate\Database\Query\Processors\Processor + */ + public function getPostProcessor() + { + return $this->postProcessor; + } + + /** + * Set the query post processor used by the connection. + * + * @param \Illuminate\Database\Query\Processors\Processor $processor + * @return void + */ + public function setPostProcessor(Processor $processor) + { + $this->postProcessor = $processor; + } + + /** + * Get the event dispatcher used by the connection. + * + * @return \Illuminate\Contracts\Events\Dispatcher + */ + public function getEventDispatcher() + { + return $this->events; + } + + /** + * Set the event dispatcher instance on the connection. + * + * @param \Illuminate\Contracts\Events\Dispatcher $events + * @return void + */ + public function setEventDispatcher(Dispatcher $events) + { + $this->events = $events; + } + + /** + * Determine if the connection in a "dry run". + * + * @return bool + */ + public function pretending() + { + return $this->pretending === true; + } + + /** + * Get the connection query log. + * + * @return array + */ + public function getQueryLog() + { + return $this->queryLog; + } + + /** + * Clear the query log. + * + * @return void + */ + public function flushQueryLog() + { + $this->queryLog = []; + } + + /** + * Enable the query log on the connection. + * + * @return void + */ + public function enableQueryLog() + { + $this->loggingQueries = true; + } + + /** + * Disable the query log on the connection. + * + * @return void + */ + public function disableQueryLog() + { + $this->loggingQueries = false; + } + + /** + * Determine whether we're logging queries. + * + * @return bool + */ + public function logging() + { + return $this->loggingQueries; + } + + /** + * Get the name of the connected database. + * + * @return string + */ + public function getDatabaseName() + { + return $this->database; + } + + /** + * Set the name of the connected database. + * + * @param string $database + * @return string + */ + public function setDatabaseName($database) + { + $this->database = $database; + } + + /** + * Get the table prefix for the connection. + * + * @return string + */ + public function getTablePrefix() + { + return $this->tablePrefix; + } + + /** + * Set the table prefix in use by the connection. + * + * @param string $prefix + * @return void + */ + public function setTablePrefix($prefix) + { + $this->tablePrefix = $prefix; + + $this->getQueryGrammar()->setTablePrefix($prefix); + } + + /** + * Set the table prefix and return the grammar. + * + * @param \Illuminate\Database\Grammar $grammar + * @return \Illuminate\Database\Grammar + */ + public function withTablePrefix(Grammar $grammar) + { + $grammar->setTablePrefix($this->tablePrefix); + + return $grammar; + } + + /** + * Register a connection resolver. + * + * @param string $driver + * @param \Closure $callback + * @return void + */ + public static function resolverFor($driver, Closure $callback) + { + static::$resolvers[$driver] = $callback; + } + + /** + * Get the connection resolver for the given driver. + * + * @param string $driver + * @return mixed + */ + public static function getResolver($driver) + { + return isset(static::$resolvers[$driver]) ? + static::$resolvers[$driver] : null; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/ConnectionInterface.php b/vendor/laravel/framework/src/Illuminate/Database/ConnectionInterface.php new file mode 100755 index 0000000..9262d6f --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/ConnectionInterface.php @@ -0,0 +1,150 @@ + $connection) { + $this->addConnection($name, $connection); + } + } + + /** + * Get a database connection instance. + * + * @param string $name + * @return \Illuminate\Database\ConnectionInterface + */ + public function connection($name = null) + { + if (is_null($name)) { + $name = $this->getDefaultConnection(); + } + + return $this->connections[$name]; + } + + /** + * Add a connection to the resolver. + * + * @param string $name + * @param \Illuminate\Database\ConnectionInterface $connection + * @return void + */ + public function addConnection($name, ConnectionInterface $connection) + { + $this->connections[$name] = $connection; + } + + /** + * Check if a connection has been registered. + * + * @param string $name + * @return bool + */ + public function hasConnection($name) + { + return isset($this->connections[$name]); + } + + /** + * Get the default connection name. + * + * @return string + */ + public function getDefaultConnection() + { + return $this->default; + } + + /** + * Set the default connection name. + * + * @param string $name + * @return void + */ + public function setDefaultConnection($name) + { + $this->default = $name; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/ConnectionResolverInterface.php b/vendor/laravel/framework/src/Illuminate/Database/ConnectionResolverInterface.php new file mode 100755 index 0000000..eb0397a --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/ConnectionResolverInterface.php @@ -0,0 +1,29 @@ +container = $container; + } + + /** + * Establish a PDO connection based on the configuration. + * + * @param array $config + * @param string $name + * @return \Illuminate\Database\Connection + */ + public function make(array $config, $name = null) + { + $config = $this->parseConfig($config, $name); + + if (isset($config['read'])) { + return $this->createReadWriteConnection($config); + } + + return $this->createSingleConnection($config); + } + + /** + * Parse and prepare the database configuration. + * + * @param array $config + * @param string $name + * @return array + */ + protected function parseConfig(array $config, $name) + { + return Arr::add(Arr::add($config, 'prefix', ''), 'name', $name); + } + + /** + * Create a single database connection instance. + * + * @param array $config + * @return \Illuminate\Database\Connection + */ + protected function createSingleConnection(array $config) + { + $pdo = $this->createPdoResolver($config); + + return $this->createConnection( + $config['driver'], $pdo, $config['database'], $config['prefix'], $config + ); + } + + /** + * Create a single database connection instance. + * + * @param array $config + * @return \Illuminate\Database\Connection + */ + protected function createReadWriteConnection(array $config) + { + $connection = $this->createSingleConnection($this->getWriteConfig($config)); + + return $connection->setReadPdo($this->createReadPdo($config)); + } + + /** + * Create a new PDO instance for reading. + * + * @param array $config + * @return \Closure + */ + protected function createReadPdo(array $config) + { + return $this->createPdoResolver($this->getReadConfig($config)); + } + + /** + * Get the read configuration for a read / write connection. + * + * @param array $config + * @return array + */ + protected function getReadConfig(array $config) + { + return $this->mergeReadWriteConfig( + $config, $this->getReadWriteConfig($config, 'read') + ); + } + + /** + * Get the read configuration for a read / write connection. + * + * @param array $config + * @return array + */ + protected function getWriteConfig(array $config) + { + return $this->mergeReadWriteConfig( + $config, $this->getReadWriteConfig($config, 'write') + ); + } + + /** + * Get a read / write level configuration. + * + * @param array $config + * @param string $type + * @return array + */ + protected function getReadWriteConfig(array $config, $type) + { + return isset($config[$type][0]) + ? $config[$type][array_rand($config[$type])] + : $config[$type]; + } + + /** + * Merge a configuration for a read / write connection. + * + * @param array $config + * @param array $merge + * @return array + */ + protected function mergeReadWriteConfig(array $config, array $merge) + { + return Arr::except(array_merge($config, $merge), ['read', 'write']); + } + + /** + * Create a new Closure that resolves to a PDO instance. + * + * @param array $config + * @return \Closure + */ + protected function createPdoResolver(array $config) + { + return array_key_exists('host', $config) + ? $this->createPdoResolverWithHosts($config) + : $this->createPdoResolverWithoutHosts($config); + } + + /** + * Create a new Closure that resolves to a PDO instance with a specific host or an array of hosts. + * + * @param array $config + * @return \Closure + */ + protected function createPdoResolverWithHosts(array $config) + { + return function () use ($config) { + foreach (Arr::shuffle($hosts = $this->parseHosts($config)) as $key => $host) { + $config['host'] = $host; + + try { + return $this->createConnector($config)->connect($config); + } catch (PDOException $e) { + if (count($hosts) - 1 === $key && $this->container->bound(ExceptionHandler::class)) { + $this->container->make(ExceptionHandler::class)->report($e); + } + } + } + + throw $e; + }; + } + + /** + * Parse the hosts configuration item into an array. + * + * @param array $config + * @return array + */ + protected function parseHosts(array $config) + { + $hosts = array_wrap($config['host']); + + if (empty($hosts)) { + throw new InvalidArgumentException('Database hosts array is empty.'); + } + + return $hosts; + } + + /** + * Create a new Closure that resolves to a PDO instance where there is no configured host. + * + * @param array $config + * @return \Closure + */ + protected function createPdoResolverWithoutHosts(array $config) + { + return function () use ($config) { + return $this->createConnector($config)->connect($config); + }; + } + + /** + * Create a connector instance based on the configuration. + * + * @param array $config + * @return \Illuminate\Database\Connectors\ConnectorInterface + * + * @throws \InvalidArgumentException + */ + public function createConnector(array $config) + { + if (! isset($config['driver'])) { + throw new InvalidArgumentException('A driver must be specified.'); + } + + if ($this->container->bound($key = "db.connector.{$config['driver']}")) { + return $this->container->make($key); + } + + switch ($config['driver']) { + case 'mysql': + return new MySqlConnector; + case 'pgsql': + return new PostgresConnector; + case 'sqlite': + return new SQLiteConnector; + case 'sqlsrv': + return new SqlServerConnector; + } + + throw new InvalidArgumentException("Unsupported driver [{$config['driver']}]"); + } + + /** + * Create a new connection instance. + * + * @param string $driver + * @param \PDO|\Closure $connection + * @param string $database + * @param string $prefix + * @param array $config + * @return \Illuminate\Database\Connection + * + * @throws \InvalidArgumentException + */ + protected function createConnection($driver, $connection, $database, $prefix = '', array $config = []) + { + if ($resolver = Connection::getResolver($driver)) { + return $resolver($connection, $database, $prefix, $config); + } + + switch ($driver) { + case 'mysql': + return new MySqlConnection($connection, $database, $prefix, $config); + case 'pgsql': + return new PostgresConnection($connection, $database, $prefix, $config); + case 'sqlite': + return new SQLiteConnection($connection, $database, $prefix, $config); + case 'sqlsrv': + return new SqlServerConnection($connection, $database, $prefix, $config); + } + + throw new InvalidArgumentException("Unsupported driver [$driver]"); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php b/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php new file mode 100755 index 0000000..a56fe95 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php @@ -0,0 +1,137 @@ + PDO::CASE_NATURAL, + PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, + PDO::ATTR_ORACLE_NULLS => PDO::NULL_NATURAL, + PDO::ATTR_STRINGIFY_FETCHES => false, + PDO::ATTR_EMULATE_PREPARES => false, + ]; + + /** + * Create a new PDO connection. + * + * @param string $dsn + * @param array $config + * @param array $options + * @return \PDO + */ + public function createConnection($dsn, array $config, array $options) + { + list($username, $password) = [ + Arr::get($config, 'username'), Arr::get($config, 'password'), + ]; + + try { + return $this->createPdoConnection( + $dsn, $username, $password, $options + ); + } catch (Exception $e) { + return $this->tryAgainIfCausedByLostConnection( + $e, $dsn, $username, $password, $options + ); + } + } + + /** + * Create a new PDO connection instance. + * + * @param string $dsn + * @param string $username + * @param string $password + * @param array $options + * @return \PDO + */ + protected function createPdoConnection($dsn, $username, $password, $options) + { + if (class_exists(PDOConnection::class) && ! $this->isPersistentConnection($options)) { + return new PDOConnection($dsn, $username, $password, $options); + } + + return new PDO($dsn, $username, $password, $options); + } + + /** + * Determine if the connection is persistent. + * + * @param array $options + * @return bool + */ + protected function isPersistentConnection($options) + { + return isset($options[PDO::ATTR_PERSISTENT]) && + $options[PDO::ATTR_PERSISTENT]; + } + + /** + * Handle an exception that occurred during connect execution. + * + * @param \Exception $e + * @param string $dsn + * @param string $username + * @param string $password + * @param array $options + * @return \PDO + * + * @throws \Exception + */ + protected function tryAgainIfCausedByLostConnection(Exception $e, $dsn, $username, $password, $options) + { + if ($this->causedByLostConnection($e)) { + return $this->createPdoConnection($dsn, $username, $password, $options); + } + + throw $e; + } + + /** + * Get the PDO options based on the configuration. + * + * @param array $config + * @return array + */ + public function getOptions(array $config) + { + $options = Arr::get($config, 'options', []); + + return array_diff_key($this->options, $options) + $options; + } + + /** + * Get the default PDO connection options. + * + * @return array + */ + public function getDefaultOptions() + { + return $this->options; + } + + /** + * Set the default PDO connection options. + * + * @param array $options + * @return void + */ + public function setDefaultOptions(array $options) + { + $this->options = $options; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectorInterface.php b/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectorInterface.php new file mode 100755 index 0000000..08597ac --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectorInterface.php @@ -0,0 +1,14 @@ +getDsn($config); + + $options = $this->getOptions($config); + + // We need to grab the PDO options that should be used while making the brand + // new connection instance. The PDO options control various aspects of the + // connection's behavior, and some might be specified by the developers. + $connection = $this->createConnection($dsn, $config, $options); + + if (! empty($config['database'])) { + $connection->exec("use `{$config['database']}`;"); + } + + $this->configureEncoding($connection, $config); + + // Next, we will check to see if a timezone has been specified in this config + // and if it has we will issue a statement to modify the timezone with the + // database. Setting this DB timezone is an optional configuration item. + $this->configureTimezone($connection, $config); + + $this->setModes($connection, $config); + + return $connection; + } + + /** + * Set the connection character set and collation. + * + * @param \PDO $connection + * @param array $config + * @return void + */ + protected function configureEncoding($connection, array $config) + { + if (! isset($config['charset'])) { + return $connection; + } + + $connection->prepare( + "set names '{$config['charset']}'".$this->getCollation($config) + )->execute(); + } + + /** + * Get the collation for the configuration. + * + * @param array $config + * @return string + */ + protected function getCollation(array $config) + { + return ! is_null($config['collation']) ? " collate '{$config['collation']}'" : ''; + } + + /** + * Set the timezone on the connection. + * + * @param \PDO $connection + * @param array $config + * @return void + */ + protected function configureTimezone($connection, array $config) + { + if (isset($config['timezone'])) { + $connection->prepare('set time_zone="'.$config['timezone'].'"')->execute(); + } + } + + /** + * Create a DSN string from a configuration. + * + * Chooses socket or host/port based on the 'unix_socket' config value. + * + * @param array $config + * @return string + */ + protected function getDsn(array $config) + { + return $this->hasSocket($config) + ? $this->getSocketDsn($config) + : $this->getHostDsn($config); + } + + /** + * Determine if the given configuration array has a UNIX socket value. + * + * @param array $config + * @return bool + */ + protected function hasSocket(array $config) + { + return isset($config['unix_socket']) && ! empty($config['unix_socket']); + } + + /** + * Get the DSN string for a socket configuration. + * + * @param array $config + * @return string + */ + protected function getSocketDsn(array $config) + { + return "mysql:unix_socket={$config['unix_socket']};dbname={$config['database']}"; + } + + /** + * Get the DSN string for a host / port configuration. + * + * @param array $config + * @return string + */ + protected function getHostDsn(array $config) + { + extract($config, EXTR_SKIP); + + return isset($port) + ? "mysql:host={$host};port={$port};dbname={$database}" + : "mysql:host={$host};dbname={$database}"; + } + + /** + * Set the modes for the connection. + * + * @param \PDO $connection + * @param array $config + * @return void + */ + protected function setModes(PDO $connection, array $config) + { + if (isset($config['modes'])) { + $this->setCustomModes($connection, $config); + } elseif (isset($config['strict'])) { + if ($config['strict']) { + $connection->prepare($this->strictMode())->execute(); + } else { + $connection->prepare("set session sql_mode='NO_ENGINE_SUBSTITUTION'")->execute(); + } + } + } + + /** + * Set the custom modes on the connection. + * + * @param \PDO $connection + * @param array $config + * @return void + */ + protected function setCustomModes(PDO $connection, array $config) + { + $modes = implode(',', $config['modes']); + + $connection->prepare("set session sql_mode='{$modes}'")->execute(); + } + + /** + * Get the query to enable strict mode. + * + * @return string + */ + protected function strictMode() + { + return "set session sql_mode='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'"; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Connectors/PostgresConnector.php b/vendor/laravel/framework/src/Illuminate/Database/Connectors/PostgresConnector.php new file mode 100755 index 0000000..0581b8b --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Connectors/PostgresConnector.php @@ -0,0 +1,174 @@ + PDO::CASE_NATURAL, + PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, + PDO::ATTR_ORACLE_NULLS => PDO::NULL_NATURAL, + PDO::ATTR_STRINGIFY_FETCHES => false, + ]; + + /** + * Establish a database connection. + * + * @param array $config + * @return \PDO + */ + public function connect(array $config) + { + // First we'll create the basic DSN and connection instance connecting to the + // using the configuration option specified by the developer. We will also + // set the default character set on the connections to UTF-8 by default. + $connection = $this->createConnection( + $this->getDsn($config), $config, $this->getOptions($config) + ); + + $this->configureEncoding($connection, $config); + + // Next, we will check to see if a timezone has been specified in this config + // and if it has we will issue a statement to modify the timezone with the + // database. Setting this DB timezone is an optional configuration item. + $this->configureTimezone($connection, $config); + + $this->configureSchema($connection, $config); + + // Postgres allows an application_name to be set by the user and this name is + // used to when monitoring the application with pg_stat_activity. So we'll + // determine if the option has been specified and run a statement if so. + $this->configureApplicationName($connection, $config); + + return $connection; + } + + /** + * Set the connection character set and collation. + * + * @param \PDO $connection + * @param array $config + * @return void + */ + protected function configureEncoding($connection, $config) + { + $charset = $config['charset']; + + $connection->prepare("set names '$charset'")->execute(); + } + + /** + * Set the timezone on the connection. + * + * @param \PDO $connection + * @param array $config + * @return void + */ + protected function configureTimezone($connection, array $config) + { + if (isset($config['timezone'])) { + $timezone = $config['timezone']; + + $connection->prepare("set time zone '{$timezone}'")->execute(); + } + } + + /** + * Set the schema on the connection. + * + * @param \PDO $connection + * @param array $config + * @return void + */ + protected function configureSchema($connection, $config) + { + if (isset($config['schema'])) { + $schema = $this->formatSchema($config['schema']); + + $connection->prepare("set search_path to {$schema}")->execute(); + } + } + + /** + * Format the schema for the DSN. + * + * @param array|string $schema + * @return string + */ + protected function formatSchema($schema) + { + if (is_array($schema)) { + return '"'.implode('", "', $schema).'"'; + } else { + return '"'.$schema.'"'; + } + } + + /** + * Set the schema on the connection. + * + * @param \PDO $connection + * @param array $config + * @return void + */ + protected function configureApplicationName($connection, $config) + { + if (isset($config['application_name'])) { + $applicationName = $config['application_name']; + + $connection->prepare("set application_name to '$applicationName'")->execute(); + } + } + + /** + * Create a DSN string from a configuration. + * + * @param array $config + * @return string + */ + protected function getDsn(array $config) + { + // First we will create the basic DSN setup as well as the port if it is in + // in the configuration options. This will give us the basic DSN we will + // need to establish the PDO connections and return them back for use. + extract($config, EXTR_SKIP); + + $host = isset($host) ? "host={$host};" : ''; + + $dsn = "pgsql:{$host}dbname={$database}"; + + // If a port was specified, we will add it to this Postgres DSN connections + // format. Once we have done that we are ready to return this connection + // string back out for usage, as this has been fully constructed here. + if (isset($config['port'])) { + $dsn .= ";port={$port}"; + } + + return $this->addSslOptions($dsn, $config); + } + + /** + * Add the SSL options to the DSN. + * + * @param string $dsn + * @param array $config + * @return string + */ + protected function addSslOptions($dsn, array $config) + { + foreach (['sslmode', 'sslcert', 'sslkey', 'sslrootcert'] as $option) { + if (isset($config[$option])) { + $dsn .= ";{$option}={$config[$option]}"; + } + } + + return $dsn; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Connectors/SQLiteConnector.php b/vendor/laravel/framework/src/Illuminate/Database/Connectors/SQLiteConnector.php new file mode 100755 index 0000000..28f9091 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Connectors/SQLiteConnector.php @@ -0,0 +1,39 @@ +getOptions($config); + + // SQLite supports "in-memory" databases that only last as long as the owning + // connection does. These are useful for tests or for short lifetime store + // querying. In-memory databases may only have a single open connection. + if ($config['database'] == ':memory:') { + return $this->createConnection('sqlite::memory:', $config, $options); + } + + $path = realpath($config['database']); + + // Here we'll verify that the SQLite database exists before going any further + // as the developer probably wants to know if the database exists and this + // SQLite driver will not throw any exception if it does not by default. + if ($path === false) { + throw new InvalidArgumentException("Database (${config['database']}) does not exist."); + } + + return $this->createConnection("sqlite:{$path}", $config, $options); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Connectors/SqlServerConnector.php b/vendor/laravel/framework/src/Illuminate/Database/Connectors/SqlServerConnector.php new file mode 100755 index 0000000..a1b8447 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Connectors/SqlServerConnector.php @@ -0,0 +1,171 @@ + PDO::CASE_NATURAL, + PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, + PDO::ATTR_ORACLE_NULLS => PDO::NULL_NATURAL, + PDO::ATTR_STRINGIFY_FETCHES => false, + ]; + + /** + * Establish a database connection. + * + * @param array $config + * @return \PDO + */ + public function connect(array $config) + { + $options = $this->getOptions($config); + + return $this->createConnection($this->getDsn($config), $config, $options); + } + + /** + * Create a DSN string from a configuration. + * + * @param array $config + * @return string + */ + protected function getDsn(array $config) + { + // First we will create the basic DSN setup as well as the port if it is in + // in the configuration options. This will give us the basic DSN we will + // need to establish the PDO connections and return them back for use. + if (in_array('dblib', $this->getAvailableDrivers())) { + return $this->getDblibDsn($config); + } elseif ($this->prefersOdbc($config)) { + return $this->getOdbcDsn($config); + } else { + return $this->getSqlSrvDsn($config); + } + } + + /** + * Determine if the database configuration prefers ODBC. + * + * @param array $config + * @return bool + */ + protected function prefersOdbc(array $config) + { + return in_array('odbc', $this->getAvailableDrivers()) && + array_get($config, 'odbc') === true; + } + + /** + * Get the DSN string for a DbLib connection. + * + * @param array $config + * @return string + */ + protected function getDblibDsn(array $config) + { + return $this->buildConnectString('dblib', array_merge([ + 'host' => $this->buildHostString($config, ':'), + 'dbname' => $config['database'], + ], Arr::only($config, ['appname', 'charset']))); + } + + /** + * Get the DSN string for an ODBC connection. + * + * @param array $config + * @return string + */ + protected function getOdbcDsn(array $config) + { + return isset($config['odbc_datasource_name']) + ? 'odbc:'.$config['odbc_datasource_name'] : ''; + } + + /** + * Get the DSN string for a SqlSrv connection. + * + * @param array $config + * @return string + */ + protected function getSqlSrvDsn(array $config) + { + $arguments = [ + 'Server' => $this->buildHostString($config, ','), + ]; + + if (isset($config['database'])) { + $arguments['Database'] = $config['database']; + } + + if (isset($config['readonly'])) { + $arguments['ApplicationIntent'] = 'ReadOnly'; + } + + if (isset($config['pooling']) && $config['pooling'] === false) { + $arguments['ConnectionPooling'] = '0'; + } + + if (isset($config['appname'])) { + $arguments['APP'] = $config['appname']; + } + + if (isset($config['encrypt'])) { + $arguments['Encrypt'] = $config['encrypt']; + } + + if (isset($config['trust_server_certificate'])) { + $arguments['TrustServerCertificate'] = $config['trust_server_certificate']; + } + + return $this->buildConnectString('sqlsrv', $arguments); + } + + /** + * Build a connection string from the given arguments. + * + * @param string $driver + * @param array $arguments + * @return string + */ + protected function buildConnectString($driver, array $arguments) + { + return $driver.':'.implode(';', array_map(function ($key) use ($arguments) { + return sprintf('%s=%s', $key, $arguments[$key]); + }, array_keys($arguments))); + } + + /** + * Build a host string from the given configuration. + * + * @param array $config + * @param string $separator + * @return string + */ + protected function buildHostString(array $config, $separator) + { + if (isset($config['port']) && ! empty($config['port'])) { + return $config['host'].$separator.$config['port']; + } else { + return $config['host']; + } + } + + /** + * Get the available PDO drivers. + * + * @return array + */ + protected function getAvailableDrivers() + { + return PDO::getAvailableDrivers(); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/BaseCommand.php b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/BaseCommand.php new file mode 100755 index 0000000..81ca3cc --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/BaseCommand.php @@ -0,0 +1,39 @@ +input->hasOption('path') && $this->option('path')) { + return collect($this->option('path'))->map(function ($path) { + return $this->laravel->basePath().'/'.$path; + })->all(); + } + + return array_merge( + [$this->getMigrationPath()], $this->migrator->paths() + ); + } + + /** + * Get the path to the migration directory. + * + * @return string + */ + protected function getMigrationPath() + { + return $this->laravel->databasePath().DIRECTORY_SEPARATOR.'migrations'; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/InstallCommand.php b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/InstallCommand.php new file mode 100755 index 0000000..103dcaa --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/InstallCommand.php @@ -0,0 +1,70 @@ +repository = $repository; + } + + /** + * Execute the console command. + * + * @return void + */ + public function fire() + { + $this->repository->setSource($this->input->getOption('database')); + + $this->repository->createRepository(); + + $this->info('Migration table created successfully.'); + } + + /** + * Get the console command options. + * + * @return array + */ + protected function getOptions() + { + return [ + ['database', null, InputOption::VALUE_OPTIONAL, 'The database connection to use.'], + ]; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php new file mode 100755 index 0000000..092a7d2 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php @@ -0,0 +1,102 @@ +migrator = $migrator; + } + + /** + * Execute the console command. + * + * @return void + */ + public function fire() + { + if (! $this->confirmToProceed()) { + return; + } + + $this->prepareDatabase(); + + // Next, we will check to see if a path option has been defined. If it has + // we will use the path relative to the root of this installation folder + // so that migrations may be run for any path within the applications. + $this->migrator->run($this->getMigrationPaths(), [ + 'pretend' => $this->option('pretend'), + 'step' => $this->option('step'), + ]); + + // Once the migrator has run we will grab the note output and send it out to + // the console screen, since the migrator itself functions without having + // any instances of the OutputInterface contract passed into the class. + foreach ($this->migrator->getNotes() as $note) { + $this->output->writeln($note); + } + + // Finally, if the "seed" option has been given, we will re-run the database + // seed task to re-populate the database, which is convenient when adding + // a migration and a seed at the same time, as it is only this command. + if ($this->option('seed')) { + $this->call('db:seed', ['--force' => true]); + } + } + + /** + * Prepare the migration database for running. + * + * @return void + */ + protected function prepareDatabase() + { + $this->migrator->setConnection($this->option('database')); + + if (! $this->migrator->repositoryExists()) { + $this->call( + 'migrate:install', ['--database' => $this->option('database')] + ); + } + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateMakeCommand.php new file mode 100644 index 0000000..fa2024a --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateMakeCommand.php @@ -0,0 +1,119 @@ +creator = $creator; + $this->composer = $composer; + } + + /** + * Execute the console command. + * + * @return void + */ + public function fire() + { + // It's possible for the developer to specify the tables to modify in this + // schema operation. The developer may also specify if this table needs + // to be freshly created so we can create the appropriate migrations. + $name = trim($this->input->getArgument('name')); + + $table = $this->input->getOption('table'); + + $create = $this->input->getOption('create') ?: false; + + // If no table was given as an option but a create option is given then we + // will use the "create" option as the table name. This allows the devs + // to pass a table name into this option as a short-cut for creating. + if (! $table && is_string($create)) { + $table = $create; + + $create = true; + } + + // Now we are ready to write the migration out to disk. Once we've written + // the migration out, we will dump-autoload for the entire framework to + // make sure that the migrations are registered by the class loaders. + $this->writeMigration($name, $table, $create); + + $this->composer->dumpAutoloads(); + } + + /** + * Write the migration file to disk. + * + * @param string $name + * @param string $table + * @param bool $create + * @return string + */ + protected function writeMigration($name, $table, $create) + { + $file = pathinfo($this->creator->create( + $name, $this->getMigrationPath(), $table, $create + ), PATHINFO_FILENAME); + + $this->line("Created Migration: {$file}"); + } + + /** + * Get migration path (either specified by '--path' option or default location). + * + * @return string + */ + protected function getMigrationPath() + { + if (! is_null($targetPath = $this->input->getOption('path'))) { + return $this->laravel->basePath().'/'.$targetPath; + } + + return parent::getMigrationPath(); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/RefreshCommand.php b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/RefreshCommand.php new file mode 100755 index 0000000..4d2772b --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/RefreshCommand.php @@ -0,0 +1,154 @@ +confirmToProceed()) { + return; + } + + // Next we'll gather some of the options so that we can have the right options + // to pass to the commands. This includes options such as which database to + // use and the path to use for the migration. Then we'll run the command. + $database = $this->input->getOption('database'); + + $path = $this->input->getOption('path'); + + $force = $this->input->getOption('force'); + + // If the "step" option is specified it means we only want to rollback a small + // number of migrations before migrating again. For example, the user might + // only rollback and remigrate the latest four migrations instead of all. + $step = $this->input->getOption('step') ?: 0; + + if ($step > 0) { + $this->runRollback($database, $path, $step, $force); + } else { + $this->runReset($database, $path, $force); + } + + // The refresh command is essentially just a brief aggregate of a few other of + // the migration commands and just provides a convenient wrapper to execute + // them in succession. We'll also see if we need to re-seed the database. + $this->call('migrate', [ + '--database' => $database, + '--path' => $path, + '--force' => $force, + ]); + + if ($this->needsSeeding()) { + $this->runSeeder($database); + } + } + + /** + * Run the rollback command. + * + * @param string $database + * @param string $path + * @param bool $step + * @param bool $force + * @return void + */ + protected function runRollback($database, $path, $step, $force) + { + $this->call('migrate:rollback', [ + '--database' => $database, + '--path' => $path, + '--step' => $step, + '--force' => $force, + ]); + } + + /** + * Run the reset command. + * + * @param string $database + * @param string $path + * @param bool $force + * @return void + */ + protected function runReset($database, $path, $force) + { + $this->call('migrate:reset', [ + '--database' => $database, + '--path' => $path, + '--force' => $force, + ]); + } + + /** + * Determine if the developer has requested database seeding. + * + * @return bool + */ + protected function needsSeeding() + { + return $this->option('seed') || $this->option('seeder'); + } + + /** + * Run the database seeder command. + * + * @param string $database + * @return void + */ + protected function runSeeder($database) + { + $this->call('db:seed', [ + '--database' => $database, + '--class' => $this->option('seeder') ?: 'DatabaseSeeder', + '--force' => $this->option('force'), + ]); + } + + /** + * Get the console command options. + * + * @return array + */ + protected function getOptions() + { + return [ + ['database', null, InputOption::VALUE_OPTIONAL, 'The database connection to use.'], + + ['force', null, InputOption::VALUE_NONE, 'Force the operation to run when in production.'], + + ['path', null, InputOption::VALUE_OPTIONAL, 'The path of migrations files to be executed.'], + + ['seed', null, InputOption::VALUE_NONE, 'Indicates if the seed task should be re-run.'], + + ['seeder', null, InputOption::VALUE_OPTIONAL, 'The class name of the root seeder.'], + + ['step', null, InputOption::VALUE_OPTIONAL, 'The number of migrations to be reverted & re-run.'], + ]; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/ResetCommand.php b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/ResetCommand.php new file mode 100755 index 0000000..3b8dab3 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/ResetCommand.php @@ -0,0 +1,96 @@ +migrator = $migrator; + } + + /** + * Execute the console command. + * + * @return void + */ + public function fire() + { + if (! $this->confirmToProceed()) { + return; + } + + $this->migrator->setConnection($this->option('database')); + + // First, we'll make sure that the migration table actually exists before we + // start trying to rollback and re-run all of the migrations. If it's not + // present we'll just bail out with an info message for the developers. + if (! $this->migrator->repositoryExists()) { + return $this->comment('Migration table not found.'); + } + + $this->migrator->reset( + $this->getMigrationPaths(), $this->option('pretend') + ); + + // Once the migrator has run we will grab the note output and send it out to + // the console screen, since the migrator itself functions without having + // any instances of the OutputInterface contract passed into the class. + foreach ($this->migrator->getNotes() as $note) { + $this->output->writeln($note); + } + } + + /** + * Get the console command options. + * + * @return array + */ + protected function getOptions() + { + return [ + ['database', null, InputOption::VALUE_OPTIONAL, 'The database connection to use.'], + + ['force', null, InputOption::VALUE_NONE, 'Force the operation to run when in production.'], + + ['path', null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, 'The path(s) of migrations files to be executed.'], + + ['pretend', null, InputOption::VALUE_NONE, 'Dump the SQL queries that would be run.'], + ]; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/RollbackCommand.php b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/RollbackCommand.php new file mode 100755 index 0000000..4b1a75f --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/RollbackCommand.php @@ -0,0 +1,94 @@ +migrator = $migrator; + } + + /** + * Execute the console command. + * + * @return void + */ + public function fire() + { + if (! $this->confirmToProceed()) { + return; + } + + $this->migrator->setConnection($this->option('database')); + + $this->migrator->rollback( + $this->getMigrationPaths(), [ + 'pretend' => $this->option('pretend'), + 'step' => (int) $this->option('step'), + ] + ); + + // Once the migrator has run we will grab the note output and send it out to + // the console screen, since the migrator itself functions without having + // any instances of the OutputInterface contract passed into the class. + foreach ($this->migrator->getNotes() as $note) { + $this->output->writeln($note); + } + } + + /** + * Get the console command options. + * + * @return array + */ + protected function getOptions() + { + return [ + ['database', null, InputOption::VALUE_OPTIONAL, 'The database connection to use.'], + + ['force', null, InputOption::VALUE_NONE, 'Force the operation to run when in production.'], + + ['path', null, InputOption::VALUE_OPTIONAL, 'The path of migrations files to be executed.'], + + ['pretend', null, InputOption::VALUE_NONE, 'Dump the SQL queries that would be run.'], + + ['step', null, InputOption::VALUE_OPTIONAL, 'The number of migrations to be reverted.'], + ]; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/StatusCommand.php b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/StatusCommand.php new file mode 100644 index 0000000..34b98f2 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/StatusCommand.php @@ -0,0 +1,108 @@ +migrator = $migrator; + } + + /** + * Execute the console command. + * + * @return void + */ + public function fire() + { + $this->migrator->setConnection($this->option('database')); + + if (! $this->migrator->repositoryExists()) { + return $this->error('No migrations found.'); + } + + $ran = $this->migrator->getRepository()->getRan(); + + if (count($migrations = $this->getStatusFor($ran)) > 0) { + $this->table(['Ran?', 'Migration'], $migrations); + } else { + $this->error('No migrations found'); + } + } + + /** + * Get the status for the given ran migrations. + * + * @param array $ran + * @return \Illuminate\Support\Collection + */ + protected function getStatusFor(array $ran) + { + return Collection::make($this->getAllMigrationFiles()) + ->map(function ($migration) use ($ran) { + $migrationName = $this->migrator->getMigrationName($migration); + + return in_array($migrationName, $ran) + ? ['Y', $migrationName] + : ['N', $migrationName]; + }); + } + + /** + * Get an array of all of the migration files. + * + * @return array + */ + protected function getAllMigrationFiles() + { + return $this->migrator->getMigrationFiles($this->getMigrationPaths()); + } + + /** + * Get the console command options. + * + * @return array + */ + protected function getOptions() + { + return [ + ['database', null, InputOption::VALUE_OPTIONAL, 'The database connection to use.'], + + ['path', null, InputOption::VALUE_OPTIONAL, 'The path of migrations files to use.'], + ]; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/Seeds/SeedCommand.php b/vendor/laravel/framework/src/Illuminate/Database/Console/Seeds/SeedCommand.php new file mode 100644 index 0000000..cf866e0 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Console/Seeds/SeedCommand.php @@ -0,0 +1,106 @@ +resolver = $resolver; + } + + /** + * Execute the console command. + * + * @return void + */ + public function fire() + { + if (! $this->confirmToProceed()) { + return; + } + + $this->resolver->setDefaultConnection($this->getDatabase()); + + Model::unguarded(function () { + $this->getSeeder()->__invoke(); + }); + } + + /** + * Get a seeder instance from the container. + * + * @return \Illuminate\Database\Seeder + */ + protected function getSeeder() + { + $class = $this->laravel->make($this->input->getOption('class')); + + return $class->setContainer($this->laravel)->setCommand($this); + } + + /** + * Get the name of the database connection to use. + * + * @return string + */ + protected function getDatabase() + { + $database = $this->input->getOption('database'); + + return $database ?: $this->laravel['config']['database.default']; + } + + /** + * Get the console command options. + * + * @return array + */ + protected function getOptions() + { + return [ + ['class', null, InputOption::VALUE_OPTIONAL, 'The class name of the root seeder', 'DatabaseSeeder'], + + ['database', null, InputOption::VALUE_OPTIONAL, 'The database connection to seed'], + + ['force', null, InputOption::VALUE_NONE, 'Force the operation to run when in production.'], + ]; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/Seeds/SeederMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Database/Console/Seeds/SeederMakeCommand.php new file mode 100644 index 0000000..89b7931 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Console/Seeds/SeederMakeCommand.php @@ -0,0 +1,96 @@ +composer = $composer; + } + + /** + * Execute the console command. + * + * @return void + */ + public function fire() + { + parent::fire(); + + $this->composer->dumpAutoloads(); + } + + /** + * Get the stub file for the generator. + * + * @return string + */ + protected function getStub() + { + return __DIR__.'/stubs/seeder.stub'; + } + + /** + * Get the destination class path. + * + * @param string $name + * @return string + */ + protected function getPath($name) + { + return $this->laravel->databasePath().'/seeds/'.$name.'.php'; + } + + /** + * Parse the class name and format according to the root namespace. + * + * @param string $name + * @return string + */ + protected function qualifyClass($name) + { + return $name; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/Seeds/stubs/seeder.stub b/vendor/laravel/framework/src/Illuminate/Database/Console/Seeds/stubs/seeder.stub new file mode 100644 index 0000000..4aa3845 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Console/Seeds/stubs/seeder.stub @@ -0,0 +1,16 @@ +app = $app; + $this->factory = $factory; + } + + /** + * Get a database connection instance. + * + * @param string $name + * @return \Illuminate\Database\Connection + */ + public function connection($name = null) + { + list($database, $type) = $this->parseConnectionName($name); + + $name = $name ?: $database; + + // If we haven't created this connection, we'll create it based on the config + // provided in the application. Once we've created the connections we will + // set the "fetch mode" for PDO which determines the query return types. + if (! isset($this->connections[$name])) { + $this->connections[$name] = $this->configure( + $connection = $this->makeConnection($database), $type + ); + } + + return $this->connections[$name]; + } + + /** + * Parse the connection into an array of the name and read / write type. + * + * @param string $name + * @return array + */ + protected function parseConnectionName($name) + { + $name = $name ?: $this->getDefaultConnection(); + + return Str::endsWith($name, ['::read', '::write']) + ? explode('::', $name, 2) : [$name, null]; + } + + /** + * Make the database connection instance. + * + * @param string $name + * @return \Illuminate\Database\Connection + */ + protected function makeConnection($name) + { + $config = $this->configuration($name); + + // First we will check by the connection name to see if an extension has been + // registered specifically for that connection. If it has we will call the + // Closure and pass it the config allowing it to resolve the connection. + if (isset($this->extensions[$name])) { + return call_user_func($this->extensions[$name], $config, $name); + } + + // Next we will check to see if an extension has been registered for a driver + // and will call the Closure if so, which allows us to have a more generic + // resolver for the drivers themselves which applies to all connections. + if (isset($this->extensions[$driver = $config['driver']])) { + return call_user_func($this->extensions[$driver], $config, $name); + } + + return $this->factory->make($config, $name); + } + + /** + * Get the configuration for a connection. + * + * @param string $name + * @return array + * + * @throws \InvalidArgumentException + */ + protected function configuration($name) + { + $name = $name ?: $this->getDefaultConnection(); + + // To get the database connection configuration, we will just pull each of the + // connection configurations and get the configurations for the given name. + // If the configuration doesn't exist, we'll throw an exception and bail. + $connections = $this->app['config']['database.connections']; + + if (is_null($config = Arr::get($connections, $name))) { + throw new InvalidArgumentException("Database [$name] not configured."); + } + + return $config; + } + + /** + * Prepare the database connection instance. + * + * @param \Illuminate\Database\Connection $connection + * @param string $type + * @return \Illuminate\Database\Connection + */ + protected function configure(Connection $connection, $type) + { + $connection = $this->setPdoForType($connection, $type); + + // First we'll set the fetch mode and a few other dependencies of the database + // connection. This method basically just configures and prepares it to get + // used by the application. Once we're finished we'll return it back out. + if ($this->app->bound('events')) { + $connection->setEventDispatcher($this->app['events']); + } + + // Here we'll set a reconnector callback. This reconnector can be any callable + // so we will set a Closure to reconnect from this manager with the name of + // the connection, which will allow us to reconnect from the connections. + $connection->setReconnector(function ($connection) { + $this->reconnect($connection->getName()); + }); + + return $connection; + } + + /** + * Prepare the read / write mode for database connection instance. + * + * @param \Illuminate\Database\Connection $connection + * @param string $type + * @return \Illuminate\Database\Connection + */ + protected function setPdoForType(Connection $connection, $type = null) + { + if ($type == 'read') { + $connection->setPdo($connection->getReadPdo()); + } elseif ($type == 'write') { + $connection->setReadPdo($connection->getPdo()); + } + + return $connection; + } + + /** + * Disconnect from the given database and remove from local cache. + * + * @param string $name + * @return void + */ + public function purge($name = null) + { + $name = $name ?: $this->getDefaultConnection(); + + $this->disconnect($name); + + unset($this->connections[$name]); + } + + /** + * Disconnect from the given database. + * + * @param string $name + * @return void + */ + public function disconnect($name = null) + { + if (isset($this->connections[$name = $name ?: $this->getDefaultConnection()])) { + $this->connections[$name]->disconnect(); + } + } + + /** + * Reconnect to the given database. + * + * @param string $name + * @return \Illuminate\Database\Connection + */ + public function reconnect($name = null) + { + $this->disconnect($name = $name ?: $this->getDefaultConnection()); + + if (! isset($this->connections[$name])) { + return $this->connection($name); + } + + return $this->refreshPdoConnections($name); + } + + /** + * Refresh the PDO connections on a given connection. + * + * @param string $name + * @return \Illuminate\Database\Connection + */ + protected function refreshPdoConnections($name) + { + $fresh = $this->makeConnection($name); + + return $this->connections[$name] + ->setPdo($fresh->getPdo()) + ->setReadPdo($fresh->getReadPdo()); + } + + /** + * Get the default connection name. + * + * @return string + */ + public function getDefaultConnection() + { + return $this->app['config']['database.default']; + } + + /** + * Set the default connection name. + * + * @param string $name + * @return void + */ + public function setDefaultConnection($name) + { + $this->app['config']['database.default'] = $name; + } + + /** + * Get all of the support drivers. + * + * @return array + */ + public function supportedDrivers() + { + return ['mysql', 'pgsql', 'sqlite', 'sqlsrv']; + } + + /** + * Get all of the drivers that are actually available. + * + * @return array + */ + public function availableDrivers() + { + return array_intersect( + $this->supportedDrivers(), + str_replace('dblib', 'sqlsrv', PDO::getAvailableDrivers()) + ); + } + + /** + * Register an extension connection resolver. + * + * @param string $name + * @param callable $resolver + * @return void + */ + public function extend($name, callable $resolver) + { + $this->extensions[$name] = $resolver; + } + + /** + * Return all of the created connections. + * + * @return array + */ + public function getConnections() + { + return $this->connections; + } + + /** + * Dynamically pass methods to the default connection. + * + * @param string $method + * @param array $parameters + * @return mixed + */ + public function __call($method, $parameters) + { + return $this->connection()->$method(...$parameters); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/DatabaseServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Database/DatabaseServiceProvider.php new file mode 100755 index 0000000..a8ee7b0 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/DatabaseServiceProvider.php @@ -0,0 +1,99 @@ +app['db']); + + Model::setEventDispatcher($this->app['events']); + } + + /** + * Register the service provider. + * + * @return void + */ + public function register() + { + Model::clearBootedModels(); + + $this->registerConnectionServices(); + + $this->registerEloquentFactory(); + + $this->registerQueueableEntityResolver(); + } + + /** + * Register the primary database bindings. + * + * @return void + */ + protected function registerConnectionServices() + { + // The connection factory is used to create the actual connection instances on + // the database. We will inject the factory into the manager so that it may + // make the connections while they are actually needed and not of before. + $this->app->singleton('db.factory', function ($app) { + return new ConnectionFactory($app); + }); + + // The database manager is used to resolve various connections, since multiple + // connections might be managed. It also implements the connection resolver + // interface which may be used by other components requiring connections. + $this->app->singleton('db', function ($app) { + return new DatabaseManager($app, $app['db.factory']); + }); + + $this->app->bind('db.connection', function ($app) { + return $app['db']->connection(); + }); + } + + /** + * Register the Eloquent factory instance in the container. + * + * @return void + */ + protected function registerEloquentFactory() + { + $this->app->singleton(FakerGenerator::class, function ($app) { + return FakerFactory::create($app['config']->get('app.faker_locale', 'en_US')); + }); + + $this->app->singleton(EloquentFactory::class, function ($app) { + return EloquentFactory::construct( + $app->make(FakerGenerator::class), $this->app->databasePath('factories') + ); + }); + } + + /** + * Register the queueable entity resolver implementation. + * + * @return void + */ + protected function registerQueueableEntityResolver() + { + $this->app->singleton(EntityResolver::class, function () { + return new QueueEntityResolver; + }); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/DetectsDeadlocks.php b/vendor/laravel/framework/src/Illuminate/Database/DetectsDeadlocks.php new file mode 100644 index 0000000..dcbbd00 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/DetectsDeadlocks.php @@ -0,0 +1,30 @@ +getMessage(); + + return Str::contains($message, [ + 'Deadlock found when trying to get lock', + 'deadlock detected', + 'The database file is locked', + 'database is locked', + 'database table is locked', + 'A table in the database is locked', + 'has been chosen as the deadlock victim', + ]); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/DetectsLostConnections.php b/vendor/laravel/framework/src/Illuminate/Database/DetectsLostConnections.php new file mode 100644 index 0000000..bee3482 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/DetectsLostConnections.php @@ -0,0 +1,33 @@ +getMessage(); + + return Str::contains($message, [ + 'server has gone away', + 'no connection to the server', + 'Lost connection', + 'is dead or not enabled', + 'Error while sending', + 'decryption failed or bad record mac', + 'server closed the connection unexpectedly', + 'SSL connection has been closed unexpectedly', + 'Error writing data to the connection', + 'Resource deadlock avoided', + ]); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php new file mode 100755 index 0000000..c7f4a39 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php @@ -0,0 +1,1281 @@ +query = $query; + } + + /** + * Register a new global scope. + * + * @param string $identifier + * @param \Illuminate\Database\Eloquent\Scope|\Closure $scope + * @return $this + */ + public function withGlobalScope($identifier, $scope) + { + $this->scopes[$identifier] = $scope; + + if (method_exists($scope, 'extend')) { + $scope->extend($this); + } + + return $this; + } + + /** + * Remove a registered global scope. + * + * @param \Illuminate\Database\Eloquent\Scope|string $scope + * @return $this + */ + public function withoutGlobalScope($scope) + { + if (! is_string($scope)) { + $scope = get_class($scope); + } + + unset($this->scopes[$scope]); + + $this->removedScopes[] = $scope; + + return $this; + } + + /** + * Remove all or passed registered global scopes. + * + * @param array|null $scopes + * @return $this + */ + public function withoutGlobalScopes(array $scopes = null) + { + if (is_array($scopes)) { + foreach ($scopes as $scope) { + $this->withoutGlobalScope($scope); + } + } else { + $this->scopes = []; + } + + return $this; + } + + /** + * Get an array of global scopes that were removed from the query. + * + * @return array + */ + public function removedScopes() + { + return $this->removedScopes; + } + + /** + * Add a where clause on the primary key to the query. + * + * @param mixed $id + * @return $this + */ + public function whereKey($id) + { + if (is_array($id) || $id instanceof Arrayable) { + $this->query->whereIn($this->model->getQualifiedKeyName(), $id); + + return $this; + } + + return $this->where($this->model->getQualifiedKeyName(), '=', $id); + } + + /** + * Add a basic where clause to the query. + * + * @param string|\Closure $column + * @param string $operator + * @param mixed $value + * @param string $boolean + * @return $this + */ + public function where($column, $operator = null, $value = null, $boolean = 'and') + { + if ($column instanceof Closure) { + $query = $this->model->newQueryWithoutScopes(); + + $column($query); + + $this->query->addNestedWhereQuery($query->getQuery(), $boolean); + } else { + $this->query->where(...func_get_args()); + } + + return $this; + } + + /** + * Add an "or where" clause to the query. + * + * @param string|\Closure $column + * @param string $operator + * @param mixed $value + * @return \Illuminate\Database\Eloquent\Builder|static + */ + public function orWhere($column, $operator = null, $value = null) + { + return $this->where($column, $operator, $value, 'or'); + } + + /** + * Create a collection of models from plain arrays. + * + * @param array $items + * @return \Illuminate\Database\Eloquent\Collection + */ + public function hydrate(array $items) + { + $instance = $this->newModelInstance(); + + return $instance->newCollection(array_map(function ($item) use ($instance) { + return $instance->newFromBuilder($item); + }, $items)); + } + + /** + * Create a collection of models from a raw query. + * + * @param string $query + * @param array $bindings + * @return \Illuminate\Database\Eloquent\Collection + */ + public function fromQuery($query, $bindings = []) + { + return $this->hydrate( + $this->query->getConnection()->select($query, $bindings) + ); + } + + /** + * Find a model by its primary key. + * + * @param mixed $id + * @param array $columns + * @return \Illuminate\Database\Eloquent\Model|\Illuminate\Database\Eloquent\Collection|static[]|static|null + */ + public function find($id, $columns = ['*']) + { + if (is_array($id)) { + return $this->findMany($id, $columns); + } + + return $this->whereKey($id)->first($columns); + } + + /** + * Find multiple models by their primary keys. + * + * @param array $ids + * @param array $columns + * @return \Illuminate\Database\Eloquent\Collection + */ + public function findMany($ids, $columns = ['*']) + { + if (empty($ids)) { + return $this->model->newCollection(); + } + + return $this->whereKey($ids)->get($columns); + } + + /** + * Find a model by its primary key or throw an exception. + * + * @param mixed $id + * @param array $columns + * @return \Illuminate\Database\Eloquent\Model|\Illuminate\Database\Eloquent\Collection + * + * @throws \Illuminate\Database\Eloquent\ModelNotFoundException + */ + public function findOrFail($id, $columns = ['*']) + { + $result = $this->find($id, $columns); + + if (is_array($id)) { + if (count($result) == count(array_unique($id))) { + return $result; + } + } elseif (! is_null($result)) { + return $result; + } + + throw (new ModelNotFoundException)->setModel( + get_class($this->model), $id + ); + } + + /** + * Find a model by its primary key or return fresh model instance. + * + * @param mixed $id + * @param array $columns + * @return \Illuminate\Database\Eloquent\Model + */ + public function findOrNew($id, $columns = ['*']) + { + if (! is_null($model = $this->find($id, $columns))) { + return $model; + } + + return $this->newModelInstance(); + } + + /** + * Get the first record matching the attributes or instantiate it. + * + * @param array $attributes + * @param array $values + * @return \Illuminate\Database\Eloquent\Model + */ + public function firstOrNew(array $attributes, array $values = []) + { + if (! is_null($instance = $this->where($attributes)->first())) { + return $instance; + } + + return $this->newModelInstance($attributes + $values); + } + + /** + * Get the first record matching the attributes or create it. + * + * @param array $attributes + * @param array $values + * @return \Illuminate\Database\Eloquent\Model + */ + public function firstOrCreate(array $attributes, array $values = []) + { + if (! is_null($instance = $this->where($attributes)->first())) { + return $instance; + } + + return tap($this->newModelInstance($attributes + $values), function ($instance) { + $instance->save(); + }); + } + + /** + * Create or update a record matching the attributes, and fill it with values. + * + * @param array $attributes + * @param array $values + * @return \Illuminate\Database\Eloquent\Model + */ + public function updateOrCreate(array $attributes, array $values = []) + { + return tap($this->firstOrNew($attributes), function ($instance) use ($values) { + $instance->fill($values)->save(); + }); + } + + /** + * Execute the query and get the first result or throw an exception. + * + * @param array $columns + * @return \Illuminate\Database\Eloquent\Model|static + * + * @throws \Illuminate\Database\Eloquent\ModelNotFoundException + */ + public function firstOrFail($columns = ['*']) + { + if (! is_null($model = $this->first($columns))) { + return $model; + } + + throw (new ModelNotFoundException)->setModel(get_class($this->model)); + } + + /** + * Execute the query and get the first result or call a callback. + * + * @param \Closure|array $columns + * @param \Closure|null $callback + * @return \Illuminate\Database\Eloquent\Model|static|mixed + */ + public function firstOr($columns = ['*'], Closure $callback = null) + { + if ($columns instanceof Closure) { + $callback = $columns; + + $columns = ['*']; + } + + if (! is_null($model = $this->first($columns))) { + return $model; + } + + return call_user_func($callback); + } + + /** + * Get a single column's value from the first result of a query. + * + * @param string $column + * @return mixed + */ + public function value($column) + { + if ($result = $this->first([$column])) { + return $result->{$column}; + } + } + + /** + * Execute the query as a "select" statement. + * + * @param array $columns + * @return \Illuminate\Database\Eloquent\Collection|static[] + */ + public function get($columns = ['*']) + { + $builder = $this->applyScopes(); + + // If we actually found models we will also eager load any relationships that + // have been specified as needing to be eager loaded, which will solve the + // n+1 query issue for the developers to avoid running a lot of queries. + if (count($models = $builder->getModels($columns)) > 0) { + $models = $builder->eagerLoadRelations($models); + } + + return $builder->getModel()->newCollection($models); + } + + /** + * Get the hydrated models without eager loading. + * + * @param array $columns + * @return \Illuminate\Database\Eloquent\Model[] + */ + public function getModels($columns = ['*']) + { + return $this->model->hydrate( + $this->query->get($columns)->all() + )->all(); + } + + /** + * Eager load the relationships for the models. + * + * @param array $models + * @return array + */ + public function eagerLoadRelations(array $models) + { + foreach ($this->eagerLoad as $name => $constraints) { + // For nested eager loads we'll skip loading them here and they will be set as an + // eager load on the query to retrieve the relation so that they will be eager + // loaded on that query, because that is where they get hydrated as models. + if (strpos($name, '.') === false) { + $models = $this->eagerLoadRelation($models, $name, $constraints); + } + } + + return $models; + } + + /** + * Eagerly load the relationship on a set of models. + * + * @param array $models + * @param string $name + * @param \Closure $constraints + * @return array + */ + protected function eagerLoadRelation(array $models, $name, Closure $constraints) + { + // First we will "back up" the existing where conditions on the query so we can + // add our eager constraints. Then we will merge the wheres that were on the + // query back to it in order that any where conditions might be specified. + $relation = $this->getRelation($name); + + $relation->addEagerConstraints($models); + + $constraints($relation); + + // Once we have the results, we just match those back up to their parent models + // using the relationship instance. Then we just return the finished arrays + // of models which have been eagerly hydrated and are readied for return. + return $relation->match( + $relation->initRelation($models, $name), + $relation->getEager(), $name + ); + } + + /** + * Get the relation instance for the given relation name. + * + * @param string $name + * @return \Illuminate\Database\Eloquent\Relations\Relation + */ + public function getRelation($name) + { + // We want to run a relationship query without any constrains so that we will + // not have to remove these where clauses manually which gets really hacky + // and error prone. We don't want constraints because we add eager ones. + $relation = Relation::noConstraints(function () use ($name) { + try { + return $this->getModel()->{$name}(); + } catch (BadMethodCallException $e) { + throw RelationNotFoundException::make($this->getModel(), $name); + } + }); + + $nested = $this->relationsNestedUnder($name); + + // If there are nested relationships set on the query, we will put those onto + // the query instances so that they can be handled after this relationship + // is loaded. In this way they will all trickle down as they are loaded. + if (count($nested) > 0) { + $relation->getQuery()->with($nested); + } + + return $relation; + } + + /** + * Get the deeply nested relations for a given top-level relation. + * + * @param string $relation + * @return array + */ + protected function relationsNestedUnder($relation) + { + $nested = []; + + // We are basically looking for any relationships that are nested deeper than + // the given top-level relationship. We will just check for any relations + // that start with the given top relations and adds them to our arrays. + foreach ($this->eagerLoad as $name => $constraints) { + if ($this->isNestedUnder($relation, $name)) { + $nested[substr($name, strlen($relation.'.'))] = $constraints; + } + } + + return $nested; + } + + /** + * Determine if the relationship is nested. + * + * @param string $relation + * @param string $name + * @return bool + */ + protected function isNestedUnder($relation, $name) + { + return Str::contains($name, '.') && Str::startsWith($name, $relation.'.'); + } + + /** + * Get a generator for the given query. + * + * @return \Generator + */ + public function cursor() + { + foreach ($this->applyScopes()->query->cursor() as $record) { + yield $this->model->newFromBuilder($record); + } + } + + /** + * Chunk the results of a query by comparing numeric IDs. + * + * @param int $count + * @param callable $callback + * @param string $column + * @param string|null $alias + * @return bool + */ + public function chunkById($count, callable $callback, $column = null, $alias = null) + { + $column = is_null($column) ? $this->getModel()->getKeyName() : $column; + + $alias = is_null($alias) ? $column : $alias; + + $lastId = 0; + + do { + $clone = clone $this; + + // We'll execute the query for the given page and get the results. If there are + // no results we can just break and return from here. When there are results + // we will call the callback with the current chunk of these results here. + $results = $clone->forPageAfterId($count, $lastId, $column)->get(); + + $countResults = $results->count(); + + if ($countResults == 0) { + break; + } + + // On each chunk result set, we will pass them to the callback and then let the + // developer take care of everything within the callback, which allows us to + // keep the memory low for spinning through large result sets for working. + if ($callback($results) === false) { + return false; + } + + $lastId = $results->last()->{$alias}; + } while ($countResults == $count); + + return true; + } + + /** + * Add a generic "order by" clause if the query doesn't already have one. + * + * @return void + */ + protected function enforceOrderBy() + { + if (empty($this->query->orders) && empty($this->query->unionOrders)) { + $this->orderBy($this->model->getQualifiedKeyName(), 'asc'); + } + } + + /** + * Get an array with the values of a given column. + * + * @param string $column + * @param string|null $key + * @return \Illuminate\Support\Collection + */ + public function pluck($column, $key = null) + { + $results = $this->toBase()->pluck($column, $key); + + // If the model has a mutator for the requested column, we will spin through + // the results and mutate the values so that the mutated version of these + // columns are returned as you would expect from these Eloquent models. + if (! $this->model->hasGetMutator($column) && + ! $this->model->hasCast($column) && + ! in_array($column, $this->model->getDates())) { + return $results; + } + + return $results->map(function ($value) use ($column) { + return $this->model->newFromBuilder([$column => $value])->{$column}; + }); + } + + /** + * Paginate the given query. + * + * @param int $perPage + * @param array $columns + * @param string $pageName + * @param int|null $page + * @return \Illuminate\Contracts\Pagination\LengthAwarePaginator + * + * @throws \InvalidArgumentException + */ + public function paginate($perPage = null, $columns = ['*'], $pageName = 'page', $page = null) + { + $page = $page ?: Paginator::resolveCurrentPage($pageName); + + $perPage = $perPage ?: $this->model->getPerPage(); + + $results = ($total = $this->toBase()->getCountForPagination()) + ? $this->forPage($page, $perPage)->get($columns) + : $this->model->newCollection(); + + return new LengthAwarePaginator($results, $total, $perPage, $page, [ + 'path' => Paginator::resolveCurrentPath(), + 'pageName' => $pageName, + ]); + } + + /** + * Paginate the given query into a simple paginator. + * + * @param int $perPage + * @param array $columns + * @param string $pageName + * @param int|null $page + * @return \Illuminate\Contracts\Pagination\Paginator + */ + public function simplePaginate($perPage = null, $columns = ['*'], $pageName = 'page', $page = null) + { + $page = $page ?: Paginator::resolveCurrentPage($pageName); + + $perPage = $perPage ?: $this->model->getPerPage(); + + // Next we will set the limit and offset for this query so that when we get the + // results we get the proper section of results. Then, we'll create the full + // 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, [ + 'path' => Paginator::resolveCurrentPath(), + 'pageName' => $pageName, + ]); + } + + /** + * Save a new model and return the instance. + * + * @param array $attributes + * @return \Illuminate\Database\Eloquent\Model + */ + public function create(array $attributes = []) + { + return tap($this->newModelInstance($attributes), function ($instance) { + $instance->save(); + }); + } + + /** + * Save a new model and return the instance. Allow mass-assignment. + * + * @param array $attributes + * @return \Illuminate\Database\Eloquent\Model + */ + public function forceCreate(array $attributes) + { + return $this->model->unguarded(function () use ($attributes) { + return $this->newModelInstance()->create($attributes); + }); + } + + /** + * Update a record in the database. + * + * @param array $values + * @return int + */ + public function update(array $values) + { + return $this->toBase()->update($this->addUpdatedAtColumn($values)); + } + + /** + * Increment a column's value by a given amount. + * + * @param string $column + * @param int $amount + * @param array $extra + * @return int + */ + public function increment($column, $amount = 1, array $extra = []) + { + return $this->toBase()->increment( + $column, $amount, $this->addUpdatedAtColumn($extra) + ); + } + + /** + * Decrement a column's value by a given amount. + * + * @param string $column + * @param int $amount + * @param array $extra + * @return int + */ + public function decrement($column, $amount = 1, array $extra = []) + { + return $this->toBase()->decrement( + $column, $amount, $this->addUpdatedAtColumn($extra) + ); + } + + /** + * Add the "updated at" column to an array of values. + * + * @param array $values + * @return array + */ + protected function addUpdatedAtColumn(array $values) + { + if (! $this->model->usesTimestamps()) { + return $values; + } + + return Arr::add( + $values, $this->model->getUpdatedAtColumn(), + $this->model->freshTimestampString() + ); + } + + /** + * Delete a record from the database. + * + * @return mixed + */ + public function delete() + { + if (isset($this->onDelete)) { + return call_user_func($this->onDelete, $this); + } + + return $this->toBase()->delete(); + } + + /** + * Run the default delete function on the builder. + * + * Since we do not apply scopes here, the row will actually be deleted. + * + * @return mixed + */ + public function forceDelete() + { + return $this->query->delete(); + } + + /** + * Register a replacement for the default delete function. + * + * @param \Closure $callback + * @return void + */ + public function onDelete(Closure $callback) + { + $this->onDelete = $callback; + } + + /** + * Call the given local model scopes. + * + * @param array $scopes + * @return mixed + */ + public function scopes(array $scopes) + { + $builder = $this; + + foreach ($scopes as $scope => $parameters) { + // If the scope key is an integer, then the scope was passed as the value and + // the parameter list is empty, so we will format the scope name and these + // parameters here. Then, we'll be ready to call the scope on the model. + if (is_int($scope)) { + list($scope, $parameters) = [$parameters, []]; + } + + // Next we'll pass the scope callback to the callScope method which will take + // care of groping the "wheres" correctly so the logical order doesn't get + // messed up when adding scopes. Then we'll return back out the builder. + $builder = $builder->callScope( + [$this->model, 'scope'.ucfirst($scope)], + (array) $parameters + ); + } + + return $builder; + } + + /** + * Apply the scopes to the Eloquent builder instance and return it. + * + * @return \Illuminate\Database\Eloquent\Builder|static + */ + public function applyScopes() + { + if (! $this->scopes) { + return $this; + } + + $builder = clone $this; + + foreach ($this->scopes as $scope) { + $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 + // that are added to this query so "where" clauses maintain proper logic. + if ($scope instanceof Closure) { + $scope($builder); + } + + // If the scope is a scope object, we will call the apply method on this scope + // passing in the builder and the model instance. After we run all of these + // scopes we will return back the builder instance to the outside caller. + if ($scope instanceof Scope) { + $scope->apply($builder, $this->getModel()); + } + }); + } + + return $builder; + } + + /** + * Apply the given scope on the current builder instance. + * + * @param callable $scope + * @param array $parameters + * @return mixed + */ + protected function callScope(callable $scope, $parameters = []) + { + array_unshift($parameters, $this); + + $query = $this->getQuery(); + + // 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); + + $result = $scope(...array_values($parameters)) ?: $this; + + if (count($query->wheres) > $originalWhereCount) { + $this->addNewWheresWithinGroup($query, $originalWhereCount); + } + + return $result; + } + + /** + * Nest where conditions by slicing them at the given where count. + * + * @param \Illuminate\Database\Query\Builder $query + * @param int $originalWhereCount + * @return void + */ + protected function addNewWheresWithinGroup(QueryBuilder $query, $originalWhereCount) + { + // Here, we totally remove all of the where clauses since we are going to + // rebuild them as nested queries by slicing the groups of wheres into + // their own sections. This is to prevent any confusing logic order. + $allWheres = $query->wheres; + + $query->wheres = []; + + $this->groupWhereSliceForScope( + $query, array_slice($allWheres, 0, $originalWhereCount) + ); + + $this->groupWhereSliceForScope( + $query, array_slice($allWheres, $originalWhereCount) + ); + } + + /** + * Slice where conditions at the given offset and add them to the query as a nested condition. + * + * @param \Illuminate\Database\Query\Builder $query + * @param array $whereSlice + * @return void + */ + protected function groupWhereSliceForScope(QueryBuilder $query, $whereSlice) + { + $whereBooleans = collect($whereSlice)->pluck('boolean'); + + // Here we'll check if the given subset of where clauses contains any "or" + // booleans and in this case create a nested where expression. That way + // we don't add any unnecessary nesting thus keeping the query clean. + if ($whereBooleans->contains('or')) { + $query->wheres[] = $this->createNestedWhere( + $whereSlice, $whereBooleans->first() + ); + } else { + $query->wheres = array_merge($query->wheres, $whereSlice); + } + } + + /** + * Create a where array with nested where conditions. + * + * @param array $whereSlice + * @param string $boolean + * @return array + */ + protected function createNestedWhere($whereSlice, $boolean = 'and') + { + $whereGroup = $this->getQuery()->forNestedWhere(); + + $whereGroup->wheres = $whereSlice; + + return ['type' => 'Nested', 'query' => $whereGroup, 'boolean' => $boolean]; + } + + /** + * Set the relationships that should be eager loaded. + * + * @param mixed $relations + * @return $this + */ + public function with($relations) + { + $eagerLoad = $this->parseWithRelations(is_string($relations) ? func_get_args() : $relations); + + $this->eagerLoad = array_merge($this->eagerLoad, $eagerLoad); + + return $this; + } + + /** + * Prevent the specified relations from being eager loaded. + * + * @param mixed $relations + * @return $this + */ + public function without($relations) + { + $this->eagerLoad = array_diff_key($this->eagerLoad, array_flip( + is_string($relations) ? func_get_args() : $relations + )); + + return $this; + } + + /** + * Create a new instance of the model being queried. + * + * @param array $attributes + * @return \Illuminate\Database\Eloquent\Model + */ + public function newModelInstance($attributes = []) + { + return $this->model->newInstance($attributes)->setConnection( + $this->query->getConnection()->getName() + ); + } + + /** + * Parse a list of relations into individuals. + * + * @param array $relations + * @return array + */ + protected function parseWithRelations(array $relations) + { + $results = []; + + foreach ($relations as $name => $constraints) { + // If the "relation" value is actually a numeric key, we can assume that no + // constraints have been specified for the eager load and we'll just put + // an empty Closure with the loader so that we can treat all the same. + if (is_numeric($name)) { + $name = $constraints; + + list($name, $constraints) = Str::contains($name, ':') + ? $this->createSelectWithConstraint($name) + : [$name, function () { + // + }]; + } + + // We need to separate out any nested includes. Which allows the developers + // to load deep relationships using "dots" without stating each level of + // the relationship with its own key in the array of eager load names. + $results = $this->addNestedWiths($name, $results); + + $results[$name] = $constraints; + } + + return $results; + } + + /** + * Create a constraint to select the given columns for the relation. + * + * @param string $name + * @return array + */ + protected function createSelectWithConstraint($name) + { + return [explode(':', $name)[0], function ($query) use ($name) { + $query->select(explode(',', explode(':', $name)[1])); + }]; + } + + /** + * Parse the nested relationships in a relation. + * + * @param string $name + * @param array $results + * @return array + */ + protected function addNestedWiths($name, $results) + { + $progress = []; + + // If the relation has already been set on the result array, we will not set it + // again, since that would override any constraints that were already placed + // on the relationships. We will only set the ones that are not specified. + foreach (explode('.', $name) as $segment) { + $progress[] = $segment; + + if (! isset($results[$last = implode('.', $progress)])) { + $results[$last] = function () { + // + }; + } + } + + return $results; + } + + /** + * Get the underlying query builder instance. + * + * @return \Illuminate\Database\Query\Builder + */ + public function getQuery() + { + return $this->query; + } + + /** + * Set the underlying query builder instance. + * + * @param \Illuminate\Database\Query\Builder $query + * @return $this + */ + public function setQuery($query) + { + $this->query = $query; + + return $this; + } + + /** + * Get a base query builder instance. + * + * @return \Illuminate\Database\Query\Builder + */ + public function toBase() + { + return $this->applyScopes()->getQuery(); + } + + /** + * Get the relationships being eagerly loaded. + * + * @return array + */ + public function getEagerLoads() + { + return $this->eagerLoad; + } + + /** + * Set the relationships being eagerly loaded. + * + * @param array $eagerLoad + * @return $this + */ + public function setEagerLoads(array $eagerLoad) + { + $this->eagerLoad = $eagerLoad; + + return $this; + } + + /** + * Get the model instance being queried. + * + * @return \Illuminate\Database\Eloquent\Model + */ + public function getModel() + { + return $this->model; + } + + /** + * Set a model instance for the model being queried. + * + * @param \Illuminate\Database\Eloquent\Model $model + * @return $this + */ + public function setModel(Model $model) + { + $this->model = $model; + + $this->query->from($model->getTable()); + + return $this; + } + + /** + * Get the given macro by name. + * + * @param string $name + * @return \Closure + */ + public function getMacro($name) + { + return Arr::get($this->localMacros, $name); + } + + /** + * Dynamically handle calls into the query instance. + * + * @param string $method + * @param array $parameters + * @return mixed + */ + public function __call($method, $parameters) + { + if ($method === 'macro') { + $this->localMacros[$parameters[0]] = $parameters[1]; + + return; + } + + if (isset($this->localMacros[$method])) { + array_unshift($parameters, $this); + + return $this->localMacros[$method](...$parameters); + } + + if (isset(static::$macros[$method]) and static::$macros[$method] instanceof Closure) { + return call_user_func_array(static::$macros[$method]->bindTo($this, static::class), $parameters); + } + + if (isset(static::$macros[$method])) { + return call_user_func_array(static::$macros[$method]->bindTo($this, static::class), $parameters); + } + + if (method_exists($this->model, $scope = 'scope'.ucfirst($method))) { + return $this->callScope([$this->model, $scope], $parameters); + } + + if (in_array($method, $this->passthru)) { + return $this->toBase()->{$method}(...$parameters); + } + + $this->query->{$method}(...$parameters); + + return $this; + } + + /** + * Dynamically handle calls into the query instance. + * + * @param string $method + * @param array $parameters + * @return mixed + * + * @throws \BadMethodCallException + */ + public static function __callStatic($method, $parameters) + { + if ($method === 'macro') { + static::$macros[$parameters[0]] = $parameters[1]; + + return; + } + + if (! isset(static::$macros[$method])) { + throw new BadMethodCallException("Method {$method} does not exist."); + } + + if (static::$macros[$method] instanceof Closure) { + return call_user_func_array(Closure::bind(static::$macros[$method], null, static::class), $parameters); + } + + return call_user_func_array(static::$macros[$method], $parameters); + } + + /** + * Force a clone of the underlying query builder when cloning. + * + * @return void + */ + public function __clone() + { + $this->query = clone $this->query; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Collection.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Collection.php new file mode 100755 index 0000000..f6a3b12 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Collection.php @@ -0,0 +1,369 @@ +getKey(); + } + + if (is_array($key)) { + if ($this->isEmpty()) { + return new static; + } + + return $this->whereIn($this->first()->getKeyName(), $key); + } + + return Arr::first($this->items, function ($model) use ($key) { + return $model->getKey() == $key; + }, $default); + } + + /** + * Load a set of relationships onto the collection. + * + * @param mixed $relations + * @return $this + */ + public function load($relations) + { + if (count($this->items) > 0) { + if (is_string($relations)) { + $relations = func_get_args(); + } + + $query = $this->first()->newQuery()->with($relations); + + $this->items = $query->eagerLoadRelations($this->items); + } + + return $this; + } + + /** + * Add an item to the collection. + * + * @param mixed $item + * @return $this + */ + public function add($item) + { + $this->items[] = $item; + + return $this; + } + + /** + * Determine if a key exists in the collection. + * + * @param mixed $key + * @param mixed $operator + * @param mixed $value + * @return bool + */ + public function contains($key, $operator = null, $value = null) + { + if (func_num_args() > 1 || $this->useAsCallable($key)) { + return parent::contains(...func_get_args()); + } + + $key = $key instanceof Model ? $key->getKey() : $key; + + return parent::contains(function ($model) use ($key) { + return $model->getKey() == $key; + }); + } + + /** + * Get the array of primary keys. + * + * @return array + */ + public function modelKeys() + { + return array_map(function ($model) { + return $model->getKey(); + }, $this->items); + } + + /** + * Merge the collection with the given items. + * + * @param \ArrayAccess|array $items + * @return static + */ + public function merge($items) + { + $dictionary = $this->getDictionary(); + + foreach ($items as $item) { + $dictionary[$item->getKey()] = $item; + } + + return new static(array_values($dictionary)); + } + + /** + * Run a map over each of the items. + * + * @param callable $callback + * @return \Illuminate\Support\Collection + */ + public function map(callable $callback) + { + $result = parent::map($callback); + + return $result->contains(function ($item) { + return ! $item instanceof Model; + }) ? $result->toBase() : $result; + } + + /** + * Diff the collection with the given items. + * + * @param \ArrayAccess|array $items + * @return static + */ + public function diff($items) + { + $diff = new static; + + $dictionary = $this->getDictionary($items); + + foreach ($this->items as $item) { + if (! isset($dictionary[$item->getKey()])) { + $diff->add($item); + } + } + + return $diff; + } + + /** + * Intersect the collection with the given items. + * + * @param \ArrayAccess|array $items + * @return static + */ + public function intersect($items) + { + $intersect = new static; + + $dictionary = $this->getDictionary($items); + + foreach ($this->items as $item) { + if (isset($dictionary[$item->getKey()])) { + $intersect->add($item); + } + } + + return $intersect; + } + + /** + * Return only unique items from the collection. + * + * @param string|callable|null $key + * @param bool $strict + * @return static|\Illuminate\Support\Collection + */ + public function unique($key = null, $strict = false) + { + if (! is_null($key)) { + return parent::unique($key, $strict); + } + + return new static(array_values($this->getDictionary())); + } + + /** + * Returns only the models from the collection with the specified keys. + * + * @param mixed $keys + * @return static + */ + public function only($keys) + { + if (is_null($keys)) { + return new static($this->items); + } + + $dictionary = Arr::only($this->getDictionary(), $keys); + + return new static(array_values($dictionary)); + } + + /** + * Returns all models in the collection except the models with specified keys. + * + * @param mixed $keys + * @return static + */ + public function except($keys) + { + $dictionary = Arr::except($this->getDictionary(), $keys); + + return new static(array_values($dictionary)); + } + + /** + * Make the given, typically visible, attributes hidden across the entire collection. + * + * @param array|string $attributes + * @return $this + */ + public function makeHidden($attributes) + { + return $this->each(function ($model) use ($attributes) { + $model->addHidden($attributes); + }); + } + + /** + * Make the given, typically hidden, attributes visible across the entire collection. + * + * @param array|string $attributes + * @return $this + */ + public function makeVisible($attributes) + { + return $this->each(function ($model) use ($attributes) { + $model->makeVisible($attributes); + }); + } + + /** + * Get a dictionary keyed by primary keys. + * + * @param \ArrayAccess|array|null $items + * @return array + */ + public function getDictionary($items = null) + { + $items = is_null($items) ? $this->items : $items; + + $dictionary = []; + + foreach ($items as $value) { + $dictionary[$value->getKey()] = $value; + } + + return $dictionary; + } + + /** + * The following methods are intercepted to always return base collections. + */ + + /** + * Get an array with the values of a given key. + * + * @param string $value + * @param string|null $key + * @return \Illuminate\Support\Collection + */ + public function pluck($value, $key = null) + { + return $this->toBase()->pluck($value, $key); + } + + /** + * Get the keys of the collection items. + * + * @return \Illuminate\Support\Collection + */ + public function keys() + { + return $this->toBase()->keys(); + } + + /** + * Zip the collection together with one or more arrays. + * + * @param mixed ...$items + * @return \Illuminate\Support\Collection + */ + public function zip($items) + { + return call_user_func_array([$this->toBase(), 'zip'], func_get_args()); + } + + /** + * Collapse the collection of items into a single array. + * + * @return \Illuminate\Support\Collection + */ + public function collapse() + { + return $this->toBase()->collapse(); + } + + /** + * Get a flattened array of the items in the collection. + * + * @param int $depth + * @return \Illuminate\Support\Collection + */ + public function flatten($depth = INF) + { + return $this->toBase()->flatten($depth); + } + + /** + * Flip the items in the collection. + * + * @return \Illuminate\Support\Collection + */ + public function flip() + { + return $this->toBase()->flip(); + } + + /** + * Get the type of the entities being queued. + * + * @return string|null + */ + public function getQueueableClass() + { + if ($this->count() === 0) { + return; + } + + $class = get_class($this->first()); + + $this->each(function ($model) use ($class) { + if (get_class($model) !== $class) { + throw new LogicException('Queueing collections with multiple model types is not supported.'); + } + }); + + return $class; + } + + /** + * Get the identifiers for all of the entities. + * + * @return array + */ + public function getQueueableIds() + { + return $this->modelKeys(); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/GuardsAttributes.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/GuardsAttributes.php new file mode 100644 index 0000000..96317cf --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/GuardsAttributes.php @@ -0,0 +1,193 @@ +fillable; + } + + /** + * Set the fillable attributes for the model. + * + * @param array $fillable + * @return $this + */ + public function fillable(array $fillable) + { + $this->fillable = $fillable; + + return $this; + } + + /** + * Get the guarded attributes for the model. + * + * @return array + */ + public function getGuarded() + { + return $this->guarded; + } + + /** + * Set the guarded attributes for the model. + * + * @param array $guarded + * @return $this + */ + public function guard(array $guarded) + { + $this->guarded = $guarded; + + return $this; + } + + /** + * Disable all mass assignable restrictions. + * + * @param bool $state + * @return void + */ + public static function unguard($state = true) + { + static::$unguarded = $state; + } + + /** + * Enable the mass assignment restrictions. + * + * @return void + */ + public static function reguard() + { + static::$unguarded = false; + } + + /** + * Determine if current state is "unguarded". + * + * @return bool + */ + public static function isUnguarded() + { + return static::$unguarded; + } + + /** + * Run the given callable while being unguarded. + * + * @param callable $callback + * @return mixed + */ + public static function unguarded(callable $callback) + { + if (static::$unguarded) { + return $callback(); + } + + static::unguard(); + + try { + return $callback(); + } finally { + static::reguard(); + } + } + + /** + * Determine if the given attribute may be mass assigned. + * + * @param string $key + * @return bool + */ + public function isFillable($key) + { + if (static::$unguarded) { + return true; + } + + // If the key is in the "fillable" array, we can of course assume that it's + // a fillable attribute. Otherwise, we will check the guarded array when + // we need to determine if the attribute is black-listed on the model. + if (in_array($key, $this->getFillable())) { + return true; + } + + // If the attribute is explicitly listed in the "guarded" array then we can + // return false immediately. This means this attribute is definitely not + // fillable and there is no point in going any further in this method. + if ($this->isGuarded($key)) { + return false; + } + + return empty($this->getFillable()) && + ! Str::startsWith($key, '_'); + } + + /** + * Determine if the given key is guarded. + * + * @param string $key + * @return bool + */ + public function isGuarded($key) + { + return in_array($key, $this->getGuarded()) || $this->getGuarded() == ['*']; + } + + /** + * Determine if the model is totally guarded. + * + * @return bool + */ + public function totallyGuarded() + { + return count($this->getFillable()) == 0 && $this->getGuarded() == ['*']; + } + + /** + * Get the fillable attributes of a given array. + * + * @param array $attributes + * @return array + */ + protected function fillableFromArray(array $attributes) + { + if (count($this->getFillable()) > 0 && ! static::$unguarded) { + return array_intersect_key($attributes, array_flip($this->getFillable())); + } + + return $attributes; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php new file mode 100644 index 0000000..1654e39 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php @@ -0,0 +1,1063 @@ +addDateAttributesToArray( + $attributes = $this->getArrayableAttributes() + ); + + $attributes = $this->addMutatedAttributesToArray( + $attributes, $mutatedAttributes = $this->getMutatedAttributes() + ); + + // Next we will handle any casts that have been setup for this model and cast + // the values to their appropriate type. If the attribute has a mutator we + // will not perform the cast on those attributes to avoid any confusion. + $attributes = $this->addCastAttributesToArray( + $attributes, $mutatedAttributes + ); + + // Here we will grab all of the appended, calculated attributes to this model + // as these attributes are not really in the attributes array, but are run + // when we need to array or JSON the model for convenience to the coder. + foreach ($this->getArrayableAppends() as $key) { + $attributes[$key] = $this->mutateAttributeForArray($key, null); + } + + return $attributes; + } + + /** + * Add the date attributes to the attributes array. + * + * @param array $attributes + * @return array + */ + protected function addDateAttributesToArray(array $attributes) + { + foreach ($this->getDates() as $key) { + if (! isset($attributes[$key])) { + continue; + } + + $attributes[$key] = $this->serializeDate( + $this->asDateTime($attributes[$key]) + ); + } + + return $attributes; + } + + /** + * Add the mutated attributes to the attributes array. + * + * @param array $attributes + * @param array $mutatedAttributes + * @return array + */ + protected function addMutatedAttributesToArray(array $attributes, array $mutatedAttributes) + { + foreach ($mutatedAttributes as $key) { + // We want to spin through all the mutated attributes for this model and call + // the mutator for the attribute. We cache off every mutated attributes so + // we don't have to constantly check on attributes that actually change. + if (! array_key_exists($key, $attributes)) { + continue; + } + + // Next, we will call the mutator for this attribute so that we can get these + // mutated attribute's actual values. After we finish mutating each of the + // attributes we will return this final array of the mutated attributes. + $attributes[$key] = $this->mutateAttributeForArray( + $key, $attributes[$key] + ); + } + + return $attributes; + } + + /** + * Add the casted attributes to the attributes array. + * + * @param array $attributes + * @param array $mutatedAttributes + * @return array + */ + protected function addCastAttributesToArray(array $attributes, array $mutatedAttributes) + { + foreach ($this->getCasts() as $key => $value) { + if (! array_key_exists($key, $attributes) || in_array($key, $mutatedAttributes)) { + continue; + } + + // Here we will cast the attribute. Then, if the cast is a date or datetime cast + // then we will serialize the date for the array. This will convert the dates + // to strings based on the date format specified for these Eloquent models. + $attributes[$key] = $this->castAttribute( + $key, $attributes[$key] + ); + + // If the attribute cast was a date or a datetime, we will serialize the date as + // a string. This allows the developers to customize hwo dates are serialized + // into an array without affecting how they are persisted into the storage. + if ($attributes[$key] && + ($value === 'date' || $value === 'datetime')) { + $attributes[$key] = $this->serializeDate($attributes[$key]); + } + } + + return $attributes; + } + + /** + * Get an attribute array of all arrayable attributes. + * + * @return array + */ + protected function getArrayableAttributes() + { + return $this->getArrayableItems($this->attributes); + } + + /** + * Get all of the appendable values that are arrayable. + * + * @return array + */ + protected function getArrayableAppends() + { + if (! count($this->appends)) { + return []; + } + + return $this->getArrayableItems( + array_combine($this->appends, $this->appends) + ); + } + + /** + * Get the model's relationships in array form. + * + * @return array + */ + public function relationsToArray() + { + $attributes = []; + + foreach ($this->getArrayableRelations() as $key => $value) { + // If the values implements the Arrayable interface we can just call this + // toArray method on the instances which will convert both models and + // collections to their proper array form and we'll set the values. + if ($value instanceof Arrayable) { + $relation = $value->toArray(); + } + + // If the value is null, we'll still go ahead and set it in this list of + // attributes since null is used to represent empty relationships if + // if it a has one or belongs to type relationships on the models. + elseif (is_null($value)) { + $relation = $value; + } + + // If the relationships snake-casing is enabled, we will snake case this + // key so that the relation attribute is snake cased in this returned + // array to the developers, making this consistent with attributes. + if (static::$snakeAttributes) { + $key = Str::snake($key); + } + + // If the relation value has been set, we will set it on this attributes + // list for returning. If it was not arrayable or null, we'll not set + // the value on the array because it is some type of invalid value. + if (isset($relation) || is_null($value)) { + $attributes[$key] = $relation; + } + + unset($relation); + } + + return $attributes; + } + + /** + * Get an attribute array of all arrayable relations. + * + * @return array + */ + protected function getArrayableRelations() + { + return $this->getArrayableItems($this->relations); + } + + /** + * Get an attribute array of all arrayable values. + * + * @param array $values + * @return array + */ + protected function getArrayableItems(array $values) + { + if (count($this->getVisible()) > 0) { + $values = array_intersect_key($values, array_flip($this->getVisible())); + } + + if (count($this->getHidden()) > 0) { + $values = array_diff_key($values, array_flip($this->getHidden())); + } + + return $values; + } + + /** + * Get an attribute from the model. + * + * @param string $key + * @return mixed + */ + public function getAttribute($key) + { + if (! $key) { + return; + } + + // If the attribute exists in the attribute array or has a "get" mutator we will + // get the attribute's value. Otherwise, we will proceed as if the developers + // are asking for a relationship's value. This covers both types of values. + if (array_key_exists($key, $this->attributes) || + $this->hasGetMutator($key)) { + return $this->getAttributeValue($key); + } + + // Here we will determine if the model base class itself contains this given key + // since we do not want to treat any of those methods are relationships since + // they are all intended as helper methods and none of these are relations. + if (method_exists(self::class, $key)) { + return; + } + + return $this->getRelationValue($key); + } + + /** + * Get a plain attribute (not a relationship). + * + * @param string $key + * @return mixed + */ + public function getAttributeValue($key) + { + $value = $this->getAttributeFromArray($key); + + // If the attribute has a get mutator, we will call that then return what + // it returns as the value, which is useful for transforming values on + // retrieval from the model to a form that is more useful for usage. + if ($this->hasGetMutator($key)) { + return $this->mutateAttribute($key, $value); + } + + // If the attribute exists within the cast array, we will convert it to + // an appropriate native PHP type dependant upon the associated value + // given with the key in the pair. Dayle made this comment line up. + if ($this->hasCast($key)) { + return $this->castAttribute($key, $value); + } + + // If the attribute is listed as a date, we will convert it to a DateTime + // instance on retrieval, which makes it quite convenient to work with + // date fields without having to create a mutator for each property. + if (in_array($key, $this->getDates()) && + ! is_null($value)) { + return $this->asDateTime($value); + } + + return $value; + } + + /** + * Get an attribute from the $attributes array. + * + * @param string $key + * @return mixed + */ + protected function getAttributeFromArray($key) + { + if (isset($this->attributes[$key])) { + return $this->attributes[$key]; + } + } + + /** + * Get a relationship. + * + * @param string $key + * @return mixed + */ + public function getRelationValue($key) + { + // If the key already exists in the relationships array, it just means the + // relationship has already been loaded, so we'll just return it out of + // here because there is no need to query within the relations twice. + if ($this->relationLoaded($key)) { + return $this->relations[$key]; + } + + // If the "attribute" exists as a method on the model, we will just assume + // it is a relationship and will load and return results from the query + // and hydrate the relationship's value on the "relationships" array. + if (method_exists($this, $key)) { + return $this->getRelationshipFromMethod($key); + } + } + + /** + * Get a relationship value from a method. + * + * @param string $method + * @return mixed + * + * @throws \LogicException + */ + protected function getRelationshipFromMethod($method) + { + $relation = $this->$method(); + + if (! $relation instanceof Relation) { + throw new LogicException('Relationship method must return an object of type ' + .'Illuminate\Database\Eloquent\Relations\Relation'); + } + + return tap($relation->getResults(), function ($results) use ($method) { + $this->setRelation($method, $results); + }); + } + + /** + * Determine if a get mutator exists for an attribute. + * + * @param string $key + * @return bool + */ + public function hasGetMutator($key) + { + return method_exists($this, 'get'.Str::studly($key).'Attribute'); + } + + /** + * Get the value of an attribute using its mutator. + * + * @param string $key + * @param mixed $value + * @return mixed + */ + protected function mutateAttribute($key, $value) + { + return $this->{'get'.Str::studly($key).'Attribute'}($value); + } + + /** + * Get the value of an attribute using its mutator for array conversion. + * + * @param string $key + * @param mixed $value + * @return mixed + */ + protected function mutateAttributeForArray($key, $value) + { + $value = $this->mutateAttribute($key, $value); + + return $value instanceof Arrayable ? $value->toArray() : $value; + } + + /** + * Cast an attribute to a native PHP type. + * + * @param string $key + * @param mixed $value + * @return mixed + */ + protected function castAttribute($key, $value) + { + if (is_null($value)) { + return $value; + } + + switch ($this->getCastType($key)) { + case 'int': + case 'integer': + return (int) $value; + case 'real': + case 'float': + case 'double': + return (float) $value; + case 'string': + return (string) $value; + case 'bool': + case 'boolean': + return (bool) $value; + case 'object': + return $this->fromJson($value, true); + case 'array': + case 'json': + return $this->fromJson($value); + case 'collection': + return new BaseCollection($this->fromJson($value)); + case 'date': + return $this->asDate($value); + case 'datetime': + return $this->asDateTime($value); + case 'timestamp': + return $this->asTimestamp($value); + default: + return $value; + } + } + + /** + * Get the type of cast for a model attribute. + * + * @param string $key + * @return string + */ + protected function getCastType($key) + { + return trim(strtolower($this->getCasts()[$key])); + } + + /** + * Set a given attribute on the model. + * + * @param string $key + * @param mixed $value + * @return $this + */ + public function setAttribute($key, $value) + { + // First we will check for the presence of a mutator for the set operation + // which simply lets the developers tweak the attribute as it is set on + // the model, such as "json_encoding" an listing of data for storage. + if ($this->hasSetMutator($key)) { + $method = 'set'.Str::studly($key).'Attribute'; + + return $this->{$method}($value); + } + + // If an attribute is listed as a "date", we'll convert it from a DateTime + // instance into a form proper for storage on the database tables using + // the connection grammar's date format. We will auto set the values. + elseif ($value && $this->isDateAttribute($key)) { + $value = $this->fromDateTime($value); + } + + if ($this->isJsonCastable($key) && ! is_null($value)) { + $value = $this->castAttributeAsJson($key, $value); + } + + // If this attribute contains a JSON ->, we'll set the proper value in the + // attribute's underlying array. This takes care of properly nesting an + // attribute in the array's value in the case of deeply nested items. + if (Str::contains($key, '->')) { + return $this->fillJsonAttribute($key, $value); + } + + $this->attributes[$key] = $value; + + return $this; + } + + /** + * Determine if a set mutator exists for an attribute. + * + * @param string $key + * @return bool + */ + public function hasSetMutator($key) + { + return method_exists($this, 'set'.Str::studly($key).'Attribute'); + } + + /** + * Determine if the given attribute is a date or date castable. + * + * @param string $key + * @return bool + */ + protected function isDateAttribute($key) + { + return in_array($key, $this->getDates()) || + $this->isDateCastable($key); + } + + /** + * Set a given JSON attribute on the model. + * + * @param string $key + * @param mixed $value + * @return $this + */ + public function fillJsonAttribute($key, $value) + { + list($key, $path) = explode('->', $key, 2); + + $this->attributes[$key] = $this->asJson($this->getArrayAttributeWithValue( + $path, $key, $value + )); + + return $this; + } + + /** + * Get an array attribute with the given key and value set. + * + * @param string $path + * @param string $key + * @param mixed $value + * @return $this + */ + protected function getArrayAttributeWithValue($path, $key, $value) + { + return tap($this->getArrayAttributeByKey($key), function (&$array) use ($path, $value) { + Arr::set($array, str_replace('->', '.', $path), $value); + }); + } + + /** + * Get an array attribute or return an empty array if it is not set. + * + * @param string $key + * @return array + */ + protected function getArrayAttributeByKey($key) + { + return isset($this->attributes[$key]) ? + $this->fromJson($this->attributes[$key]) : []; + } + + /** + * Cast the given attribute to JSON. + * + * @param string $key + * @param mixed $value + * @return string + */ + protected function castAttributeAsJson($key, $value) + { + $value = $this->asJson($value); + + if ($value === false) { + throw JsonEncodingException::forAttribute( + $this, $key, json_last_error_msg() + ); + } + + return $value; + } + + /** + * Encode the given value as JSON. + * + * @param mixed $value + * @return string + */ + protected function asJson($value) + { + return json_encode($value); + } + + /** + * Decode the given JSON back into an array or object. + * + * @param string $value + * @param bool $asObject + * @return mixed + */ + public function fromJson($value, $asObject = false) + { + return json_decode($value, ! $asObject); + } + + /** + * Return a timestamp as DateTime object with time set to 00:00:00. + * + * @param mixed $value + * @return \Carbon\Carbon + */ + protected function asDate($value) + { + return $this->asDateTime($value)->startOfDay(); + } + + /** + * Return a timestamp as DateTime object. + * + * @param mixed $value + * @return \Carbon\Carbon + */ + protected function asDateTime($value) + { + // If this value is already a Carbon instance, we shall just return it as is. + // This prevents us having to re-instantiate a Carbon instance when we know + // it already is one, which wouldn't be fulfilled by the DateTime check. + if ($value instanceof Carbon) { + 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 ($value instanceof DateTimeInterface) { + return new Carbon( + $value->format('Y-m-d H:i:s.u'), $value->getTimezone() + ); + } + + // If this value is an integer, we will assume it is a UNIX timestamp's value + // and format a Carbon object from this timestamp. This allows flexibility + // when defining your date fields as they might be UNIX timestamps here. + if (is_numeric($value)) { + return Carbon::createFromTimestamp($value); + } + + // If the value is in simply year, month, day format, we will instantiate the + // Carbon instances from that format. Again, this provides for simple date + // fields on the database, while still supporting Carbonized conversion. + if ($this->isStandardDateFormat($value)) { + return Carbon::createFromFormat('Y-m-d', $value)->startOfDay(); + } + + // Finally, we will just assume this date is in the format used by default on + // the database connection and use that format to create the Carbon object + // that is returned back out to the developers after we convert it here. + return Carbon::createFromFormat( + $this->getDateFormat(), $value + ); + } + + /** + * Determine if the given value is a standard date format. + * + * @param string $value + * @return bool + */ + protected function isStandardDateFormat($value) + { + return preg_match('/^(\d{4})-(\d{1,2})-(\d{1,2})$/', $value); + } + + /** + * Convert a DateTime to a storable string. + * + * @param \DateTime|int $value + * @return string + */ + public function fromDateTime($value) + { + return $this->asDateTime($value)->format( + $this->getDateFormat() + ); + } + + /** + * Return a timestamp as unix timestamp. + * + * @param mixed $value + * @return int + */ + protected function asTimestamp($value) + { + return $this->asDateTime($value)->getTimestamp(); + } + + /** + * Prepare a date for array / JSON serialization. + * + * @param \DateTimeInterface $date + * @return string + */ + protected function serializeDate(DateTimeInterface $date) + { + return $date->format($this->getDateFormat()); + } + + /** + * Get the attributes that should be converted to dates. + * + * @return array + */ + public function getDates() + { + $defaults = [static::CREATED_AT, static::UPDATED_AT]; + + return $this->usesTimestamps() ? array_merge($this->dates, $defaults) : $this->dates; + } + + /** + * Get the format for database stored dates. + * + * @return string + */ + protected function getDateFormat() + { + return $this->dateFormat ?: $this->getConnection()->getQueryGrammar()->getDateFormat(); + } + + /** + * Set the date format used by the model. + * + * @param string $format + * @return $this + */ + public function setDateFormat($format) + { + $this->dateFormat = $format; + + return $this; + } + + /** + * Determine whether an attribute should be cast to a native type. + * + * @param string $key + * @param array|string|null $types + * @return bool + */ + public function hasCast($key, $types = null) + { + if (array_key_exists($key, $this->getCasts())) { + return $types ? in_array($this->getCastType($key), (array) $types, true) : true; + } + + return false; + } + + /** + * Get the casts array. + * + * @return array + */ + public function getCasts() + { + if ($this->getIncrementing()) { + return array_merge([$this->getKeyName() => $this->getKeyType()], $this->casts); + } + + return $this->casts; + } + + /** + * Determine whether a value is Date / DateTime castable for inbound manipulation. + * + * @param string $key + * @return bool + */ + protected function isDateCastable($key) + { + return $this->hasCast($key, ['date', 'datetime']); + } + + /** + * Determine whether a value is JSON castable for inbound manipulation. + * + * @param string $key + * @return bool + */ + protected function isJsonCastable($key) + { + return $this->hasCast($key, ['array', 'json', 'object', 'collection']); + } + + /** + * Get all of the current attributes on the model. + * + * @return array + */ + public function getAttributes() + { + return $this->attributes; + } + + /** + * Set the array of model attributes. No checking is done. + * + * @param array $attributes + * @param bool $sync + * @return $this + */ + public function setRawAttributes(array $attributes, $sync = false) + { + $this->attributes = $attributes; + + if ($sync) { + $this->syncOriginal(); + } + + return $this; + } + + /** + * Get the model's original attribute values. + * + * @param string|null $key + * @param mixed $default + * @return mixed|array + */ + public function getOriginal($key = null, $default = null) + { + return Arr::get($this->original, $key, $default); + } + + /** + * Sync the original attributes with the current. + * + * @return $this + */ + public function syncOriginal() + { + $this->original = $this->attributes; + + return $this; + } + + /** + * Sync a single original attribute with its current value. + * + * @param string $attribute + * @return $this + */ + public function syncOriginalAttribute($attribute) + { + $this->original[$attribute] = $this->attributes[$attribute]; + + return $this; + } + + /** + * Determine if the model or given attribute(s) have been modified. + * + * @param array|string|null $attributes + * @return bool + */ + public function isDirty($attributes = null) + { + $dirty = $this->getDirty(); + + // If no specific attributes were provided, we will just see if the dirty array + // already contains any attributes. If it does we will just return that this + // count is greater than zero. Else, we need to check specific attributes. + if (is_null($attributes)) { + return count($dirty) > 0; + } + + $attributes = is_array($attributes) + ? $attributes : func_get_args(); + + // Here we will spin through every attribute and see if this is in the array of + // dirty attributes. If it is, we will return true and if we make it through + // all of the attributes for the entire array we will return false at end. + foreach ($attributes as $attribute) { + if (array_key_exists($attribute, $dirty)) { + return true; + } + } + + return false; + } + + /** + * Determine if the model or given attribute(s) have remained the same. + * + * @param array|string|null $attributes + * @return bool + */ + public function isClean($attributes = null) + { + return ! $this->isDirty(...func_get_args()); + } + + /** + * Get the attributes that have been changed since last sync. + * + * @return array + */ + public function getDirty() + { + $dirty = []; + + foreach ($this->attributes as $key => $value) { + if (! array_key_exists($key, $this->original)) { + $dirty[$key] = $value; + } elseif ($value !== $this->original[$key] && + ! $this->originalIsNumericallyEquivalent($key)) { + $dirty[$key] = $value; + } + } + + return $dirty; + } + + /** + * Determine if the new and old values for a given key are numerically equivalent. + * + * @param string $key + * @return bool + */ + protected function originalIsNumericallyEquivalent($key) + { + $current = $this->attributes[$key]; + + $original = $this->original[$key]; + + // This method checks if the two values are numerically equivalent even if they + // are different types. This is in case the two values are not the same type + // we can do a fair comparison of the two values to know if this is dirty. + return is_numeric($current) && is_numeric($original) + && strcmp((string) $current, (string) $original) === 0; + } + + /** + * Append attributes to query when building a query. + * + * @param array|string $attributes + * @return $this + */ + public function append($attributes) + { + $this->appends = array_unique( + array_merge($this->appends, is_string($attributes) ? func_get_args() : $attributes) + ); + + return $this; + } + + /** + * Set the accessors to append to model arrays. + * + * @param array $appends + * @return $this + */ + public function setAppends(array $appends) + { + $this->appends = $appends; + + return $this; + } + + /** + * Get the mutated attributes for a given instance. + * + * @return array + */ + public function getMutatedAttributes() + { + $class = static::class; + + if (! isset(static::$mutatorCache[$class])) { + static::cacheMutatedAttributes($class); + } + + return static::$mutatorCache[$class]; + } + + /** + * Extract and cache all the mutated attributes of a class. + * + * @param string $class + * @return void + */ + public static function cacheMutatedAttributes($class) + { + static::$mutatorCache[$class] = collect(static::getMutatorMethods($class))->map(function ($match) { + return lcfirst(static::$snakeAttributes ? Str::snake($match) : $match); + })->all(); + } + + /** + * Get all of the attribute mutator methods. + * + * @param mixed $class + * @return array + */ + protected static function getMutatorMethods($class) + { + preg_match_all('/(?<=^|;)get([^;]+?)Attribute(;|$)/', implode(';', get_class_methods($class)), $matches); + + return $matches[1]; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasEvents.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasEvents.php new file mode 100644 index 0000000..14874e8 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasEvents.php @@ -0,0 +1,325 @@ +getObservableEvents() as $event) { + if (method_exists($class, $event)) { + static::registerModelEvent($event, $className.'@'.$event); + } + } + } + + /** + * Get the observable event names. + * + * @return array + */ + public function getObservableEvents() + { + return array_merge( + [ + 'creating', 'created', 'updating', 'updated', + 'deleting', 'deleted', 'saving', 'saved', + 'restoring', 'restored', + ], + $this->observables + ); + } + + /** + * Set the observable event names. + * + * @param array $observables + * @return $this + */ + public function setObservableEvents(array $observables) + { + $this->observables = $observables; + + return $this; + } + + /** + * Add an observable event name. + * + * @param array|mixed $observables + * @return void + */ + public function addObservableEvents($observables) + { + $this->observables = array_unique(array_merge( + $this->observables, is_array($observables) ? $observables : func_get_args() + )); + } + + /** + * Remove an observable event name. + * + * @param array|mixed $observables + * @return void + */ + public function removeObservableEvents($observables) + { + $this->observables = array_diff( + $this->observables, is_array($observables) ? $observables : func_get_args() + ); + } + + /** + * Register a model event with the dispatcher. + * + * @param string $event + * @param \Closure|string $callback + * @return void + */ + protected static function registerModelEvent($event, $callback) + { + if (isset(static::$dispatcher)) { + $name = static::class; + + static::$dispatcher->listen("eloquent.{$event}: {$name}", $callback); + } + } + + /** + * Fire the given event for the model. + * + * @param string $event + * @param bool $halt + * @return mixed + */ + protected function fireModelEvent($event, $halt = true) + { + if (! isset(static::$dispatcher)) { + return true; + } + + // First, we will get the proper method to call on the event dispatcher, and then we + // will attempt to fire a custom, object based event for the given event. If that + // returns a result we can return that result, or we'll call the string events. + $method = $halt ? 'until' : 'fire'; + + $result = $this->filterModelEventResults( + $this->fireCustomModelEvent($event, $method) + ); + + if ($result === false) { + return false; + } + + return ! empty($result) ? $result : static::$dispatcher->{$method}( + "eloquent.{$event}: ".static::class, $this + ); + } + + /** + * Fire a custom model event for the given event. + * + * @param string $event + * @param string $method + * @return mixed|null + */ + protected function fireCustomModelEvent($event, $method) + { + if (! isset($this->events[$event])) { + return; + } + + $result = static::$dispatcher->$method(new $this->events[$event]($this)); + + if (! is_null($result)) { + return $result; + } + } + + /** + * Filter the model event results. + * + * @param mixed $result + * @return mixed + */ + protected function filterModelEventResults($result) + { + if (is_array($result)) { + $result = array_filter($result, function ($response) { + return ! is_null($response); + }); + } + + return $result; + } + + /** + * Register a saving model event with the dispatcher. + * + * @param \Closure|string $callback + * @return void + */ + public static function saving($callback) + { + static::registerModelEvent('saving', $callback); + } + + /** + * Register a saved model event with the dispatcher. + * + * @param \Closure|string $callback + * @return void + */ + public static function saved($callback) + { + static::registerModelEvent('saved', $callback); + } + + /** + * Register an updating model event with the dispatcher. + * + * @param \Closure|string $callback + * @return void + */ + public static function updating($callback) + { + static::registerModelEvent('updating', $callback); + } + + /** + * Register an updated model event with the dispatcher. + * + * @param \Closure|string $callback + * @return void + */ + public static function updated($callback) + { + static::registerModelEvent('updated', $callback); + } + + /** + * Register a creating model event with the dispatcher. + * + * @param \Closure|string $callback + * @return void + */ + public static function creating($callback) + { + static::registerModelEvent('creating', $callback); + } + + /** + * Register a created model event with the dispatcher. + * + * @param \Closure|string $callback + * @return void + */ + public static function created($callback) + { + static::registerModelEvent('created', $callback); + } + + /** + * Register a deleting model event with the dispatcher. + * + * @param \Closure|string $callback + * @return void + */ + public static function deleting($callback) + { + static::registerModelEvent('deleting', $callback); + } + + /** + * Register a deleted model event with the dispatcher. + * + * @param \Closure|string $callback + * @return void + */ + public static function deleted($callback) + { + static::registerModelEvent('deleted', $callback); + } + + /** + * Remove all of the event listeners for the model. + * + * @return void + */ + public static function flushEventListeners() + { + if (! isset(static::$dispatcher)) { + return; + } + + $instance = new static; + + foreach ($instance->getObservableEvents() as $event) { + static::$dispatcher->forget("eloquent.{$event}: ".static::class); + } + } + + /** + * Get the event dispatcher instance. + * + * @return \Illuminate\Contracts\Events\Dispatcher + */ + public static function getEventDispatcher() + { + return static::$dispatcher; + } + + /** + * Set the event dispatcher instance. + * + * @param \Illuminate\Contracts\Events\Dispatcher $dispatcher + * @return void + */ + public static function setEventDispatcher(Dispatcher $dispatcher) + { + static::$dispatcher = $dispatcher; + } + + /** + * Unset the event dispatcher for models. + * + * @return void + */ + public static function unsetEventDispatcher() + { + static::$dispatcher = null; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasGlobalScopes.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasGlobalScopes.php new file mode 100644 index 0000000..97a549f --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasGlobalScopes.php @@ -0,0 +1,71 @@ +newRelatedInstance($related); + + $foreignKey = $foreignKey ?: $this->getForeignKey(); + + $localKey = $localKey ?: $this->getKeyName(); + + return new HasOne($instance->newQuery(), $this, $instance->getTable().'.'.$foreignKey, $localKey); + } + + /** + * Define a polymorphic one-to-one relationship. + * + * @param string $related + * @param string $name + * @param string $type + * @param string $id + * @param string $localKey + * @return \Illuminate\Database\Eloquent\Relations\MorphOne + */ + public function morphOne($related, $name, $type = null, $id = null, $localKey = null) + { + $instance = $this->newRelatedInstance($related); + + list($type, $id) = $this->getMorphs($name, $type, $id); + + $table = $instance->getTable(); + + $localKey = $localKey ?: $this->getKeyName(); + + return new MorphOne($instance->newQuery(), $this, $table.'.'.$type, $table.'.'.$id, $localKey); + } + + /** + * Define an inverse one-to-one or many relationship. + * + * @param string $related + * @param string $foreignKey + * @param string $ownerKey + * @param string $relation + * @return \Illuminate\Database\Eloquent\Relations\BelongsTo + */ + public function belongsTo($related, $foreignKey = null, $ownerKey = null, $relation = null) + { + // If no relation name was given, we will use this debug backtrace to extract + // the calling method's name and use that as the relationship name as most + // of the time this will be what we desire to use for the relationships. + if (is_null($relation)) { + $relation = $this->guessBelongsToRelation(); + } + + $instance = $this->newRelatedInstance($related); + + // If no foreign key was supplied, we can use a backtrace to guess the proper + // foreign key name by using the name of the relationship function, which + // when combined with an "_id" should conventionally match the columns. + if (is_null($foreignKey)) { + $foreignKey = Str::snake($relation).'_'.$instance->getKeyName(); + } + + // Once we have the foreign key names, we'll just create a new Eloquent query + // for the related models and returns the relationship instance which will + // actually be responsible for retrieving and hydrating every relations. + $ownerKey = $ownerKey ?: $instance->getKeyName(); + + return new BelongsTo( + $instance->newQuery(), $this, $foreignKey, $ownerKey, $relation + ); + } + + /** + * Define a polymorphic, inverse one-to-one or many relationship. + * + * @param string $name + * @param string $type + * @param string $id + * @return \Illuminate\Database\Eloquent\Relations\MorphTo + */ + public function morphTo($name = null, $type = null, $id = null) + { + // If no name is provided, we will use the backtrace to get the function name + // since that is most likely the name of the polymorphic interface. We can + // use that to get both the class and foreign key that will be utilized. + $name = $name ?: $this->guessBelongsToRelation(); + + list($type, $id) = $this->getMorphs( + Str::snake($name), $type, $id + ); + + // If the type value is null it is probably safe to assume we're eager loading + // the relationship. In this case we'll just pass in a dummy query where we + // need to remove any eager loads that may already be defined on a model. + return empty($class = $this->{$type}) + ? $this->morphEagerTo($name, $type, $id) + : $this->morphInstanceTo($class, $name, $type, $id); + } + + /** + * Define a polymorphic, inverse one-to-one or many relationship. + * + * @param string $name + * @param string $type + * @param string $id + * @return \Illuminate\Database\Eloquent\Relations\MorphTo + */ + protected function morphEagerTo($name, $type, $id) + { + return new MorphTo( + $this->newQuery()->setEagerLoads([]), $this, $id, null, $type, $name + ); + } + + /** + * Define a polymorphic, inverse one-to-one or many relationship. + * + * @param string $target + * @param string $name + * @param string $type + * @param string $id + * @return \Illuminate\Database\Eloquent\Relations\MorphTo + */ + protected function morphInstanceTo($target, $name, $type, $id) + { + $instance = $this->newRelatedInstance( + static::getActualClassNameForMorph($target) + ); + + return new MorphTo( + $instance->newQuery(), $this, $id, $instance->getKeyName(), $type, $name + ); + } + + /** + * Retrieve the actual class name for a given morph class. + * + * @param string $class + * @return string + */ + public static function getActualClassNameForMorph($class) + { + return Arr::get(Relation::morphMap(), $class, $class); + } + + /** + * Guess the "belongs to" relationship name. + * + * @return string + */ + protected function guessBelongsToRelation() + { + list($one, $two, $caller) = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 3); + + return $caller['function']; + } + + /** + * Define a one-to-many relationship. + * + * @param string $related + * @param string $foreignKey + * @param string $localKey + * @return \Illuminate\Database\Eloquent\Relations\HasMany + */ + public function hasMany($related, $foreignKey = null, $localKey = null) + { + $instance = $this->newRelatedInstance($related); + + $foreignKey = $foreignKey ?: $this->getForeignKey(); + + $localKey = $localKey ?: $this->getKeyName(); + + return new HasMany( + $instance->newQuery(), $this, $instance->getTable().'.'.$foreignKey, $localKey + ); + } + + /** + * Define a has-many-through relationship. + * + * @param string $related + * @param string $through + * @param string|null $firstKey + * @param string|null $secondKey + * @param string|null $localKey + * @return \Illuminate\Database\Eloquent\Relations\HasManyThrough + */ + public function hasManyThrough($related, $through, $firstKey = null, $secondKey = null, $localKey = null) + { + $through = new $through; + + $firstKey = $firstKey ?: $this->getForeignKey(); + + $secondKey = $secondKey ?: $through->getForeignKey(); + + $localKey = $localKey ?: $this->getKeyName(); + + $instance = $this->newRelatedInstance($related); + + return new HasManyThrough($instance->newQuery(), $this, $through, $firstKey, $secondKey, $localKey); + } + + /** + * Define a polymorphic one-to-many relationship. + * + * @param string $related + * @param string $name + * @param string $type + * @param string $id + * @param string $localKey + * @return \Illuminate\Database\Eloquent\Relations\MorphMany + */ + public function morphMany($related, $name, $type = null, $id = null, $localKey = null) + { + $instance = $this->newRelatedInstance($related); + + // Here we will gather up the morph type and ID for the relationship so that we + // can properly query the intermediate table of a relation. Finally, we will + // get the table and create the relationship instances for the developers. + list($type, $id) = $this->getMorphs($name, $type, $id); + + $table = $instance->getTable(); + + $localKey = $localKey ?: $this->getKeyName(); + + return new MorphMany($instance->newQuery(), $this, $table.'.'.$type, $table.'.'.$id, $localKey); + } + + /** + * Define a many-to-many relationship. + * + * @param string $related + * @param string $table + * @param string $foreignKey + * @param string $relatedKey + * @param string $relation + * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany + */ + public function belongsToMany($related, $table = null, $foreignKey = null, $relatedKey = null, $relation = null) + { + // If no relationship name was passed, we will pull backtraces to get the + // name of the calling function. We will use that function name as the + // title of this relation since that is a great convention to apply. + if (is_null($relation)) { + $relation = $this->guessBelongsToManyRelation(); + } + + // First, we'll need to determine the foreign key and "other key" for the + // relationship. Once we have determined the keys we'll make the query + // instances as well as the relationship instances we need for this. + $instance = $this->newRelatedInstance($related); + + $foreignKey = $foreignKey ?: $this->getForeignKey(); + + $relatedKey = $relatedKey ?: $instance->getForeignKey(); + + // If no table name was provided, we can guess it by concatenating the two + // models using underscores in alphabetical order. The two model names + // are transformed to snake case from their default CamelCase also. + if (is_null($table)) { + $table = $this->joiningTable($related); + } + + return new BelongsToMany( + $instance->newQuery(), $this, $table, $foreignKey, $relatedKey, $relation + ); + } + + /** + * Define a polymorphic many-to-many relationship. + * + * @param string $related + * @param string $name + * @param string $table + * @param string $foreignKey + * @param string $relatedKey + * @param bool $inverse + * @return \Illuminate\Database\Eloquent\Relations\MorphToMany + */ + public function morphToMany($related, $name, $table = null, $foreignKey = null, $relatedKey = null, $inverse = false) + { + $caller = $this->guessBelongsToManyRelation(); + + // First, we will need to determine the foreign key and "other key" for the + // relationship. Once we have determined the keys we will make the query + // instances, as well as the relationship instances we need for these. + $instance = $this->newRelatedInstance($related); + + $foreignKey = $foreignKey ?: $name.'_id'; + + $relatedKey = $relatedKey ?: $instance->getForeignKey(); + + // Now we're ready to create a new query builder for this related model and + // the relationship instances for this relation. This relations will set + // appropriate query constraints then entirely manages the hydrations. + $table = $table ?: Str::plural($name); + + return new MorphToMany( + $instance->newQuery(), $this, $name, $table, + $foreignKey, $relatedKey, $caller, $inverse + ); + } + + /** + * Define a polymorphic, inverse many-to-many relationship. + * + * @param string $related + * @param string $name + * @param string $table + * @param string $foreignKey + * @param string $relatedKey + * @return \Illuminate\Database\Eloquent\Relations\MorphToMany + */ + public function morphedByMany($related, $name, $table = null, $foreignKey = null, $relatedKey = null) + { + $foreignKey = $foreignKey ?: $this->getForeignKey(); + + // For the inverse of the polymorphic many-to-many relations, we will change + // the way we determine the foreign and other keys, as it is the opposite + // of the morph-to-many method since we're figuring out these inverses. + $relatedKey = $relatedKey ?: $name.'_id'; + + return $this->morphToMany($related, $name, $table, $foreignKey, $relatedKey, true); + } + + /** + * Get the relationship name of the belongs to many. + * + * @return string + */ + protected function guessBelongsToManyRelation() + { + $caller = Arr::first(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS), function ($trace) { + return ! in_array($trace['function'], Model::$manyMethods); + }); + + return ! is_null($caller) ? $caller['function'] : null; + } + + /** + * Get the joining table name for a many-to-many relation. + * + * @param string $related + * @return string + */ + public function joiningTable($related) + { + // The joining table name, by convention, is simply the snake cased models + // sorted alphabetically and concatenated with an underscore, so we can + // just sort the models and join them together to get the table name. + $models = [ + Str::snake(class_basename($related)), + Str::snake(class_basename($this)), + ]; + + // Now that we have the model names in an array we can just sort them and + // use the implode function to join them together with an underscores, + // which is typically used by convention within the database system. + sort($models); + + return strtolower(implode('_', $models)); + } + + /** + * Determine if the model touches a given relation. + * + * @param string $relation + * @return bool + */ + public function touches($relation) + { + return in_array($relation, $this->touches); + } + + /** + * Touch the owning relations of the model. + * + * @return void + */ + public function touchOwners() + { + foreach ($this->touches as $relation) { + $this->$relation()->touch(); + + if ($this->$relation instanceof self) { + $this->$relation->fireModelEvent('saved', false); + + $this->$relation->touchOwners(); + } elseif ($this->$relation instanceof Collection) { + $this->$relation->each(function (Model $relation) { + $relation->touchOwners(); + }); + } + } + } + + /** + * Get the polymorphic relationship columns. + * + * @param string $name + * @param string $type + * @param string $id + * @return array + */ + protected function getMorphs($name, $type, $id) + { + return [$type ?: $name.'_type', $id ?: $name.'_id']; + } + + /** + * Get the class name for polymorphic relations. + * + * @return string + */ + public function getMorphClass() + { + $morphMap = Relation::morphMap(); + + if (! empty($morphMap) && in_array(static::class, $morphMap)) { + return array_search(static::class, $morphMap, true); + } + + return static::class; + } + + /** + * Create a new model instance for a related model. + * + * @param string $class + * @return mixed + */ + protected function newRelatedInstance($class) + { + return tap(new $class, function ($instance) { + if (! $instance->getConnectionName()) { + $instance->setConnection($this->connection); + } + }); + } + + /** + * Get all the loaded relations for the instance. + * + * @return array + */ + public function getRelations() + { + return $this->relations; + } + + /** + * Get a specified relationship. + * + * @param string $relation + * @return mixed + */ + public function getRelation($relation) + { + return $this->relations[$relation]; + } + + /** + * Determine if the given relation is loaded. + * + * @param string $key + * @return bool + */ + public function relationLoaded($key) + { + return array_key_exists($key, $this->relations); + } + + /** + * Set the specific relationship in the model. + * + * @param string $relation + * @param mixed $value + * @return $this + */ + public function setRelation($relation, $value) + { + $this->relations[$relation] = $value; + + return $this; + } + + /** + * Set the entire relations array on the model. + * + * @param array $relations + * @return $this + */ + public function setRelations(array $relations) + { + $this->relations = $relations; + + return $this; + } + + /** + * Get the relationships that are touched on save. + * + * @return array + */ + public function getTouchedRelations() + { + return $this->touches; + } + + /** + * Set the relationships that are touched on save. + * + * @param array $touches + * @return $this + */ + public function setTouchedRelations(array $touches) + { + $this->touches = $touches; + + return $this; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasTimestamps.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasTimestamps.php new file mode 100644 index 0000000..ba640fe --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasTimestamps.php @@ -0,0 +1,125 @@ +usesTimestamps()) { + return false; + } + + $this->updateTimestamps(); + + return $this->save(); + } + + /** + * Update the creation and update timestamps. + * + * @return void + */ + protected function updateTimestamps() + { + $time = $this->freshTimestamp(); + + if (! $this->isDirty(static::UPDATED_AT)) { + $this->setUpdatedAt($time); + } + + if (! $this->exists && ! $this->isDirty(static::CREATED_AT)) { + $this->setCreatedAt($time); + } + } + + /** + * Set the value of the "created at" attribute. + * + * @param mixed $value + * @return $this + */ + public function setCreatedAt($value) + { + $this->{static::CREATED_AT} = $value; + + return $this; + } + + /** + * Set the value of the "updated at" attribute. + * + * @param mixed $value + * @return $this + */ + public function setUpdatedAt($value) + { + $this->{static::UPDATED_AT} = $value; + + return $this; + } + + /** + * Get a fresh timestamp for the model. + * + * @return \Carbon\Carbon + */ + public function freshTimestamp() + { + return new Carbon; + } + + /** + * Get a fresh timestamp for the model. + * + * @return string + */ + public function freshTimestampString() + { + return $this->fromDateTime($this->freshTimestamp()); + } + + /** + * Determine if the model uses timestamps. + * + * @return bool + */ + public function usesTimestamps() + { + return $this->timestamps; + } + + /** + * Get the name of the "created at" column. + * + * @return string + */ + public function getCreatedAtColumn() + { + return static::CREATED_AT; + } + + /** + * Get the name of the "updated at" column. + * + * @return string + */ + public function getUpdatedAtColumn() + { + return static::UPDATED_AT; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HidesAttributes.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HidesAttributes.php new file mode 100644 index 0000000..7bd9ef9 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HidesAttributes.php @@ -0,0 +1,126 @@ +hidden; + } + + /** + * Set the hidden attributes for the model. + * + * @param array $hidden + * @return $this + */ + public function setHidden(array $hidden) + { + $this->hidden = $hidden; + + return $this; + } + + /** + * Add hidden attributes for the model. + * + * @param array|string|null $attributes + * @return void + */ + public function addHidden($attributes = null) + { + $this->hidden = array_merge( + $this->hidden, is_array($attributes) ? $attributes : func_get_args() + ); + } + + /** + * Get the visible attributes for the model. + * + * @return array + */ + public function getVisible() + { + return $this->visible; + } + + /** + * Set the visible attributes for the model. + * + * @param array $visible + * @return $this + */ + public function setVisible(array $visible) + { + $this->visible = $visible; + + return $this; + } + + /** + * Add visible attributes for the model. + * + * @param array|string|null $attributes + * @return void + */ + public function addVisible($attributes = null) + { + $this->visible = array_merge( + $this->visible, is_array($attributes) ? $attributes : func_get_args() + ); + } + + /** + * Make the given, typically hidden, attributes visible. + * + * @param array|string $attributes + * @return $this + */ + public function makeVisible($attributes) + { + $this->hidden = array_diff($this->hidden, (array) $attributes); + + if (! empty($this->visible)) { + $this->addVisible($attributes); + } + + return $this; + } + + /** + * Make the given, typically visible, attributes hidden. + * + * @param array|string $attributes + * @return $this + */ + public function makeHidden($attributes) + { + $attributes = (array) $attributes; + + $this->visible = array_diff($this->visible, $attributes); + + $this->hidden = array_unique(array_merge($this->hidden, $attributes)); + + return $this; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/QueriesRelationships.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/QueriesRelationships.php new file mode 100644 index 0000000..f7d5a0a --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/QueriesRelationships.php @@ -0,0 +1,286 @@ +=', $count = 1, $boolean = 'and', Closure $callback = null) + { + if (strpos($relation, '.') !== false) { + return $this->hasNested($relation, $operator, $count, $boolean, $callback); + } + + $relation = $this->getRelationWithoutConstraints($relation); + + // If we only need to check for the existence of the relation, then we can optimize + // the subquery to only run a "where exists" clause instead of this full "count" + // clause. This will make these queries run much faster compared with a count. + $method = $this->canUseExistsForExistenceCheck($operator, $count) + ? 'getRelationExistenceQuery' + : 'getRelationExistenceCountQuery'; + + $hasQuery = $relation->{$method}( + $relation->getRelated()->newQuery(), $this + ); + + // Next we will call any given callback as an "anonymous" scope so they can get the + // proper logical grouping of the where clauses if needed by this Eloquent query + // builder. Then, we will be ready to finalize and return this query instance. + if ($callback) { + $hasQuery->callScope($callback); + } + + return $this->addHasWhere( + $hasQuery, $relation, $operator, $count, $boolean + ); + } + + /** + * Add nested relationship count / exists conditions to the query. + * + * Sets up recursive call to whereHas until we finish the nested relation. + * + * @param string $relations + * @param string $operator + * @param int $count + * @param string $boolean + * @param \Closure|null $callback + * @return \Illuminate\Database\Eloquent\Builder|static + */ + protected function hasNested($relations, $operator = '>=', $count = 1, $boolean = 'and', $callback = null) + { + $relations = explode('.', $relations); + + $closure = function ($q) use (&$closure, &$relations, $operator, $count, $boolean, $callback) { + // In order to nest "has", we need to add count relation constraints on the + // callback Closure. We'll do this by simply passing the Closure its own + // reference to itself so it calls itself recursively on each segment. + count($relations) > 1 + ? $q->whereHas(array_shift($relations), $closure) + : $q->has(array_shift($relations), $operator, $count, 'and', $callback); + }; + + return $this->has(array_shift($relations), '>=', 1, $boolean, $closure); + } + + /** + * Add a relationship count / exists condition to the query with an "or". + * + * @param string $relation + * @param string $operator + * @param int $count + * @return \Illuminate\Database\Eloquent\Builder|static + */ + public function orHas($relation, $operator = '>=', $count = 1) + { + return $this->has($relation, $operator, $count, 'or'); + } + + /** + * Add a relationship count / exists condition to the query. + * + * @param string $relation + * @param string $boolean + * @param \Closure|null $callback + * @return \Illuminate\Database\Eloquent\Builder|static + */ + public function doesntHave($relation, $boolean = 'and', Closure $callback = null) + { + return $this->has($relation, '<', 1, $boolean, $callback); + } + + /** + * Add a relationship count / exists condition to the query with where clauses. + * + * @param string $relation + * @param \Closure|null $callback + * @param string $operator + * @param int $count + * @return \Illuminate\Database\Eloquent\Builder|static + */ + public function whereHas($relation, Closure $callback = null, $operator = '>=', $count = 1) + { + return $this->has($relation, $operator, $count, 'and', $callback); + } + + /** + * Add a relationship count / exists condition to the query with where clauses and an "or". + * + * @param string $relation + * @param \Closure $callback + * @param string $operator + * @param int $count + * @return \Illuminate\Database\Eloquent\Builder|static + */ + public function orWhereHas($relation, Closure $callback = null, $operator = '>=', $count = 1) + { + return $this->has($relation, $operator, $count, 'or', $callback); + } + + /** + * Add a relationship count / exists condition to the query with where clauses. + * + * @param string $relation + * @param \Closure|null $callback + * @return \Illuminate\Database\Eloquent\Builder|static + */ + public function whereDoesntHave($relation, Closure $callback = null) + { + return $this->doesntHave($relation, 'and', $callback); + } + + /** + * Add subselect queries to count the relations. + * + * @param mixed $relations + * @return $this + */ + public function withCount($relations) + { + if (is_null($this->query->columns)) { + $this->query->select([$this->query->from.'.*']); + } + + $relations = is_array($relations) ? $relations : func_get_args(); + + foreach ($this->parseWithRelations($relations) as $name => $constraints) { + // First we will determine if the name has been aliased using an "as" clause on the name + // and if it has we will extract the actual relationship name and the desired name of + // the resulting column. This allows multiple counts on the same relationship name. + $segments = explode(' ', $name); + + unset($alias); + + if (count($segments) == 3 && Str::lower($segments[1]) == 'as') { + list($name, $alias) = [$segments[0], $segments[2]]; + } + + $relation = $this->getRelationWithoutConstraints($name); + + // Here we will get the relationship count query and prepare to add it to the main query + // as a sub-select. First, we'll get the "has" query and use that to get the relation + // count query. We will normalize the relation name then append _count as the name. + $query = $relation->getRelationExistenceCountQuery( + $relation->getRelated()->newQuery(), $this + ); + + $query->callScope($constraints); + + $query->mergeConstraintsFrom($relation->getQuery()); + + // Finally we will add the proper result column alias to the query and run the subselect + // statement against the query builder. Then we will return the builder instance back + // to the developer for further constraint chaining that needs to take place on it. + $column = snake_case(isset($alias) ? $alias : $name).'_count'; + + $this->selectSub($query->toBase(), $column); + } + + return $this; + } + + /** + * Add the "has" condition where clause to the query. + * + * @param \Illuminate\Database\Eloquent\Builder $hasQuery + * @param \Illuminate\Database\Eloquent\Relations\Relation $relation + * @param string $operator + * @param int $count + * @param string $boolean + * @return \Illuminate\Database\Eloquent\Builder|static + */ + protected function addHasWhere(Builder $hasQuery, Relation $relation, $operator, $count, $boolean) + { + $hasQuery->mergeConstraintsFrom($relation->getQuery()); + + return $this->canUseExistsForExistenceCheck($operator, $count) + ? $this->addWhereExistsQuery($hasQuery->toBase(), $boolean, $not = ($operator === '<' && $count === 1)) + : $this->addWhereCountQuery($hasQuery->toBase(), $operator, $count, $boolean); + } + + /** + * Merge the where constraints from another query to the current query. + * + * @param \Illuminate\Database\Eloquent\Builder $from + * @return \Illuminate\Database\Eloquent\Builder|static + */ + public function mergeConstraintsFrom(Builder $from) + { + $whereBindings = Arr::get( + $from->getQuery()->getRawBindings(), 'where', [] + ); + + // Here we have some other query that we want to merge the where constraints from. We will + // copy over any where constraints on the query as well as remove any global scopes the + // query might have removed. Then we will return ourselves with the finished merging. + return $this->withoutGlobalScopes( + $from->removedScopes() + )->mergeWheres( + $from->getQuery()->wheres, $whereBindings + ); + } + + /** + * Add a sub-query count clause to this query. + * + * @param \Illuminate\Database\Query\Builder $query + * @param string $operator + * @param int $count + * @param string $boolean + * @return $this + */ + protected function addWhereCountQuery(QueryBuilder $query, $operator = '>=', $count = 1, $boolean = 'and') + { + $this->query->addBinding($query->getBindings(), 'where'); + + return $this->where( + new Expression('('.$query->toSql().')'), + $operator, + is_numeric($count) ? new Expression($count) : $count, + $boolean + ); + } + + /** + * Get the "has relation" base query instance. + * + * @param string $relation + * @return \Illuminate\Database\Eloquent\Relations\Relation + */ + protected function getRelationWithoutConstraints($relation) + { + return Relation::noConstraints(function () use ($relation) { + return $this->getModel()->{$relation}(); + }); + } + + /** + * Check if we can run an "exists" query to optimize performance. + * + * @param string $operator + * @param int $count + * @return bool + */ + protected function canUseExistsForExistenceCheck($operator, $count) + { + return ($operator === '>=' || $operator === '<') && $count === 1; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Factory.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Factory.php new file mode 100644 index 0000000..0b57576 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Factory.php @@ -0,0 +1,253 @@ +faker = $faker; + } + + /** + * Create a new factory container. + * + * @param \Faker\Generator $faker + * @param string|null $pathToFactories + * @return static + */ + public static function construct(Faker $faker, $pathToFactories = null) + { + $pathToFactories = $pathToFactories ?: database_path('factories'); + + return (new static($faker))->load($pathToFactories); + } + + /** + * Define a class with a given short-name. + * + * @param string $class + * @param string $name + * @param callable $attributes + * @return $this + */ + public function defineAs($class, $name, callable $attributes) + { + return $this->define($class, $attributes, $name); + } + + /** + * Define a class with a given set of attributes. + * + * @param string $class + * @param callable $attributes + * @param string $name + * @return $this + */ + public function define($class, callable $attributes, $name = 'default') + { + $this->definitions[$class][$name] = $attributes; + + return $this; + } + + /** + * Define a state with a given set of attributes. + * + * @param string $class + * @param string $state + * @param callable $attributes + * @return $this + */ + public function state($class, $state, callable $attributes) + { + $this->states[$class][$state] = $attributes; + + return $this; + } + + /** + * Create an instance of the given model and persist it to the database. + * + * @param string $class + * @param array $attributes + * @return mixed + */ + public function create($class, array $attributes = []) + { + return $this->of($class)->create($attributes); + } + + /** + * Create an instance of the given model and type and persist it to the database. + * + * @param string $class + * @param string $name + * @param array $attributes + * @return mixed + */ + public function createAs($class, $name, array $attributes = []) + { + return $this->of($class, $name)->create($attributes); + } + + /** + * Create an instance of the given model. + * + * @param string $class + * @param array $attributes + * @return mixed + */ + public function make($class, array $attributes = []) + { + return $this->of($class)->make($attributes); + } + + /** + * Create an instance of the given model and type. + * + * @param string $class + * @param string $name + * @param array $attributes + * @return mixed + */ + public function makeAs($class, $name, array $attributes = []) + { + return $this->of($class, $name)->make($attributes); + } + + /** + * Get the raw attribute array for a given named model. + * + * @param string $class + * @param string $name + * @param array $attributes + * @return array + */ + public function rawOf($class, $name, array $attributes = []) + { + return $this->raw($class, $attributes, $name); + } + + /** + * Get the raw attribute array for a given model. + * + * @param string $class + * @param array $attributes + * @param string $name + * @return array + */ + public function raw($class, array $attributes = [], $name = 'default') + { + return array_merge( + call_user_func($this->definitions[$class][$name], $this->faker), $attributes + ); + } + + /** + * Create a builder for the given model. + * + * @param string $class + * @param string $name + * @return \Illuminate\Database\Eloquent\FactoryBuilder + */ + public function of($class, $name = 'default') + { + return new FactoryBuilder($class, $name, $this->definitions, $this->states, $this->faker); + } + + /** + * Load factories from path. + * + * @param string $path + * @return $this + */ + public function load($path) + { + $factory = $this; + + if (is_dir($path)) { + foreach (Finder::create()->files()->name('*.php')->in($path) as $file) { + require $file->getRealPath(); + } + } + + return $factory; + } + + /** + * Determine if the given offset exists. + * + * @param string $offset + * @return bool + */ + public function offsetExists($offset) + { + return isset($this->definitions[$offset]); + } + + /** + * Get the value of the given offset. + * + * @param string $offset + * @return mixed + */ + public function offsetGet($offset) + { + return $this->make($offset); + } + + /** + * Set the given offset to the given value. + * + * @param string $offset + * @param callable $value + * @return void + */ + public function offsetSet($offset, $value) + { + return $this->define($offset, $value); + } + + /** + * Unset the value at the given offset. + * + * @param string $offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->definitions[$offset]); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/FactoryBuilder.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/FactoryBuilder.php new file mode 100644 index 0000000..f3ebcd1 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/FactoryBuilder.php @@ -0,0 +1,246 @@ +name = $name; + $this->class = $class; + $this->faker = $faker; + $this->states = $states; + $this->definitions = $definitions; + } + + /** + * Set the amount of models you wish to create / make. + * + * @param int $amount + * @return $this + */ + public function times($amount) + { + $this->amount = $amount; + + return $this; + } + + /** + * Set the states to be applied to the model. + * + * @param array|dynamic $states + * @return $this + */ + public function states($states) + { + $this->activeStates = is_array($states) ? $states : func_get_args(); + + return $this; + } + + /** + * Create a collection of models and persist them to the database. + * + * @param array $attributes + * @return mixed + */ + public function create(array $attributes = []) + { + $results = $this->make($attributes); + + if ($results instanceof Model) { + $results->save(); + } else { + $results->each->save(); + } + + return $results; + } + + /** + * Create a collection of models. + * + * @param array $attributes + * @return mixed + */ + public function make(array $attributes = []) + { + if ($this->amount === null) { + return $this->makeInstance($attributes); + } + + if ($this->amount < 1) { + return (new $this->class)->newCollection(); + } + + return (new $this->class)->newCollection(array_map(function () use ($attributes) { + return $this->makeInstance($attributes); + }, range(1, $this->amount))); + } + + /** + * Create an array of raw attribute arrays. + * + * @param array $attributes + * @return mixed + */ + public function raw(array $attributes = []) + { + if ($this->amount === null) { + return $this->getRawAttributes($attributes); + } + + if ($this->amount < 1) { + return []; + } + + return array_map(function () use ($attributes) { + return $this->getRawAttributes($attributes); + }, range(1, $this->amount)); + } + + /** + * Get a raw attributes array for the model. + * + * @param array $attributes + * @return mixed + */ + protected function getRawAttributes(array $attributes = []) + { + $definition = call_user_func( + $this->definitions[$this->class][$this->name], + $this->faker, $attributes + ); + + return $this->callClosureAttributes( + array_merge($this->applyStates($definition, $attributes), $attributes) + ); + } + + /** + * Make an instance of the model with the given attributes. + * + * @param array $attributes + * @return \Illuminate\Database\Eloquent\Model + * + * @throws \InvalidArgumentException + */ + protected function makeInstance(array $attributes = []) + { + return Model::unguarded(function () use ($attributes) { + if (! isset($this->definitions[$this->class][$this->name])) { + throw new InvalidArgumentException("Unable to locate factory with name [{$this->name}] [{$this->class}]."); + } + + return new $this->class( + $this->getRawAttributes($attributes) + ); + }); + } + + /** + * Apply the active states to the model definition array. + * + * @param array $definition + * @param array $attributes + * @return array + */ + protected function applyStates(array $definition, array $attributes = []) + { + foreach ($this->activeStates as $state) { + if (! isset($this->states[$this->class][$state])) { + throw new InvalidArgumentException("Unable to locate [{$state}] state for [{$this->class}]."); + } + + $definition = array_merge($definition, call_user_func( + $this->states[$this->class][$state], + $this->faker, $attributes + )); + } + + return $definition; + } + + /** + * Evaluate any Closure attributes on the attribute array. + * + * @param array $attributes + * @return array + */ + protected function callClosureAttributes(array $attributes) + { + foreach ($attributes as &$attribute) { + $attribute = $attribute instanceof Closure + ? $attribute($attributes) : $attribute; + + $attribute = $attribute instanceof Model + ? $attribute->getKey() : $attribute; + } + + return $attributes; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/JsonEncodingException.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/JsonEncodingException.php new file mode 100644 index 0000000..5878b0f --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/JsonEncodingException.php @@ -0,0 +1,35 @@ +getKey().'] to JSON: '.$message); + } + + /** + * Create a new JSON encoding exception for an attribute. + * + * @param mixed $model + * @param mixed $key + * @param string $message + * @return static + */ + public static function forAttribute($model, $key, $message) + { + $class = get_class($model); + + return new static("Unable to encode attribute [{$key}] for model [{$class}] to JSON: {$message}."); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/MassAssignmentException.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/MassAssignmentException.php new file mode 100755 index 0000000..7c81aae --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/MassAssignmentException.php @@ -0,0 +1,10 @@ +bootIfNotBooted(); + + $this->syncOriginal(); + + $this->fill($attributes); + } + + /** + * Check if the model needs to be booted and if so, do it. + * + * @return void + */ + protected function bootIfNotBooted() + { + if (! isset(static::$booted[static::class])) { + static::$booted[static::class] = true; + + $this->fireModelEvent('booting', false); + + static::boot(); + + $this->fireModelEvent('booted', false); + } + } + + /** + * The "booting" method of the model. + * + * @return void + */ + protected static function boot() + { + static::bootTraits(); + } + + /** + * Boot all of the bootable traits on the model. + * + * @return void + */ + protected static function bootTraits() + { + $class = static::class; + + foreach (class_uses_recursive($class) as $trait) { + if (method_exists($class, $method = 'boot'.class_basename($trait))) { + forward_static_call([$class, $method]); + } + } + } + + /** + * Clear the list of booted models so they will be re-booted. + * + * @return void + */ + public static function clearBootedModels() + { + static::$booted = []; + + static::$globalScopes = []; + } + + /** + * Fill the model with an array of attributes. + * + * @param array $attributes + * @return $this + * + * @throws \Illuminate\Database\Eloquent\MassAssignmentException + */ + public function fill(array $attributes) + { + $totallyGuarded = $this->totallyGuarded(); + + foreach ($this->fillableFromArray($attributes) as $key => $value) { + $key = $this->removeTableFromKey($key); + + // The developers may choose to place some attributes in the "fillable" array + // which means only those attributes may be set through mass assignment to + // the model, and all others will just get ignored for security reasons. + if ($this->isFillable($key)) { + $this->setAttribute($key, $value); + } elseif ($totallyGuarded) { + throw new MassAssignmentException($key); + } + } + + return $this; + } + + /** + * Fill the model with an array of attributes. Force mass assignment. + * + * @param array $attributes + * @return $this + */ + public function forceFill(array $attributes) + { + return static::unguarded(function () use ($attributes) { + return $this->fill($attributes); + }); + } + + /** + * Remove the table name from a given key. + * + * @param string $key + * @return string + */ + protected function removeTableFromKey($key) + { + return Str::contains($key, '.') ? last(explode('.', $key)) : $key; + } + + /** + * Create a new instance of the given model. + * + * @param array $attributes + * @param bool $exists + * @return static + */ + public function newInstance($attributes = [], $exists = false) + { + // This method just provides a convenient way for us to generate fresh model + // instances of this current model. It is particularly useful during the + // hydration of new objects via the Eloquent query builder instances. + $model = new static((array) $attributes); + + $model->exists = $exists; + + $model->setConnection( + $this->getConnectionName() + ); + + return $model; + } + + /** + * Create a new model instance that is existing. + * + * @param array $attributes + * @param string|null $connection + * @return static + */ + public function newFromBuilder($attributes = [], $connection = null) + { + $model = $this->newInstance([], true); + + $model->setRawAttributes((array) $attributes, true); + + $model->setConnection($connection ?: $this->getConnectionName()); + + return $model; + } + + /** + * Begin querying the model on a given connection. + * + * @param string|null $connection + * @return \Illuminate\Database\Eloquent\Builder + */ + public static function on($connection = null) + { + // First we will just create a fresh instance of this model, and then we can + // set the connection on the model so that it is be used for the queries + // we execute, as well as being set on each relationship we retrieve. + $instance = new static; + + $instance->setConnection($connection); + + return $instance->newQuery(); + } + + /** + * Begin querying the model on the write connection. + * + * @return \Illuminate\Database\Query\Builder + */ + public static function onWriteConnection() + { + $instance = new static; + + return $instance->newQuery()->useWritePdo(); + } + + /** + * Get all of the models from the database. + * + * @param array|mixed $columns + * @return \Illuminate\Database\Eloquent\Collection|static[] + */ + public static function all($columns = ['*']) + { + return (new static)->newQuery()->get( + is_array($columns) ? $columns : func_get_args() + ); + } + + /** + * Begin querying a model with eager loading. + * + * @param array|string $relations + * @return \Illuminate\Database\Eloquent\Builder|static + */ + public static function with($relations) + { + return (new static)->newQuery()->with( + is_string($relations) ? func_get_args() : $relations + ); + } + + /** + * Eager load relations on the model. + * + * @param array|string $relations + * @return $this + */ + public function load($relations) + { + $query = $this->newQuery()->with( + is_string($relations) ? func_get_args() : $relations + ); + + $query->eagerLoadRelations([$this]); + + return $this; + } + + /** + * Increment a column's value by a given amount. + * + * @param string $column + * @param int $amount + * @param array $extra + * @return int + */ + protected function increment($column, $amount = 1, array $extra = []) + { + return $this->incrementOrDecrement($column, $amount, $extra, 'increment'); + } + + /** + * Decrement a column's value by a given amount. + * + * @param string $column + * @param int $amount + * @param array $extra + * @return int + */ + protected function decrement($column, $amount = 1, array $extra = []) + { + return $this->incrementOrDecrement($column, $amount, $extra, 'decrement'); + } + + /** + * Run the increment or decrement method on the model. + * + * @param string $column + * @param int $amount + * @param array $extra + * @param string $method + * @return int + */ + protected function incrementOrDecrement($column, $amount, $extra, $method) + { + $query = $this->newQuery(); + + if (! $this->exists) { + return $query->{$method}($column, $amount, $extra); + } + + $this->incrementOrDecrementAttributeValue($column, $amount, $extra, $method); + + return $query->where( + $this->getKeyName(), $this->getKey() + )->{$method}($column, $amount, $extra); + } + + /** + * Increment the underlying attribute value and sync with original. + * + * @param string $column + * @param int $amount + * @param array $extra + * @param string $method + * @return void + */ + protected function incrementOrDecrementAttributeValue($column, $amount, $extra, $method) + { + $this->{$column} = $this->{$column} + ($method == 'increment' ? $amount : $amount * -1); + + $this->forceFill($extra); + + $this->syncOriginalAttribute($column); + } + + /** + * Update the model in the database. + * + * @param array $attributes + * @param array $options + * @return bool + */ + public function update(array $attributes = [], array $options = []) + { + if (! $this->exists) { + return false; + } + + return $this->fill($attributes)->save($options); + } + + /** + * Save the model and all of its relationships. + * + * @return bool + */ + public function push() + { + if (! $this->save()) { + return false; + } + + // To sync all of the relationships to the database, we will simply spin through + // the relationships and save each model via this "push" method, which allows + // us to recurse into all of these nested relations for the model instance. + foreach ($this->relations as $models) { + $models = $models instanceof Collection + ? $models->all() : [$models]; + + foreach (array_filter($models) as $model) { + if (! $model->push()) { + return false; + } + } + } + + return true; + } + + /** + * Save the model to the database. + * + * @param array $options + * @return bool + */ + public function save(array $options = []) + { + $query = $this->newQueryWithoutScopes(); + + // If the "saving" event returns false we'll bail out of the save and return + // false, indicating that the save failed. This provides a chance for any + // listeners to cancel save operations if validations fail or whatever. + if ($this->fireModelEvent('saving') === false) { + return false; + } + + // If the model already exists in the database we can just update our record + // that is already in this database using the current IDs in this "where" + // clause to only update this model. Otherwise, we'll just insert them. + if ($this->exists) { + $saved = $this->isDirty() ? + $this->performUpdate($query) : true; + } + + // If the model is brand new, we'll insert it into our database and set the + // ID attribute on the model to the value of the newly inserted row's ID + // which is typically an auto-increment value managed by the database. + else { + $saved = $this->performInsert($query); + } + + // If the model is successfully saved, we need to do a few more things once + // that is done. We will call the "saved" method here to run any actions + // we need to happen after a model gets successfully saved right here. + if ($saved) { + $this->finishSave($options); + } + + return $saved; + } + + /** + * Save the model to the database using transaction. + * + * @param array $options + * @return bool + * + * @throws \Throwable + */ + public function saveOrFail(array $options = []) + { + return $this->getConnection()->transaction(function () use ($options) { + return $this->save($options); + }); + } + + /** + * Perform any actions that are necessary after the model is saved. + * + * @param array $options + * @return void + */ + protected function finishSave(array $options) + { + $this->fireModelEvent('saved', false); + + $this->syncOriginal(); + + if (Arr::get($options, 'touch', true)) { + $this->touchOwners(); + } + } + + /** + * Perform a model update operation. + * + * @param \Illuminate\Database\Eloquent\Builder $query + * @return bool + */ + protected function performUpdate(Builder $query) + { + // If the updating event returns false, we will cancel the update operation so + // developers can hook Validation systems into their models and cancel this + // operation if the model does not pass validation. Otherwise, we update. + if ($this->fireModelEvent('updating') === false) { + return false; + } + + // First we need to create a fresh query instance and touch the creation and + // update timestamp on the model which are maintained by us for developer + // convenience. Then we will just continue saving the model instances. + if ($this->usesTimestamps()) { + $this->updateTimestamps(); + } + + // Once we have run the update operation, we will fire the "updated" event for + // this model instance. This will allow developers to hook into these after + // models are updated, giving them a chance to do any special processing. + $dirty = $this->getDirty(); + + if (count($dirty) > 0) { + $this->setKeysForSaveQuery($query)->update($dirty); + + $this->fireModelEvent('updated', false); + } + + return true; + } + + /** + * Set the keys for a save update query. + * + * @param \Illuminate\Database\Eloquent\Builder $query + * @return \Illuminate\Database\Eloquent\Builder + */ + protected function setKeysForSaveQuery(Builder $query) + { + $query->where($this->getKeyName(), '=', $this->getKeyForSaveQuery()); + + return $query; + } + + /** + * Get the primary key value for a save query. + * + * @return mixed + */ + protected function getKeyForSaveQuery() + { + return isset($this->original[$this->getKeyName()]) + ? $this->original[$this->getKeyName()] + : $this->getAttribute($this->getKeyName()); + } + + /** + * Perform a model insert operation. + * + * @param \Illuminate\Database\Eloquent\Builder $query + * @return bool + */ + protected function performInsert(Builder $query) + { + if ($this->fireModelEvent('creating') === false) { + return false; + } + + // First we'll need to create a fresh query instance and touch the creation and + // update timestamps on this model, which are maintained by us for developer + // convenience. After, we will just continue saving these model instances. + if ($this->usesTimestamps()) { + $this->updateTimestamps(); + } + + // If the model has an incrementing key, we can use the "insertGetId" method on + // the query builder, which will give us back the final inserted ID for this + // table from the database. Not all tables have to be incrementing though. + $attributes = $this->attributes; + + if ($this->getIncrementing()) { + $this->insertAndSetId($query, $attributes); + } + + // If the table isn't incrementing we'll simply insert these attributes as they + // are. These attribute arrays must contain an "id" column previously placed + // there by the developer as the manually determined key for these models. + else { + if (empty($attributes)) { + return true; + } + + $query->insert($attributes); + } + + // We will go ahead and set the exists property to true, so that it is set when + // the created event is fired, just in case the developer tries to update it + // during the event. This will allow them to do so and run an update here. + $this->exists = true; + + $this->wasRecentlyCreated = true; + + $this->fireModelEvent('created', false); + + return true; + } + + /** + * Insert the given attributes and set the ID on the model. + * + * @param \Illuminate\Database\Eloquent\Builder $query + * @param array $attributes + * @return void + */ + protected function insertAndSetId(Builder $query, $attributes) + { + $id = $query->insertGetId($attributes, $keyName = $this->getKeyName()); + + $this->setAttribute($keyName, $id); + } + + /** + * Destroy the models for the given IDs. + * + * @param array|int $ids + * @return int + */ + public static function destroy($ids) + { + // We'll initialize a count here so we will return the total number of deletes + // for the operation. The developers can then check this number as a boolean + // type value or get this total count of records deleted for logging, etc. + $count = 0; + + $ids = is_array($ids) ? $ids : func_get_args(); + + // We will actually pull the models from the database table and call delete on + // each of them individually so that their events get fired properly with a + // correct set of attributes in case the developers wants to check these. + $key = with($instance = new static)->getKeyName(); + + foreach ($instance->whereIn($key, $ids)->get() as $model) { + if ($model->delete()) { + $count++; + } + } + + return $count; + } + + /** + * Delete the model from the database. + * + * @return bool|null + * + * @throws \Exception + */ + public function delete() + { + if (is_null($this->getKeyName())) { + throw new Exception('No primary key defined on model.'); + } + + // If the model doesn't exist, there is nothing to delete so we'll just return + // immediately and not do anything else. Otherwise, we will continue with a + // deletion process on the model, firing the proper events, and so forth. + if (! $this->exists) { + return; + } + + if ($this->fireModelEvent('deleting') === false) { + return false; + } + + // Here, we'll touch the owning models, verifying these timestamps get updated + // for the models. This will allow any caching to get broken on the parents + // by the timestamp. Then we will go ahead and delete the model instance. + $this->touchOwners(); + + $this->performDeleteOnModel(); + + $this->exists = false; + + // Once the model has been deleted, we will fire off the deleted event so that + // the developers may hook into post-delete operations. We will then return + // a boolean true as the delete is presumably successful on the database. + $this->fireModelEvent('deleted', false); + + return true; + } + + /** + * Force a hard delete on a soft deleted model. + * + * This method protects developers from running forceDelete when trait is missing. + * + * @return bool|null + */ + public function forceDelete() + { + return $this->delete(); + } + + /** + * Perform the actual delete query on this model instance. + * + * @return void + */ + protected function performDeleteOnModel() + { + $this->setKeysForSaveQuery($this->newQueryWithoutScopes())->delete(); + } + + /** + * Begin querying the model. + * + * @return \Illuminate\Database\Eloquent\Builder + */ + public static function query() + { + return (new static)->newQuery(); + } + + /** + * Get a new query builder for the model's table. + * + * @return \Illuminate\Database\Eloquent\Builder + */ + public function newQuery() + { + $builder = $this->newQueryWithoutScopes(); + + foreach ($this->getGlobalScopes() as $identifier => $scope) { + $builder->withGlobalScope($identifier, $scope); + } + + return $builder; + } + + /** + * Get a new query builder that doesn't have any global scopes. + * + * @return \Illuminate\Database\Eloquent\Builder|static + */ + public function newQueryWithoutScopes() + { + $builder = $this->newEloquentBuilder($this->newBaseQueryBuilder()); + + // 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); + } + + /** + * Get a new query instance without a given scope. + * + * @param \Illuminate\Database\Eloquent\Scope|string $scope + * @return \Illuminate\Database\Eloquent\Builder + */ + public function newQueryWithoutScope($scope) + { + $builder = $this->newQuery(); + + return $builder->withoutGlobalScope($scope); + } + + /** + * Create a new Eloquent query builder for the model. + * + * @param \Illuminate\Database\Query\Builder $query + * @return \Illuminate\Database\Eloquent\Builder|static + */ + public function newEloquentBuilder($query) + { + return new Builder($query); + } + + /** + * Get a new query builder instance for the connection. + * + * @return \Illuminate\Database\Query\Builder + */ + protected function newBaseQueryBuilder() + { + $connection = $this->getConnection(); + + return new QueryBuilder( + $connection, $connection->getQueryGrammar(), $connection->getPostProcessor() + ); + } + + /** + * Create a new Eloquent Collection instance. + * + * @param array $models + * @return \Illuminate\Database\Eloquent\Collection + */ + public function newCollection(array $models = []) + { + return new Collection($models); + } + + /** + * Create a new pivot model instance. + * + * @param \Illuminate\Database\Eloquent\Model $parent + * @param array $attributes + * @param string $table + * @param bool $exists + * @param string|null $using + * @return \Illuminate\Database\Eloquent\Relations\Pivot + */ + public function newPivot(Model $parent, array $attributes, $table, $exists, $using = null) + { + return $using ? $using::fromRawAttributes($parent, $attributes, $table, $exists) + : new Pivot($parent, $attributes, $table, $exists); + } + + /** + * Convert the model instance to an array. + * + * @return array + */ + public function toArray() + { + return array_merge($this->attributesToArray(), $this->relationsToArray()); + } + + /** + * Convert the model instance to JSON. + * + * @param int $options + * @return string + * + * @throws \Illuminate\Database\Eloquent\JsonEncodingException + */ + public function toJson($options = 0) + { + $json = json_encode($this->jsonSerialize(), $options); + + if (JSON_ERROR_NONE !== json_last_error()) { + throw JsonEncodingException::forModel($this, json_last_error_msg()); + } + + return $json; + } + + /** + * Convert the object into something JSON serializable. + * + * @return array + */ + public function jsonSerialize() + { + return $this->toArray(); + } + + /** + * Reload a fresh model instance from the database. + * + * @param array|string $with + * @return static|null + */ + public function fresh($with = []) + { + if (! $this->exists) { + return; + } + + return static::newQueryWithoutScopes() + ->with(is_string($with) ? func_get_args() : $with) + ->where($this->getKeyName(), $this->getKey()) + ->first(); + } + + /** + * Clone the model into a new, non-existing instance. + * + * @param array|null $except + * @return \Illuminate\Database\Eloquent\Model + */ + public function replicate(array $except = null) + { + $defaults = [ + $this->getKeyName(), + $this->getCreatedAtColumn(), + $this->getUpdatedAtColumn(), + ]; + + $attributes = Arr::except( + $this->attributes, $except ? array_unique(array_merge($except, $defaults)) : $defaults + ); + + return tap(new static, function ($instance) use ($attributes) { + $instance->setRawAttributes($attributes); + + $instance->setRelations($this->relations); + }); + } + + /** + * Determine if two models have the same ID and belong to the same table. + * + * @param \Illuminate\Database\Eloquent\Model $model + * @return bool + */ + public function is(Model $model) + { + return $this->getKey() === $model->getKey() && + $this->getTable() === $model->getTable() && + $this->getConnectionName() === $model->getConnectionName(); + } + + /** + * Get the database connection for the model. + * + * @return \Illuminate\Database\Connection + */ + public function getConnection() + { + return static::resolveConnection($this->getConnectionName()); + } + + /** + * Get the current connection name for the model. + * + * @return string + */ + public function getConnectionName() + { + return $this->connection; + } + + /** + * Set the connection associated with the model. + * + * @param string $name + * @return $this + */ + public function setConnection($name) + { + $this->connection = $name; + + return $this; + } + + /** + * Resolve a connection instance. + * + * @param string|null $connection + * @return \Illuminate\Database\Connection + */ + public static function resolveConnection($connection = null) + { + return static::$resolver->connection($connection); + } + + /** + * Get the connection resolver instance. + * + * @return \Illuminate\Database\ConnectionResolverInterface + */ + public static function getConnectionResolver() + { + return static::$resolver; + } + + /** + * Set the connection resolver instance. + * + * @param \Illuminate\Database\ConnectionResolverInterface $resolver + * @return void + */ + public static function setConnectionResolver(Resolver $resolver) + { + static::$resolver = $resolver; + } + + /** + * Unset the connection resolver for models. + * + * @return void + */ + public static function unsetConnectionResolver() + { + static::$resolver = null; + } + + /** + * Get the table associated with the model. + * + * @return string + */ + public function getTable() + { + if (! isset($this->table)) { + return str_replace('\\', '', Str::snake(Str::plural(class_basename($this)))); + } + + return $this->table; + } + + /** + * Set the table associated with the model. + * + * @param string $table + * @return $this + */ + public function setTable($table) + { + $this->table = $table; + + return $this; + } + + /** + * Get the primary key for the model. + * + * @return string + */ + public function getKeyName() + { + return $this->primaryKey; + } + + /** + * Set the primary key for the model. + * + * @param string $key + * @return $this + */ + public function setKeyName($key) + { + $this->primaryKey = $key; + + return $this; + } + + /** + * Get the table qualified key name. + * + * @return string + */ + public function getQualifiedKeyName() + { + return $this->getTable().'.'.$this->getKeyName(); + } + + /** + * Get the auto-incrementing key type. + * + * @return string + */ + public function getKeyType() + { + return $this->keyType; + } + + /** + * Set the data type for the primary key. + * + * @param string $type + * @return $this + */ + public function setKeyType($type) + { + $this->keyType = $type; + + return $this; + } + + /** + * Get the value indicating whether the IDs are incrementing. + * + * @return bool + */ + public function getIncrementing() + { + return $this->incrementing; + } + + /** + * Set whether IDs are incrementing. + * + * @param bool $value + * @return $this + */ + public function setIncrementing($value) + { + $this->incrementing = $value; + + return $this; + } + + /** + * Get the value of the model's primary key. + * + * @return mixed + */ + public function getKey() + { + return $this->getAttribute($this->getKeyName()); + } + + /** + * Get the queueable identity for the entity. + * + * @return mixed + */ + public function getQueueableId() + { + return $this->getKey(); + } + + /** + * Get the value of the model's route key. + * + * @return mixed + */ + public function getRouteKey() + { + return $this->getAttribute($this->getRouteKeyName()); + } + + /** + * Get the route key for the model. + * + * @return string + */ + public function getRouteKeyName() + { + return $this->getKeyName(); + } + + /** + * Get the default foreign key name for the model. + * + * @return string + */ + public function getForeignKey() + { + return Str::snake(class_basename($this)).'_'.$this->primaryKey; + } + + /** + * Get the number of models to return per page. + * + * @return int + */ + public function getPerPage() + { + return $this->perPage; + } + + /** + * Set the number of models to return per page. + * + * @param int $perPage + * @return $this + */ + public function setPerPage($perPage) + { + $this->perPage = $perPage; + + return $this; + } + + /** + * Dynamically retrieve attributes on the model. + * + * @param string $key + * @return mixed + */ + public function __get($key) + { + return $this->getAttribute($key); + } + + /** + * Dynamically set attributes on the model. + * + * @param string $key + * @param mixed $value + * @return void + */ + public function __set($key, $value) + { + $this->setAttribute($key, $value); + } + + /** + * Determine if the given attribute exists. + * + * @param mixed $offset + * @return bool + */ + public function offsetExists($offset) + { + return isset($this->$offset); + } + + /** + * Get the value for a given offset. + * + * @param mixed $offset + * @return mixed + */ + public function offsetGet($offset) + { + return $this->$offset; + } + + /** + * Set the value for a given offset. + * + * @param mixed $offset + * @param mixed $value + * @return void + */ + public function offsetSet($offset, $value) + { + $this->$offset = $value; + } + + /** + * Unset the value for a given offset. + * + * @param mixed $offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->$offset); + } + + /** + * Determine if an attribute or relation exists on the model. + * + * @param string $key + * @return bool + */ + public function __isset($key) + { + return ! is_null($this->getAttribute($key)); + } + + /** + * Unset an attribute on the model. + * + * @param string $key + * @return void + */ + public function __unset($key) + { + unset($this->attributes[$key], $this->relations[$key]); + } + + /** + * Handle dynamic method calls into the model. + * + * @param string $method + * @param array $parameters + * @return mixed + */ + public function __call($method, $parameters) + { + if (in_array($method, ['increment', 'decrement'])) { + return $this->$method(...$parameters); + } + + return $this->newQuery()->$method(...$parameters); + } + + /** + * Handle dynamic static method calls into the method. + * + * @param string $method + * @param array $parameters + * @return mixed + */ + public static function __callStatic($method, $parameters) + { + return (new static)->$method(...$parameters); + } + + /** + * Convert the model to its string representation. + * + * @return string + */ + public function __toString() + { + return $this->toJson(); + } + + /** + * When a model is being unserialized, check if it needs to be booted. + * + * @return void + */ + public function __wakeup() + { + $this->bootIfNotBooted(); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/ModelNotFoundException.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/ModelNotFoundException.php new file mode 100755 index 0000000..a18724d --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/ModelNotFoundException.php @@ -0,0 +1,65 @@ +model = $model; + $this->ids = array_wrap($ids); + + $this->message = "No query results for model [{$model}]"; + + if (count($this->ids) > 0) { + $this->message .= ' '.implode(', ', $this->ids); + } else { + $this->message .= '.'; + } + + return $this; + } + + /** + * Get the affected Eloquent model. + * + * @return string + */ + public function getModel() + { + return $this->model; + } + + /** + * Get the affected Eloquent model IDs. + * + * @return int|array + */ + public function getIds() + { + return $this->ids; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/QueueEntityResolver.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/QueueEntityResolver.php new file mode 100644 index 0000000..22fccf2 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/QueueEntityResolver.php @@ -0,0 +1,29 @@ +find($id); + + if ($instance) { + return $instance; + } + + throw new EntityNotFoundException($type, $id); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/RelationNotFoundException.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/RelationNotFoundException.php new file mode 100755 index 0000000..5026ac9 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/RelationNotFoundException.php @@ -0,0 +1,22 @@ +ownerKey = $ownerKey; + $this->relation = $relation; + $this->foreignKey = $foreignKey; + + // In the underlying base relationship class, this variable is referred to as + // the "parent" since most relationships are not inversed. But, since this + // one is we will create a "child" variable for much better readability. + $this->child = $child; + + parent::__construct($query, $child); + } + + /** + * Get the results of the relationship. + * + * @return mixed + */ + public function getResults() + { + return $this->query->first(); + } + + /** + * Set the base constraints on the relation query. + * + * @return void + */ + public function addConstraints() + { + if (static::$constraints) { + // For belongs to relationships, which are essentially the inverse of has one + // or has many relationships, we need to actually query on the primary key + // of the related models matching on the foreign key that's on a parent. + $table = $this->related->getTable(); + + $this->query->where($table.'.'.$this->ownerKey, '=', $this->child->{$this->foreignKey}); + } + } + + /** + * Set the constraints for an eager load of the relation. + * + * @param array $models + * @return void + */ + public function addEagerConstraints(array $models) + { + // We'll grab the primary key name of the related models since it could be set to + // a non-standard name and not "id". We will then construct the constraint for + // our eagerly loading query so it returns the proper models from execution. + $key = $this->related->getTable().'.'.$this->ownerKey; + + $this->query->whereIn($key, $this->getEagerModelKeys($models)); + } + + /** + * Gather the keys from an array of related models. + * + * @param array $models + * @return array + */ + protected function getEagerModelKeys(array $models) + { + $keys = []; + + // First we need to gather all of the keys from the parent models so we know what + // to query for via the eager loading query. We will add them to an array then + // execute a "where in" statement to gather up all of those related records. + foreach ($models as $model) { + if (! is_null($value = $model->{$this->foreignKey})) { + $keys[] = $value; + } + } + + // 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 (count($keys) === 0) { + return [$this->relationHasIncrementingId() ? 0 : null]; + } + + sort($keys); + + return array_values(array_unique($keys)); + } + + /** + * Initialize the relation on a set of models. + * + * @param array $models + * @param string $relation + * @return array + */ + public function initRelation(array $models, $relation) + { + foreach ($models as $model) { + $model->setRelation($relation, null); + } + + return $models; + } + + /** + * Match the eagerly loaded results to their parents. + * + * @param array $models + * @param \Illuminate\Database\Eloquent\Collection $results + * @param string $relation + * @return array + */ + public function match(array $models, Collection $results, $relation) + { + $foreign = $this->foreignKey; + + $owner = $this->ownerKey; + + // First we will get to build a dictionary of the child models by their primary + // key of the relationship, then we can easily match the children back onto + // the parents using that dictionary and the primary key of the children. + $dictionary = []; + + foreach ($results as $result) { + $dictionary[$result->getAttribute($owner)] = $result; + } + + // Once we have the dictionary constructed, we can loop through all the parents + // and match back onto their children using these keys of the dictionary and + // the primary key of the children to map them onto the correct instances. + foreach ($models as $model) { + if (isset($dictionary[$model->{$foreign}])) { + $model->setRelation($relation, $dictionary[$model->{$foreign}]); + } + } + + return $models; + } + + /** + * Update the parent model on the relationship. + * + * @param array $attributes + * @return mixed + */ + public function update(array $attributes) + { + return $this->getResults()->fill($attributes)->save(); + } + + /** + * Associate the model instance to the given parent. + * + * @param \Illuminate\Database\Eloquent\Model|int|string $model + * @return \Illuminate\Database\Eloquent\Model + */ + public function associate($model) + { + $ownerKey = $model instanceof Model ? $model->getAttribute($this->ownerKey) : $model; + + $this->child->setAttribute($this->foreignKey, $ownerKey); + + if ($model instanceof Model) { + $this->child->setRelation($this->relation, $model); + } + + return $this->child; + } + + /** + * Dissociate previously associated model from the given parent. + * + * @return \Illuminate\Database\Eloquent\Model + */ + public function dissociate() + { + $this->child->setAttribute($this->foreignKey, null); + + return $this->child->setRelation($this->relation, null); + } + + /** + * Add the constraints for a relationship query. + * + * @param \Illuminate\Database\Eloquent\Builder $query + * @param \Illuminate\Database\Eloquent\Builder $parentQuery + * @param array|mixed $columns + * @return \Illuminate\Database\Eloquent\Builder + */ + public function getRelationExistenceQuery(Builder $query, Builder $parentQuery, $columns = ['*']) + { + if ($parentQuery->getQuery()->from == $query->getQuery()->from) { + return $this->getRelationExistenceQueryForSelfRelation($query, $parentQuery, $columns); + } + + return $query->select($columns)->whereColumn( + $this->getQualifiedForeignKey(), '=', $query->getModel()->getTable().'.'.$this->ownerKey + ); + } + + /** + * Add the constraints for a relationship query on the same table. + * + * @param \Illuminate\Database\Eloquent\Builder $query + * @param \Illuminate\Database\Eloquent\Builder $parentQuery + * @param array|mixed $columns + * @return \Illuminate\Database\Eloquent\Builder + */ + public function getRelationExistenceQueryForSelfRelation(Builder $query, Builder $parentQuery, $columns = ['*']) + { + $query->select($columns)->from( + $query->getModel()->getTable().' as '.$hash = $this->getRelationCountHash() + ); + + $query->getModel()->setTable($hash); + + return $query->whereColumn( + $hash.'.'.$query->getModel()->getKeyName(), '=', $this->getQualifiedForeignKey() + ); + } + + /** + * Get a relationship join table hash. + * + * @return string + */ + public function getRelationCountHash() + { + return 'laravel_reserved_'.static::$selfJoinCount++; + } + + /** + * Determine if the related model has an auto-incrementing ID. + * + * @return bool + */ + protected function relationHasIncrementingId() + { + return $this->related->getIncrementing() && + $this->related->getKeyType() === 'int'; + } + + /** + * Get the foreign key of the relationship. + * + * @return string + */ + public function getForeignKey() + { + return $this->foreignKey; + } + + /** + * Get the fully qualified foreign key of the relationship. + * + * @return string + */ + public function getQualifiedForeignKey() + { + return $this->child->getTable().'.'.$this->foreignKey; + } + + /** + * Get the associated key of the relationship. + * + * @return string + */ + public function getOwnerKey() + { + return $this->ownerKey; + } + + /** + * Get the fully qualified associated key of the relationship. + * + * @return string + */ + public function getQualifiedOwnerKeyName() + { + return $this->related->getTable().'.'.$this->ownerKey; + } + + /** + * Get the name of the relationship. + * + * @return string + */ + public function getRelation() + { + return $this->relation; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/BelongsToMany.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/BelongsToMany.php new file mode 100755 index 0000000..4c9fac5 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/BelongsToMany.php @@ -0,0 +1,911 @@ +table = $table; + $this->relatedKey = $relatedKey; + $this->foreignKey = $foreignKey; + $this->relationName = $relationName; + + parent::__construct($query, $parent); + } + + /** + * Set the base constraints on the relation query. + * + * @return void + */ + public function addConstraints() + { + $this->performJoin(); + + if (static::$constraints) { + $this->addWhereConstraints(); + } + } + + /** + * Set the join clause for the relation query. + * + * @param \Illuminate\Database\Eloquent\Builder|null $query + * @return $this + */ + protected function performJoin($query = null) + { + $query = $query ?: $this->query; + + // We need to join to the intermediate table on the related model's primary + // key column with the intermediate table's foreign key for the related + // model instance. Then we can set the "where" for the parent models. + $baseTable = $this->related->getTable(); + + $key = $baseTable.'.'.$this->related->getKeyName(); + + $query->join($this->table, $key, '=', $this->getQualifiedRelatedKeyName()); + + return $this; + } + + /** + * Set the where clause for the relation query. + * + * @return $this + */ + protected function addWhereConstraints() + { + $this->query->where( + $this->getQualifiedForeignKeyName(), '=', $this->parent->getKey() + ); + + return $this; + } + + /** + * Set the constraints for an eager load of the relation. + * + * @param array $models + * @return void + */ + public function addEagerConstraints(array $models) + { + $this->query->whereIn($this->getQualifiedForeignKeyName(), $this->getKeys($models)); + } + + /** + * Initialize the relation on a set of models. + * + * @param array $models + * @param string $relation + * @return array + */ + public function initRelation(array $models, $relation) + { + foreach ($models as $model) { + $model->setRelation($relation, $this->related->newCollection()); + } + + return $models; + } + + /** + * Match the eagerly loaded results to their parents. + * + * @param array $models + * @param \Illuminate\Database\Eloquent\Collection $results + * @param string $relation + * @return array + */ + public function match(array $models, Collection $results, $relation) + { + $dictionary = $this->buildDictionary($results); + + // Once we have an array dictionary of child objects we can easily match the + // children back to their parent using the dictionary and the keys on the + // the parent models. Then we will return the hydrated models back out. + foreach ($models as $model) { + if (isset($dictionary[$key = $model->getKey()])) { + $model->setRelation( + $relation, $this->related->newCollection($dictionary[$key]) + ); + } + } + + return $models; + } + + /** + * Build model dictionary keyed by the relation's foreign key. + * + * @param \Illuminate\Database\Eloquent\Collection $results + * @return array + */ + protected function buildDictionary(Collection $results) + { + // First we will build a dictionary of child models keyed by the foreign key + // of the relation so that we will easily and quickly match them to their + // parents without having a possibly slow inner loops for every models. + $dictionary = []; + + foreach ($results as $result) { + $dictionary[$result->pivot->{$this->foreignKey}][] = $result; + } + + return $dictionary; + } + + /** + * Specify the custom pivot model to use for the relationship. + * + * @param string $class + * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany + */ + public function using($class) + { + $this->using = $class; + + return $this; + } + + /** + * Set a where clause for a pivot table column. + * + * @param string $column + * @param string $operator + * @param mixed $value + * @param string $boolean + * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany + */ + public function wherePivot($column, $operator = null, $value = null, $boolean = 'and') + { + $this->pivotWheres[] = func_get_args(); + + return $this->where($this->table.'.'.$column, $operator, $value, $boolean); + } + + /** + * Set a "where in" clause for a pivot table column. + * + * @param string $column + * @param mixed $values + * @param string $boolean + * @param bool $not + * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany + */ + public function wherePivotIn($column, $values, $boolean = 'and', $not = false) + { + $this->pivotWhereIns[] = func_get_args(); + + return $this->whereIn($this->table.'.'.$column, $values, $boolean, $not); + } + + /** + * Set an "or where" clause for a pivot table column. + * + * @param string $column + * @param string $operator + * @param mixed $value + * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany + */ + public function orWherePivot($column, $operator = null, $value = null) + { + return $this->wherePivot($column, $operator, $value, 'or'); + } + + /** + * Set an "or where in" clause for a pivot table column. + * + * @param string $column + * @param mixed $values + * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany + */ + public function orWherePivotIn($column, $values) + { + return $this->wherePivotIn($column, $values, 'or'); + } + + /** + * Find a related model by its primary key or return new instance of the related model. + * + * @param mixed $id + * @param array $columns + * @return \Illuminate\Support\Collection|\Illuminate\Database\Eloquent\Model + */ + public function findOrNew($id, $columns = ['*']) + { + if (is_null($instance = $this->find($id, $columns))) { + $instance = $this->related->newInstance(); + } + + return $instance; + } + + /** + * Get the first related model record matching the attributes or instantiate it. + * + * @param array $attributes + * @return \Illuminate\Database\Eloquent\Model + */ + public function firstOrNew(array $attributes) + { + if (is_null($instance = $this->where($attributes)->first())) { + $instance = $this->related->newInstance($attributes); + } + + return $instance; + } + + /** + * Get the first related record matching the attributes or create it. + * + * @param array $attributes + * @param array $joining + * @param bool $touch + * @return \Illuminate\Database\Eloquent\Model + */ + public function firstOrCreate(array $attributes, array $joining = [], $touch = true) + { + if (is_null($instance = $this->where($attributes)->first())) { + $instance = $this->create($attributes, $joining, $touch); + } + + return $instance; + } + + /** + * Create or update a related record matching the attributes, and fill it with values. + * + * @param array $attributes + * @param array $values + * @param array $joining + * @param bool $touch + * @return \Illuminate\Database\Eloquent\Model + */ + public function updateOrCreate(array $attributes, array $values = [], array $joining = [], $touch = true) + { + if (is_null($instance = $this->where($attributes)->first())) { + return $this->create($values, $joining, $touch); + } + + $instance->fill($values); + + $instance->save(['touch' => false]); + + return $instance; + } + + /** + * Find a related model by its primary key. + * + * @param mixed $id + * @param array $columns + * @return \Illuminate\Database\Eloquent\Model|\Illuminate\Database\Eloquent\Collection|null + */ + public function find($id, $columns = ['*']) + { + return is_array($id) ? $this->findMany($id, $columns) : $this->where( + $this->getRelated()->getQualifiedKeyName(), '=', $id + )->first($columns); + } + + /** + * Find multiple related models by their primary keys. + * + * @param mixed $ids + * @param array $columns + * @return \Illuminate\Database\Eloquent\Collection + */ + public function findMany($ids, $columns = ['*']) + { + return empty($ids) ? $this->getRelated()->newCollection() : $this->whereIn( + $this->getRelated()->getQualifiedKeyName(), $ids + )->get($columns); + } + + /** + * Find a related model by its primary key or throw an exception. + * + * @param mixed $id + * @param array $columns + * @return \Illuminate\Database\Eloquent\Model|\Illuminate\Database\Eloquent\Collection + * + * @throws \Illuminate\Database\Eloquent\ModelNotFoundException + */ + public function findOrFail($id, $columns = ['*']) + { + $result = $this->find($id, $columns); + + if (is_array($id)) { + if (count($result) == count(array_unique($id))) { + return $result; + } + } elseif (! is_null($result)) { + return $result; + } + + throw (new ModelNotFoundException)->setModel(get_class($this->related)); + } + + /** + * Execute the query and get the first result. + * + * @param array $columns + * @return mixed + */ + public function first($columns = ['*']) + { + $results = $this->take(1)->get($columns); + + return count($results) > 0 ? $results->first() : null; + } + + /** + * Execute the query and get the first result or throw an exception. + * + * @param array $columns + * @return \Illuminate\Database\Eloquent\Model|static + * + * @throws \Illuminate\Database\Eloquent\ModelNotFoundException + */ + public function firstOrFail($columns = ['*']) + { + if (! is_null($model = $this->first($columns))) { + return $model; + } + + throw (new ModelNotFoundException)->setModel(get_class($this->related)); + } + + /** + * Get the results of the relationship. + * + * @return mixed + */ + public function getResults() + { + return $this->get(); + } + + /** + * Execute the query as a "select" statement. + * + * @param array $columns + * @return \Illuminate\Database\Eloquent\Collection + */ + public function get($columns = ['*']) + { + // First we'll add the proper select columns onto the query so it is run with + // the proper columns. Then, we will get the results and hydrate out pivot + // models with the result of those columns as a separate model relation. + $columns = $this->query->getQuery()->columns ? [] : $columns; + + $builder = $this->query->applyScopes(); + + $models = $builder->addSelect( + $this->shouldSelect($columns) + )->getModels(); + + $this->hydratePivotRelation($models); + + // If we actually found models we will also eager load any relationships that + // have been specified as needing to be eager loaded. This will solve the + // n + 1 query problem for the developer and also increase performance. + if (count($models) > 0) { + $models = $builder->eagerLoadRelations($models); + } + + return $this->related->newCollection($models); + } + + /** + * Get the select columns for the relation query. + * + * @param array $columns + * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany + */ + protected function shouldSelect(array $columns = ['*']) + { + if ($columns == ['*']) { + $columns = [$this->related->getTable().'.*']; + } + + return array_merge($columns, $this->aliasedPivotColumns()); + } + + /** + * Get the pivot columns for the relation. + * + * "pivot_" is prefixed ot each column for easy removal later. + * + * @return array + */ + protected function aliasedPivotColumns() + { + $defaults = [$this->foreignKey, $this->relatedKey]; + + return collect(array_merge($defaults, $this->pivotColumns))->map(function ($column) { + return $this->table.'.'.$column.' as pivot_'.$column; + })->unique()->all(); + } + + /** + * Get a paginator for the "select" statement. + * + * @param int $perPage + * @param array $columns + * @param string $pageName + * @param int|null $page + * @return \Illuminate\Contracts\Pagination\LengthAwarePaginator + */ + public function paginate($perPage = null, $columns = ['*'], $pageName = 'page', $page = null) + { + $this->query->addSelect($this->shouldSelect($columns)); + + return tap($this->query->paginate($perPage, $columns, $pageName, $page), function ($paginator) { + $this->hydratePivotRelation($paginator->items()); + }); + } + + /** + * Paginate the given query into a simple paginator. + * + * @param int $perPage + * @param array $columns + * @param string $pageName + * @param int|null $page + * @return \Illuminate\Contracts\Pagination\Paginator + */ + public function simplePaginate($perPage = null, $columns = ['*'], $pageName = 'page', $page = null) + { + $this->query->addSelect($this->shouldSelect($columns)); + + return tap($this->query->simplePaginate($perPage, $columns, $pageName, $page), function ($paginator) { + $this->hydratePivotRelation($paginator->items()); + }); + } + + /** + * Chunk the results of the query. + * + * @param int $count + * @param callable $callback + * @return bool + */ + public function chunk($count, callable $callback) + { + $this->query->addSelect($this->shouldSelect()); + + return $this->query->chunk($count, function ($results) use ($callback) { + $this->hydratePivotRelation($results->all()); + + return $callback($results); + }); + } + + /** + * Hydrate the pivot table relationship on the models. + * + * @param array $models + * @return void + */ + protected function hydratePivotRelation(array $models) + { + // To hydrate the pivot relationship, we will just gather the pivot attributes + // and create a new Pivot model, which is basically a dynamic model that we + // will set the attributes, table, and connections on it so it will work. + foreach ($models as $model) { + $model->setRelation('pivot', $this->newExistingPivot( + $this->migratePivotAttributes($model) + )); + } + } + + /** + * Get the pivot attributes from a model. + * + * @param \Illuminate\Database\Eloquent\Model $model + * @return array + */ + protected function migratePivotAttributes(Model $model) + { + $values = []; + + foreach ($model->getAttributes() as $key => $value) { + // To get the pivots attributes we will just take any of the attributes which + // begin with "pivot_" and add those to this arrays, as well as unsetting + // them from the parent's models since they exist in a different table. + if (strpos($key, 'pivot_') === 0) { + $values[substr($key, 6)] = $value; + + unset($model->$key); + } + } + + return $values; + } + + /** + * If we're touching the parent model, touch. + * + * @return void + */ + public function touchIfTouching() + { + if ($this->touchingParent()) { + $this->getParent()->touch(); + } + + if ($this->getParent()->touches($this->relationName)) { + $this->touch(); + } + } + + /** + * Determine if we should touch the parent on sync. + * + * @return bool + */ + protected function touchingParent() + { + return $this->getRelated()->touches($this->guessInverseRelation()); + } + + /** + * Attempt to guess the name of the inverse of the relation. + * + * @return string + */ + protected function guessInverseRelation() + { + return Str::camel(Str::plural(class_basename($this->getParent()))); + } + + /** + * Touch all of the related models for the relationship. + * + * E.g.: Touch all roles associated with this user. + * + * @return void + */ + public function touch() + { + $key = $this->getRelated()->getKeyName(); + + $columns = [ + $this->related->getUpdatedAtColumn() => $this->related->freshTimestampString(), + ]; + + // If we actually have IDs for the relation, we will run the query to update all + // the related model's timestamps, to make sure these all reflect the changes + // to the parent models. This will help us keep any caching synced up here. + if (count($ids = $this->allRelatedIds()) > 0) { + $this->getRelated()->newQuery()->whereIn($key, $ids)->update($columns); + } + } + + /** + * Get all of the IDs for the related models. + * + * @return \Illuminate\Support\Collection + */ + public function allRelatedIds() + { + $related = $this->getRelated(); + + return $this->getQuery()->select( + $related->getQualifiedKeyName() + )->pluck($related->getKeyName()); + } + + /** + * Save a new model and attach it to the parent model. + * + * @param \Illuminate\Database\Eloquent\Model $model + * @param array $pivotAttributes + * @param bool $touch + * @return \Illuminate\Database\Eloquent\Model + */ + public function save(Model $model, array $pivotAttributes = [], $touch = true) + { + $model->save(['touch' => false]); + + $this->attach($model->getKey(), $pivotAttributes, $touch); + + return $model; + } + + /** + * Save an array of new models and attach them to the parent model. + * + * @param \Illuminate\Support\Collection|array $models + * @param array $pivotAttributes + * @return array + */ + public function saveMany($models, array $pivotAttributes = []) + { + foreach ($models as $key => $model) { + $this->save($model, (array) Arr::get($pivotAttributes, $key), false); + } + + $this->touchIfTouching(); + + return $models; + } + + /** + * Create a new instance of the related model. + * + * @param array $attributes + * @param array $joining + * @param bool $touch + * @return \Illuminate\Database\Eloquent\Model + */ + public function create(array $attributes, array $joining = [], $touch = true) + { + $instance = $this->related->newInstance($attributes); + + // Once we save the related model, we need to attach it to the base model via + // through intermediate table so we'll use the existing "attach" method to + // accomplish this which will insert the record and any more attributes. + $instance->save(['touch' => false]); + + $this->attach($instance->getKey(), $joining, $touch); + + return $instance; + } + + /** + * Create an array of new instances of the related models. + * + * @param array $records + * @param array $joinings + * @return array + */ + public function createMany(array $records, array $joinings = []) + { + $instances = []; + + foreach ($records as $key => $record) { + $instances[] = $this->create($record, (array) Arr::get($joinings, $key), false); + } + + $this->touchIfTouching(); + + return $instances; + } + + /** + * Add the constraints for a relationship query. + * + * @param \Illuminate\Database\Eloquent\Builder $query + * @param \Illuminate\Database\Eloquent\Builder $parentQuery + * @param array|mixed $columns + * @return \Illuminate\Database\Eloquent\Builder + */ + public function getRelationExistenceQuery(Builder $query, Builder $parentQuery, $columns = ['*']) + { + if ($parentQuery->getQuery()->from == $query->getQuery()->from) { + return $this->getRelationExistenceQueryForSelfJoin($query, $parentQuery, $columns); + } + + $this->performJoin($query); + + return parent::getRelationExistenceQuery($query, $parentQuery, $columns); + } + + /** + * Add the constraints for a relationship query on the same table. + * + * @param \Illuminate\Database\Eloquent\Builder $query + * @param \Illuminate\Database\Eloquent\Builder $parentQuery + * @param array|mixed $columns + * @return \Illuminate\Database\Eloquent\Builder + */ + public function getRelationExistenceQueryForSelfJoin(Builder $query, Builder $parentQuery, $columns = ['*']) + { + $query->select($columns); + + $query->from($this->related->getTable().' as '.$hash = $this->getRelationCountHash()); + + $this->related->setTable($hash); + + $this->performJoin($query); + + return parent::getRelationExistenceQuery($query, $parentQuery, $columns); + } + + /** + * Get the key for comparing against the parent key in "has" query. + * + * @return string + */ + public function getExistenceCompareKey() + { + return $this->getQualifiedForeignKeyName(); + } + + /** + * Get a relationship join table hash. + * + * @return string + */ + public function getRelationCountHash() + { + return 'laravel_reserved_'.static::$selfJoinCount++; + } + + /** + * Specify that the pivot table has creation and update timestamps. + * + * @param mixed $createdAt + * @param mixed $updatedAt + * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany + */ + public function withTimestamps($createdAt = null, $updatedAt = null) + { + $this->pivotCreatedAt = $createdAt; + $this->pivotUpdatedAt = $updatedAt; + + return $this->withPivot($this->createdAt(), $this->updatedAt()); + } + + /** + * Get the name of the "created at" column. + * + * @return string + */ + public function createdAt() + { + return $this->pivotCreatedAt ?: $this->parent->getCreatedAtColumn(); + } + + /** + * Get the name of the "updated at" column. + * + * @return string + */ + public function updatedAt() + { + return $this->pivotUpdatedAt ?: $this->parent->getUpdatedAtColumn(); + } + + /** + * Get the fully qualified foreign key for the relation. + * + * @return string + */ + public function getQualifiedForeignKeyName() + { + return $this->table.'.'.$this->foreignKey; + } + + /** + * Get the fully qualified "related key" for the relation. + * + * @return string + */ + public function getQualifiedRelatedKeyName() + { + return $this->table.'.'.$this->relatedKey; + } + + /** + * Get the intermediate table for the relationship. + * + * @return string + */ + public function getTable() + { + return $this->table; + } + + /** + * Get the relationship name for the relationship. + * + * @return string + */ + public function getRelationName() + { + return $this->relationName; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Concerns/InteractsWithPivotTable.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Concerns/InteractsWithPivotTable.php new file mode 100644 index 0000000..7e79bc1 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Concerns/InteractsWithPivotTable.php @@ -0,0 +1,500 @@ + [], 'detached' => [], + ]; + + $records = $this->formatRecordsList((array) $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 + // and removing all of those rows from this "intermediate" joining table. + $detach = array_values(array_intersect( + $this->newPivotQuery()->pluck($this->relatedKey)->all(), + array_keys($records) + )); + + if (count($detach) > 0) { + $this->detach($detach, false); + + $changes['detached'] = $this->castKeys($detach); + } + + // Finally, for all of the records which were not "detached", we'll attach the + // records into the intermediate table. Then, we will add those attaches to + // this change list and get ready to return these results to the callers. + $attach = array_diff_key($records, array_flip($detach)); + + if (count($attach) > 0) { + $this->attach($attach, [], false); + + $changes['attached'] = array_keys($attach); + } + + // Once we have finished attaching or detaching the records, we will see if we + // have done any attaching or detaching, and if we have we will touch these + // relationships if they are configured to touch on any database updates. + if ($touch && (count($changes['attached']) || + count($changes['detached']))) { + $this->touchIfTouching(); + } + + return $changes; + } + + /** + * Sync the intermediate tables with a list of IDs without detaching. + * + * @param \Illuminate\Database\Eloquent\Collection|array $ids + * @return array + */ + public function syncWithoutDetaching($ids) + { + return $this->sync($ids, false); + } + + /** + * Sync the intermediate tables with a list of IDs or collection of models. + * + * @param \Illuminate\Database\Eloquent\Collection|\Illuminate\Support\Collection|array $ids + * @param bool $detaching + * @return array + */ + public function sync($ids, $detaching = true) + { + $changes = [ + 'attached' => [], 'detached' => [], 'updated' => [], + ]; + + // First we need to attach any of the associated models that are not currently + // in this joining table. We'll spin through the given IDs, checking to see + // if they exist in the array of current ones, and if not we will insert. + $current = $this->newPivotQuery()->pluck( + $this->relatedKey + )->all(); + + $detach = array_diff($current, array_keys( + $records = $this->formatRecordsList((array) $this->parseIds($ids)) + )); + + // Next, we will take the differences of the currents and given IDs and detach + // all of the entities that exist in the "current" array but are not in the + // array of the new IDs given to the method which will complete the sync. + if ($detaching && count($detach) > 0) { + $this->detach($detach); + + $changes['detached'] = $this->castKeys($detach); + } + + // Now we are finally ready to attach the new records. Note that we'll disable + // touching until after the entire operation is complete so we don't fire a + // ton of touch operations until we are totally done syncing the records. + $changes = array_merge( + $changes, $this->attachNew($records, $current, false) + ); + + // Once we have finished attaching or detaching the records, we will see if we + // have done any attaching or detaching, and if we have we will touch these + // relationships if they are configured to touch on any database updates. + if (count($changes['attached']) || + count($changes['updated'])) { + $this->touchIfTouching(); + } + + return $changes; + } + + /** + * Format the sync / toggle record list so that it is keyed by ID. + * + * @param array $records + * @return array + */ + protected function formatRecordsList(array $records) + { + return collect($records)->mapWithKeys(function ($attributes, $id) { + if (! is_array($attributes)) { + list($id, $attributes) = [$attributes, []]; + } + + return [$id => $attributes]; + })->all(); + } + + /** + * Attach all of the records that aren't in the given current records. + * + * @param array $records + * @param array $current + * @param bool $touch + * @return array + */ + protected function attachNew(array $records, array $current, $touch = true) + { + $changes = ['attached' => [], 'updated' => []]; + + foreach ($records as $id => $attributes) { + // If the ID is not in the list of existing pivot IDs, we will insert a new pivot + // record, otherwise, we will just update this existing record on this joining + // table, so that the developers will easily update these records pain free. + if (! in_array($id, $current)) { + $this->attach($id, $attributes, $touch); + + $changes['attached'][] = $this->castKey($id); + } + + // Now we'll try to update an existing pivot record with the attributes that were + // given to the method. If the model is actually updated we will add it to the + // list of updated pivot records so we return them back out to the consumer. + elseif (count($attributes) > 0 && + $this->updateExistingPivot($id, $attributes, $touch)) { + $changes['updated'][] = $this->castKey($id); + } + } + + return $changes; + } + + /** + * Update an existing pivot record on the table. + * + * @param mixed $id + * @param array $attributes + * @param bool $touch + * @return int + */ + public function updateExistingPivot($id, array $attributes, $touch = true) + { + if (in_array($this->updatedAt(), $this->pivotColumns)) { + $attributes = $this->addTimestampsToAttachment($attributes, true); + } + + $updated = $this->newPivotStatementForId($id)->update($attributes); + + if ($touch) { + $this->touchIfTouching(); + } + + return $updated; + } + + /** + * Attach a model to the parent. + * + * @param mixed $id + * @param array $attributes + * @param bool $touch + * @return void + */ + public function attach($id, array $attributes = [], $touch = true) + { + // Here we will insert the attachment records into the pivot table. Once we have + // 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 + )); + + if ($touch) { + $this->touchIfTouching(); + } + } + + /** + * Create an array of records to insert into the pivot table. + * + * @param array $ids + * @param array $attributes + * @return array + */ + protected function formatAttachRecords($ids, array $attributes) + { + $records = []; + + $hasTimestamps = ($this->hasPivotColumn($this->createdAt()) || + $this->hasPivotColumn($this->updatedAt())); + + // To create the attachment records, we will simply spin through the IDs given + // and create a new record to insert for each ID. Each ID may actually be a + // key in the array, with extra attributes to be placed in other columns. + foreach ($ids as $key => $value) { + $records[] = $this->formatAttachRecord( + $key, $value, $attributes, $hasTimestamps + ); + } + + return $records; + } + + /** + * Create a full attachment record payload. + * + * @param int $key + * @param mixed $value + * @param array $attributes + * @param bool $hasTimestamps + * @return array + */ + protected function formatAttachRecord($key, $value, $attributes, $hasTimestamps) + { + list($id, $attributes) = $this->extractAttachIdAndAttributes($key, $value, $attributes); + + return array_merge( + $this->baseAttachRecord($id, $hasTimestamps), $attributes + ); + } + + /** + * Get the attach record ID and extra attributes. + * + * @param mixed $key + * @param mixed $value + * @param array $attributes + * @return array + */ + protected function extractAttachIdAndAttributes($key, $value, array $attributes) + { + return is_array($value) + ? [$key, array_merge($value, $attributes)] + : [$value, $attributes]; + } + + /** + * Create a new pivot attachment record. + * + * @param int $id + * @param bool $timed + * @return array + */ + protected function baseAttachRecord($id, $timed) + { + $record[$this->relatedKey] = $id; + + $record[$this->foreignKey] = $this->parent->getKey(); + + // If the record needs to have creation and update timestamps, we will make + // them by calling the parent model's "freshTimestamp" method which will + // provide us with a fresh timestamp in this model's preferred format. + if ($timed) { + $record = $this->addTimestampsToAttachment($record); + } + + return $record; + } + + /** + * Set the creation and update timestamps on an attach record. + * + * @param array $record + * @param bool $exists + * @return array + */ + protected function addTimestampsToAttachment(array $record, $exists = false) + { + $fresh = $this->parent->freshTimestamp(); + + if (! $exists && $this->hasPivotColumn($this->createdAt())) { + $record[$this->createdAt()] = $fresh; + } + + if ($this->hasPivotColumn($this->updatedAt())) { + $record[$this->updatedAt()] = $fresh; + } + + return $record; + } + + /** + * Determine whether the given column is defined as a pivot column. + * + * @param string $column + * @return bool + */ + protected function hasPivotColumn($column) + { + return in_array($column, $this->pivotColumns); + } + + /** + * Detach models from the relationship. + * + * @param mixed $ids + * @param bool $touch + * @return int + */ + public function detach($ids = null, $touch = true) + { + $query = $this->newPivotQuery(); + + // 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) { + return 0; + } + + $query->whereIn($this->relatedKey, (array) $ids); + } + + // Once we have all of the conditions set on the statement, we are ready + // to run the delete on the pivot table. Then, if the touch parameter + // is true, we will go ahead and touch all related models to sync. + $results = $query->delete(); + + if ($touch) { + $this->touchIfTouching(); + } + + return $results; + } + + /** + * Create a new pivot model instance. + * + * @param array $attributes + * @param bool $exists + * @return \Illuminate\Database\Eloquent\Relations\Pivot + */ + public function newPivot(array $attributes = [], $exists = false) + { + $pivot = $this->related->newPivot( + $this->parent, $attributes, $this->table, $exists, $this->using + ); + + return $pivot->setPivotKeys($this->foreignKey, $this->relatedKey); + } + + /** + * Create a new existing pivot model instance. + * + * @param array $attributes + * @return \Illuminate\Database\Eloquent\Relations\Pivot + */ + public function newExistingPivot(array $attributes = []) + { + return $this->newPivot($attributes, true); + } + + /** + * Get a new plain query builder for the pivot table. + * + * @return \Illuminate\Database\Query\Builder + */ + public function newPivotStatement() + { + return $this->query->getQuery()->newQuery()->from($this->table); + } + + /** + * Get a new pivot statement for a given "other" ID. + * + * @param mixed $id + * @return \Illuminate\Database\Query\Builder + */ + public function newPivotStatementForId($id) + { + return $this->newPivotQuery()->where($this->relatedKey, $id); + } + + /** + * Create a new query builder for the pivot table. + * + * @return \Illuminate\Database\Query\Builder + */ + protected function newPivotQuery() + { + $query = $this->newPivotStatement(); + + foreach ($this->pivotWheres as $arguments) { + call_user_func_array([$query, 'where'], $arguments); + } + + foreach ($this->pivotWhereIns as $arguments) { + call_user_func_array([$query, 'whereIn'], $arguments); + } + + return $query->where($this->foreignKey, $this->parent->getKey()); + } + + /** + * Set the columns on the pivot table to retrieve. + * + * @param array|mixed $columns + * @return $this + */ + public function withPivot($columns) + { + $this->pivotColumns = array_merge( + $this->pivotColumns, is_array($columns) ? $columns : func_get_args() + ); + + return $this; + } + + /** + * Get all of the IDs from the given mixed value. + * + * @param mixed $value + * @return array + */ + protected function parseIds($value) + { + if ($value instanceof Model) { + return $value->getKey(); + } + + if ($value instanceof Collection) { + return $value->modelKeys(); + } + + if ($value instanceof BaseCollection) { + return $value->toArray(); + } + + return $value; + } + + /** + * Cast the given keys to integers if they are numeric and string otherwise. + * + * @param array $keys + * @return array + */ + protected function castKeys(array $keys) + { + return (array) array_map(function ($v) { + return $this->castKey($v); + }, $keys); + } + + /** + * Cast the given key to an integer if it is numeric. + * + * @param mixed $key + * @return mixed + */ + protected function castKey($key) + { + return is_numeric($key) ? (int) $key : (string) $key; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasMany.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasMany.php new file mode 100755 index 0000000..6149e47 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasMany.php @@ -0,0 +1,47 @@ +query->get(); + } + + /** + * Initialize the relation on a set of models. + * + * @param array $models + * @param string $relation + * @return array + */ + public function initRelation(array $models, $relation) + { + foreach ($models as $model) { + $model->setRelation($relation, $this->related->newCollection()); + } + + return $models; + } + + /** + * Match the eagerly loaded results to their parents. + * + * @param array $models + * @param \Illuminate\Database\Eloquent\Collection $results + * @param string $relation + * @return array + */ + public function match(array $models, Collection $results, $relation) + { + return $this->matchMany($models, $results, $relation); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasManyThrough.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasManyThrough.php new file mode 100644 index 0000000..3fb7a7c --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasManyThrough.php @@ -0,0 +1,455 @@ +localKey = $localKey; + $this->firstKey = $firstKey; + $this->secondKey = $secondKey; + $this->farParent = $farParent; + $this->throughParent = $throughParent; + + parent::__construct($query, $throughParent); + } + + /** + * Set the base constraints on the relation query. + * + * @return void + */ + public function addConstraints() + { + $localValue = $this->farParent[$this->localKey]; + + $this->performJoin(); + + if (static::$constraints) { + $this->query->where($this->getQualifiedFirstKeyName(), '=', $localValue); + } + } + + /** + * Set the join clause on the query. + * + * @param \Illuminate\Database\Eloquent\Builder|null $query + * @return void + */ + protected function performJoin(Builder $query = null) + { + $query = $query ?: $this->query; + + $farKey = $this->getQualifiedFarKeyName(); + + $query->join($this->throughParent->getTable(), $this->getQualifiedParentKeyName(), '=', $farKey); + + if ($this->throughParentSoftDeletes()) { + $query->whereNull($this->throughParent->getQualifiedDeletedAtColumn()); + } + } + + /** + * Determine whether "through" parent of the relation uses Soft Deletes. + * + * @return bool + */ + public function throughParentSoftDeletes() + { + return in_array(SoftDeletes::class, class_uses_recursive( + get_class($this->throughParent) + )); + } + + /** + * Set the constraints for an eager load of the relation. + * + * @param array $models + * @return void + */ + public function addEagerConstraints(array $models) + { + $this->query->whereIn( + $this->getQualifiedFirstKeyName(), $this->getKeys($models, $this->localKey) + ); + } + + /** + * Initialize the relation on a set of models. + * + * @param array $models + * @param string $relation + * @return array + */ + public function initRelation(array $models, $relation) + { + foreach ($models as $model) { + $model->setRelation($relation, $this->related->newCollection()); + } + + return $models; + } + + /** + * Match the eagerly loaded results to their parents. + * + * @param array $models + * @param \Illuminate\Database\Eloquent\Collection $results + * @param string $relation + * @return array + */ + public function match(array $models, Collection $results, $relation) + { + $dictionary = $this->buildDictionary($results); + + // Once we have the dictionary we can simply spin through the parent models to + // link them up with their children using the keyed dictionary to make the + // matching very convenient and easy work. Then we'll just return them. + foreach ($models as $model) { + if (isset($dictionary[$key = $model->getKey()])) { + $model->setRelation( + $relation, $this->related->newCollection($dictionary[$key]) + ); + } + } + + return $models; + } + + /** + * Build model dictionary keyed by the relation's foreign key. + * + * @param \Illuminate\Database\Eloquent\Collection $results + * @return array + */ + protected function buildDictionary(Collection $results) + { + $dictionary = []; + + // First we will create a dictionary of models keyed by the foreign key of the + // relationship as this will allow us to quickly access all of the related + // models without having to do nested looping which will be quite slow. + foreach ($results as $result) { + $dictionary[$result->{$this->firstKey}][] = $result; + } + + return $dictionary; + } + + /** + * Get the first related model record matching the attributes or instantiate it. + * + * @param array $attributes + * @return \Illuminate\Database\Eloquent\Model + */ + public function firstOrNew(array $attributes) + { + if (is_null($instance = $this->where($attributes)->first())) { + $instance = $this->related->newInstance($attributes); + } + + return $instance; + } + + /** + * Create or update a related record matching the attributes, and fill it with values. + * + * @param array $attributes + * @param array $values + * @return \Illuminate\Database\Eloquent\Model + */ + public function updateOrCreate(array $attributes, array $values = []) + { + $instance = $this->firstOrNew($attributes); + + $instance->fill($values)->save(); + + return $instance; + } + + /** + * Execute the query and get the first related model. + * + * @param array $columns + * @return mixed + */ + public function first($columns = ['*']) + { + $results = $this->take(1)->get($columns); + + return count($results) > 0 ? $results->first() : null; + } + + /** + * Execute the query and get the first result or throw an exception. + * + * @param array $columns + * @return \Illuminate\Database\Eloquent\Model|static + * + * @throws \Illuminate\Database\Eloquent\ModelNotFoundException + */ + public function firstOrFail($columns = ['*']) + { + if (! is_null($model = $this->first($columns))) { + return $model; + } + + throw (new ModelNotFoundException)->setModel(get_class($this->related)); + } + + /** + * Find a related model by its primary key. + * + * @param mixed $id + * @param array $columns + * @return \Illuminate\Database\Eloquent\Model|\Illuminate\Database\Eloquent\Collection|null + */ + public function find($id, $columns = ['*']) + { + if (is_array($id)) { + return $this->findMany($id, $columns); + } + + return $this->where( + $this->getRelated()->getQualifiedKeyName(), '=', $id + )->first($columns); + } + + /** + * Find multiple related models by their primary keys. + * + * @param mixed $ids + * @param array $columns + * @return \Illuminate\Database\Eloquent\Collection + */ + public function findMany($ids, $columns = ['*']) + { + if (empty($ids)) { + return $this->getRelated()->newCollection(); + } + + return $this->whereIn( + $this->getRelated()->getQualifiedKeyName(), $ids + )->get($columns); + } + + /** + * Find a related model by its primary key or throw an exception. + * + * @param mixed $id + * @param array $columns + * @return \Illuminate\Database\Eloquent\Model|\Illuminate\Database\Eloquent\Collection + * + * @throws \Illuminate\Database\Eloquent\ModelNotFoundException + */ + public function findOrFail($id, $columns = ['*']) + { + $result = $this->find($id, $columns); + + if (is_array($id)) { + if (count($result) == count(array_unique($id))) { + return $result; + } + } elseif (! is_null($result)) { + return $result; + } + + throw (new ModelNotFoundException)->setModel(get_class($this->related)); + } + + /** + * Get the results of the relationship. + * + * @return mixed + */ + public function getResults() + { + return $this->get(); + } + + /** + * Execute the query as a "select" statement. + * + * @param array $columns + * @return \Illuminate\Database\Eloquent\Collection + */ + public function get($columns = ['*']) + { + // First we'll add the proper select columns onto the query so it is run with + // the proper columns. Then, we will get the results and hydrate out pivot + // models with the result of those columns as a separate model relation. + $columns = $this->query->getQuery()->columns ? [] : $columns; + + $builder = $this->query->applyScopes(); + + $models = $builder->addSelect( + $this->shouldSelect($columns) + )->getModels(); + + // If we actually found models we will also eager load any relationships that + // have been specified as needing to be eager loaded. This will solve the + // n + 1 query problem for the developer and also increase performance. + if (count($models) > 0) { + $models = $builder->eagerLoadRelations($models); + } + + return $this->related->newCollection($models); + } + + /** + * Get a paginator for the "select" statement. + * + * @param int $perPage + * @param array $columns + * @param string $pageName + * @param int $page + * @return \Illuminate\Contracts\Pagination\LengthAwarePaginator + */ + public function paginate($perPage = null, $columns = ['*'], $pageName = 'page', $page = null) + { + $this->query->addSelect($this->shouldSelect($columns)); + + return $this->query->paginate($perPage, $columns, $pageName, $page); + } + + /** + * Paginate the given query into a simple paginator. + * + * @param int $perPage + * @param array $columns + * @param string $pageName + * @param int|null $page + * @return \Illuminate\Contracts\Pagination\Paginator + */ + public function simplePaginate($perPage = null, $columns = ['*'], $pageName = 'page', $page = null) + { + $this->query->addSelect($this->shouldSelect($columns)); + + return $this->query->simplePaginate($perPage, $columns, $pageName, $page); + } + + /** + * Set the select clause for the relation query. + * + * @param array $columns + * @return array + */ + protected function shouldSelect(array $columns = ['*']) + { + if ($columns == ['*']) { + $columns = [$this->related->getTable().'.*']; + } + + return array_merge($columns, [$this->getQualifiedFirstKeyName()]); + } + + /** + * Add the constraints for a relationship query. + * + * @param \Illuminate\Database\Eloquent\Builder $query + * @param \Illuminate\Database\Eloquent\Builder $parentQuery + * @param array|mixed $columns + * @return \Illuminate\Database\Eloquent\Builder + */ + public function getRelationExistenceQuery(Builder $query, Builder $parentQuery, $columns = ['*']) + { + $this->performJoin($query); + + return $query->select($columns)->whereColumn( + $this->getExistenceCompareKey(), '=', $this->getQualifiedFirstKeyName() + ); + } + + /** + * Get the key for comparing against the parent key in "has" query. + * + * @return string + */ + public function getExistenceCompareKey() + { + return $this->farParent->getQualifiedKeyName(); + } + + /** + * Get the qualified foreign key on the related model. + * + * @return string + */ + public function getQualifiedFarKeyName() + { + return $this->getQualifiedForeignKeyName(); + } + + /** + * Get the qualified foreign key on the related model. + * + * @return string + */ + public function getQualifiedForeignKeyName() + { + return $this->related->getTable().'.'.$this->secondKey; + } + + /** + * Get the qualified foreign key on the "through" model. + * + * @return string + */ + public function getQualifiedFirstKeyName() + { + return $this->throughParent->getTable().'.'.$this->firstKey; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOne.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOne.php new file mode 100755 index 0000000..a118f29 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOne.php @@ -0,0 +1,97 @@ +query->first() ?: $this->getDefaultFor($this->parent); + } + + /** + * Initialize the relation on a set of models. + * + * @param array $models + * @param string $relation + * @return array + */ + public function initRelation(array $models, $relation) + { + foreach ($models as $model) { + $model->setRelation($relation, $this->getDefaultFor($model)); + } + + 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. + * + * @param array $models + * @param \Illuminate\Database\Eloquent\Collection $results + * @param string $relation + * @return array + */ + public function match(array $models, Collection $results, $relation) + { + return $this->matchOne($models, $results, $relation); + } + + /** + * Return a new model instance in case the relationship does not exist. + * + * @param \Closure|array|bool $callback + * @return $this + */ + public function withDefault($callback = true) + { + $this->withDefault = $callback; + + return $this; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOneOrMany.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOneOrMany.php new file mode 100755 index 0000000..d115e8d --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOneOrMany.php @@ -0,0 +1,404 @@ +localKey = $localKey; + $this->foreignKey = $foreignKey; + + parent::__construct($query, $parent); + } + + /** + * Set the base constraints on the relation query. + * + * @return void + */ + public function addConstraints() + { + if (static::$constraints) { + $this->query->where($this->foreignKey, '=', $this->getParentKey()); + + $this->query->whereNotNull($this->foreignKey); + } + } + + /** + * Set the constraints for an eager load of the relation. + * + * @param array $models + * @return void + */ + public function addEagerConstraints(array $models) + { + $this->query->whereIn( + $this->foreignKey, $this->getKeys($models, $this->localKey) + ); + } + + /** + * Match the eagerly loaded results to their single parents. + * + * @param array $models + * @param \Illuminate\Database\Eloquent\Collection $results + * @param string $relation + * @return array + */ + public function matchOne(array $models, Collection $results, $relation) + { + return $this->matchOneOrMany($models, $results, $relation, 'one'); + } + + /** + * Match the eagerly loaded results to their many parents. + * + * @param array $models + * @param \Illuminate\Database\Eloquent\Collection $results + * @param string $relation + * @return array + */ + public function matchMany(array $models, Collection $results, $relation) + { + return $this->matchOneOrMany($models, $results, $relation, 'many'); + } + + /** + * Match the eagerly loaded results to their many parents. + * + * @param array $models + * @param \Illuminate\Database\Eloquent\Collection $results + * @param string $relation + * @param string $type + * @return array + */ + protected function matchOneOrMany(array $models, Collection $results, $relation, $type) + { + $dictionary = $this->buildDictionary($results); + + // Once we have the dictionary we can simply spin through the parent models to + // link them up with their children using the keyed dictionary to make the + // matching very convenient and easy work. Then we'll just return them. + foreach ($models as $model) { + if (isset($dictionary[$key = $model->getAttribute($this->localKey)])) { + $model->setRelation( + $relation, $this->getRelationValue($dictionary, $key, $type) + ); + } + } + + return $models; + } + + /** + * Get the value of a relationship by one or many type. + * + * @param array $dictionary + * @param string $key + * @param string $type + * @return mixed + */ + protected function getRelationValue(array $dictionary, $key, $type) + { + $value = $dictionary[$key]; + + return $type == 'one' ? reset($value) : $this->related->newCollection($value); + } + + /** + * Build model dictionary keyed by the relation's foreign key. + * + * @param \Illuminate\Database\Eloquent\Collection $results + * @return array + */ + protected function buildDictionary(Collection $results) + { + $dictionary = []; + + $foreign = $this->getForeignKeyName(); + + // First we will create a dictionary of models keyed by the foreign key of the + // relationship as this will allow us to quickly access all of the related + // models without having to do nested looping which will be quite slow. + foreach ($results as $result) { + $dictionary[$result->{$foreign}][] = $result; + } + + return $dictionary; + } + + /** + * Find a model by its primary key or return new instance of the related model. + * + * @param mixed $id + * @param array $columns + * @return \Illuminate\Support\Collection|\Illuminate\Database\Eloquent\Model + */ + public function findOrNew($id, $columns = ['*']) + { + if (is_null($instance = $this->find($id, $columns))) { + $instance = $this->related->newInstance(); + + $instance->setAttribute($this->getForeignKeyName(), $this->getParentKey()); + } + + return $instance; + } + + /** + * Get the first related model record matching the attributes or instantiate it. + * + * @param array $attributes + * @return \Illuminate\Database\Eloquent\Model + */ + public function firstOrNew(array $attributes) + { + if (is_null($instance = $this->where($attributes)->first())) { + $instance = $this->related->newInstance($attributes); + + $instance->setAttribute($this->getForeignKeyName(), $this->getParentKey()); + } + + return $instance; + } + + /** + * Get the first related record matching the attributes or create it. + * + * @param array $attributes + * @return \Illuminate\Database\Eloquent\Model + */ + public function firstOrCreate(array $attributes) + { + if (is_null($instance = $this->where($attributes)->first())) { + $instance = $this->create($attributes); + } + + return $instance; + } + + /** + * Create or update a related record matching the attributes, and fill it with values. + * + * @param array $attributes + * @param array $values + * @return \Illuminate\Database\Eloquent\Model + */ + public function updateOrCreate(array $attributes, array $values = []) + { + return tap($this->firstOrNew($attributes), function ($instance) use ($values) { + $instance->fill($values); + + $instance->save(); + }); + } + + /** + * Attach a model instance to the parent model. + * + * @param \Illuminate\Database\Eloquent\Model $model + * @return \Illuminate\Database\Eloquent\Model|false + */ + public function save(Model $model) + { + $model->setAttribute($this->getForeignKeyName(), $this->getParentKey()); + + return $model->save() ? $model : false; + } + + /** + * Attach a collection of models to the parent instance. + * + * @param \Traversable|array $models + * @return \Traversable|array + */ + public function saveMany($models) + { + foreach ($models as $model) { + $this->save($model); + } + + return $models; + } + + /** + * Create a new instance of the related model. + * + * @param array $attributes + * @return \Illuminate\Database\Eloquent\Model + */ + public function create(array $attributes) + { + return tap($this->related->newInstance($attributes), function ($instance) { + $instance->setAttribute($this->getForeignKeyName(), $this->getParentKey()); + + $instance->save(); + }); + } + + /** + * Create a Collection of new instances of the related model. + * + * @param array $records + * @return \Illuminate\Database\Eloquent\Collection + */ + public function createMany(array $records) + { + $instances = $this->related->newCollection(); + + foreach ($records as $record) { + $instances->push($this->create($record)); + } + + return $instances; + } + + /** + * Perform an update on all the related models. + * + * @param array $attributes + * @return int + */ + public function update(array $attributes) + { + if ($this->related->usesTimestamps()) { + $attributes[$this->relatedUpdatedAt()] = $this->related->freshTimestampString(); + } + + return $this->query->update($attributes); + } + + /** + * Add the constraints for a relationship query. + * + * @param \Illuminate\Database\Eloquent\Builder $query + * @param \Illuminate\Database\Eloquent\Builder $parentQuery + * @param array|mixed $columns + * @return \Illuminate\Database\Eloquent\Builder + */ + public function getRelationExistenceQuery(Builder $query, Builder $parentQuery, $columns = ['*']) + { + if ($query->getQuery()->from == $parentQuery->getQuery()->from) { + return $this->getRelationExistenceQueryForSelfRelation($query, $parentQuery, $columns); + } + + return parent::getRelationExistenceQuery($query, $parentQuery, $columns); + } + + /** + * Add the constraints for a relationship query on the same table. + * + * @param \Illuminate\Database\Eloquent\Builder $query + * @param \Illuminate\Database\Eloquent\Builder $parentQuery + * @param array|mixed $columns + * @return \Illuminate\Database\Eloquent\Builder + */ + public function getRelationExistenceQueryForSelfRelation(Builder $query, Builder $parentQuery, $columns = ['*']) + { + $query->from($query->getModel()->getTable().' as '.$hash = $this->getRelationCountHash()); + + $query->getModel()->setTable($hash); + + return $query->select($columns)->whereColumn( + $this->getQualifiedParentKeyName(), '=', $hash.'.'.$this->getForeignKeyName() + ); + } + + /** + * Get a relationship join table hash. + * + * @return string + */ + public function getRelationCountHash() + { + return 'laravel_reserved_'.static::$selfJoinCount++; + } + + /** + * Get the key for comparing against the parent key in "has" query. + * + * @return string + */ + public function getExistenceCompareKey() + { + return $this->getQualifiedForeignKeyName(); + } + + /** + * Get the key value of the parent's local key. + * + * @return mixed + */ + public function getParentKey() + { + return $this->parent->getAttribute($this->localKey); + } + + /** + * Get the fully qualified parent key name. + * + * @return string + */ + public function getQualifiedParentKeyName() + { + return $this->parent->getTable().'.'.$this->localKey; + } + + /** + * Get the plain foreign key. + * + * @return string + */ + public function getForeignKeyName() + { + $segments = explode('.', $this->getQualifiedForeignKeyName()); + + return $segments[count($segments) - 1]; + } + + /** + * Get the foreign key for the relationship. + * + * @return string + */ + public function getQualifiedForeignKeyName() + { + return $this->foreignKey; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphMany.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphMany.php new file mode 100755 index 0000000..e2a5c5a --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphMany.php @@ -0,0 +1,47 @@ +query->get(); + } + + /** + * Initialize the relation on a set of models. + * + * @param array $models + * @param string $relation + * @return array + */ + public function initRelation(array $models, $relation) + { + foreach ($models as $model) { + $model->setRelation($relation, $this->related->newCollection()); + } + + return $models; + } + + /** + * Match the eagerly loaded results to their parents. + * + * @param array $models + * @param \Illuminate\Database\Eloquent\Collection $results + * @param string $relation + * @return array + */ + public function match(array $models, Collection $results, $relation) + { + return $this->matchMany($models, $results, $relation); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphOne.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphOne.php new file mode 100755 index 0000000..339a68c --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphOne.php @@ -0,0 +1,47 @@ +query->first(); + } + + /** + * Initialize the relation on a set of models. + * + * @param array $models + * @param string $relation + * @return array + */ + public function initRelation(array $models, $relation) + { + foreach ($models as $model) { + $model->setRelation($relation, null); + } + + return $models; + } + + /** + * Match the eagerly loaded results to their parents. + * + * @param array $models + * @param \Illuminate\Database\Eloquent\Collection $results + * @param string $relation + * @return array + */ + public function match(array $models, Collection $results, $relation) + { + return $this->matchOne($models, $results, $relation); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphOneOrMany.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphOneOrMany.php new file mode 100755 index 0000000..361f2ae --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphOneOrMany.php @@ -0,0 +1,232 @@ +morphType = $type; + + $this->morphClass = $parent->getMorphClass(); + + parent::__construct($query, $parent, $id, $localKey); + } + + /** + * Set the base constraints on the relation query. + * + * @return void + */ + public function addConstraints() + { + if (static::$constraints) { + parent::addConstraints(); + + $this->query->where($this->morphType, $this->morphClass); + } + } + + /** + * Set the constraints for an eager load of the relation. + * + * @param array $models + * @return void + */ + public function addEagerConstraints(array $models) + { + parent::addEagerConstraints($models); + + $this->query->where($this->morphType, $this->morphClass); + } + + /** + * Find a related model by its primary key or return new instance of the related model. + * + * @param mixed $id + * @param array $columns + * @return \Illuminate\Support\Collection|\Illuminate\Database\Eloquent\Model + */ + public function findOrNew($id, $columns = ['*']) + { + if (is_null($instance = $this->find($id, $columns))) { + $instance = $this->related->newInstance(); + + // 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); + } + + return $instance; + } + + /** + * Get the first related model record matching the attributes or instantiate it. + * + * @param array $attributes + * @return \Illuminate\Database\Eloquent\Model + */ + public function firstOrNew(array $attributes) + { + if (is_null($instance = $this->where($attributes)->first())) { + $instance = $this->related->newInstance($attributes); + + // 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); + } + + return $instance; + } + + /** + * Get the first related record matching the attributes or create it. + * + * @param array $attributes + * @return \Illuminate\Database\Eloquent\Model + */ + public function firstOrCreate(array $attributes) + { + if (is_null($instance = $this->where($attributes)->first())) { + $instance = $this->create($attributes); + } + + return $instance; + } + + /** + * Create or update a related record matching the attributes, and fill it with values. + * + * @param array $attributes + * @param array $values + * @return \Illuminate\Database\Eloquent\Model + */ + public function updateOrCreate(array $attributes, array $values = []) + { + return tap($this->firstOrNew($attributes), function ($instance) use ($values) { + $instance->fill($values); + + $instance->save(); + }); + } + + /** + * Attach a model instance to the parent model. + * + * @param \Illuminate\Database\Eloquent\Model $model + * @return \Illuminate\Database\Eloquent\Model + */ + public function save(Model $model) + { + $model->setAttribute($this->getMorphType(), $this->morphClass); + + return parent::save($model); + } + + /** + * Create a new instance of the related model. + * + * @param array $attributes + * @return \Illuminate\Database\Eloquent\Model + */ + public function create(array $attributes) + { + $instance = $this->related->newInstance($attributes); + + // 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); + + $instance->save(); + + return $instance; + } + + /** + * Set the foreign ID and type for creating a related model. + * + * @param \Illuminate\Database\Eloquent\Model $model + * @return void + */ + protected function setForeignAttributesForCreate(Model $model) + { + $model->{$this->getForeignKeyName()} = $this->getParentKey(); + + $model->{$this->getMorphType()} = $this->morphClass; + } + + /** + * Get the relationship query. + * + * @param \Illuminate\Database\Eloquent\Builder $query + * @param \Illuminate\Database\Eloquent\Builder $parentQuery + * @param array|mixed $columns + * @return \Illuminate\Database\Eloquent\Builder + */ + public function getRelationExistenceQuery(Builder $query, Builder $parentQuery, $columns = ['*']) + { + return parent::getRelationExistenceQuery($query, $parentQuery, $columns)->where( + $this->morphType, $this->morphClass + ); + } + + /** + * Get the foreign key "type" name. + * + * @return string + */ + public function getQualifiedMorphType() + { + return $this->morphType; + } + + /** + * Get the plain morph type name without the table. + * + * @return string + */ + public function getMorphType() + { + return last(explode('.', $this->morphType)); + } + + /** + * Get the class name of the parent model. + * + * @return string + */ + public function getMorphClass() + { + return $this->morphClass; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphPivot.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphPivot.php new file mode 100644 index 0000000..b7a2f34 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphPivot.php @@ -0,0 +1,79 @@ +where($this->morphType, $this->morphClass); + + return parent::setKeysForSaveQuery($query); + } + + /** + * Delete the pivot model record from the database. + * + * @return int + */ + public function delete() + { + $query = $this->getDeleteQuery(); + + $query->where($this->morphType, $this->morphClass); + + return $query->delete(); + } + + /** + * Set the morph type for the pivot. + * + * @param string $morphType + * @return $this + */ + public function setMorphType($morphType) + { + $this->morphType = $morphType; + + return $this; + } + + /** + * Set the morph class for the pivot. + * + * @param string $morphClass + * @return \Illuminate\Database\Eloquent\Relations\MorphPivot + */ + public function setMorphClass($morphClass) + { + $this->morphClass = $morphClass; + + return $this; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphTo.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphTo.php new file mode 100644 index 0000000..93a1a17 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphTo.php @@ -0,0 +1,272 @@ +morphType = $type; + + parent::__construct($query, $parent, $foreignKey, $ownerKey, $relation); + } + + /** + * Set the constraints for an eager load of the relation. + * + * @param array $models + * @return void + */ + public function addEagerConstraints(array $models) + { + $this->buildDictionary($this->models = Collection::make($models)); + } + + /** + * Build a dictionary with the models. + * + * @param \Illuminate\Database\Eloquent\Collection $models + * @return void + */ + protected function buildDictionary(Collection $models) + { + foreach ($models as $model) { + if ($model->{$this->morphType}) { + $this->dictionary[$model->{$this->morphType}][$model->{$this->foreignKey}][] = $model; + } + } + } + + /** + * Get the results of the relationship. + * + * @return mixed + */ + public function getResults() + { + return $this->ownerKey ? $this->query->first() : null; + } + + /** + * Get the results of the relationship. + * + * Called via eager load method of Eloquent query builder. + * + * @return mixed + */ + public function getEager() + { + foreach (array_keys($this->dictionary) as $type) { + $this->matchToMorphParents($type, $this->getResultsByType($type)); + } + + return $this->models; + } + + /** + * Get all of the relation results for a type. + * + * @param string $type + * @return \Illuminate\Database\Eloquent\Collection + */ + protected function getResultsByType($type) + { + $instance = $this->createModelByType($type); + + $query = $this->replayMacros($instance->newQuery()) + ->mergeConstraintsFrom($this->getQuery()) + ->with($this->getQuery()->getEagerLoads()); + + return $query->whereIn( + $instance->getTable().'.'.$instance->getKeyName(), $this->gatherKeysByType($type) + )->get(); + } + + /** + * Gather all of the foreign keys for a given type. + * + * @param string $type + * @return array + */ + protected function gatherKeysByType($type) + { + return collect($this->dictionary[$type])->map(function ($models) { + return head($models)->{$this->foreignKey}; + })->values()->unique()->all(); + } + + /** + * Create a new model instance by type. + * + * @param string $type + * @return \Illuminate\Database\Eloquent\Model + */ + public function createModelByType($type) + { + $class = Model::getActualClassNameForMorph($type); + + return new $class; + } + + /** + * Match the eagerly loaded results to their parents. + * + * @param array $models + * @param \Illuminate\Database\Eloquent\Collection $results + * @param string $relation + * @return array + */ + public function match(array $models, Collection $results, $relation) + { + return $models; + } + + /** + * Match the results for a given type to their parents. + * + * @param string $type + * @param \Illuminate\Database\Eloquent\Collection $results + * @return void + */ + protected function matchToMorphParents($type, Collection $results) + { + foreach ($results as $result) { + if (isset($this->dictionary[$type][$result->getKey()])) { + foreach ($this->dictionary[$type][$result->getKey()] as $model) { + $model->setRelation($this->relation, $result); + } + } + } + } + + /** + * Associate the model instance to the given parent. + * + * @param \Illuminate\Database\Eloquent\Model $model + * @return \Illuminate\Database\Eloquent\Model + */ + public function associate($model) + { + $this->parent->setAttribute($this->foreignKey, $model->getKey()); + + $this->parent->setAttribute($this->morphType, $model->getMorphClass()); + + return $this->parent->setRelation($this->relation, $model); + } + + /** + * Dissociate previously associated model from the given parent. + * + * @return \Illuminate\Database\Eloquent\Model + */ + public function dissociate() + { + $this->parent->setAttribute($this->foreignKey, null); + + $this->parent->setAttribute($this->morphType, null); + + return $this->parent->setRelation($this->relation, null); + } + + /** + * Get the foreign key "type" name. + * + * @return string + */ + public function getMorphType() + { + return $this->morphType; + } + + /** + * Get the dictionary used by the relationship. + * + * @return array + */ + public function getDictionary() + { + return $this->dictionary; + } + + /** + * Replay stored macro calls on the actual related instance. + * + * @param \Illuminate\Database\Eloquent\Builder $query + * @return \Illuminate\Database\Eloquent\Builder + */ + protected function replayMacros(Builder $query) + { + foreach ($this->macroBuffer as $macro) { + $query->{$macro['method']}(...$macro['parameters']); + } + + return $query; + } + + /** + * Handle dynamic method calls to the relationship. + * + * @param string $method + * @param array $parameters + * @return mixed + */ + public function __call($method, $parameters) + { + try { + return parent::__call($method, $parameters); + } + + // If we tried to call a method that does not exist on the parent Builder instance, + // we'll assume that we want to call a query macro (e.g. withTrashed) that only + // exists on related models. We will just store the call and replay it later. + catch (BadMethodCallException $e) { + $this->macroBuffer[] = compact('method', 'parameters'); + + return $this; + } + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphToMany.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphToMany.php new file mode 100644 index 0000000..2ca44d8 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphToMany.php @@ -0,0 +1,162 @@ +inverse = $inverse; + $this->morphType = $name.'_type'; + $this->morphClass = $inverse ? $query->getModel()->getMorphClass() : $parent->getMorphClass(); + + parent::__construct($query, $parent, $table, $foreignKey, $relatedKey, $relationName); + } + + /** + * Set the where clause for the relation query. + * + * @return $this + */ + protected function addWhereConstraints() + { + parent::addWhereConstraints(); + + $this->query->where($this->table.'.'.$this->morphType, $this->morphClass); + + return $this; + } + + /** + * Set the constraints for an eager load of the relation. + * + * @param array $models + * @return void + */ + public function addEagerConstraints(array $models) + { + parent::addEagerConstraints($models); + + $this->query->where($this->table.'.'.$this->morphType, $this->morphClass); + } + + /** + * Create a new pivot attachment record. + * + * @param int $id + * @param bool $timed + * @return array + */ + protected function baseAttachRecord($id, $timed) + { + return Arr::add( + parent::baseAttachRecord($id, $timed), $this->morphType, $this->morphClass + ); + } + + /** + * Add the constraints for a relationship count query. + * + * @param \Illuminate\Database\Eloquent\Builder $query + * @param \Illuminate\Database\Eloquent\Builder $parentQuery + * @param array|mixed $columns + * @return \Illuminate\Database\Eloquent\Builder + */ + public function getRelationExistenceQuery(Builder $query, Builder $parentQuery, $columns = ['*']) + { + return parent::getRelationExistenceQuery($query, $parentQuery, $columns)->where( + $this->table.'.'.$this->morphType, $this->morphClass + ); + } + + /** + * Create a new query builder for the pivot table. + * + * @return \Illuminate\Database\Query\Builder + */ + protected function newPivotQuery() + { + return parent::newPivotQuery()->where($this->morphType, $this->morphClass); + } + + /** + * Create a new pivot model instance. + * + * @param array $attributes + * @param bool $exists + * @return \Illuminate\Database\Eloquent\Relations\Pivot + */ + public function newPivot(array $attributes = [], $exists = false) + { + $using = $this->using; + + $pivot = $using ? $using::fromRawAttributes($this->parent, $attributes, $this->table, $exists) + : new MorphPivot($this->parent, $attributes, $this->table, $exists); + + $pivot->setPivotKeys($this->foreignKey, $this->relatedKey) + ->setMorphType($this->morphType) + ->setMorphClass($this->morphClass); + + return $pivot; + } + + /** + * Get the foreign key "type" name. + * + * @return string + */ + public function getMorphType() + { + return $this->morphType; + } + + /** + * Get the class name of the parent model. + * + * @return string + */ + public function getMorphClass() + { + return $this->morphClass; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Pivot.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Pivot.php new file mode 100755 index 0000000..84683d8 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Pivot.php @@ -0,0 +1,198 @@ +setConnection($parent->getConnectionName()) + ->setTable($table) + ->forceFill($attributes) + ->syncOriginal(); + + // We store off the parent instance so we will access the timestamp column names + // for the model, since the pivot model timestamps aren't easily configurable + // from the developer's point of view. We can use the parents to get these. + $this->parent = $parent; + + $this->exists = $exists; + + $this->timestamps = $this->hasTimestampAttributes(); + } + + /** + * Create a new pivot model from raw values returned from a query. + * + * @param \Illuminate\Database\Eloquent\Model $parent + * @param array $attributes + * @param string $table + * @param bool $exists + * @return static + */ + public static function fromRawAttributes(Model $parent, $attributes, $table, $exists = false) + { + $instance = new static($parent, $attributes, $table, $exists); + + $instance->setRawAttributes($attributes, true); + + return $instance; + } + + /** + * Set the keys for a save update query. + * + * @param \Illuminate\Database\Eloquent\Builder $query + * @return \Illuminate\Database\Eloquent\Builder + */ + protected function setKeysForSaveQuery(Builder $query) + { + $query->where($this->foreignKey, $this->getAttribute($this->foreignKey)); + + return $query->where($this->relatedKey, $this->getAttribute($this->relatedKey)); + } + + /** + * Delete the pivot model record from the database. + * + * @return int + */ + public function delete() + { + return $this->getDeleteQuery()->delete(); + } + + /** + * Get the query builder for a delete operation on the pivot. + * + * @return \Illuminate\Database\Eloquent\Builder + */ + protected function getDeleteQuery() + { + return $this->newQuery()->where([ + $this->foreignKey => $this->getAttribute($this->foreignKey), + $this->relatedKey => $this->getAttribute($this->relatedKey), + ]); + } + + /** + * Get the foreign key column name. + * + * @return string + */ + public function getForeignKey() + { + return $this->foreignKey; + } + + /** + * Get the "related key" column name. + * + * @return string + */ + public function getRelatedKey() + { + return $this->relatedKey; + } + + /** + * Get the "related key" column name. + * + * @return string + */ + public function getOtherKey() + { + return $this->getRelatedKey(); + } + + /** + * Set the key names for the pivot model instance. + * + * @param string $foreignKey + * @param string $relatedKey + * @return $this + */ + public function setPivotKeys($foreignKey, $relatedKey) + { + $this->foreignKey = $foreignKey; + + $this->relatedKey = $relatedKey; + + return $this; + } + + /** + * Determine if the pivot model has timestamp attributes. + * + * @return bool + */ + public function hasTimestampAttributes() + { + return array_key_exists($this->getCreatedAtColumn(), $this->attributes); + } + + /** + * Get the name of the "created at" column. + * + * @return string + */ + public function getCreatedAtColumn() + { + return $this->parent->getCreatedAtColumn(); + } + + /** + * Get the name of the "updated at" column. + * + * @return string + */ + public function getUpdatedAtColumn() + { + return $this->parent->getUpdatedAtColumn(); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Relation.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Relation.php new file mode 100755 index 0000000..acbfbed --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Relation.php @@ -0,0 +1,358 @@ +query = $query; + $this->parent = $parent; + $this->related = $query->getModel(); + + $this->addConstraints(); + } + + /** + * Run a callback with constraints disabled on the relation. + * + * @param \Closure $callback + * @return mixed + */ + public static function noConstraints(Closure $callback) + { + $previous = static::$constraints; + + static::$constraints = false; + + // When resetting the relation where clause, we want to shift the first element + // off of the bindings, leaving only the constraints that the developers put + // as "extra" on the relationships, and not original relation constraints. + try { + return call_user_func($callback); + } finally { + static::$constraints = $previous; + } + } + + /** + * Set the base constraints on the relation query. + * + * @return void + */ + abstract public function addConstraints(); + + /** + * Set the constraints for an eager load of the relation. + * + * @param array $models + * @return void + */ + abstract public function addEagerConstraints(array $models); + + /** + * Initialize the relation on a set of models. + * + * @param array $models + * @param string $relation + * @return array + */ + abstract public function initRelation(array $models, $relation); + + /** + * Match the eagerly loaded results to their parents. + * + * @param array $models + * @param \Illuminate\Database\Eloquent\Collection $results + * @param string $relation + * @return array + */ + abstract public function match(array $models, Collection $results, $relation); + + /** + * Get the results of the relationship. + * + * @return mixed + */ + abstract public function getResults(); + + /** + * Get the relationship for eager loading. + * + * @return \Illuminate\Database\Eloquent\Collection + */ + public function getEager() + { + return $this->get(); + } + + /** + * Touch all of the related models for the relationship. + * + * @return void + */ + public function touch() + { + $column = $this->getRelated()->getUpdatedAtColumn(); + + $this->rawUpdate([$column => $this->getRelated()->freshTimestampString()]); + } + + /** + * Run a raw update against the base query. + * + * @param array $attributes + * @return int + */ + public function rawUpdate(array $attributes = []) + { + return $this->query->update($attributes); + } + + /** + * Add the constraints for a relationship count query. + * + * @param \Illuminate\Database\Eloquent\Builder $query + * @param \Illuminate\Database\Eloquent\Builder $parentQuery + * @return \Illuminate\Database\Eloquent\Builder + */ + public function getRelationExistenceCountQuery(Builder $query, Builder $parentQuery) + { + return $this->getRelationExistenceQuery( + $query, $parentQuery, new Expression('count(*)') + ); + } + + /** + * Add the constraints for an internal relationship existence query. + * + * Essentially, these queries compare on column names like whereColumn. + * + * @param \Illuminate\Database\Eloquent\Builder $query + * @param \Illuminate\Database\Eloquent\Builder $parentQuery + * @param array|mixed $columns + * @return \Illuminate\Database\Eloquent\Builder + */ + public function getRelationExistenceQuery(Builder $query, Builder $parentQuery, $columns = ['*']) + { + return $query->select($columns)->whereColumn( + $this->getQualifiedParentKeyName(), '=', $this->getExistenceCompareKey() + ); + } + + /** + * Get all of the primary keys for an array of models. + * + * @param array $models + * @param string $key + * @return array + */ + protected function getKeys(array $models, $key = null) + { + return collect($models)->map(function ($value) use ($key) { + return $key ? $value->getAttribute($key) : $value->getKey(); + })->values()->unique()->sort()->all(); + } + + /** + * Get the underlying query for the relation. + * + * @return \Illuminate\Database\Eloquent\Builder + */ + public function getQuery() + { + return $this->query; + } + + /** + * Get the base query builder driving the Eloquent builder. + * + * @return \Illuminate\Database\Query\Builder + */ + public function getBaseQuery() + { + return $this->query->getQuery(); + } + + /** + * Get the parent model of the relation. + * + * @return \Illuminate\Database\Eloquent\Model + */ + public function getParent() + { + return $this->parent; + } + + /** + * Get the fully qualified parent key name. + * + * @return string + */ + public function getQualifiedParentKeyName() + { + return $this->parent->getQualifiedKeyName(); + } + + /** + * Get the related model of the relation. + * + * @return \Illuminate\Database\Eloquent\Model + */ + public function getRelated() + { + return $this->related; + } + + /** + * Get the name of the "created at" column. + * + * @return string + */ + public function createdAt() + { + return $this->parent->getCreatedAtColumn(); + } + + /** + * Get the name of the "updated at" column. + * + * @return string + */ + public function updatedAt() + { + return $this->parent->getUpdatedAtColumn(); + } + + /** + * Get the name of the related model's "updated at" column. + * + * @return string + */ + public function relatedUpdatedAt() + { + return $this->related->getUpdatedAtColumn(); + } + + /** + * Set or get the morph map for polymorphic relations. + * + * @param array|null $map + * @param bool $merge + * @return array + */ + public static function morphMap(array $map = null, $merge = true) + { + $map = static::buildMorphMapFromModels($map); + + if (is_array($map)) { + static::$morphMap = $merge && static::$morphMap + ? array_merge(static::$morphMap, $map) : $map; + } + + return static::$morphMap; + } + + /** + * Builds a table-keyed array from model class names. + * + * @param string[]|null $models + * @return array|null + */ + protected static function buildMorphMapFromModels(array $models = null) + { + if (is_null($models) || Arr::isAssoc($models)) { + return $models; + } + + return array_combine(array_map(function ($model) { + return (new $model)->getTable(); + }, $models), $models); + } + + /** + * Handle dynamic method calls to the relationship. + * + * @param string $method + * @param array $parameters + * @return mixed + */ + public function __call($method, $parameters) + { + if (static::hasMacro($method)) { + return $this->macroCall($method, $parameters); + } + + $result = call_user_func_array([$this->query, $method], $parameters); + + if ($result === $this->query) { + return $this; + } + + return $result; + } + + /** + * Force a clone of the underlying query builder when cloning. + * + * @return void + */ + public function __clone() + { + $this->query = clone $this->query; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Scope.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Scope.php new file mode 100644 index 0000000..63cba6a --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Scope.php @@ -0,0 +1,15 @@ +forceDeleting = true; + + $deleted = $this->delete(); + + $this->forceDeleting = false; + + return $deleted; + } + + /** + * Perform the actual delete query on this model instance. + * + * @return mixed + */ + protected function performDeleteOnModel() + { + if ($this->forceDeleting) { + return $this->newQueryWithoutScopes()->where($this->getKeyName(), $this->getKey())->forceDelete(); + } + + return $this->runSoftDelete(); + } + + /** + * Perform the actual delete query on this model instance. + * + * @return void + */ + protected function runSoftDelete() + { + $query = $this->newQueryWithoutScopes()->where($this->getKeyName(), $this->getKey()); + + $this->{$this->getDeletedAtColumn()} = $time = $this->freshTimestamp(); + + $query->update([$this->getDeletedAtColumn() => $this->fromDateTime($time)]); + } + + /** + * Restore a soft-deleted model instance. + * + * @return bool|null + */ + public function restore() + { + // If the restoring event does not return false, we will proceed with this + // restore operation. Otherwise, we bail out so the developer will stop + // the restore totally. We will clear the deleted timestamp and save. + if ($this->fireModelEvent('restoring') === false) { + return false; + } + + $this->{$this->getDeletedAtColumn()} = null; + + // Once we have saved the model, we will fire the "restored" event so this + // developer will do anything they need to after a restore operation is + // totally finished. Then we will return the result of the save call. + $this->exists = true; + + $result = $this->save(); + + $this->fireModelEvent('restored', false); + + return $result; + } + + /** + * Determine if the model instance has been soft-deleted. + * + * @return bool + */ + public function trashed() + { + return ! is_null($this->{$this->getDeletedAtColumn()}); + } + + /** + * Register a restoring model event with the dispatcher. + * + * @param \Closure|string $callback + * @return void + */ + public static function restoring($callback) + { + static::registerModelEvent('restoring', $callback); + } + + /** + * Register a restored model event with the dispatcher. + * + * @param \Closure|string $callback + * @return void + */ + public static function restored($callback) + { + static::registerModelEvent('restored', $callback); + } + + /** + * Determine if the model is currently force deleting. + * + * @return bool + */ + public function isForceDeleting() + { + return $this->forceDeleting; + } + + /** + * Get the name of the "deleted at" column. + * + * @return string + */ + public function getDeletedAtColumn() + { + return defined('static::DELETED_AT') ? static::DELETED_AT : 'deleted_at'; + } + + /** + * Get the fully qualified "deleted at" column. + * + * @return string + */ + public function getQualifiedDeletedAtColumn() + { + return $this->getTable().'.'.$this->getDeletedAtColumn(); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/SoftDeletingScope.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/SoftDeletingScope.php new file mode 100644 index 0000000..cf5ded1 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/SoftDeletingScope.php @@ -0,0 +1,127 @@ +whereNull($model->getQualifiedDeletedAtColumn()); + } + + /** + * Extend the query builder with the needed functions. + * + * @param \Illuminate\Database\Eloquent\Builder $builder + * @return void + */ + public function extend(Builder $builder) + { + foreach ($this->extensions as $extension) { + $this->{"add{$extension}"}($builder); + } + + $builder->onDelete(function (Builder $builder) { + $column = $this->getDeletedAtColumn($builder); + + return $builder->update([ + $column => $builder->getModel()->freshTimestampString(), + ]); + }); + } + + /** + * Get the "deleted at" column for the builder. + * + * @param \Illuminate\Database\Eloquent\Builder $builder + * @return string + */ + protected function getDeletedAtColumn(Builder $builder) + { + if (count($builder->getQuery()->joins) > 0) { + return $builder->getModel()->getQualifiedDeletedAtColumn(); + } + + return $builder->getModel()->getDeletedAtColumn(); + } + + /** + * Add the restore extension to the builder. + * + * @param \Illuminate\Database\Eloquent\Builder $builder + * @return void + */ + protected function addRestore(Builder $builder) + { + $builder->macro('restore', function (Builder $builder) { + $builder->withTrashed(); + + return $builder->update([$builder->getModel()->getDeletedAtColumn() => null]); + }); + } + + /** + * Add the with-trashed extension to the builder. + * + * @param \Illuminate\Database\Eloquent\Builder $builder + * @return void + */ + protected function addWithTrashed(Builder $builder) + { + $builder->macro('withTrashed', function (Builder $builder) { + return $builder->withoutGlobalScope($this); + }); + } + + /** + * Add the without-trashed extension to the builder. + * + * @param \Illuminate\Database\Eloquent\Builder $builder + * @return void + */ + protected function addWithoutTrashed(Builder $builder) + { + $builder->macro('withoutTrashed', function (Builder $builder) { + $model = $builder->getModel(); + + $builder->withoutGlobalScope($this)->whereNull( + $model->getQualifiedDeletedAtColumn() + ); + + return $builder; + }); + } + + /** + * Add the only-trashed extension to the builder. + * + * @param \Illuminate\Database\Eloquent\Builder $builder + * @return void + */ + protected function addOnlyTrashed(Builder $builder) + { + $builder->macro('onlyTrashed', function (Builder $builder) { + $model = $builder->getModel(); + + $builder->withoutGlobalScope($this)->whereNotNull( + $model->getQualifiedDeletedAtColumn() + ); + + return $builder; + }); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Events/ConnectionEvent.php b/vendor/laravel/framework/src/Illuminate/Database/Events/ConnectionEvent.php new file mode 100644 index 0000000..818c785 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Events/ConnectionEvent.php @@ -0,0 +1,32 @@ +connection = $connection; + $this->connectionName = $connection->getName(); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Events/QueryExecuted.php b/vendor/laravel/framework/src/Illuminate/Database/Events/QueryExecuted.php new file mode 100644 index 0000000..d53473f --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Events/QueryExecuted.php @@ -0,0 +1,58 @@ +sql = $sql; + $this->time = $time; + $this->bindings = $bindings; + $this->connection = $connection; + $this->connectionName = $connection->getName(); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Events/StatementPrepared.php b/vendor/laravel/framework/src/Illuminate/Database/Events/StatementPrepared.php new file mode 100644 index 0000000..2f60323 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Events/StatementPrepared.php @@ -0,0 +1,33 @@ +statement = $statement; + $this->connection = $connection; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Events/TransactionBeginning.php b/vendor/laravel/framework/src/Illuminate/Database/Events/TransactionBeginning.php new file mode 100644 index 0000000..3287b5c --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Events/TransactionBeginning.php @@ -0,0 +1,8 @@ +isExpression($table)) { + return $this->wrap($this->tablePrefix.$table, true); + } + + return $this->getValue($table); + } + + /** + * Wrap a value in keyword identifiers. + * + * @param \Illuminate\Database\Query\Expression|string $value + * @param bool $prefixAlias + * @return string + */ + public function wrap($value, $prefixAlias = false) + { + if ($this->isExpression($value)) { + return $this->getValue($value); + } + + // If the value being wrapped has a column alias we will need to separate out + // the pieces so we can wrap each of the segments of the expression on it + // own, and then joins them both back together with the "as" connector. + if (strpos(strtolower($value), ' as ') !== false) { + return $this->wrapAliasedValue($value, $prefixAlias); + } + + return $this->wrapSegments(explode('.', $value)); + } + + /** + * Wrap a value that has an alias. + * + * @param string $value + * @param bool $prefixAlias + * @return string + */ + protected function wrapAliasedValue($value, $prefixAlias = false) + { + $segments = preg_split('/\s+as\s+/i', $value); + + // If we are wrapping a table we need to prefix the alias with the table prefix + // as well in order to generate proper syntax. If this is a column of course + // no prefix is necessary. The condition will be true when from wrapTable. + if ($prefixAlias) { + $segments[1] = $this->tablePrefix.$segments[1]; + } + + return $this->wrap( + $segments[0]).' as '.$this->wrapValue($segments[1] + ); + } + + /** + * Wrap the given value segments. + * + * @param array $segments + * @return string + */ + protected function wrapSegments($segments) + { + return collect($segments)->map(function ($segment, $key) use ($segments) { + return $key == 0 && count($segments) > 1 + ? $this->wrapTable($segment) + : $this->wrapValue($segment); + })->implode('.'); + } + + /** + * Wrap a single string in keyword identifiers. + * + * @param string $value + * @return string + */ + protected function wrapValue($value) + { + if ($value !== '*') { + return '"'.str_replace('"', '""', $value).'"'; + } + + return $value; + } + + /** + * Convert an array of column names into a delimited string. + * + * @param array $columns + * @return string + */ + public function columnize(array $columns) + { + return implode(', ', array_map([$this, 'wrap'], $columns)); + } + + /** + * Create query parameter place-holders for an array. + * + * @param array $values + * @return string + */ + public function parameterize(array $values) + { + return implode(', ', array_map([$this, 'parameter'], $values)); + } + + /** + * Get the appropriate query parameter place-holder for a value. + * + * @param mixed $value + * @return string + */ + public function parameter($value) + { + return $this->isExpression($value) ? $this->getValue($value) : '?'; + } + + /** + * Determine if the given value is a raw expression. + * + * @param mixed $value + * @return bool + */ + public function isExpression($value) + { + return $value instanceof Expression; + } + + /** + * Get the value of a raw expression. + * + * @param \Illuminate\Database\Query\Expression $expression + * @return string + */ + public function getValue($expression) + { + return $expression->getValue(); + } + + /** + * Get the format for database stored dates. + * + * @return string + */ + public function getDateFormat() + { + return 'Y-m-d H:i:s'; + } + + /** + * Get the grammar's table prefix. + * + * @return string + */ + public function getTablePrefix() + { + return $this->tablePrefix; + } + + /** + * Set the grammar's table prefix. + * + * @param string $prefix + * @return $this + */ + public function setTablePrefix($prefix) + { + $this->tablePrefix = $prefix; + + return $this; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/MigrationServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Database/MigrationServiceProvider.php new file mode 100755 index 0000000..a8b92ab --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/MigrationServiceProvider.php @@ -0,0 +1,87 @@ +registerRepository(); + + $this->registerMigrator(); + + $this->registerCreator(); + } + + /** + * Register the migration repository service. + * + * @return void + */ + protected function registerRepository() + { + $this->app->singleton('migration.repository', function ($app) { + $table = $app['config']['database.migrations']; + + return new DatabaseMigrationRepository($app['db'], $table); + }); + } + + /** + * Register the migrator service. + * + * @return void + */ + protected function registerMigrator() + { + // The migrator is responsible for actually running and rollback the migration + // files in the application. We'll pass in our database connection resolver + // so the migrator can resolve any of these connections when it needs to. + $this->app->singleton('migrator', function ($app) { + $repository = $app['migration.repository']; + + return new Migrator($repository, $app['db'], $app['files']); + }); + } + + /** + * Register the migration creator. + * + * @return void + */ + protected function registerCreator() + { + $this->app->singleton('migration.creator', function ($app) { + return new MigrationCreator($app['files']); + }); + } + + /** + * Get the services provided by the provider. + * + * @return array + */ + public function provides() + { + return [ + 'migrator', 'migration.repository', 'migration.creator', + ]; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Migrations/DatabaseMigrationRepository.php b/vendor/laravel/framework/src/Illuminate/Database/Migrations/DatabaseMigrationRepository.php new file mode 100755 index 0000000..b0e4a28 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Migrations/DatabaseMigrationRepository.php @@ -0,0 +1,197 @@ +table = $table; + $this->resolver = $resolver; + } + + /** + * Get the ran migrations. + * + * @return array + */ + public function getRan() + { + return $this->table() + ->orderBy('batch', 'asc') + ->orderBy('migration', 'asc') + ->pluck('migration')->all(); + } + + /** + * Get list of migrations. + * + * @param int $steps + * @return array + */ + public function getMigrations($steps) + { + $query = $this->table()->where('batch', '>=', '1'); + + return $query->orderBy('migration', 'desc')->take($steps)->get()->all(); + } + + /** + * Get the last migration batch. + * + * @return array + */ + public function getLast() + { + $query = $this->table()->where('batch', $this->getLastBatchNumber()); + + return $query->orderBy('migration', 'desc')->get()->all(); + } + + /** + * Log that a migration was run. + * + * @param string $file + * @param int $batch + * @return void + */ + public function log($file, $batch) + { + $record = ['migration' => $file, 'batch' => $batch]; + + $this->table()->insert($record); + } + + /** + * Remove a migration from the log. + * + * @param object $migration + * @return void + */ + public function delete($migration) + { + $this->table()->where('migration', $migration->migration)->delete(); + } + + /** + * Get the next migration batch number. + * + * @return int + */ + public function getNextBatchNumber() + { + return $this->getLastBatchNumber() + 1; + } + + /** + * Get the last migration batch number. + * + * @return int + */ + public function getLastBatchNumber() + { + return $this->table()->max('batch'); + } + + /** + * Create the migration repository data store. + * + * @return void + */ + public function createRepository() + { + $schema = $this->getConnection()->getSchemaBuilder(); + + $schema->create($this->table, function ($table) { + // The migrations table is responsible for keeping track of which of the + // migrations have actually run for the application. We'll create the + // table to hold the migration file's path as well as the batch ID. + $table->increments('id'); + $table->string('migration'); + $table->integer('batch'); + }); + } + + /** + * Determine if the migration repository exists. + * + * @return bool + */ + public function repositoryExists() + { + $schema = $this->getConnection()->getSchemaBuilder(); + + return $schema->hasTable($this->table); + } + + /** + * Get a query builder for the migration table. + * + * @return \Illuminate\Database\Query\Builder + */ + protected function table() + { + return $this->getConnection()->table($this->table); + } + + /** + * Get the connection resolver instance. + * + * @return \Illuminate\Database\ConnectionResolverInterface + */ + public function getConnectionResolver() + { + return $this->resolver; + } + + /** + * Resolve the database connection instance. + * + * @return \Illuminate\Database\Connection + */ + public function getConnection() + { + return $this->resolver->connection($this->connection); + } + + /** + * Set the information source to gather data. + * + * @param string $name + * @return void + */ + public function setSource($name) + { + $this->connection = $name; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migration.php b/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migration.php new file mode 100755 index 0000000..699154c --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migration.php @@ -0,0 +1,23 @@ +connection; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Migrations/MigrationCreator.php b/vendor/laravel/framework/src/Illuminate/Database/Migrations/MigrationCreator.php new file mode 100755 index 0000000..29bae7a --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Migrations/MigrationCreator.php @@ -0,0 +1,204 @@ +files = $files; + } + + /** + * Create a new migration at the given path. + * + * @param string $name + * @param string $path + * @param string $table + * @param bool $create + * @return string + * @throws \Exception + */ + public function create($name, $path, $table = null, $create = false) + { + $this->ensureMigrationDoesntAlreadyExist($name); + + // First we will get the stub file for the migration, which serves as a type + // of template for the migration. Once we have those we will populate the + // various place-holders, save the file, and run the post create event. + $stub = $this->getStub($table, $create); + + $this->files->put( + $path = $this->getPath($name, $path), + $this->populateStub($name, $stub, $table) + ); + + // Next, we will fire any hooks that are supposed to fire after a migration is + // created. Once that is done we'll be ready to return the full path to the + // migration file so it can be used however it's needed by the developer. + $this->firePostCreateHooks(); + + return $path; + } + + /** + * Ensure that a migration with the given name doesn't already exist. + * + * @param string $name + * @return void + * + * @throws \InvalidArgumentException + */ + protected function ensureMigrationDoesntAlreadyExist($name) + { + if (class_exists($className = $this->getClassName($name))) { + throw new InvalidArgumentException("A {$className} migration already exists."); + } + } + + /** + * Get the migration stub file. + * + * @param string $table + * @param bool $create + * @return string + */ + protected function getStub($table, $create) + { + if (is_null($table)) { + return $this->files->get($this->stubPath().'/blank.stub'); + } + + // We also have stubs for creating new tables and modifying existing tables + // to save the developer some typing when they are creating a new tables + // or modifying existing tables. We'll grab the appropriate stub here. + else { + $stub = $create ? 'create.stub' : 'update.stub'; + + return $this->files->get($this->stubPath()."/{$stub}"); + } + } + + /** + * Populate the place-holders in the migration stub. + * + * @param string $name + * @param string $stub + * @param string $table + * @return string + */ + protected function populateStub($name, $stub, $table) + { + $stub = str_replace('DummyClass', $this->getClassName($name), $stub); + + // Here we will replace the table place-holders with the table specified by + // the developer, which is useful for quickly creating a tables creation + // or update migration from the console instead of typing it manually. + if (! is_null($table)) { + $stub = str_replace('DummyTable', $table, $stub); + } + + return $stub; + } + + /** + * Get the class name of a migration name. + * + * @param string $name + * @return string + */ + protected function getClassName($name) + { + return Str::studly($name); + } + + /** + * Get the full path to the migration. + * + * @param string $name + * @param string $path + * @return string + */ + protected function getPath($name, $path) + { + return $path.'/'.$this->getDatePrefix().'_'.$name.'.php'; + } + + /** + * Fire the registered post create hooks. + * + * @return void + */ + protected function firePostCreateHooks() + { + foreach ($this->postCreate as $callback) { + call_user_func($callback); + } + } + + /** + * Register a post migration create hook. + * + * @param \Closure $callback + * @return void + */ + public function afterCreate(Closure $callback) + { + $this->postCreate[] = $callback; + } + + /** + * Get the date prefix for the migration. + * + * @return string + */ + protected function getDatePrefix() + { + return date('Y_m_d_His'); + } + + /** + * Get the path to the stubs. + * + * @return string + */ + public function stubPath() + { + return __DIR__.'/stubs'; + } + + /** + * Get the filesystem instance. + * + * @return \Illuminate\Filesystem\Filesystem + */ + public function getFilesystem() + { + return $this->files; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Migrations/MigrationRepositoryInterface.php b/vendor/laravel/framework/src/Illuminate/Database/Migrations/MigrationRepositoryInterface.php new file mode 100755 index 0000000..60bc921 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Migrations/MigrationRepositoryInterface.php @@ -0,0 +1,74 @@ +files = $files; + $this->resolver = $resolver; + $this->repository = $repository; + } + + /** + * Run the pending migrations at a given path. + * + * @param array|string $paths + * @param array $options + * @return array + */ + public function run($paths = [], array $options = []) + { + $this->notes = []; + + // Once we grab all of the migration files for the path, we will compare them + // against the migrations that have already been run for this package then + // run each of the outstanding migrations against a database connection. + $files = $this->getMigrationFiles($paths); + + $this->requireFiles($migrations = $this->pendingMigrations( + $files, $this->repository->getRan() + )); + + // Once we have all these migrations that are outstanding we are ready to run + // we will go ahead and run them "up". This will execute each migration as + // an operation against a database. Then we'll return this list of them. + $this->runPending($migrations, $options); + + return $migrations; + } + + /** + * Get the migration files that have not yet run. + * + * @param array $files + * @param array $ran + * @return array + */ + protected function pendingMigrations($files, $ran) + { + return Collection::make($files) + ->reject(function ($file) use ($ran) { + return in_array($this->getMigrationName($file), $ran); + })->values()->all(); + } + + /** + * Run an array of migrations. + * + * @param array $migrations + * @param array $options + * @return void + */ + public function runPending(array $migrations, array $options = []) + { + // First we will just make sure that there are any migrations to run. If there + // aren't, we will just make a note of it to the developer so they're aware + // that all of the migrations have been run against this database system. + if (count($migrations) == 0) { + $this->note('Nothing to migrate.'); + + return; + } + + // Next, we will get the next batch number for the migrations so we can insert + // correct batch number in the database migrations repository when we store + // each migration's execution. We will also extract a few of the options. + $batch = $this->repository->getNextBatchNumber(); + + $pretend = Arr::get($options, 'pretend', false); + + $step = Arr::get($options, 'step', false); + + // Once we have the array of migrations, we will spin through them and run the + // migrations "up" so the changes are made to the databases. We'll then log + // that the migration was run so we don't repeat it next time we execute. + foreach ($migrations as $file) { + $this->runUp($file, $batch, $pretend); + + if ($step) { + $batch++; + } + } + } + + /** + * Run "up" a migration instance. + * + * @param string $file + * @param int $batch + * @param bool $pretend + * @return void + */ + protected function runUp($file, $batch, $pretend) + { + // First we will resolve a "real" instance of the migration class from this + // migration file name. Once we have the instances we can run the actual + // command such as "up" or "down", or we can just simulate the action. + $migration = $this->resolve( + $name = $this->getMigrationName($file) + ); + + if ($pretend) { + return $this->pretendToRun($migration, 'up'); + } + + $this->note("Migrating: {$name}"); + + $this->runMigration($migration, 'up'); + + // Once we have run a migrations class, we will log that it was run in this + // repository so that we don't try to run it next time we do a migration + // in the application. A migration repository keeps the migrate order. + $this->repository->log($name, $batch); + + $this->note("Migrated: {$name}"); + } + + /** + * Rollback the last migration operation. + * + * @param array|string $paths + * @param array $options + * @return array + */ + public function rollback($paths = [], array $options = []) + { + $this->notes = []; + + // We want to pull in the last batch of migrations that ran on the previous + // migration operation. We'll then reverse those migrations and run each + // of them "down" to reverse the last migration "operation" which ran. + $migrations = $this->getMigrationsForRollback($options); + + if (count($migrations) === 0) { + $this->note('Nothing to rollback.'); + + return []; + } else { + return $this->rollbackMigrations($migrations, $paths, $options); + } + } + + /** + * Get the migrations for a rollback operation. + * + * @param array $options + * @return array + */ + protected function getMigrationsForRollback(array $options) + { + if (($steps = Arr::get($options, 'step', 0)) > 0) { + return $this->repository->getMigrations($steps); + } else { + return $this->repository->getLast(); + } + } + + /** + * Rollback the given migrations. + * + * @param array $migrations + * @param array|string $paths + * @param array $options + * @return array + */ + protected function rollbackMigrations(array $migrations, $paths, array $options) + { + $rolledBack = []; + + $this->requireFiles($files = $this->getMigrationFiles($paths)); + + // Next we will run through all of the migrations and call the "down" method + // which will reverse each migration in order. This getLast method on the + // repository already returns these migration's names in reverse order. + foreach ($migrations as $migration) { + $migration = (object) $migration; + + $rolledBack[] = $files[$migration->migration]; + + $this->runDown( + $files[$migration->migration], + $migration, Arr::get($options, 'pretend', false) + ); + } + + return $rolledBack; + } + + /** + * Rolls all of the currently applied migrations back. + * + * @param array|string $paths + * @param bool $pretend + * @return array + */ + public function reset($paths = [], $pretend = false) + { + $this->notes = []; + + // Next, we will reverse the migration list so we can run them back in the + // correct order for resetting this database. This will allow us to get + // the database back into its "empty" state ready for the migrations. + $migrations = array_reverse($this->repository->getRan()); + + if (count($migrations) === 0) { + $this->note('Nothing to rollback.'); + + return []; + } else { + return $this->resetMigrations($migrations, $paths, $pretend); + } + } + + /** + * Reset the given migrations. + * + * @param array $migrations + * @param array $paths + * @param bool $pretend + * @return array + */ + protected function resetMigrations(array $migrations, array $paths, $pretend = false) + { + // Since the getRan method that retrieves the migration name just gives us the + // migration name, we will format the names into objects with the name as a + // property on the objects so that we can pass it to the rollback method. + $migrations = collect($migrations)->map(function ($m) { + return (object) ['migration' => $m]; + })->all(); + + return $this->rollbackMigrations( + $migrations, $paths, compact('pretend') + ); + } + + /** + * Run "down" a migration instance. + * + * @param string $file + * @param object $migration + * @param bool $pretend + * @return void + */ + protected function runDown($file, $migration, $pretend) + { + // First we will get the file name of the migration so we can resolve out an + // instance of the migration. Once we get an instance we can either run a + // pretend execution of the migration or we can run the real migration. + $instance = $this->resolve( + $name = $this->getMigrationName($file) + ); + + $this->note("Rolling back: {$name}"); + + if ($pretend) { + return $this->pretendToRun($instance, 'down'); + } + + $this->runMigration($instance, 'down'); + + // Once we have successfully run the migration "down" we will remove it from + // the migration repository so it will be considered to have not been run + // by the application then will be able to fire by any later operation. + $this->repository->delete($migration); + + $this->note("Rolled back: {$name}"); + } + + /** + * Run a migration inside a transaction if the database supports it. + * + * @param object $migration + * @param string $method + * @return void + */ + protected function runMigration($migration, $method) + { + $connection = $this->resolveConnection( + $migration->getConnection() + ); + + $callback = function () use ($migration, $method) { + if (method_exists($migration, $method)) { + $migration->{$method}(); + } + }; + + $this->getSchemaGrammar($connection)->supportsSchemaTransactions() + ? $connection->transaction($callback) + : $callback(); + } + + /** + * Pretend to run the migrations. + * + * @param object $migration + * @param string $method + * @return void + */ + protected function pretendToRun($migration, $method) + { + foreach ($this->getQueries($migration, $method) as $query) { + $name = get_class($migration); + + $this->note("{$name}: {$query['query']}"); + } + } + + /** + * Get all of the queries that would be run for a migration. + * + * @param object $migration + * @param string $method + * @return array + */ + protected function getQueries($migration, $method) + { + // Now that we have the connections we can resolve it and pretend to run the + // queries against the database returning the array of raw SQL statements + // that would get fired against the database system for this migration. + $db = $this->resolveConnection( + $connection = $migration->getConnection() + ); + + return $db->pretend(function () use ($migration, $method) { + if (method_exists($migration, $method)) { + $migration->{$method}(); + } + }); + } + + /** + * Resolve a migration instance from a file. + * + * @param string $file + * @return object + */ + public function resolve($file) + { + $class = Str::studly(implode('_', array_slice(explode('_', $file), 4))); + + return new $class; + } + + /** + * Get all of the migration files in a given path. + * + * @param string|array $paths + * @return array + */ + public function getMigrationFiles($paths) + { + return Collection::make($paths)->flatMap(function ($path) { + return $this->files->glob($path.'/*_*.php'); + })->filter()->sortBy(function ($file) { + return $this->getMigrationName($file); + })->values()->keyBy(function ($file) { + return $this->getMigrationName($file); + })->all(); + } + + /** + * Require in all the migration files in a given path. + * + * @param array $files + * @return void + */ + public function requireFiles(array $files) + { + foreach ($files as $file) { + $this->files->requireOnce($file); + } + } + + /** + * Get the name of the migration. + * + * @param string $path + * @return string + */ + public function getMigrationName($path) + { + return str_replace('.php', '', basename($path)); + } + + /** + * Register a custom migration path. + * + * @param string $path + * @return void + */ + public function path($path) + { + $this->paths = array_unique(array_merge($this->paths, [$path])); + } + + /** + * Get all of the custom migration paths. + * + * @return array + */ + public function paths() + { + return $this->paths; + } + + /** + * Set the default connection name. + * + * @param string $name + * @return void + */ + public function setConnection($name) + { + if (! is_null($name)) { + $this->resolver->setDefaultConnection($name); + } + + $this->repository->setSource($name); + + $this->connection = $name; + } + + /** + * Resolve the database connection instance. + * + * @param string $connection + * @return \Illuminate\Database\Connection + */ + public function resolveConnection($connection) + { + return $this->resolver->connection($connection ?: $this->connection); + } + + /** + * Get the schema grammar out of a migration connection. + * + * @param \Illuminate\Database\Connection $connection + * @return \Illuminate\Database\Schema\Grammars\Grammar + */ + protected function getSchemaGrammar($connection) + { + if (is_null($grammar = $connection->getSchemaGrammar())) { + $connection->useDefaultSchemaGrammar(); + + $grammar = $connection->getSchemaGrammar(); + } + + return $grammar; + } + + /** + * Get the migration repository instance. + * + * @return \Illuminate\Database\Migrations\MigrationRepositoryInterface + */ + public function getRepository() + { + return $this->repository; + } + + /** + * Determine if the migration repository exists. + * + * @return bool + */ + public function repositoryExists() + { + return $this->repository->repositoryExists(); + } + + /** + * Get the file system instance. + * + * @return \Illuminate\Filesystem\Filesystem + */ + public function getFilesystem() + { + return $this->files; + } + + /** + * Raise a note event for the migrator. + * + * @param string $message + * @return void + */ + protected function note($message) + { + $this->notes[] = $message; + } + + /** + * Get the notes for the last operation. + * + * @return array + */ + public function getNotes() + { + return $this->notes; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Migrations/stubs/blank.stub b/vendor/laravel/framework/src/Illuminate/Database/Migrations/stubs/blank.stub new file mode 100755 index 0000000..da4ce82 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Migrations/stubs/blank.stub @@ -0,0 +1,28 @@ +increments('id'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('DummyTable'); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Migrations/stubs/update.stub b/vendor/laravel/framework/src/Illuminate/Database/Migrations/stubs/update.stub new file mode 100755 index 0000000..1fd4f6e --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Migrations/stubs/update.stub @@ -0,0 +1,32 @@ +withTablePrefix(new QueryGrammar); + } + + /** + * Get a schema builder instance for the connection. + * + * @return \Illuminate\Database\Schema\MySqlBuilder + */ + public function getSchemaBuilder() + { + if (is_null($this->schemaGrammar)) { + $this->useDefaultSchemaGrammar(); + } + + return new MySqlBuilder($this); + } + + /** + * Get the default schema grammar instance. + * + * @return \Illuminate\Database\Schema\Grammars\MySqlGrammar + */ + protected function getDefaultSchemaGrammar() + { + return $this->withTablePrefix(new SchemaGrammar); + } + + /** + * Get the default post processor instance. + * + * @return \Illuminate\Database\Query\Processors\MySqlProcessor + */ + protected function getDefaultPostProcessor() + { + return new MySqlProcessor; + } + + /** + * Get the Doctrine DBAL driver. + * + * @return \Doctrine\DBAL\Driver\PDOMySql\Driver + */ + protected function getDoctrineDriver() + { + return new DoctrineDriver; + } + + /** + * Bind values to their parameters in the given statement. + * + * @param \PDOStatement $statement + * @param array $bindings + * @return void + */ + public function bindValues($statement, $bindings) + { + foreach ($bindings as $key => $value) { + $statement->bindValue( + is_string($key) ? $key : $key + 1, $value, + is_int($value) || is_float($value) ? PDO::PARAM_INT : PDO::PARAM_STR + ); + } + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/PostgresConnection.php b/vendor/laravel/framework/src/Illuminate/Database/PostgresConnection.php new file mode 100755 index 0000000..01804a7 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/PostgresConnection.php @@ -0,0 +1,66 @@ +withTablePrefix(new QueryGrammar); + } + + /** + * Get a schema builder instance for the connection. + * + * @return \Illuminate\Database\Schema\PostgresBuilder + */ + public function getSchemaBuilder() + { + if (is_null($this->schemaGrammar)) { + $this->useDefaultSchemaGrammar(); + } + + return new PostgresBuilder($this); + } + + /** + * Get the default schema grammar instance. + * + * @return \Illuminate\Database\Schema\Grammars\PostgresGrammar + */ + protected function getDefaultSchemaGrammar() + { + return $this->withTablePrefix(new SchemaGrammar); + } + + /** + * Get the default post processor instance. + * + * @return \Illuminate\Database\Query\Processors\PostgresProcessor + */ + protected function getDefaultPostProcessor() + { + return new PostgresProcessor; + } + + /** + * Get the Doctrine DBAL driver. + * + * @return \Doctrine\DBAL\Driver\PDOPgSql\Driver + */ + protected function getDoctrineDriver() + { + return new DoctrineDriver; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php b/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php new file mode 100755 index 0000000..c1a55c0 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php @@ -0,0 +1,2445 @@ + [], + 'join' => [], + 'where' => [], + 'having' => [], + 'order' => [], + 'union' => [], + ]; + + /** + * An aggregate function and column to be run. + * + * @var array + */ + public $aggregate; + + /** + * The columns that should be returned. + * + * @var array + */ + public $columns; + + /** + * Indicates if the query returns distinct results. + * + * @var bool + */ + public $distinct = false; + + /** + * The table which the query is targeting. + * + * @var string + */ + public $from; + + /** + * The table joins for the query. + * + * @var array + */ + public $joins; + + /** + * The where constraints for the query. + * + * @var array + */ + public $wheres; + + /** + * The groupings for the query. + * + * @var array + */ + public $groups; + + /** + * The having constraints for the query. + * + * @var array + */ + public $havings; + + /** + * The orderings for the query. + * + * @var array + */ + public $orders; + + /** + * The maximum number of records to return. + * + * @var int + */ + public $limit; + + /** + * The number of records to skip. + * + * @var int + */ + public $offset; + + /** + * The query union statements. + * + * @var array + */ + public $unions; + + /** + * The maximum number of union records to return. + * + * @var int + */ + public $unionLimit; + + /** + * The number of union records to skip. + * + * @var int + */ + public $unionOffset; + + /** + * The orderings for the union query. + * + * @var array + */ + public $unionOrders; + + /** + * Indicates whether row locking is being used. + * + * @var string|bool + */ + public $lock; + + /** + * All of the available clause operators. + * + * @var array + */ + public $operators = [ + '=', '<', '>', '<=', '>=', '<>', '!=', + 'like', 'like binary', 'not like', 'between', 'ilike', + '&', '|', '^', '<<', '>>', + 'rlike', 'regexp', 'not regexp', + '~', '~*', '!~', '!~*', 'similar to', + 'not similar to', 'not ilike', '~~*', '!~~*', + ]; + + /** + * Whether use write pdo for select. + * + * @var bool + */ + public $useWritePdo = false; + + /** + * Create a new query builder instance. + * + * @param \Illuminate\Database\ConnectionInterface $connection + * @param \Illuminate\Database\Query\Grammars\Grammar $grammar + * @param \Illuminate\Database\Query\Processors\Processor $processor + * @return void + */ + public function __construct(ConnectionInterface $connection, + Grammar $grammar = null, + Processor $processor = null) + { + $this->connection = $connection; + $this->grammar = $grammar ?: $connection->getQueryGrammar(); + $this->processor = $processor ?: $connection->getPostProcessor(); + } + + /** + * Set the columns to be selected. + * + * @param array|mixed $columns + * @return $this + */ + public function select($columns = ['*']) + { + $this->columns = is_array($columns) ? $columns : func_get_args(); + + return $this; + } + + /** + * Add a new "raw" select expression to the query. + * + * @param string $expression + * @param array $bindings + * @return \Illuminate\Database\Query\Builder|static + */ + public function selectRaw($expression, array $bindings = []) + { + $this->addSelect(new Expression($expression)); + + if ($bindings) { + $this->addBinding($bindings, 'select'); + } + + return $this; + } + + /** + * Add a subselect expression to the query. + * + * @param \Closure|\Illuminate\Database\Query\Builder|string $query + * @param string $as + * @return \Illuminate\Database\Query\Builder|static + * + * @throws \InvalidArgumentException + */ + public function selectSub($query, $as) + { + // If the given query is a Closure, we will execute it while passing in a new + // query instance to the Closure. This will give the developer a chance to + // format and work with the query before we cast it to a raw SQL string. + if ($query instanceof Closure) { + $callback = $query; + + $callback($query = $this->newQuery()); + } + + // Here, we will parse this query into an SQL string and an array of bindings + // so we can add it to the query builder using the selectRaw method so the + // query is included in the real SQL generated by this builder instance. + list($query, $bindings) = $this->parseSubSelect($query); + + return $this->selectRaw( + '('.$query.') as '.$this->grammar->wrap($as), $bindings + ); + } + + /** + * Parse the sub-select query into SQL and bindings. + * + * @param mixed $query + * @return array + */ + protected function parseSubSelect($query) + { + if ($query instanceof self) { + return [$query->toSql(), $query->getBindings()]; + } elseif (is_string($query)) { + return [$query, []]; + } else { + throw new InvalidArgumentException; + } + } + + /** + * Add a new select column to the query. + * + * @param array|mixed $column + * @return $this + */ + public function addSelect($column) + { + $column = is_array($column) ? $column : func_get_args(); + + $this->columns = array_merge((array) $this->columns, $column); + + return $this; + } + + /** + * Force the query to only return distinct results. + * + * @return $this + */ + public function distinct() + { + $this->distinct = true; + + return $this; + } + + /** + * Set the table which the query is targeting. + * + * @param string $table + * @return $this + */ + public function from($table) + { + $this->from = $table; + + return $this; + } + + /** + * Add a join clause to the query. + * + * @param string $table + * @param string $first + * @param string $operator + * @param string $second + * @param string $type + * @param bool $where + * @return $this + */ + public function join($table, $first, $operator = null, $second = null, $type = 'inner', $where = false) + { + $join = new JoinClause($this, $type, $table); + + // If the first "column" of the join is really a Closure instance the developer + // is trying to build a join with a complex "on" clause containing more than + // one condition, so we'll add the join and call a Closure with the query. + if ($first instanceof Closure) { + call_user_func($first, $join); + + $this->joins[] = $join; + + $this->addBinding($join->getBindings(), 'join'); + } + + // If the column is simply a string, we can assume the join simply has a basic + // "on" clause with a single condition. So we will just build the join with + // this simple join clauses attached to it. There is not a join callback. + else { + $method = $where ? 'where' : 'on'; + + $this->joins[] = $join->$method($first, $operator, $second); + + $this->addBinding($join->getBindings(), 'join'); + } + + return $this; + } + + /** + * Add a "join where" clause to the query. + * + * @param string $table + * @param string $first + * @param string $operator + * @param string $second + * @param string $type + * @return \Illuminate\Database\Query\Builder|static + */ + public function joinWhere($table, $first, $operator, $second, $type = 'inner') + { + return $this->join($table, $first, $operator, $second, $type, true); + } + + /** + * Add a left join to the query. + * + * @param string $table + * @param string $first + * @param string $operator + * @param string $second + * @return \Illuminate\Database\Query\Builder|static + */ + public function leftJoin($table, $first, $operator = null, $second = null) + { + return $this->join($table, $first, $operator, $second, 'left'); + } + + /** + * Add a "join where" clause to the query. + * + * @param string $table + * @param string $first + * @param string $operator + * @param string $second + * @return \Illuminate\Database\Query\Builder|static + */ + public function leftJoinWhere($table, $first, $operator, $second) + { + return $this->joinWhere($table, $first, $operator, $second, 'left'); + } + + /** + * Add a right join to the query. + * + * @param string $table + * @param string $first + * @param string $operator + * @param string $second + * @return \Illuminate\Database\Query\Builder|static + */ + public function rightJoin($table, $first, $operator = null, $second = null) + { + return $this->join($table, $first, $operator, $second, 'right'); + } + + /** + * Add a "right join where" clause to the query. + * + * @param string $table + * @param string $first + * @param string $operator + * @param string $second + * @return \Illuminate\Database\Query\Builder|static + */ + public function rightJoinWhere($table, $first, $operator, $second) + { + return $this->joinWhere($table, $first, $operator, $second, 'right'); + } + + /** + * Add a "cross join" clause to the query. + * + * @param string $table + * @param string $first + * @param string $operator + * @param string $second + * @return \Illuminate\Database\Query\Builder|static + */ + public function crossJoin($table, $first = null, $operator = null, $second = null) + { + if ($first) { + return $this->join($table, $first, $operator, $second, 'cross'); + } + + $this->joins[] = new JoinClause($this, 'cross', $table); + + 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. + * + * @param array $wheres + * @param array $bindings + * @return void + */ + public function mergeWheres($wheres, $bindings) + { + $this->wheres = array_merge((array) $this->wheres, (array) $wheres); + + $this->bindings['where'] = array_values( + array_merge($this->bindings['where'], (array) $bindings) + ); + } + + /** + * Add a basic where clause to the query. + * + * @param string|array|\Closure $column + * @param string $operator + * @param mixed $value + * @param string $boolean + * @return $this + */ + public function where($column, $operator = null, $value = null, $boolean = 'and') + { + // If the column is an array, we will assume it is an array of key-value pairs + // and can add them each as a where clause. We will maintain the boolean we + // received when the method was called and pass it into the nested where. + if (is_array($column)) { + return $this->addArrayOfWheres($column, $boolean); + } + + // Here we will make some assumptions about the operator. If only 2 values are + // passed to the method, we will assume that the operator is an equals sign + // and keep going. Otherwise, we'll require the operator to be passed in. + list($value, $operator) = $this->prepareValueAndOperator( + $value, $operator, func_num_args() == 2 + ); + + // If the columns is actually a Closure instance, we will assume the developer + // wants to begin a nested where statement which is wrapped in parenthesis. + // We'll add that Closure to the query then return back out immediately. + if ($column instanceof Closure) { + return $this->whereNested($column, $boolean); + } + + // If the given operator is not found in the list of valid operators we will + // assume that the developer is just short-cutting the '=' operators and + // we will set the operators to '=' and set the values appropriately. + if ($this->invalidOperator($operator)) { + list($value, $operator) = [$operator, '=']; + } + + // If the value is a Closure, it means the developer is performing an entire + // sub-select within the query and we will need to compile the sub-select + // within the where clause to get the appropriate query record results. + if ($value instanceof Closure) { + return $this->whereSub($column, $operator, $value, $boolean); + } + + // If the value is "null", we will just assume the developer wants to add a + // where null clause to the query. So, we will allow a short-cut here to + // that method for convenience so the developer doesn't have to check. + if (is_null($value)) { + return $this->whereNull($column, $boolean, $operator != '='); + } + + // If the column is making a JSON reference we'll check to see if the value + // is a boolean. If it is, we'll add the raw boolean string as an actual + // value to the query to ensure this is properly handled by the query. + if (Str::contains($column, '->') && is_bool($value)) { + $value = new Expression($value ? 'true' : 'false'); + } + + // Now that we are working with just a simple query we can put the elements + // in our array and add the query binding to our array of bindings that + // will be bound to each SQL statements when it is finally executed. + $type = 'Basic'; + + $this->wheres[] = compact( + 'type', 'column', 'operator', 'value', 'boolean' + ); + + if (! $value instanceof Expression) { + $this->addBinding($value, 'where'); + } + + return $this; + } + + /** + * Add an array of where clauses to the query. + * + * @param array $column + * @param string $boolean + * @param string $method + * @return $this + */ + protected function addArrayOfWheres($column, $boolean, $method = 'where') + { + return $this->whereNested(function ($query) use ($column, $method) { + foreach ($column as $key => $value) { + if (is_numeric($key) && is_array($value)) { + $query->{$method}(...array_values($value)); + } else { + $query->$method($key, '=', $value); + } + } + }, $boolean); + } + + /** + * Prepare the value and operator for a where clause. + * + * @param string $value + * @param string $operator + * @param bool $useDefault + * @return array + * + * @throws \InvalidArgumentException + */ + protected function prepareValueAndOperator($value, $operator, $useDefault = false) + { + if ($useDefault) { + return [$operator, '=']; + } elseif ($this->invalidOperatorAndValue($operator, $value)) { + throw new InvalidArgumentException('Illegal operator and value combination.'); + } + + return [$value, $operator]; + } + + /** + * Determine if the given operator and value combination is legal. + * + * Prevents using Null values with invalid operators. + * + * @param string $operator + * @param mixed $value + * @return bool + */ + protected function invalidOperatorAndValue($operator, $value) + { + return is_null($value) && in_array($operator, $this->operators) && + ! in_array($operator, ['=', '<>', '!=']); + } + + /** + * Determine if the given operator is supported. + * + * @param string $operator + * @return bool + */ + protected function invalidOperator($operator) + { + return ! in_array(strtolower($operator), $this->operators, true) && + ! in_array(strtolower($operator), $this->grammar->getOperators(), true); + } + + /** + * Add an "or where" clause to the query. + * + * @param \Closure|string $column + * @param string $operator + * @param mixed $value + * @return \Illuminate\Database\Query\Builder|static + */ + public function orWhere($column, $operator = null, $value = null) + { + return $this->where($column, $operator, $value, 'or'); + } + + /** + * Add a "where" clause comparing two columns to the query. + * + * @param string|array $first + * @param string|null $operator + * @param string|null $second + * @param string|null $boolean + * @return \Illuminate\Database\Query\Builder|static + */ + public function whereColumn($first, $operator = null, $second = null, $boolean = 'and') + { + // If the column is an array, we will assume it is an array of key-value pairs + // and can add them each as a where clause. We will maintain the boolean we + // received when the method was called and pass it into the nested where. + if (is_array($first)) { + return $this->addArrayOfWheres($first, $boolean, 'whereColumn'); + } + + // If the given operator is not found in the list of valid operators we will + // assume that the developer is just short-cutting the '=' operators and + // we will set the operators to '=' and set the values appropriately. + if ($this->invalidOperator($operator)) { + list($second, $operator) = [$operator, '=']; + } + + // Finally, we will add this where clause into this array of clauses that we + // are building for the query. All of them will be compiled via a grammar + // once the query is about to be executed and run against the database. + $type = 'Column'; + + $this->wheres[] = compact( + 'type', 'first', 'operator', 'second', 'boolean' + ); + + return $this; + } + + /** + * Add an "or where" clause comparing two columns to the query. + * + * @param string|array $first + * @param string|null $operator + * @param string|null $second + * @return \Illuminate\Database\Query\Builder|static + */ + public function orWhereColumn($first, $operator = null, $second = null) + { + return $this->whereColumn($first, $operator, $second, 'or'); + } + + /** + * Add a raw where clause to the query. + * + * @param string $sql + * @param mixed $bindings + * @param string $boolean + * @return $this + */ + public function whereRaw($sql, $bindings = [], $boolean = 'and') + { + $this->wheres[] = ['type' => 'raw', 'sql' => $sql, 'boolean' => $boolean]; + + $this->addBinding((array) $bindings, 'where'); + + return $this; + } + + /** + * Add a raw or where clause to the query. + * + * @param string $sql + * @param array $bindings + * @return \Illuminate\Database\Query\Builder|static + */ + public function orWhereRaw($sql, array $bindings = []) + { + return $this->whereRaw($sql, $bindings, 'or'); + } + + /** + * Add a "where in" clause to the query. + * + * @param string $column + * @param mixed $values + * @param string $boolean + * @param bool $not + * @return $this + */ + public function whereIn($column, $values, $boolean = 'and', $not = false) + { + $type = $not ? 'NotIn' : 'In'; + + // 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) { + return $this->whereInExistingQuery( + $column, $values, $boolean, $not + ); + } + + // If the value of the where in clause is actually a Closure, we will assume that + // the developer is using a full sub-select for this "in" statement, and will + // execute those Closures, then we can re-construct the entire sub-selects. + if ($values instanceof Closure) { + return $this->whereInSub($column, $values, $boolean, $not); + } + + // Next, if the value is Arrayable we need to cast it to its raw array form so we + // have the underlying array value instead of an Arrayable object which is not + // able to be added as a binding, etc. We will then add to the wheres array. + if ($values instanceof Arrayable) { + $values = $values->toArray(); + } + + $this->wheres[] = compact('type', 'column', 'values', 'boolean'); + + // Finally we'll add a binding for each values unless that value is an expression + // in which case we will just skip over it since it will be the query as a raw + // string and not as a parameterized place-holder to be replaced by the PDO. + foreach ($values as $value) { + if (! $value instanceof Expression) { + $this->addBinding($value, 'where'); + } + } + + return $this; + } + + /** + * Add an "or where in" clause to the query. + * + * @param string $column + * @param mixed $values + * @return \Illuminate\Database\Query\Builder|static + */ + public function orWhereIn($column, $values) + { + return $this->whereIn($column, $values, 'or'); + } + + /** + * Add a "where not in" clause to the query. + * + * @param string $column + * @param mixed $values + * @param string $boolean + * @return \Illuminate\Database\Query\Builder|static + */ + public function whereNotIn($column, $values, $boolean = 'and') + { + return $this->whereIn($column, $values, $boolean, true); + } + + /** + * Add an "or where not in" clause to the query. + * + * @param string $column + * @param mixed $values + * @return \Illuminate\Database\Query\Builder|static + */ + public function orWhereNotIn($column, $values) + { + return $this->whereNotIn($column, $values, 'or'); + } + + /** + * Add a where in with a sub-select to the query. + * + * @param string $column + * @param \Closure $callback + * @param string $boolean + * @param bool $not + * @return $this + */ + protected function whereInSub($column, Closure $callback, $boolean, $not) + { + $type = $not ? 'NotInSub' : 'InSub'; + + // To create the exists sub-select, we will actually create a query and call the + // provided callback with the query so the developer may set any of the query + // conditions they want for the in clause, then we'll put it in this array. + call_user_func($callback, $query = $this->newQuery()); + + $this->wheres[] = compact('type', 'column', 'query', 'boolean'); + + $this->addBinding($query->getBindings(), 'where'); + + return $this; + } + + /** + * Add an external sub-select to the query. + * + * @param string $column + * @param \Illuminate\Database\Query\Builder|static $query + * @param string $boolean + * @param bool $not + * @return $this + */ + protected function whereInExistingQuery($column, $query, $boolean, $not) + { + $type = $not ? 'NotInSub' : 'InSub'; + + $this->wheres[] = compact('type', 'column', 'query', 'boolean'); + + $this->addBinding($query->getBindings(), 'where'); + + return $this; + } + + /** + * Add a "where null" clause to the query. + * + * @param string $column + * @param string $boolean + * @param bool $not + * @return $this + */ + public function whereNull($column, $boolean = 'and', $not = false) + { + $type = $not ? 'NotNull' : 'Null'; + + $this->wheres[] = compact('type', 'column', 'boolean'); + + return $this; + } + + /** + * Add an "or where null" clause to the query. + * + * @param string $column + * @return \Illuminate\Database\Query\Builder|static + */ + public function orWhereNull($column) + { + return $this->whereNull($column, 'or'); + } + + /** + * Add a "where not null" clause to the query. + * + * @param string $column + * @param string $boolean + * @return \Illuminate\Database\Query\Builder|static + */ + public function whereNotNull($column, $boolean = 'and') + { + return $this->whereNull($column, $boolean, true); + } + + /** + * Add a where between statement to the query. + * + * @param string $column + * @param array $values + * @param string $boolean + * @param bool $not + * @return $this + */ + public function whereBetween($column, array $values, $boolean = 'and', $not = false) + { + $type = 'between'; + + $this->wheres[] = compact('column', 'type', 'boolean', 'not'); + + $this->addBinding($values, 'where'); + + return $this; + } + + /** + * Add an or where between statement to the query. + * + * @param string $column + * @param array $values + * @return \Illuminate\Database\Query\Builder|static + */ + public function orWhereBetween($column, array $values) + { + return $this->whereBetween($column, $values, 'or'); + } + + /** + * Add a where not between statement to the query. + * + * @param string $column + * @param array $values + * @param string $boolean + * @return \Illuminate\Database\Query\Builder|static + */ + public function whereNotBetween($column, array $values, $boolean = 'and') + { + return $this->whereBetween($column, $values, $boolean, true); + } + + /** + * Add an or where not between statement to the query. + * + * @param string $column + * @param array $values + * @return \Illuminate\Database\Query\Builder|static + */ + public function orWhereNotBetween($column, array $values) + { + return $this->whereNotBetween($column, $values, 'or'); + } + + /** + * Add an "or where not null" clause to the query. + * + * @param string $column + * @return \Illuminate\Database\Query\Builder|static + */ + public function orWhereNotNull($column) + { + return $this->whereNotNull($column, 'or'); + } + + /** + * Add a "where date" statement to the query. + * + * @param string $column + * @param string $operator + * @param mixed $value + * @param string $boolean + * @return \Illuminate\Database\Query\Builder|static + */ + public function whereDate($column, $operator, $value = null, $boolean = 'and') + { + list($value, $operator) = $this->prepareValueAndOperator( + $value, $operator, func_num_args() == 2 + ); + + return $this->addDateBasedWhere('Date', $column, $operator, $value, $boolean); + } + + /** + * Add an "or where date" statement to the query. + * + * @param string $column + * @param string $operator + * @param string $value + * @return \Illuminate\Database\Query\Builder|static + */ + public function orWhereDate($column, $operator, $value) + { + return $this->whereDate($column, $operator, $value, 'or'); + } + + /** + * Add a "where time" statement to the query. + * + * @param string $column + * @param string $operator + * @param int $value + * @param string $boolean + * @return \Illuminate\Database\Query\Builder|static + */ + public function whereTime($column, $operator, $value, $boolean = 'and') + { + return $this->addDateBasedWhere('Time', $column, $operator, $value, $boolean); + } + + /** + * Add an "or where time" statement to the query. + * + * @param string $column + * @param string $operator + * @param int $value + * @return \Illuminate\Database\Query\Builder|static + */ + public function orWhereTime($column, $operator, $value) + { + return $this->whereTime($column, $operator, $value, 'or'); + } + + /** + * Add a "where day" statement to the query. + * + * @param string $column + * @param string $operator + * @param mixed $value + * @param string $boolean + * @return \Illuminate\Database\Query\Builder|static + */ + public function whereDay($column, $operator, $value = null, $boolean = 'and') + { + list($value, $operator) = $this->prepareValueAndOperator( + $value, $operator, func_num_args() == 2 + ); + + return $this->addDateBasedWhere('Day', $column, $operator, $value, $boolean); + } + + /** + * Add a "where month" statement to the query. + * + * @param string $column + * @param string $operator + * @param mixed $value + * @param string $boolean + * @return \Illuminate\Database\Query\Builder|static + */ + public function whereMonth($column, $operator, $value = null, $boolean = 'and') + { + list($value, $operator) = $this->prepareValueAndOperator( + $value, $operator, func_num_args() == 2 + ); + + return $this->addDateBasedWhere('Month', $column, $operator, $value, $boolean); + } + + /** + * Add a "where year" statement to the query. + * + * @param string $column + * @param string $operator + * @param mixed $value + * @param string $boolean + * @return \Illuminate\Database\Query\Builder|static + */ + public function whereYear($column, $operator, $value = null, $boolean = 'and') + { + list($value, $operator) = $this->prepareValueAndOperator( + $value, $operator, func_num_args() == 2 + ); + + return $this->addDateBasedWhere('Year', $column, $operator, $value, $boolean); + } + + /** + * Add a date based (year, month, day, time) statement to the query. + * + * @param string $type + * @param string $column + * @param string $operator + * @param int $value + * @param string $boolean + * @return $this + */ + protected function addDateBasedWhere($type, $column, $operator, $value, $boolean = 'and') + { + $this->wheres[] = compact('column', 'type', 'boolean', 'operator', 'value'); + + $this->addBinding($value, 'where'); + + return $this; + } + + /** + * Add a nested where statement to the query. + * + * @param \Closure $callback + * @param string $boolean + * @return \Illuminate\Database\Query\Builder|static + */ + public function whereNested(Closure $callback, $boolean = 'and') + { + call_user_func($callback, $query = $this->forNestedWhere()); + + return $this->addNestedWhereQuery($query, $boolean); + } + + /** + * Create a new query instance for nested where condition. + * + * @return \Illuminate\Database\Query\Builder + */ + public function forNestedWhere() + { + return $this->newQuery()->from($this->from); + } + + /** + * Add another query builder as a nested where to the query builder. + * + * @param \Illuminate\Database\Query\Builder|static $query + * @param string $boolean + * @return $this + */ + public function addNestedWhereQuery($query, $boolean = 'and') + { + if (count($query->wheres)) { + $type = 'Nested'; + + $this->wheres[] = compact('type', 'query', 'boolean'); + + $this->addBinding($query->getBindings(), 'where'); + } + + return $this; + } + + /** + * Add a full sub-select to the query. + * + * @param string $column + * @param string $operator + * @param \Closure $callback + * @param string $boolean + * @return $this + */ + protected function whereSub($column, $operator, Closure $callback, $boolean) + { + $type = 'Sub'; + + // Once we have the query instance we can simply execute it so it can add all + // of the sub-select's conditions to itself, and then we can cache it off + // in the array of where clauses for the "main" parent query instance. + call_user_func($callback, $query = $this->newQuery()); + + $this->wheres[] = compact( + 'type', 'column', 'operator', 'query', 'boolean' + ); + + $this->addBinding($query->getBindings(), 'where'); + + return $this; + } + + /** + * Add an exists clause to the query. + * + * @param \Closure $callback + * @param string $boolean + * @param bool $not + * @return $this + */ + public function whereExists(Closure $callback, $boolean = 'and', $not = false) + { + $query = $this->newQuery(); + + // Similar to the sub-select clause, we will create a new query instance so + // the developer may cleanly specify the entire exists query and we will + // compile the whole thing in the grammar and insert it into the SQL. + call_user_func($callback, $query); + + return $this->addWhereExistsQuery($query, $boolean, $not); + } + + /** + * Add an or exists clause to the query. + * + * @param \Closure $callback + * @param bool $not + * @return \Illuminate\Database\Query\Builder|static + */ + public function orWhereExists(Closure $callback, $not = false) + { + return $this->whereExists($callback, 'or', $not); + } + + /** + * Add a where not exists clause to the query. + * + * @param \Closure $callback + * @param string $boolean + * @return \Illuminate\Database\Query\Builder|static + */ + public function whereNotExists(Closure $callback, $boolean = 'and') + { + return $this->whereExists($callback, $boolean, true); + } + + /** + * Add a where not exists clause to the query. + * + * @param \Closure $callback + * @return \Illuminate\Database\Query\Builder|static + */ + public function orWhereNotExists(Closure $callback) + { + return $this->orWhereExists($callback, true); + } + + /** + * Add an exists clause to the query. + * + * @param \Illuminate\Database\Query\Builder $query + * @param string $boolean + * @param bool $not + * @return $this + */ + public function addWhereExistsQuery(Builder $query, $boolean = 'and', $not = false) + { + $type = $not ? 'NotExists' : 'Exists'; + + $this->wheres[] = compact('type', 'operator', 'query', 'boolean'); + + $this->addBinding($query->getBindings(), 'where'); + + return $this; + } + + /** + * Handles dynamic "where" clauses to the query. + * + * @param string $method + * @param string $parameters + * @return $this + */ + public function dynamicWhere($method, $parameters) + { + $finder = substr($method, 5); + + $segments = preg_split( + '/(And|Or)(?=[A-Z])/', $finder, -1, PREG_SPLIT_DELIM_CAPTURE + ); + + // The connector variable will determine which connector will be used for the + // query condition. We will change it as we come across new boolean values + // in the dynamic method strings, which could contain a number of these. + $connector = 'and'; + + $index = 0; + + foreach ($segments as $segment) { + // If the segment is not a boolean connector, we can assume it is a column's name + // and we will add it to the query as a new constraint as a where clause, then + // we can keep iterating through the dynamic method string's segments again. + if ($segment != 'And' && $segment != 'Or') { + $this->addDynamic($segment, $connector, $parameters, $index); + + $index++; + } + + // Otherwise, we will store the connector so we know how the next where clause we + // find in the query should be connected to the previous ones, meaning we will + // have the proper boolean connector to connect the next where clause found. + else { + $connector = $segment; + } + } + + return $this; + } + + /** + * Add a single dynamic where clause statement to the query. + * + * @param string $segment + * @param string $connector + * @param array $parameters + * @param int $index + * @return void + */ + protected function addDynamic($segment, $connector, $parameters, $index) + { + // Once we have parsed out the columns and formatted the boolean operators we + // are ready to add it to this query as a where clause just like any other + // clause on the query. Then we'll increment the parameter index values. + $bool = strtolower($connector); + + $this->where(Str::snake($segment), '=', $parameters[$index], $bool); + } + + /** + * Add a "group by" clause to the query. + * + * @param array ...$groups + * @return $this + */ + public function groupBy(...$groups) + { + foreach ($groups as $group) { + $this->groups = array_merge( + (array) $this->groups, + array_wrap($group) + ); + } + + return $this; + } + + /** + * Add a "having" clause to the query. + * + * @param string $column + * @param string $operator + * @param string $value + * @param string $boolean + * @return $this + */ + public function having($column, $operator = null, $value = null, $boolean = 'and') + { + $type = 'Basic'; + + // Here we will make some assumptions about the operator. If only 2 values are + // passed to the method, we will assume that the operator is an equals sign + // and keep going. Otherwise, we'll require the operator to be passed in. + list($value, $operator) = $this->prepareValueAndOperator( + $value, $operator, func_num_args() == 2 + ); + + // If the given operator is not found in the list of valid operators we will + // assume that the developer is just short-cutting the '=' operators and + // we will set the operators to '=' and set the values appropriately. + if ($this->invalidOperator($operator)) { + list($value, $operator) = [$operator, '=']; + } + + $this->havings[] = compact('type', 'column', 'operator', 'value', 'boolean'); + + if (! $value instanceof Expression) { + $this->addBinding($value, 'having'); + } + + return $this; + } + + /** + * Add a "or having" clause to the query. + * + * @param string $column + * @param string $operator + * @param string $value + * @return \Illuminate\Database\Query\Builder|static + */ + public function orHaving($column, $operator = null, $value = null) + { + return $this->having($column, $operator, $value, 'or'); + } + + /** + * Add a raw having clause to the query. + * + * @param string $sql + * @param array $bindings + * @param string $boolean + * @return $this + */ + public function havingRaw($sql, array $bindings = [], $boolean = 'and') + { + $type = 'Raw'; + + $this->havings[] = compact('type', 'sql', 'boolean'); + + $this->addBinding($bindings, 'having'); + + return $this; + } + + /** + * Add a raw or having clause to the query. + * + * @param string $sql + * @param array $bindings + * @return \Illuminate\Database\Query\Builder|static + */ + public function orHavingRaw($sql, array $bindings = []) + { + return $this->havingRaw($sql, $bindings, 'or'); + } + + /** + * Add an "order by" clause to the query. + * + * @param string $column + * @param string $direction + * @return $this + */ + public function orderBy($column, $direction = 'asc') + { + $this->{$this->unions ? 'unionOrders' : 'orders'}[] = [ + 'column' => $column, + 'direction' => strtolower($direction) == 'asc' ? 'asc' : 'desc', + ]; + + return $this; + } + + /** + * Add a descending "order by" clause to the query. + * + * @param string $column + * @return $this + */ + public function orderByDesc($column) + { + return $this->orderBy($column, 'desc'); + } + + /** + * Add an "order by" clause for a timestamp to the query. + * + * @param string $column + * @return \Illuminate\Database\Query\Builder|static + */ + public function latest($column = 'created_at') + { + return $this->orderBy($column, 'desc'); + } + + /** + * Add an "order by" clause for a timestamp to the query. + * + * @param string $column + * @return \Illuminate\Database\Query\Builder|static + */ + public function oldest($column = 'created_at') + { + return $this->orderBy($column, 'asc'); + } + + /** + * Put the query's results in random order. + * + * @param string $seed + * @return $this + */ + public function inRandomOrder($seed = '') + { + return $this->orderByRaw($this->grammar->compileRandom($seed)); + } + + /** + * Add a raw "order by" clause to the query. + * + * @param string $sql + * @param array $bindings + * @return $this + */ + public function orderByRaw($sql, $bindings = []) + { + $type = 'Raw'; + + $this->{$this->unions ? 'unionOrders' : 'orders'}[] = compact('type', 'sql'); + + $this->addBinding($bindings, 'order'); + + return $this; + } + + /** + * Alias to set the "offset" value of the query. + * + * @param int $value + * @return \Illuminate\Database\Query\Builder|static + */ + public function skip($value) + { + return $this->offset($value); + } + + /** + * Set the "offset" value of the query. + * + * @param int $value + * @return $this + */ + public function offset($value) + { + $property = $this->unions ? 'unionOffset' : 'offset'; + + $this->$property = max(0, $value); + + return $this; + } + + /** + * Alias to set the "limit" value of the query. + * + * @param int $value + * @return \Illuminate\Database\Query\Builder|static + */ + public function take($value) + { + return $this->limit($value); + } + + /** + * Set the "limit" value of the query. + * + * @param int $value + * @return $this + */ + public function limit($value) + { + $property = $this->unions ? 'unionLimit' : 'limit'; + + if ($value >= 0) { + $this->$property = $value; + } + + return $this; + } + + /** + * Set the limit and offset for a given page. + * + * @param int $page + * @param int $perPage + * @return \Illuminate\Database\Query\Builder|static + */ + public function forPage($page, $perPage = 15) + { + return $this->skip(($page - 1) * $perPage)->take($perPage); + } + + /** + * Constrain the query to the next "page" of results after a given ID. + * + * @param int $perPage + * @param int $lastId + * @param string $column + * @return \Illuminate\Database\Query\Builder|static + */ + public function forPageAfterId($perPage = 15, $lastId = 0, $column = 'id') + { + $this->orders = $this->removeExistingOrdersFor($column); + + return $this->where($column, '>', $lastId) + ->orderBy($column, 'asc') + ->take($perPage); + } + + /** + * Get an array orders with all orders for an given column removed. + * + * @param string $column + * @return array + */ + protected function removeExistingOrdersFor($column) + { + return Collection::make($this->orders) + ->reject(function ($order) use ($column) { + return $order['column'] === $column; + })->values()->all(); + } + + /** + * Add a union statement to the query. + * + * @param \Illuminate\Database\Query\Builder|\Closure $query + * @param bool $all + * @return \Illuminate\Database\Query\Builder|static + */ + public function union($query, $all = false) + { + if ($query instanceof Closure) { + call_user_func($query, $query = $this->newQuery()); + } + + $this->unions[] = compact('query', 'all'); + + $this->addBinding($query->getBindings(), 'union'); + + return $this; + } + + /** + * Add a union all statement to the query. + * + * @param \Illuminate\Database\Query\Builder|\Closure $query + * @return \Illuminate\Database\Query\Builder|static + */ + public function unionAll($query) + { + return $this->union($query, true); + } + + /** + * Lock the selected rows in the table. + * + * @param string|bool $value + * @return $this + */ + public function lock($value = true) + { + $this->lock = $value; + + if (! is_null($this->lock)) { + $this->useWritePdo(); + } + + return $this; + } + + /** + * Lock the selected rows in the table for updating. + * + * @return \Illuminate\Database\Query\Builder + */ + public function lockForUpdate() + { + return $this->lock(true); + } + + /** + * Share lock the selected rows in the table. + * + * @return \Illuminate\Database\Query\Builder + */ + public function sharedLock() + { + return $this->lock(false); + } + + /** + * Get the SQL representation of the query. + * + * @return string + */ + public function toSql() + { + return $this->grammar->compileSelect($this); + } + + /** + * Execute a query for a single record by ID. + * + * @param int $id + * @param array $columns + * @return mixed|static + */ + public function find($id, $columns = ['*']) + { + return $this->where('id', '=', $id)->first($columns); + } + + /** + * Get a single column's value from the first result of a query. + * + * @param string $column + * @return mixed + */ + public function value($column) + { + $result = (array) $this->first([$column]); + + return count($result) > 0 ? reset($result) : null; + } + + /** + * Execute the query as a "select" statement. + * + * @param array $columns + * @return \Illuminate\Support\Collection + */ + public function get($columns = ['*']) + { + $original = $this->columns; + + if (is_null($original)) { + $this->columns = $columns; + } + + $results = $this->processor->processSelect($this, $this->runSelect()); + + $this->columns = $original; + + return collect($results); + } + + /** + * Run the query as a "select" statement against the connection. + * + * @return array + */ + protected function runSelect() + { + return $this->connection->select( + $this->toSql(), $this->getBindings(), ! $this->useWritePdo + ); + } + + /** + * Paginate the given query into a simple paginator. + * + * @param int $perPage + * @param array $columns + * @param string $pageName + * @param int|null $page + * @return \Illuminate\Contracts\Pagination\LengthAwarePaginator + */ + public function paginate($perPage = 15, $columns = ['*'], $pageName = 'page', $page = null) + { + $page = $page ?: Paginator::resolveCurrentPage($pageName); + + $total = $this->getCountForPagination($columns); + + $results = $total ? $this->forPage($page, $perPage)->get($columns) : collect(); + + return new LengthAwarePaginator($results, $total, $perPage, $page, [ + 'path' => Paginator::resolveCurrentPath(), + 'pageName' => $pageName, + ]); + } + + /** + * Get a paginator only supporting simple next and previous links. + * + * This is more efficient on larger data-sets, etc. + * + * @param int $perPage + * @param array $columns + * @param string $pageName + * @param int|null $page + * @return \Illuminate\Contracts\Pagination\Paginator + */ + public function simplePaginate($perPage = 15, $columns = ['*'], $pageName = 'page', $page = null) + { + $page = $page ?: Paginator::resolveCurrentPage($pageName); + + $this->skip(($page - 1) * $perPage)->take($perPage + 1); + + return new Paginator($this->get($columns), $perPage, $page, [ + 'path' => Paginator::resolveCurrentPath(), + 'pageName' => $pageName, + ]); + } + + /** + * Get the count of the total records for the paginator. + * + * @param array $columns + * @return int + */ + public function getCountForPagination($columns = ['*']) + { + $results = $this->runPaginationCountQuery($columns); + + // Once we have run the pagination count query, we will get the resulting count and + // take into account what type of query it was. When there is a group by we will + // just return the count of the entire results set since that will be correct. + if (isset($this->groups)) { + return count($results); + } elseif (! isset($results[0])) { + return 0; + } elseif (is_object($results[0])) { + return (int) $results[0]->aggregate; + } else { + return (int) array_change_key_case((array) $results[0])['aggregate']; + } + } + + /** + * Run a pagination count query. + * + * @param array $columns + * @return array + */ + protected function runPaginationCountQuery($columns = ['*']) + { + return $this->cloneWithout(['columns', 'orders', 'limit', 'offset']) + ->cloneWithoutBindings(['select', 'order']) + ->setAggregate('count', $this->withoutSelectAliases($columns)) + ->get()->all(); + } + + /** + * Remove the column aliases since they will break count queries. + * + * @param array $columns + * @return array + */ + protected function withoutSelectAliases(array $columns) + { + return array_map(function ($column) { + return is_string($column) && ($aliasPosition = strpos(strtolower($column), ' as ')) !== false + ? substr($column, 0, $aliasPosition) : $column; + }, $columns); + } + + /** + * Get a generator for the given query. + * + * @return \Generator + */ + public function cursor() + { + if (is_null($this->columns)) { + $this->columns = ['*']; + } + + return $this->connection->cursor( + $this->toSql(), $this->getBindings(), ! $this->useWritePdo + ); + } + + /** + * Chunk the results of a query by comparing numeric IDs. + * + * @param int $count + * @param callable $callback + * @param string $column + * @param string $alias + * @return bool + */ + public function chunkById($count, callable $callback, $column = 'id', $alias = null) + { + $alias = $alias ?: $column; + + $lastId = 0; + + do { + $clone = clone $this; + + // We'll execute the query for the given page and get the results. If there are + // no results we can just break and return from here. When there are results + // we will call the callback with the current chunk of these results here. + $results = $clone->forPageAfterId($count, $lastId, $column)->get(); + + $countResults = $results->count(); + + if ($countResults == 0) { + break; + } + + // On each chunk result set, we will pass them to the callback and then let the + // developer take care of everything within the callback, which allows us to + // keep the memory low for spinning through large result sets for working. + if ($callback($results) === false) { + return false; + } + + $lastId = $results->last()->{$alias}; + } while ($countResults == $count); + + return true; + } + + /** + * Throw an exception if the query doesn't have an orderBy clause. + * + * @return void + * + * @throws \RuntimeException + */ + protected function enforceOrderBy() + { + if (empty($this->orders) && empty($this->unionOrders)) { + throw new RuntimeException('You must specify an orderBy clause when using this function.'); + } + } + + /** + * Get an array with the values of a given column. + * + * @param string $column + * @param string|null $key + * @return \Illuminate\Support\Collection + */ + public function pluck($column, $key = null) + { + $results = $this->get(is_null($key) ? [$column] : [$column, $key]); + + // If the columns are qualified with a table or have an alias, we cannot use + // those directly in the "pluck" operations since the results from the DB + // are only keyed by the column itself. We'll strip the table out here. + return $results->pluck( + $this->stripTableForPluck($column), + $this->stripTableForPluck($key) + ); + } + + /** + * Strip off the table name or alias from a column identifier. + * + * @param string $column + * @return string|null + */ + protected function stripTableForPluck($column) + { + return is_null($column) ? $column : last(preg_split('~\.| ~', $column)); + } + + /** + * Concatenate values of a given column as a string. + * + * @param string $column + * @param string $glue + * @return string + */ + public function implode($column, $glue = '') + { + return $this->pluck($column)->implode($glue); + } + + /** + * Determine if any rows exist for the current query. + * + * @return bool + */ + public function exists() + { + $results = $this->connection->select( + $this->grammar->compileExists($this), $this->getBindings(), ! $this->useWritePdo + ); + + // If the results has rows, we will get the row and see if the exists column is a + // boolean true. If there is no results for this query we will return false as + // there are no rows for this query at all and we can return that info here. + if (isset($results[0])) { + $results = (array) $results[0]; + + return (bool) $results['exists']; + } + + return false; + } + + /** + * Retrieve the "count" result of the query. + * + * @param string $columns + * @return int + */ + public function count($columns = '*') + { + return (int) $this->aggregate(__FUNCTION__, array_wrap($columns)); + } + + /** + * Retrieve the minimum value of a given column. + * + * @param string $column + * @return mixed + */ + public function min($column) + { + return $this->aggregate(__FUNCTION__, [$column]); + } + + /** + * Retrieve the maximum value of a given column. + * + * @param string $column + * @return mixed + */ + public function max($column) + { + return $this->aggregate(__FUNCTION__, [$column]); + } + + /** + * Retrieve the sum of the values of a given column. + * + * @param string $column + * @return mixed + */ + public function sum($column) + { + $result = $this->aggregate(__FUNCTION__, [$column]); + + return $result ?: 0; + } + + /** + * Retrieve the average of the values of a given column. + * + * @param string $column + * @return mixed + */ + public function avg($column) + { + return $this->aggregate(__FUNCTION__, [$column]); + } + + /** + * Alias for the "avg" method. + * + * @param string $column + * @return mixed + */ + public function average($column) + { + return $this->avg($column); + } + + /** + * Execute an aggregate function on the database. + * + * @param string $function + * @param array $columns + * @return mixed + */ + public function aggregate($function, $columns = ['*']) + { + $results = $this->cloneWithout(['columns']) + ->cloneWithoutBindings(['select']) + ->setAggregate($function, $columns) + ->get($columns); + + if (! $results->isEmpty()) { + return array_change_key_case((array) $results[0])['aggregate']; + } + } + + /** + * Execute a numeric aggregate function on the database. + * + * @param string $function + * @param array $columns + * @return float|int + */ + public function numericAggregate($function, $columns = ['*']) + { + $result = $this->aggregate($function, $columns); + + // If there is no result, we can obviously just return 0 here. Next, we will check + // if the result is an integer or float. If it is already one of these two data + // types we can just return the result as-is, otherwise we will convert this. + if (! $result) { + return 0; + } + + if (is_int($result) || is_float($result)) { + return $result; + } + + // If the result doesn't contain a decimal place, we will assume it is an int then + // cast it to one. When it does we will cast it to a float since it needs to be + // cast to the expected data type for the developers out of pure convenience. + return strpos((string) $result, '.') === false + ? (int) $result : (float) $result; + } + + /** + * Set the aggregate property without running the query. + * + * @param string $function + * @param array $columns + * @return $this + */ + protected function setAggregate($function, $columns) + { + $this->aggregate = compact('function', 'columns'); + + return $this; + } + + /** + * Insert a new record into the database. + * + * @param array $values + * @return bool + */ + public function insert(array $values) + { + // Since every insert gets treated like a batch insert, we will make sure the + // bindings are structured in a way that is convenient when building these + // inserts statements by verifying these elements are actually an array. + if (empty($values)) { + return true; + } + + if (! is_array(reset($values))) { + $values = [$values]; + } + + // Here, we will sort the insert keys for every record so that each insert is + // in the same order for the record. We need to make sure this is the case + // so there are not any errors or problems when inserting these records. + else { + foreach ($values as $key => $value) { + ksort($value); + + $values[$key] = $value; + } + } + + // Finally, we will run this query against the database connection and return + // the results. We will need to also flatten these bindings before running + // the query so they are all in one huge, flattened array for execution. + return $this->connection->insert( + $this->grammar->compileInsert($this, $values), + $this->cleanBindings(Arr::flatten($values, 1)) + ); + } + + /** + * Insert a new record and get the value of the primary key. + * + * @param array $values + * @param string $sequence + * @return int + */ + public function insertGetId(array $values, $sequence = null) + { + $sql = $this->grammar->compileInsertGetId($this, $values, $sequence); + + $values = $this->cleanBindings($values); + + return $this->processor->processInsertGetId($this, $sql, $values, $sequence); + } + + /** + * Update a record in the database. + * + * @param array $values + * @return int + */ + public function update(array $values) + { + $sql = $this->grammar->compileUpdate($this, $values); + + return $this->connection->update($sql, $this->cleanBindings( + $this->grammar->prepareBindingsForUpdate($this->bindings, $values) + )); + } + + /** + * Insert or update a record matching the attributes, and fill it with values. + * + * @param array $attributes + * @param array $values + * @return bool + */ + public function updateOrInsert(array $attributes, array $values = []) + { + if (! $this->where($attributes)->exists()) { + return $this->insert(array_merge($attributes, $values)); + } + + return (bool) $this->take(1)->update($values); + } + + /** + * Increment a column's value by a given amount. + * + * @param string $column + * @param int $amount + * @param array $extra + * @return int + */ + public function increment($column, $amount = 1, array $extra = []) + { + if (! is_numeric($amount)) { + throw new InvalidArgumentException('Non-numeric value passed to increment method.'); + } + + $wrapped = $this->grammar->wrap($column); + + $columns = array_merge([$column => $this->raw("$wrapped + $amount")], $extra); + + return $this->update($columns); + } + + /** + * Decrement a column's value by a given amount. + * + * @param string $column + * @param int $amount + * @param array $extra + * @return int + */ + public function decrement($column, $amount = 1, array $extra = []) + { + if (! is_numeric($amount)) { + throw new InvalidArgumentException('Non-numeric value passed to decrement method.'); + } + + $wrapped = $this->grammar->wrap($column); + + $columns = array_merge([$column => $this->raw("$wrapped - $amount")], $extra); + + return $this->update($columns); + } + + /** + * Delete a record from the database. + * + * @param mixed $id + * @return int + */ + public function delete($id = null) + { + // If an ID is passed to the method, we will set the where clause to check the + // ID to let developers to simply and quickly remove a single row from this + // database without manually specifying the "where" clauses on the query. + if (! is_null($id)) { + $this->where($this->from.'.id', '=', $id); + } + + return $this->connection->delete( + $this->grammar->compileDelete($this), $this->getBindings() + ); + } + + /** + * Run a truncate statement on the table. + * + * @return void + */ + public function truncate() + { + foreach ($this->grammar->compileTruncate($this) as $sql => $bindings) { + $this->connection->statement($sql, $bindings); + } + } + + /** + * Get a new instance of the query builder. + * + * @return \Illuminate\Database\Query\Builder + */ + public function newQuery() + { + return new static($this->connection, $this->grammar, $this->processor); + } + + /** + * Create a raw database expression. + * + * @param mixed $value + * @return \Illuminate\Database\Query\Expression + */ + public function raw($value) + { + return $this->connection->raw($value); + } + + /** + * Get the current query value bindings in a flattened array. + * + * @return array + */ + public function getBindings() + { + return Arr::flatten($this->bindings); + } + + /** + * Get the raw array of bindings. + * + * @return array + */ + public function getRawBindings() + { + return $this->bindings; + } + + /** + * Set the bindings on the query builder. + * + * @param array $bindings + * @param string $type + * @return $this + * + * @throws \InvalidArgumentException + */ + public function setBindings(array $bindings, $type = 'where') + { + if (! array_key_exists($type, $this->bindings)) { + throw new InvalidArgumentException("Invalid binding type: {$type}."); + } + + $this->bindings[$type] = $bindings; + + return $this; + } + + /** + * Add a binding to the query. + * + * @param mixed $value + * @param string $type + * @return $this + * + * @throws \InvalidArgumentException + */ + public function addBinding($value, $type = 'where') + { + if (! array_key_exists($type, $this->bindings)) { + throw new InvalidArgumentException("Invalid binding type: {$type}."); + } + + if (is_array($value)) { + $this->bindings[$type] = array_values(array_merge($this->bindings[$type], $value)); + } else { + $this->bindings[$type][] = $value; + } + + return $this; + } + + /** + * Merge an array of bindings into our bindings. + * + * @param \Illuminate\Database\Query\Builder $query + * @return $this + */ + public function mergeBindings(Builder $query) + { + $this->bindings = array_merge_recursive($this->bindings, $query->bindings); + + return $this; + } + + /** + * Remove all of the expressions from a list of bindings. + * + * @param array $bindings + * @return array + */ + protected function cleanBindings(array $bindings) + { + return array_values(array_filter($bindings, function ($binding) { + return ! $binding instanceof Expression; + })); + } + + /** + * Get the database connection instance. + * + * @return \Illuminate\Database\ConnectionInterface + */ + public function getConnection() + { + return $this->connection; + } + + /** + * Get the database query processor instance. + * + * @return \Illuminate\Database\Query\Processors\Processor + */ + public function getProcessor() + { + return $this->processor; + } + + /** + * Get the query grammar instance. + * + * @return \Illuminate\Database\Query\Grammars\Grammar + */ + public function getGrammar() + { + return $this->grammar; + } + + /** + * Use the write pdo for query. + * + * @return $this + */ + public function useWritePdo() + { + $this->useWritePdo = true; + + return $this; + } + + /** + * Clone the query without the given properties. + * + * @param array $except + * @return static + */ + public function cloneWithout(array $except) + { + return tap(clone $this, function ($clone) use ($except) { + foreach ($except as $property) { + $clone->{$property} = null; + } + }); + } + + /** + * Clone the query without the given bindings. + * + * @param array $except + * @return static + */ + public function cloneWithoutBindings(array $except) + { + return tap(clone $this, function ($clone) use ($except) { + foreach ($except as $type) { + $clone->bindings[$type] = []; + } + }); + } + + /** + * Handle dynamic method calls into the method. + * + * @param string $method + * @param array $parameters + * @return mixed + * + * @throws \BadMethodCallException + */ + public function __call($method, $parameters) + { + if (static::hasMacro($method)) { + return $this->macroCall($method, $parameters); + } + + if (Str::startsWith($method, 'where')) { + return $this->dynamicWhere($method, $parameters); + } + + $className = static::class; + + throw new BadMethodCallException("Call to undefined method {$className}::{$method}()"); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/Expression.php b/vendor/laravel/framework/src/Illuminate/Database/Query/Expression.php new file mode 100755 index 0000000..de69029 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Query/Expression.php @@ -0,0 +1,44 @@ +value = $value; + } + + /** + * Get the value of the expression. + * + * @return mixed + */ + public function getValue() + { + return $this->value; + } + + /** + * Get the value of the expression. + * + * @return string + */ + public function __toString() + { + return (string) $this->getValue(); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/Grammar.php b/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/Grammar.php new file mode 100755 index 0000000..b7e5973 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/Grammar.php @@ -0,0 +1,852 @@ +columns; + + if (is_null($query->columns)) { + $query->columns = ['*']; + } + + // To compile the query, we'll spin through each component of the query and + // see if that component exists. If it does we'll just call the compiler + // function for the component which is responsible for making the SQL. + $sql = trim($this->concatenate( + $this->compileComponents($query)) + ); + + $query->columns = $original; + + return $sql; + } + + /** + * Compile the components necessary for a select clause. + * + * @param \Illuminate\Database\Query\Builder $query + * @return array + */ + protected function compileComponents(Builder $query) + { + $sql = []; + + foreach ($this->selectComponents as $component) { + // To compile the query, we'll spin through each component of the query and + // see if that component exists. If it does we'll just call the compiler + // function for the component which is responsible for making the SQL. + if (! is_null($query->$component)) { + $method = 'compile'.ucfirst($component); + + $sql[$component] = $this->$method($query, $query->$component); + } + } + + return $sql; + } + + /** + * Compile an aggregated select clause. + * + * @param \Illuminate\Database\Query\Builder $query + * @param array $aggregate + * @return string + */ + protected function compileAggregate(Builder $query, $aggregate) + { + $column = $this->columnize($aggregate['columns']); + + // If the query has a "distinct" constraint and we're not asking for all columns + // we need to prepend "distinct" onto the column name so that the query takes + // it into account when it performs the aggregating operations on the data. + if ($query->distinct && $column !== '*') { + $column = 'distinct '.$column; + } + + return 'select '.$aggregate['function'].'('.$column.') as aggregate'; + } + + /** + * Compile the "select *" portion of the query. + * + * @param \Illuminate\Database\Query\Builder $query + * @param array $columns + * @return string|null + */ + protected function compileColumns(Builder $query, $columns) + { + // If the query is actually performing an aggregating select, we will let that + // compiler handle the building of the select clauses, as it will need some + // more syntax that is best handled by that function to keep things neat. + if (! is_null($query->aggregate)) { + return; + } + + $select = $query->distinct ? 'select distinct ' : 'select '; + + return $select.$this->columnize($columns); + } + + /** + * Compile the "from" portion of the query. + * + * @param \Illuminate\Database\Query\Builder $query + * @param string $table + * @return string + */ + protected function compileFrom(Builder $query, $table) + { + return 'from '.$this->wrapTable($table); + } + + /** + * Compile the "join" portions of the query. + * + * @param \Illuminate\Database\Query\Builder $query + * @param array $joins + * @return string + */ + protected function compileJoins(Builder $query, $joins) + { + return collect($joins)->map(function ($join) use ($query) { + $table = $this->wrapTable($join->table); + + return trim("{$join->type} join {$table} {$this->compileWheres($join)}"); + })->implode(' '); + } + + /** + * Compile the "where" portions of the query. + * + * @param \Illuminate\Database\Query\Builder $query + * @return string + */ + protected function compileWheres(Builder $query) + { + // Each type of where clauses has its own compiler function which is responsible + // for actually creating the where clauses SQL. This helps keep the code nice + // and maintainable since each clause has a very small method that it uses. + if (is_null($query->wheres)) { + return ''; + } + + // If we actually have some where clauses, we will strip off the first boolean + // operator, which is added by the query builders for convenience so we can + // avoid checking for the first clauses in each of the compilers methods. + if (count($sql = $this->compileWheresToArray($query)) > 0) { + return $this->concatenateWhereClauses($query, $sql); + } + + return ''; + } + + /** + * Get an array of all the where clauses for the query. + * + * @param \Illuminate\Database\Query\Builder $query + * @return array + */ + protected function compileWheresToArray($query) + { + return collect($query->wheres)->map(function ($where) use ($query) { + return $where['boolean'].' '.$this->{"where{$where['type']}"}($query, $where); + })->all(); + } + + /** + * Format the where clause statements into one string. + * + * @param \Illuminate\Database\Query\Builder $query + * @param array $sql + * @return string + */ + protected function concatenateWhereClauses($query, $sql) + { + $conjunction = $query instanceof JoinClause ? 'on' : 'where'; + + return $conjunction.' '.$this->removeLeadingBoolean(implode(' ', $sql)); + } + + /** + * Compile a raw where clause. + * + * @param \Illuminate\Database\Query\Builder $query + * @param array $where + * @return string + */ + protected function whereRaw(Builder $query, $where) + { + return $where['sql']; + } + + /** + * Compile a basic where clause. + * + * @param \Illuminate\Database\Query\Builder $query + * @param array $where + * @return string + */ + protected function whereBasic(Builder $query, $where) + { + $value = $this->parameter($where['value']); + + return $this->wrap($where['column']).' '.$where['operator'].' '.$value; + } + + /** + * Compile a "where in" clause. + * + * @param \Illuminate\Database\Query\Builder $query + * @param array $where + * @return string + */ + protected function whereIn(Builder $query, $where) + { + if (! empty($where['values'])) { + return $this->wrap($where['column']).' in ('.$this->parameterize($where['values']).')'; + } + + return '0 = 1'; + } + + /** + * Compile a "where not in" clause. + * + * @param \Illuminate\Database\Query\Builder $query + * @param array $where + * @return string + */ + protected function whereNotIn(Builder $query, $where) + { + if (! empty($where['values'])) { + return $this->wrap($where['column']).' not in ('.$this->parameterize($where['values']).')'; + } + + return '1 = 1'; + } + + /** + * Compile a where in sub-select clause. + * + * @param \Illuminate\Database\Query\Builder $query + * @param array $where + * @return string + */ + protected function whereInSub(Builder $query, $where) + { + return $this->wrap($where['column']).' in ('.$this->compileSelect($where['query']).')'; + } + + /** + * Compile a where not in sub-select clause. + * + * @param \Illuminate\Database\Query\Builder $query + * @param array $where + * @return string + */ + protected function whereNotInSub(Builder $query, $where) + { + return $this->wrap($where['column']).' not in ('.$this->compileSelect($where['query']).')'; + } + + /** + * Compile a "where null" clause. + * + * @param \Illuminate\Database\Query\Builder $query + * @param array $where + * @return string + */ + protected function whereNull(Builder $query, $where) + { + return $this->wrap($where['column']).' is null'; + } + + /** + * Compile a "where not null" clause. + * + * @param \Illuminate\Database\Query\Builder $query + * @param array $where + * @return string + */ + protected function whereNotNull(Builder $query, $where) + { + return $this->wrap($where['column']).' is not null'; + } + + /** + * Compile a "between" where clause. + * + * @param \Illuminate\Database\Query\Builder $query + * @param array $where + * @return string + */ + protected function whereBetween(Builder $query, $where) + { + $between = $where['not'] ? 'not between' : 'between'; + + return $this->wrap($where['column']).' '.$between.' ? and ?'; + } + + /** + * Compile a "where date" clause. + * + * @param \Illuminate\Database\Query\Builder $query + * @param array $where + * @return string + */ + protected function whereDate(Builder $query, $where) + { + return $this->dateBasedWhere('date', $query, $where); + } + + /** + * Compile a "where time" clause. + * + * @param \Illuminate\Database\Query\Builder $query + * @param array $where + * @return string + */ + protected function whereTime(Builder $query, $where) + { + return $this->dateBasedWhere('time', $query, $where); + } + + /** + * Compile a "where day" clause. + * + * @param \Illuminate\Database\Query\Builder $query + * @param array $where + * @return string + */ + protected function whereDay(Builder $query, $where) + { + return $this->dateBasedWhere('day', $query, $where); + } + + /** + * Compile a "where month" clause. + * + * @param \Illuminate\Database\Query\Builder $query + * @param array $where + * @return string + */ + protected function whereMonth(Builder $query, $where) + { + return $this->dateBasedWhere('month', $query, $where); + } + + /** + * Compile a "where year" clause. + * + * @param \Illuminate\Database\Query\Builder $query + * @param array $where + * @return string + */ + protected function whereYear(Builder $query, $where) + { + return $this->dateBasedWhere('year', $query, $where); + } + + /** + * Compile a date based where clause. + * + * @param string $type + * @param \Illuminate\Database\Query\Builder $query + * @param array $where + * @return string + */ + protected function dateBasedWhere($type, Builder $query, $where) + { + $value = $this->parameter($where['value']); + + return $type.'('.$this->wrap($where['column']).') '.$where['operator'].' '.$value; + } + + /** + * Compile a where clause comparing two columns.. + * + * @param \Illuminate\Database\Query\Builder $query + * @param array $where + * @return string + */ + protected function whereColumn(Builder $query, $where) + { + return $this->wrap($where['first']).' '.$where['operator'].' '.$this->wrap($where['second']); + } + + /** + * Compile a nested where clause. + * + * @param \Illuminate\Database\Query\Builder $query + * @param array $where + * @return string + */ + protected function whereNested(Builder $query, $where) + { + // Here we will calculate what portion of the string we need to remove. If this + // is a join clause query, we need to remove the "on" portion of the SQL and + // if it is a normal query we need to take the leading "where" of queries. + $offset = $query instanceof JoinClause ? 3 : 6; + + return '('.substr($this->compileWheres($where['query']), $offset).')'; + } + + /** + * Compile a where condition with a sub-select. + * + * @param \Illuminate\Database\Query\Builder $query + * @param array $where + * @return string + */ + protected function whereSub(Builder $query, $where) + { + $select = $this->compileSelect($where['query']); + + return $this->wrap($where['column']).' '.$where['operator']." ($select)"; + } + + /** + * Compile a where exists clause. + * + * @param \Illuminate\Database\Query\Builder $query + * @param array $where + * @return string + */ + protected function whereExists(Builder $query, $where) + { + return 'exists ('.$this->compileSelect($where['query']).')'; + } + + /** + * Compile a where exists clause. + * + * @param \Illuminate\Database\Query\Builder $query + * @param array $where + * @return string + */ + protected function whereNotExists(Builder $query, $where) + { + return 'not exists ('.$this->compileSelect($where['query']).')'; + } + + /** + * Compile the "group by" portions of the query. + * + * @param \Illuminate\Database\Query\Builder $query + * @param array $groups + * @return string + */ + protected function compileGroups(Builder $query, $groups) + { + return 'group by '.$this->columnize($groups); + } + + /** + * Compile the "having" portions of the query. + * + * @param \Illuminate\Database\Query\Builder $query + * @param array $havings + * @return string + */ + protected function compileHavings(Builder $query, $havings) + { + $sql = implode(' ', array_map([$this, 'compileHaving'], $havings)); + + return 'having '.$this->removeLeadingBoolean($sql); + } + + /** + * Compile a single having clause. + * + * @param array $having + * @return string + */ + protected function compileHaving(array $having) + { + // If the having clause is "raw", we can just return the clause straight away + // without doing any more processing on it. Otherwise, we will compile the + // clause into SQL based on the components that make it up from builder. + if ($having['type'] === 'Raw') { + return $having['boolean'].' '.$having['sql']; + } + + return $this->compileBasicHaving($having); + } + + /** + * Compile a basic having clause. + * + * @param array $having + * @return string + */ + protected function compileBasicHaving($having) + { + $column = $this->wrap($having['column']); + + $parameter = $this->parameter($having['value']); + + return $having['boolean'].' '.$column.' '.$having['operator'].' '.$parameter; + } + + /** + * Compile the "order by" portions of the query. + * + * @param \Illuminate\Database\Query\Builder $query + * @param array $orders + * @return string + */ + protected function compileOrders(Builder $query, $orders) + { + if (! empty($orders)) { + return 'order by '.implode(', ', $this->compileOrdersToArray($query, $orders)); + } + + return ''; + } + + /** + * Compile the query orders to an array. + * + * @param \Illuminate\Database\Query\Builder + * @param array $orders + * @return array + */ + protected function compileOrdersToArray(Builder $query, $orders) + { + return array_map(function ($order) { + return ! isset($order['sql']) + ? $this->wrap($order['column']).' '.$order['direction'] + : $order['sql']; + }, $orders); + } + + /** + * Compile the random statement into SQL. + * + * @param string $seed + * @return string + */ + public function compileRandom($seed) + { + return 'RANDOM()'; + } + + /** + * Compile the "limit" portions of the query. + * + * @param \Illuminate\Database\Query\Builder $query + * @param int $limit + * @return string + */ + protected function compileLimit(Builder $query, $limit) + { + return 'limit '.(int) $limit; + } + + /** + * Compile the "offset" portions of the query. + * + * @param \Illuminate\Database\Query\Builder $query + * @param int $offset + * @return string + */ + protected function compileOffset(Builder $query, $offset) + { + return 'offset '.(int) $offset; + } + + /** + * Compile the "union" queries attached to the main query. + * + * @param \Illuminate\Database\Query\Builder $query + * @return string + */ + protected function compileUnions(Builder $query) + { + $sql = ''; + + foreach ($query->unions as $union) { + $sql .= $this->compileUnion($union); + } + + if (! empty($query->unionOrders)) { + $sql .= ' '.$this->compileOrders($query, $query->unionOrders); + } + + if (isset($query->unionLimit)) { + $sql .= ' '.$this->compileLimit($query, $query->unionLimit); + } + + if (isset($query->unionOffset)) { + $sql .= ' '.$this->compileOffset($query, $query->unionOffset); + } + + return ltrim($sql); + } + + /** + * Compile a single union statement. + * + * @param array $union + * @return string + */ + protected function compileUnion(array $union) + { + $conjuction = $union['all'] ? ' union all ' : ' union '; + + return $conjuction.$union['query']->toSql(); + } + + /** + * Compile an exists statement into SQL. + * + * @param \Illuminate\Database\Query\Builder $query + * @return string + */ + public function compileExists(Builder $query) + { + $select = $this->compileSelect($query); + + return "select exists({$select}) as {$this->wrap('exists')}"; + } + + /** + * Compile an insert statement into SQL. + * + * @param \Illuminate\Database\Query\Builder $query + * @param array $values + * @return string + */ + public function compileInsert(Builder $query, array $values) + { + // Essentially we will force every insert to be treated as a batch insert which + // simply makes creating the SQL easier for us since we can utilize the same + // basic routine regardless of an amount of records given to us to insert. + $table = $this->wrapTable($query->from); + + if (! is_array(reset($values))) { + $values = [$values]; + } + + $columns = $this->columnize(array_keys(reset($values))); + + // We need to build a list of parameter place-holders of values that are bound + // to the query. Each insert should have the exact same amount of parameter + // bindings so we will loop through the record and parameterize them all. + $parameters = collect($values)->map(function ($record) { + return '('.$this->parameterize($record).')'; + })->implode(', '); + + return "insert into $table ($columns) values $parameters"; + } + + /** + * Compile an insert and get ID statement into SQL. + * + * @param \Illuminate\Database\Query\Builder $query + * @param array $values + * @param string $sequence + * @return string + */ + public function compileInsertGetId(Builder $query, $values, $sequence) + { + return $this->compileInsert($query, $values); + } + + /** + * Compile an update statement into SQL. + * + * @param \Illuminate\Database\Query\Builder $query + * @param array $values + * @return string + */ + public function compileUpdate(Builder $query, $values) + { + $table = $this->wrapTable($query->from); + + // Each one of the columns in the update statements needs to be wrapped in the + // keyword identifiers, also a place-holder needs to be created for each of + // the values in the list of bindings so we can make the sets statements. + $columns = collect($values)->map(function ($value, $key) { + return $this->wrap($key).' = '.$this->parameter($value); + })->implode(', '); + + // If the query has any "join" clauses, we will setup the joins on the builder + // and compile them so we can attach them to this update, as update queries + // can get join statements to attach to other tables when they're needed. + $joins = ''; + + if (isset($query->joins)) { + $joins = ' '.$this->compileJoins($query, $query->joins); + } + + // Of course, update queries may also be constrained by where clauses so we'll + // need to compile the where clauses and attach it to the query so only the + // intended records are updated by the SQL statements we generate to run. + $wheres = $this->compileWheres($query); + + return trim("update {$table}{$joins} set $columns $wheres"); + } + + /** + * Prepare the bindings for an update statement. + * + * @param array $bindings + * @param array $values + * @return array + */ + public function prepareBindingsForUpdate(array $bindings, array $values) + { + $bindingsWithoutJoin = Arr::except($bindings, 'join'); + + return array_values( + array_merge($bindings['join'], $values, Arr::flatten($bindingsWithoutJoin)) + ); + } + + /** + * Compile a delete statement into SQL. + * + * @param \Illuminate\Database\Query\Builder $query + * @return string + */ + public function compileDelete(Builder $query) + { + $wheres = is_array($query->wheres) ? $this->compileWheres($query) : ''; + + return trim("delete from {$this->wrapTable($query->from)} $wheres"); + } + + /** + * Compile a truncate table statement into SQL. + * + * @param \Illuminate\Database\Query\Builder $query + * @return array + */ + public function compileTruncate(Builder $query) + { + return ['truncate '.$this->wrapTable($query->from) => []]; + } + + /** + * Compile the lock into SQL. + * + * @param \Illuminate\Database\Query\Builder $query + * @param bool|string $value + * @return string + */ + protected function compileLock(Builder $query, $value) + { + return is_string($value) ? $value : ''; + } + + /** + * Determine if the grammar supports savepoints. + * + * @return bool + */ + public function supportsSavepoints() + { + return true; + } + + /** + * Compile the SQL statement to define a savepoint. + * + * @param string $name + * @return string + */ + public function compileSavepoint($name) + { + return 'SAVEPOINT '.$name; + } + + /** + * Compile the SQL statement to execute a savepoint rollback. + * + * @param string $name + * @return string + */ + public function compileSavepointRollBack($name) + { + return 'ROLLBACK TO SAVEPOINT '.$name; + } + + /** + * Concatenate an array of segments, removing empties. + * + * @param array $segments + * @return string + */ + protected function concatenate($segments) + { + return implode(' ', array_filter($segments, function ($value) { + return (string) $value !== ''; + })); + } + + /** + * Remove the leading boolean from a statement. + * + * @param string $value + * @return string + */ + protected function removeLeadingBoolean($value) + { + return preg_replace('/and |or /i', '', $value, 1); + } + + /** + * Get the grammar specific operators. + * + * @return array + */ + public function getOperators() + { + return $this->operators; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/MySqlGrammar.php b/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/MySqlGrammar.php new file mode 100755 index 0000000..6943c14 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/MySqlGrammar.php @@ -0,0 +1,300 @@ +unions) { + $sql = '('.$sql.') '.$this->compileUnions($query); + } + + return $sql; + } + + /** + * Compile a single union statement. + * + * @param array $union + * @return string + */ + protected function compileUnion(array $union) + { + $conjuction = $union['all'] ? ' union all ' : ' union '; + + return $conjuction.'('.$union['query']->toSql().')'; + } + + /** + * Compile the random statement into SQL. + * + * @param string $seed + * @return string + */ + public function compileRandom($seed) + { + return 'RAND('.$seed.')'; + } + + /** + * Compile the lock into SQL. + * + * @param \Illuminate\Database\Query\Builder $query + * @param bool|string $value + * @return string + */ + protected function compileLock(Builder $query, $value) + { + if (! is_string($value)) { + return $value ? 'for update' : 'lock in share mode'; + } + + return $value; + } + + /** + * Compile an update statement into SQL. + * + * @param \Illuminate\Database\Query\Builder $query + * @param array $values + * @return string + */ + public function compileUpdate(Builder $query, $values) + { + $table = $this->wrapTable($query->from); + + // Each one of the columns in the update statements needs to be wrapped in the + // keyword identifiers, also a place-holder needs to be created for each of + // the values in the list of bindings so we can make the sets statements. + $columns = $this->compileUpdateColumns($values); + + // If the query has any "join" clauses, we will setup the joins on the builder + // and compile them so we can attach them to this update, as update queries + // can get join statements to attach to other tables when they're needed. + $joins = ''; + + if (isset($query->joins)) { + $joins = ' '.$this->compileJoins($query, $query->joins); + } + + // Of course, update queries may also be constrained by where clauses so we'll + // need to compile the where clauses and attach it to the query so only the + // intended records are updated by the SQL statements we generate to run. + $where = $this->compileWheres($query); + + $sql = rtrim("update {$table}{$joins} set $columns $where"); + + // If the query has an order by clause we will compile it since MySQL supports + // order bys on update statements. We'll compile them using the typical way + // of compiling order bys. Then they will be appended to the SQL queries. + if (! empty($query->orders)) { + $sql .= ' '.$this->compileOrders($query, $query->orders); + } + + // Updates on MySQL also supports "limits", which allow you to easily update a + // single record very easily. This is not supported by all database engines + // so we have customized this update compiler here in order to add it in. + if (isset($query->limit)) { + $sql .= ' '.$this->compileLimit($query, $query->limit); + } + + return rtrim($sql); + } + + /** + * Compile all of the columns for an update statement. + * + * @param array $values + * @return string + */ + protected function compileUpdateColumns($values) + { + return collect($values)->map(function ($value, $key) { + if ($this->isJsonSelector($key)) { + return $this->compileJsonUpdateColumn($key, new JsonExpression($value)); + } else { + return $this->wrap($key).' = '.$this->parameter($value); + } + })->implode(', '); + } + + /** + * Prepares a JSON column being updated using the JSON_SET function. + * + * @param string $key + * @param \Illuminate\Database\Query\JsonExpression $value + * @return string + */ + protected function compileJsonUpdateColumn($key, JsonExpression $value) + { + $path = explode('->', $key); + + $field = $this->wrapValue(array_shift($path)); + + $accessor = '"$.'.implode('.', $path).'"'; + + return "{$field} = json_set({$field}, {$accessor}, {$value->getValue()})"; + } + + /** + * Prepare the bindings for an update statement. + * + * Booleans, integers, and doubles are inserted into JSON updates as raw values. + * + * @param array $bindings + * @param array $values + * @return array + */ + public function prepareBindingsForUpdate(array $bindings, array $values) + { + $values = collect($values)->reject(function ($value, $column) { + return $this->isJsonSelector($column) && + in_array(gettype($value), ['boolean', 'integer', 'double']); + })->all(); + + return parent::prepareBindingsForUpdate($bindings, $values); + } + + /** + * Compile a delete statement into SQL. + * + * @param \Illuminate\Database\Query\Builder $query + * @return string + */ + public function compileDelete(Builder $query) + { + $table = $this->wrapTable($query->from); + + $where = is_array($query->wheres) ? $this->compileWheres($query) : ''; + + return isset($query->joins) + ? $this->compileDeleteWithJoins($query, $table, $where) + : $this->compileDeleteWithoutJoins($query, $table, $where); + } + + /** + * Compile a delete query that does not use joins. + * + * @param \Illuminate\Database\Query\Builder $query + * @param string $table + * @param array $where + * @return string + */ + protected function compileDeleteWithoutJoins($query, $table, $where) + { + $sql = trim("delete from {$table} {$where}"); + + // When using MySQL, delete statements may contain order by statements and limits + // so we will compile both of those here. Once we have finished compiling this + // we will return the completed SQL statement so it will be executed for us. + if (! empty($query->orders)) { + $sql .= ' '.$this->compileOrders($query, $query->orders); + } + + if (isset($query->limit)) { + $sql .= ' '.$this->compileLimit($query, $query->limit); + } + + return $sql; + } + + /** + * 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, $where) + { + $joins = ' '.$this->compileJoins($query, $query->joins); + + $alias = strpos(strtolower($table), ' as ') !== false + ? explode(' as ', $table)[1] : $table; + + return trim("delete {$alias} from {$table}{$joins} {$where}"); + } + + /** + * Wrap a single string in keyword identifiers. + * + * @param string $value + * @return string + */ + protected function wrapValue($value) + { + if ($value === '*') { + return $value; + } + + // If the given value is a JSON selector we will wrap it differently than a + // traditional value. We will need to split this path and wrap each part + // wrapped, etc. Otherwise, we will simply wrap the value as a string. + if ($this->isJsonSelector($value)) { + return $this->wrapJsonSelector($value); + } + + return '`'.str_replace('`', '``', $value).'`'; + } + + /** + * Wrap the given JSON selector. + * + * @param string $value + * @return string + */ + protected function wrapJsonSelector($value) + { + $path = explode('->', $value); + + $field = $this->wrapValue(array_shift($path)); + + return sprintf('%s->\'$.%s\'', $field, collect($path)->map(function ($part) { + return '"'.$part.'"'; + })->implode('.')); + } + + /** + * Determine if the given string is a JSON selector. + * + * @param string $value + * @return bool + */ + protected function isJsonSelector($value) + { + return Str::contains($value, '->'); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/PostgresGrammar.php b/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/PostgresGrammar.php new file mode 100755 index 0000000..fa7f673 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/PostgresGrammar.php @@ -0,0 +1,285 @@ +', '<=', '>=', '<>', '!=', + 'like', 'not like', 'between', 'ilike', + '&', '|', '#', '<<', '>>', + '@>', '<@', '?', '?|', '?&', '||', '-', '-', '#-', + ]; + + /** + * Compile a "where date" clause. + * + * @param \Illuminate\Database\Query\Builder $query + * @param array $where + * @return string + */ + protected function whereDate(Builder $query, $where) + { + $value = $this->parameter($where['value']); + + return $this->wrap($where['column']).'::date '.$where['operator'].' '.$value; + } + + /** + * Compile a date based where clause. + * + * @param string $type + * @param \Illuminate\Database\Query\Builder $query + * @param array $where + * @return string + */ + protected function dateBasedWhere($type, Builder $query, $where) + { + $value = $this->parameter($where['value']); + + return 'extract('.$type.' from '.$this->wrap($where['column']).') '.$where['operator'].' '.$value; + } + + /** + * Compile the lock into SQL. + * + * @param \Illuminate\Database\Query\Builder $query + * @param bool|string $value + * @return string + */ + protected function compileLock(Builder $query, $value) + { + if (! is_string($value)) { + return $value ? 'for update' : 'for share'; + } + + return $value; + } + + /** + * Compile an insert and get ID statement into SQL. + * + * @param \Illuminate\Database\Query\Builder $query + * @param array $values + * @param string $sequence + * @return string + */ + public function compileInsertGetId(Builder $query, $values, $sequence) + { + if (is_null($sequence)) { + $sequence = 'id'; + } + + return $this->compileInsert($query, $values).' returning '.$this->wrap($sequence); + } + + /** + * Compile an update statement into SQL. + * + * @param \Illuminate\Database\Query\Builder $query + * @param array $values + * @return string + */ + public function compileUpdate(Builder $query, $values) + { + $table = $this->wrapTable($query->from); + + // Each one of the columns in the update statements needs to be wrapped in the + // keyword identifiers, also a place-holder needs to be created for each of + // the values in the list of bindings so we can make the sets statements. + $columns = $this->compileUpdateColumns($values); + + $from = $this->compileUpdateFrom($query); + + $where = $this->compileUpdateWheres($query); + + return trim("update {$table} set {$columns}{$from} {$where}"); + } + + /** + * Compile the columns for the update statement. + * + * @param array $values + * @return string + */ + protected function compileUpdateColumns($values) + { + // When gathering the columns for an update statement, we'll wrap each of the + // columns and convert it to a parameter value. Then we will concatenate a + // list of the columns that can be added into this update query clauses. + return collect($values)->map(function ($value, $key) { + return $this->wrap($key).' = '.$this->parameter($value); + })->implode(', '); + } + + /** + * Compile the "from" clause for an update with a join. + * + * @param \Illuminate\Database\Query\Builder $query + * @return string|null + */ + protected function compileUpdateFrom(Builder $query) + { + if (! isset($query->joins)) { + return ''; + } + + // When using Postgres, updates with joins list the joined tables in the from + // clause, which is different than other systems like MySQL. Here, we will + // compile out the tables that are joined and add them to a from clause. + $froms = collect($query->joins)->map(function ($join) { + return $this->wrapTable($join->table); + })->all(); + + if (count($froms) > 0) { + return ' from '.implode(', ', $froms); + } + } + + /** + * Compile the additional where clauses for updates with joins. + * + * @param \Illuminate\Database\Query\Builder $query + * @return string + */ + protected function compileUpdateWheres(Builder $query) + { + $baseWheres = $this->compileWheres($query); + + if (! isset($query->joins)) { + return $baseWheres; + } + + // Once we compile the join constraints, we will either use them as the where + // clause or append them to the existing base where clauses. If we need to + // strip the leading boolean we will do so when using as the only where. + $joinWheres = $this->compileUpdateJoinWheres($query); + + if (trim($baseWheres) == '') { + return 'where '.$this->removeLeadingBoolean($joinWheres); + } + + return $baseWheres.' '.$joinWheres; + } + + /** + * Compile the "join" clause where clauses for an update. + * + * @param \Illuminate\Database\Query\Builder $query + * @return string + */ + protected function compileUpdateJoinWheres(Builder $query) + { + $joinWheres = []; + + // Here we will just loop through all of the join constraints and compile them + // all out then implode them. This should give us "where" like syntax after + // everything has been built and then we will join it to the real wheres. + foreach ($query->joins as $join) { + foreach ($join->wheres as $where) { + $method = "where{$where['type']}"; + + $joinWheres[] = $where['boolean'].' '.$this->$method($query, $where); + } + } + + return implode(' ', $joinWheres); + } + + /** + * Prepare the bindings for an update statement. + * + * @param array $bindings + * @param array $values + * @return array + */ + public function prepareBindingsForUpdate(array $bindings, array $values) + { + // Update statements with "joins" in Postgres use an interesting syntax. We need to + // take all of the bindings and put them on the end of this array since they are + // added to the end of the "where" clause statements as typical where clauses. + $bindingsWithoutJoin = Arr::except($bindings, 'join'); + + return array_values( + array_merge($values, $bindings['join'], Arr::flatten($bindingsWithoutJoin)) + ); + } + + /** + * Compile a truncate table statement into SQL. + * + * @param \Illuminate\Database\Query\Builder $query + * @return array + */ + public function compileTruncate(Builder $query) + { + return ['truncate '.$this->wrapTable($query->from).' restart identity' => []]; + } + + /** + * Wrap a single string in keyword identifiers. + * + * @param string $value + * @return string + */ + protected function wrapValue($value) + { + if ($value === '*') { + return $value; + } + + // If the given value is a JSON selector we will wrap it differently than a + // traditional value. We will need to split this path and wrap each part + // wrapped, etc. Otherwise, we will simply wrap the value as a string. + if (Str::contains($value, '->')) { + return $this->wrapJsonSelector($value); + } + + return '"'.str_replace('"', '""', $value).'"'; + } + + /** + * Wrap the given JSON selector. + * + * @param string $value + * @return string + */ + protected function wrapJsonSelector($value) + { + $path = explode('->', $value); + + $field = $this->wrapValue(array_shift($path)); + + $wrappedPath = $this->wrapJsonPathAttributes($path); + + $attribute = array_pop($wrappedPath); + + if (! empty($wrappedPath)) { + return $field.'->'.implode('->', $wrappedPath).'->>'.$attribute; + } + + return $field.'->>'.$attribute; + } + + /** + * Wrap the attributes of the give JSON path. + * + * @param array $path + * @return array + */ + protected function wrapJsonPathAttributes($path) + { + return array_map(function ($attribute) { + return "'$attribute'"; + }, $path); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/SQLiteGrammar.php b/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/SQLiteGrammar.php new file mode 100755 index 0000000..6f5e9c3 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/SQLiteGrammar.php @@ -0,0 +1,188 @@ +', '<=', '>=', '<>', '!=', + 'like', 'not like', 'between', 'ilike', + '&', '|', '<<', '>>', + ]; + + /** + * Compile a select query into SQL. + * + * @param \Illuminate\Database\Query\Builder $query + * @return string + */ + public function compileSelect(Builder $query) + { + $sql = parent::compileSelect($query); + + if ($query->unions) { + $sql = 'select * from ('.$sql.') '.$this->compileUnions($query); + } + + return $sql; + } + + /** + * Compile a single union statement. + * + * @param array $union + * @return string + */ + protected function compileUnion(array $union) + { + $conjuction = $union['all'] ? ' union all ' : ' union '; + + return $conjuction.'select * from ('.$union['query']->toSql().')'; + } + + /** + * Compile a "where date" clause. + * + * @param \Illuminate\Database\Query\Builder $query + * @param array $where + * @return string + */ + protected function whereDate(Builder $query, $where) + { + return $this->dateBasedWhere('%Y-%m-%d', $query, $where); + } + + /** + * Compile a "where day" clause. + * + * @param \Illuminate\Database\Query\Builder $query + * @param array $where + * @return string + */ + protected function whereDay(Builder $query, $where) + { + return $this->dateBasedWhere('%d', $query, $where); + } + + /** + * Compile a "where month" clause. + * + * @param \Illuminate\Database\Query\Builder $query + * @param array $where + * @return string + */ + protected function whereMonth(Builder $query, $where) + { + return $this->dateBasedWhere('%m', $query, $where); + } + + /** + * Compile a "where year" clause. + * + * @param \Illuminate\Database\Query\Builder $query + * @param array $where + * @return string + */ + protected function whereYear(Builder $query, $where) + { + return $this->dateBasedWhere('%Y', $query, $where); + } + + /** + * Compile a date based where clause. + * + * @param string $type + * @param \Illuminate\Database\Query\Builder $query + * @param array $where + * @return string + */ + protected function dateBasedWhere($type, Builder $query, $where) + { + $value = str_pad($where['value'], 2, '0', STR_PAD_LEFT); + + $value = $this->parameter($value); + + return "strftime('{$type}', {$this->wrap($where['column'])}) {$where['operator']} {$value}"; + } + + /** + * Compile an insert statement into SQL. + * + * @param \Illuminate\Database\Query\Builder $query + * @param array $values + * @return string + */ + public function compileInsert(Builder $query, array $values) + { + // Essentially we will force every insert to be treated as a batch insert which + // simply makes creating the SQL easier for us since we can utilize the same + // basic routine regardless of an amount of records given to us to insert. + $table = $this->wrapTable($query->from); + + if (! is_array(reset($values))) { + $values = [$values]; + } + + // If there is only one record being inserted, we will just use the usual query + // 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)); + } + + $names = $this->columnize(array_keys(reset($values))); + + $columns = []; + + // SQLite requires us to build the multi-row insert as a listing of select with + // unions joining them together. So we'll build out this list of columns and + // then join them all together with select unions to complete the queries. + foreach (array_keys(reset($values)) as $column) { + $columns[] = '? as '.$this->wrap($column); + } + + $columns = array_fill(0, count($values), implode(', ', $columns)); + + return "insert into $table ($names) select ".implode(' union all select ', $columns); + } + + /** + * Compile a truncate table statement into SQL. + * + * @param \Illuminate\Database\Query\Builder $query + * @return array + */ + public function compileTruncate(Builder $query) + { + return [ + 'delete from sqlite_sequence where name = ?' => [$query->from], + 'delete from '.$this->wrapTable($query->from) => [], + ]; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/SqlServerGrammar.php b/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/SqlServerGrammar.php new file mode 100755 index 0000000..7fa2050 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/SqlServerGrammar.php @@ -0,0 +1,420 @@ +', '<=', '>=', '!<', '!>', '<>', '!=', + 'like', 'not like', 'between', 'ilike', + '&', '&=', '|', '|=', '^', '^=', + ]; + + /** + * Compile a select query into SQL. + * + * @param \Illuminate\Database\Query\Builder $query + * @return string + */ + public function compileSelect(Builder $query) + { + if (! $query->offset) { + return parent::compileSelect($query); + } + + // If an offset is present on the query, we will need to wrap the query in + // a big "ANSI" offset syntax block. This is very nasty compared to the + // other database systems but is necessary for implementing features. + if (is_null($query->columns)) { + $query->columns = ['*']; + } + + return $this->compileAnsiOffset( + $query, $this->compileComponents($query) + ); + } + + /** + * Compile the "select *" portion of the query. + * + * @param \Illuminate\Database\Query\Builder $query + * @param array $columns + * @return string|null + */ + protected function compileColumns(Builder $query, $columns) + { + if (! is_null($query->aggregate)) { + return; + } + + $select = $query->distinct ? 'select distinct ' : 'select '; + + // If there is a limit on the query, but not an offset, we will add the top + // clause to the query, which serves as a "limit" type clause within the + // SQL Server system similar to the limit keywords available in MySQL. + if ($query->limit > 0 && $query->offset <= 0) { + $select .= 'top '.$query->limit.' '; + } + + return $select.$this->columnize($columns); + } + + /** + * Compile the "from" portion of the query. + * + * @param \Illuminate\Database\Query\Builder $query + * @param string $table + * @return string + */ + protected function compileFrom(Builder $query, $table) + { + $from = parent::compileFrom($query, $table); + + if (is_string($query->lock)) { + return $from.' '.$query->lock; + } + + if (! is_null($query->lock)) { + return $from.' with(rowlock,'.($query->lock ? 'updlock,' : '').'holdlock)'; + } + + return $from; + } + + /** + * Compile a "where date" clause. + * + * @param \Illuminate\Database\Query\Builder $query + * @param array $where + * @return string + */ + protected function whereDate(Builder $query, $where) + { + $value = $this->parameter($where['value']); + + return 'cast('.$this->wrap($where['column']).' as date) '.$where['operator'].' '.$value; + } + + /** + * Create a full ANSI offset clause for the query. + * + * @param \Illuminate\Database\Query\Builder $query + * @param array $components + * @return string + */ + protected function compileAnsiOffset(Builder $query, $components) + { + // An ORDER BY clause is required to make this offset query work, so if one does + // not exist we'll just create a dummy clause to trick the database and so it + // does not complain about the queries for not having an "order by" clause. + if (empty($components['orders'])) { + $components['orders'] = 'order by (select 0)'; + } + + // We need to add the row number to the query so we can compare it to the offset + // and limit values given for the statements. So we will add an expression to + // the "select" that will give back the row numbers on each of the records. + $components['columns'] .= $this->compileOver($components['orders']); + + unset($components['orders']); + + // Next we need to calculate the constraints that should be placed on the query + // to get the right offset and limit from our query but if there is no limit + // set we will just handle the offset only since that is all that matters. + $sql = $this->concatenate($components); + + return $this->compileTableExpression($sql, $query); + } + + /** + * Compile the over statement for a table expression. + * + * @param string $orderings + * @return string + */ + protected function compileOver($orderings) + { + return ", row_number() over ({$orderings}) as row_num"; + } + + /** + * Compile a common table expression for a query. + * + * @param string $sql + * @param \Illuminate\Database\Query\Builder $query + * @return string + */ + protected function compileTableExpression($sql, $query) + { + $constraint = $this->compileRowConstraint($query); + + return "select * from ({$sql}) as temp_table where row_num {$constraint}"; + } + + /** + * Compile the limit / offset row constraint for a query. + * + * @param \Illuminate\Database\Query\Builder $query + * @return string + */ + protected function compileRowConstraint($query) + { + $start = $query->offset + 1; + + if ($query->limit > 0) { + $finish = $query->offset + $query->limit; + + return "between {$start} and {$finish}"; + } + + return ">= {$start}"; + } + + /** + * Compile the random statement into SQL. + * + * @param string $seed + * @return string + */ + public function compileRandom($seed) + { + return 'NEWID()'; + } + + /** + * Compile the "limit" portions of the query. + * + * @param \Illuminate\Database\Query\Builder $query + * @param int $limit + * @return string + */ + protected function compileLimit(Builder $query, $limit) + { + return ''; + } + + /** + * Compile the "offset" portions of the query. + * + * @param \Illuminate\Database\Query\Builder $query + * @param int $offset + * @return string + */ + protected function compileOffset(Builder $query, $offset) + { + return ''; + } + + /** + * Compile the lock into SQL. + * + * @param \Illuminate\Database\Query\Builder $query + * @param bool|string $value + * @return string + */ + protected function compileLock(Builder $query, $value) + { + return ''; + } + + /** + * Compile an exists statement into SQL. + * + * @param \Illuminate\Database\Query\Builder $query + * @return string + */ + public function compileExists(Builder $query) + { + $existsQuery = clone $query; + + $existsQuery->columns = []; + + return $this->compileSelect($existsQuery->selectRaw('1 [exists]')->limit(1)); + } + + /** + * Compile a delete statement into SQL. + * + * @param \Illuminate\Database\Query\Builder $query + * @return string + */ + public function compileDelete(Builder $query) + { + $table = $this->wrapTable($query->from); + + $where = is_array($query->wheres) ? $this->compileWheres($query) : ''; + + return isset($query->joins) + ? $this->compileDeleteWithJoins($query, $table, $where) + : trim("delete from {$table} {$where}"); + } + + /** + * Compile a delete statement with joins into SQL. + * + * @param \Illuminate\Database\Query\Builder $query + * @param string $table + * @param string $where + * @return string + */ + protected function compileDeleteWithJoins(Builder $query, $table, $where) + { + $joins = ' '.$this->compileJoins($query, $query->joins); + + $alias = strpos(strtolower($table), ' as ') !== false + ? explode(' as ', $table)[1] : $table; + + return trim("delete {$alias} from {$table}{$joins} {$where}"); + } + + /** + * Compile a truncate table statement into SQL. + * + * @param \Illuminate\Database\Query\Builder $query + * @return array + */ + public function compileTruncate(Builder $query) + { + return ['truncate table '.$this->wrapTable($query->from) => []]; + } + + /** + * Compile an update statement into SQL. + * + * @param \Illuminate\Database\Query\Builder $query + * @param array $values + * @return string + */ + public function compileUpdate(Builder $query, $values) + { + list($table, $alias) = $this->parseUpdateTable($query->from); + + // Each one of the columns in the update statements needs to be wrapped in the + // keyword identifiers, also a place-holder needs to be created for each of + // the values in the list of bindings so we can make the sets statements. + $columns = collect($values)->map(function ($value, $key) { + return $this->wrap($key).' = '.$this->parameter($value); + })->implode(', '); + + // If the query has any "join" clauses, we will setup the joins on the builder + // and compile them so we can attach them to this update, as update queries + // can get join statements to attach to other tables when they're needed. + $joins = ''; + + if (isset($query->joins)) { + $joins = ' '.$this->compileJoins($query, $query->joins); + } + + // Of course, update queries may also be constrained by where clauses so we'll + // need to compile the where clauses and attach it to the query so only the + // intended records are updated by the SQL statements we generate to run. + $where = $this->compileWheres($query); + + if (! empty($joins)) { + return trim("update {$alias} set {$columns} from {$table}{$joins} {$where}"); + } + + return trim("update {$table}{$joins} set $columns $where"); + } + + /** + * Get the table and alias for the given table. + * + * @param string $table + * @return array + */ + protected function parseUpdateTable($table) + { + $table = $alias = $this->wrapTable($table); + + if (strpos(strtolower($table), '] as [') !== false) { + $alias = '['.explode('] as [', $table)[1]; + } + + return [$table, $alias]; + } + + /** + * Prepare the bindings for an update statement. + * + * @param array $bindings + * @param array $values + * @return array + */ + public function prepareBindingsForUpdate(array $bindings, array $values) + { + // Update statements with joins in SQL Servers utilize an unique syntax. We need to + // take all of the bindings and put them on the end of this array since they are + // added to the end of the "where" clause statements as typical where clauses. + $bindingsWithoutJoin = Arr::except($bindings, 'join'); + + return array_values( + array_merge($values, $bindings['join'], Arr::flatten($bindingsWithoutJoin)) + ); + } + + /** + * Determine if the grammar supports savepoints. + * + * @return bool + */ + public function supportsSavepoints() + { + return false; + } + + /** + * Get the format for database stored dates. + * + * @return string + */ + public function getDateFormat() + { + return 'Y-m-d H:i:s.000'; + } + + /** + * Wrap a single string in keyword identifiers. + * + * @param string $value + * @return string + */ + protected function wrapValue($value) + { + return $value === '*' ? $value : '['.str_replace(']', ']]', $value).']'; + } + + /** + * Wrap a table in keyword identifiers. + * + * @param \Illuminate\Database\Query\Expression|string $table + * @return string + */ + public function wrapTable($table) + { + return $this->wrapTableValuedFunction(parent::wrapTable($table)); + } + + /** + * Wrap a table in keyword identifiers. + * + * @param string $table + * @return string + */ + protected function wrapTableValuedFunction($table) + { + if (preg_match('/^(.+?)(\(.*?\))]$/', $table, $matches) === 1) { + $table = $matches[1].']'.$matches[2]; + } + + return $table; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/JoinClause.php b/vendor/laravel/framework/src/Illuminate/Database/Query/JoinClause.php new file mode 100755 index 0000000..ca7b4d4 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Query/JoinClause.php @@ -0,0 +1,100 @@ +type = $type; + $this->table = $table; + $this->parentQuery = $parentQuery; + + parent::__construct( + $parentQuery->getConnection(), $parentQuery->getGrammar(), $parentQuery->getProcessor() + ); + } + + /** + * Add an "on" clause to the join. + * + * On clauses can be chained, e.g. + * + * $join->on('contacts.user_id', '=', 'users.id') + * ->on('contacts.info_id', '=', 'info.id') + * + * will produce the following SQL: + * + * on `contacts`.`user_id` = `users`.`id` and `contacts`.`info_id` = `info`.`id` + * + * @param \Closure|string $first + * @param string|null $operator + * @param string|null $second + * @param string $boolean + * @return $this + * + * @throws \InvalidArgumentException + */ + public function on($first, $operator = null, $second = null, $boolean = 'and') + { + if ($first instanceof Closure) { + return $this->whereNested($first, $boolean); + } + + return $this->whereColumn($first, $operator, $second, $boolean); + } + + /** + * Add an "or on" clause to the join. + * + * @param \Closure|string $first + * @param string|null $operator + * @param string|null $second + * @return \Illuminate\Database\Query\JoinClause + */ + public function orOn($first, $operator = null, $second = null) + { + return $this->on($first, $operator, $second, 'or'); + } + + /** + * Get a new instance of the join clause builder. + * + * @return \Illuminate\Database\Query\JoinClause + */ + public function newQuery() + { + return new static($this->parentQuery, $this->type, $this->table); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/JsonExpression.php b/vendor/laravel/framework/src/Illuminate/Database/Query/JsonExpression.php new file mode 100644 index 0000000..648a7da --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Query/JsonExpression.php @@ -0,0 +1,70 @@ +value = $this->getJsonBindingParameter($value); + } + + /** + * Translate the given value into the appropriate JSON binding parameter. + * + * @param mixed $value + * @return string + */ + protected function getJsonBindingParameter($value) + { + switch ($type = gettype($value)) { + case 'boolean': + return $value ? 'true' : 'false'; + case 'integer': + case 'double': + return $value; + case 'string': + return '?'; + case 'object': + case 'array': + return '?'; + } + + throw new InvalidArgumentException('JSON value is of illegal type: '.$type); + } + + /** + * Get the value of the expression. + * + * @return mixed + */ + public function getValue() + { + return $this->value; + } + + /** + * Get the value of the expression. + * + * @return string + */ + public function __toString() + { + return (string) $this->getValue(); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/MySqlProcessor.php b/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/MySqlProcessor.php new file mode 100644 index 0000000..eeb07b0 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/MySqlProcessor.php @@ -0,0 +1,19 @@ +column_name; + }, $results); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/PostgresProcessor.php b/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/PostgresProcessor.php new file mode 100755 index 0000000..dcaee9f --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/PostgresProcessor.php @@ -0,0 +1,41 @@ +getConnection()->selectFromWriteConnection($sql, $values)[0]; + + $sequence = $sequence ?: 'id'; + + $id = is_object($result) ? $result->{$sequence} : $result[$sequence]; + + return is_numeric($id) ? (int) $id : $id; + } + + /** + * Process the results of a column listing query. + * + * @param array $results + * @return array + */ + public function processColumnListing($results) + { + return array_map(function ($result) { + return with((object) $result)->column_name; + }, $results); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/Processor.php b/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/Processor.php new file mode 100755 index 0000000..f78429f --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/Processor.php @@ -0,0 +1,49 @@ +getConnection()->insert($sql, $values); + + $id = $query->getConnection()->getPdo()->lastInsertId($sequence); + + return is_numeric($id) ? (int) $id : $id; + } + + /** + * Process the results of a column listing query. + * + * @param array $results + * @return array + */ + public function processColumnListing($results) + { + return $results; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/SQLiteProcessor.php b/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/SQLiteProcessor.php new file mode 100644 index 0000000..ef9cb5a --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/SQLiteProcessor.php @@ -0,0 +1,19 @@ +name; + }, $results); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/SqlServerProcessor.php b/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/SqlServerProcessor.php new file mode 100755 index 0000000..b5314c8 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/SqlServerProcessor.php @@ -0,0 +1,69 @@ +getConnection(); + + $connection->insert($sql, $values); + + if ($connection->getConfig('odbc') === true) { + $id = $this->processInsertGetIdForOdbc($connection); + } else { + $id = $connection->getPdo()->lastInsertId(); + } + + return is_numeric($id) ? (int) $id : $id; + } + + /** + * Process an "insert get ID" query for ODBC. + * + * @param \Illuminate\Database\Connection $connection + * @return int + * @throws \Exception + */ + protected function processInsertGetIdForOdbc(Connection $connection) + { + $result = $connection->selectFromWriteConnection( + 'SELECT CAST(COALESCE(SCOPE_IDENTITY(), @@IDENTITY) AS int) AS insertid' + ); + + if (! $result) { + throw new Exception('Unable to retrieve lastInsertID for ODBC.'); + } + + $row = $result[0]; + + return is_object($row) ? $row->insertid : $row['insertid']; + } + + /** + * Process the results of a column listing query. + * + * @param array $results + * @return array + */ + public function processColumnListing($results) + { + return array_map(function ($result) { + return with((object) $result)->name; + }, $results); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/QueryException.php b/vendor/laravel/framework/src/Illuminate/Database/QueryException.php new file mode 100644 index 0000000..9a3687d --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/QueryException.php @@ -0,0 +1,78 @@ +sql = $sql; + $this->bindings = $bindings; + $this->code = $previous->getCode(); + $this->message = $this->formatMessage($sql, $bindings, $previous); + + if ($previous instanceof PDOException) { + $this->errorInfo = $previous->errorInfo; + } + } + + /** + * Format the SQL error message. + * + * @param string $sql + * @param array $bindings + * @param \Exception $previous + * @return string + */ + protected function formatMessage($sql, $bindings, $previous) + { + return $previous->getMessage().' (SQL: '.Str::replaceArray('?', $bindings, $sql).')'; + } + + /** + * Get the SQL for the query. + * + * @return string + */ + public function getSql() + { + return $this->sql; + } + + /** + * Get the bindings for the query. + * + * @return array + */ + public function getBindings() + { + return $this->bindings; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/README.md b/vendor/laravel/framework/src/Illuminate/Database/README.md new file mode 100755 index 0000000..e7cdeed --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/README.md @@ -0,0 +1,70 @@ +## Illuminate Database + +The Illuminate Database component is a full database toolkit for PHP, providing an expressive query builder, ActiveRecord style ORM, and schema builder. It currently supports MySQL, Postgres, SQL Server, and SQLite. It also serves as the database layer of the Laravel PHP framework. + +### Usage Instructions + +First, create a new "Capsule" manager instance. Capsule aims to make configuring the library for usage outside of the Laravel framework as easy as possible. + +```PHP +use Illuminate\Database\Capsule\Manager as Capsule; + +$capsule = new Capsule; + +$capsule->addConnection([ + 'driver' => 'mysql', + 'host' => 'localhost', + 'database' => 'database', + 'username' => 'root', + 'password' => 'password', + 'charset' => 'utf8', + 'collation' => 'utf8_unicode_ci', + 'prefix' => '', +]); + +// Set the event dispatcher used by Eloquent models... (optional) +use Illuminate\Events\Dispatcher; +use Illuminate\Container\Container; +$capsule->setEventDispatcher(new Dispatcher(new Container)); + +// Make this Capsule instance available globally via static methods... (optional) +$capsule->setAsGlobal(); + +// Setup the Eloquent ORM... (optional; unless you've used setEventDispatcher()) +$capsule->bootEloquent(); +``` + +> `composer require "illuminate/events"` required when you need to use observers with Eloquent. + +Once the Capsule instance has been registered. You may use it like so: + +**Using The Query Builder** + +```PHP +$users = Capsule::table('users')->where('votes', '>', 100)->get(); +``` +Other core methods may be accessed directly from the Capsule in the same manner as from the DB facade: +```PHP +$results = Capsule::select('select * from users where id = ?', array(1)); +``` + +**Using The Schema Builder** + +```PHP +Capsule::schema()->create('users', function($table) +{ + $table->increments('id'); + $table->string('email')->unique(); + $table->timestamps(); +}); +``` + +**Using The Eloquent ORM** + +```PHP +class User extends Illuminate\Database\Eloquent\Model {} + +$users = User::where('votes', '>', 1)->get(); +``` + +For further documentation on using the various database facilities this library provides, consult the [Laravel framework documentation](https://laravel.com/docs). diff --git a/vendor/laravel/framework/src/Illuminate/Database/SQLiteConnection.php b/vendor/laravel/framework/src/Illuminate/Database/SQLiteConnection.php new file mode 100755 index 0000000..b32786c --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/SQLiteConnection.php @@ -0,0 +1,51 @@ +withTablePrefix(new QueryGrammar); + } + + /** + * Get the default schema grammar instance. + * + * @return \Illuminate\Database\Schema\Grammars\SQLiteGrammar + */ + protected function getDefaultSchemaGrammar() + { + return $this->withTablePrefix(new SchemaGrammar); + } + + /** + * Get the default post processor instance. + * + * @return \Illuminate\Database\Query\Processors\SQLiteProcessor + */ + protected function getDefaultPostProcessor() + { + return new SQLiteProcessor; + } + + /** + * Get the Doctrine DBAL driver. + * + * @return \Doctrine\DBAL\Driver\PDOSqlite\Driver + */ + protected function getDoctrineDriver() + { + return new DoctrineDriver; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/Blueprint.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/Blueprint.php new file mode 100755 index 0000000..695d1cc --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Schema/Blueprint.php @@ -0,0 +1,1111 @@ +table = $table; + + if (! is_null($callback)) { + $callback($this); + } + } + + /** + * Execute the blueprint against the database. + * + * @param \Illuminate\Database\Connection $connection + * @param \Illuminate\Database\Schema\Grammars\Grammar $grammar + * @return void + */ + public function build(Connection $connection, Grammar $grammar) + { + foreach ($this->toSql($connection, $grammar) as $statement) { + $connection->statement($statement); + } + } + + /** + * Get the raw SQL statements for the blueprint. + * + * @param \Illuminate\Database\Connection $connection + * @param \Illuminate\Database\Schema\Grammars\Grammar $grammar + * @return array + */ + public function toSql(Connection $connection, Grammar $grammar) + { + $this->addImpliedCommands(); + + $statements = []; + + // Each type of command has a corresponding compiler function on the schema + // grammar which is used to build the necessary SQL statements to build + // the blueprint element, so we'll just call that compilers function. + foreach ($this->commands as $command) { + $method = 'compile'.ucfirst($command->name); + + if (method_exists($grammar, $method)) { + if (! is_null($sql = $grammar->$method($this, $command, $connection))) { + $statements = array_merge($statements, (array) $sql); + } + } + } + + return $statements; + } + + /** + * Add the commands that are implied by the blueprint's state. + * + * @return void + */ + protected function addImpliedCommands() + { + if (count($this->getAddedColumns()) > 0 && ! $this->creating()) { + array_unshift($this->commands, $this->createCommand('add')); + } + + if (count($this->getChangedColumns()) > 0 && ! $this->creating()) { + array_unshift($this->commands, $this->createCommand('change')); + } + + $this->addFluentIndexes(); + } + + /** + * Add the index commands fluently specified on columns. + * + * @return void + */ + protected function addFluentIndexes() + { + foreach ($this->columns as $column) { + foreach (['primary', 'unique', 'index'] as $index) { + // If the index has been specified on the given column, but is simply equal + // to "true" (boolean), no name has been specified for this index so the + // index method can be called without a name and it will generate one. + if ($column->{$index} === true) { + $this->{$index}($column->name); + + continue 2; + } + + // If the index has been specified on the given column, and it has a string + // value, we'll go ahead and call the index method and pass the name for + // the index since the developer specified the explicit name for this. + elseif (isset($column->{$index})) { + $this->{$index}($column->name, $column->{$index}); + + continue 2; + } + } + } + } + + /** + * Determine if the blueprint has a create command. + * + * @return bool + */ + protected function creating() + { + return collect($this->commands)->contains(function ($command) { + return $command->name == 'create'; + }); + } + + /** + * Indicate that the table needs to be created. + * + * @return \Illuminate\Support\Fluent + */ + public function create() + { + return $this->addCommand('create'); + } + + /** + * Indicate that the table needs to be temporary. + * + * @return void + */ + public function temporary() + { + $this->temporary = true; + } + + /** + * Indicate that the table should be dropped. + * + * @return \Illuminate\Support\Fluent + */ + public function drop() + { + return $this->addCommand('drop'); + } + + /** + * Indicate that the table should be dropped if it exists. + * + * @return \Illuminate\Support\Fluent + */ + public function dropIfExists() + { + return $this->addCommand('dropIfExists'); + } + + /** + * Indicate that the given columns should be dropped. + * + * @param array|mixed $columns + * @return \Illuminate\Support\Fluent + */ + public function dropColumn($columns) + { + $columns = is_array($columns) ? $columns : (array) func_get_args(); + + return $this->addCommand('dropColumn', compact('columns')); + } + + /** + * Indicate that the given columns should be renamed. + * + * @param string $from + * @param string $to + * @return \Illuminate\Support\Fluent + */ + public function renameColumn($from, $to) + { + return $this->addCommand('renameColumn', compact('from', 'to')); + } + + /** + * Indicate that the given primary key should be dropped. + * + * @param string|array $index + * @return \Illuminate\Support\Fluent + */ + public function dropPrimary($index = null) + { + return $this->dropIndexCommand('dropPrimary', 'primary', $index); + } + + /** + * Indicate that the given unique key should be dropped. + * + * @param string|array $index + * @return \Illuminate\Support\Fluent + */ + public function dropUnique($index) + { + return $this->dropIndexCommand('dropUnique', 'unique', $index); + } + + /** + * Indicate that the given index should be dropped. + * + * @param string|array $index + * @return \Illuminate\Support\Fluent + */ + public function dropIndex($index) + { + return $this->dropIndexCommand('dropIndex', 'index', $index); + } + + /** + * Indicate that the given foreign key should be dropped. + * + * @param string|array $index + * @return \Illuminate\Support\Fluent + */ + public function dropForeign($index) + { + return $this->dropIndexCommand('dropForeign', 'foreign', $index); + } + + /** + * Indicate that the timestamp columns should be dropped. + * + * @return void + */ + public function dropTimestamps() + { + $this->dropColumn('created_at', 'updated_at'); + } + + /** + * Indicate that the timestamp columns should be dropped. + * + * @return void + */ + public function dropTimestampsTz() + { + $this->dropTimestamps(); + } + + /** + * Indicate that the soft delete column should be dropped. + * + * @return void + */ + public function dropSoftDeletes() + { + $this->dropColumn('deleted_at'); + } + + /** + * Indicate that the soft delete column should be dropped. + * + * @return void + */ + public function dropSoftDeletesTz() + { + $this->dropSoftDeletes(); + } + + /** + * Indicate that the remember token column should be dropped. + * + * @return void + */ + public function dropRememberToken() + { + $this->dropColumn('remember_token'); + } + + /** + * Rename the table to a given name. + * + * @param string $to + * @return \Illuminate\Support\Fluent + */ + public function rename($to) + { + return $this->addCommand('rename', compact('to')); + } + + /** + * Specify the primary key(s) for the table. + * + * @param string|array $columns + * @param string $name + * @param string|null $algorithm + * @return \Illuminate\Support\Fluent + */ + public function primary($columns, $name = null, $algorithm = null) + { + return $this->indexCommand('primary', $columns, $name, $algorithm); + } + + /** + * Specify a unique index for the table. + * + * @param string|array $columns + * @param string $name + * @param string|null $algorithm + * @return \Illuminate\Support\Fluent + */ + public function unique($columns, $name = null, $algorithm = null) + { + return $this->indexCommand('unique', $columns, $name, $algorithm); + } + + /** + * Specify an index for the table. + * + * @param string|array $columns + * @param string $name + * @param string|null $algorithm + * @return \Illuminate\Support\Fluent + */ + public function index($columns, $name = null, $algorithm = null) + { + return $this->indexCommand('index', $columns, $name, $algorithm); + } + + /** + * Specify a foreign key for the table. + * + * @param string|array $columns + * @param string $name + * @return \Illuminate\Support\Fluent + */ + public function foreign($columns, $name = null) + { + return $this->indexCommand('foreign', $columns, $name); + } + + /** + * Create a new auto-incrementing integer (4-byte) column on the table. + * + * @param string $column + * @return \Illuminate\Support\Fluent + */ + public function increments($column) + { + return $this->unsignedInteger($column, true); + } + + /** + * Create a new auto-incrementing tiny integer (1-byte) column on the table. + * + * @param string $column + * @return \Illuminate\Support\Fluent + */ + public function tinyIncrements($column) + { + return $this->unsignedTinyInteger($column, true); + } + + /** + * Create a new auto-incrementing small integer (2-byte) column on the table. + * + * @param string $column + * @return \Illuminate\Support\Fluent + */ + public function smallIncrements($column) + { + return $this->unsignedSmallInteger($column, true); + } + + /** + * Create a new auto-incrementing medium integer (3-byte) column on the table. + * + * @param string $column + * @return \Illuminate\Support\Fluent + */ + public function mediumIncrements($column) + { + return $this->unsignedMediumInteger($column, true); + } + + /** + * Create a new auto-incrementing big integer (8-byte) column on the table. + * + * @param string $column + * @return \Illuminate\Support\Fluent + */ + public function bigIncrements($column) + { + return $this->unsignedBigInteger($column, true); + } + + /** + * Create a new char column on the table. + * + * @param string $column + * @param int $length + * @return \Illuminate\Support\Fluent + */ + public function char($column, $length = null) + { + $length = $length ?: Builder::$defaultStringLength; + + return $this->addColumn('char', $column, compact('length')); + } + + /** + * Create a new string column on the table. + * + * @param string $column + * @param int $length + * @return \Illuminate\Support\Fluent + */ + public function string($column, $length = null) + { + $length = $length ?: Builder::$defaultStringLength; + + return $this->addColumn('string', $column, compact('length')); + } + + /** + * Create a new text column on the table. + * + * @param string $column + * @return \Illuminate\Support\Fluent + */ + public function text($column) + { + return $this->addColumn('text', $column); + } + + /** + * Create a new medium text column on the table. + * + * @param string $column + * @return \Illuminate\Support\Fluent + */ + public function mediumText($column) + { + return $this->addColumn('mediumText', $column); + } + + /** + * Create a new long text column on the table. + * + * @param string $column + * @return \Illuminate\Support\Fluent + */ + public function longText($column) + { + return $this->addColumn('longText', $column); + } + + /** + * Create a new integer (4-byte) column on the table. + * + * @param string $column + * @param bool $autoIncrement + * @param bool $unsigned + * @return \Illuminate\Support\Fluent + */ + public function integer($column, $autoIncrement = false, $unsigned = false) + { + return $this->addColumn('integer', $column, compact('autoIncrement', 'unsigned')); + } + + /** + * Create a new tiny integer (1-byte) column on the table. + * + * @param string $column + * @param bool $autoIncrement + * @param bool $unsigned + * @return \Illuminate\Support\Fluent + */ + public function tinyInteger($column, $autoIncrement = false, $unsigned = false) + { + return $this->addColumn('tinyInteger', $column, compact('autoIncrement', 'unsigned')); + } + + /** + * Create a new small integer (2-byte) column on the table. + * + * @param string $column + * @param bool $autoIncrement + * @param bool $unsigned + * @return \Illuminate\Support\Fluent + */ + public function smallInteger($column, $autoIncrement = false, $unsigned = false) + { + return $this->addColumn('smallInteger', $column, compact('autoIncrement', 'unsigned')); + } + + /** + * Create a new medium integer (3-byte) column on the table. + * + * @param string $column + * @param bool $autoIncrement + * @param bool $unsigned + * @return \Illuminate\Support\Fluent + */ + public function mediumInteger($column, $autoIncrement = false, $unsigned = false) + { + return $this->addColumn('mediumInteger', $column, compact('autoIncrement', 'unsigned')); + } + + /** + * Create a new big integer (8-byte) column on the table. + * + * @param string $column + * @param bool $autoIncrement + * @param bool $unsigned + * @return \Illuminate\Support\Fluent + */ + public function bigInteger($column, $autoIncrement = false, $unsigned = false) + { + return $this->addColumn('bigInteger', $column, compact('autoIncrement', 'unsigned')); + } + + /** + * Create a new unsigned integer (4-byte) column on the table. + * + * @param string $column + * @param bool $autoIncrement + * @return \Illuminate\Support\Fluent + */ + public function unsignedInteger($column, $autoIncrement = false) + { + return $this->integer($column, $autoIncrement, true); + } + + /** + * Create a new unsigned tiny integer (1-byte) column on the table. + * + * @param string $column + * @param bool $autoIncrement + * @return \Illuminate\Support\Fluent + */ + public function unsignedTinyInteger($column, $autoIncrement = false) + { + return $this->tinyInteger($column, $autoIncrement, true); + } + + /** + * Create a new unsigned small integer (2-byte) column on the table. + * + * @param string $column + * @param bool $autoIncrement + * @return \Illuminate\Support\Fluent + */ + public function unsignedSmallInteger($column, $autoIncrement = false) + { + return $this->smallInteger($column, $autoIncrement, true); + } + + /** + * Create a new unsigned medium integer (3-byte) column on the table. + * + * @param string $column + * @param bool $autoIncrement + * @return \Illuminate\Support\Fluent + */ + public function unsignedMediumInteger($column, $autoIncrement = false) + { + return $this->mediumInteger($column, $autoIncrement, true); + } + + /** + * Create a new unsigned big integer (8-byte) column on the table. + * + * @param string $column + * @param bool $autoIncrement + * @return \Illuminate\Support\Fluent + */ + public function unsignedBigInteger($column, $autoIncrement = false) + { + return $this->bigInteger($column, $autoIncrement, true); + } + + /** + * Create a new float column on the table. + * + * @param string $column + * @param int $total + * @param int $places + * @return \Illuminate\Support\Fluent + */ + public function float($column, $total = 8, $places = 2) + { + return $this->addColumn('float', $column, compact('total', 'places')); + } + + /** + * Create a new double column on the table. + * + * @param string $column + * @param int|null $total + * @param int|null $places + * @return \Illuminate\Support\Fluent + */ + public function double($column, $total = null, $places = null) + { + return $this->addColumn('double', $column, compact('total', 'places')); + } + + /** + * Create a new decimal column on the table. + * + * @param string $column + * @param int $total + * @param int $places + * @return \Illuminate\Support\Fluent + */ + public function decimal($column, $total = 8, $places = 2) + { + return $this->addColumn('decimal', $column, compact('total', 'places')); + } + + /** + * Create a new boolean column on the table. + * + * @param string $column + * @return \Illuminate\Support\Fluent + */ + public function boolean($column) + { + return $this->addColumn('boolean', $column); + } + + /** + * Create a new enum column on the table. + * + * @param string $column + * @param array $allowed + * @return \Illuminate\Support\Fluent + */ + public function enum($column, array $allowed) + { + return $this->addColumn('enum', $column, compact('allowed')); + } + + /** + * Create a new json column on the table. + * + * @param string $column + * @return \Illuminate\Support\Fluent + */ + public function json($column) + { + return $this->addColumn('json', $column); + } + + /** + * Create a new jsonb column on the table. + * + * @param string $column + * @return \Illuminate\Support\Fluent + */ + public function jsonb($column) + { + return $this->addColumn('jsonb', $column); + } + + /** + * Create a new date column on the table. + * + * @param string $column + * @return \Illuminate\Support\Fluent + */ + public function date($column) + { + return $this->addColumn('date', $column); + } + + /** + * Create a new date-time column on the table. + * + * @param string $column + * @return \Illuminate\Support\Fluent + */ + public function dateTime($column) + { + return $this->addColumn('dateTime', $column); + } + + /** + * Create a new date-time column (with time zone) on the table. + * + * @param string $column + * @return \Illuminate\Support\Fluent + */ + public function dateTimeTz($column) + { + return $this->addColumn('dateTimeTz', $column); + } + + /** + * Create a new time column on the table. + * + * @param string $column + * @return \Illuminate\Support\Fluent + */ + public function time($column) + { + return $this->addColumn('time', $column); + } + + /** + * Create a new time column (with time zone) on the table. + * + * @param string $column + * @return \Illuminate\Support\Fluent + */ + public function timeTz($column) + { + return $this->addColumn('timeTz', $column); + } + + /** + * Create a new timestamp column on the table. + * + * @param string $column + * @return \Illuminate\Support\Fluent + */ + public function timestamp($column) + { + return $this->addColumn('timestamp', $column); + } + + /** + * Create a new timestamp (with time zone) column on the table. + * + * @param string $column + * @return \Illuminate\Support\Fluent + */ + public function timestampTz($column) + { + return $this->addColumn('timestampTz', $column); + } + + /** + * Add nullable creation and update timestamps to the table. + * + * @return void + */ + public function timestamps() + { + $this->timestamp('created_at')->nullable(); + + $this->timestamp('updated_at')->nullable(); + } + + /** + * Add nullable creation and update timestamps to the table. + * + * Alias for self::timestamps(). + * + * @return void + */ + public function nullableTimestamps() + { + $this->timestamps(); + } + + /** + * Add creation and update timestampTz columns to the table. + * + * @return void + */ + public function timestampsTz() + { + $this->timestampTz('created_at')->nullable(); + + $this->timestampTz('updated_at')->nullable(); + } + + /** + * Add a "deleted at" timestamp for the table. + * + * @return \Illuminate\Support\Fluent + */ + public function softDeletes() + { + return $this->timestamp('deleted_at')->nullable(); + } + + /** + * Add a "deleted at" timestampTz for the table. + * + * @return \Illuminate\Support\Fluent + */ + public function softDeletesTz() + { + return $this->timestampTz('deleted_at')->nullable(); + } + + /** + * Create a new binary column on the table. + * + * @param string $column + * @return \Illuminate\Support\Fluent + */ + public function binary($column) + { + return $this->addColumn('binary', $column); + } + + /** + * Create a new uuid column on the table. + * + * @param string $column + * @return \Illuminate\Support\Fluent + */ + public function uuid($column) + { + return $this->addColumn('uuid', $column); + } + + /** + * Create a new IP address column on the table. + * + * @param string $column + * @return \Illuminate\Support\Fluent + */ + public function ipAddress($column) + { + return $this->addColumn('ipAddress', $column); + } + + /** + * Create a new MAC address column on the table. + * + * @param string $column + * @return \Illuminate\Support\Fluent + */ + public function macAddress($column) + { + return $this->addColumn('macAddress', $column); + } + + /** + * Add the proper columns for a polymorphic table. + * + * @param string $name + * @param string|null $indexName + * @return void + */ + public function morphs($name, $indexName = null) + { + $this->unsignedInteger("{$name}_id"); + + $this->string("{$name}_type"); + + $this->index(["{$name}_id", "{$name}_type"], $indexName); + } + + /** + * Add nullable columns for a polymorphic table. + * + * @param string $name + * @param string|null $indexName + * @return void + */ + public function nullableMorphs($name, $indexName = null) + { + $this->unsignedInteger("{$name}_id")->nullable(); + + $this->string("{$name}_type")->nullable(); + + $this->index(["{$name}_id", "{$name}_type"], $indexName); + } + + /** + * Adds the `remember_token` column to the table. + * + * @return \Illuminate\Support\Fluent + */ + public function rememberToken() + { + return $this->string('remember_token', 100)->nullable(); + } + + /** + * Add a new index command to the blueprint. + * + * @param string $type + * @param string|array $columns + * @param string $index + * @param string|null $algorithm + * @return \Illuminate\Support\Fluent + */ + protected function indexCommand($type, $columns, $index, $algorithm = null) + { + $columns = (array) $columns; + + // If no name was specified for this index, we will create one using a basic + // convention of the table name, followed by the columns, followed by an + // index type, such as primary or index, which makes the index unique. + $index = $index ?: $this->createIndexName($type, $columns); + + return $this->addCommand( + $type, compact('index', 'columns', 'algorithm') + ); + } + + /** + * Create a new drop index command on the blueprint. + * + * @param string $command + * @param string $type + * @param string|array $index + * @return \Illuminate\Support\Fluent + */ + protected function dropIndexCommand($command, $type, $index) + { + $columns = []; + + // If the given "index" is actually an array of columns, the developer means + // to drop an index merely by specifying the columns involved without the + // conventional name, so we will build the index name from the columns. + if (is_array($index)) { + $index = $this->createIndexName($type, $columns = $index); + } + + return $this->indexCommand($command, $columns, $index); + } + + /** + * Create a default index name for the table. + * + * @param string $type + * @param array $columns + * @return string + */ + protected function createIndexName($type, array $columns) + { + $index = strtolower($this->table.'_'.implode('_', $columns).'_'.$type); + + return str_replace(['-', '.'], '_', $index); + } + + /** + * Add a new column to the blueprint. + * + * @param string $type + * @param string $name + * @param array $parameters + * @return \Illuminate\Support\Fluent + */ + public function addColumn($type, $name, array $parameters = []) + { + $this->columns[] = $column = new Fluent( + array_merge(compact('type', 'name'), $parameters) + ); + + return $column; + } + + /** + * Remove a column from the schema blueprint. + * + * @param string $name + * @return $this + */ + public function removeColumn($name) + { + $this->columns = array_values(array_filter($this->columns, function ($c) use ($name) { + return $c['attributes']['name'] != $name; + })); + + return $this; + } + + /** + * Add a new command to the blueprint. + * + * @param string $name + * @param array $parameters + * @return \Illuminate\Support\Fluent + */ + protected function addCommand($name, array $parameters = []) + { + $this->commands[] = $command = $this->createCommand($name, $parameters); + + return $command; + } + + /** + * Create a new Fluent command. + * + * @param string $name + * @param array $parameters + * @return \Illuminate\Support\Fluent + */ + protected function createCommand($name, array $parameters = []) + { + return new Fluent(array_merge(compact('name'), $parameters)); + } + + /** + * Get the table the blueprint describes. + * + * @return string + */ + public function getTable() + { + return $this->table; + } + + /** + * Get the columns on the blueprint. + * + * @return array + */ + public function getColumns() + { + return $this->columns; + } + + /** + * Get the commands on the blueprint. + * + * @return array + */ + public function getCommands() + { + return $this->commands; + } + + /** + * Get the columns on the blueprint that should be added. + * + * @return array + */ + public function getAddedColumns() + { + return array_filter($this->columns, function ($column) { + return ! $column->change; + }); + } + + /** + * Get the columns on the blueprint that should be changed. + * + * @return array + */ + public function getChangedColumns() + { + return array_filter($this->columns, function ($column) { + return (bool) $column->change; + }); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php new file mode 100755 index 0000000..4f2fa38 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php @@ -0,0 +1,291 @@ +connection = $connection; + $this->grammar = $connection->getSchemaGrammar(); + } + + /** + * Set the default string length for migrations. + * + * @param int $length + * @return void + */ + public static function defaultStringLength($length) + { + static::$defaultStringLength = $length; + } + + /** + * Determine if the given table exists. + * + * @param string $table + * @return bool + */ + public function hasTable($table) + { + $table = $this->connection->getTablePrefix().$table; + + return count($this->connection->select( + $this->grammar->compileTableExists(), [$table] + )) > 0; + } + + /** + * Determine if the given table has a given column. + * + * @param string $table + * @param string $column + * @return bool + */ + public function hasColumn($table, $column) + { + return in_array( + strtolower($column), array_map('strtolower', $this->getColumnListing($table)) + ); + } + + /** + * Determine if the given table has given columns. + * + * @param string $table + * @param array $columns + * @return bool + */ + public function hasColumns($table, array $columns) + { + $tableColumns = array_map('strtolower', $this->getColumnListing($table)); + + foreach ($columns as $column) { + if (! in_array(strtolower($column), $tableColumns)) { + return false; + } + } + + return true; + } + + /** + * Get the data type for the given column name. + * + * @param string $table + * @param string $column + * @return string + */ + public function getColumnType($table, $column) + { + $table = $this->connection->getTablePrefix().$table; + + return $this->connection->getDoctrineColumn($table, $column)->getType()->getName(); + } + + /** + * Get the column listing for a given table. + * + * @param string $table + * @return array + */ + public function getColumnListing($table) + { + $table = $this->connection->getTablePrefix().$table; + + $results = $this->connection->select($this->grammar->compileColumnListing($table)); + + return $this->connection->getPostProcessor()->processColumnListing($results); + } + + /** + * Modify a table on the schema. + * + * @param string $table + * @param \Closure $callback + * @return void + */ + public function table($table, Closure $callback) + { + $this->build($this->createBlueprint($table, $callback)); + } + + /** + * Create a new table on the schema. + * + * @param string $table + * @param \Closure $callback + * @return void + */ + public function create($table, Closure $callback) + { + $this->build(tap($this->createBlueprint($table), function ($blueprint) use ($callback) { + $blueprint->create(); + + $callback($blueprint); + })); + } + + /** + * Drop a table from the schema. + * + * @param string $table + * @return void + */ + public function drop($table) + { + $this->build(tap($this->createBlueprint($table), function ($blueprint) { + $blueprint->drop(); + })); + } + + /** + * Drop a table from the schema if it exists. + * + * @param string $table + * @return void + */ + public function dropIfExists($table) + { + $this->build(tap($this->createBlueprint($table), function ($blueprint) { + $blueprint->dropIfExists(); + })); + } + + /** + * Rename a table on the schema. + * + * @param string $from + * @param string $to + * @return void + */ + public function rename($from, $to) + { + $this->build(tap($this->createBlueprint($from), function ($blueprint) use ($to) { + $blueprint->rename($to); + })); + } + + /** + * Enable foreign key constraints. + * + * @return bool + */ + public function enableForeignKeyConstraints() + { + return $this->connection->statement( + $this->grammar->compileEnableForeignKeyConstraints() + ); + } + + /** + * Disable foreign key constraints. + * + * @return bool + */ + public function disableForeignKeyConstraints() + { + return $this->connection->statement( + $this->grammar->compileDisableForeignKeyConstraints() + ); + } + + /** + * Execute the blueprint to build / modify the table. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @return void + */ + protected function build(Blueprint $blueprint) + { + $blueprint->build($this->connection, $this->grammar); + } + + /** + * Create a new command set with a Closure. + * + * @param string $table + * @param \Closure|null $callback + * @return \Illuminate\Database\Schema\Blueprint + */ + protected function createBlueprint($table, Closure $callback = null) + { + if (isset($this->resolver)) { + return call_user_func($this->resolver, $table, $callback); + } + + return new Blueprint($table, $callback); + } + + /** + * Get the database connection instance. + * + * @return \Illuminate\Database\Connection + */ + public function getConnection() + { + return $this->connection; + } + + /** + * Set the database connection instance. + * + * @param \Illuminate\Database\Connection $connection + * @return $this + */ + public function setConnection(Connection $connection) + { + $this->connection = $connection; + + return $this; + } + + /** + * Set the Schema Blueprint resolver callback. + * + * @param \Closure $resolver + * @return void + */ + public function blueprintResolver(Closure $resolver) + { + $this->resolver = $resolver; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/ChangeColumn.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/ChangeColumn.php new file mode 100644 index 0000000..4751ecb --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/ChangeColumn.php @@ -0,0 +1,205 @@ +isDoctrineAvailable()) { + throw new RuntimeException(sprintf( + 'Changing columns for table "%s" requires Doctrine DBAL; install "doctrine/dbal".', + $blueprint->getTable() + )); + } + + $tableDiff = static::getChangedDiff( + $grammar, $blueprint, $schema = $connection->getDoctrineSchemaManager() + ); + + if ($tableDiff !== false) { + return (array) $schema->getDatabasePlatform()->getAlterTableSQL($tableDiff); + } + + return []; + } + + /** + * Get the Doctrine table difference for the given changes. + * + * @param \Illuminate\Database\Schema\Grammars\Grammar $grammar + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Doctrine\DBAL\Schema\AbstractSchemaManager $schema + * @return \Doctrine\DBAL\Schema\TableDiff|bool + */ + protected static function getChangedDiff($grammar, Blueprint $blueprint, SchemaManager $schema) + { + $current = $schema->listTableDetails($grammar->getTablePrefix().$blueprint->getTable()); + + return (new Comparator)->diffTable( + $current, static::getTableWithColumnChanges($blueprint, $current) + ); + } + + /** + * Get a copy of the given Doctrine table after making the column changes. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Doctrine\DBAL\Schema\Table $table + * @return \Doctrine\DBAL\Schema\Table + */ + protected static function getTableWithColumnChanges(Blueprint $blueprint, Table $table) + { + $table = clone $table; + + foreach ($blueprint->getChangedColumns() as $fluent) { + $column = static::getDoctrineColumn($table, $fluent); + + // Here we will spin through each fluent column definition and map it to the proper + // Doctrine column definitions - which is necessary because Laravel and Doctrine + // use some different terminology for various column attributes on the tables. + foreach ($fluent->getAttributes() as $key => $value) { + if (! is_null($option = static::mapFluentOptionToDoctrine($key))) { + if (method_exists($column, $method = 'set'.ucfirst($option))) { + $column->{$method}(static::mapFluentValueToDoctrine($option, $value)); + } + } + } + } + + return $table; + } + + /** + * Get the Doctrine column instance for a column change. + * + * @param \Doctrine\DBAL\Schema\Table $table + * @param \Illuminate\Support\Fluent $fluent + * @return \Doctrine\DBAL\Schema\Column + */ + protected static function getDoctrineColumn(Table $table, Fluent $fluent) + { + return $table->changeColumn( + $fluent['name'], static::getDoctrineColumnChangeOptions($fluent) + )->getColumn($fluent['name']); + } + + /** + * Get the Doctrine column change options. + * + * @param \Illuminate\Support\Fluent $fluent + * @return array + */ + protected static function getDoctrineColumnChangeOptions(Fluent $fluent) + { + $options = ['type' => static::getDoctrineColumnType($fluent['type'])]; + + if (in_array($fluent['type'], ['text', 'mediumText', 'longText'])) { + $options['length'] = static::calculateDoctrineTextLength($fluent['type']); + } + + return $options; + } + + /** + * Get the doctrine column type. + * + * @param string $type + * @return \Doctrine\DBAL\Types\Type + */ + protected static function getDoctrineColumnType($type) + { + $type = strtolower($type); + + switch ($type) { + case 'biginteger': + $type = 'bigint'; + break; + case 'smallinteger': + $type = 'smallint'; + break; + case 'mediumtext': + case 'longtext': + $type = 'text'; + break; + case 'binary': + $type = 'blob'; + break; + } + + return Type::getType($type); + } + + /** + * Calculate the proper column length to force the Doctrine text type. + * + * @param string $type + * @return int + */ + protected static function calculateDoctrineTextLength($type) + { + switch ($type) { + case 'mediumText': + return 65535 + 1; + case 'longText': + return 16777215 + 1; + default: + return 255 + 1; + } + } + + /** + * Get the matching Doctrine option for a given Fluent attribute name. + * + * @param string $attribute + * @return string|null + */ + protected static function mapFluentOptionToDoctrine($attribute) + { + switch ($attribute) { + case 'type': + case 'name': + return; + case 'nullable': + return 'notnull'; + case 'total': + return 'precision'; + case 'places': + return 'scale'; + default: + return $attribute; + } + } + + /** + * Get the matching Doctrine value for a given Fluent attribute. + * + * @param string $option + * @param mixed $value + * @return mixed + */ + protected static function mapFluentValueToDoctrine($option, $value) + { + return $option == 'notnull' ? ! $value : $value; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/Grammar.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/Grammar.php new file mode 100755 index 0000000..6e880ae --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/Grammar.php @@ -0,0 +1,255 @@ +wrapTable($blueprint), + $this->wrap($command->index) + ); + + // Once we have the initial portion of the SQL statement we will add on the + // key name, table name, and referenced columns. These will complete the + // main portion of the SQL statement and this SQL will almost be done. + $sql .= sprintf('foreign key (%s) references %s (%s)', + $this->columnize($command->columns), + $this->wrapTable($command->on), + $this->columnize((array) $command->references) + ); + + // Once we have the basic foreign key creation statement constructed we can + // build out the syntax for what should happen on an update or delete of + // the affected columns, which will get something like "cascade", etc. + if (! is_null($command->onDelete)) { + $sql .= " on delete {$command->onDelete}"; + } + + if (! is_null($command->onUpdate)) { + $sql .= " on update {$command->onUpdate}"; + } + + return $sql; + } + + /** + * Compile the blueprint's column definitions. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @return array + */ + protected function getColumns(Blueprint $blueprint) + { + $columns = []; + + foreach ($blueprint->getAddedColumns() as $column) { + // Each of the column types have their own compiler functions which are tasked + // with turning the column definition into its SQL format for this platform + // used by the connection. The column's modifiers are compiled and added. + $sql = $this->wrap($column).' '.$this->getType($column); + + $columns[] = $this->addModifiers($sql, $blueprint, $column); + } + + return $columns; + } + + /** + * Get the SQL for the column data type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function getType(Fluent $column) + { + return $this->{'type'.ucfirst($column->type)}($column); + } + + /** + * Add the column modifiers to the definition. + * + * @param string $sql + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function addModifiers($sql, Blueprint $blueprint, Fluent $column) + { + foreach ($this->modifiers as $modifier) { + if (method_exists($this, $method = "modify{$modifier}")) { + $sql .= $this->{$method}($blueprint, $column); + } + } + + return $sql; + } + + /** + * Get the primary key command if it exists on the blueprint. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param string $name + * @return \Illuminate\Support\Fluent|null + */ + protected function getCommandByName(Blueprint $blueprint, $name) + { + $commands = $this->getCommandsByName($blueprint, $name); + + if (count($commands) > 0) { + return reset($commands); + } + } + + /** + * Get all of the commands with a given name. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param string $name + * @return array + */ + protected function getCommandsByName(Blueprint $blueprint, $name) + { + return array_filter($blueprint->getCommands(), function ($value) use ($name) { + return $value->name == $name; + }); + } + + /** + * Add a prefix to an array of values. + * + * @param string $prefix + * @param array $values + * @return array + */ + public function prefixArray($prefix, array $values) + { + return array_map(function ($value) use ($prefix) { + return $prefix.' '.$value; + }, $values); + } + + /** + * Wrap a table in keyword identifiers. + * + * @param mixed $table + * @return string + */ + public function wrapTable($table) + { + return parent::wrapTable( + $table instanceof Blueprint ? $table->getTable() : $table + ); + } + + /** + * Wrap a value in keyword identifiers. + * + * @param \Illuminate\Database\Query\Expression|string $value + * @param bool $prefixAlias + * @return string + */ + public function wrap($value, $prefixAlias = false) + { + return parent::wrap( + $value instanceof Fluent ? $value->name : $value, $prefixAlias + ); + } + + /** + * Format a value so that it can be used in "default" clauses. + * + * @param mixed $value + * @return string + */ + protected function getDefaultValue($value) + { + if ($value instanceof Expression) { + return $value; + } + + return is_bool($value) + ? "'".(int) $value."'" + : "'".strval($value)."'"; + } + + /** + * Create an empty Doctrine DBAL TableDiff from the Blueprint. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Doctrine\DBAL\Schema\AbstractSchemaManager $schema + * @return \Doctrine\DBAL\Schema\TableDiff + */ + public function getDoctrineTableDiff(Blueprint $blueprint, SchemaManager $schema) + { + $table = $this->getTablePrefix().$blueprint->getTable(); + + return tap(new TableDiff($table), function ($tableDiff) use ($schema, $table) { + $tableDiff->fromTable = $schema->listTableDetails($table); + }); + } + + /** + * Check if this Grammar supports schema changes wrapped in a transaction. + * + * @return bool + */ + public function supportsSchemaTransactions() + { + return $this->transactions; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php new file mode 100755 index 0000000..eba8b03 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php @@ -0,0 +1,829 @@ +compileCreateTable( + $blueprint, $command, $connection + ); + + // Once we have the primary SQL, we can add the encoding option to the SQL for + // the table. Then, we can check if a storage engine has been supplied for + // the table. If so, we will add the engine declaration to the SQL query. + $sql = $this->compileCreateEncoding( + $sql, $connection, $blueprint + ); + + // Finally, we will append the engine configuration onto this SQL statement as + // the final thing we do before returning this finished SQL. Once this gets + // added the query will be ready to execute against the real connections. + return $this->compileCreateEngine( + $sql, $connection, $blueprint + ); + } + + /** + * Create the main create table clause. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command + * @param \Illuminate\Database\Connection $connection + * @return string + */ + protected function compileCreateTable($blueprint, $command, $connection) + { + return sprintf('%s table %s (%s)', + $blueprint->temporary ? 'create temporary' : 'create', + $this->wrapTable($blueprint), + implode(', ', $this->getColumns($blueprint)) + ); + } + + /** + * Append the character set specifications to a command. + * + * @param string $sql + * @param \Illuminate\Database\Connection $connection + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @return string + */ + protected function compileCreateEncoding($sql, Connection $connection, Blueprint $blueprint) + { + // First we will set the character set if one has been set on either the create + // blueprint itself or on the root configuration for the connection that the + // table is being created on. We will add these to the create table query. + if (isset($blueprint->charset)) { + $sql .= ' default character set '.$blueprint->charset; + } elseif (! is_null($charset = $connection->getConfig('charset'))) { + $sql .= ' default character set '.$charset; + } + + // Next we will add the collation to the create table statement if one has been + // added to either this create table blueprint or the configuration for this + // connection that the query is targeting. We'll add it to this SQL query. + if (isset($blueprint->collation)) { + $sql .= ' collate '.$blueprint->collation; + } elseif (! is_null($collation = $connection->getConfig('collation'))) { + $sql .= ' collate '.$collation; + } + + return $sql; + } + + /** + * Append the engine specifications to a command. + * + * @param string $sql + * @param \Illuminate\Database\Connection $connection + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @return string + */ + protected function compileCreateEngine($sql, Connection $connection, Blueprint $blueprint) + { + if (isset($blueprint->engine)) { + return $sql.' engine = '.$blueprint->engine; + } elseif (! is_null($engine = $connection->getConfig('engine'))) { + return $sql.' engine = '.$engine; + } + + return $sql; + } + + /** + * Compile an add column command. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command + * @return string + */ + public function compileAdd(Blueprint $blueprint, Fluent $command) + { + $columns = $this->prefixArray('add', $this->getColumns($blueprint)); + + return 'alter table '.$this->wrapTable($blueprint).' '.implode(', ', $columns); + } + + /** + * Compile a primary key command. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command + * @return string + */ + public function compilePrimary(Blueprint $blueprint, Fluent $command) + { + $command->name(null); + + return $this->compileKey($blueprint, $command, 'primary key'); + } + + /** + * Compile a unique key command. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command + * @return string + */ + public function compileUnique(Blueprint $blueprint, Fluent $command) + { + return $this->compileKey($blueprint, $command, 'unique'); + } + + /** + * Compile a plain index key command. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command + * @return string + */ + public function compileIndex(Blueprint $blueprint, Fluent $command) + { + return $this->compileKey($blueprint, $command, 'index'); + } + + /** + * Compile an index creation command. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command + * @param string $type + * @return string + */ + protected function compileKey(Blueprint $blueprint, Fluent $command, $type) + { + return sprintf('alter table %s add %s %s%s(%s)', + $this->wrapTable($blueprint), + $type, + $this->wrap($command->index), + $command->algorithm ? ' using '.$command->algorithm : '', + $this->columnize($command->columns) + ); + } + + /** + * Compile a drop table command. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command + * @return string + */ + public function compileDrop(Blueprint $blueprint, Fluent $command) + { + return 'drop table '.$this->wrapTable($blueprint); + } + + /** + * Compile a drop table (if exists) command. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command + * @return string + */ + public function compileDropIfExists(Blueprint $blueprint, Fluent $command) + { + return 'drop table if exists '.$this->wrapTable($blueprint); + } + + /** + * Compile a drop column command. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command + * @return string + */ + public function compileDropColumn(Blueprint $blueprint, Fluent $command) + { + $columns = $this->prefixArray('drop', $this->wrapArray($command->columns)); + + return 'alter table '.$this->wrapTable($blueprint).' '.implode(', ', $columns); + } + + /** + * Compile a drop primary key command. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command + * @return string + */ + public function compileDropPrimary(Blueprint $blueprint, Fluent $command) + { + return 'alter table '.$this->wrapTable($blueprint).' drop primary key'; + } + + /** + * Compile a drop unique key command. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command + * @return string + */ + public function compileDropUnique(Blueprint $blueprint, Fluent $command) + { + $index = $this->wrap($command->index); + + return "alter table {$this->wrapTable($blueprint)} drop index {$index}"; + } + + /** + * Compile a drop index command. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command + * @return string + */ + public function compileDropIndex(Blueprint $blueprint, Fluent $command) + { + $index = $this->wrap($command->index); + + return "alter table {$this->wrapTable($blueprint)} drop index {$index}"; + } + + /** + * Compile a drop foreign key command. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command + * @return string + */ + public function compileDropForeign(Blueprint $blueprint, Fluent $command) + { + $index = $this->wrap($command->index); + + return "alter table {$this->wrapTable($blueprint)} drop foreign key {$index}"; + } + + /** + * Compile a rename table command. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command + * @return string + */ + public function compileRename(Blueprint $blueprint, Fluent $command) + { + $from = $this->wrapTable($blueprint); + + return "rename table {$from} to ".$this->wrapTable($command->to); + } + + /** + * Compile the command to enable foreign key constraints. + * + * @return string + */ + public function compileEnableForeignKeyConstraints() + { + return 'SET FOREIGN_KEY_CHECKS=1;'; + } + + /** + * Compile the command to disable foreign key constraints. + * + * @return string + */ + public function compileDisableForeignKeyConstraints() + { + return 'SET FOREIGN_KEY_CHECKS=0;'; + } + + /** + * Create the column definition for a char type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeChar(Fluent $column) + { + return "char({$column->length})"; + } + + /** + * Create the column definition for a string type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeString(Fluent $column) + { + return "varchar({$column->length})"; + } + + /** + * Create the column definition for a text type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeText(Fluent $column) + { + return 'text'; + } + + /** + * Create the column definition for a medium text type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeMediumText(Fluent $column) + { + return 'mediumtext'; + } + + /** + * Create the column definition for a long text type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeLongText(Fluent $column) + { + return 'longtext'; + } + + /** + * Create the column definition for a big integer type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeBigInteger(Fluent $column) + { + return 'bigint'; + } + + /** + * Create the column definition for an integer type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeInteger(Fluent $column) + { + return 'int'; + } + + /** + * Create the column definition for a medium integer type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeMediumInteger(Fluent $column) + { + return 'mediumint'; + } + + /** + * Create the column definition for a tiny integer type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeTinyInteger(Fluent $column) + { + return 'tinyint'; + } + + /** + * Create the column definition for a small integer type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeSmallInteger(Fluent $column) + { + return 'smallint'; + } + + /** + * Create the column definition for a float type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeFloat(Fluent $column) + { + return $this->typeDouble($column); + } + + /** + * Create the column definition for a double type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeDouble(Fluent $column) + { + if ($column->total && $column->places) { + return "double({$column->total}, {$column->places})"; + } + + return 'double'; + } + + /** + * Create the column definition for a decimal type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeDecimal(Fluent $column) + { + return "decimal({$column->total}, {$column->places})"; + } + + /** + * Create the column definition for a boolean type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeBoolean(Fluent $column) + { + return 'tinyint(1)'; + } + + /** + * Create the column definition for an enum type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeEnum(Fluent $column) + { + return "enum('".implode("', '", $column->allowed)."')"; + } + + /** + * Create the column definition for a json type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeJson(Fluent $column) + { + return 'json'; + } + + /** + * Create the column definition for a jsonb type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeJsonb(Fluent $column) + { + return 'json'; + } + + /** + * Create the column definition for a date type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeDate(Fluent $column) + { + return 'date'; + } + + /** + * Create the column definition for a date-time type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeDateTime(Fluent $column) + { + return 'datetime'; + } + + /** + * Create the column definition for a date-time type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeDateTimeTz(Fluent $column) + { + return 'datetime'; + } + + /** + * Create the column definition for a time type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeTime(Fluent $column) + { + return 'time'; + } + + /** + * Create the column definition for a time type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeTimeTz(Fluent $column) + { + return 'time'; + } + + /** + * Create the column definition for a timestamp type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeTimestamp(Fluent $column) + { + if ($column->useCurrent) { + return 'timestamp default CURRENT_TIMESTAMP'; + } + + return 'timestamp'; + } + + /** + * Create the column definition for a timestamp type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeTimestampTz(Fluent $column) + { + if ($column->useCurrent) { + return 'timestamp default CURRENT_TIMESTAMP'; + } + + return 'timestamp'; + } + + /** + * Create the column definition for a binary type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeBinary(Fluent $column) + { + return 'blob'; + } + + /** + * Create the column definition for a uuid type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeUuid(Fluent $column) + { + return 'char(36)'; + } + + /** + * Create the column definition for an IP address type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeIpAddress(Fluent $column) + { + return 'varchar(45)'; + } + + /** + * Create the column definition for a MAC address type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeMacAddress(Fluent $column) + { + return 'varchar(17)'; + } + + /** + * Get the SQL for a generated virtual column modifier. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $column + * @return string|null + */ + protected function modifyVirtualAs(Blueprint $blueprint, Fluent $column) + { + if (! is_null($column->virtualAs)) { + return " as ({$column->virtualAs})"; + } + } + + /** + * Get the SQL for a generated stored column modifier. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $column + * @return string|null + */ + protected function modifyStoredAs(Blueprint $blueprint, Fluent $column) + { + if (! is_null($column->storedAs)) { + return " as ({$column->storedAs}) stored"; + } + } + + /** + * Get the SQL for an unsigned column modifier. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $column + * @return string|null + */ + protected function modifyUnsigned(Blueprint $blueprint, Fluent $column) + { + if ($column->unsigned) { + return ' unsigned'; + } + } + + /** + * Get the SQL for a character set column modifier. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $column + * @return string|null + */ + protected function modifyCharset(Blueprint $blueprint, Fluent $column) + { + if (! is_null($column->charset)) { + return ' character set '.$column->charset; + } + } + + /** + * Get the SQL for a collation column modifier. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $column + * @return string|null + */ + protected function modifyCollate(Blueprint $blueprint, Fluent $column) + { + if (! is_null($column->collation)) { + return ' collate '.$column->collation; + } + } + + /** + * Get the SQL for a nullable column modifier. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $column + * @return string|null + */ + protected function modifyNullable(Blueprint $blueprint, Fluent $column) + { + if (is_null($column->virtualAs) && is_null($column->storedAs)) { + return $column->nullable ? ' null' : ' not null'; + } + } + + /** + * Get the SQL for a default column modifier. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $column + * @return string|null + */ + protected function modifyDefault(Blueprint $blueprint, Fluent $column) + { + if (! is_null($column->default)) { + return ' default '.$this->getDefaultValue($column->default); + } + } + + /** + * Get the SQL for an auto-increment column modifier. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $column + * @return string|null + */ + protected function modifyIncrement(Blueprint $blueprint, Fluent $column) + { + if (in_array($column->type, $this->serials) && $column->autoIncrement) { + return ' auto_increment primary key'; + } + } + + /** + * Get the SQL for a "first" column modifier. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $column + * @return string|null + */ + protected function modifyFirst(Blueprint $blueprint, Fluent $column) + { + if (! is_null($column->first)) { + return ' first'; + } + } + + /** + * Get the SQL for an "after" column modifier. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $column + * @return string|null + */ + protected function modifyAfter(Blueprint $blueprint, Fluent $column) + { + if (! is_null($column->after)) { + return ' after '.$this->wrap($column->after); + } + } + + /** + * Get the SQL for a "comment" column modifier. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $column + * @return string|null + */ + protected function modifyComment(Blueprint $blueprint, Fluent $column) + { + if (! is_null($column->comment)) { + return " comment '".$column->comment."'"; + } + } + + /** + * Wrap a single string in keyword identifiers. + * + * @param string $value + * @return string + */ + protected function wrapValue($value) + { + if ($value !== '*') { + return '`'.str_replace('`', '``', $value).'`'; + } + + return $value; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php new file mode 100755 index 0000000..882e2dd --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php @@ -0,0 +1,626 @@ +temporary ? 'create temporary' : 'create', + $this->wrapTable($blueprint), + implode(', ', $this->getColumns($blueprint)) + ); + } + + /** + * Compile a column addition command. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command + * @return string + */ + public function compileAdd(Blueprint $blueprint, Fluent $command) + { + return sprintf('alter table %s %s', + $this->wrapTable($blueprint), + implode(', ', $this->prefixArray('add column', $this->getColumns($blueprint))) + ); + } + + /** + * Compile a primary key command. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command + * @return string + */ + public function compilePrimary(Blueprint $blueprint, Fluent $command) + { + $columns = $this->columnize($command->columns); + + return 'alter table '.$this->wrapTable($blueprint)." add primary key ({$columns})"; + } + + /** + * Compile a unique key command. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command + * @return string + */ + public function compileUnique(Blueprint $blueprint, Fluent $command) + { + return sprintf('alter table %s add constraint %s unique (%s)', + $this->wrapTable($blueprint), + $this->wrap($command->index), + $this->columnize($command->columns) + ); + } + + /** + * Compile a plain index key command. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command + * @return string + */ + public function compileIndex(Blueprint $blueprint, Fluent $command) + { + return sprintf('create index %s on %s%s (%s)', + $this->wrap($command->index), + $this->wrapTable($blueprint), + $command->algorithm ? ' using '.$command->algorithm : '', + $this->columnize($command->columns) + ); + } + + /** + * Compile a drop table command. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command + * @return string + */ + public function compileDrop(Blueprint $blueprint, Fluent $command) + { + return 'drop table '.$this->wrapTable($blueprint); + } + + /** + * Compile a drop table (if exists) command. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command + * @return string + */ + public function compileDropIfExists(Blueprint $blueprint, Fluent $command) + { + return 'drop table if exists '.$this->wrapTable($blueprint); + } + + /** + * Compile a drop column command. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command + * @return string + */ + public function compileDropColumn(Blueprint $blueprint, Fluent $command) + { + $columns = $this->prefixArray('drop column', $this->wrapArray($command->columns)); + + return 'alter table '.$this->wrapTable($blueprint).' '.implode(', ', $columns); + } + + /** + * Compile a drop primary key command. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command + * @return string + */ + public function compileDropPrimary(Blueprint $blueprint, Fluent $command) + { + $index = $this->wrap("{$blueprint->getTable()}_pkey"); + + return 'alter table '.$this->wrapTable($blueprint)." drop constraint {$index}"; + } + + /** + * Compile a drop unique key command. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command + * @return string + */ + public function compileDropUnique(Blueprint $blueprint, Fluent $command) + { + $index = $this->wrap($command->index); + + return "alter table {$this->wrapTable($blueprint)} drop constraint {$index}"; + } + + /** + * Compile a drop index command. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command + * @return string + */ + public function compileDropIndex(Blueprint $blueprint, Fluent $command) + { + return "drop index {$this->wrap($command->index)}"; + } + + /** + * Compile a drop foreign key command. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command + * @return string + */ + public function compileDropForeign(Blueprint $blueprint, Fluent $command) + { + $index = $this->wrap($command->index); + + return "alter table {$this->wrapTable($blueprint)} drop constraint {$index}"; + } + + /** + * Compile a rename table command. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command + * @return string + */ + public function compileRename(Blueprint $blueprint, Fluent $command) + { + $from = $this->wrapTable($blueprint); + + return "alter table {$from} rename to ".$this->wrapTable($command->to); + } + + /** + * Compile the command to enable foreign key constraints. + * + * @return string + */ + public function compileEnableForeignKeyConstraints() + { + return 'SET CONSTRAINTS ALL IMMEDIATE;'; + } + + /** + * Compile the command to disable foreign key constraints. + * + * @return string + */ + public function compileDisableForeignKeyConstraints() + { + return 'SET CONSTRAINTS ALL DEFERRED;'; + } + + /** + * Create the column definition for a char type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeChar(Fluent $column) + { + return "char({$column->length})"; + } + + /** + * Create the column definition for a string type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeString(Fluent $column) + { + return "varchar({$column->length})"; + } + + /** + * Create the column definition for a text type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeText(Fluent $column) + { + return 'text'; + } + + /** + * Create the column definition for a medium text type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeMediumText(Fluent $column) + { + return 'text'; + } + + /** + * Create the column definition for a long text type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeLongText(Fluent $column) + { + return 'text'; + } + + /** + * Create the column definition for an integer type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeInteger(Fluent $column) + { + return $column->autoIncrement ? 'serial' : 'integer'; + } + + /** + * Create the column definition for a big integer type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeBigInteger(Fluent $column) + { + return $column->autoIncrement ? 'bigserial' : 'bigint'; + } + + /** + * Create the column definition for a medium integer type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeMediumInteger(Fluent $column) + { + return $column->autoIncrement ? 'serial' : 'integer'; + } + + /** + * Create the column definition for a tiny integer type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeTinyInteger(Fluent $column) + { + return $column->autoIncrement ? 'smallserial' : 'smallint'; + } + + /** + * Create the column definition for a small integer type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeSmallInteger(Fluent $column) + { + return $column->autoIncrement ? 'smallserial' : 'smallint'; + } + + /** + * Create the column definition for a float type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeFloat(Fluent $column) + { + return $this->typeDouble($column); + } + + /** + * Create the column definition for a double type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeDouble(Fluent $column) + { + return 'double precision'; + } + + /** + * Create the column definition for a real type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeReal(Fluent $column) + { + return 'real'; + } + + /** + * Create the column definition for a decimal type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeDecimal(Fluent $column) + { + return "decimal({$column->total}, {$column->places})"; + } + + /** + * Create the column definition for a boolean type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeBoolean(Fluent $column) + { + return 'boolean'; + } + + /** + * Create the column definition for an enum type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeEnum(Fluent $column) + { + $allowed = array_map(function ($a) { + return "'{$a}'"; + }, $column->allowed); + + return "varchar(255) check (\"{$column->name}\" in (".implode(', ', $allowed).'))'; + } + + /** + * Create the column definition for a json type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeJson(Fluent $column) + { + return 'json'; + } + + /** + * Create the column definition for a jsonb type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeJsonb(Fluent $column) + { + return 'jsonb'; + } + + /** + * Create the column definition for a date type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeDate(Fluent $column) + { + return 'date'; + } + + /** + * Create the column definition for a date-time type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeDateTime(Fluent $column) + { + return 'timestamp(0) without time zone'; + } + + /** + * Create the column definition for a date-time type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeDateTimeTz(Fluent $column) + { + return 'timestamp(0) with time zone'; + } + + /** + * Create the column definition for a time type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeTime(Fluent $column) + { + return 'time(0) without time zone'; + } + + /** + * Create the column definition for a time type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeTimeTz(Fluent $column) + { + return 'time(0) with time zone'; + } + + /** + * Create the column definition for a timestamp type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeTimestamp(Fluent $column) + { + if ($column->useCurrent) { + return 'timestamp(0) without time zone default CURRENT_TIMESTAMP(0)'; + } + + return 'timestamp(0) without time zone'; + } + + /** + * Create the column definition for a timestamp type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeTimestampTz(Fluent $column) + { + if ($column->useCurrent) { + return 'timestamp(0) with time zone default CURRENT_TIMESTAMP(0)'; + } + + return 'timestamp(0) with time zone'; + } + + /** + * Create the column definition for a binary type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeBinary(Fluent $column) + { + return 'bytea'; + } + + /** + * Create the column definition for a uuid type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeUuid(Fluent $column) + { + return 'uuid'; + } + + /** + * Create the column definition for an IP address type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeIpAddress(Fluent $column) + { + return 'inet'; + } + + /** + * Create the column definition for a MAC address type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeMacAddress(Fluent $column) + { + return 'macaddr'; + } + + /** + * Get the SQL for a nullable column modifier. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $column + * @return string|null + */ + protected function modifyNullable(Blueprint $blueprint, Fluent $column) + { + return $column->nullable ? ' null' : ' not null'; + } + + /** + * Get the SQL for a default column modifier. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $column + * @return string|null + */ + protected function modifyDefault(Blueprint $blueprint, Fluent $column) + { + if (! is_null($column->default)) { + return ' default '.$this->getDefaultValue($column->default); + } + } + + /** + * Get the SQL for an auto-increment column modifier. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $column + * @return string|null + */ + protected function modifyIncrement(Blueprint $blueprint, Fluent $column) + { + if (in_array($column->type, $this->serials) && $column->autoIncrement) { + return ' primary key'; + } + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/RenameColumn.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/RenameColumn.php new file mode 100644 index 0000000..a07c4fe --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/RenameColumn.php @@ -0,0 +1,69 @@ +getDoctrineColumn( + $grammar->getTablePrefix().$blueprint->getTable(), $command->from + ); + + $schema = $connection->getDoctrineSchemaManager(); + + return (array) $schema->getDatabasePlatform()->getAlterTableSQL(static::getRenamedDiff( + $grammar, $blueprint, $command, $column, $schema + )); + } + + /** + * Get a new column instance with the new column name. + * + * @param \Illuminate\Database\Schema\Grammars\Grammar $grammar + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command + * @param \Doctrine\DBAL\Schema\Column $column + * @param \Doctrine\DBAL\Schema\AbstractSchemaManager $schema + * @return \Doctrine\DBAL\Schema\TableDiff + */ + protected static function getRenamedDiff(Grammar $grammar, Blueprint $blueprint, Fluent $command, Column $column, SchemaManager $schema) + { + return static::setRenamedColumns( + $grammar->getDoctrineTableDiff($blueprint, $schema), $command, $column + ); + } + + /** + * Set the renamed columns on the table diff. + * + * @param \Doctrine\DBAL\Schema\TableDiff $tableDiff + * @param \Illuminate\Support\Fluent $command + * @param \Doctrine\DBAL\Schema\Column $column + * @return \Doctrine\DBAL\Schema\TableDiff + */ + protected static function setRenamedColumns(TableDiff $tableDiff, Fluent $command, Column $column) + { + $tableDiff->renamedColumns = [ + $command->from => new Column($command->to, $column->getType(), $column->toArray()), + ]; + + return $tableDiff; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/SQLiteGrammar.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/SQLiteGrammar.php new file mode 100755 index 0000000..d96bfd6 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/SQLiteGrammar.php @@ -0,0 +1,653 @@ +wrapTable(str_replace('.', '__', $table)).')'; + } + + /** + * Compile a create table command. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command + * @return string + */ + public function compileCreate(Blueprint $blueprint, Fluent $command) + { + return sprintf('%s table %s (%s%s%s)', + $blueprint->temporary ? 'create temporary' : 'create', + $this->wrapTable($blueprint), + implode(', ', $this->getColumns($blueprint)), + (string) $this->addForeignKeys($blueprint), + (string) $this->addPrimaryKeys($blueprint) + ); + } + + /** + * Get the foreign key syntax for a table creation statement. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @return string|null + */ + protected function addForeignKeys(Blueprint $blueprint) + { + $foreigns = $this->getCommandsByName($blueprint, 'foreign'); + + return collect($foreigns)->reduce(function ($sql, $foreign) { + // Once we have all the foreign key commands for the table creation statement + // we'll loop through each of them and add them to the create table SQL we + // are building, since SQLite needs foreign keys on the tables creation. + $sql .= $this->getForeignKey($foreign); + + if (! is_null($foreign->onDelete)) { + $sql .= " on delete {$foreign->onDelete}"; + } + + // If this foreign key specifies the action to be taken on update we will add + // that to the statement here. We'll append it to this SQL and then return + // the SQL so we can keep adding any other foreign consraints onto this. + if (! is_null($foreign->onUpdate)) { + $sql .= " on update {$foreign->onUpdate}"; + } + + return $sql; + }, ''); + } + + /** + * Get the SQL for the foreign key. + * + * @param \Illuminate\Support\Fluent $foreign + * @return string + */ + protected function getForeignKey($foreign) + { + // We need to columnize the columns that the foreign key is being defined for + // so that it is a properly formatted list. Once we have done this, we can + // return the foreign key SQL declaration to the calling method for use. + return sprintf(', foreign key(%s) references %s(%s)', + $this->columnize($foreign->columns), + $this->wrapTable($foreign->on), + $this->columnize((array) $foreign->references) + ); + } + + /** + * Get the primary key syntax for a table creation statement. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @return string|null + */ + protected function addPrimaryKeys(Blueprint $blueprint) + { + if (! is_null($primary = $this->getCommandByName($blueprint, 'primary'))) { + return ", primary key ({$this->columnize($primary->columns)})"; + } + } + + /** + * Compile alter table commands for adding columns. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command + * @return array + */ + public function compileAdd(Blueprint $blueprint, Fluent $command) + { + $columns = $this->prefixArray('add column', $this->getColumns($blueprint)); + + return collect($columns)->map(function ($column) use ($blueprint) { + return 'alter table '.$this->wrapTable($blueprint).' '.$column; + })->all(); + } + + /** + * Compile a unique key command. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command + * @return string + */ + public function compileUnique(Blueprint $blueprint, Fluent $command) + { + return sprintf('create unique index %s on %s (%s)', + $this->wrap($command->index), + $this->wrapTable($blueprint), + $this->columnize($command->columns) + ); + } + + /** + * Compile a plain index key command. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command + * @return string + */ + public function compileIndex(Blueprint $blueprint, Fluent $command) + { + return sprintf('create index %s on %s (%s)', + $this->wrap($command->index), + $this->wrapTable($blueprint), + $this->columnize($command->columns) + ); + } + + /** + * Compile a foreign key command. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command + * @return string + */ + public function compileForeign(Blueprint $blueprint, Fluent $command) + { + // Handled on table creation... + } + + /** + * Compile a drop table command. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command + * @return string + */ + public function compileDrop(Blueprint $blueprint, Fluent $command) + { + return 'drop table '.$this->wrapTable($blueprint); + } + + /** + * Compile a drop table (if exists) command. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command + * @return string + */ + public function compileDropIfExists(Blueprint $blueprint, Fluent $command) + { + return 'drop table if exists '.$this->wrapTable($blueprint); + } + + /** + * Compile a drop column command. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command + * @param \Illuminate\Database\Connection $connection + * @return array + */ + public function compileDropColumn(Blueprint $blueprint, Fluent $command, Connection $connection) + { + $tableDiff = $this->getDoctrineTableDiff( + $blueprint, $schema = $connection->getDoctrineSchemaManager() + ); + + foreach ($command->columns as $name) { + $column = $connection->getDoctrineColumn($blueprint->getTable(), $name); + + $tableDiff->removedColumns[$name] = $column; + } + + return (array) $schema->getDatabasePlatform()->getAlterTableSQL($tableDiff); + } + + /** + * Compile a drop unique key command. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command + * @return string + */ + public function compileDropUnique(Blueprint $blueprint, Fluent $command) + { + $index = $this->wrap($command->index); + + return "drop index {$index}"; + } + + /** + * Compile a drop index command. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command + * @return string + */ + public function compileDropIndex(Blueprint $blueprint, Fluent $command) + { + $index = $this->wrap($command->index); + + return "drop index {$index}"; + } + + /** + * Compile a rename table command. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command + * @return string + */ + public function compileRename(Blueprint $blueprint, Fluent $command) + { + $from = $this->wrapTable($blueprint); + + return "alter table {$from} rename to ".$this->wrapTable($command->to); + } + + /** + * Compile the command to enable foreign key constraints. + * + * @return string + */ + public function compileEnableForeignKeyConstraints() + { + return 'PRAGMA foreign_keys = ON;'; + } + + /** + * Compile the command to disable foreign key constraints. + * + * @return string + */ + public function compileDisableForeignKeyConstraints() + { + return 'PRAGMA foreign_keys = OFF;'; + } + + /** + * Create the column definition for a char type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeChar(Fluent $column) + { + return 'varchar'; + } + + /** + * Create the column definition for a string type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeString(Fluent $column) + { + return 'varchar'; + } + + /** + * Create the column definition for a text type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeText(Fluent $column) + { + return 'text'; + } + + /** + * Create the column definition for a medium text type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeMediumText(Fluent $column) + { + return 'text'; + } + + /** + * Create the column definition for a long text type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeLongText(Fluent $column) + { + return 'text'; + } + + /** + * Create the column definition for a integer type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeInteger(Fluent $column) + { + return 'integer'; + } + + /** + * Create the column definition for a big integer type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeBigInteger(Fluent $column) + { + return 'integer'; + } + + /** + * Create the column definition for a medium integer type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeMediumInteger(Fluent $column) + { + return 'integer'; + } + + /** + * Create the column definition for a tiny integer type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeTinyInteger(Fluent $column) + { + return 'integer'; + } + + /** + * Create the column definition for a small integer type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeSmallInteger(Fluent $column) + { + return 'integer'; + } + + /** + * Create the column definition for a float type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeFloat(Fluent $column) + { + return 'float'; + } + + /** + * Create the column definition for a double type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeDouble(Fluent $column) + { + return 'float'; + } + + /** + * Create the column definition for a decimal type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeDecimal(Fluent $column) + { + return 'numeric'; + } + + /** + * Create the column definition for a boolean type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeBoolean(Fluent $column) + { + return 'tinyint(1)'; + } + + /** + * Create the column definition for an enum type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeEnum(Fluent $column) + { + return 'varchar'; + } + + /** + * Create the column definition for a json type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeJson(Fluent $column) + { + return 'text'; + } + + /** + * Create the column definition for a jsonb type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeJsonb(Fluent $column) + { + return 'text'; + } + + /** + * Create the column definition for a date type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeDate(Fluent $column) + { + return 'date'; + } + + /** + * Create the column definition for a date-time type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeDateTime(Fluent $column) + { + return 'datetime'; + } + + /** + * Create the column definition for a date-time type. + * + * Note: "SQLite does not have a storage class set aside for storing dates and/or times." + * @link https://www.sqlite.org/datatype3.html + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeDateTimeTz(Fluent $column) + { + return 'datetime'; + } + + /** + * Create the column definition for a time type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeTime(Fluent $column) + { + return 'time'; + } + + /** + * Create the column definition for a time type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeTimeTz(Fluent $column) + { + return 'time'; + } + + /** + * Create the column definition for a timestamp type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeTimestamp(Fluent $column) + { + if ($column->useCurrent) { + return 'datetime default CURRENT_TIMESTAMP'; + } + + return 'datetime'; + } + + /** + * Create the column definition for a timestamp type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeTimestampTz(Fluent $column) + { + if ($column->useCurrent) { + return 'datetime default CURRENT_TIMESTAMP'; + } + + return 'datetime'; + } + + /** + * Create the column definition for a binary type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeBinary(Fluent $column) + { + return 'blob'; + } + + /** + * Create the column definition for a uuid type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeUuid(Fluent $column) + { + return 'varchar'; + } + + /** + * Create the column definition for an IP address type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeIpAddress(Fluent $column) + { + return 'varchar'; + } + + /** + * Create the column definition for a MAC address type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeMacAddress(Fluent $column) + { + return 'varchar'; + } + + /** + * Get the SQL for a nullable column modifier. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $column + * @return string|null + */ + protected function modifyNullable(Blueprint $blueprint, Fluent $column) + { + return $column->nullable ? ' null' : ' not null'; + } + + /** + * Get the SQL for a default column modifier. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $column + * @return string|null + */ + protected function modifyDefault(Blueprint $blueprint, Fluent $column) + { + if (! is_null($column->default)) { + return ' default '.$this->getDefaultValue($column->default); + } + } + + /** + * Get the SQL for an auto-increment column modifier. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $column + * @return string|null + */ + protected function modifyIncrement(Blueprint $blueprint, Fluent $column) + { + if (in_array($column->type, $this->serials) && $column->autoIncrement) { + return ' primary key autoincrement'; + } + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/SqlServerGrammar.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/SqlServerGrammar.php new file mode 100755 index 0000000..4ba43bb --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/SqlServerGrammar.php @@ -0,0 +1,626 @@ +getColumns($blueprint)); + + return 'create table '.$this->wrapTable($blueprint)." ($columns)"; + } + + /** + * Compile a column addition table command. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command + * @return string + */ + public function compileAdd(Blueprint $blueprint, Fluent $command) + { + return sprintf('alter table %s add %s', + $this->wrapTable($blueprint), + implode(', ', $this->getColumns($blueprint)) + ); + } + + /** + * Compile a primary key command. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command + * @return string + */ + public function compilePrimary(Blueprint $blueprint, Fluent $command) + { + return sprintf('alter table %s add constraint %s primary key (%s)', + $this->wrapTable($blueprint), + $this->wrap($command->index), + $this->columnize($command->columns) + ); + } + + /** + * Compile a unique key command. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command + * @return string + */ + public function compileUnique(Blueprint $blueprint, Fluent $command) + { + return sprintf('create unique index %s on %s (%s)', + $this->wrap($command->index), + $this->wrapTable($blueprint), + $this->columnize($command->columns) + ); + } + + /** + * Compile a plain index key command. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command + * @return string + */ + public function compileIndex(Blueprint $blueprint, Fluent $command) + { + return sprintf('create index %s on %s (%s)', + $this->wrap($command->index), + $this->wrapTable($blueprint), + $this->columnize($command->columns) + ); + } + + /** + * Compile a drop table command. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command + * @return string + */ + public function compileDrop(Blueprint $blueprint, Fluent $command) + { + return 'drop table '.$this->wrapTable($blueprint); + } + + /** + * Compile a drop table (if exists) command. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command + * @return string + */ + public function compileDropIfExists(Blueprint $blueprint, Fluent $command) + { + return sprintf('if exists (select * from INFORMATION_SCHEMA.TABLES where TABLE_NAME = %s) drop table %s', + "'".str_replace("'", "''", $this->getTablePrefix().$blueprint->getTable())."'", + $this->wrapTable($blueprint) + ); + } + + /** + * Compile a drop column command. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command + * @return string + */ + public function compileDropColumn(Blueprint $blueprint, Fluent $command) + { + $columns = $this->wrapArray($command->columns); + + return 'alter table '.$this->wrapTable($blueprint).' drop column '.implode(', ', $columns); + } + + /** + * Compile a drop primary key command. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command + * @return string + */ + public function compileDropPrimary(Blueprint $blueprint, Fluent $command) + { + $index = $this->wrap($command->index); + + return "alter table {$this->wrapTable($blueprint)} drop constraint {$index}"; + } + + /** + * Compile a drop unique key command. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command + * @return string + */ + public function compileDropUnique(Blueprint $blueprint, Fluent $command) + { + $index = $this->wrap($command->index); + + return "drop index {$index} on {$this->wrapTable($blueprint)}"; + } + + /** + * Compile a drop index command. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command + * @return string + */ + public function compileDropIndex(Blueprint $blueprint, Fluent $command) + { + $index = $this->wrap($command->index); + + return "drop index {$index} on {$this->wrapTable($blueprint)}"; + } + + /** + * Compile a drop foreign key command. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command + * @return string + */ + public function compileDropForeign(Blueprint $blueprint, Fluent $command) + { + $index = $this->wrap($command->index); + + return "alter table {$this->wrapTable($blueprint)} drop constraint {$index}"; + } + + /** + * Compile a rename table command. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command + * @return string + */ + public function compileRename(Blueprint $blueprint, Fluent $command) + { + $from = $this->wrapTable($blueprint); + + return "sp_rename {$from}, ".$this->wrapTable($command->to); + } + + /** + * Compile the command to enable foreign key constraints. + * + * @return string + */ + public function compileEnableForeignKeyConstraints() + { + return 'EXEC sp_msforeachtable @command1="print \'?\'", @command2="ALTER TABLE ? WITH CHECK CHECK CONSTRAINT all";'; + } + + /** + * Compile the command to disable foreign key constraints. + * + * @return string + */ + public function compileDisableForeignKeyConstraints() + { + return 'EXEC sp_msforeachtable "ALTER TABLE ? NOCHECK CONSTRAINT all";'; + } + + /** + * Create the column definition for a char type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeChar(Fluent $column) + { + return "nchar({$column->length})"; + } + + /** + * Create the column definition for a string type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeString(Fluent $column) + { + return "nvarchar({$column->length})"; + } + + /** + * Create the column definition for a text type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeText(Fluent $column) + { + return 'nvarchar(max)'; + } + + /** + * Create the column definition for a medium text type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeMediumText(Fluent $column) + { + return 'nvarchar(max)'; + } + + /** + * Create the column definition for a long text type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeLongText(Fluent $column) + { + return 'nvarchar(max)'; + } + + /** + * Create the column definition for an integer type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeInteger(Fluent $column) + { + return 'int'; + } + + /** + * Create the column definition for a big integer type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeBigInteger(Fluent $column) + { + return 'bigint'; + } + + /** + * Create the column definition for a medium integer type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeMediumInteger(Fluent $column) + { + return 'int'; + } + + /** + * Create the column definition for a tiny integer type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeTinyInteger(Fluent $column) + { + return 'tinyint'; + } + + /** + * Create the column definition for a small integer type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeSmallInteger(Fluent $column) + { + return 'smallint'; + } + + /** + * Create the column definition for a float type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeFloat(Fluent $column) + { + return 'float'; + } + + /** + * Create the column definition for a double type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeDouble(Fluent $column) + { + return 'float'; + } + + /** + * Create the column definition for a decimal type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeDecimal(Fluent $column) + { + return "decimal({$column->total}, {$column->places})"; + } + + /** + * Create the column definition for a boolean type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeBoolean(Fluent $column) + { + return 'bit'; + } + + /** + * Create the column definition for an enum type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeEnum(Fluent $column) + { + return 'nvarchar(255)'; + } + + /** + * Create the column definition for a json type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeJson(Fluent $column) + { + return 'nvarchar(max)'; + } + + /** + * Create the column definition for a jsonb type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeJsonb(Fluent $column) + { + return 'nvarchar(max)'; + } + + /** + * Create the column definition for a date type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeDate(Fluent $column) + { + return 'date'; + } + + /** + * Create the column definition for a date-time type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeDateTime(Fluent $column) + { + return 'datetime'; + } + + /** + * Create the column definition for a date-time type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeDateTimeTz(Fluent $column) + { + return 'datetimeoffset(0)'; + } + + /** + * Create the column definition for a time type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeTime(Fluent $column) + { + return 'time'; + } + + /** + * Create the column definition for a time type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeTimeTz(Fluent $column) + { + return 'time'; + } + + /** + * Create the column definition for a timestamp type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeTimestamp(Fluent $column) + { + if ($column->useCurrent) { + return 'datetime default CURRENT_TIMESTAMP'; + } + + return 'datetime'; + } + + /** + * Create the column definition for a timestamp type. + * + * @link https://msdn.microsoft.com/en-us/library/bb630289(v=sql.120).aspx + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeTimestampTz(Fluent $column) + { + if ($column->useCurrent) { + return 'datetimeoffset(0) default CURRENT_TIMESTAMP'; + } + + return 'datetimeoffset(0)'; + } + + /** + * Create the column definition for a binary type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeBinary(Fluent $column) + { + return 'varbinary(max)'; + } + + /** + * Create the column definition for a uuid type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeUuid(Fluent $column) + { + return 'uniqueidentifier'; + } + + /** + * Create the column definition for an IP address type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeIpAddress(Fluent $column) + { + return 'nvarchar(45)'; + } + + /** + * Create the column definition for a MAC address type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeMacAddress(Fluent $column) + { + return 'nvarchar(17)'; + } + + /** + * Get the SQL for a collation column modifier. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $column + * @return string|null + */ + protected function modifyCollate(Blueprint $blueprint, Fluent $column) + { + if (! is_null($column->collation)) { + return ' collate '.$column->collation; + } + } + + /** + * Get the SQL for a nullable column modifier. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $column + * @return string|null + */ + protected function modifyNullable(Blueprint $blueprint, Fluent $column) + { + return $column->nullable ? ' null' : ' not null'; + } + + /** + * Get the SQL for a default column modifier. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $column + * @return string|null + */ + protected function modifyDefault(Blueprint $blueprint, Fluent $column) + { + if (! is_null($column->default)) { + return ' default '.$this->getDefaultValue($column->default); + } + } + + /** + * Get the SQL for an auto-increment column modifier. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $column + * @return string|null + */ + protected function modifyIncrement(Blueprint $blueprint, Fluent $column) + { + if (in_array($column->type, $this->serials) && $column->autoIncrement) { + return ' identity primary key'; + } + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/MySqlBuilder.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/MySqlBuilder.php new file mode 100755 index 0000000..e8d4fe1 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Schema/MySqlBuilder.php @@ -0,0 +1,38 @@ +connection->getTablePrefix().$table; + + return count($this->connection->select( + $this->grammar->compileTableExists(), [$this->connection->getDatabaseName(), $table] + )) > 0; + } + + /** + * Get the column listing for a given table. + * + * @param string $table + * @return array + */ + public function getColumnListing($table) + { + $table = $this->connection->getTablePrefix().$table; + + $results = $this->connection->select( + $this->grammar->compileColumnListing(), [$this->connection->getDatabaseName(), $table] + ); + + return $this->connection->getPostProcessor()->processColumnListing($results); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/PostgresBuilder.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/PostgresBuilder.php new file mode 100755 index 0000000..fb73dea --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Schema/PostgresBuilder.php @@ -0,0 +1,27 @@ +connection->getConfig('schema'))) { + $schema = head($schema); + } + + $schema = $schema ? $schema : 'public'; + + $table = $this->connection->getTablePrefix().$table; + + return count($this->connection->select( + $this->grammar->compileTableExists(), [$schema, $table] + )) > 0; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Seeder.php b/vendor/laravel/framework/src/Illuminate/Database/Seeder.php new file mode 100755 index 0000000..bb33876 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Seeder.php @@ -0,0 +1,106 @@ +command)) { + $this->command->getOutput()->writeln("Seeding: $class"); + } + + $this->resolve($class)->__invoke(); + } + + /** + * Resolve an instance of the given seeder class. + * + * @param string $class + * @return \Illuminate\Database\Seeder + */ + protected function resolve($class) + { + if (isset($this->container)) { + $instance = $this->container->make($class); + + $instance->setContainer($this->container); + } else { + $instance = new $class; + } + + if (isset($this->command)) { + $instance->setCommand($this->command); + } + + return $instance; + } + + /** + * Set the IoC container instance. + * + * @param \Illuminate\Container\Container $container + * @return $this + */ + public function setContainer(Container $container) + { + $this->container = $container; + + return $this; + } + + /** + * Set the console command instance. + * + * @param \Illuminate\Console\Command $command + * @return $this + */ + public function setCommand(Command $command) + { + $this->command = $command; + + return $this; + } + + /** + * Run the database seeds. + * + * @return void + * + * @throws \InvalidArgumentException + */ + public function __invoke() + { + if (! method_exists($this, 'run')) { + throw new InvalidArgumentException('Method [run] missing from '.get_class($this)); + } + + return isset($this->container) + ? $this->container->call([$this, 'run']) + : $this->run(); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/SqlServerConnection.php b/vendor/laravel/framework/src/Illuminate/Database/SqlServerConnection.php new file mode 100755 index 0000000..cdd172a --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/SqlServerConnection.php @@ -0,0 +1,98 @@ +getDriverName() == 'sqlsrv') { + return parent::transaction($callback); + } + + $this->getPdo()->exec('BEGIN TRAN'); + + // We'll simply execute the given callback within a try / catch block + // and if we catch any exception we can rollback the transaction + // so that none of the changes are persisted to the database. + try { + $result = $callback($this); + + $this->getPdo()->exec('COMMIT TRAN'); + } + + // If we catch an exception, we will roll back so nothing gets messed + // up in the database. Then we'll re-throw the exception so it can + // be handled how the developer sees fit for their applications. + catch (Exception $e) { + $this->getPdo()->exec('ROLLBACK TRAN'); + + throw $e; + } catch (Throwable $e) { + $this->getPdo()->exec('ROLLBACK TRAN'); + + throw $e; + } + + return $result; + } + } + + /** + * Get the default query grammar instance. + * + * @return \Illuminate\Database\Query\Grammars\SqlServerGrammar + */ + protected function getDefaultQueryGrammar() + { + return $this->withTablePrefix(new QueryGrammar); + } + + /** + * Get the default schema grammar instance. + * + * @return \Illuminate\Database\Schema\Grammars\SqlServerGrammar + */ + protected function getDefaultSchemaGrammar() + { + return $this->withTablePrefix(new SchemaGrammar); + } + + /** + * Get the default post processor instance. + * + * @return \Illuminate\Database\Query\Processors\SqlServerProcessor + */ + protected function getDefaultPostProcessor() + { + return new SqlServerProcessor; + } + + /** + * Get the Doctrine DBAL driver. + * + * @return \Doctrine\DBAL\Driver\PDOSqlsrv\Driver + */ + protected function getDoctrineDriver() + { + return new DoctrineDriver; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/composer.json b/vendor/laravel/framework/src/Illuminate/Database/composer.json new file mode 100644 index 0000000..46c1abe --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/composer.json @@ -0,0 +1,46 @@ +{ + "name": "illuminate/database", + "description": "The Illuminate Database package.", + "license": "MIT", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "keywords": ["laravel", "database", "sql", "orm"], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "require": { + "php": ">=5.6.4", + "illuminate/container": "5.4.*", + "illuminate/contracts": "5.4.*", + "illuminate/support": "5.4.*", + "nesbot/carbon": "~1.20" + }, + "autoload": { + "psr-4": { + "Illuminate\\Database\\": "" + } + }, + "extra": { + "branch-alias": { + "dev-master": "5.4-dev" + } + }, + "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.*)." + }, + "config": { + "sort-packages": true + }, + "minimum-stability": "dev" +} diff --git a/vendor/laravel/framework/src/Illuminate/Encryption/Encrypter.php b/vendor/laravel/framework/src/Illuminate/Encryption/Encrypter.php new file mode 100755 index 0000000..f7256c7 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Encryption/Encrypter.php @@ -0,0 +1,241 @@ +key = $key; + $this->cipher = $cipher; + } else { + throw new RuntimeException('The only supported ciphers are AES-128-CBC and AES-256-CBC with the correct key lengths.'); + } + } + + /** + * Determine if the given key and cipher combination is valid. + * + * @param string $key + * @param string $cipher + * @return bool + */ + public static function supported($key, $cipher) + { + $length = mb_strlen($key, '8bit'); + + return ($cipher === 'AES-128-CBC' && $length === 16) || + ($cipher === 'AES-256-CBC' && $length === 32); + } + + /** + * Encrypt the given value. + * + * @param mixed $value + * @param bool $serialize + * @return string + * + * @throws \Illuminate\Contracts\Encryption\EncryptException + */ + public function encrypt($value, $serialize = true) + { + $iv = random_bytes(16); + + // First we will encrypt the value using OpenSSL. After this is encrypted we + // will proceed to calculating a MAC for the encrypted value so that this + // value can be verified later as not having been changed by the users. + $value = \openssl_encrypt( + $serialize ? serialize($value) : $value, + $this->cipher, $this->key, 0, $iv + ); + + if ($value === false) { + 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. + $mac = $this->hash($iv = base64_encode($iv), $value); + + $json = json_encode(compact('iv', 'value', 'mac')); + + if (! is_string($json)) { + throw new EncryptException('Could not encrypt the data.'); + } + + return base64_encode($json); + } + + /** + * Encrypt a string without serialization. + * + * @param string $value + * @return string + */ + public function encryptString($value) + { + return $this->encrypt($value, false); + } + + /** + * Decrypt the given value. + * + * @param mixed $payload + * @param bool $unserialize + * @return string + * + * @throws \Illuminate\Contracts\Encryption\DecryptException + */ + public function decrypt($payload, $unserialize = true) + { + $payload = $this->getJsonPayload($payload); + + $iv = base64_decode($payload['iv']); + + // Here we will decrypt the value. If we are able to successfully decrypt it + // we will then unserialize it and return it out to the caller. If we are + // unable to decrypt this value we will throw out an exception message. + $decrypted = \openssl_decrypt( + $payload['value'], $this->cipher, $this->key, 0, $iv + ); + + if ($decrypted === false) { + throw new DecryptException('Could not decrypt the data.'); + } + + return $unserialize ? unserialize($decrypted) : $decrypted; + } + + /** + * Decrypt the given string without unserialization. + * + * @param string $payload + * @return string + */ + public function decryptString($payload) + { + return $this->decrypt($payload, false); + } + + /** + * Create a MAC for the given value. + * + * @param string $iv + * @param mixed $value + * @return string + */ + protected function hash($iv, $value) + { + return hash_hmac('sha256', $iv.$value, $this->key); + } + + /** + * Get the JSON array from the given payload. + * + * @param string $payload + * @return array + * + * @throws \Illuminate\Contracts\Encryption\DecryptException + */ + protected function getJsonPayload($payload) + { + $payload = json_decode(base64_decode($payload), true); + + // If the payload is not valid JSON or does not have the proper keys set we will + // assume it is invalid and bail out of the routine since we will not be able + // to decrypt the given value. We'll also check the MAC for this encryption. + if (! $this->validPayload($payload)) { + throw new DecryptException('The payload is invalid.'); + } + + if (! $this->validMac($payload)) { + throw new DecryptException('The MAC is invalid.'); + } + + return $payload; + } + + /** + * Verify that the encryption payload is valid. + * + * @param mixed $payload + * @return bool + */ + protected function validPayload($payload) + { + return is_array($payload) && isset( + $payload['iv'], $payload['value'], $payload['mac'] + ); + } + + /** + * Determine if the MAC for the given payload is valid. + * + * @param array $payload + * @return bool + */ + protected function validMac(array $payload) + { + $calculated = $this->calculateMac($payload, $bytes = random_bytes(16)); + + return hash_equals( + hash_hmac('sha256', $payload['mac'], $bytes, true), $calculated + ); + } + + /** + * Calculate the hash of the given payload. + * + * @param array $payload + * @param string $bytes + * @return string + */ + protected function calculateMac($payload, $bytes) + { + return hash_hmac( + 'sha256', $this->hash($payload['iv'], $payload['value']), $bytes, true + ); + } + + /** + * Get the encryption key. + * + * @return string + */ + public function getKey() + { + return $this->key; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Encryption/EncryptionServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Encryption/EncryptionServiceProvider.php new file mode 100755 index 0000000..d27ed28 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Encryption/EncryptionServiceProvider.php @@ -0,0 +1,30 @@ +app->singleton('encrypter', function ($app) { + $config = $app->make('config')->get('app'); + + // If the key starts with "base64:", we will need to decode the key before handing + // it off to the encrypter. Keys may be base-64 encoded for presentation and we + // want to make sure to convert them back to the raw bytes before encrypting. + if (Str::startsWith($key = $config['key'], 'base64:')) { + $key = base64_decode(substr($key, 7)); + } + + return new Encrypter($key, $config['cipher']); + }); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Encryption/composer.json b/vendor/laravel/framework/src/Illuminate/Encryption/composer.json new file mode 100644 index 0000000..05d24fb --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Encryption/composer.json @@ -0,0 +1,38 @@ +{ + "name": "illuminate/encryption", + "description": "The Illuminate Encryption package.", + "license": "MIT", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "require": { + "php": ">=5.6.4", + "ext-mbstring": "*", + "ext-openssl": "*", + "illuminate/contracts": "5.4.*", + "illuminate/support": "5.4.*", + "paragonie/random_compat": "~1.4|~2.0" + }, + "autoload": { + "psr-4": { + "Illuminate\\Encryption\\": "" + } + }, + "extra": { + "branch-alias": { + "dev-master": "5.4-dev" + } + }, + "config": { + "sort-packages": true + }, + "minimum-stability": "dev" +} diff --git a/vendor/laravel/framework/src/Illuminate/Events/CallQueuedHandler.php b/vendor/laravel/framework/src/Illuminate/Events/CallQueuedHandler.php new file mode 100644 index 0000000..4a21b64 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Events/CallQueuedHandler.php @@ -0,0 +1,86 @@ +container = $container; + } + + /** + * Handle the queued job. + * + * @param \Illuminate\Contracts\Queue\Job $job + * @param array $data + * @return void + */ + public function call(Job $job, array $data) + { + $handler = $this->setJobInstanceIfNecessary( + $job, $this->container->make($data['class']) + ); + + call_user_func_array( + [$handler, $data['method']], unserialize($data['data']) + ); + + if (! $job->isDeletedOrReleased()) { + $job->delete(); + } + } + + /** + * Set the job instance of the given class if necessary. + * + * @param \Illuminate\Contracts\Queue\Job $job + * @param mixed $instance + * @return mixed + */ + protected function setJobInstanceIfNecessary(Job $job, $instance) + { + if (in_array(InteractsWithQueue::class, class_uses_recursive(get_class($instance)))) { + $instance->setJob($job); + } + + return $instance; + } + + /** + * Call the failed method on the job instance. + * + * The event instance and the exception will be passed. + * + * @param array $data + * @param \Exception $e + * @return void + */ + public function failed(array $data, $e) + { + $handler = $this->container->make($data['class']); + + $parameters = array_merge(unserialize($data['data']), [$e]); + + if (method_exists($handler, 'failed')) { + call_user_func_array([$handler, 'failed'], $parameters); + } + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Events/CallQueuedListener.php b/vendor/laravel/framework/src/Illuminate/Events/CallQueuedListener.php new file mode 100644 index 0000000..381d504 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Events/CallQueuedListener.php @@ -0,0 +1,141 @@ +data = $data; + $this->class = $class; + $this->method = $method; + } + + /** + * Handle the queued job. + * + * @param \Illuminate\Container\Container $container + * @return void + */ + public function handle(Container $container) + { + $this->prepareData(); + + $handler = $this->setJobInstanceIfNecessary( + $this->job, $container->make($this->class) + ); + + call_user_func_array( + [$handler, $this->method], $this->data + ); + } + + /** + * Set the job instance of the given class if necessary. + * + * @param \Illuminate\Contracts\Queue\Job $job + * @param mixed $instance + * @return mixed + */ + protected function setJobInstanceIfNecessary(Job $job, $instance) + { + if (in_array(InteractsWithQueue::class, class_uses_recursive(get_class($instance)))) { + $instance->setJob($job); + } + + return $instance; + } + + /** + * Call the failed method on the job instance. + * + * The event instance and the exception will be passed. + * + * @param \Exception $e + * @return void + */ + public function failed($e) + { + $this->prepareData(); + + $handler = Container::getInstance()->make($this->class); + + $parameters = array_merge($this->data, [$e]); + + if (method_exists($handler, 'failed')) { + call_user_func_array([$handler, 'failed'], $parameters); + } + } + + /** + * Unserialize the data if needed. + * + * @return void + */ + protected function prepareData() + { + if (is_string($this->data)) { + $this->data = unserialize($this->data); + } + } + + /** + * Get the display name for the queued job. + * + * @return string + */ + public function displayName() + { + return $this->class; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php b/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php new file mode 100755 index 0000000..3cab2b8 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php @@ -0,0 +1,549 @@ +container = $container ?: new Container; + } + + /** + * Register an event listener with the dispatcher. + * + * @param string|array $events + * @param mixed $listener + * @return void + */ + public function listen($events, $listener) + { + foreach ((array) $events as $event) { + if (Str::contains($event, '*')) { + $this->setupWildcardListen($event, $listener); + } else { + $this->listeners[$event][] = $this->makeListener($listener); + } + } + } + + /** + * Setup a wildcard listener callback. + * + * @param string $event + * @param mixed $listener + * @return void + */ + protected function setupWildcardListen($event, $listener) + { + $this->wildcards[$event][] = $this->makeListener($listener, true); + } + + /** + * Determine if a given event has listeners. + * + * @param string $eventName + * @return bool + */ + public function hasListeners($eventName) + { + return isset($this->listeners[$eventName]) || isset($this->wildcards[$eventName]); + } + + /** + * Register an event and payload to be fired later. + * + * @param string $event + * @param array $payload + * @return void + */ + public function push($event, $payload = []) + { + $this->listen($event.'_pushed', function () use ($event, $payload) { + $this->dispatch($event, $payload); + }); + } + + /** + * Flush a set of pushed events. + * + * @param string $event + * @return void + */ + public function flush($event) + { + $this->dispatch($event.'_pushed'); + } + + /** + * Register an event subscriber with the dispatcher. + * + * @param object|string $subscriber + * @return void + */ + public function subscribe($subscriber) + { + $subscriber = $this->resolveSubscriber($subscriber); + + $subscriber->subscribe($this); + } + + /** + * Resolve the subscriber instance. + * + * @param object|string $subscriber + * @return mixed + */ + protected function resolveSubscriber($subscriber) + { + if (is_string($subscriber)) { + return $this->container->make($subscriber); + } + + return $subscriber; + } + + /** + * Fire an event until the first non-null response is returned. + * + * @param string|object $event + * @param mixed $payload + * @return array|null + */ + public function until($event, $payload = []) + { + return $this->dispatch($event, $payload, true); + } + + /** + * Fire an event and call the listeners. + * + * @param string|object $event + * @param mixed $payload + * @param bool $halt + * @return array|null + */ + public function fire($event, $payload = [], $halt = false) + { + return $this->dispatch($event, $payload, $halt); + } + + /** + * Fire an event and call the listeners. + * + * @param string|object $event + * @param mixed $payload + * @param bool $halt + * @return array|null + */ + public function dispatch($event, $payload = [], $halt = false) + { + // When the given "event" is actually an object we will assume it is an event + // object and use the class as the event name and this event itself as the + // payload to the handler, which makes object based events quite simple. + list($event, $payload) = $this->parseEventAndPayload( + $event, $payload + ); + + if ($this->shouldBroadcast($payload)) { + $this->broadcastEvent($payload[0]); + } + + $responses = []; + + foreach ($this->getListeners($event) as $listener) { + $response = $listener($event, $payload); + + // If a response is returned from the listener and event halting is enabled + // we will just return this response, and not call the rest of the event + // listeners. Otherwise we will add the response on the response list. + if ($halt && ! is_null($response)) { + return $response; + } + + // If a boolean false is returned from a listener, we will stop propagating + // the event to any further listeners down in the chain, else we keep on + // looping through the listeners and firing every one in our sequence. + if ($response === false) { + break; + } + + $responses[] = $response; + } + + return $halt ? null : $responses; + } + + /** + * Parse the given event and payload and prepare them for dispatching. + * + * @param mixed $event + * @param mixed $payload + * @return array + */ + protected function parseEventAndPayload($event, $payload) + { + if (is_object($event)) { + list($payload, $event) = [[$event], get_class($event)]; + } + + return [$event, array_wrap($payload)]; + } + + /** + * Determine if the payload has a broadcastable event. + * + * @param array $payload + * @return bool + */ + protected function shouldBroadcast(array $payload) + { + return isset($payload[0]) && $payload[0] instanceof ShouldBroadcast; + } + + /** + * Broadcast the given event class. + * + * @param \Illuminate\Contracts\Broadcasting\ShouldBroadcast $event + * @return void + */ + protected function broadcastEvent($event) + { + $this->container->make(BroadcastFactory::class)->queue($event); + } + + /** + * Get all of the listeners for a given event name. + * + * @param string $eventName + * @return array + */ + public function getListeners($eventName) + { + $listeners = isset($this->listeners[$eventName]) ? $this->listeners[$eventName] : []; + + $listeners = array_merge( + $listeners, $this->getWildcardListeners($eventName) + ); + + return class_exists($eventName, false) + ? $this->addInterfaceListeners($eventName, $listeners) + : $listeners; + } + + /** + * Get the wildcard listeners for the event. + * + * @param string $eventName + * @return array + */ + protected function getWildcardListeners($eventName) + { + $wildcards = []; + + foreach ($this->wildcards as $key => $listeners) { + if (Str::is($key, $eventName)) { + $wildcards = array_merge($wildcards, $listeners); + } + } + + return $wildcards; + } + + /** + * Add the listeners for the event's interfaces to the given array. + * + * @param string $eventName + * @param array $listeners + * @return array + */ + protected function addInterfaceListeners($eventName, array $listeners = []) + { + foreach (class_implements($eventName) as $interface) { + if (isset($this->listeners[$interface])) { + foreach ($this->listeners[$interface] as $names) { + $listeners = array_merge($listeners, (array) $names); + } + } + } + + return $listeners; + } + + /** + * Register an event listener with the dispatcher. + * + * @param string|\Closure $listener + * @param bool $wildcard + * @return mixed + */ + public function makeListener($listener, $wildcard = false) + { + if (is_string($listener)) { + return $this->createClassListener($listener, $wildcard); + } + + return function ($event, $payload) use ($listener, $wildcard) { + if ($wildcard) { + return $listener($event, $payload); + } else { + return $listener(...array_values($payload)); + } + }; + } + + /** + * Create a class based listener using the IoC container. + * + * @param string $listener + * @param bool $wildcard + * @return \Closure + */ + public function createClassListener($listener, $wildcard = false) + { + return function ($event, $payload) use ($listener, $wildcard) { + if ($wildcard) { + return call_user_func($this->createClassCallable($listener), $event, $payload); + } else { + return call_user_func_array( + $this->createClassCallable($listener), $payload + ); + } + }; + } + + /** + * Create the class based event callable. + * + * @param string $listener + * @return callable + */ + protected function createClassCallable($listener) + { + list($class, $method) = $this->parseClassCallable($listener); + + if ($this->handlerShouldBeQueued($class)) { + return $this->createQueuedHandlerCallable($class, $method); + } else { + return [$this->container->make($class), $method]; + } + } + + /** + * Parse the class listener into class and method. + * + * @param string $listener + * @return array + */ + protected function parseClassCallable($listener) + { + return Str::parseCallback($listener, 'handle'); + } + + /** + * Determine if the event handler class should be queued. + * + * @param string $class + * @return bool + */ + protected function handlerShouldBeQueued($class) + { + try { + return (new ReflectionClass($class))->implementsInterface( + ShouldQueue::class + ); + } catch (Exception $e) { + return false; + } + } + + /** + * Create a callable for putting an event handler on the queue. + * + * @param string $class + * @param string $method + * @return \Closure + */ + protected function createQueuedHandlerCallable($class, $method) + { + return function () use ($class, $method) { + $arguments = array_map(function ($a) { + return is_object($a) ? clone $a : $a; + }, func_get_args()); + + if (method_exists($class, 'queue')) { + $this->callQueueMethodOnHandler($class, $method, $arguments); + } else { + $this->queueHandler($class, $method, $arguments); + } + }; + } + + /** + * Call the queue method on the handler class. + * + * @param string $class + * @param string $method + * @param array $arguments + * @return void + */ + protected function callQueueMethodOnHandler($class, $method, $arguments) + { + $handler = (new ReflectionClass($class))->newInstanceWithoutConstructor(); + + $handler->queue($this->resolveQueue(), 'Illuminate\Events\CallQueuedHandler@call', [ + 'class' => $class, 'method' => $method, 'data' => serialize($arguments), + ]); + } + + /** + * Queue the handler class. + * + * @param string $class + * @param string $method + * @param array $arguments + * @return void + */ + protected function queueHandler($class, $method, $arguments) + { + list($listener, $job) = $this->createListenerAndJob($class, $method, $arguments); + + $connection = $this->resolveQueue()->connection( + isset($listener->connection) ? $listener->connection : null + ); + + $queue = isset($listener->queue) ? $listener->queue : null; + + isset($listener->delay) + ? $connection->laterOn($queue, $listener->delay, $job) + : $connection->pushOn($queue, $job); + } + + /** + * Create the listener and job for a queued listener. + * + * @param string $class + * @param string $method + * @param array $arguments + * @return array + */ + protected function createListenerAndJob($class, $method, $arguments) + { + $listener = (new ReflectionClass($class))->newInstanceWithoutConstructor(); + + return [$listener, $this->propogateListenerOptions( + $listener, new CallQueuedListener($class, $method, $arguments) + )]; + } + + /** + * Propogate listener options to the job. + * + * @param mixed $listener + * @param mixed $job + * @return mixed + */ + protected function propogateListenerOptions($listener, $job) + { + return tap($job, function ($job) use ($listener) { + $job->tries = isset($listener->tries) ? $listener->tries : null; + $job->timeout = isset($listener->timeout) ? $listener->timeout : null; + }); + } + + /** + * Remove a set of listeners from the dispatcher. + * + * @param string $event + * @return void + */ + public function forget($event) + { + if (Str::contains($event, '*')) { + unset($this->wildcards[$event]); + } else { + unset($this->listeners[$event]); + } + } + + /** + * Forget all of the pushed listeners. + * + * @return void + */ + public function forgetPushed() + { + foreach ($this->listeners as $key => $value) { + if (Str::endsWith($key, '_pushed')) { + $this->forget($key); + } + } + } + + /** + * Get the queue implementation from the resolver. + * + * @return \Illuminate\Contracts\Queue\Queue + */ + protected function resolveQueue() + { + return call_user_func($this->queueResolver); + } + + /** + * Set the queue resolver implementation. + * + * @param callable $resolver + * @return $this + */ + public function setQueueResolver(callable $resolver) + { + $this->queueResolver = $resolver; + + return $this; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Events/EventServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Events/EventServiceProvider.php new file mode 100755 index 0000000..fa3ed6f --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Events/EventServiceProvider.php @@ -0,0 +1,23 @@ +app->singleton('events', function ($app) { + return (new Dispatcher($app))->setQueueResolver(function () use ($app) { + return $app->make(QueueFactoryContract::class); + }); + }); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Events/composer.json b/vendor/laravel/framework/src/Illuminate/Events/composer.json new file mode 100755 index 0000000..a5ed915 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Events/composer.json @@ -0,0 +1,36 @@ +{ + "name": "illuminate/events", + "description": "The Illuminate Events package.", + "license": "MIT", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "require": { + "php": ">=5.6.4", + "illuminate/container": "5.4.*", + "illuminate/contracts": "5.4.*", + "illuminate/support": "5.4.*" + }, + "autoload": { + "psr-4": { + "Illuminate\\Events\\": "" + } + }, + "extra": { + "branch-alias": { + "dev-master": "5.4-dev" + } + }, + "config": { + "sort-packages": true + }, + "minimum-stability": "dev" +} diff --git a/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php b/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php new file mode 100644 index 0000000..6dbf335 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php @@ -0,0 +1,559 @@ +isFile($path)) { + return $lock ? $this->sharedGet($path) : file_get_contents($path); + } + + throw new FileNotFoundException("File does not exist at path {$path}"); + } + + /** + * Get contents of a file with shared access. + * + * @param string $path + * @return string + */ + public function sharedGet($path) + { + $contents = ''; + + $handle = fopen($path, 'rb'); + + if ($handle) { + try { + if (flock($handle, LOCK_SH)) { + clearstatcache(true, $path); + + $contents = fread($handle, $this->size($path) ?: 1); + + flock($handle, LOCK_UN); + } + } finally { + fclose($handle); + } + } + + return $contents; + } + + /** + * Get the returned value of a file. + * + * @param string $path + * @return mixed + * + * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException + */ + public function getRequire($path) + { + if ($this->isFile($path)) { + return require $path; + } + + throw new FileNotFoundException("File does not exist at path {$path}"); + } + + /** + * Require the given file once. + * + * @param string $file + * @return mixed + */ + public function requireOnce($file) + { + require_once $file; + } + + /** + * Write the contents of a file. + * + * @param string $path + * @param string $contents + * @param bool $lock + * @return int + */ + public function put($path, $contents, $lock = false) + { + return file_put_contents($path, $contents, $lock ? LOCK_EX : 0); + } + + /** + * Prepend to a file. + * + * @param string $path + * @param string $data + * @return int + */ + public function prepend($path, $data) + { + if ($this->exists($path)) { + return $this->put($path, $data.$this->get($path)); + } + + return $this->put($path, $data); + } + + /** + * Append to a file. + * + * @param string $path + * @param string $data + * @return int + */ + public function append($path, $data) + { + return file_put_contents($path, $data, FILE_APPEND); + } + + /** + * Get or set UNIX mode of a file or directory. + * + * @param string $path + * @param int $mode + * @return mixed + */ + public function chmod($path, $mode = null) + { + if ($mode) { + return chmod($path, $mode); + } + + return substr(sprintf('%o', fileperms($path)), -4); + } + + /** + * Delete the file at a given path. + * + * @param string|array $paths + * @return bool + */ + public function delete($paths) + { + $paths = is_array($paths) ? $paths : func_get_args(); + + $success = true; + + foreach ($paths as $path) { + try { + if (! @unlink($path)) { + $success = false; + } + } catch (ErrorException $e) { + $success = false; + } + } + + return $success; + } + + /** + * Move a file to a new location. + * + * @param string $path + * @param string $target + * @return bool + */ + public function move($path, $target) + { + return rename($path, $target); + } + + /** + * Copy a file to a new location. + * + * @param string $path + * @param string $target + * @return bool + */ + public function copy($path, $target) + { + return copy($path, $target); + } + + /** + * Create a hard link to the target file or directory. + * + * @param string $target + * @param string $link + * @return void + */ + public function link($target, $link) + { + if (! windows_os()) { + return symlink($target, $link); + } + + $mode = $this->isDirectory($target) ? 'J' : 'H'; + + exec("mklink /{$mode} \"{$link}\" \"{$target}\""); + } + + /** + * Extract the file name from a file path. + * + * @param string $path + * @return string + */ + public function name($path) + { + return pathinfo($path, PATHINFO_FILENAME); + } + + /** + * Extract the trailing name component from a file path. + * + * @param string $path + * @return string + */ + public function basename($path) + { + return pathinfo($path, PATHINFO_BASENAME); + } + + /** + * Extract the parent directory from a file path. + * + * @param string $path + * @return string + */ + public function dirname($path) + { + return pathinfo($path, PATHINFO_DIRNAME); + } + + /** + * Extract the file extension from a file path. + * + * @param string $path + * @return string + */ + public function extension($path) + { + return pathinfo($path, PATHINFO_EXTENSION); + } + + /** + * Get the file type of a given file. + * + * @param string $path + * @return string + */ + public function type($path) + { + return filetype($path); + } + + /** + * Get the mime-type of a given file. + * + * @param string $path + * @return string|false + */ + public function mimeType($path) + { + return finfo_file(finfo_open(FILEINFO_MIME_TYPE), $path); + } + + /** + * Get the file size of a given file. + * + * @param string $path + * @return int + */ + public function size($path) + { + return filesize($path); + } + + /** + * Get the file's last modification time. + * + * @param string $path + * @return int + */ + public function lastModified($path) + { + return filemtime($path); + } + + /** + * Determine if the given path is a directory. + * + * @param string $directory + * @return bool + */ + public function isDirectory($directory) + { + return is_dir($directory); + } + + /** + * Determine if the given path is readable. + * + * @param string $path + * @return bool + */ + public function isReadable($path) + { + return is_readable($path); + } + + /** + * Determine if the given path is writable. + * + * @param string $path + * @return bool + */ + public function isWritable($path) + { + return is_writable($path); + } + + /** + * Determine if the given path is a file. + * + * @param string $file + * @return bool + */ + public function isFile($file) + { + return is_file($file); + } + + /** + * Find path names matching a given pattern. + * + * @param string $pattern + * @param int $flags + * @return array + */ + public function glob($pattern, $flags = 0) + { + return glob($pattern, $flags); + } + + /** + * Get an array of all files in a directory. + * + * @param string $directory + * @return array + */ + public function files($directory) + { + $glob = glob($directory.'/*'); + + if ($glob === false) { + return []; + } + + // To get the appropriate files, we'll simply glob the directory and filter + // out any "files" that are not truly files so we do not end up with any + // directories in our list, but only true files within the directory. + return array_filter($glob, function ($file) { + return filetype($file) == 'file'; + }); + } + + /** + * Get all of the files from the given directory (recursive). + * + * @param string $directory + * @param bool $hidden + * @return array + */ + public function allFiles($directory, $hidden = false) + { + return iterator_to_array(Finder::create()->files()->ignoreDotFiles(! $hidden)->in($directory), false); + } + + /** + * Get all of the directories within a given directory. + * + * @param string $directory + * @return array + */ + public function directories($directory) + { + $directories = []; + + foreach (Finder::create()->in($directory)->directories()->depth(0) as $dir) { + $directories[] = $dir->getPathname(); + } + + return $directories; + } + + /** + * Create a directory. + * + * @param string $path + * @param int $mode + * @param bool $recursive + * @param bool $force + * @return bool + */ + public function makeDirectory($path, $mode = 0755, $recursive = false, $force = false) + { + if ($force) { + return @mkdir($path, $mode, $recursive); + } + + return mkdir($path, $mode, $recursive); + } + + /** + * Move a directory. + * + * @param string $from + * @param string $to + * @param bool $overwrite + * @return bool + */ + public function moveDirectory($from, $to, $overwrite = false) + { + if ($overwrite && $this->isDirectory($to)) { + if (! $this->deleteDirectory($to)) { + return false; + } + } + + return @rename($from, $to) === true; + } + + /** + * Copy a directory from one location to another. + * + * @param string $directory + * @param string $destination + * @param int $options + * @return bool + */ + public function copyDirectory($directory, $destination, $options = null) + { + if (! $this->isDirectory($directory)) { + return false; + } + + $options = $options ?: FilesystemIterator::SKIP_DOTS; + + // If the destination directory does not actually exist, we will go ahead and + // create it recursively, which just gets the destination prepared to copy + // the files over. Once we make the directory we'll proceed the copying. + if (! $this->isDirectory($destination)) { + $this->makeDirectory($destination, 0777, true); + } + + $items = new FilesystemIterator($directory, $options); + + foreach ($items as $item) { + // As we spin through items, we will check to see if the current file is actually + // a directory or a file. When it is actually a directory we will need to call + // back into this function recursively to keep copying these nested folders. + $target = $destination.'/'.$item->getBasename(); + + if ($item->isDir()) { + $path = $item->getPathname(); + + if (! $this->copyDirectory($path, $target, $options)) { + return false; + } + } + + // If the current items is just a regular file, we will just copy this to the new + // location and keep looping. If for some reason the copy fails we'll bail out + // and return false, so the developer is aware that the copy process failed. + else { + if (! $this->copy($item->getPathname(), $target)) { + return false; + } + } + } + + return true; + } + + /** + * Recursively delete a directory. + * + * The directory itself may be optionally preserved. + * + * @param string $directory + * @param bool $preserve + * @return bool + */ + public function deleteDirectory($directory, $preserve = false) + { + if (! $this->isDirectory($directory)) { + return false; + } + + $items = new FilesystemIterator($directory); + + foreach ($items as $item) { + // If the item is a directory, we can just recurse into the function and + // delete that sub-directory otherwise we'll just delete the file and + // keep iterating through each file until the directory is cleaned. + if ($item->isDir() && ! $item->isLink()) { + $this->deleteDirectory($item->getPathname()); + } + + // If the item is just a file, we can go ahead and delete it since we're + // just looping through and waxing all of the files in this directory + // and calling directories recursively, so we delete the real path. + else { + $this->delete($item->getPathname()); + } + } + + if (! $preserve) { + @rmdir($directory); + } + + return true; + } + + /** + * Empty the specified directory of all files and folders. + * + * @param string $directory + * @return bool + */ + public function cleanDirectory($directory) + { + return $this->deleteDirectory($directory, true); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemAdapter.php b/vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemAdapter.php new file mode 100644 index 0000000..12cd5d5 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemAdapter.php @@ -0,0 +1,504 @@ +driver = $driver; + } + + /** + * Assert that the given file exists. + * + * @param string $path + * @return void + */ + public function assertExists($path) + { + PHPUnit::assertTrue( + $this->exists($path), "Unable to find a file at path [{$path}]." + ); + } + + /** + * Assert that the given file does not exist. + * + * @param string $path + * @return void + */ + public function assertMissing($path) + { + PHPUnit::assertFalse( + $this->exists($path), "Found unexpected file at path [{$path}]." + ); + } + + /** + * Determine if a file exists. + * + * @param string $path + * @return bool + */ + public function exists($path) + { + return $this->driver->has($path); + } + + /** + * Get the contents of a file. + * + * @param string $path + * @return string + * + * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException + */ + public function get($path) + { + try { + return $this->driver->read($path); + } catch (FileNotFoundException $e) { + throw new ContractFileNotFoundException($path, $e->getCode(), $e); + } + } + + /** + * Write the contents of a file. + * + * @param string $path + * @param string|resource $contents + * @param array $options + * @return bool + */ + public function put($path, $contents, $options = []) + { + if (is_string($options)) { + $options = ['visibility' => $options]; + } + + // If the given contents is actually a file or uploaded file instance than we will + // automatically store the file using a stream. This provides a convenient path + // for the developer to store streams without managing them manually in code. + if ($contents instanceof File || + $contents instanceof UploadedFile) { + return $this->putFile($path, $contents, $options); + } + + return is_resource($contents) + ? $this->driver->putStream($path, $contents, $options) + : $this->driver->put($path, $contents, $options); + } + + /** + * Store the uploaded file on the disk. + * + * @param string $path + * @param \Illuminate\Http\UploadedFile $file + * @param array $options + * @return string|false + */ + public function putFile($path, $file, $options = []) + { + return $this->putFileAs($path, $file, $file->hashName(), $options); + } + + /** + * Store the uploaded file on the disk with a given name. + * + * @param string $path + * @param \Illuminate\Http\File|\Illuminate\Http\UploadedFile $file + * @param string $name + * @param array $options + * @return string|false + */ + public function putFileAs($path, $file, $name, $options = []) + { + $stream = fopen($file->getRealPath(), 'r+'); + + // Next, we will format the path of the file and store the file using a stream since + // they provide better performance than alternatives. Once we write the file this + // stream will get closed automatically by us so the developer doesn't have to. + $result = $this->put( + $path = trim($path.'/'.$name, '/'), $stream, $options + ); + + if (is_resource($stream)) { + fclose($stream); + } + + return $result ? $path : false; + } + + /** + * Get the visibility for the given path. + * + * @param string $path + * @return string + */ + public function getVisibility($path) + { + if ($this->driver->getVisibility($path) == AdapterInterface::VISIBILITY_PUBLIC) { + return FilesystemContract::VISIBILITY_PUBLIC; + } + + return FilesystemContract::VISIBILITY_PRIVATE; + } + + /** + * Set the visibility for the given path. + * + * @param string $path + * @param string $visibility + * @return void + */ + public function setVisibility($path, $visibility) + { + return $this->driver->setVisibility($path, $this->parseVisibility($visibility)); + } + + /** + * Prepend to a file. + * + * @param string $path + * @param string $data + * @param string $separator + * @return int + */ + public function prepend($path, $data, $separator = PHP_EOL) + { + if ($this->exists($path)) { + return $this->put($path, $data.$separator.$this->get($path)); + } + + return $this->put($path, $data); + } + + /** + * Append to a file. + * + * @param string $path + * @param string $data + * @param string $separator + * @return int + */ + public function append($path, $data, $separator = PHP_EOL) + { + if ($this->exists($path)) { + return $this->put($path, $this->get($path).$separator.$data); + } + + return $this->put($path, $data); + } + + /** + * Delete the file at a given path. + * + * @param string|array $paths + * @return bool + */ + public function delete($paths) + { + $paths = is_array($paths) ? $paths : func_get_args(); + + $success = true; + + foreach ($paths as $path) { + try { + if (! $this->driver->delete($path)) { + $success = false; + } + } catch (FileNotFoundException $e) { + $success = false; + } + } + + return $success; + } + + /** + * Copy a file to a new location. + * + * @param string $from + * @param string $to + * @return bool + */ + public function copy($from, $to) + { + return $this->driver->copy($from, $to); + } + + /** + * Move a file to a new location. + * + * @param string $from + * @param string $to + * @return bool + */ + public function move($from, $to) + { + return $this->driver->rename($from, $to); + } + + /** + * Get the file size of a given file. + * + * @param string $path + * @return int + */ + public function size($path) + { + return $this->driver->getSize($path); + } + + /** + * Get the mime-type of a given file. + * + * @param string $path + * @return string|false + */ + public function mimeType($path) + { + return $this->driver->getMimetype($path); + } + + /** + * Get the file's last modification time. + * + * @param string $path + * @return int + */ + public function lastModified($path) + { + return $this->driver->getTimestamp($path); + } + + /** + * Get the URL for the file at the given path. + * + * @param string $path + * @return string + */ + public function url($path) + { + $adapter = $this->driver->getAdapter(); + + if (method_exists($adapter, 'getUrl')) { + return $adapter->getUrl($path); + } elseif ($adapter instanceof AwsS3Adapter) { + return $this->getAwsUrl($adapter, $path); + } elseif ($adapter instanceof LocalAdapter) { + return $this->getLocalUrl($path); + } else { + throw new RuntimeException('This driver does not support retrieving URLs.'); + } + } + + /** + * Get the URL for the file at the given path. + * + * @param \League\Flysystem\AwsS3v3\AwsS3Adapter $adapter + * @param string $path + * @return string + */ + protected function getAwsUrl($adapter, $path) + { + return $adapter->getClient()->getObjectUrl( + $adapter->getBucket(), $adapter->getPathPrefix().$path + ); + } + + /** + * Get the URL for the file at the given path. + * + * @param string $path + * @return string + */ + protected function getLocalUrl($path) + { + $config = $this->driver->getConfig(); + + // If an explicit base URL has been set on the disk configuration then we will use + // it as the base URL instead of the default path. This allows the developer to + // have full control over the base path for this filesystem's generated URLs. + if ($config->has('url')) { + return rtrim($config->get('url'), '/').'/'.ltrim($path, '/'); + } + + $path = '/storage/'.$path; + + // If the path contains "storage/public", it probably means the developer is using + // the default disk to generate the path instead of the "public" disk like they + // are really supposed to use. We will remove the public from this path here. + if (Str::contains($path, '/storage/public/')) { + return Str::replaceFirst('/public/', '/', $path); + } else { + return $path; + } + } + + /** + * Get an array of all files in a directory. + * + * @param string|null $directory + * @param bool $recursive + * @return array + */ + public function files($directory = null, $recursive = false) + { + $contents = $this->driver->listContents($directory, $recursive); + + return $this->filterContentsByType($contents, 'file'); + } + + /** + * Get all of the files from the given directory (recursive). + * + * @param string|null $directory + * @return array + */ + public function allFiles($directory = null) + { + return $this->files($directory, true); + } + + /** + * Get all of the directories within a given directory. + * + * @param string|null $directory + * @param bool $recursive + * @return array + */ + public function directories($directory = null, $recursive = false) + { + $contents = $this->driver->listContents($directory, $recursive); + + return $this->filterContentsByType($contents, 'dir'); + } + + /** + * Get all (recursive) of the directories within a given directory. + * + * @param string|null $directory + * @return array + */ + public function allDirectories($directory = null) + { + return $this->directories($directory, true); + } + + /** + * Create a directory. + * + * @param string $path + * @return bool + */ + public function makeDirectory($path) + { + return $this->driver->createDir($path); + } + + /** + * Recursively delete a directory. + * + * @param string $directory + * @return bool + */ + public function deleteDirectory($directory) + { + return $this->driver->deleteDir($directory); + } + + /** + * Get the Flysystem driver. + * + * @return \League\Flysystem\FilesystemInterface + */ + public function getDriver() + { + return $this->driver; + } + + /** + * Filter directory contents by type. + * + * @param array $contents + * @param string $type + * @return array + */ + protected function filterContentsByType($contents, $type) + { + return Collection::make($contents) + ->where('type', $type) + ->pluck('path') + ->values() + ->all(); + } + + /** + * Parse the given visibility value. + * + * @param string|null $visibility + * @return string|null + * + * @throws \InvalidArgumentException + */ + protected function parseVisibility($visibility) + { + if (is_null($visibility)) { + return; + } + + switch ($visibility) { + case FilesystemContract::VISIBILITY_PUBLIC: + return AdapterInterface::VISIBILITY_PUBLIC; + case FilesystemContract::VISIBILITY_PRIVATE: + return AdapterInterface::VISIBILITY_PRIVATE; + } + + throw new InvalidArgumentException('Unknown visibility: '.$visibility); + } + + /** + * Pass dynamic methods call onto Flysystem. + * + * @param string $method + * @param array $parameters + * @return mixed + * + * @throws \BadMethodCallException + */ + public function __call($method, array $parameters) + { + return call_user_func_array([$this->driver, $method], $parameters); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemManager.php b/vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemManager.php new file mode 100644 index 0000000..db19429 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemManager.php @@ -0,0 +1,342 @@ +app = $app; + } + + /** + * Get a filesystem instance. + * + * @param string $name + * @return \Illuminate\Contracts\Filesystem\Filesystem + */ + public function drive($name = null) + { + return $this->disk($name); + } + + /** + * Get a filesystem instance. + * + * @param string $name + * @return \Illuminate\Contracts\Filesystem\Filesystem + */ + public function disk($name = null) + { + $name = $name ?: $this->getDefaultDriver(); + + return $this->disks[$name] = $this->get($name); + } + + /** + * Get a default cloud filesystem instance. + * + * @return \Illuminate\Contracts\Filesystem\Filesystem + */ + public function cloud() + { + $name = $this->getDefaultCloudDriver(); + + return $this->disks[$name] = $this->get($name); + } + + /** + * Attempt to get the disk from the local cache. + * + * @param string $name + * @return \Illuminate\Contracts\Filesystem\Filesystem + */ + protected function get($name) + { + return isset($this->disks[$name]) ? $this->disks[$name] : $this->resolve($name); + } + + /** + * Resolve the given disk. + * + * @param string $name + * @return \Illuminate\Contracts\Filesystem\Filesystem + * + * @throws \InvalidArgumentException + */ + protected function resolve($name) + { + $config = $this->getConfig($name); + + if (isset($this->customCreators[$config['driver']])) { + return $this->callCustomCreator($config); + } + + $driverMethod = 'create'.ucfirst($config['driver']).'Driver'; + + if (method_exists($this, $driverMethod)) { + return $this->{$driverMethod}($config); + } else { + throw new InvalidArgumentException("Driver [{$config['driver']}] is not supported."); + } + } + + /** + * Call a custom driver creator. + * + * @param array $config + * @return \Illuminate\Contracts\Filesystem\Filesystem + */ + protected function callCustomCreator(array $config) + { + $driver = $this->customCreators[$config['driver']]($this->app, $config); + + if ($driver instanceof FilesystemInterface) { + return $this->adapt($driver); + } + + return $driver; + } + + /** + * Create an instance of the local driver. + * + * @param array $config + * @return \Illuminate\Contracts\Filesystem\Filesystem + */ + public function createLocalDriver(array $config) + { + $permissions = isset($config['permissions']) ? $config['permissions'] : []; + + $links = Arr::get($config, 'links') === 'skip' + ? LocalAdapter::SKIP_LINKS + : LocalAdapter::DISALLOW_LINKS; + + return $this->adapt($this->createFlysystem(new LocalAdapter( + $config['root'], LOCK_EX, $links, $permissions + ), $config)); + } + + /** + * Create an instance of the ftp driver. + * + * @param array $config + * @return \Illuminate\Contracts\Filesystem\Filesystem + */ + public function createFtpDriver(array $config) + { + $ftpConfig = Arr::only($config, [ + 'host', 'username', 'password', 'port', 'root', 'passive', 'ssl', 'timeout', + ]); + + return $this->adapt($this->createFlysystem( + new FtpAdapter($ftpConfig), $config + )); + } + + /** + * Create an instance of the Amazon S3 driver. + * + * @param array $config + * @return \Illuminate\Contracts\Filesystem\Cloud + */ + public function createS3Driver(array $config) + { + $s3Config = $this->formatS3Config($config); + + $root = isset($s3Config['root']) ? $s3Config['root'] : null; + + $options = isset($config['options']) ? $config['options'] : []; + + return $this->adapt($this->createFlysystem( + new S3Adapter(new S3Client($s3Config), $s3Config['bucket'], $root, $options), $config + )); + } + + /** + * Format the given S3 configuration with the default options. + * + * @param array $config + * @return array + */ + protected function formatS3Config(array $config) + { + $config += ['version' => 'latest']; + + if ($config['key'] && $config['secret']) { + $config['credentials'] = Arr::only($config, ['key', 'secret']); + } + + return $config; + } + + /** + * Create an instance of the Rackspace driver. + * + * @param array $config + * @return \Illuminate\Contracts\Filesystem\Cloud + */ + public function createRackspaceDriver(array $config) + { + $client = new Rackspace($config['endpoint'], [ + 'username' => $config['username'], 'apiKey' => $config['key'], + ]); + + $root = isset($config['root']) ? $config['root'] : null; + + return $this->adapt($this->createFlysystem( + new RackspaceAdapter($this->getRackspaceContainer($client, $config), $root), $config + )); + } + + /** + * Get the Rackspace Cloud Files container. + * + * @param \OpenCloud\Rackspace $client + * @param array $config + * @return \OpenCloud\ObjectStore\Resource\Container + */ + protected function getRackspaceContainer(Rackspace $client, array $config) + { + $urlType = Arr::get($config, 'url_type'); + + $store = $client->objectStoreService('cloudFiles', $config['region'], $urlType); + + return $store->getContainer($config['container']); + } + + /** + * Create a Flysystem instance with the given adapter. + * + * @param \League\Flysystem\AdapterInterface $adapter + * @param array $config + * @return \League\Flysystem\FlysystemInterface + */ + protected function createFlysystem(AdapterInterface $adapter, array $config) + { + $config = Arr::only($config, ['visibility', 'disable_asserts', 'url']); + + return new Flysystem($adapter, count($config) > 0 ? $config : null); + } + + /** + * Adapt the filesystem implementation. + * + * @param \League\Flysystem\FilesystemInterface $filesystem + * @return \Illuminate\Contracts\Filesystem\Filesystem + */ + protected function adapt(FilesystemInterface $filesystem) + { + return new FilesystemAdapter($filesystem); + } + + /** + * Set the given disk instance. + * + * @param string $name + * @param mixed $disk + * @return void + */ + public function set($name, $disk) + { + $this->disks[$name] = $disk; + } + + /** + * Get the filesystem connection configuration. + * + * @param string $name + * @return array + */ + protected function getConfig($name) + { + return $this->app['config']["filesystems.disks.{$name}"]; + } + + /** + * Get the default driver name. + * + * @return string + */ + public function getDefaultDriver() + { + return $this->app['config']['filesystems.default']; + } + + /** + * Get the default cloud driver name. + * + * @return string + */ + public function getDefaultCloudDriver() + { + return $this->app['config']['filesystems.cloud']; + } + + /** + * Register a custom driver creator Closure. + * + * @param string $driver + * @param \Closure $callback + * @return $this + */ + public function extend($driver, Closure $callback) + { + $this->customCreators[$driver] = $callback; + + return $this; + } + + /** + * Dynamically call the default driver instance. + * + * @param string $method + * @param array $parameters + * @return mixed + */ + public function __call($method, $parameters) + { + return $this->disk()->$method(...$parameters); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemServiceProvider.php new file mode 100644 index 0000000..6932270 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemServiceProvider.php @@ -0,0 +1,82 @@ +registerNativeFilesystem(); + + $this->registerFlysystem(); + } + + /** + * Register the native filesystem implementation. + * + * @return void + */ + protected function registerNativeFilesystem() + { + $this->app->singleton('files', function () { + return new Filesystem; + }); + } + + /** + * Register the driver based filesystem. + * + * @return void + */ + protected function registerFlysystem() + { + $this->registerManager(); + + $this->app->singleton('filesystem.disk', function () { + return $this->app['filesystem']->disk($this->getDefaultDriver()); + }); + + $this->app->singleton('filesystem.cloud', function () { + return $this->app['filesystem']->disk($this->getCloudDriver()); + }); + } + + /** + * Register the filesystem manager. + * + * @return void + */ + protected function registerManager() + { + $this->app->singleton('filesystem', function () { + return new FilesystemManager($this->app); + }); + } + + /** + * Get the default file driver. + * + * @return string + */ + protected function getDefaultDriver() + { + return $this->app['config']['filesystems.default']; + } + + /** + * Get the default cloud based file driver. + * + * @return string + */ + protected function getCloudDriver() + { + return $this->app['config']['filesystems.cloud']; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Filesystem/composer.json b/vendor/laravel/framework/src/Illuminate/Filesystem/composer.json new file mode 100644 index 0000000..2dc0f7a --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Filesystem/composer.json @@ -0,0 +1,41 @@ +{ + "name": "illuminate/filesystem", + "description": "The Illuminate Filesystem package.", + "license": "MIT", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "require": { + "php": ">=5.6.4", + "illuminate/contracts": "5.4.*", + "illuminate/support": "5.4.*", + "symfony/finder": "~3.2" + }, + "autoload": { + "psr-4": { + "Illuminate\\Filesystem\\": "" + } + }, + "extra": { + "branch-alias": { + "dev-master": "5.4-dev" + } + }, + "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)." + }, + "config": { + "sort-packages": true + }, + "minimum-stability": "dev" +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/AliasLoader.php b/vendor/laravel/framework/src/Illuminate/Foundation/AliasLoader.php new file mode 100755 index 0000000..4d9e684 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/AliasLoader.php @@ -0,0 +1,242 @@ +aliases = $aliases; + } + + /** + * Get or create the singleton alias loader instance. + * + * @param array $aliases + * @return \Illuminate\Foundation\AliasLoader + */ + public static function getInstance(array $aliases = []) + { + if (is_null(static::$instance)) { + return static::$instance = new static($aliases); + } + + $aliases = array_merge(static::$instance->getAliases(), $aliases); + + static::$instance->setAliases($aliases); + + return static::$instance; + } + + /** + * Load a class alias if it is registered. + * + * @param string $alias + * @return bool|null + */ + public function load($alias) + { + if (static::$facadeNamespace && strpos($alias, static::$facadeNamespace) === 0) { + $this->loadFacade($alias); + + return true; + } + + if (isset($this->aliases[$alias])) { + return class_alias($this->aliases[$alias], $alias); + } + } + + /** + * Load a real-time facade for the given alias. + * + * @param string $alias + * @return void + */ + protected function loadFacade($alias) + { + require $this->ensureFacadeExists($alias); + } + + /** + * Ensure that the given alias has an existing real-time facade class. + * + * @param string $alias + * @return string + */ + protected function ensureFacadeExists($alias) + { + if (file_exists($path = storage_path('framework/cache/facade-'.sha1($alias).'.php'))) { + return $path; + } + + file_put_contents($path, $this->formatFacadeStub( + $alias, file_get_contents(__DIR__.'/stubs/facade.stub') + )); + + return $path; + } + + /** + * Format the facade stub with the proper namespace and class. + * + * @param string $alias + * @param string $stub + * @return string + */ + protected function formatFacadeStub($alias, $stub) + { + $replacements = [ + str_replace('/', '\\', dirname(str_replace('\\', '/', $alias))), + class_basename($alias), + substr($alias, strlen(static::$facadeNamespace)), + ]; + + return str_replace( + ['DummyNamespace', 'DummyClass', 'DummyTarget'], $replacements, $stub + ); + } + + /** + * Add an alias to the loader. + * + * @param string $class + * @param string $alias + * @return void + */ + public function alias($class, $alias) + { + $this->aliases[$class] = $alias; + } + + /** + * Register the loader on the auto-loader stack. + * + * @return void + */ + public function register() + { + if (! $this->registered) { + $this->prependToLoaderStack(); + + $this->registered = true; + } + } + + /** + * Prepend the load method to the auto-loader stack. + * + * @return void + */ + protected function prependToLoaderStack() + { + spl_autoload_register([$this, 'load'], true, true); + } + + /** + * Get the registered aliases. + * + * @return array + */ + public function getAliases() + { + return $this->aliases; + } + + /** + * Set the registered aliases. + * + * @param array $aliases + * @return void + */ + public function setAliases(array $aliases) + { + $this->aliases = $aliases; + } + + /** + * Indicates if the loader has been registered. + * + * @return bool + */ + public function isRegistered() + { + return $this->registered; + } + + /** + * Set the "registered" state of the loader. + * + * @param bool $value + * @return void + */ + public function setRegistered($value) + { + $this->registered = $value; + } + + /** + * Set the real-time facade namespace. + * + * @param string $namespace + * @return void + */ + public static function setFacadeNamespace($namespace) + { + static::$facadeNamespace = rtrim($namespace, '\\').'\\'; + } + + /** + * Set the value of the singleton alias loader. + * + * @param \Illuminate\Foundation\AliasLoader $loader + * @return void + */ + public static function setInstance($loader) + { + static::$instance = $loader; + } + + /** + * Clone method. + * + * @return void + */ + private function __clone() + { + // + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Application.php b/vendor/laravel/framework/src/Illuminate/Foundation/Application.php new file mode 100755 index 0000000..f4b4de8 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Application.php @@ -0,0 +1,1155 @@ +setBasePath($basePath); + } + + $this->registerBaseBindings(); + + $this->registerBaseServiceProviders(); + + $this->registerCoreContainerAliases(); + } + + /** + * Get the version number of the application. + * + * @return string + */ + public function version() + { + return static::VERSION; + } + + /** + * Register the basic bindings into the container. + * + * @return void + */ + protected function registerBaseBindings() + { + static::setInstance($this); + + $this->instance('app', $this); + + $this->instance(Container::class, $this); + } + + /** + * Register all of the base service providers. + * + * @return void + */ + protected function registerBaseServiceProviders() + { + $this->register(new EventServiceProvider($this)); + + $this->register(new LogServiceProvider($this)); + + $this->register(new RoutingServiceProvider($this)); + } + + /** + * Run the given array of bootstrap classes. + * + * @param array $bootstrappers + * @return void + */ + public function bootstrapWith(array $bootstrappers) + { + $this->hasBeenBootstrapped = true; + + foreach ($bootstrappers as $bootstrapper) { + $this['events']->fire('bootstrapping: '.$bootstrapper, [$this]); + + $this->make($bootstrapper)->bootstrap($this); + + $this['events']->fire('bootstrapped: '.$bootstrapper, [$this]); + } + } + + /** + * Register a callback to run after loading the environment. + * + * @param \Closure $callback + * @return void + */ + public function afterLoadingEnvironment(Closure $callback) + { + return $this->afterBootstrapping( + LoadEnvironmentVariables::class, $callback + ); + } + + /** + * Register a callback to run before a bootstrapper. + * + * @param string $bootstrapper + * @param Closure $callback + * @return void + */ + public function beforeBootstrapping($bootstrapper, Closure $callback) + { + $this['events']->listen('bootstrapping: '.$bootstrapper, $callback); + } + + /** + * Register a callback to run after a bootstrapper. + * + * @param string $bootstrapper + * @param Closure $callback + * @return void + */ + public function afterBootstrapping($bootstrapper, Closure $callback) + { + $this['events']->listen('bootstrapped: '.$bootstrapper, $callback); + } + + /** + * Determine if the application has been bootstrapped before. + * + * @return bool + */ + public function hasBeenBootstrapped() + { + return $this->hasBeenBootstrapped; + } + + /** + * Set the base path for the application. + * + * @param string $basePath + * @return $this + */ + public function setBasePath($basePath) + { + $this->basePath = rtrim($basePath, '\/'); + + $this->bindPathsInContainer(); + + return $this; + } + + /** + * Bind all of the application paths in the container. + * + * @return void + */ + protected function bindPathsInContainer() + { + $this->instance('path', $this->path()); + $this->instance('path.base', $this->basePath()); + $this->instance('path.lang', $this->langPath()); + $this->instance('path.config', $this->configPath()); + $this->instance('path.public', $this->publicPath()); + $this->instance('path.storage', $this->storagePath()); + $this->instance('path.database', $this->databasePath()); + $this->instance('path.resources', $this->resourcePath()); + $this->instance('path.bootstrap', $this->bootstrapPath()); + } + + /** + * Get the path to the application "app" directory. + * + * @param string $path Optionally, a path to append to the app path + * @return string + */ + public function path($path = '') + { + return $this->basePath.DIRECTORY_SEPARATOR.'app'.($path ? DIRECTORY_SEPARATOR.$path : $path); + } + + /** + * Get the base path of the Laravel installation. + * + * @param string $path Optionally, a path to append to the base path + * @return string + */ + public function basePath($path = '') + { + return $this->basePath.($path ? DIRECTORY_SEPARATOR.$path : $path); + } + + /** + * Get the path to the bootstrap directory. + * + * @param string $path Optionally, a path to append to the bootstrap path + * @return string + */ + public function bootstrapPath($path = '') + { + return $this->basePath.DIRECTORY_SEPARATOR.'bootstrap'.($path ? DIRECTORY_SEPARATOR.$path : $path); + } + + /** + * Get the path to the application configuration files. + * + * @param string $path Optionally, a path to append to the config path + * @return string + */ + public function configPath($path = '') + { + return $this->basePath.DIRECTORY_SEPARATOR.'config'.($path ? DIRECTORY_SEPARATOR.$path : $path); + } + + /** + * Get the path to the database directory. + * + * @param string $path Optionally, a path to append to the database path + * @return string + */ + public function databasePath($path = '') + { + return ($this->databasePath ?: $this->basePath.DIRECTORY_SEPARATOR.'database').($path ? DIRECTORY_SEPARATOR.$path : $path); + } + + /** + * Set the database directory. + * + * @param string $path + * @return $this + */ + public function useDatabasePath($path) + { + $this->databasePath = $path; + + $this->instance('path.database', $path); + + return $this; + } + + /** + * Get the path to the language files. + * + * @return string + */ + public function langPath() + { + return $this->resourcePath().DIRECTORY_SEPARATOR.'lang'; + } + + /** + * Get the path to the public / web directory. + * + * @return string + */ + public function publicPath() + { + return $this->basePath.DIRECTORY_SEPARATOR.'public'; + } + + /** + * Get the path to the storage directory. + * + * @return string + */ + public function storagePath() + { + return $this->storagePath ?: $this->basePath.DIRECTORY_SEPARATOR.'storage'; + } + + /** + * Set the storage directory. + * + * @param string $path + * @return $this + */ + public function useStoragePath($path) + { + $this->storagePath = $path; + + $this->instance('path.storage', $path); + + return $this; + } + + /** + * Get the path to the resources directory. + * + * @param string $path + * @return string + */ + public function resourcePath($path = '') + { + return $this->basePath.DIRECTORY_SEPARATOR.'resources'.($path ? DIRECTORY_SEPARATOR.$path : $path); + } + + /** + * Get the path to the environment file directory. + * + * @return string + */ + public function environmentPath() + { + return $this->environmentPath ?: $this->basePath; + } + + /** + * Set the directory for the environment file. + * + * @param string $path + * @return $this + */ + public function useEnvironmentPath($path) + { + $this->environmentPath = $path; + + return $this; + } + + /** + * Set the environment file to be loaded during bootstrapping. + * + * @param string $file + * @return $this + */ + public function loadEnvironmentFrom($file) + { + $this->environmentFile = $file; + + return $this; + } + + /** + * Get the environment file the application is using. + * + * @return string + */ + public function environmentFile() + { + return $this->environmentFile ?: '.env'; + } + + /** + * Get the fully qualified path to the environment file. + * + * @return string + */ + public function environmentFilePath() + { + return $this->environmentPath().'/'.$this->environmentFile(); + } + + /** + * Get or check the current application environment. + * + * @return string|bool + */ + public function environment() + { + if (func_num_args() > 0) { + $patterns = is_array(func_get_arg(0)) ? func_get_arg(0) : func_get_args(); + + foreach ($patterns as $pattern) { + if (Str::is($pattern, $this['env'])) { + return true; + } + } + + return false; + } + + return $this['env']; + } + + /** + * Determine if application is in local environment. + * + * @return bool + */ + public function isLocal() + { + return $this['env'] == 'local'; + } + + /** + * Detect the application's current environment. + * + * @param \Closure $callback + * @return string + */ + public function detectEnvironment(Closure $callback) + { + $args = isset($_SERVER['argv']) ? $_SERVER['argv'] : null; + + return $this['env'] = (new EnvironmentDetector())->detect($callback, $args); + } + + /** + * Determine if we are running in the console. + * + * @return bool + */ + public function runningInConsole() + { + return php_sapi_name() == 'cli' || php_sapi_name() == 'phpdbg'; + } + + /** + * Determine if we are running unit tests. + * + * @return bool + */ + public function runningUnitTests() + { + return $this['env'] == 'testing'; + } + + /** + * Register all of the configured providers. + * + * @return void + */ + public function registerConfiguredProviders() + { + (new ProviderRepository($this, new Filesystem, $this->getCachedServicesPath())) + ->load($this->config['app.providers']); + } + + /** + * Register a service provider with the application. + * + * @param \Illuminate\Support\ServiceProvider|string $provider + * @param array $options + * @param bool $force + * @return \Illuminate\Support\ServiceProvider + */ + public function register($provider, $options = [], $force = false) + { + if (($registered = $this->getProvider($provider)) && ! $force) { + return $registered; + } + + // If the given "provider" is a string, we will resolve it, passing in the + // application instance automatically for the developer. This is simply + // a more convenient way of specifying your service provider classes. + if (is_string($provider)) { + $provider = $this->resolveProvider($provider); + } + + if (method_exists($provider, 'register')) { + $provider->register(); + } + + $this->markAsRegistered($provider); + + // If the application has already booted, we will call this boot method on + // the provider class so it has an opportunity to do its boot logic and + // will be ready for any usage by this developer's application logic. + if ($this->booted) { + $this->bootProvider($provider); + } + + return $provider; + } + + /** + * Get the registered service provider instance if it exists. + * + * @param \Illuminate\Support\ServiceProvider|string $provider + * @return \Illuminate\Support\ServiceProvider|null + */ + public function getProvider($provider) + { + $name = is_string($provider) ? $provider : get_class($provider); + + return Arr::first($this->serviceProviders, function ($value) use ($name) { + return $value instanceof $name; + }); + } + + /** + * Resolve a service provider instance from the class name. + * + * @param string $provider + * @return \Illuminate\Support\ServiceProvider + */ + public function resolveProvider($provider) + { + return new $provider($this); + } + + /** + * Mark the given provider as registered. + * + * @param \Illuminate\Support\ServiceProvider $provider + * @return void + */ + protected function markAsRegistered($provider) + { + $this->serviceProviders[] = $provider; + + $this->loadedProviders[get_class($provider)] = true; + } + + /** + * Load and boot all of the remaining deferred providers. + * + * @return void + */ + public function loadDeferredProviders() + { + // We will simply spin through each of the deferred providers and register each + // one and boot them if the application has booted. This should make each of + // the remaining services available to this application for immediate use. + foreach ($this->deferredServices as $service => $provider) { + $this->loadDeferredProvider($service); + } + + $this->deferredServices = []; + } + + /** + * Load the provider for a deferred service. + * + * @param string $service + * @return void + */ + public function loadDeferredProvider($service) + { + if (! isset($this->deferredServices[$service])) { + return; + } + + $provider = $this->deferredServices[$service]; + + // If the service provider has not already been loaded and registered we can + // register it with the application and remove the service from this list + // of deferred services, since it will already be loaded on subsequent. + if (! isset($this->loadedProviders[$provider])) { + $this->registerDeferredProvider($provider, $service); + } + } + + /** + * Register a deferred provider and service. + * + * @param string $provider + * @param string $service + * @return void + */ + public function registerDeferredProvider($provider, $service = null) + { + // Once the provider that provides the deferred service has been registered we + // will remove it from our local list of the deferred services with related + // providers so that this container does not try to resolve it out again. + if ($service) { + unset($this->deferredServices[$service]); + } + + $this->register($instance = new $provider($this)); + + if (! $this->booted) { + $this->booting(function () use ($instance) { + $this->bootProvider($instance); + }); + } + } + + /** + * Resolve the given type from the container. + * + * (Overriding Container::make) + * + * @param string $abstract + * @return mixed + */ + public function make($abstract) + { + $abstract = $this->getAlias($abstract); + + if (isset($this->deferredServices[$abstract])) { + $this->loadDeferredProvider($abstract); + } + + return parent::make($abstract); + } + + /** + * Determine if the given abstract type has been bound. + * + * (Overriding Container::bound) + * + * @param string $abstract + * @return bool + */ + public function bound($abstract) + { + return isset($this->deferredServices[$abstract]) || parent::bound($abstract); + } + + /** + * Determine if the application has booted. + * + * @return bool + */ + public function isBooted() + { + return $this->booted; + } + + /** + * Boot the application's service providers. + * + * @return void + */ + public function boot() + { + if ($this->booted) { + return; + } + + // Once the application has booted we will also fire some "booted" callbacks + // for any listeners that need to do work after this initial booting gets + // finished. This is useful when ordering the boot-up processes we run. + $this->fireAppCallbacks($this->bootingCallbacks); + + array_walk($this->serviceProviders, function ($p) { + $this->bootProvider($p); + }); + + $this->booted = true; + + $this->fireAppCallbacks($this->bootedCallbacks); + } + + /** + * Boot the given service provider. + * + * @param \Illuminate\Support\ServiceProvider $provider + * @return mixed + */ + protected function bootProvider(ServiceProvider $provider) + { + if (method_exists($provider, 'boot')) { + return $this->call([$provider, 'boot']); + } + } + + /** + * Register a new boot listener. + * + * @param mixed $callback + * @return void + */ + public function booting($callback) + { + $this->bootingCallbacks[] = $callback; + } + + /** + * Register a new "booted" listener. + * + * @param mixed $callback + * @return void + */ + public function booted($callback) + { + $this->bootedCallbacks[] = $callback; + + if ($this->isBooted()) { + $this->fireAppCallbacks([$callback]); + } + } + + /** + * Call the booting callbacks for the application. + * + * @param array $callbacks + * @return void + */ + protected function fireAppCallbacks(array $callbacks) + { + foreach ($callbacks as $callback) { + call_user_func($callback, $this); + } + } + + /** + * {@inheritdoc} + */ + public function handle(SymfonyRequest $request, $type = self::MASTER_REQUEST, $catch = true) + { + return $this[HttpKernelContract::class]->handle(Request::createFromBase($request)); + } + + /** + * Determine if middleware has been disabled for the application. + * + * @return bool + */ + public function shouldSkipMiddleware() + { + return $this->bound('middleware.disable') && + $this->make('middleware.disable') === true; + } + + /** + * Get the path to the cached services.php file. + * + * @return string + */ + public function getCachedServicesPath() + { + return $this->bootstrapPath().'/cache/services.php'; + } + + /** + * Determine if the application configuration is cached. + * + * @return bool + */ + public function configurationIsCached() + { + return file_exists($this->getCachedConfigPath()); + } + + /** + * Get the path to the configuration cache file. + * + * @return string + */ + public function getCachedConfigPath() + { + return $this->bootstrapPath().'/cache/config.php'; + } + + /** + * Determine if the application routes are cached. + * + * @return bool + */ + public function routesAreCached() + { + return $this['files']->exists($this->getCachedRoutesPath()); + } + + /** + * Get the path to the routes cache file. + * + * @return string + */ + public function getCachedRoutesPath() + { + return $this->bootstrapPath().'/cache/routes.php'; + } + + /** + * Determine if the application is currently down for maintenance. + * + * @return bool + */ + public function isDownForMaintenance() + { + return file_exists($this->storagePath().'/framework/down'); + } + + /** + * Throw an HttpException with the given data. + * + * @param int $code + * @param string $message + * @param array $headers + * @return void + * + * @throws \Symfony\Component\HttpKernel\Exception\HttpException + */ + public function abort($code, $message = '', array $headers = []) + { + if ($code == 404) { + throw new NotFoundHttpException($message); + } + + throw new HttpException($code, $message, null, $headers); + } + + /** + * Register a terminating callback with the application. + * + * @param \Closure $callback + * @return $this + */ + public function terminating(Closure $callback) + { + $this->terminatingCallbacks[] = $callback; + + return $this; + } + + /** + * Terminate the application. + * + * @return void + */ + public function terminate() + { + foreach ($this->terminatingCallbacks as $terminating) { + $this->call($terminating); + } + } + + /** + * Get the service providers that have been loaded. + * + * @return array + */ + public function getLoadedProviders() + { + return $this->loadedProviders; + } + + /** + * Get the application's deferred services. + * + * @return array + */ + public function getDeferredServices() + { + return $this->deferredServices; + } + + /** + * Set the application's deferred services. + * + * @param array $services + * @return void + */ + public function setDeferredServices(array $services) + { + $this->deferredServices = $services; + } + + /** + * Add an array of services to the application's deferred services. + * + * @param array $services + * @return void + */ + public function addDeferredServices(array $services) + { + $this->deferredServices = array_merge($this->deferredServices, $services); + } + + /** + * Determine if the given service is a deferred service. + * + * @param string $service + * @return bool + */ + public function isDeferredService($service) + { + return isset($this->deferredServices[$service]); + } + + /** + * Configure the real-time facade namespace. + * + * @param string $namespace + * @return void + */ + public function provideFacades($namespace) + { + AliasLoader::setFacadeNamespace($namespace); + } + + /** + * Define a callback to be used to configure Monolog. + * + * @param callable $callback + * @return $this + */ + public function configureMonologUsing(callable $callback) + { + $this->monologConfigurator = $callback; + + return $this; + } + + /** + * Determine if the application has a custom Monolog configurator. + * + * @return bool + */ + public function hasMonologConfigurator() + { + return ! is_null($this->monologConfigurator); + } + + /** + * Get the custom Monolog configurator for the application. + * + * @return callable + */ + public function getMonologConfigurator() + { + return $this->monologConfigurator; + } + + /** + * Get the current application locale. + * + * @return string + */ + public function getLocale() + { + return $this['config']->get('app.locale'); + } + + /** + * Set the current application locale. + * + * @param string $locale + * @return void + */ + public function setLocale($locale) + { + $this['config']->set('app.locale', $locale); + + $this['translator']->setLocale($locale); + + $this['events']->dispatch(new Events\LocaleUpdated($locale)); + } + + /** + * Determine if application locale is the given locale. + * + * @param string $locale + * @return bool + */ + public function isLocale($locale) + { + return $this->getLocale() == $locale; + } + + /** + * Register the core class aliases in the container. + * + * @return void + */ + public function registerCoreContainerAliases() + { + $aliases = [ + 'app' => [\Illuminate\Foundation\Application::class, \Illuminate\Contracts\Container\Container::class, \Illuminate\Contracts\Foundation\Application::class], + 'auth' => [\Illuminate\Auth\AuthManager::class, \Illuminate\Contracts\Auth\Factory::class], + 'auth.driver' => [\Illuminate\Contracts\Auth\Guard::class], + 'blade.compiler' => [\Illuminate\View\Compilers\BladeCompiler::class], + 'cache' => [\Illuminate\Cache\CacheManager::class, \Illuminate\Contracts\Cache\Factory::class], + 'cache.store' => [\Illuminate\Cache\Repository::class, \Illuminate\Contracts\Cache\Repository::class], + 'config' => [\Illuminate\Config\Repository::class, \Illuminate\Contracts\Config\Repository::class], + 'cookie' => [\Illuminate\Cookie\CookieJar::class, \Illuminate\Contracts\Cookie\Factory::class, \Illuminate\Contracts\Cookie\QueueingFactory::class], + 'encrypter' => [\Illuminate\Encryption\Encrypter::class, \Illuminate\Contracts\Encryption\Encrypter::class], + 'db' => [\Illuminate\Database\DatabaseManager::class], + 'db.connection' => [\Illuminate\Database\Connection::class, \Illuminate\Database\ConnectionInterface::class], + 'events' => [\Illuminate\Events\Dispatcher::class, \Illuminate\Contracts\Events\Dispatcher::class], + 'files' => [\Illuminate\Filesystem\Filesystem::class], + 'filesystem' => [\Illuminate\Filesystem\FilesystemManager::class, \Illuminate\Contracts\Filesystem\Factory::class], + 'filesystem.disk' => [\Illuminate\Contracts\Filesystem\Filesystem::class], + 'filesystem.cloud' => [\Illuminate\Contracts\Filesystem\Cloud::class], + 'hash' => [\Illuminate\Contracts\Hashing\Hasher::class], + 'translator' => [\Illuminate\Translation\Translator::class, \Illuminate\Contracts\Translation\Translator::class], + 'log' => [\Illuminate\Log\Writer::class, \Illuminate\Contracts\Logging\Log::class, \Psr\Log\LoggerInterface::class], + 'mailer' => [\Illuminate\Mail\Mailer::class, \Illuminate\Contracts\Mail\Mailer::class, \Illuminate\Contracts\Mail\MailQueue::class], + 'auth.password' => [\Illuminate\Auth\Passwords\PasswordBrokerManager::class, \Illuminate\Contracts\Auth\PasswordBrokerFactory::class], + 'auth.password.broker' => [\Illuminate\Auth\Passwords\PasswordBroker::class, \Illuminate\Contracts\Auth\PasswordBroker::class], + 'queue' => [\Illuminate\Queue\QueueManager::class, \Illuminate\Contracts\Queue\Factory::class, \Illuminate\Contracts\Queue\Monitor::class], + 'queue.connection' => [\Illuminate\Contracts\Queue\Queue::class], + 'queue.failer' => [\Illuminate\Queue\Failed\FailedJobProviderInterface::class], + 'redirect' => [\Illuminate\Routing\Redirector::class], + 'redis' => [\Illuminate\Redis\RedisManager::class, \Illuminate\Contracts\Redis\Factory::class], + 'request' => [\Illuminate\Http\Request::class, \Symfony\Component\HttpFoundation\Request::class], + 'router' => [\Illuminate\Routing\Router::class, \Illuminate\Contracts\Routing\Registrar::class, \Illuminate\Contracts\Routing\BindingRegistrar::class], + 'session' => [\Illuminate\Session\SessionManager::class], + 'session.store' => [\Illuminate\Session\Store::class, \Illuminate\Contracts\Session\Session::class], + 'url' => [\Illuminate\Routing\UrlGenerator::class, \Illuminate\Contracts\Routing\UrlGenerator::class], + 'validator' => [\Illuminate\Validation\Factory::class, \Illuminate\Contracts\Validation\Factory::class], + 'view' => [\Illuminate\View\Factory::class, \Illuminate\Contracts\View\Factory::class], + ]; + + foreach ($aliases as $key => $aliases) { + foreach ($aliases as $alias) { + $this->alias($key, $alias); + } + } + } + + /** + * Flush the container of all bindings and resolved instances. + * + * @return void + */ + public function flush() + { + parent::flush(); + + $this->loadedProviders = []; + } + + /** + * Get the application namespace. + * + * @return string + * + * @throws \RuntimeException + */ + public function getNamespace() + { + if (! is_null($this->namespace)) { + return $this->namespace; + } + + $composer = json_decode(file_get_contents(base_path('composer.json')), true); + + foreach ((array) data_get($composer, 'autoload.psr-4') as $namespace => $path) { + foreach ((array) $path as $pathChoice) { + if (realpath(app_path()) == realpath(base_path().'/'.$pathChoice)) { + return $this->namespace = $namespace; + } + } + } + + throw new RuntimeException('Unable to detect application namespace.'); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Auth/Access/Authorizable.php b/vendor/laravel/framework/src/Illuminate/Foundation/Auth/Access/Authorizable.php new file mode 100644 index 0000000..9e8e33b --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Auth/Access/Authorizable.php @@ -0,0 +1,44 @@ +forUser($this)->check($ability, $arguments); + } + + /** + * Determine if the entity does not have a given ability. + * + * @param string $ability + * @param array|mixed $arguments + * @return bool + */ + public function cant($ability, $arguments = []) + { + return ! $this->can($ability, $arguments); + } + + /** + * Determine if the entity does not have a given ability. + * + * @param string $ability + * @param array|mixed $arguments + * @return bool + */ + public function cannot($ability, $arguments = []) + { + return $this->cant($ability, $arguments); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Auth/Access/AuthorizesRequests.php b/vendor/laravel/framework/src/Illuminate/Foundation/Auth/Access/AuthorizesRequests.php new file mode 100644 index 0000000..d2c427d --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Auth/Access/AuthorizesRequests.php @@ -0,0 +1,115 @@ +parseAbilityAndArguments($ability, $arguments); + + return app(Gate::class)->authorize($ability, $arguments); + } + + /** + * Authorize a given action for a user. + * + * @param \Illuminate\Contracts\Auth\Authenticatable|mixed $user + * @param mixed $ability + * @param mixed|array $arguments + * @return \Illuminate\Auth\Access\Response + * + * @throws \Illuminate\Auth\Access\AuthorizationException + */ + public function authorizeForUser($user, $ability, $arguments = []) + { + list($ability, $arguments) = $this->parseAbilityAndArguments($ability, $arguments); + + return app(Gate::class)->forUser($user)->authorize($ability, $arguments); + } + + /** + * Guesses the ability's name if it wasn't provided. + * + * @param mixed $ability + * @param mixed|array $arguments + * @return array + */ + protected function parseAbilityAndArguments($ability, $arguments) + { + if (is_string($ability) && strpos($ability, '\\') === false) { + return [$ability, $arguments]; + } + + $method = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 3)[2]['function']; + + return [$this->normalizeGuessedAbilityName($method), $ability]; + } + + /** + * Normalize the ability name that has been guessed from the method name. + * + * @param string $ability + * @return string + */ + protected function normalizeGuessedAbilityName($ability) + { + $map = $this->resourceAbilityMap(); + + return isset($map[$ability]) ? $map[$ability] : $ability; + } + + /** + * Authorize a resource action based on the incoming request. + * + * @param string $model + * @param string|null $parameter + * @param array $options + * @param \Illuminate\Http\Request|null $request + * @return void + */ + public function authorizeResource($model, $parameter = null, array $options = [], $request = null) + { + $parameter = $parameter ?: lcfirst(class_basename($model)); + + $middleware = []; + + foreach ($this->resourceAbilityMap() as $method => $ability) { + $modelName = in_array($method, ['index', 'create', 'store']) ? $model : $parameter; + + $middleware["can:{$ability},{$modelName}"][] = $method; + } + + foreach ($middleware as $middlewareName => $methods) { + $this->middleware($middlewareName, $options)->only($methods); + } + } + + /** + * Get the map of resource methods to ability names. + * + * @return array + */ + protected function resourceAbilityMap() + { + return [ + 'show' => 'view', + 'create' => 'create', + 'store' => 'create', + 'edit' => 'update', + 'update' => 'update', + 'destroy' => 'delete', + ]; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Auth/AuthenticatesUsers.php b/vendor/laravel/framework/src/Illuminate/Foundation/Auth/AuthenticatesUsers.php new file mode 100644 index 0000000..f48fa82 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Auth/AuthenticatesUsers.php @@ -0,0 +1,174 @@ +validateLogin($request); + + // If the class is using the ThrottlesLogins trait, we can automatically throttle + // the login attempts for this application. We'll key this by the username and + // the IP address of the client making these requests into this application. + if ($this->hasTooManyLoginAttempts($request)) { + $this->fireLockoutEvent($request); + + return $this->sendLockoutResponse($request); + } + + if ($this->attemptLogin($request)) { + return $this->sendLoginResponse($request); + } + + // If the login attempt was unsuccessful we will increment the number of attempts + // to login and redirect the user back to the login form. Of course, when this + // user surpasses their maximum number of attempts they will get locked out. + $this->incrementLoginAttempts($request); + + return $this->sendFailedLoginResponse($request); + } + + /** + * Validate the user login request. + * + * @param \Illuminate\Http\Request $request + * @return void + */ + protected function validateLogin(Request $request) + { + $this->validate($request, [ + $this->username() => 'required|string', + 'password' => 'required|string', + ]); + } + + /** + * Attempt to log the user into the application. + * + * @param \Illuminate\Http\Request $request + * @return bool + */ + protected function attemptLogin(Request $request) + { + return $this->guard()->attempt( + $this->credentials($request), $request->has('remember') + ); + } + + /** + * Get the needed authorization credentials from the request. + * + * @param \Illuminate\Http\Request $request + * @return array + */ + protected function credentials(Request $request) + { + return $request->only($this->username(), 'password'); + } + + /** + * Send the response after the user was authenticated. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\Response + */ + protected function sendLoginResponse(Request $request) + { + $request->session()->regenerate(); + + $this->clearLoginAttempts($request); + + return $this->authenticated($request, $this->guard()->user()) + ?: redirect()->intended($this->redirectPath()); + } + + /** + * The user has been authenticated. + * + * @param \Illuminate\Http\Request $request + * @param mixed $user + * @return mixed + */ + protected function authenticated(Request $request, $user) + { + // + } + + /** + * Get the failed login response instance. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\RedirectResponse + */ + protected function sendFailedLoginResponse(Request $request) + { + $errors = [$this->username() => trans('auth.failed')]; + + if ($request->expectsJson()) { + return response()->json($errors, 422); + } + + return redirect()->back() + ->withInput($request->only($this->username(), 'remember')) + ->withErrors($errors); + } + + /** + * Get the login username to be used by the controller. + * + * @return string + */ + public function username() + { + return 'email'; + } + + /** + * Log the user out of the application. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\Response + */ + public function logout(Request $request) + { + $this->guard()->logout(); + + $request->session()->flush(); + + $request->session()->regenerate(); + + return redirect('/'); + } + + /** + * Get the guard to be used during authentication. + * + * @return \Illuminate\Contracts\Auth\StatefulGuard + */ + protected function guard() + { + return Auth::guard(); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Auth/RedirectsUsers.php b/vendor/laravel/framework/src/Illuminate/Foundation/Auth/RedirectsUsers.php new file mode 100644 index 0000000..cc99229 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Auth/RedirectsUsers.php @@ -0,0 +1,20 @@ +redirectTo(); + } + + return property_exists($this, 'redirectTo') ? $this->redirectTo : '/home'; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Auth/RegistersUsers.php b/vendor/laravel/framework/src/Illuminate/Foundation/Auth/RegistersUsers.php new file mode 100644 index 0000000..f3238f2 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Auth/RegistersUsers.php @@ -0,0 +1,62 @@ +validator($request->all())->validate(); + + event(new Registered($user = $this->create($request->all()))); + + $this->guard()->login($user); + + return $this->registered($request, $user) + ?: redirect($this->redirectPath()); + } + + /** + * Get the guard to be used during registration. + * + * @return \Illuminate\Contracts\Auth\StatefulGuard + */ + protected function guard() + { + return Auth::guard(); + } + + /** + * The user has been registered. + * + * @param \Illuminate\Http\Request $request + * @param mixed $user + * @return mixed + */ + protected function registered(Request $request, $user) + { + // + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Auth/ResetsPasswords.php b/vendor/laravel/framework/src/Illuminate/Foundation/Auth/ResetsPasswords.php new file mode 100644 index 0000000..c6d2cac --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Auth/ResetsPasswords.php @@ -0,0 +1,156 @@ +with( + ['token' => $token, 'email' => $request->email] + ); + } + + /** + * Reset the given user's password. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\RedirectResponse + */ + public function reset(Request $request) + { + $this->validate($request, $this->rules(), $this->validationErrorMessages()); + + // Here we will attempt to reset the user's password. If it is successful we + // will update the password on an actual user model and persist it to the + // database. Otherwise we will parse the error and return the response. + $response = $this->broker()->reset( + $this->credentials($request), function ($user, $password) { + $this->resetPassword($user, $password); + } + ); + + // If the password was successfully reset, we will redirect the user back to + // the application's home authenticated view. If there is an error we can + // redirect them back to where they came from with their error message. + return $response == Password::PASSWORD_RESET + ? $this->sendResetResponse($response) + : $this->sendResetFailedResponse($request, $response); + } + + /** + * Get the password reset validation rules. + * + * @return array + */ + protected function rules() + { + return [ + 'token' => 'required', + 'email' => 'required|email', + 'password' => 'required|confirmed|min:6', + ]; + } + + /** + * Get the password reset validation error messages. + * + * @return array + */ + protected function validationErrorMessages() + { + return []; + } + + /** + * Get the password reset credentials from the request. + * + * @param \Illuminate\Http\Request $request + * @return array + */ + protected function credentials(Request $request) + { + return $request->only( + 'email', 'password', 'password_confirmation', 'token' + ); + } + + /** + * Reset the given user's password. + * + * @param \Illuminate\Contracts\Auth\CanResetPassword $user + * @param string $password + * @return void + */ + protected function resetPassword($user, $password) + { + $user->forceFill([ + 'password' => bcrypt($password), + 'remember_token' => Str::random(60), + ])->save(); + + $this->guard()->login($user); + } + + /** + * Get the response for a successful password reset. + * + * @param string $response + * @return \Illuminate\Http\RedirectResponse + */ + protected function sendResetResponse($response) + { + return redirect($this->redirectPath()) + ->with('status', trans($response)); + } + + /** + * Get the response for a failed password reset. + * + * @param \Illuminate\Http\Request + * @param string $response + * @return \Illuminate\Http\RedirectResponse + */ + protected function sendResetFailedResponse(Request $request, $response) + { + return redirect()->back() + ->withInput($request->only('email')) + ->withErrors(['email' => trans($response)]); + } + + /** + * Get the broker to be used during password reset. + * + * @return \Illuminate\Contracts\Auth\PasswordBroker + */ + public function broker() + { + return Password::broker(); + } + + /** + * Get the guard to be used during password reset. + * + * @return \Illuminate\Contracts\Auth\StatefulGuard + */ + protected function guard() + { + return Auth::guard(); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Auth/SendsPasswordResetEmails.php b/vendor/laravel/framework/src/Illuminate/Foundation/Auth/SendsPasswordResetEmails.php new file mode 100644 index 0000000..d338d2e --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Auth/SendsPasswordResetEmails.php @@ -0,0 +1,76 @@ +validate($request, ['email' => 'required|email']); + + // We will send the password reset link to this user. Once we have attempted + // to send the link, we will examine the response then see the message we + // need to show to the user. Finally, we'll send out a proper response. + $response = $this->broker()->sendResetLink( + $request->only('email') + ); + + return $response == Password::RESET_LINK_SENT + ? $this->sendResetLinkResponse($response) + : $this->sendResetLinkFailedResponse($request, $response); + } + + /** + * Get the response for a successful password reset link. + * + * @param string $response + * @return \Illuminate\Http\RedirectResponse + */ + protected function sendResetLinkResponse($response) + { + return back()->with('status', trans($response)); + } + + /** + * Get the response for a failed password reset link. + * + * @param \Illuminate\Http\Request + * @param string $response + * @return \Illuminate\Http\RedirectResponse + */ + protected function sendResetLinkFailedResponse(Request $request, $response) + { + return back()->withErrors( + ['email' => trans($response)] + ); + } + + /** + * Get the broker to be used during password reset. + * + * @return \Illuminate\Contracts\Auth\PasswordBroker + */ + public function broker() + { + return Password::broker(); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Auth/ThrottlesLogins.php b/vendor/laravel/framework/src/Illuminate/Foundation/Auth/ThrottlesLogins.php new file mode 100644 index 0000000..0f39a7e --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Auth/ThrottlesLogins.php @@ -0,0 +1,104 @@ +limiter()->tooManyAttempts( + $this->throttleKey($request), 5, 1 + ); + } + + /** + * Increment the login attempts for the user. + * + * @param \Illuminate\Http\Request $request + * @return void + */ + protected function incrementLoginAttempts(Request $request) + { + $this->limiter()->hit($this->throttleKey($request)); + } + + /** + * Redirect the user after determining they are locked out. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\RedirectResponse + */ + protected function sendLockoutResponse(Request $request) + { + $seconds = $this->limiter()->availableIn( + $this->throttleKey($request) + ); + + $message = Lang::get('auth.throttle', ['seconds' => $seconds]); + + $errors = [$this->username() => $message]; + + if ($request->expectsJson()) { + return response()->json($errors, 423); + } + + return redirect()->back() + ->withInput($request->only($this->username(), 'remember')) + ->withErrors($errors); + } + + /** + * Clear the login locks for the given user credentials. + * + * @param \Illuminate\Http\Request $request + * @return void + */ + protected function clearLoginAttempts(Request $request) + { + $this->limiter()->clear($this->throttleKey($request)); + } + + /** + * Fire an event when a lockout occurs. + * + * @param \Illuminate\Http\Request $request + * @return void + */ + protected function fireLockoutEvent(Request $request) + { + event(new Lockout($request)); + } + + /** + * Get the throttle key for the given request. + * + * @param \Illuminate\Http\Request $request + * @return string + */ + protected function throttleKey(Request $request) + { + return Str::lower($request->input($this->username())).'|'.$request->ip(); + } + + /** + * Get the rate limiter instance. + * + * @return \Illuminate\Cache\RateLimiter + */ + protected function limiter() + { + return app(RateLimiter::class); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Auth/User.php b/vendor/laravel/framework/src/Illuminate/Foundation/Auth/User.php new file mode 100644 index 0000000..5c84778 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Auth/User.php @@ -0,0 +1,19 @@ +boot(); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php b/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php new file mode 100644 index 0000000..c0edfa7 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php @@ -0,0 +1,157 @@ +app = $app; + + error_reporting(-1); + + set_error_handler([$this, 'handleError']); + + set_exception_handler([$this, 'handleException']); + + register_shutdown_function([$this, 'handleShutdown']); + + if (! $app->environment('testing')) { + ini_set('display_errors', 'Off'); + } + } + + /** + * Convert PHP errors to ErrorException instances. + * + * @param int $level + * @param string $message + * @param string $file + * @param int $line + * @param array $context + * @return void + * + * @throws \ErrorException + */ + public function handleError($level, $message, $file = '', $line = 0, $context = []) + { + if (error_reporting() & $level) { + throw new ErrorException($message, 0, $level, $file, $line); + } + } + + /** + * Handle an uncaught exception from the application. + * + * Note: Most exceptions can be handled via the try / catch block in + * the HTTP and Console kernels. But, fatal error exceptions must + * be handled differently since they are not normal exceptions. + * + * @param \Throwable $e + * @return void + */ + public function handleException($e) + { + if (! $e instanceof Exception) { + $e = new FatalThrowableError($e); + } + + $this->getExceptionHandler()->report($e); + + if ($this->app->runningInConsole()) { + $this->renderForConsole($e); + } else { + $this->renderHttpResponse($e); + } + } + + /** + * Render an exception to the console. + * + * @param \Exception $e + * @return void + */ + protected function renderForConsole(Exception $e) + { + $this->getExceptionHandler()->renderForConsole(new ConsoleOutput, $e); + } + + /** + * Render an exception as an HTTP response and send it. + * + * @param \Exception $e + * @return void + */ + protected function renderHttpResponse(Exception $e) + { + $this->getExceptionHandler()->render($this->app['request'], $e)->send(); + } + + /** + * Handle the PHP shutdown event. + * + * @return void + */ + public function handleShutdown() + { + if (! is_null($error = error_get_last()) && $this->isFatal($error['type'])) { + $this->handleException($this->fatalExceptionFromError($error, 0)); + } + } + + /** + * Create a new fatal exception instance from an error array. + * + * @param array $error + * @param int|null $traceOffset + * @return \Symfony\Component\Debug\Exception\FatalErrorException + */ + protected function fatalExceptionFromError(array $error, $traceOffset = null) + { + return new FatalErrorException( + $error['message'], $error['type'], 0, $error['file'], $error['line'], $traceOffset + ); + } + + /** + * Determine if the error type is fatal. + * + * @param int $type + * @return bool + */ + protected function isFatal($type) + { + return in_array($type, [E_COMPILE_ERROR, E_CORE_ERROR, E_ERROR, E_PARSE]); + } + + /** + * Get an instance of the exception handler. + * + * @return \Illuminate\Contracts\Debug\ExceptionHandler + */ + protected function getExceptionHandler() + { + return $this->app->make(ExceptionHandler::class); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/LoadConfiguration.php b/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/LoadConfiguration.php new file mode 100644 index 0000000..b73858f --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/LoadConfiguration.php @@ -0,0 +1,112 @@ +getCachedConfigPath())) { + $items = require $cached; + + $loadedFromCache = true; + } + + // Next we will spin through all of the configuration files in the configuration + // directory and load each one into the repository. This will make all of the + // options available to the developer for use in various parts of this app. + $app->instance('config', $config = new Repository($items)); + + if (! isset($loadedFromCache)) { + $this->loadConfigurationFiles($app, $config); + } + + // Finally, we will set the application's environment based on the configuration + // values that were loaded. We will pass a callback which will be used to get + // the environment in a web context where an "--env" switch is not present. + $app->detectEnvironment(function () use ($config) { + return $config->get('app.env', 'production'); + }); + + date_default_timezone_set($config->get('app.timezone', 'UTC')); + + mb_internal_encoding('UTF-8'); + } + + /** + * Load the configuration items from all of the files. + * + * @param \Illuminate\Contracts\Foundation\Application $app + * @param \Illuminate\Contracts\Config\Repository $repository + * @return void + */ + protected function loadConfigurationFiles(Application $app, RepositoryContract $repository) + { + $files = $this->getConfigurationFiles($app); + + if (! isset($files['app'])) { + throw new Exception('Unable to load the "app" configuration file.'); + } + + foreach ($this->getConfigurationFiles($app) as $key => $path) { + $repository->set($key, require $path); + } + } + + /** + * Get all of the configuration files for the application. + * + * @param \Illuminate\Contracts\Foundation\Application $app + * @return array + */ + protected function getConfigurationFiles(Application $app) + { + $files = []; + + $configPath = realpath($app->configPath()); + + foreach (Finder::create()->files()->name('*.php')->in($configPath) as $file) { + $directory = $this->getNestedDirectory($file, $configPath); + + $files[$directory.basename($file->getRealPath(), '.php')] = $file->getRealPath(); + } + + return $files; + } + + /** + * Get the configuration file nesting path. + * + * @param \SplFileInfo $file + * @param string $configPath + * @return string + */ + protected function getNestedDirectory(SplFileInfo $file, $configPath) + { + $directory = $file->getPath(); + + if ($nested = trim(str_replace($configPath, '', $directory), DIRECTORY_SEPARATOR)) { + $nested = str_replace(DIRECTORY_SEPARATOR, '.', $nested).'.'; + } + + return $nested; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/LoadEnvironmentVariables.php b/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/LoadEnvironmentVariables.php new file mode 100644 index 0000000..6ec3e80 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/LoadEnvironmentVariables.php @@ -0,0 +1,69 @@ +configurationIsCached()) { + return; + } + + $this->checkForSpecificEnvironmentFile($app); + + try { + (new Dotenv($app->environmentPath(), $app->environmentFile()))->load(); + } catch (InvalidPathException $e) { + // + } + } + + /** + * Detect if a custom environment file matching the APP_ENV exists. + * + * @param \Illuminate\Contracts\Foundation\Application $app + * @return void + */ + protected function checkForSpecificEnvironmentFile($app) + { + if (php_sapi_name() == 'cli' && with($input = new ArgvInput)->hasParameterOption('--env')) { + $this->setEnvironmentFilePath( + $app, $app->environmentFile().'.'.$input->getParameterOption('--env') + ); + } + + if (! env('APP_ENV')) { + return; + } + + $this->setEnvironmentFilePath( + $app, $app->environmentFile().'.'.env('APP_ENV') + ); + } + + /** + * Load a custom environment file. + * + * @param \Illuminate\Contracts\Foundation\Application $app + * @param string $file + * @return void + */ + protected function setEnvironmentFilePath($app, $file) + { + if (file_exists($app->environmentPath().'/'.$file)) { + $app->loadEnvironmentFrom($file); + } + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/RegisterFacades.php b/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/RegisterFacades.php new file mode 100644 index 0000000..0c2d5cf --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/RegisterFacades.php @@ -0,0 +1,25 @@ +make('config')->get('app.aliases', []))->register(); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/RegisterProviders.php b/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/RegisterProviders.php new file mode 100644 index 0000000..f18375c --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/RegisterProviders.php @@ -0,0 +1,19 @@ +registerConfiguredProviders(); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/SetRequestForConsole.php b/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/SetRequestForConsole.php new file mode 100644 index 0000000..8b7343a --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/SetRequestForConsole.php @@ -0,0 +1,22 @@ +instance('request', Request::create( + $app->make('config')->get('app.url', 'http://localhost'), 'GET', [], [], [], $_SERVER + )); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Bus/Dispatchable.php b/vendor/laravel/framework/src/Illuminate/Foundation/Bus/Dispatchable.php new file mode 100644 index 0000000..d91d8db --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Bus/Dispatchable.php @@ -0,0 +1,16 @@ +dispatch($job); + } + + /** + * Dispatch a command to its appropriate handler in the current process. + * + * @param mixed $job + * @return mixed + */ + public function dispatchNow($job) + { + return app(Dispatcher::class)->dispatchNow($job); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Bus/PendingDispatch.php b/vendor/laravel/framework/src/Illuminate/Foundation/Bus/PendingDispatch.php new file mode 100644 index 0000000..7d5053d --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Bus/PendingDispatch.php @@ -0,0 +1,66 @@ +job = $job; + } + + /** + * Set the desired connection for the job. + * + * @param string|null $connection + * @return $this + */ + public function onConnection($connection) + { + $this->job->onConnection($connection); + + return $this; + } + + /** + * Set the desired queue for the job. + * + * @param string|null $queue + * @return $this + */ + public function onQueue($queue) + { + $this->job->onQueue($queue); + + return $this; + } + + /** + * Set the desired delay for the job. + * + * @param \DateTime|int|null $delay + * @return $this + */ + public function delay($delay) + { + $this->job->delay($delay); + + return $this; + } + + /** + * Handle the object's destruction. + * + * @return void + */ + public function __destruct() + { + dispatch($this->job); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/ComposerScripts.php b/vendor/laravel/framework/src/Illuminate/Foundation/ComposerScripts.php new file mode 100644 index 0000000..9b4c1dd --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/ComposerScripts.php @@ -0,0 +1,48 @@ +getComposer()->getConfig()->get('vendor-dir').'/autoload.php'; + + static::clearCompiled(); + } + + /** + * Handle the post-update Composer event. + * + * @param \Composer\Script\Event $event + * @return void + */ + public static function postUpdate(Event $event) + { + require_once $event->getComposer()->getConfig()->get('vendor-dir').'/autoload.php'; + + static::clearCompiled(); + } + + /** + * Clear the cached Laravel bootstrapping files. + * + * @return void + */ + protected static function clearCompiled() + { + $laravel = new Application(getcwd()); + + if (file_exists($servicesPath = $laravel->getCachedServicesPath())) { + @unlink($servicesPath); + } + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/AppNameCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/AppNameCommand.php new file mode 100644 index 0000000..93dd325 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/AppNameCommand.php @@ -0,0 +1,289 @@ +files = $files; + $this->composer = $composer; + } + + /** + * Execute the console command. + * + * @return void + */ + public function fire() + { + $this->currentRoot = trim($this->laravel->getNamespace(), '\\'); + + $this->setAppDirectoryNamespace(); + $this->setBootstrapNamespaces(); + $this->setConfigNamespaces(); + $this->setComposerNamespace(); + $this->setDatabaseFactoryNamespaces(); + + $this->info('Application namespace set!'); + + $this->composer->dumpAutoloads(); + + $this->call('clear-compiled'); + } + + /** + * Set the namespace on the files in the app directory. + * + * @return void + */ + protected function setAppDirectoryNamespace() + { + $files = Finder::create() + ->in($this->laravel['path']) + ->contains($this->currentRoot) + ->name('*.php'); + + foreach ($files as $file) { + $this->replaceNamespace($file->getRealPath()); + } + } + + /** + * Replace the App namespace at the given path. + * + * @param string $path + * @return void + */ + protected function replaceNamespace($path) + { + $search = [ + 'namespace '.$this->currentRoot.';', + $this->currentRoot.'\\', + ]; + + $replace = [ + 'namespace '.$this->argument('name').';', + $this->argument('name').'\\', + ]; + + $this->replaceIn($path, $search, $replace); + } + + /** + * Set the bootstrap namespaces. + * + * @return void + */ + protected function setBootstrapNamespaces() + { + $search = [ + $this->currentRoot.'\\Http', + $this->currentRoot.'\\Console', + $this->currentRoot.'\\Exceptions', + ]; + + $replace = [ + $this->argument('name').'\\Http', + $this->argument('name').'\\Console', + $this->argument('name').'\\Exceptions', + ]; + + $this->replaceIn($this->getBootstrapPath(), $search, $replace); + } + + /** + * Set the namespace in the appropriate configuration files. + * + * @return void + */ + protected function setConfigNamespaces() + { + $this->setAppConfigNamespaces(); + $this->setAuthConfigNamespace(); + $this->setServicesConfigNamespace(); + } + + /** + * Set the application provider namespaces. + * + * @return void + */ + protected function setAppConfigNamespaces() + { + $search = [ + $this->currentRoot.'\\Providers', + $this->currentRoot.'\\Http\\Controllers\\', + ]; + + $replace = [ + $this->argument('name').'\\Providers', + $this->argument('name').'\\Http\\Controllers\\', + ]; + + $this->replaceIn($this->getConfigPath('app'), $search, $replace); + } + + /** + * Set the authentication User namespace. + * + * @return void + */ + protected function setAuthConfigNamespace() + { + $this->replaceIn( + $this->getConfigPath('auth'), + $this->currentRoot.'\\User', + $this->argument('name').'\\User' + ); + } + + /** + * Set the services User namespace. + * + * @return void + */ + protected function setServicesConfigNamespace() + { + $this->replaceIn( + $this->getConfigPath('services'), + $this->currentRoot.'\\User', + $this->argument('name').'\\User' + ); + } + + /** + * Set the PSR-4 namespace in the Composer file. + * + * @return void + */ + protected function setComposerNamespace() + { + $this->replaceIn( + $this->getComposerPath(), + str_replace('\\', '\\\\', $this->currentRoot).'\\\\', + str_replace('\\', '\\\\', $this->argument('name')).'\\\\' + ); + } + + /** + * Set the namespace in database factory files. + * + * @return void + */ + protected function setDatabaseFactoryNamespaces() + { + $this->replaceIn( + $this->laravel->databasePath().'/factories/ModelFactory.php', + $this->currentRoot, $this->argument('name') + ); + } + + /** + * Replace the given string in the given file. + * + * @param string $path + * @param string|array $search + * @param string|array $replace + * @return void + */ + protected function replaceIn($path, $search, $replace) + { + if ($this->files->exists($path)) { + $this->files->put($path, str_replace($search, $replace, $this->files->get($path))); + } + } + + /** + * Get the path to the bootstrap/app.php file. + * + * @return string + */ + protected function getBootstrapPath() + { + return $this->laravel->bootstrapPath().'/app.php'; + } + + /** + * Get the path to the Composer.json file. + * + * @return string + */ + protected function getComposerPath() + { + return $this->laravel->basePath().'/composer.json'; + } + + /** + * Get the path to the given configuration file. + * + * @param string $name + * @return string + */ + protected function getConfigPath($name) + { + return $this->laravel['path.config'].'/'.$name.'.php'; + } + + /** + * Get the console command arguments. + * + * @return array + */ + protected function getArguments() + { + return [ + ['name', InputArgument::REQUIRED, 'The desired namespace.'], + ]; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ClearCompiledCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ClearCompiledCommand.php new file mode 100644 index 0000000..8d87b71 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ClearCompiledCommand.php @@ -0,0 +1,38 @@ +laravel->getCachedServicesPath(); + + if (file_exists($servicesPath)) { + @unlink($servicesPath); + } + + $this->info('The compiled services file has been removed.'); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ClosureCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ClosureCommand.php new file mode 100644 index 0000000..c2f1963 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ClosureCommand.php @@ -0,0 +1,71 @@ +callback = $callback; + $this->signature = $signature; + + parent::__construct(); + } + + /** + * Execute the console command. + * + * @param \Symfony\Component\Console\Input\InputInterface $input + * @param \Symfony\Component\Console\Output\OutputInterface $output + * @return mixed + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + $inputs = array_merge($input->getArguments(), $input->getOptions()); + + $parameters = []; + + foreach ((new ReflectionFunction($this->callback))->getParameters() as $parameter) { + if (isset($inputs[$parameter->name])) { + $parameters[$parameter->name] = $inputs[$parameter->name]; + } + } + + return $this->laravel->call( + $this->callback->bindTo($this, $this), $parameters + ); + } + + /** + * Set the description for the command. + * + * @param string $description + * @return $this + */ + public function describe($description) + { + $this->setDescription($description); + + return $this; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ConfigCacheCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ConfigCacheCommand.php new file mode 100644 index 0000000..2d47961 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ConfigCacheCommand.php @@ -0,0 +1,76 @@ +files = $files; + } + + /** + * Execute the console command. + * + * @return void + */ + public function fire() + { + $this->call('config:clear'); + + $config = $this->getFreshConfiguration(); + + $this->files->put( + $this->laravel->getCachedConfigPath(), 'info('Configuration cached successfully!'); + } + + /** + * Boot a fresh copy of the application configuration. + * + * @return array + */ + protected function getFreshConfiguration() + { + $app = require $this->laravel->bootstrapPath().'/app.php'; + + $app->make(ConsoleKernelContract::class)->bootstrap(); + + return $app['config']->all(); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ConfigClearCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ConfigClearCommand.php new file mode 100644 index 0000000..bb25a8e --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ConfigClearCommand.php @@ -0,0 +1,55 @@ +files = $files; + } + + /** + * Execute the console command. + * + * @return void + */ + public function fire() + { + $this->files->delete($this->laravel->getCachedConfigPath()); + + $this->info('Configuration cache cleared!'); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ConsoleMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ConsoleMakeCommand.php new file mode 100644 index 0000000..a9b164b --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ConsoleMakeCommand.php @@ -0,0 +1,90 @@ +option('command'), $stub); + } + + /** + * Get the stub file for the generator. + * + * @return string + */ + protected function getStub() + { + return __DIR__.'/stubs/console.stub'; + } + + /** + * Get the default namespace for the class. + * + * @param string $rootNamespace + * @return string + */ + protected function getDefaultNamespace($rootNamespace) + { + return $rootNamespace.'\Console\Commands'; + } + + /** + * Get the console command arguments. + * + * @return array + */ + protected function getArguments() + { + return [ + ['name', InputArgument::REQUIRED, 'The name of the command.'], + ]; + } + + /** + * Get the console command options. + * + * @return array + */ + protected function getOptions() + { + return [ + ['command', null, InputOption::VALUE_OPTIONAL, 'The terminal command that should be assigned.', 'command:name'], + ]; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/DownCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/DownCommand.php new file mode 100644 index 0000000..358a584 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/DownCommand.php @@ -0,0 +1,65 @@ +laravel->storagePath().'/framework/down', + json_encode($this->getDownFilePayload(), JSON_PRETTY_PRINT) + ); + + $this->comment('Application is now in maintenance mode.'); + } + + /** + * Get the payload to be placed in the "down" file. + * + * @return array + */ + protected function getDownFilePayload() + { + return [ + 'time' => Carbon::now()->getTimestamp(), + 'message' => $this->option('message'), + 'retry' => $this->getRetryTime(), + ]; + } + + /** + * Get the number of seconds the client should wait before retrying their request. + * + * @return int|null + */ + protected function getRetryTime() + { + $retry = $this->option('retry'); + + return is_numeric($retry) && $retry > 0 ? (int) $retry : null; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/EnvironmentCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/EnvironmentCommand.php new file mode 100644 index 0000000..b227165 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/EnvironmentCommand.php @@ -0,0 +1,32 @@ +line('Current application environment: '.$this->laravel['env'].''); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/EventGenerateCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/EventGenerateCommand.php new file mode 100644 index 0000000..bf4c989 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/EventGenerateCommand.php @@ -0,0 +1,74 @@ +laravel->getProvider(EventServiceProvider::class); + + foreach ($provider->listens() as $event => $listeners) { + $this->makeEventAndListeners($event, $listeners); + } + + $this->info('Events and listeners generated successfully!'); + } + + /** + * Make the event and listeners for the given event. + * + * @param string $event + * @param array $listeners + * @return void + */ + protected function makeEventAndListeners($event, $listeners) + { + if (! Str::contains($event, '\\')) { + return; + } + + $this->callSilent('make:event', ['name' => $event]); + + $this->makeListeners($event, $listeners); + } + + /** + * Make the listeners for the given event. + * + * @param string $event + * @param array $listeners + * @return void + */ + protected function makeListeners($event, $listeners) + { + foreach ($listeners as $listener) { + $listener = preg_replace('/@.+$/', '', $listener); + + $this->callSilent('make:listener', ['name' => $listener, '--event' => $event]); + } + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/EventMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/EventMakeCommand.php new file mode 100644 index 0000000..f18719a --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/EventMakeCommand.php @@ -0,0 +1,61 @@ +option('sync') + ? __DIR__.'/stubs/job.stub' + : __DIR__.'/stubs/job-queued.stub'; + } + + /** + * Get the default namespace for the class. + * + * @param string $rootNamespace + * @return string + */ + protected function getDefaultNamespace($rootNamespace) + { + return $rootNamespace.'\Jobs'; + } + + /** + * Get the console command options. + * + * @return array + */ + protected function getOptions() + { + return [ + ['sync', null, InputOption::VALUE_NONE, 'Indicates that job should be synchronous.'], + ]; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php new file mode 100644 index 0000000..05f7979 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php @@ -0,0 +1,337 @@ +app = $app; + $this->events = $events; + + $this->app->booted(function () { + $this->defineConsoleSchedule(); + }); + } + + /** + * Define the application's command schedule. + * + * @return void + */ + protected function defineConsoleSchedule() + { + $this->app->instance( + Schedule::class, $schedule = new Schedule($this->app[Cache::class]) + ); + + $this->schedule($schedule); + } + + /** + * Run the console application. + * + * @param \Symfony\Component\Console\Input\InputInterface $input + * @param \Symfony\Component\Console\Output\OutputInterface $output + * @return int + */ + public function handle($input, $output = null) + { + try { + $this->bootstrap(); + + if (! $this->commandsLoaded) { + $this->commands(); + + $this->commandsLoaded = true; + } + + return $this->getArtisan()->run($input, $output); + } catch (Exception $e) { + $this->reportException($e); + + $this->renderException($output, $e); + + return 1; + } catch (Throwable $e) { + $e = new FatalThrowableError($e); + + $this->reportException($e); + + $this->renderException($output, $e); + + return 1; + } + } + + /** + * Terminate the application. + * + * @param \Symfony\Component\Console\Input\InputInterface $input + * @param int $status + * @return void + */ + public function terminate($input, $status) + { + $this->app->terminate(); + } + + /** + * Define the application's command schedule. + * + * @param \Illuminate\Console\Scheduling\Schedule $schedule + * @return void + */ + protected function schedule(Schedule $schedule) + { + // + } + + /** + * Register the Closure based commands for the application. + * + * @return void + */ + protected function commands() + { + // + } + + /** + * Register a Closure based command with the application. + * + * @param string $signature + * @param Closure $callback + * @return \Illuminate\Foundation\Console\ClosureCommand + */ + public function command($signature, Closure $callback) + { + $command = new ClosureCommand($signature, $callback); + + Artisan::starting(function ($artisan) use ($command) { + $artisan->add($command); + }); + + return $command; + } + + /** + * Register the given command with the console application. + * + * @param \Symfony\Component\Console\Command\Command $command + * @return void + */ + public function registerCommand($command) + { + $this->getArtisan()->add($command); + } + + /** + * Run an Artisan console command by name. + * + * @param string $command + * @param array $parameters + * @param \Symfony\Component\Console\Output\OutputInterface $outputBuffer + * @return int + */ + public function call($command, array $parameters = [], $outputBuffer = null) + { + $this->bootstrap(); + + if (! $this->commandsLoaded) { + $this->commands(); + + $this->commandsLoaded = true; + } + + return $this->getArtisan()->call($command, $parameters, $outputBuffer); + } + + /** + * Queue the given console command. + * + * @param string $command + * @param array $parameters + * @return void + */ + public function queue($command, array $parameters = []) + { + $this->app[QueueContract::class]->push( + new QueuedCommand(func_get_args()) + ); + } + + /** + * Get all of the commands registered with the console. + * + * @return array + */ + public function all() + { + $this->bootstrap(); + + return $this->getArtisan()->all(); + } + + /** + * Get the output for the last run command. + * + * @return string + */ + public function output() + { + $this->bootstrap(); + + return $this->getArtisan()->output(); + } + + /** + * Bootstrap the application for artisan commands. + * + * @return void + */ + public function bootstrap() + { + if (! $this->app->hasBeenBootstrapped()) { + $this->app->bootstrapWith($this->bootstrappers()); + } + + // If we are calling an arbitrary command from within the application, we'll load + // all of the available deferred providers which will make all of the commands + // available to an application. Otherwise the command will not be available. + $this->app->loadDeferredProviders(); + } + + /** + * Get the Artisan application instance. + * + * @return \Illuminate\Console\Application + */ + protected function getArtisan() + { + if (is_null($this->artisan)) { + return $this->artisan = (new Artisan($this->app, $this->events, $this->app->version())) + ->resolveCommands($this->commands); + } + + return $this->artisan; + } + + /** + * Set the Artisan application instance. + * + * @param \Illuminate\Console\Application $artisan + * @return void + */ + public function setArtisan($artisan) + { + $this->artisan = $artisan; + } + + /** + * Get the bootstrap classes for the application. + * + * @return array + */ + protected function bootstrappers() + { + return $this->bootstrappers; + } + + /** + * Report the exception to the exception handler. + * + * @param \Exception $e + * @return void + */ + protected function reportException(Exception $e) + { + $this->app[ExceptionHandler::class]->report($e); + } + + /** + * Report the exception to the exception handler. + * + * @param \Symfony\Component\Console\Output\OutputInterface $output + * @param \Exception $e + * @return void + */ + protected function renderException($output, Exception $e) + { + $this->app[ExceptionHandler::class]->renderForConsole($output, $e); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/KeyGenerateCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/KeyGenerateCommand.php new file mode 100644 index 0000000..b48a806 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/KeyGenerateCommand.php @@ -0,0 +1,110 @@ +generateRandomKey(); + + if ($this->option('show')) { + return $this->line(''.$key.''); + } + + // Next, we will replace the application key in the environment file so it is + // automatically setup for this developer. This key gets generated using a + // secure random byte generator and is later base64 encoded for storage. + if (! $this->setKeyInEnvironmentFile($key)) { + return; + } + + $this->laravel['config']['app.key'] = $key; + + $this->info("Application key [$key] set successfully."); + } + + /** + * Generate a random key for the application. + * + * @return string + */ + protected function generateRandomKey() + { + return 'base64:'.base64_encode(random_bytes( + $this->laravel['config']['app.cipher'] == 'AES-128-CBC' ? 16 : 32 + )); + } + + /** + * Set the application key in the environment file. + * + * @param string $key + * @return bool + */ + protected function setKeyInEnvironmentFile($key) + { + $currentKey = $this->laravel['config']['app.key']; + + if (strlen($currentKey) !== 0 && (! $this->confirmToProceed())) { + return false; + } + + $this->writeNewEnvironmentFileWith($key); + + return true; + } + + /** + * Write a new environment file with the given key. + * + * @param string $key + * @return void + */ + protected function writeNewEnvironmentFileWith($key) + { + file_put_contents($this->laravel->environmentFilePath(), preg_replace( + $this->keyReplacementPattern(), + 'APP_KEY='.$key, + file_get_contents($this->laravel->environmentFilePath()) + )); + } + + /** + * Get a regex pattern that will match env APP_KEY with any random key. + * + * @return string + */ + protected function keyReplacementPattern() + { + $escaped = preg_quote('='.$this->laravel['config']['app.key'], '/'); + + return "/^APP_KEY{$escaped}/m"; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ListenerMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ListenerMakeCommand.php new file mode 100644 index 0000000..971d1b7 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ListenerMakeCommand.php @@ -0,0 +1,119 @@ +option('event')) { + return $this->error('Missing required option: --event'); + } + + parent::fire(); + } + + /** + * Build the class with the given name. + * + * @param string $name + * @return string + */ + protected function buildClass($name) + { + $event = $this->option('event'); + + if (! Str::startsWith($event, $this->laravel->getNamespace()) && + ! Str::startsWith($event, 'Illuminate')) { + $event = $this->laravel->getNamespace().'Events\\'.$event; + } + + $stub = str_replace( + 'DummyEvent', class_basename($event), parent::buildClass($name) + ); + + return str_replace( + 'DummyFullEvent', $event, $stub + ); + } + + /** + * Get the stub file for the generator. + * + * @return string + */ + protected function getStub() + { + if ($this->option('queued')) { + return __DIR__.'/stubs/listener-queued.stub'; + } else { + return __DIR__.'/stubs/listener.stub'; + } + } + + /** + * Determine if the class already exists. + * + * @param string $rawName + * @return bool + */ + protected function alreadyExists($rawName) + { + return class_exists($rawName); + } + + /** + * Get the default namespace for the class. + * + * @param string $rootNamespace + * @return string + */ + protected function getDefaultNamespace($rootNamespace) + { + return $rootNamespace.'\Listeners'; + } + + /** + * Get the console command options. + * + * @return array + */ + protected function getOptions() + { + return [ + ['event', 'e', InputOption::VALUE_REQUIRED, 'The event class being listened for.'], + + ['queued', null, InputOption::VALUE_NONE, 'Indicates the event listener should be queued.'], + ]; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/MailMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/MailMakeCommand.php new file mode 100644 index 0000000..3d6cb7a --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/MailMakeCommand.php @@ -0,0 +1,114 @@ +option('markdown')) { + $this->writeMarkdownTemplate(); + } + } + + /** + * Write the Markdown template for the mailable. + * + * @return void + */ + protected function writeMarkdownTemplate() + { + $path = resource_path('views/'.str_replace('.', '/', $this->option('markdown'))).'.blade.php'; + + if (! $this->files->isDirectory(dirname($path))) { + $this->files->makeDirectory(dirname($path), 0755, true); + } + + $this->files->put($path, file_get_contents(__DIR__.'/stubs/markdown.stub')); + } + + /** + * Build the class with the given name. + * + * @param string $name + * @return string + */ + protected function buildClass($name) + { + $class = parent::buildClass($name); + + if ($this->option('markdown')) { + $class = str_replace('DummyView', $this->option('markdown'), $class); + } + + return $class; + } + + /** + * Get the stub file for the generator. + * + * @return string + */ + protected function getStub() + { + return $this->option('markdown') + ? __DIR__.'/stubs/markdown-mail.stub' + : __DIR__.'/stubs/mail.stub'; + } + + /** + * Get the default namespace for the class. + * + * @param string $rootNamespace + * @return string + */ + protected function getDefaultNamespace($rootNamespace) + { + return $rootNamespace.'\Mail'; + } + + /** + * Get the console command options. + * + * @return array + */ + protected function getOptions() + { + return [ + ['markdown', 'm', InputOption::VALUE_OPTIONAL, 'Create a new Markdown template for the mailable.'], + ]; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ModelMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ModelMakeCommand.php new file mode 100644 index 0000000..70a38b0 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ModelMakeCommand.php @@ -0,0 +1,120 @@ +option('migration')) { + $this->createMigration(); + } + + if ($this->option('controller') || $this->option('resource')) { + $this->createController(); + } + } + + /** + * Create a migration file for the model. + * + * @return void + */ + protected function createMigration() + { + $table = Str::plural(Str::snake(class_basename($this->argument('name')))); + + $this->call('make:migration', [ + 'name' => "create_{$table}_table", + '--create' => $table, + ]); + } + + /** + * Create a controller for the model. + * + * @return void + */ + protected function createController() + { + $controller = Str::studly(class_basename($this->argument('name'))); + + $modelName = $this->qualifyClass($this->getNameInput()); + + $this->call('make:controller', [ + 'name' => "{$controller}Controller", + '--model' => $this->option('resource') ? $modelName : null, + ]); + } + + /** + * Get the stub file for the generator. + * + * @return string + */ + protected function getStub() + { + return __DIR__.'/stubs/model.stub'; + } + + /** + * Get the default namespace for the class. + * + * @param string $rootNamespace + * @return string + */ + protected function getDefaultNamespace($rootNamespace) + { + return $rootNamespace; + } + + /** + * Get the console command options. + * + * @return array + */ + protected function getOptions() + { + return [ + ['migration', 'm', InputOption::VALUE_NONE, 'Create a new migration file for the model.'], + + ['controller', 'c', InputOption::VALUE_NONE, 'Create a new controller for the model.'], + + ['resource', 'r', InputOption::VALUE_NONE, 'Indicates if the generated controller should be a resource controller'], + ]; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/NotificationMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/NotificationMakeCommand.php new file mode 100644 index 0000000..f73a484 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/NotificationMakeCommand.php @@ -0,0 +1,114 @@ +option('markdown')) { + $this->writeMarkdownTemplate(); + } + } + + /** + * Write the Markdown template for the mailable. + * + * @return void + */ + protected function writeMarkdownTemplate() + { + $path = resource_path('views/'.str_replace('.', '/', $this->option('markdown'))).'.blade.php'; + + if (! $this->files->isDirectory(dirname($path))) { + $this->files->makeDirectory(dirname($path), 0755, true); + } + + $this->files->put($path, file_get_contents(__DIR__.'/stubs/markdown.stub')); + } + + /** + * Build the class with the given name. + * + * @param string $name + * @return string + */ + protected function buildClass($name) + { + $class = parent::buildClass($name); + + if ($this->option('markdown')) { + $class = str_replace('DummyView', $this->option('markdown'), $class); + } + + return $class; + } + + /** + * Get the stub file for the generator. + * + * @return string + */ + protected function getStub() + { + return $this->option('markdown') + ? __DIR__.'/stubs/markdown-notification.stub' + : __DIR__.'/stubs/notification.stub'; + } + + /** + * Get the default namespace for the class. + * + * @param string $rootNamespace + * @return string + */ + protected function getDefaultNamespace($rootNamespace) + { + return $rootNamespace.'\Notifications'; + } + + /** + * Get the console command options. + * + * @return array + */ + protected function getOptions() + { + return [ + ['markdown', 'm', InputOption::VALUE_OPTIONAL, 'Create a new Markdown template for the notification.'], + ]; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/OptimizeCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/OptimizeCommand.php new file mode 100644 index 0000000..b64156e --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/OptimizeCommand.php @@ -0,0 +1,76 @@ +composer = $composer; + } + + /** + * Execute the console command. + * + * @return void + */ + public function fire() + { + $this->info('Generating optimized class loader'); + + if ($this->option('psr')) { + $this->composer->dumpAutoloads(); + } else { + $this->composer->dumpOptimized(); + } + + $this->call('clear-compiled'); + } + + /** + * Get the console command options. + * + * @return array + */ + protected function getOptions() + { + return [ + ['force', null, InputOption::VALUE_NONE, 'Force the compiled class file to be written (deprecated).'], + + ['psr', null, InputOption::VALUE_NONE, 'Do not optimize Composer dump-autoload.'], + ]; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/PolicyMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/PolicyMakeCommand.php new file mode 100644 index 0000000..d1cbef9 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/PolicyMakeCommand.php @@ -0,0 +1,107 @@ +option('model'); + + return $model ? $this->replaceModel($stub, $model) : $stub; + } + + /** + * Replace the model for the given stub. + * + * @param string $stub + * @param string $model + * @return string + */ + protected function replaceModel($stub, $model) + { + $model = str_replace('/', '\\', $model); + + if (Str::startsWith($model, '\\')) { + $stub = str_replace('NamespacedDummyModel', trim($model, '\\'), $stub); + } else { + $stub = str_replace('NamespacedDummyModel', $this->laravel->getNamespace().$model, $stub); + } + + $model = class_basename(trim($model, '\\')); + + $stub = str_replace('DummyModel', $model, $stub); + + $stub = str_replace('dummyModel', Str::camel($model), $stub); + + return str_replace('dummyPluralModel', Str::plural(Str::camel($model)), $stub); + } + + /** + * Get the stub file for the generator. + * + * @return string + */ + protected function getStub() + { + return $this->option('model') + ? __DIR__.'/stubs/policy.stub' + : __DIR__.'/stubs/policy.plain.stub'; + } + + /** + * Get the default namespace for the class. + * + * @param string $rootNamespace + * @return string + */ + protected function getDefaultNamespace($rootNamespace) + { + return $rootNamespace.'\Policies'; + } + + /** + * Get the console command arguments. + * + * @return array + */ + protected function getOptions() + { + return [ + ['model', 'm', InputOption::VALUE_OPTIONAL, 'The model that the policy applies to.'], + ]; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ProviderMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ProviderMakeCommand.php new file mode 100644 index 0000000..fa887ed --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ProviderMakeCommand.php @@ -0,0 +1,50 @@ +data = $data; + } + + /** + * Handle the job. + * + * @param \Illuminate\Contracts\Console\Kernel $kernel + * @return void + */ + public function handle(KernelContract $kernel) + { + call_user_func_array([$kernel, 'call'], $this->data); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/RequestMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/RequestMakeCommand.php new file mode 100644 index 0000000..95b7a87 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/RequestMakeCommand.php @@ -0,0 +1,50 @@ +files = $files; + } + + /** + * Execute the console command. + * + * @return void + */ + public function fire() + { + $this->call('route:clear'); + + $routes = $this->getFreshApplicationRoutes(); + + if (count($routes) == 0) { + return $this->error("Your application doesn't have any routes."); + } + + foreach ($routes as $route) { + $route->prepareForSerialization(); + } + + $this->files->put( + $this->laravel->getCachedRoutesPath(), $this->buildRouteCacheFile($routes) + ); + + $this->info('Routes cached successfully!'); + } + + /** + * Boot a fresh copy of the application and get the routes. + * + * @return \Illuminate\Routing\RouteCollection + */ + protected function getFreshApplicationRoutes() + { + return tap($this->getFreshApplication()['router']->getRoutes(), function ($routes) { + $routes->refreshNameLookups(); + $routes->refreshActionLookups(); + }); + } + + /** + * Get a fresh application instance. + * + * @return \Illuminate\Foundation\Application + */ + protected function getFreshApplication() + { + return tap(require $this->laravel->bootstrapPath().'/app.php', function ($app) { + $app->make(ConsoleKernelContract::class)->bootstrap(); + }); + } + + /** + * Build the route cache file. + * + * @param \Illuminate\Routing\RouteCollection $routes + * @return string + */ + protected function buildRouteCacheFile(RouteCollection $routes) + { + $stub = $this->files->get(__DIR__.'/stubs/routes.stub'); + + return str_replace('{{routes}}', base64_encode(serialize($routes)), $stub); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/RouteClearCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/RouteClearCommand.php new file mode 100644 index 0000000..a14b280 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/RouteClearCommand.php @@ -0,0 +1,55 @@ +files = $files; + } + + /** + * Execute the console command. + * + * @return void + */ + public function fire() + { + $this->files->delete($this->laravel->getCachedRoutesPath()); + + $this->info('Route cache cleared!'); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/RouteListCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/RouteListCommand.php new file mode 100644 index 0000000..701cc70 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/RouteListCommand.php @@ -0,0 +1,192 @@ +router = $router; + $this->routes = $router->getRoutes(); + } + + /** + * Execute the console command. + * + * @return void + */ + public function fire() + { + if (count($this->routes) == 0) { + return $this->error("Your application doesn't have any routes."); + } + + $this->displayRoutes($this->getRoutes()); + } + + /** + * Compile the routes into a displayable format. + * + * @return array + */ + protected function getRoutes() + { + $routes = collect($this->routes)->map(function ($route) { + return $this->getRouteInformation($route); + })->all(); + + if ($sort = $this->option('sort')) { + $routes = $this->sortRoutes($sort, $routes); + } + + if ($this->option('reverse')) { + $routes = array_reverse($routes); + } + + return array_filter($routes); + } + + /** + * Get the route information for a given route. + * + * @param \Illuminate\Routing\Route $route + * @return array + */ + protected function getRouteInformation(Route $route) + { + return $this->filterRoute([ + 'host' => $route->domain(), + 'method' => implode('|', $route->methods()), + 'uri' => $route->uri(), + 'name' => $route->getName(), + 'action' => $route->getActionName(), + 'middleware' => $this->getMiddleware($route), + ]); + } + + /** + * Sort the routes by a given element. + * + * @param string $sort + * @param array $routes + * @return array + */ + protected function sortRoutes($sort, $routes) + { + return Arr::sort($routes, function ($route) use ($sort) { + return $route[$sort]; + }); + } + + /** + * Display the route information on the console. + * + * @param array $routes + * @return void + */ + protected function displayRoutes(array $routes) + { + $this->table($this->headers, $routes); + } + + /** + * Get before filters. + * + * @param \Illuminate\Routing\Route $route + * @return string + */ + protected function getMiddleware($route) + { + return collect($route->gatherMiddleware())->map(function ($middleware) { + return $middleware instanceof Closure ? 'Closure' : $middleware; + })->implode(','); + } + + /** + * Filter the route by URI and / or name. + * + * @param array $route + * @return array|null + */ + protected function filterRoute(array $route) + { + if (($this->option('name') && ! Str::contains($route['name'], $this->option('name'))) || + $this->option('path') && ! Str::contains($route['uri'], $this->option('path')) || + $this->option('method') && ! Str::contains($route['method'], $this->option('method'))) { + return; + } + + return $route; + } + + /** + * Get the console command options. + * + * @return array + */ + protected function getOptions() + { + return [ + ['method', null, InputOption::VALUE_OPTIONAL, 'Filter the routes by method.'], + + ['name', null, InputOption::VALUE_OPTIONAL, 'Filter the routes by name.'], + + ['path', null, InputOption::VALUE_OPTIONAL, 'Filter the routes by path.'], + + ['reverse', 'r', InputOption::VALUE_NONE, 'Reverse the ordering of the routes.'], + + ['sort', null, InputOption::VALUE_OPTIONAL, 'The column (host, method, uri, name, action, middleware) to sort by.', 'uri'], + ]; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ServeCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ServeCommand.php new file mode 100644 index 0000000..927fa42 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ServeCommand.php @@ -0,0 +1,90 @@ +laravel->publicPath()); + + $this->line("Laravel development server started: host()}:{$this->port()}>"); + + passthru($this->serverCommand()); + } + + /** + * Get the full server command. + * + * @return string + */ + protected function serverCommand() + { + return sprintf('%s -S %s:%s %s/server.php', + ProcessUtils::escapeArgument((new PhpExecutableFinder)->find(false)), + $this->host(), + $this->port(), + ProcessUtils::escapeArgument($this->laravel->basePath()) + ); + } + + /** + * Get the host for the command. + * + * @return string + */ + protected function host() + { + return $this->input->getOption('host'); + } + + /** + * Get the port for the command. + * + * @return string + */ + protected function port() + { + return $this->input->getOption('port'); + } + + /** + * Get the console command options. + * + * @return array + */ + protected function getOptions() + { + return [ + ['host', null, InputOption::VALUE_OPTIONAL, 'The host address to serve the application on.', '127.0.0.1'], + + ['port', null, InputOption::VALUE_OPTIONAL, 'The port to serve the application on.', 8000], + ]; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/StorageLinkCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/StorageLinkCommand.php new file mode 100644 index 0000000..ac29de9 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/StorageLinkCommand.php @@ -0,0 +1,40 @@ +error('The "public/storage" directory already exists.'); + } + + $this->laravel->make('files')->link( + storage_path('app/public'), public_path('storage') + ); + + $this->info('The [public/storage] directory has been linked.'); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/TestMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/TestMakeCommand.php new file mode 100644 index 0000000..3c63323 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/TestMakeCommand.php @@ -0,0 +1,81 @@ +option('unit')) { + return __DIR__.'/stubs/unit-test.stub'; + } else { + return __DIR__.'/stubs/test.stub'; + } + } + + /** + * Get the destination class path. + * + * @param string $name + * @return string + */ + protected function getPath($name) + { + $name = str_replace_first($this->rootNamespace(), '', $name); + + return $this->laravel->basePath().'/tests'.str_replace('\\', '/', $name).'.php'; + } + + /** + * Get the default namespace for the class. + * + * @param string $rootNamespace + * @return string + */ + protected function getDefaultNamespace($rootNamespace) + { + if ($this->option('unit')) { + return $rootNamespace.'\Unit'; + } else { + return $rootNamespace.'\Feature'; + } + } + + /** + * Get the root namespace for the class. + * + * @return string + */ + protected function rootNamespace() + { + return 'Tests'; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/UpCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/UpCommand.php new file mode 100644 index 0000000..82d8385 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/UpCommand.php @@ -0,0 +1,34 @@ +laravel->storagePath().'/framework/down'); + + $this->info('Application is now live.'); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/VendorPublishCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/VendorPublishCommand.php new file mode 100644 index 0000000..73f1c3a --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/VendorPublishCommand.php @@ -0,0 +1,189 @@ +files = $files; + } + + /** + * Execute the console command. + * + * @return void + */ + public function fire() + { + $tags = $this->option('tag') ?: [null]; + + foreach ((array) $tags as $tag) { + $this->publishTag($tag); + } + } + + /** + * Publishes the assets for a tag. + * + * @param string $tag + * @return mixed + */ + protected function publishTag($tag) + { + foreach ($this->pathsToPublish($tag) as $from => $to) { + $this->publishItem($from, $to); + } + + $this->info('Publishing complete.'); + } + + /** + * Get all of the paths to publish. + * + * @param string $tag + * @return array + */ + protected function pathsToPublish($tag) + { + return ServiceProvider::pathsToPublish( + $this->option('provider'), $tag + ); + } + + /** + * Publish the given item from and to the given location. + * + * @param string $from + * @param string $to + * @return void + */ + protected function publishItem($from, $to) + { + if ($this->files->isFile($from)) { + return $this->publishFile($from, $to); + } elseif ($this->files->isDirectory($from)) { + return $this->publishDirectory($from, $to); + } + + $this->error("Can't locate path: <{$from}>"); + } + + /** + * Publish the file to the given path. + * + * @param string $from + * @param string $to + * @return void + */ + protected function publishFile($from, $to) + { + if (! $this->files->exists($to) || $this->option('force')) { + $this->createParentDirectory(dirname($to)); + + $this->files->copy($from, $to); + + $this->status($from, $to, 'File'); + } + } + + /** + * Publish the directory to the given directory. + * + * @param string $from + * @param string $to + * @return void + */ + protected function publishDirectory($from, $to) + { + $this->moveManagedFiles(new MountManager([ + 'from' => new Flysystem(new LocalAdapter($from)), + 'to' => new Flysystem(new LocalAdapter($to)), + ])); + + $this->status($from, $to, 'Directory'); + } + + /** + * Move all the files in the given MountManager. + * + * @param \League\Flysystem\MountManager $manager + * @return void + */ + protected function moveManagedFiles($manager) + { + foreach ($manager->listContents('from://', true) as $file) { + if ($file['type'] === 'file' && (! $manager->has('to://'.$file['path']) || $this->option('force'))) { + $manager->put('to://'.$file['path'], $manager->read('from://'.$file['path'])); + } + } + } + + /** + * Create the directory to house the published files if needed. + * + * @param string $directory + * @return void + */ + protected function createParentDirectory($directory) + { + if (! $this->files->isDirectory($directory)) { + $this->files->makeDirectory($directory, 0755, true); + } + } + + /** + * Write a status message to the console. + * + * @param string $from + * @param string $to + * @param string $type + * @return void + */ + protected function status($from, $to, $type) + { + $from = str_replace(base_path(), '', realpath($from)); + + $to = str_replace(base_path(), '', realpath($to)); + + $this->line('Copied '.$type.' ['.$from.'] To ['.$to.']'); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ViewClearCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ViewClearCommand.php new file mode 100644 index 0000000..c7e443e --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ViewClearCommand.php @@ -0,0 +1,64 @@ +files = $files; + } + + /** + * Execute the console command. + * + * @return void + */ + public function fire() + { + $path = $this->laravel['config']['view.compiled']; + + if (! $path) { + throw new RuntimeException('View path not found.'); + } + + foreach ($this->files->glob("{$path}/*") as $view) { + $this->files->delete($view); + } + + $this->info('Compiled views cleared!'); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/console.stub b/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/console.stub new file mode 100644 index 0000000..9b770d9 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/console.stub @@ -0,0 +1,42 @@ +view('view.name'); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/markdown-mail.stub b/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/markdown-mail.stub new file mode 100644 index 0000000..25a0cdc --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/markdown-mail.stub @@ -0,0 +1,33 @@ +markdown('DummyView'); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/markdown-notification.stub b/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/markdown-notification.stub new file mode 100644 index 0000000..f554b2c --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/markdown-notification.stub @@ -0,0 +1,58 @@ +markdown('DummyView'); + } + + /** + * Get the array representation of the notification. + * + * @param mixed $notifiable + * @return array + */ + public function toArray($notifiable) + { + return [ + // + ]; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/markdown.stub b/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/markdown.stub new file mode 100644 index 0000000..bc41428 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/markdown.stub @@ -0,0 +1,12 @@ +@component('mail::message') +# Introduction + +The body of your message. + +@component('mail::button', ['url' => '']) +Button Text +@endcomponent + +Thanks,
+{{ config('app.name') }} +@endcomponent diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/model.stub b/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/model.stub new file mode 100644 index 0000000..f01a833 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/model.stub @@ -0,0 +1,10 @@ +line('The introduction to the notification.') + ->action('Notification Action', url('/')) + ->line('Thank you for using our application!'); + } + + /** + * Get the array representation of the notification. + * + * @param mixed $notifiable + * @return array + */ + public function toArray($notifiable) + { + return [ + // + ]; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/policy.plain.stub b/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/policy.plain.stub new file mode 100644 index 0000000..e8221be --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/policy.plain.stub @@ -0,0 +1,21 @@ +setRoutes( + unserialize(base64_decode('{{routes}}')) +); diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/test.stub b/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/test.stub new file mode 100644 index 0000000..dd804dc --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/test.stub @@ -0,0 +1,21 @@ +assertTrue(true); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/unit-test.stub b/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/unit-test.stub new file mode 100644 index 0000000..315e707 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/unit-test.stub @@ -0,0 +1,20 @@ +assertTrue(true); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/EnvironmentDetector.php b/vendor/laravel/framework/src/Illuminate/Foundation/EnvironmentDetector.php new file mode 100644 index 0000000..205f73b --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/EnvironmentDetector.php @@ -0,0 +1,69 @@ +detectConsoleEnvironment($callback, $consoleArgs); + } + + return $this->detectWebEnvironment($callback); + } + + /** + * Set the application environment for a web request. + * + * @param \Closure $callback + * @return string + */ + protected function detectWebEnvironment(Closure $callback) + { + return call_user_func($callback); + } + + /** + * Set the application environment from command-line arguments. + * + * @param \Closure $callback + * @param array $args + * @return string + */ + protected function detectConsoleEnvironment(Closure $callback, array $args) + { + // First we will check if an environment argument was passed via console arguments + // and if it was that automatically overrides as the environment. Otherwise, we + // will check the environment as a "web" request like a typical HTTP request. + if (! is_null($value = $this->getEnvironmentArgument($args))) { + return head(array_slice(explode('=', $value), 1)); + } + + return $this->detectWebEnvironment($callback); + } + + /** + * Get the environment argument from the console. + * + * @param array $args + * @return string|null + */ + protected function getEnvironmentArgument(array $args) + { + return Arr::first($args, function ($value) { + return Str::startsWith($value, '--env'); + }); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Events/Dispatchable.php b/vendor/laravel/framework/src/Illuminate/Foundation/Events/Dispatchable.php new file mode 100644 index 0000000..0018295 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Events/Dispatchable.php @@ -0,0 +1,26 @@ +locale = $locale; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php b/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php new file mode 100644 index 0000000..f737c67 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php @@ -0,0 +1,256 @@ +container = $container; + } + + /** + * Report or log an exception. + * + * @param \Exception $e + * @return void + * + * @throws \Exception + */ + public function report(Exception $e) + { + if ($this->shouldntReport($e)) { + return; + } + + try { + $logger = $this->container->make(LoggerInterface::class); + } catch (Exception $ex) { + throw $e; // throw the original exception + } + + $logger->error($e); + } + + /** + * Determine if the exception should be reported. + * + * @param \Exception $e + * @return bool + */ + public function shouldReport(Exception $e) + { + return ! $this->shouldntReport($e); + } + + /** + * Determine if the exception is in the "do not report" list. + * + * @param \Exception $e + * @return bool + */ + protected function shouldntReport(Exception $e) + { + $dontReport = array_merge($this->dontReport, [HttpResponseException::class]); + + return ! is_null(collect($dontReport)->first(function ($type) use ($e) { + return $e instanceof $type; + })); + } + + /** + * Render an exception into a response. + * + * @param \Illuminate\Http\Request $request + * @param \Exception $e + * @return \Symfony\Component\HttpFoundation\Response + */ + public function render($request, Exception $e) + { + $e = $this->prepareException($e); + + if ($e instanceof HttpResponseException) { + return $e->getResponse(); + } elseif ($e instanceof AuthenticationException) { + return $this->unauthenticated($request, $e); + } elseif ($e instanceof ValidationException) { + return $this->convertValidationExceptionToResponse($e, $request); + } + + return $this->prepareResponse($request, $e); + } + + /** + * Prepare exception for rendering. + * + * @param \Exception $e + * @return \Exception + */ + protected function prepareException(Exception $e) + { + if ($e instanceof ModelNotFoundException) { + $e = new NotFoundHttpException($e->getMessage(), $e); + } elseif ($e instanceof AuthorizationException) { + $e = new HttpException(403, $e->getMessage()); + } + + return $e; + } + + /** + * Create a response object from the given validation exception. + * + * @param \Illuminate\Validation\ValidationException $e + * @param \Illuminate\Http\Request $request + * @return \Symfony\Component\HttpFoundation\Response + */ + protected function convertValidationExceptionToResponse(ValidationException $e, $request) + { + if ($e->response) { + return $e->response; + } + + $errors = $e->validator->errors()->getMessages(); + + if ($request->expectsJson()) { + return response()->json($errors, 422); + } + + return redirect()->back()->withInput( + $request->input() + )->withErrors($errors); + } + + /** + * Prepare response containing exception render. + * + * @param \Illuminate\Http\Request $request + * @param \Exception $e + * @return \Symfony\Component\HttpFoundation\Response + */ + protected function prepareResponse($request, Exception $e) + { + if ($this->isHttpException($e)) { + return $this->toIlluminateResponse($this->renderHttpException($e), $e); + } else { + return $this->toIlluminateResponse($this->convertExceptionToResponse($e), $e); + } + } + + /** + * Render the given HttpException. + * + * @param \Symfony\Component\HttpKernel\Exception\HttpException $e + * @return \Symfony\Component\HttpFoundation\Response + */ + protected function renderHttpException(HttpException $e) + { + $status = $e->getStatusCode(); + + view()->replaceNamespace('errors', [ + resource_path('views/errors'), + __DIR__.'/views', + ]); + + if (view()->exists("errors::{$status}")) { + return response()->view("errors::{$status}", ['exception' => $e], $status, $e->getHeaders()); + } else { + return $this->convertExceptionToResponse($e); + } + } + + /** + * Create a Symfony response for the given exception. + * + * @param \Exception $e + * @return \Symfony\Component\HttpFoundation\Response + */ + protected function convertExceptionToResponse(Exception $e) + { + $e = FlattenException::create($e); + + $handler = new SymfonyExceptionHandler(config('app.debug', false)); + + return SymfonyResponse::create($handler->getHtml($e), $e->getStatusCode(), $e->getHeaders()); + } + + /** + * Map the given exception into an Illuminate response. + * + * @param \Symfony\Component\HttpFoundation\Response $response + * @param \Exception $e + * @return \Illuminate\Http\Response + */ + protected function toIlluminateResponse($response, Exception $e) + { + if ($response instanceof SymfonyRedirectResponse) { + $response = new RedirectResponse($response->getTargetUrl(), $response->getStatusCode(), $response->headers->all()); + } else { + $response = new Response($response->getContent(), $response->getStatusCode(), $response->headers->all()); + } + + return $response->withException($e); + } + + /** + * Render an exception to the console. + * + * @param \Symfony\Component\Console\Output\OutputInterface $output + * @param \Exception $e + * @return void + */ + public function renderForConsole($output, Exception $e) + { + (new ConsoleApplication)->renderException($e, $output); + } + + /** + * Determine if the given exception is an HTTP exception. + * + * @param \Exception $e + * @return bool + */ + protected function isHttpException(Exception $e) + { + return $e instanceof HttpException; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/views/503.blade.php b/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/views/503.blade.php new file mode 100644 index 0000000..14098cb --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/views/503.blade.php @@ -0,0 +1,56 @@ + + + + + + + + Service Unavailable + + + + + + + + +
+
+
+ Be right back. +
+
+
+ + diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Http/Events/RequestHandled.php b/vendor/laravel/framework/src/Illuminate/Foundation/Http/Events/RequestHandled.php new file mode 100644 index 0000000..d6f71e0 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Http/Events/RequestHandled.php @@ -0,0 +1,33 @@ +request = $request; + $this->response = $response; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Http/Exceptions/MaintenanceModeException.php b/vendor/laravel/framework/src/Illuminate/Foundation/Http/Exceptions/MaintenanceModeException.php new file mode 100644 index 0000000..6ee1de6 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Http/Exceptions/MaintenanceModeException.php @@ -0,0 +1,54 @@ +wentDownAt = Carbon::createFromTimestamp($time); + + if ($retryAfter) { + $this->retryAfter = $retryAfter; + + $this->willBeAvailableAt = Carbon::createFromTimestamp($time)->addSeconds($this->retryAfter); + } + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Http/FormRequest.php b/vendor/laravel/framework/src/Illuminate/Foundation/Http/FormRequest.php new file mode 100644 index 0000000..de2ef7d --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Http/FormRequest.php @@ -0,0 +1,249 @@ +container->make(ValidationFactory::class); + + if (method_exists($this, 'validator')) { + $validator = $this->container->call([$this, 'validator'], compact('factory')); + } else { + $validator = $this->createDefaultValidator($factory); + } + + if (method_exists($this, 'withValidator')) { + $this->withValidator($validator); + } + + return $validator; + } + + /** + * Create the default validator instance. + * + * @param \Illuminate\Contracts\Validation\Factory $factory + * @return \Illuminate\Contracts\Validation\Validator + */ + protected function createDefaultValidator(ValidationFactory $factory) + { + return $factory->make( + $this->validationData(), $this->container->call([$this, 'rules']), + $this->messages(), $this->attributes() + ); + } + + /** + * Get data to be validated from the request. + * + * @return array + */ + protected function validationData() + { + return $this->all(); + } + + /** + * Handle a failed validation attempt. + * + * @param \Illuminate\Contracts\Validation\Validator $validator + * @return void + * + * @throws \Illuminate\Validation\ValidationException + */ + protected function failedValidation(Validator $validator) + { + throw new ValidationException($validator, $this->response( + $this->formatErrors($validator) + )); + } + + /** + * Get the proper failed validation response for the request. + * + * @param array $errors + * @return \Symfony\Component\HttpFoundation\Response + */ + public function response(array $errors) + { + if ($this->expectsJson()) { + return new JsonResponse($errors, 422); + } + + return $this->redirector->to($this->getRedirectUrl()) + ->withInput($this->except($this->dontFlash)) + ->withErrors($errors, $this->errorBag); + } + + /** + * Format the errors from the given Validator instance. + * + * @param \Illuminate\Contracts\Validation\Validator $validator + * @return array + */ + protected function formatErrors(Validator $validator) + { + return $validator->getMessageBag()->toArray(); + } + + /** + * Get the URL to redirect to on a validation error. + * + * @return string + */ + protected function getRedirectUrl() + { + $url = $this->redirector->getUrlGenerator(); + + if ($this->redirect) { + return $url->to($this->redirect); + } elseif ($this->redirectRoute) { + return $url->route($this->redirectRoute); + } elseif ($this->redirectAction) { + return $url->action($this->redirectAction); + } + + return $url->previous(); + } + + /** + * Determine if the request passes the authorization check. + * + * @return bool + */ + protected function passesAuthorization() + { + if (method_exists($this, 'authorize')) { + return $this->container->call([$this, 'authorize']); + } + + return false; + } + + /** + * Handle a failed authorization attempt. + * + * @return void + * + * @throws \Illuminate\Auth\Access\AuthorizationException + */ + protected function failedAuthorization() + { + throw new AuthorizationException('This action is unauthorized.'); + } + + /** + * Get custom messages for validator errors. + * + * @return array + */ + public function messages() + { + return []; + } + + /** + * Get custom attributes for validator errors. + * + * @return array + */ + public function attributes() + { + return []; + } + + /** + * Set the Redirector instance. + * + * @param \Illuminate\Routing\Redirector $redirector + * @return $this + */ + public function setRedirector(Redirector $redirector) + { + $this->redirector = $redirector; + + return $this; + } + + /** + * Set the container implementation. + * + * @param \Illuminate\Contracts\Container\Container $container + * @return $this + */ + public function setContainer(Container $container) + { + $this->container = $container; + + return $this; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php b/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php new file mode 100644 index 0000000..9a9c426 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php @@ -0,0 +1,336 @@ +app = $app; + $this->router = $router; + + $router->middlewarePriority = $this->middlewarePriority; + + foreach ($this->middlewareGroups as $key => $middleware) { + $router->middlewareGroup($key, $middleware); + } + + foreach ($this->routeMiddleware as $key => $middleware) { + $router->aliasMiddleware($key, $middleware); + } + } + + /** + * Handle an incoming HTTP request. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\Response + */ + public function handle($request) + { + try { + $request->enableHttpMethodParameterOverride(); + + $response = $this->sendRequestThroughRouter($request); + } catch (Exception $e) { + $this->reportException($e); + + $response = $this->renderException($request, $e); + } catch (Throwable $e) { + $this->reportException($e = new FatalThrowableError($e)); + + $response = $this->renderException($request, $e); + } + + event(new Events\RequestHandled($request, $response)); + + return $response; + } + + /** + * Send the given request through the middleware / router. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\Response + */ + protected function sendRequestThroughRouter($request) + { + $this->app->instance('request', $request); + + Facade::clearResolvedInstance('request'); + + $this->bootstrap(); + + return (new Pipeline($this->app)) + ->send($request) + ->through($this->app->shouldSkipMiddleware() ? [] : $this->middleware) + ->then($this->dispatchToRouter()); + } + + /** + * Bootstrap the application for HTTP requests. + * + * @return void + */ + public function bootstrap() + { + if (! $this->app->hasBeenBootstrapped()) { + $this->app->bootstrapWith($this->bootstrappers()); + } + } + + /** + * Get the route dispatcher callback. + * + * @return \Closure + */ + protected function dispatchToRouter() + { + return function ($request) { + $this->app->instance('request', $request); + + return $this->router->dispatch($request); + }; + } + + /** + * Call the terminate method on any terminable middleware. + * + * @param \Illuminate\Http\Request $request + * @param \Illuminate\Http\Response $response + * @return void + */ + public function terminate($request, $response) + { + $this->terminateMiddleware($request, $response); + + $this->app->terminate(); + } + + /** + * Call the terminate method on any terminable middleware. + * + * @param \Illuminate\Http\Request $request + * @param \Illuminate\Http\Response $response + * @return void + */ + protected function terminateMiddleware($request, $response) + { + $middlewares = $this->app->shouldSkipMiddleware() ? [] : array_merge( + $this->gatherRouteMiddleware($request), + $this->middleware + ); + + foreach ($middlewares as $middleware) { + if (! is_string($middleware)) { + continue; + } + + list($name, $parameters) = $this->parseMiddleware($middleware); + + $instance = $this->app->make($name); + + if (method_exists($instance, 'terminate')) { + $instance->terminate($request, $response); + } + } + } + + /** + * Gather the route middleware for the given request. + * + * @param \Illuminate\Http\Request $request + * @return array + */ + protected function gatherRouteMiddleware($request) + { + if ($route = $request->route()) { + return $this->router->gatherRouteMiddleware($route); + } + + return []; + } + + /** + * Parse a middleware string to get the name and parameters. + * + * @param string $middleware + * @return array + */ + protected function parseMiddleware($middleware) + { + list($name, $parameters) = array_pad(explode(':', $middleware, 2), 2, []); + + if (is_string($parameters)) { + $parameters = explode(',', $parameters); + } + + return [$name, $parameters]; + } + + /** + * Determine if the kernel has a given middleware. + * + * @param string $middleware + * @return bool + */ + public function hasMiddleware($middleware) + { + return in_array($middleware, $this->middleware); + } + + /** + * Add a new middleware to beginning of the stack if it does not already exist. + * + * @param string $middleware + * @return $this + */ + public function prependMiddleware($middleware) + { + if (array_search($middleware, $this->middleware) === false) { + array_unshift($this->middleware, $middleware); + } + + return $this; + } + + /** + * Add a new middleware to end of the stack if it does not already exist. + * + * @param string $middleware + * @return $this + */ + public function pushMiddleware($middleware) + { + if (array_search($middleware, $this->middleware) === false) { + $this->middleware[] = $middleware; + } + + return $this; + } + + /** + * Get the bootstrap classes for the application. + * + * @return array + */ + protected function bootstrappers() + { + return $this->bootstrappers; + } + + /** + * Report the exception to the exception handler. + * + * @param \Exception $e + * @return void + */ + protected function reportException(Exception $e) + { + $this->app[ExceptionHandler::class]->report($e); + } + + /** + * Render the exception to a response. + * + * @param \Illuminate\Http\Request $request + * @param \Exception $e + * @return \Symfony\Component\HttpFoundation\Response + */ + protected function renderException($request, Exception $e) + { + return $this->app[ExceptionHandler::class]->render($request, $e); + } + + /** + * Get the Laravel application instance. + * + * @return \Illuminate\Contracts\Foundation\Application + */ + public function getApplication() + { + return $this->app; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php b/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php new file mode 100644 index 0000000..6de7509 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php @@ -0,0 +1,48 @@ +app = $app; + } + + /** + * Handle an incoming request. + * + * @param \Illuminate\Http\Request $request + * @param \Closure $next + * @return mixed + * + * @throws \Symfony\Component\HttpKernel\Exception\HttpException + */ + public function handle($request, Closure $next) + { + if ($this->app->isDownForMaintenance()) { + $data = json_decode(file_get_contents($this->app->storagePath().'/framework/down'), true); + + throw new MaintenanceModeException($data['time'], $data['retry'], $data['message']); + } + + return $next($request); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php b/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php new file mode 100644 index 0000000..813c9cf --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php @@ -0,0 +1,18 @@ +attributes = $attributes; + + $this->clean($request); + + return $next($request); + } + + /** + * Clean the request's data. + * + * @param \Illuminate\Http\Request $request + * @return void + */ + protected function clean($request) + { + $this->cleanParameterBag($request->query); + + $this->cleanParameterBag($request->request); + + if ($request->isJson()) { + $this->cleanParameterBag($request->json()); + } + } + + /** + * Clean the data in the parameter bag. + * + * @param \Symfony\Component\HttpFoundation\ParameterBag $bag + * @return void + */ + protected function cleanParameterBag(ParameterBag $bag) + { + $bag->replace($this->cleanArray($bag->all())); + } + + /** + * Clean the data in the given array. + * + * @param array $data + * @return array + */ + protected function cleanArray(array $data) + { + return collect($data)->map(function ($value, $key) { + return $this->cleanValue($key, $value); + })->all(); + } + + /** + * Clean the given value. + * + * @param string $key + * @param mixed $value + * @return mixed + */ + protected function cleanValue($key, $value) + { + if (is_array($value)) { + return $this->cleanArray($value); + } + + return $this->transform($key, $value); + } + + /** + * Transform the given value. + * + * @param string $key + * @param mixed $value + * @return mixed + */ + protected function transform($key, $value) + { + return $value; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php b/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php new file mode 100644 index 0000000..4c8d1dd --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php @@ -0,0 +1,31 @@ +except, true)) { + return $value; + } + + return is_string($value) ? trim($value) : $value; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php b/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php new file mode 100644 index 0000000..d952b0c --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php @@ -0,0 +1,54 @@ +getPostMaxSize(); + + if ($max > 0 && $request->server('CONTENT_LENGTH') > $max) { + throw new PostTooLargeException; + } + + return $next($request); + } + + /** + * Determine the server 'post_max_size' as bytes. + * + * @return int + */ + protected function getPostMaxSize() + { + if (is_numeric($postMaxSize = ini_get('post_max_size'))) { + return (int) $postMaxSize; + } + + $metric = strtoupper(substr($postMaxSize, -1)); + + switch ($metric) { + case 'K': + return (int) $postMaxSize * 1024; + case 'M': + return (int) $postMaxSize * 1048576; + case 'G': + return (int) $postMaxSize * 1073741824; + default: + return (int) $postMaxSize; + } + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php b/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php new file mode 100644 index 0000000..9424f73 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php @@ -0,0 +1,165 @@ +app = $app; + $this->encrypter = $encrypter; + } + + /** + * Handle an incoming request. + * + * @param \Illuminate\Http\Request $request + * @param \Closure $next + * @return mixed + * + * @throws \Illuminate\Session\TokenMismatchException + */ + public function handle($request, Closure $next) + { + if ( + $this->isReading($request) || + $this->runningUnitTests() || + $this->inExceptArray($request) || + $this->tokensMatch($request) + ) { + return $this->addCookieToResponse($request, $next($request)); + } + + throw new TokenMismatchException; + } + + /** + * Determine if the HTTP request uses a ‘read’ verb. + * + * @param \Illuminate\Http\Request $request + * @return bool + */ + protected function isReading($request) + { + return in_array($request->method(), ['HEAD', 'GET', 'OPTIONS']); + } + + /** + * Determine if the application is running unit tests. + * + * @return bool + */ + protected function runningUnitTests() + { + return $this->app->runningInConsole() && $this->app->runningUnitTests(); + } + + /** + * Determine if the request has a URI that should pass through CSRF verification. + * + * @param \Illuminate\Http\Request $request + * @return bool + */ + protected function inExceptArray($request) + { + foreach ($this->except as $except) { + if ($except !== '/') { + $except = trim($except, '/'); + } + + if ($request->is($except)) { + return true; + } + } + + return false; + } + + /** + * Determine if the session and input CSRF tokens match. + * + * @param \Illuminate\Http\Request $request + * @return bool + */ + protected function tokensMatch($request) + { + $token = $this->getTokenFromRequest($request); + + return is_string($request->session()->token()) && + is_string($token) && + hash_equals($request->session()->token(), $token); + } + + /** + * Get the CSRF token from the request. + * + * @param \Illuminate\Http\Request $request + * @return string + */ + protected function getTokenFromRequest($request) + { + $token = $request->input('_token') ?: $request->header('X-CSRF-TOKEN'); + + if (! $token && $header = $request->header('X-XSRF-TOKEN')) { + $token = $this->encrypter->decrypt($header); + } + + return $token; + } + + /** + * Add the CSRF token to the response cookies. + * + * @param \Illuminate\Http\Request $request + * @param \Symfony\Component\HttpFoundation\Response $response + * @return \Symfony\Component\HttpFoundation\Response + */ + protected function addCookieToResponse($request, $response) + { + $config = config('session'); + + $response->headers->setCookie( + new Cookie( + 'XSRF-TOKEN', $request->session()->token(), Carbon::now()->getTimestamp() + 60 * $config['lifetime'], + $config['path'], $config['domain'], $config['secure'], false + ) + ); + + return $response; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Inspiring.php b/vendor/laravel/framework/src/Illuminate/Foundation/Inspiring.php new file mode 100644 index 0000000..5216088 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Inspiring.php @@ -0,0 +1,34 @@ +random(); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php b/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php new file mode 100755 index 0000000..e29bb3c --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php @@ -0,0 +1,210 @@ +app = $app; + $this->files = $files; + $this->manifestPath = $manifestPath; + } + + /** + * Register the application service providers. + * + * @param array $providers + * @return void + */ + public function load(array $providers) + { + $manifest = $this->loadManifest(); + + // First we will load the service manifest, which contains information on all + // service providers registered with the application and which services it + // provides. This is used to know which services are "deferred" loaders. + if ($this->shouldRecompile($manifest, $providers)) { + $manifest = $this->compileManifest($providers); + } + + // Next, we will register events to load the providers for each of the events + // that it has requested. This allows the service provider to defer itself + // while still getting automatically loaded when a certain event occurs. + foreach ($manifest['when'] as $provider => $events) { + $this->registerLoadEvents($provider, $events); + } + + // We will go ahead and register all of the eagerly loaded providers with the + // application so their services can be registered with the application as + // a provided service. Then we will set the deferred service list on it. + foreach ($manifest['eager'] as $provider) { + $this->app->register($provider); + } + + $this->app->addDeferredServices($manifest['deferred']); + } + + /** + * Load the service provider manifest JSON file. + * + * @return array|null + */ + public function loadManifest() + { + // The service manifest is a file containing a JSON representation of every + // service provided by the application and whether its provider is using + // deferred loading or should be eagerly loaded on each request to us. + if ($this->files->exists($this->manifestPath)) { + $manifest = $this->files->getRequire($this->manifestPath); + + if ($manifest) { + return array_merge(['when' => []], $manifest); + } + } + } + + /** + * Determine if the manifest should be compiled. + * + * @param array $manifest + * @param array $providers + * @return bool + */ + public function shouldRecompile($manifest, $providers) + { + return is_null($manifest) || $manifest['providers'] != $providers; + } + + /** + * Register the load events for the given provider. + * + * @param string $provider + * @param array $events + * @return void + */ + protected function registerLoadEvents($provider, array $events) + { + if (count($events) < 1) { + return; + } + + $this->app->make('events')->listen($events, function () use ($provider) { + $this->app->register($provider); + }); + } + + /** + * Compile the application service manifest file. + * + * @param array $providers + * @return array + */ + protected function compileManifest($providers) + { + // The service manifest should contain a list of all of the providers for + // the application so we can compare it on each request to the service + // and determine if the manifest should be recompiled or is current. + $manifest = $this->freshManifest($providers); + + foreach ($providers as $provider) { + $instance = $this->createProvider($provider); + + // When recompiling the service manifest, we will spin through each of the + // providers and check if it's a deferred provider or not. If so we'll + // add it's provided services to the manifest and note the provider. + if ($instance->isDeferred()) { + foreach ($instance->provides() as $service) { + $manifest['deferred'][$service] = $provider; + } + + $manifest['when'][$provider] = $instance->when(); + } + + // If the service providers are not deferred, we will simply add it to an + // array of eagerly loaded providers that will get registered on every + // request to this application instead of "lazy" loading every time. + else { + $manifest['eager'][] = $provider; + } + } + + return $this->writeManifest($manifest); + } + + /** + * Create a fresh service manifest data structure. + * + * @param array $providers + * @return array + */ + protected function freshManifest(array $providers) + { + return ['providers' => $providers, 'eager' => [], 'deferred' => []]; + } + + /** + * Write the service manifest file to disk. + * + * @param array $manifest + * @return array + * + * @throws \Exception + */ + public function writeManifest($manifest) + { + if (! is_writable(dirname($this->manifestPath))) { + throw new Exception('The bootstrap/cache directory must be present and writable.'); + } + + $this->files->put( + $this->manifestPath, ' []], $manifest); + } + + /** + * Create a new provider instance. + * + * @param string $provider + * @return \Illuminate\Support\ServiceProvider + */ + public function createProvider($provider) + { + return new $provider($this->app); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Providers/ArtisanServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Foundation/Providers/ArtisanServiceProvider.php new file mode 100755 index 0000000..9cc4665 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Providers/ArtisanServiceProvider.php @@ -0,0 +1,869 @@ + 'command.cache.clear', + 'CacheForget' => 'command.cache.forget', + 'ClearCompiled' => 'command.clear-compiled', + 'ClearResets' => 'command.auth.resets.clear', + 'ConfigCache' => 'command.config.cache', + 'ConfigClear' => 'command.config.clear', + 'Down' => 'command.down', + 'Environment' => 'command.environment', + 'KeyGenerate' => 'command.key.generate', + 'Migrate' => 'command.migrate', + 'MigrateInstall' => 'command.migrate.install', + 'MigrateRefresh' => 'command.migrate.refresh', + 'MigrateReset' => 'command.migrate.reset', + 'MigrateRollback' => 'command.migrate.rollback', + 'MigrateStatus' => 'command.migrate.status', + 'Optimize' => 'command.optimize', + 'QueueFailed' => 'command.queue.failed', + 'QueueFlush' => 'command.queue.flush', + 'QueueForget' => 'command.queue.forget', + 'QueueListen' => 'command.queue.listen', + 'QueueRestart' => 'command.queue.restart', + 'QueueRetry' => 'command.queue.retry', + 'QueueWork' => 'command.queue.work', + 'RouteCache' => 'command.route.cache', + 'RouteClear' => 'command.route.clear', + 'RouteList' => 'command.route.list', + 'Seed' => 'command.seed', + 'ScheduleFinish' => ScheduleFinishCommand::class, + 'ScheduleRun' => ScheduleRunCommand::class, + 'StorageLink' => 'command.storage.link', + 'Up' => 'command.up', + 'ViewClear' => 'command.view.clear', + ]; + + /** + * The commands to be registered. + * + * @var array + */ + protected $devCommands = [ + 'AppName' => 'command.app.name', + 'AuthMake' => 'command.auth.make', + 'CacheTable' => 'command.cache.table', + 'ConsoleMake' => 'command.console.make', + 'ControllerMake' => 'command.controller.make', + 'EventGenerate' => 'command.event.generate', + 'EventMake' => 'command.event.make', + 'JobMake' => 'command.job.make', + 'ListenerMake' => 'command.listener.make', + 'MailMake' => 'command.mail.make', + 'MiddlewareMake' => 'command.middleware.make', + 'MigrateMake' => 'command.migrate.make', + 'ModelMake' => 'command.model.make', + 'NotificationMake' => 'command.notification.make', + 'NotificationTable' => 'command.notification.table', + 'PolicyMake' => 'command.policy.make', + 'ProviderMake' => 'command.provider.make', + 'QueueFailedTable' => 'command.queue.failed-table', + 'QueueTable' => 'command.queue.table', + 'RequestMake' => 'command.request.make', + 'SeederMake' => 'command.seeder.make', + 'SessionTable' => 'command.session.table', + 'Serve' => 'command.serve', + 'TestMake' => 'command.test.make', + 'VendorPublish' => 'command.vendor.publish', + ]; + + /** + * Register the service provider. + * + * @return void + */ + public function register() + { + $this->registerCommands(array_merge( + $this->commands, $this->devCommands + )); + } + + /** + * Register the given commands. + * + * @param array $commands + * @return void + */ + protected function registerCommands(array $commands) + { + foreach (array_keys($commands) as $command) { + call_user_func_array([$this, "register{$command}Command"], []); + } + + $this->commands(array_values($commands)); + } + + /** + * Register the command. + * + * @return void + */ + protected function registerAppNameCommand() + { + $this->app->singleton('command.app.name', function ($app) { + return new AppNameCommand($app['composer'], $app['files']); + }); + } + + /** + * Register the command. + * + * @return void + */ + protected function registerAuthMakeCommand() + { + $this->app->singleton('command.auth.make', function ($app) { + return new MakeAuthCommand; + }); + } + + /** + * Register the command. + * + * @return void + */ + protected function registerCacheClearCommand() + { + $this->app->singleton('command.cache.clear', function ($app) { + return new CacheClearCommand($app['cache']); + }); + } + + /** + * Register the command. + * + * @return void + */ + protected function registerCacheForgetCommand() + { + $this->app->singleton('command.cache.forget', function ($app) { + return new CacheForgetCommand($app['cache']); + }); + } + + /** + * Register the command. + * + * @return void + */ + protected function registerCacheTableCommand() + { + $this->app->singleton('command.cache.table', function ($app) { + return new CacheTableCommand($app['files'], $app['composer']); + }); + } + + /** + * Register the command. + * + * @return void + */ + protected function registerClearCompiledCommand() + { + $this->app->singleton('command.clear-compiled', function () { + return new ClearCompiledCommand; + }); + } + + /** + * Register the command. + * + * @return void + */ + protected function registerClearResetsCommand() + { + $this->app->singleton('command.auth.resets.clear', function () { + return new ClearResetsCommand; + }); + } + + /** + * Register the command. + * + * @return void + */ + protected function registerConfigCacheCommand() + { + $this->app->singleton('command.config.cache', function ($app) { + return new ConfigCacheCommand($app['files']); + }); + } + + /** + * Register the command. + * + * @return void + */ + protected function registerConfigClearCommand() + { + $this->app->singleton('command.config.clear', function ($app) { + return new ConfigClearCommand($app['files']); + }); + } + + /** + * Register the command. + * + * @return void + */ + protected function registerConsoleMakeCommand() + { + $this->app->singleton('command.console.make', function ($app) { + return new ConsoleMakeCommand($app['files']); + }); + } + + /** + * Register the command. + * + * @return void + */ + protected function registerControllerMakeCommand() + { + $this->app->singleton('command.controller.make', function ($app) { + return new ControllerMakeCommand($app['files']); + }); + } + + /** + * Register the command. + * + * @return void + */ + protected function registerEventGenerateCommand() + { + $this->app->singleton('command.event.generate', function () { + return new EventGenerateCommand; + }); + } + + /** + * Register the command. + * + * @return void + */ + protected function registerEventMakeCommand() + { + $this->app->singleton('command.event.make', function ($app) { + return new EventMakeCommand($app['files']); + }); + } + + /** + * Register the command. + * + * @return void + */ + protected function registerDownCommand() + { + $this->app->singleton('command.down', function () { + return new DownCommand; + }); + } + + /** + * Register the command. + * + * @return void + */ + protected function registerEnvironmentCommand() + { + $this->app->singleton('command.environment', function () { + return new EnvironmentCommand; + }); + } + + /** + * Register the command. + * + * @return void + */ + protected function registerJobMakeCommand() + { + $this->app->singleton('command.job.make', function ($app) { + return new JobMakeCommand($app['files']); + }); + } + + /** + * Register the command. + * + * @return void + */ + protected function registerKeyGenerateCommand() + { + $this->app->singleton('command.key.generate', function () { + return new KeyGenerateCommand; + }); + } + + /** + * Register the command. + * + * @return void + */ + protected function registerListenerMakeCommand() + { + $this->app->singleton('command.listener.make', function ($app) { + return new ListenerMakeCommand($app['files']); + }); + } + + /** + * Register the command. + * + * @return void + */ + protected function registerMailMakeCommand() + { + $this->app->singleton('command.mail.make', function ($app) { + return new MailMakeCommand($app['files']); + }); + } + + /** + * Register the command. + * + * @return void + */ + protected function registerMiddlewareMakeCommand() + { + $this->app->singleton('command.middleware.make', function ($app) { + return new MiddlewareMakeCommand($app['files']); + }); + } + + /** + * Register the command. + * + * @return void + */ + protected function registerMigrateCommand() + { + $this->app->singleton('command.migrate', function ($app) { + return new MigrateCommand($app['migrator']); + }); + } + + /** + * Register the command. + * + * @return void + */ + protected function registerMigrateInstallCommand() + { + $this->app->singleton('command.migrate.install', function ($app) { + return new MigrateInstallCommand($app['migration.repository']); + }); + } + + /** + * Register the command. + * + * @return void + */ + protected function registerMigrateMakeCommand() + { + $this->app->singleton('command.migrate.make', function ($app) { + // Once we have the migration creator registered, we will create the command + // and inject the creator. The creator is responsible for the actual file + // creation of the migrations, and may be extended by these developers. + $creator = $app['migration.creator']; + + $composer = $app['composer']; + + return new MigrateMakeCommand($creator, $composer); + }); + } + + /** + * Register the command. + * + * @return void + */ + protected function registerMigrateRefreshCommand() + { + $this->app->singleton('command.migrate.refresh', function () { + return new MigrateRefreshCommand; + }); + } + + /** + * Register the command. + * + * @return void + */ + protected function registerMigrateResetCommand() + { + $this->app->singleton('command.migrate.reset', function ($app) { + return new MigrateResetCommand($app['migrator']); + }); + } + + /** + * Register the command. + * + * @return void + */ + protected function registerMigrateRollbackCommand() + { + $this->app->singleton('command.migrate.rollback', function ($app) { + return new MigrateRollbackCommand($app['migrator']); + }); + } + + /** + * Register the command. + * + * @return void + */ + protected function registerMigrateStatusCommand() + { + $this->app->singleton('command.migrate.status', function ($app) { + return new MigrateStatusCommand($app['migrator']); + }); + } + + /** + * Register the command. + * + * @return void + */ + protected function registerModelMakeCommand() + { + $this->app->singleton('command.model.make', function ($app) { + return new ModelMakeCommand($app['files']); + }); + } + + /** + * Register the command. + * + * @return void + */ + protected function registerNotificationMakeCommand() + { + $this->app->singleton('command.notification.make', function ($app) { + return new NotificationMakeCommand($app['files']); + }); + } + + /** + * Register the command. + * + * @return void + */ + protected function registerOptimizeCommand() + { + $this->app->singleton('command.optimize', function ($app) { + return new OptimizeCommand($app['composer']); + }); + } + + /** + * Register the command. + * + * @return void + */ + protected function registerProviderMakeCommand() + { + $this->app->singleton('command.provider.make', function ($app) { + return new ProviderMakeCommand($app['files']); + }); + } + + /** + * Register the command. + * + * @return void + */ + protected function registerQueueFailedCommand() + { + $this->app->singleton('command.queue.failed', function () { + return new ListFailedQueueCommand; + }); + } + + /** + * Register the command. + * + * @return void + */ + protected function registerQueueForgetCommand() + { + $this->app->singleton('command.queue.forget', function () { + return new ForgetFailedQueueCommand; + }); + } + + /** + * Register the command. + * + * @return void + */ + protected function registerQueueFlushCommand() + { + $this->app->singleton('command.queue.flush', function () { + return new FlushFailedQueueCommand; + }); + } + + /** + * Register the command. + * + * @return void + */ + protected function registerQueueListenCommand() + { + $this->app->singleton('command.queue.listen', function ($app) { + return new QueueListenCommand($app['queue.listener']); + }); + } + + /** + * Register the command. + * + * @return void + */ + protected function registerQueueRestartCommand() + { + $this->app->singleton('command.queue.restart', function () { + return new QueueRestartCommand; + }); + } + + /** + * Register the command. + * + * @return void + */ + protected function registerQueueRetryCommand() + { + $this->app->singleton('command.queue.retry', function () { + return new QueueRetryCommand; + }); + } + + /** + * Register the command. + * + * @return void + */ + protected function registerQueueWorkCommand() + { + $this->app->singleton('command.queue.work', function ($app) { + return new QueueWorkCommand($app['queue.worker']); + }); + } + + /** + * Register the command. + * + * @return void + */ + protected function registerQueueFailedTableCommand() + { + $this->app->singleton('command.queue.failed-table', function ($app) { + return new FailedTableCommand($app['files'], $app['composer']); + }); + } + + /** + * Register the command. + * + * @return void + */ + protected function registerQueueTableCommand() + { + $this->app->singleton('command.queue.table', function ($app) { + return new TableCommand($app['files'], $app['composer']); + }); + } + + /** + * Register the command. + * + * @return void + */ + protected function registerRequestMakeCommand() + { + $this->app->singleton('command.request.make', function ($app) { + return new RequestMakeCommand($app['files']); + }); + } + + /** + * Register the command. + * + * @return void + */ + protected function registerSeederMakeCommand() + { + $this->app->singleton('command.seeder.make', function ($app) { + return new SeederMakeCommand($app['files'], $app['composer']); + }); + } + + /** + * Register the command. + * + * @return void + */ + protected function registerSessionTableCommand() + { + $this->app->singleton('command.session.table', function ($app) { + return new SessionTableCommand($app['files'], $app['composer']); + }); + } + + /** + * Register the command. + * + * @return void + */ + protected function registerStorageLinkCommand() + { + $this->app->singleton('command.storage.link', function () { + return new StorageLinkCommand; + }); + } + + /** + * Register the command. + * + * @return void + */ + protected function registerRouteCacheCommand() + { + $this->app->singleton('command.route.cache', function ($app) { + return new RouteCacheCommand($app['files']); + }); + } + + /** + * Register the command. + * + * @return void + */ + protected function registerRouteClearCommand() + { + $this->app->singleton('command.route.clear', function ($app) { + return new RouteClearCommand($app['files']); + }); + } + + /** + * Register the command. + * + * @return void + */ + protected function registerRouteListCommand() + { + $this->app->singleton('command.route.list', function ($app) { + return new RouteListCommand($app['router']); + }); + } + + /** + * Register the command. + * + * @return void + */ + protected function registerSeedCommand() + { + $this->app->singleton('command.seed', function ($app) { + return new SeedCommand($app['db']); + }); + } + + /** + * Register the command. + * + * @return void + */ + protected function registerScheduleFinishCommand() + { + $this->app->singleton(ScheduleFinishCommand::class); + } + + /** + * Register the command. + * + * @return void + */ + protected function registerScheduleRunCommand() + { + $this->app->singleton(ScheduleRunCommand::class); + } + + /** + * Register the command. + * + * @return void + */ + protected function registerServeCommand() + { + $this->app->singleton('command.serve', function () { + return new ServeCommand; + }); + } + + /** + * Register the command. + * + * @return void + */ + protected function registerTestMakeCommand() + { + $this->app->singleton('command.test.make', function ($app) { + return new TestMakeCommand($app['files']); + }); + } + + /** + * Register the command. + * + * @return void + */ + protected function registerUpCommand() + { + $this->app->singleton('command.up', function () { + return new UpCommand; + }); + } + + /** + * Register the command. + * + * @return void + */ + protected function registerVendorPublishCommand() + { + $this->app->singleton('command.vendor.publish', function ($app) { + return new VendorPublishCommand($app['files']); + }); + } + + /** + * Register the command. + * + * @return void + */ + protected function registerViewClearCommand() + { + $this->app->singleton('command.view.clear', function ($app) { + return new ViewClearCommand($app['files']); + }); + } + + /** + * Register the command. + * + * @return void + */ + protected function registerPolicyMakeCommand() + { + $this->app->singleton('command.policy.make', function ($app) { + return new PolicyMakeCommand($app['files']); + }); + } + + /** + * Register the command. + * + * @return void + */ + protected function registerNotificationTableCommand() + { + $this->app->singleton('command.notification.table', function ($app) { + return new NotificationTableCommand($app['files'], $app['composer']); + }); + } + + /** + * Get the services provided by the provider. + * + * @return array + */ + public function provides() + { + return array_merge(array_values($this->commands), array_values($this->devCommands)); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Providers/ComposerServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Foundation/Providers/ComposerServiceProvider.php new file mode 100755 index 0000000..295ca96 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Providers/ComposerServiceProvider.php @@ -0,0 +1,38 @@ +app->singleton('composer', function ($app) { + return new Composer($app['files'], $app->basePath()); + }); + } + + /** + * Get the services provided by the provider. + * + * @return array + */ + public function provides() + { + return ['composer']; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Providers/ConsoleSupportServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Foundation/Providers/ConsoleSupportServiceProvider.php new file mode 100644 index 0000000..8e92d28 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Providers/ConsoleSupportServiceProvider.php @@ -0,0 +1,27 @@ +app->afterResolving(ValidatesWhenResolved::class, function ($resolved) { + $resolved->validate(); + }); + + $this->app->resolving(FormRequest::class, function ($request, $app) { + $this->initializeRequest($request, $app['request']); + + $request->setContainer($app)->setRedirector($app->make(Redirector::class)); + }); + } + + /** + * Initialize the form request with data from the given request. + * + * @param \Illuminate\Foundation\Http\FormRequest $form + * @param \Symfony\Component\HttpFoundation\Request $current + * @return void + */ + protected function initializeRequest(FormRequest $form, Request $current) + { + $files = $current->files->all(); + + $files = is_array($files) ? array_filter($files) : $files; + + $form->initialize( + $current->query->all(), $current->request->all(), $current->attributes->all(), + $current->cookies->all(), $files, $current->server->all(), $current->getContent() + ); + + $form->setJson($current->json()); + + if ($session = $current->getSession()) { + $form->setLaravelSession($session); + } + + $form->setUserResolver($current->getUserResolver()); + + $form->setRouteResolver($current->getRouteResolver()); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Providers/FoundationServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Foundation/Providers/FoundationServiceProvider.php new file mode 100644 index 0000000..f1f4837 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Providers/FoundationServiceProvider.php @@ -0,0 +1,17 @@ +policies as $key => $value) { + Gate::policy($key, $value); + } + } + + /** + * {@inheritdoc} + */ + public function register() + { + // + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Support/Providers/EventServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Foundation/Support/Providers/EventServiceProvider.php new file mode 100644 index 0000000..307f2ce --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Support/Providers/EventServiceProvider.php @@ -0,0 +1,59 @@ +listens() as $event => $listeners) { + foreach ($listeners as $listener) { + Event::listen($event, $listener); + } + } + + foreach ($this->subscribe as $subscriber) { + Event::subscribe($subscriber); + } + } + + /** + * {@inheritdoc} + */ + public function register() + { + // + } + + /** + * Get the events and handlers. + * + * @return array + */ + public function listens() + { + return $this->listen; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Support/Providers/RouteServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Foundation/Support/Providers/RouteServiceProvider.php new file mode 100644 index 0000000..8cdd3fa --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Support/Providers/RouteServiceProvider.php @@ -0,0 +1,98 @@ +setRootControllerNamespace(); + + if ($this->app->routesAreCached()) { + $this->loadCachedRoutes(); + } else { + $this->loadRoutes(); + + $this->app->booted(function () { + $this->app['router']->getRoutes()->refreshNameLookups(); + $this->app['router']->getRoutes()->refreshActionLookups(); + }); + } + } + + /** + * Set the root controller namespace for the application. + * + * @return void + */ + protected function setRootControllerNamespace() + { + if (! is_null($this->namespace)) { + $this->app[UrlGenerator::class]->setRootControllerNamespace($this->namespace); + } + } + + /** + * Load the cached routes for the application. + * + * @return void + */ + protected function loadCachedRoutes() + { + $this->app->booted(function () { + require $this->app->getCachedRoutesPath(); + }); + } + + /** + * Load the application routes. + * + * @return void + */ + protected function loadRoutes() + { + if (method_exists($this, 'map')) { + $this->app->call([$this, 'map']); + } + } + + /** + * Register the service provider. + * + * @return void + */ + public function register() + { + // + } + + /** + * Pass dynamic methods onto the router instance. + * + * @param string $method + * @param array $parameters + * @return mixed + */ + public function __call($method, $parameters) + { + return call_user_func_array( + [$this->app->make(Router::class), $method], $parameters + ); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithAuthentication.php b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithAuthentication.php new file mode 100644 index 0000000..ee3d005 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithAuthentication.php @@ -0,0 +1,145 @@ +be($user, $driver); + + return $this; + } + + /** + * Set the currently logged in user for the application. + * + * @param \Illuminate\Contracts\Auth\Authenticatable $user + * @param string|null $driver + * @return void + */ + public function be(UserContract $user, $driver = null) + { + $this->app['auth']->guard($driver)->setUser($user); + + $this->app['auth']->shouldUse($driver); + } + + /** + * Assert that the user is authenticated. + * + * @param string|null $guard + * @return $this + */ + public function seeIsAuthenticated($guard = null) + { + $this->assertTrue($this->isAuthenticated($guard), 'The user is not authenticated'); + + return $this; + } + + /** + * Assert that the user is not authenticated. + * + * @param string|null $guard + * @return $this + */ + public function dontSeeIsAuthenticated($guard = null) + { + $this->assertFalse($this->isAuthenticated($guard), 'The user is authenticated'); + + return $this; + } + + /** + * Return true if the user is authenticated, false otherwise. + * + * @param string|null $guard + * @return bool + */ + protected function isAuthenticated($guard = null) + { + return $this->app->make('auth')->guard($guard)->check(); + } + + /** + * Assert that the user is authenticated as the given user. + * + * @param $user + * @param string|null $guard + * @return $this + */ + public function seeIsAuthenticatedAs($user, $guard = null) + { + $expected = $this->app->make('auth')->guard($guard)->user(); + + $this->assertInstanceOf( + get_class($expected), $user, + 'The currently authenticated user is not who was expected' + ); + + $this->assertSame( + $expected->getAuthIdentifier(), $user->getAuthIdentifier(), + 'The currently authenticated user is not who was expected' + ); + + return $this; + } + + /** + * Assert that the given credentials are valid. + * + * @param array $credentials + * @param string|null $guard + * @return $this + */ + public function seeCredentials(array $credentials, $guard = null) + { + $this->assertTrue( + $this->hasCredentials($credentials, $guard), 'The given credentials are invalid.' + ); + + return $this; + } + + /** + * Assert that the given credentials are invalid. + * + * @param array $credentials + * @param string|null $guard + * @return $this + */ + public function dontSeeCredentials(array $credentials, $guard = null) + { + $this->assertFalse( + $this->hasCredentials($credentials, $guard), 'The given credentials are valid.' + ); + + return $this; + } + + /** + * Return true is the credentials are valid, false otherwise. + * + * @param array $credentials + * @param string|null $guard + * @return bool + */ + protected function hasCredentials(array $credentials, $guard = null) + { + $provider = $this->app->make('auth')->guard($guard)->getProvider(); + + $user = $provider->retrieveByCredentials($credentials); + + return $user && $provider->validateCredentials($user, $credentials); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithConsole.php b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithConsole.php new file mode 100644 index 0000000..ba078b3 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithConsole.php @@ -0,0 +1,20 @@ +app[Kernel::class]->call($command, $parameters); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithContainer.php b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithContainer.php new file mode 100644 index 0000000..5a0ad1e --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithContainer.php @@ -0,0 +1,32 @@ +instance($abstract, $instance); + } + + /** + * Register an instance of an object in the container. + * + * @param string $abstract + * @param object $instance + * @return object + */ + protected function instance($abstract, $instance) + { + $this->app->instance($abstract, $instance); + + return $instance; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithDatabase.php b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithDatabase.php new file mode 100644 index 0000000..a2e60e7 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithDatabase.php @@ -0,0 +1,91 @@ +assertThat( + $table, new HasInDatabase($this->getConnection($connection), $data) + ); + + return $this; + } + + /** + * Assert that a given where condition does not exist in the database. + * + * @param string $table + * @param array $data + * @param string $connection + * @return $this + */ + protected function assertDatabaseMissing($table, array $data, $connection = null) + { + $constraint = new ReverseConstraint( + new HasInDatabase($this->getConnection($connection), $data) + ); + + $this->assertThat($table, $constraint); + + return $this; + } + + /** + * Assert the given record has been deleted. + * + * @param string $table + * @param array $data + * @param string $connection + * @return $this + */ + protected function assertSoftDeleted($table, array $data, $connection = null) + { + $this->assertThat( + $table, new SoftDeletedInDatabase($this->getConnection($connection), $data) + ); + + return $this; + } + + /** + * Get the database connection. + * + * @param string|null $connection + * @return \Illuminate\Database\Connection + */ + protected function getConnection($connection = null) + { + $database = $this->app->make('db'); + + $connection = $connection ?: $database->getDefaultConnection(); + + return $database->connection($connection); + } + + /** + * Seed a given database connection. + * + * @param string $class + * @return $this + */ + public function seed($class = 'DatabaseSeeder') + { + $this->artisan('db:seed', ['--class' => $class]); + + return $this; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithSession.php b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithSession.php new file mode 100644 index 0000000..9d72e7c --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithSession.php @@ -0,0 +1,64 @@ +session($data); + + return $this; + } + + /** + * Set the session to the given array. + * + * @param array $data + * @return $this + */ + public function session(array $data) + { + $this->startSession(); + + foreach ($data as $key => $value) { + $this->app['session']->put($key, $value); + } + + return $this; + } + + /** + * Start the session for the application. + * + * @return $this + */ + protected function startSession() + { + if (! $this->app['session']->isStarted()) { + $this->app['session']->start(); + } + + return $this; + } + + /** + * Flush all of the current session data. + * + * @return $this + */ + public function flushSession() + { + $this->startSession(); + + $this->app['session']->flush(); + + return $this; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/MakesHttpRequests.php b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/MakesHttpRequests.php new file mode 100644 index 0000000..9cf6e22 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/MakesHttpRequests.php @@ -0,0 +1,326 @@ +serverVariables = $server; + + return $this; + } + + /** + * Disable middleware for the test. + * + * @return $this + */ + public function withoutMiddleware() + { + $this->app->instance('middleware.disable', true); + + return $this; + } + + /** + * Visit the given URI with a GET request. + * + * @param string $uri + * @param array $headers + * @return \Illuminate\Foundation\Testing\TestResponse + */ + public function get($uri, array $headers = []) + { + $server = $this->transformHeadersToServerVars($headers); + + return $this->call('GET', $uri, [], [], [], $server); + } + + /** + * Visit the given URI with a GET request, expecting a JSON response. + * + * @param string $uri + * @param array $headers + * @return \Illuminate\Foundation\Testing\TestResponse + */ + public function getJson($uri, array $headers = []) + { + return $this->json('GET', $uri, [], $headers); + } + + /** + * Visit the given URI with a POST request. + * + * @param string $uri + * @param array $data + * @param array $headers + * @return \Illuminate\Foundation\Testing\TestResponse + */ + public function post($uri, array $data = [], array $headers = []) + { + $server = $this->transformHeadersToServerVars($headers); + + return $this->call('POST', $uri, $data, [], [], $server); + } + + /** + * Visit the given URI with a POST request, expecting a JSON response. + * + * @param string $uri + * @param array $data + * @param array $headers + * @return \Illuminate\Foundation\Testing\TestResponse + */ + public function postJson($uri, array $data = [], array $headers = []) + { + return $this->json('POST', $uri, $data, $headers); + } + + /** + * Visit the given URI with a PUT request. + * + * @param string $uri + * @param array $data + * @param array $headers + * @return \Illuminate\Foundation\Testing\TestResponse + */ + public function put($uri, array $data = [], array $headers = []) + { + $server = $this->transformHeadersToServerVars($headers); + + return $this->call('PUT', $uri, $data, [], [], $server); + } + + /** + * Visit the given URI with a PUT request, expecting a JSON response. + * + * @param string $uri + * @param array $data + * @param array $headers + * @return \Illuminate\Foundation\Testing\TestResponse + */ + public function putJson($uri, array $data = [], array $headers = []) + { + return $this->json('PUT', $uri, $data, $headers); + } + + /** + * Visit the given URI with a PATCH request. + * + * @param string $uri + * @param array $data + * @param array $headers + * @return \Illuminate\Foundation\Testing\TestResponse + */ + public function patch($uri, array $data = [], array $headers = []) + { + $server = $this->transformHeadersToServerVars($headers); + + return $this->call('PATCH', $uri, $data, [], [], $server); + } + + /** + * Visit the given URI with a PATCH request, expecting a JSON response. + * + * @param string $uri + * @param array $data + * @param array $headers + * @return \Illuminate\Foundation\Testing\TestResponse + */ + public function patchJson($uri, array $data = [], array $headers = []) + { + return $this->json('PATCH', $uri, $data, $headers); + } + + /** + * Visit the given URI with a DELETE request. + * + * @param string $uri + * @param array $data + * @param array $headers + * @return \Illuminate\Foundation\Testing\TestResponse + */ + public function delete($uri, array $data = [], array $headers = []) + { + $server = $this->transformHeadersToServerVars($headers); + + return $this->call('DELETE', $uri, $data, [], [], $server); + } + + /** + * Visit the given URI with a DELETE request, expecting a JSON response. + * + * @param string $uri + * @param array $data + * @param array $headers + * @return \Illuminate\Foundation\Testing\TestResponse + */ + public function deleteJson($uri, array $data = [], array $headers = []) + { + return $this->json('DELETE', $uri, $data, $headers); + } + + /** + * Call the given URI with a JSON request. + * + * @param string $method + * @param string $uri + * @param array $data + * @param array $headers + * @return \Illuminate\Foundation\Testing\TestResponse + */ + public function json($method, $uri, array $data = [], array $headers = []) + { + $files = $this->extractFilesFromDataArray($data); + + $content = json_encode($data); + + $headers = array_merge([ + 'CONTENT_LENGTH' => mb_strlen($content, '8bit'), + 'CONTENT_TYPE' => 'application/json', + 'Accept' => 'application/json', + ], $headers); + + return $this->call( + $method, $uri, [], [], $files, $this->transformHeadersToServerVars($headers), $content + ); + } + + /** + * Call the given URI and return the Response. + * + * @param string $method + * @param string $uri + * @param array $parameters + * @param array $cookies + * @param array $files + * @param array $server + * @param string $content + * @return \Illuminate\Foundation\Testing\TestResponse + */ + public function call($method, $uri, $parameters = [], $cookies = [], $files = [], $server = [], $content = null) + { + $kernel = $this->app->make(HttpKernel::class); + + $files = array_merge($files, $this->extractFilesFromDataArray($parameters)); + + $symfonyRequest = SymfonyRequest::create( + $this->prepareUrlForRequest($uri), $method, $parameters, + $cookies, $files, array_replace($this->serverVariables, $server), $content + ); + + $response = $kernel->handle( + $request = Request::createFromBase($symfonyRequest) + ); + + $kernel->terminate($request, $response); + + return $this->createTestResponse($response); + } + + /** + * Turn the given URI into a fully qualified URL. + * + * @param string $uri + * @return string + */ + protected function prepareUrlForRequest($uri) + { + if (Str::startsWith($uri, '/')) { + $uri = substr($uri, 1); + } + + if (! Str::startsWith($uri, 'http')) { + $uri = config('app.url').'/'.$uri; + } + + return trim($uri, '/'); + } + + /** + * Transform headers array to array of $_SERVER vars with HTTP_* format. + * + * @param array $headers + * @return array + */ + protected function transformHeadersToServerVars(array $headers) + { + return collect($headers)->mapWithKeys(function ($value, $name) { + $name = strtr(strtoupper($name), '-', '_'); + + return [$this->formatServerHeaderKey($name) => $value]; + })->all(); + } + + /** + * Format the header name for the server array. + * + * @param string $name + * @return string + */ + protected function formatServerHeaderKey($name) + { + if (! Str::startsWith($name, 'HTTP_') && $name != 'CONTENT_TYPE') { + return 'HTTP_'.$name; + } + + return $name; + } + + /** + * Extract the file uploads from the given data array. + * + * @param array $data + * @return array + */ + protected function extractFilesFromDataArray(&$data) + { + $files = []; + + foreach ($data as $key => $value) { + if ($value instanceof SymfonyUploadedFile) { + $files[$key] = $value; + + unset($data[$key]); + } + + if (is_array($value)) { + $files[$key] = $this->extractFilesFromDataArray($value); + } + } + + return $files; + } + + /** + * Create the test response instance from the given response. + * + * @param \Illuminate\Http\Response $response + * @return \Illuminate\Foundation\Testing\TestResponse + */ + protected function createTestResponse($response) + { + return TestResponse::fromBaseResponse($response); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/MocksApplicationServices.php b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/MocksApplicationServices.php new file mode 100644 index 0000000..04bb2ae --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/MocksApplicationServices.php @@ -0,0 +1,283 @@ +withoutEvents(); + + $this->beforeApplicationDestroyed(function () use ($events) { + $fired = $this->getFiredEvents($events); + + $this->assertEmpty( + $eventsNotFired = array_diff($events, $fired), + 'These expected events were not fired: ['.implode(', ', $eventsNotFired).']' + ); + }); + + return $this; + } + + /** + * Specify a list of events that should not be fired for the given operation. + * + * These events will be mocked, so that handlers will not actually be executed. + * + * @param array|string $events + * @return $this + */ + public function doesntExpectEvents($events) + { + $events = is_array($events) ? $events : func_get_args(); + + $this->withoutEvents(); + + $this->beforeApplicationDestroyed(function () use ($events) { + $this->assertEmpty( + $fired = $this->getFiredEvents($events), + 'These unexpected events were fired: ['.implode(', ', $fired).']' + ); + }); + + return $this; + } + + /** + * Mock the event dispatcher so all events are silenced and collected. + * + * @return $this + */ + protected function withoutEvents() + { + $mock = Mockery::mock(EventsDispatcherContract::class); + + $mock->shouldReceive('fire', 'dispatch')->andReturnUsing(function ($called) { + $this->firedEvents[] = $called; + }); + + $this->app->instance('events', $mock); + + return $this; + } + + /** + * Filter the given events against the fired events. + * + * @param array $events + * @return array + */ + protected function getFiredEvents(array $events) + { + return $this->getDispatched($events, $this->firedEvents); + } + + /** + * Specify a list of jobs that should be dispatched for the given operation. + * + * These jobs will be mocked, so that handlers will not actually be executed. + * + * @param array|string $jobs + * @return $this + */ + protected function expectsJobs($jobs) + { + $jobs = is_array($jobs) ? $jobs : func_get_args(); + + $this->withoutJobs(); + + $this->beforeApplicationDestroyed(function () use ($jobs) { + $dispatched = $this->getDispatchedJobs($jobs); + + $this->assertEmpty( + $jobsNotDispatched = array_diff($jobs, $dispatched), + 'These expected jobs were not dispatched: ['.implode(', ', $jobsNotDispatched).']' + ); + }); + + return $this; + } + + /** + * Specify a list of jobs that should not be dispatched for the given operation. + * + * These jobs will be mocked, so that handlers will not actually be executed. + * + * @param array|string $jobs + * @return $this + */ + protected function doesntExpectJobs($jobs) + { + $jobs = is_array($jobs) ? $jobs : func_get_args(); + + $this->withoutJobs(); + + $this->beforeApplicationDestroyed(function () use ($jobs) { + $this->assertEmpty( + $dispatched = $this->getDispatchedJobs($jobs), + 'These unexpected jobs were dispatched: ['.implode(', ', $dispatched).']' + ); + }); + + return $this; + } + + /** + * Mock the job dispatcher so all jobs are silenced and collected. + * + * @return $this + */ + protected function withoutJobs() + { + $mock = Mockery::mock(BusDispatcherContract::class); + + $mock->shouldReceive('dispatch', 'dispatchNow')->andReturnUsing(function ($dispatched) { + $this->dispatchedJobs[] = $dispatched; + }); + + $this->app->instance( + BusDispatcherContract::class, $mock + ); + + return $this; + } + + /** + * Filter the given jobs against the dispatched jobs. + * + * @param array $jobs + * @return array + */ + protected function getDispatchedJobs(array $jobs) + { + return $this->getDispatched($jobs, $this->dispatchedJobs); + } + + /** + * Filter the given classes against an array of dispatched classes. + * + * @param array $classes + * @param array $dispatched + * @return array + */ + protected function getDispatched(array $classes, array $dispatched) + { + return array_filter($classes, function ($class) use ($dispatched) { + return $this->wasDispatched($class, $dispatched); + }); + } + + /** + * Check if the given class exists in an array of dispatched classes. + * + * @param string $needle + * @param array $haystack + * @return bool + */ + protected function wasDispatched($needle, array $haystack) + { + foreach ($haystack as $dispatched) { + if ((is_string($dispatched) && ($dispatched === $needle || is_subclass_of($dispatched, $needle))) || + $dispatched instanceof $needle) { + return true; + } + } + + return false; + } + + /** + * Mock the notification dispatcher so all notifications are silenced. + * + * @return $this + */ + protected function withoutNotifications() + { + $mock = Mockery::mock(NotificationDispatcher::class); + + $mock->shouldReceive('send')->andReturnUsing(function ($notifiable, $instance, $channels = []) { + $this->dispatchedNotifications[] = compact( + 'notifiable', 'instance', 'channels' + ); + }); + + $this->app->instance(NotificationDispatcher::class, $mock); + + return $this; + } + + /** + * Specify a notification that is expected to be dispatched. + * + * @param mixed $notifiable + * @param string $notification + * @return $this + */ + protected function expectsNotification($notifiable, $notification) + { + $this->withoutNotifications(); + + $this->beforeApplicationDestroyed(function () use ($notifiable, $notification) { + foreach ($this->dispatchedNotifications as $dispatched) { + $notified = $dispatched['notifiable']; + + if (($notified === $notifiable || + $notified->getKey() == $notifiable->getKey()) && + get_class($dispatched['instance']) === $notification + ) { + return $this; + } + } + + $this->fail('The following expected notification were not dispatched: ['.$notification.']'); + }); + + return $this; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Constraints/HasInDatabase.php b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Constraints/HasInDatabase.php new file mode 100644 index 0000000..b3265b4 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Constraints/HasInDatabase.php @@ -0,0 +1,103 @@ +data = $data; + + $this->database = $database; + } + + /** + * Check if the data is found in the given table. + * + * @param string $table + * @return bool + */ + public function matches($table) + { + return $this->database->table($table)->where($this->data)->count() > 0; + } + + /** + * Get the description of the failure. + * + * @param string $table + * @return string + */ + public function failureDescription($table) + { + return sprintf( + "a row in the table [%s] matches the attributes %s.\n\n%s", + $table, $this->toString(JSON_PRETTY_PRINT), $this->getAdditionalInfo($table) + ); + } + + /** + * Get additional info about the records found in the database table. + * + * @param string $table + * @return string + */ + protected function getAdditionalInfo($table) + { + $results = $this->database->table($table)->get(); + + if ($results->isEmpty()) { + return 'The table is empty'; + } + + $description = 'Found: '.json_encode($results->take($this->show), JSON_PRETTY_PRINT); + + if ($results->count() > $this->show) { + $description .= sprintf(' and %s others', $results->count() - $this->show); + } + + return $description; + } + + /** + * Get a string representation of the object. + * + * @param int $options + * @return string + */ + public function toString($options = 0) + { + return json_encode($this->data, $options); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Constraints/SoftDeletedInDatabase.php b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Constraints/SoftDeletedInDatabase.php new file mode 100644 index 0000000..8d74d4f --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Constraints/SoftDeletedInDatabase.php @@ -0,0 +1,103 @@ +data = $data; + + $this->database = $database; + } + + /** + * Check if the data is found in the given table. + * + * @param string $table + * @return bool + */ + public function matches($table) + { + return $this->database->table($table) + ->where($this->data)->whereNotNull('deleted_at')->count() > 0; + } + + /** + * Get the description of the failure. + * + * @param string $table + * @return string + */ + public function failureDescription($table) + { + return sprintf( + "any soft deleted row in the table [%s] matches the attributes %s.\n\n%s", + $table, $this->toString(), $this->getAdditionalInfo($table) + ); + } + + /** + * Get additional info about the records found in the database table. + * + * @param string $table + * @return string + */ + protected function getAdditionalInfo($table) + { + $results = $this->database->table($table)->get(); + + if ($results->isEmpty()) { + return 'The table is empty'; + } + + $description = 'Found: '.json_encode($results->take($this->show), JSON_PRETTY_PRINT); + + if ($results->count() > $this->show) { + $description .= sprintf(' and %s others', $results->count() - $this->show); + } + + return $description; + } + + /** + * Get a string representation of the object. + * + * @return string + */ + public function toString() + { + return json_encode($this->data); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/DatabaseMigrations.php b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/DatabaseMigrations.php new file mode 100644 index 0000000..a6e527f --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/DatabaseMigrations.php @@ -0,0 +1,24 @@ +artisan('migrate'); + + $this->app[Kernel::class]->setArtisan(null); + + $this->beforeApplicationDestroyed(function () { + $this->artisan('migrate:rollback'); + }); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/DatabaseTransactions.php b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/DatabaseTransactions.php new file mode 100644 index 0000000..becee74 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/DatabaseTransactions.php @@ -0,0 +1,37 @@ +app->make('db'); + + 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/vendor/laravel/framework/src/Illuminate/Foundation/Testing/HttpException.php b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/HttpException.php new file mode 100644 index 0000000..67d2b2f --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/HttpException.php @@ -0,0 +1,10 @@ +app) { + $this->refreshApplication(); + } + + $this->setUpTraits(); + + foreach ($this->afterApplicationCreatedCallbacks as $callback) { + call_user_func($callback); + } + + Facade::clearResolvedInstances(); + + Model::setEventDispatcher($this->app['events']); + + $this->setUpHasRun = true; + } + + /** + * Refresh the application instance. + * + * @return void + */ + protected function refreshApplication() + { + $this->app = $this->createApplication(); + } + + /** + * Boot the testing helper traits. + * + * @return void + */ + protected function setUpTraits() + { + $uses = array_flip(class_uses_recursive(static::class)); + + if (isset($uses[DatabaseMigrations::class])) { + $this->runDatabaseMigrations(); + } + + if (isset($uses[DatabaseTransactions::class])) { + $this->beginDatabaseTransaction(); + } + + if (isset($uses[WithoutMiddleware::class])) { + $this->disableMiddlewareForAllTests(); + } + + if (isset($uses[WithoutEvents::class])) { + $this->disableEventsForAllTests(); + } + } + + /** + * Clean up the testing environment before the next test. + * + * @return void + */ + protected function tearDown() + { + if ($this->app) { + foreach ($this->beforeApplicationDestroyedCallbacks as $callback) { + call_user_func($callback); + } + + $this->app->flush(); + + $this->app = null; + } + + $this->setUpHasRun = false; + + if (property_exists($this, 'serverVariables')) { + $this->serverVariables = []; + } + + if (class_exists('Mockery')) { + Mockery::close(); + } + + $this->afterApplicationCreatedCallbacks = []; + $this->beforeApplicationDestroyedCallbacks = []; + + Artisan::forgetBootstrappers(); + } + + /** + * Register a callback to be run after the application is created. + * + * @param callable $callback + * @return void + */ + public function afterApplicationCreated(callable $callback) + { + $this->afterApplicationCreatedCallbacks[] = $callback; + + if ($this->setUpHasRun) { + call_user_func($callback); + } + } + + /** + * Register a callback to be run before the application is destroyed. + * + * @param callable $callback + * @return void + */ + protected function beforeApplicationDestroyed(callable $callback) + { + $this->beforeApplicationDestroyedCallbacks[] = $callback; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestResponse.php b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestResponse.php new file mode 100644 index 0000000..d78bc80 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestResponse.php @@ -0,0 +1,640 @@ +baseResponse = $response; + } + + /** + * Create a new TestResponse from another response. + * + * @param \Illuminate\Http\Response $response + * @return static + */ + public static function fromBaseResponse($response) + { + return new static($response); + } + + /** + * Assert that the response has a successful status code. + * + * @return $this + */ + public function assertSuccessful() + { + PHPUnit::assertTrue( + $this->isSuccessful(), + 'Response status code ['.$this->getStatusCode().'] is not a successful status code.' + ); + + return $this; + } + + /** + * Assert that the response has the given status code. + * + * @param int $status + * @return $this + */ + public function assertStatus($status) + { + $actual = $this->getStatusCode(); + + PHPUnit::assertTrue( + $actual === $status, + "Expected status code {$status} but received {$actual}." + ); + + return $this; + } + + /** + * Assert whether the response is redirecting to a given URI. + * + * @param string $uri + * @return $this + */ + public function assertRedirect($uri = null) + { + PHPUnit::assertTrue( + $this->isRedirect(), 'Response status code ['.$this->getStatusCode().'] is not a redirect status code.' + ); + + if (! is_null($uri)) { + PHPUnit::assertEquals(app('url')->to($uri), $this->headers->get('Location')); + } + + return $this; + } + + /** + * Asserts that the response contains the given header and equals the optional value. + * + * @param string $headerName + * @param mixed $value + * @return $this + */ + public function assertHeader($headerName, $value = null) + { + PHPUnit::assertTrue( + $this->headers->has($headerName), "Header [{$headerName}] not present on response." + ); + + $actual = $this->headers->get($headerName); + + if (! is_null($value)) { + PHPUnit::assertEquals( + $this->headers->get($headerName), $value, + "Header [{$headerName}] was found, but value [{$actual}] does not match [{$value}]." + ); + } + + return $this; + } + + /** + * Asserts that the response contains the given cookie and equals the optional value. + * + * @param string $cookieName + * @param mixed $value + * @return $this + */ + public function assertPlainCookie($cookieName, $value = null) + { + $this->assertCookie($cookieName, $value, false); + + return $this; + } + + /** + * Asserts that the response contains the given cookie and equals the optional value. + * + * @param string $cookieName + * @param mixed $value + * @param bool $encrypted + * @return $this + */ + public function assertCookie($cookieName, $value = null, $encrypted = true) + { + PHPUnit::assertNotNull( + $cookie = $this->getCookie($cookieName), + "Cookie [{$cookieName}] not present on response." + ); + + if (! $cookie || is_null($value)) { + return $this; + } + + $cookieValue = $cookie->getValue(); + + $actual = $encrypted + ? app('encrypter')->decrypt($cookieValue) : $cookieValue; + + PHPUnit::assertEquals( + $actual, $value, + "Cookie [{$cookieName}] was found, but value [{$actual}] does not match [{$value}]." + ); + + return $this; + } + + /** + * Get the given cookie from the response. + * + * @param string $cookieName + * @return \Symfony\Component\HttpFoundation\Cookie|null + */ + protected function getCookie($cookieName) + { + foreach ($this->headers->getCookies() as $cookie) { + if ($cookie->getName() === $cookieName) { + return $cookie; + } + } + } + + /** + * Assert that the given string is contained within the response. + * + * @param string $value + * @return $this + */ + public function assertSee($value) + { + PHPUnit::assertContains($value, $this->getContent()); + + return $this; + } + + /** + * Assert that the given string is contained within the response text. + * + * @param string $value + * @return $this + */ + public function assertSeeText($value) + { + PHPUnit::assertContains($value, strip_tags($this->getContent())); + + return $this; + } + + /** + * Assert that the given string is not contained within the response. + * + * @param string $value + * @return $this + */ + public function assertDontSee($value) + { + PHPUnit::assertNotContains($value, $this->getContent()); + + return $this; + } + + /** + * Assert that the given string is not contained within the response text. + * + * @param string $value + * @return $this + */ + public function assertDontSeeText($value) + { + PHPUnit::assertNotContains($value, strip_tags($this->getContent())); + + return $this; + } + + /** + * Assert that the response is a superset of the given JSON. + * + * @param array $data + * @return $this + */ + public function assertJson(array $data) + { + PHPUnit::assertArraySubset( + $data, $this->decodeResponseJson(), false, $this->assertJsonMessage($data) + ); + + return $this; + } + + /** + * Get the assertion message for assertJson. + * + * @param array $data + * @return string + */ + protected function assertJsonMessage(array $data) + { + $expected = json_encode($data, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES); + + $actual = json_encode($this->decodeResponseJson(), JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES); + + return 'Unable to find JSON: '.PHP_EOL.PHP_EOL. + "[{$expected}]".PHP_EOL.PHP_EOL. + 'within response JSON:'.PHP_EOL.PHP_EOL. + "[{$actual}].".PHP_EOL.PHP_EOL; + } + + /** + * Assert that the response has the exact given JSON. + * + * @param array $data + * @return $this + */ + public function assertExactJson(array $data) + { + $actual = json_encode(Arr::sortRecursive( + (array) $this->decodeResponseJson() + )); + + PHPUnit::assertEquals(json_encode(Arr::sortRecursive($data)), $actual); + + return $this; + } + + /** + * Assert that the response contains the given JSON fragment. + * + * @param array $data + * @return $this + */ + public function assertJsonFragment(array $data) + { + $actual = json_encode(Arr::sortRecursive( + (array) $this->decodeResponseJson() + )); + + foreach (Arr::sortRecursive($data) as $key => $value) { + $expected = substr(json_encode([$key => $value]), 1, -1); + + PHPUnit::assertTrue( + Str::contains($actual, $expected), + 'Unable to find JSON fragment: '.PHP_EOL.PHP_EOL. + "[{$expected}]".PHP_EOL.PHP_EOL. + 'within'.PHP_EOL.PHP_EOL. + "[{$actual}]." + ); + } + + return $this; + } + + /** + * Assert that the response does not contain the given JSON fragment. + * + * @param array $data + * @return $this + */ + public function assertJsonMissing(array $data) + { + $actual = json_encode(Arr::sortRecursive( + (array) $this->decodeResponseJson() + )); + + foreach (Arr::sortRecursive($data) as $key => $value) { + $expected = substr(json_encode([$key => $value]), 1, -1); + + PHPUnit::assertFalse( + Str::contains($actual, $expected), + 'Found unexpected JSON fragment: '.PHP_EOL.PHP_EOL. + "[{$expected}]".PHP_EOL.PHP_EOL. + 'within'.PHP_EOL.PHP_EOL. + "[{$actual}]." + ); + } + + return $this; + } + + /** + * Assert that the response has a given JSON structure. + * + * @param array|null $structure + * @param array|null $responseData + * @return $this + */ + public function assertJsonStructure(array $structure = null, $responseData = null) + { + if (is_null($structure)) { + return $this->assertJson(); + } + + if (is_null($responseData)) { + $responseData = $this->decodeResponseJson(); + } + + foreach ($structure as $key => $value) { + if (is_array($value) && $key === '*') { + PHPUnit::assertInternalType('array', $responseData); + + foreach ($responseData as $responseDataItem) { + $this->assertJsonStructure($structure['*'], $responseDataItem); + } + } elseif (is_array($value)) { + PHPUnit::assertArrayHasKey($key, $responseData); + + $this->assertJsonStructure($structure[$key], $responseData[$key]); + } else { + PHPUnit::assertArrayHasKey($value, $responseData); + } + } + + return $this; + } + + /** + * Validate and return the decoded response JSON. + * + * @return array + */ + public function decodeResponseJson() + { + $decodedResponse = json_decode($this->getContent(), true); + + if (is_null($decodedResponse) || $decodedResponse === false) { + if ($this->exception) { + throw $this->exception; + } else { + PHPUnit::fail('Invalid JSON was returned from the route.'); + } + } + + return $decodedResponse; + } + + /** + * Validate and return the decoded response JSON. + * + * @return array + */ + public function json() + { + return $this->decodeResponseJson(); + } + + /** + * Assert that the response view has a given piece of bound data. + * + * @param string|array $key + * @param mixed $value + * @return $this + */ + public function assertViewHas($key, $value = null) + { + if (is_array($key)) { + return $this->assertViewHasAll($key); + } + + $this->ensureResponseHasView(); + + if (is_null($value)) { + PHPUnit::assertArrayHasKey($key, $this->original->getData()); + } elseif ($value instanceof Closure) { + PHPUnit::assertTrue($value($this->original->$key)); + } else { + PHPUnit::assertEquals($value, $this->original->$key); + } + + return $this; + } + + /** + * Assert that the response view has a given list of bound data. + * + * @param array $bindings + * @return $this + */ + public function assertViewHasAll(array $bindings) + { + foreach ($bindings as $key => $value) { + if (is_int($key)) { + $this->assertViewHas($value); + } else { + $this->assertViewHas($key, $value); + } + } + + return $this; + } + + /** + * Assert that the response view is missing a piece of bound data. + * + * @param string $key + * @return $this + */ + public function assertViewMissing($key) + { + $this->ensureResponseHasView(); + + PHPUnit::assertArrayNotHasKey($key, $this->original->getData()); + + return $this; + } + + /** + * Ensure that the response has a view as its original content. + * + * @return $this + */ + protected function ensureResponseHasView() + { + if (! isset($this->original) || ! $this->original instanceof View) { + return PHPUnit::fail('The response is not a view.'); + } + + return $this; + } + + /** + * Assert that the session has a given value. + * + * @param string|array $key + * @param mixed $value + * @return $this + */ + public function assertSessionHas($key, $value = null) + { + if (is_array($key)) { + return $this->assertSessionHasAll($key); + } + + if (is_null($value)) { + PHPUnit::assertTrue( + $this->session()->has($key), + "Session is missing expected key [{$key}]." + ); + } else { + PHPUnit::assertEquals($value, app('session.store')->get($key)); + } + + return $this; + } + + /** + * Assert that the session has a given list of values. + * + * @param array $bindings + * @return $this + */ + public function assertSessionHasAll(array $bindings) + { + foreach ($bindings as $key => $value) { + if (is_int($key)) { + $this->assertSessionHas($value); + } else { + $this->assertSessionHas($key, $value); + } + } + + return $this; + } + + /** + * Assert that the session has the given errors. + * + * @param string|array $keys + * @param mixed $format + * @return $this + */ + public function assertSessionHasErrors($keys = [], $format = null) + { + $this->assertSessionHas('errors'); + + $keys = (array) $keys; + + $errors = app('session.store')->get('errors'); + + foreach ($keys as $key => $value) { + if (is_int($key)) { + PHPUnit::assertTrue($errors->has($value), "Session missing error: $value"); + } else { + PHPUnit::assertContains($value, $errors->get($key, $format)); + } + } + + return $this; + } + + /** + * Assert that the session does not have a given key. + * + * @param string|array $key + * @return $this + */ + public function assertSessionMissing($key) + { + if (is_array($key)) { + foreach ($key as $value) { + $this->assertSessionMissing($value); + } + } else { + PHPUnit::assertFalse( + $this->session()->has($key), + "Session has unexpected key [{$key}]." + ); + } + + return $this; + } + + /** + * Get the current session store. + * + * @return \Illuminate\Session\Store + */ + protected function session() + { + return app('session.store'); + } + + /** + * Dump the content from the response. + * + * @return void + */ + public function dump() + { + $content = $this->getContent(); + + $json = json_decode($content); + + if (json_last_error() === JSON_ERROR_NONE) { + $content = $json; + } + + dd($content); + } + + /** + * Dynamically access base response parameters. + * + * @param string $key + * @return mixed + */ + public function __get($key) + { + return $this->baseResponse->{$key}; + } + + /** + * Proxy isset() checks to the underlying base response. + * + * @param string $key + * @return mixed + */ + public function __isset($key) + { + return isset($this->baseResponse->{$key}); + } + + /** + * Handle dynamic calls into macros or pass missing methods to the base response. + * + * @param string $method + * @param array $parameters + * @return mixed + */ + public function __call($method, $args) + { + if (static::hasMacro($method)) { + return $this->macroCall($method, $args); + } + + return $this->baseResponse->{$method}(...$args); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/WithoutEvents.php b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/WithoutEvents.php new file mode 100644 index 0000000..7837a74 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/WithoutEvents.php @@ -0,0 +1,22 @@ +withoutEvents(); + } else { + throw new Exception('Unable to disable middleware. ApplicationTrait not used.'); + } + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/WithoutMiddleware.php b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/WithoutMiddleware.php new file mode 100644 index 0000000..269b532 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/WithoutMiddleware.php @@ -0,0 +1,22 @@ +withoutMiddleware(); + } else { + throw new Exception('Unable to disable middleware. MakesHttpRequests trait not used.'); + } + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Validation/ValidatesRequests.php b/vendor/laravel/framework/src/Illuminate/Foundation/Validation/ValidatesRequests.php new file mode 100644 index 0000000..c1873b4 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Validation/ValidatesRequests.php @@ -0,0 +1,168 @@ +getValidationFactory()->make($request->all(), $validator); + } + + if ($validator->fails()) { + $this->throwValidationException($request, $validator); + } + } + + /** + * Validate the given request with the given rules. + * + * @param \Illuminate\Http\Request $request + * @param array $rules + * @param array $messages + * @param array $customAttributes + * @return void + */ + public function validate(Request $request, array $rules, array $messages = [], array $customAttributes = []) + { + $validator = $this->getValidationFactory()->make($request->all(), $rules, $messages, $customAttributes); + + if ($validator->fails()) { + $this->throwValidationException($request, $validator); + } + } + + /** + * Validate the given request with the given rules. + * + * @param string $errorBag + * @param \Illuminate\Http\Request $request + * @param array $rules + * @param array $messages + * @param array $customAttributes + * @return void + * + * @throws \Illuminate\Validation\ValidationException + */ + public function validateWithBag($errorBag, Request $request, array $rules, array $messages = [], array $customAttributes = []) + { + $this->withErrorBag($errorBag, function () use ($request, $rules, $messages, $customAttributes) { + $this->validate($request, $rules, $messages, $customAttributes); + }); + } + + /** + * Execute a Closure within with a given error bag set as the default bag. + * + * @param string $errorBag + * @param callable $callback + * @return void + */ + protected function withErrorBag($errorBag, callable $callback) + { + $this->validatesRequestErrorBag = $errorBag; + + call_user_func($callback); + + $this->validatesRequestErrorBag = null; + } + + /** + * Throw the failed validation exception. + * + * @param \Illuminate\Http\Request $request + * @param \Illuminate\Contracts\Validation\Validator $validator + * @return void + * + * @throws \Illuminate\Validation\ValidationException + */ + protected function throwValidationException(Request $request, $validator) + { + throw new ValidationException($validator, $this->buildFailedValidationResponse( + $request, $this->formatValidationErrors($validator) + )); + } + + /** + * Create the response for when a request fails validation. + * + * @param \Illuminate\Http\Request $request + * @param array $errors + * @return \Symfony\Component\HttpFoundation\Response + */ + protected function buildFailedValidationResponse(Request $request, array $errors) + { + if ($request->expectsJson()) { + return new JsonResponse($errors, 422); + } + + return redirect()->to($this->getRedirectUrl()) + ->withInput($request->input()) + ->withErrors($errors, $this->errorBag()); + } + + /** + * Format the validation errors to be returned. + * + * @param \Illuminate\Contracts\Validation\Validator $validator + * @return array + */ + protected function formatValidationErrors(Validator $validator) + { + return $validator->errors()->getMessages(); + } + + /** + * Get the key to be used for the view error bag. + * + * @return string + */ + protected function errorBag() + { + return $this->validatesRequestErrorBag ?: 'default'; + } + + /** + * Get the URL we should redirect to. + * + * @return string + */ + protected function getRedirectUrl() + { + return app(UrlGenerator::class)->previous(); + } + + /** + * Get a validation factory instance. + * + * @return \Illuminate\Contracts\Validation\Factory + */ + protected function getValidationFactory() + { + return app(Factory::class); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php b/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php new file mode 100644 index 0000000..6b6ebf5 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php @@ -0,0 +1,919 @@ +abort($code, $message, $headers); + } +} + +if (! function_exists('abort_if')) { + /** + * Throw an HttpException with the given data if the given condition is true. + * + * @param bool $boolean + * @param int $code + * @param string $message + * @param array $headers + * @return void + * + * @throws \Symfony\Component\HttpKernel\Exception\HttpException + * @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException + */ + function abort_if($boolean, $code, $message = '', array $headers = []) + { + if ($boolean) { + abort($code, $message, $headers); + } + } +} + +if (! function_exists('abort_unless')) { + /** + * Throw an HttpException with the given data unless the given condition is true. + * + * @param bool $boolean + * @param int $code + * @param string $message + * @param array $headers + * @return void + * + * @throws \Symfony\Component\HttpKernel\Exception\HttpException + * @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException + */ + function abort_unless($boolean, $code, $message = '', array $headers = []) + { + if (! $boolean) { + abort($code, $message, $headers); + } + } +} + +if (! function_exists('action')) { + /** + * Generate the URL to a controller action. + * + * @param string $name + * @param array $parameters + * @param bool $absolute + * @return string + */ + function action($name, $parameters = [], $absolute = true) + { + return app('url')->action($name, $parameters, $absolute); + } +} + +if (! function_exists('app')) { + /** + * Get the available container instance. + * + * @param string $abstract + * @param array $parameters + * @return mixed|\Illuminate\Foundation\Application + */ + function app($abstract = null, array $parameters = []) + { + if (is_null($abstract)) { + return Container::getInstance(); + } + + return empty($parameters) + ? Container::getInstance()->make($abstract) + : Container::getInstance()->makeWith($abstract, $parameters); + } +} + +if (! function_exists('app_path')) { + /** + * Get the path to the application folder. + * + * @param string $path + * @return string + */ + function app_path($path = '') + { + return app('path').($path ? DIRECTORY_SEPARATOR.$path : $path); + } +} + +if (! function_exists('asset')) { + /** + * Generate an asset path for the application. + * + * @param string $path + * @param bool $secure + * @return string + */ + function asset($path, $secure = null) + { + return app('url')->asset($path, $secure); + } +} + +if (! function_exists('auth')) { + /** + * Get the available auth instance. + * + * @param string|null $guard + * @return \Illuminate\Contracts\Auth\Factory|\Illuminate\Contracts\Auth\Guard|\Illuminate\Contracts\Auth\StatefulGuard + */ + function auth($guard = null) + { + if (is_null($guard)) { + return app(AuthFactory::class); + } else { + return app(AuthFactory::class)->guard($guard); + } + } +} + +if (! function_exists('back')) { + /** + * Create a new redirect response to the previous location. + * + * @param int $status + * @param array $headers + * @param mixed $fallback + * @return \Illuminate\Http\RedirectResponse + */ + function back($status = 302, $headers = [], $fallback = false) + { + return app('redirect')->back($status, $headers, $fallback); + } +} + +if (! function_exists('base_path')) { + /** + * Get the path to the base of the install. + * + * @param string $path + * @return string + */ + function base_path($path = '') + { + return app()->basePath().($path ? DIRECTORY_SEPARATOR.$path : $path); + } +} + +if (! function_exists('bcrypt')) { + /** + * Hash the given value. + * + * @param string $value + * @param array $options + * @return string + */ + function bcrypt($value, $options = []) + { + return app('hash')->make($value, $options); + } +} + +if (! function_exists('broadcast')) { + /** + * Begin broadcasting an event. + * + * @param mixed|null $event + * @return \Illuminate\Broadcasting\PendingBroadcast|void + */ + function broadcast($event = null) + { + return app(BroadcastFactory::class)->event($event); + } +} + +if (! function_exists('cache')) { + /** + * Get / set the specified cache value. + * + * If an array is passed, we'll assume you want to put to the cache. + * + * @param dynamic key|key,default|data,expiration|null + * @return mixed + * + * @throws \Exception + */ + function cache() + { + $arguments = func_get_args(); + + if (empty($arguments)) { + return app('cache'); + } + + if (is_string($arguments[0])) { + return app('cache')->get($arguments[0], isset($arguments[1]) ? $arguments[1] : null); + } + + if (is_array($arguments[0])) { + if (! isset($arguments[1])) { + throw new Exception( + 'You must set an expiration time when putting to the cache.' + ); + } + + return app('cache')->put(key($arguments[0]), reset($arguments[0]), $arguments[1]); + } + } +} + +if (! function_exists('config')) { + /** + * Get / set the specified configuration value. + * + * If an array is passed as the key, we will assume you want to set an array of values. + * + * @param array|string $key + * @param mixed $default + * @return mixed + */ + function config($key = null, $default = null) + { + if (is_null($key)) { + return app('config'); + } + + if (is_array($key)) { + return app('config')->set($key); + } + + return app('config')->get($key, $default); + } +} + +if (! function_exists('config_path')) { + /** + * Get the configuration path. + * + * @param string $path + * @return string + */ + function config_path($path = '') + { + return app()->make('path.config').($path ? DIRECTORY_SEPARATOR.$path : $path); + } +} + +if (! function_exists('cookie')) { + /** + * Create a new cookie instance. + * + * @param string $name + * @param string $value + * @param int $minutes + * @param string $path + * @param string $domain + * @param bool $secure + * @param bool $httpOnly + * @return \Symfony\Component\HttpFoundation\Cookie + */ + function cookie($name = null, $value = null, $minutes = 0, $path = null, $domain = null, $secure = false, $httpOnly = true) + { + $cookie = app(CookieFactory::class); + + if (is_null($name)) { + return $cookie; + } + + return $cookie->make($name, $value, $minutes, $path, $domain, $secure, $httpOnly); + } +} + +if (! function_exists('csrf_field')) { + /** + * Generate a CSRF token form field. + * + * @return \Illuminate\Support\HtmlString + */ + function csrf_field() + { + return new HtmlString(''); + } +} + +if (! function_exists('csrf_token')) { + /** + * Get the CSRF token value. + * + * @return string + * + * @throws \RuntimeException + */ + function csrf_token() + { + $session = app('session'); + + if (isset($session)) { + return $session->token(); + } + + throw new RuntimeException('Application session store not set.'); + } +} + +if (! function_exists('database_path')) { + /** + * Get the database path. + * + * @param string $path + * @return string + */ + function database_path($path = '') + { + return app()->databasePath($path); + } +} + +if (! function_exists('decrypt')) { + /** + * Decrypt the given value. + * + * @param string $value + * @return string + */ + function decrypt($value) + { + return app('encrypter')->decrypt($value); + } +} + +if (! function_exists('dispatch')) { + /** + * Dispatch a job to its appropriate handler. + * + * @param mixed $job + * @return mixed + */ + function dispatch($job) + { + return app(Dispatcher::class)->dispatch($job); + } +} + +if (! function_exists('elixir')) { + /** + * Get the path to a versioned Elixir file. + * + * @param string $file + * @param string $buildDirectory + * @return string + * + * @throws \InvalidArgumentException + */ + function elixir($file, $buildDirectory = 'build') + { + static $manifest = []; + static $manifestPath; + + if (empty($manifest) || $manifestPath !== $buildDirectory) { + $path = public_path($buildDirectory.'/rev-manifest.json'); + + if (file_exists($path)) { + $manifest = json_decode(file_get_contents($path), true); + $manifestPath = $buildDirectory; + } + } + + $file = ltrim($file, '/'); + + if (isset($manifest[$file])) { + return '/'.trim($buildDirectory.'/'.$manifest[$file], '/'); + } + + $unversioned = public_path($file); + + if (file_exists($unversioned)) { + return '/'.trim($file, '/'); + } + + throw new InvalidArgumentException("File {$file} not defined in asset manifest."); + } +} + +if (! function_exists('encrypt')) { + /** + * Encrypt the given value. + * + * @param string $value + * @return string + */ + function encrypt($value) + { + return app('encrypter')->encrypt($value); + } +} + +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('event')) { + /** + * Dispatch an event and call the listeners. + * + * @param string|object $event + * @param mixed $payload + * @param bool $halt + * @return array|null + */ + function event(...$args) + { + return app('events')->dispatch(...$args); + } +} + +if (! function_exists('factory')) { + /** + * Create a model factory builder for a given class, name, and amount. + * + * @param dynamic class|class,name|class,amount|class,name,amount + * @return \Illuminate\Database\Eloquent\FactoryBuilder + */ + function factory() + { + $factory = app(EloquentFactory::class); + + $arguments = func_get_args(); + + if (isset($arguments[1]) && is_string($arguments[1])) { + return $factory->of($arguments[0], $arguments[1])->times(isset($arguments[2]) ? $arguments[2] : null); + } elseif (isset($arguments[1])) { + return $factory->of($arguments[0])->times($arguments[1]); + } else { + return $factory->of($arguments[0]); + } + } +} + +if (! function_exists('info')) { + /** + * Write some information to the log. + * + * @param string $message + * @param array $context + * @return void + */ + function info($message, $context = []) + { + return app('log')->info($message, $context); + } +} + +if (! function_exists('logger')) { + /** + * Log a debug message to the logs. + * + * @param string $message + * @param array $context + * @return \Illuminate\Contracts\Logging\Log|null + */ + function logger($message = null, array $context = []) + { + if (is_null($message)) { + return app('log'); + } + + return app('log')->debug($message, $context); + } +} + +if (! function_exists('method_field')) { + /** + * Generate a form field to spoof the HTTP verb used by forms. + * + * @param string $method + * @return \Illuminate\Support\HtmlString + */ + function method_field($method) + { + return new HtmlString(''); + } +} + +if (! function_exists('mix')) { + /** + * Get the path to a versioned Mix file. + * + * @param string $path + * @param string $manifestDirectory + * @return \Illuminate\Support\HtmlString + * + * @throws \Exception + */ + function mix($path, $manifestDirectory = '') + { + static $manifest; + + if (! starts_with($path, '/')) { + $path = "/{$path}"; + } + + if ($manifestDirectory && ! starts_with($manifestDirectory, '/')) { + $manifestDirectory = "/{$manifestDirectory}"; + } + + if (file_exists(public_path($manifestDirectory.'/hot'))) { + return new HtmlString("http://localhost:8080{$path}"); + } + + if (! $manifest) { + if (! file_exists($manifestPath = public_path($manifestDirectory.'/mix-manifest.json'))) { + throw new Exception('The Mix manifest does not exist.'); + } + + $manifest = json_decode(file_get_contents($manifestPath), true); + } + + if (! array_key_exists($path, $manifest)) { + throw new Exception( + "Unable to locate Mix file: {$path}. Please check your ". + 'webpack.mix.js output paths and try again.' + ); + } + + return new HtmlString($manifestDirectory.$manifest[$path]); + } +} + +if (! function_exists('old')) { + /** + * Retrieve an old input item. + * + * @param string $key + * @param mixed $default + * @return mixed + */ + function old($key = null, $default = null) + { + return app('request')->old($key, $default); + } +} + +if (! function_exists('policy')) { + /** + * Get a policy instance for a given class. + * + * @param object|string $class + * @return mixed + * + * @throws \InvalidArgumentException + */ + function policy($class) + { + return app(Gate::class)->getPolicyFor($class); + } +} + +if (! function_exists('public_path')) { + /** + * Get the path to the public folder. + * + * @param string $path + * @return string + */ + function public_path($path = '') + { + return app()->make('path.public').($path ? DIRECTORY_SEPARATOR.$path : $path); + } +} + +if (! function_exists('redirect')) { + /** + * Get an instance of the redirector. + * + * @param string|null $to + * @param int $status + * @param array $headers + * @param bool $secure + * @return \Illuminate\Routing\Redirector|\Illuminate\Http\RedirectResponse + */ + function redirect($to = null, $status = 302, $headers = [], $secure = null) + { + if (is_null($to)) { + return app('redirect'); + } + + return app('redirect')->to($to, $status, $headers, $secure); + } +} + +if (! function_exists('request')) { + /** + * Get an instance of the current request or an input item from the request. + * + * @param array|string $key + * @param mixed $default + * @return \Illuminate\Http\Request|string|array + */ + function request($key = null, $default = null) + { + if (is_null($key)) { + return app('request'); + } + + if (is_array($key)) { + return app('request')->only($key); + } + + return data_get(app('request')->all(), $key, $default); + } +} + +if (! function_exists('resolve')) { + /** + * Resolve a service from the container. + * + * @param string $name + * @return mixed + */ + function resolve($name) + { + return app($name); + } +} + +if (! function_exists('resource_path')) { + /** + * Get the path to the resources folder. + * + * @param string $path + * @return string + */ + function resource_path($path = '') + { + return app()->resourcePath($path); + } +} + +if (! function_exists('response')) { + /** + * Return a new response from the application. + * + * @param string $content + * @param int $status + * @param array $headers + * @return \Symfony\Component\HttpFoundation\Response|\Illuminate\Contracts\Routing\ResponseFactory + */ + function response($content = '', $status = 200, array $headers = []) + { + $factory = app(ResponseFactory::class); + + if (func_num_args() === 0) { + return $factory; + } + + return $factory->make($content, $status, $headers); + } +} + +if (! function_exists('route')) { + /** + * Generate the URL to a named route. + * + * @param string $name + * @param array $parameters + * @param bool $absolute + * @return string + */ + function route($name, $parameters = [], $absolute = true) + { + return app('url')->route($name, $parameters, $absolute); + } +} + +if (! function_exists('secure_asset')) { + /** + * Generate an asset path for the application. + * + * @param string $path + * @return string + */ + function secure_asset($path) + { + return asset($path, true); + } +} + +if (! function_exists('secure_url')) { + /** + * Generate a HTTPS url for the application. + * + * @param string $path + * @param mixed $parameters + * @return string + */ + function secure_url($path, $parameters = []) + { + return url($path, $parameters, true); + } +} + +if (! function_exists('session')) { + /** + * Get / set the specified session value. + * + * If an array is passed as the key, we will assume you want to set an array of values. + * + * @param array|string $key + * @param mixed $default + * @return mixed + */ + function session($key = null, $default = null) + { + if (is_null($key)) { + return app('session'); + } + + if (is_array($key)) { + return app('session')->put($key); + } + + return app('session')->get($key, $default); + } +} + +if (! function_exists('storage_path')) { + /** + * Get the path to the storage folder. + * + * @param string $path + * @return string + */ + function storage_path($path = '') + { + return app('path.storage').($path ? DIRECTORY_SEPARATOR.$path : $path); + } +} + +if (! function_exists('trans')) { + /** + * Translate the given message. + * + * @param string $id + * @param array $replace + * @param string $locale + * @return \Illuminate\Contracts\Translation\Translator|string + */ + function trans($id = null, $replace = [], $locale = null) + { + if (is_null($id)) { + return app('translator'); + } + + return app('translator')->trans($id, $replace, $locale); + } +} + +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('__')) { + /** + * Translate the given message. + * + * @param string $key + * @param array $replace + * @param string $locale + * @return \Illuminate\Contracts\Translation\Translator|string + */ + function __($key = null, $replace = [], $locale = null) + { + return app('translator')->getFromJson($key, $replace, $locale); + } +} + +if (! function_exists('url')) { + /** + * Generate a url for the application. + * + * @param string $path + * @param mixed $parameters + * @param bool $secure + * @return \Illuminate\Contracts\Routing\UrlGenerator|string + */ + function url($path = null, $parameters = [], $secure = null) + { + if (is_null($path)) { + return app(UrlGenerator::class); + } + + return app(UrlGenerator::class)->to($path, $parameters, $secure); + } +} + +if (! function_exists('validator')) { + /** + * Create a new Validator instance. + * + * @param array $data + * @param array $rules + * @param array $messages + * @param array $customAttributes + * @return \Illuminate\Contracts\Validation\Validator + */ + function validator(array $data = [], array $rules = [], array $messages = [], array $customAttributes = []) + { + $factory = app(ValidationFactory::class); + + if (func_num_args() === 0) { + return $factory; + } + + return $factory->make($data, $rules, $messages, $customAttributes); + } +} + +if (! function_exists('view')) { + /** + * Get the evaluated view contents for the given view. + * + * @param string $view + * @param array $data + * @param array $mergeData + * @return \Illuminate\View\View|\Illuminate\Contracts\View\Factory + */ + function view($view = null, $data = [], $mergeData = []) + { + $factory = app(ViewFactory::class); + + if (func_num_args() === 0) { + return $factory; + } + + return $factory->make($view, $data, $mergeData); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/stubs/facade.stub b/vendor/laravel/framework/src/Illuminate/Foundation/stubs/facade.stub new file mode 100644 index 0000000..aadbe74 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Foundation/stubs/facade.stub @@ -0,0 +1,21 @@ + $this->cost($options), + ]); + + if ($hash === false) { + throw new RuntimeException('Bcrypt hashing not supported.'); + } + + return $hash; + } + + /** + * Check the given plain value against a hash. + * + * @param string $value + * @param string $hashedValue + * @param array $options + * @return bool + */ + public function check($value, $hashedValue, array $options = []) + { + if (strlen($hashedValue) === 0) { + return false; + } + + return password_verify($value, $hashedValue); + } + + /** + * Check if the given hash has been hashed using the given options. + * + * @param string $hashedValue + * @param array $options + * @return bool + */ + public function needsRehash($hashedValue, array $options = []) + { + return password_needs_rehash($hashedValue, PASSWORD_BCRYPT, [ + 'cost' => $this->cost($options), + ]); + } + + /** + * Set the default password work factor. + * + * @param int $rounds + * @return $this + */ + public function setRounds($rounds) + { + $this->rounds = (int) $rounds; + + return $this; + } + + /** + * Extract the cost value from the options array. + * + * @param array $options + * @return int + */ + protected function cost(array $options = []) + { + return isset($options['rounds']) ? $options['rounds'] : $this->rounds; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Hashing/HashServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Hashing/HashServiceProvider.php new file mode 100755 index 0000000..85581f4 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Hashing/HashServiceProvider.php @@ -0,0 +1,37 @@ +app->singleton('hash', function () { + return new BcryptHasher; + }); + } + + /** + * Get the services provided by the provider. + * + * @return array + */ + public function provides() + { + return ['hash']; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Hashing/composer.json b/vendor/laravel/framework/src/Illuminate/Hashing/composer.json new file mode 100755 index 0000000..2468083 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Hashing/composer.json @@ -0,0 +1,35 @@ +{ + "name": "illuminate/hashing", + "description": "The Illuminate Hashing package.", + "license": "MIT", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "require": { + "php": ">=5.6.4", + "illuminate/contracts": "5.4.*", + "illuminate/support": "5.4.*" + }, + "autoload": { + "psr-4": { + "Illuminate\\Hashing\\": "" + } + }, + "extra": { + "branch-alias": { + "dev-master": "5.4-dev" + } + }, + "config": { + "sort-packages": true + }, + "minimum-stability": "dev" +} diff --git a/vendor/laravel/framework/src/Illuminate/Http/Concerns/InteractsWithContentTypes.php b/vendor/laravel/framework/src/Illuminate/Http/Concerns/InteractsWithContentTypes.php new file mode 100644 index 0000000..492c131 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Http/Concerns/InteractsWithContentTypes.php @@ -0,0 +1,157 @@ +header('CONTENT_TYPE'), ['/json', '+json']); + } + + /** + * Determine if the current request probably expects a JSON response. + * + * @return bool + */ + public function expectsJson() + { + return ($this->ajax() && ! $this->pjax()) || $this->wantsJson(); + } + + /** + * Determine if the current request is asking for JSON in return. + * + * @return bool + */ + public function wantsJson() + { + $acceptable = $this->getAcceptableContentTypes(); + + return isset($acceptable[0]) && Str::contains($acceptable[0], ['/json', '+json']); + } + + /** + * Determines whether the current requests accepts a given content type. + * + * @param string|array $contentTypes + * @return bool + */ + public function accepts($contentTypes) + { + $accepts = $this->getAcceptableContentTypes(); + + if (count($accepts) === 0) { + return true; + } + + $types = (array) $contentTypes; + + foreach ($accepts as $accept) { + if ($accept === '*/*' || $accept === '*') { + return true; + } + + foreach ($types as $type) { + if ($this->matchesType($accept, $type) || $accept === strtok($type, '/').'/*') { + return true; + } + } + } + + return false; + } + + /** + * Return the most suitable content type from the given array based on content negotiation. + * + * @param string|array $contentTypes + * @return string|null + */ + public function prefers($contentTypes) + { + $accepts = $this->getAcceptableContentTypes(); + + $contentTypes = (array) $contentTypes; + + foreach ($accepts as $accept) { + if (in_array($accept, ['*/*', '*'])) { + return $contentTypes[0]; + } + + foreach ($contentTypes as $contentType) { + $type = $contentType; + + if (! is_null($mimeType = $this->getMimeType($contentType))) { + $type = $mimeType; + } + + if ($this->matchesType($type, $accept) || $accept === strtok($type, '/').'/*') { + return $contentType; + } + } + } + } + + /** + * Determines whether a request accepts JSON. + * + * @return bool + */ + public function acceptsJson() + { + return $this->accepts('application/json'); + } + + /** + * Determines whether a request accepts HTML. + * + * @return bool + */ + public function acceptsHtml() + { + return $this->accepts('text/html'); + } + + /** + * Get the data format expected in the response. + * + * @param string $default + * @return string + */ + public function format($default = 'html') + { + foreach ($this->getAcceptableContentTypes() as $type) { + if ($format = $this->getFormat($type)) { + return $format; + } + } + + return $default; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Http/Concerns/InteractsWithFlashData.php b/vendor/laravel/framework/src/Illuminate/Http/Concerns/InteractsWithFlashData.php new file mode 100644 index 0000000..c6b84f2 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Http/Concerns/InteractsWithFlashData.php @@ -0,0 +1,64 @@ +session()->getOldInput($key, $default); + } + + /** + * Flash the input for the current request to the session. + * + * @return void + */ + public function flash() + { + $this->session()->flashInput($this->input()); + } + + /** + * Flash only some of the input to the session. + * + * @param array|mixed $keys + * @return void + */ + public function flashOnly($keys) + { + $this->session()->flashInput( + $this->only(is_array($keys) ? $keys : func_get_args()) + ); + } + + /** + * Flash only some of the input to the session. + * + * @param array|mixed $keys + * @return void + */ + public function flashExcept($keys) + { + $this->session()->flashInput( + $this->except(is_array($keys) ? $keys : func_get_args()) + ); + } + + /** + * Flush all of the old input from the session. + * + * @return void + */ + public function flush() + { + $this->session()->flashInput([]); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Http/Concerns/InteractsWithInput.php b/vendor/laravel/framework/src/Illuminate/Http/Concerns/InteractsWithInput.php new file mode 100644 index 0000000..e00b132 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Http/Concerns/InteractsWithInput.php @@ -0,0 +1,315 @@ +retrieveItem('server', $key, $default); + } + + /** + * Determine if a header is set on the request. + * + * @param string $key + * @return bool + */ + public function hasHeader($key) + { + return ! is_null($this->header($key)); + } + + /** + * Retrieve a header from the request. + * + * @param string $key + * @param string|array|null $default + * @return string|array + */ + public function header($key = null, $default = null) + { + return $this->retrieveItem('headers', $key, $default); + } + + /** + * Get the bearer token from the request headers. + * + * @return string|null + */ + public function bearerToken() + { + $header = $this->header('Authorization', ''); + + if (Str::startsWith($header, 'Bearer ')) { + return Str::substr($header, 7); + } + } + + /** + * Determine if the request contains a given input item key. + * + * @param string|array $key + * @return bool + */ + public function exists($key) + { + $keys = is_array($key) ? $key : func_get_args(); + + $input = $this->all(); + + foreach ($keys as $value) { + if (! Arr::has($input, $value)) { + return false; + } + } + + return true; + } + + /** + * Determine if the request contains a non-empty value for an input item. + * + * @param string|array $key + * @return bool + */ + public function has($key) + { + $keys = is_array($key) ? $key : func_get_args(); + + foreach ($keys as $value) { + if ($this->isEmptyString($value)) { + return false; + } + } + + return true; + } + + /** + * Determine if the given input key is an empty string for "has". + * + * @param string $key + * @return bool + */ + protected function isEmptyString($key) + { + $value = $this->input($key); + + return ! is_bool($value) && ! is_array($value) && trim((string) $value) === ''; + } + + /** + * Get all of the input and files for the request. + * + * @return array + */ + public function all() + { + return array_replace_recursive($this->input(), $this->allFiles()); + } + + /** + * Retrieve an input item from the request. + * + * @param string $key + * @param string|array|null $default + * @return string|array + */ + public function input($key = null, $default = null) + { + return data_get( + $this->getInputSource()->all() + $this->query->all(), $key, $default + ); + } + + /** + * Get a subset containing the provided keys with values from the input data. + * + * @param array|mixed $keys + * @return array + */ + public function only($keys) + { + $keys = is_array($keys) ? $keys : func_get_args(); + + $results = []; + + $input = $this->all(); + + foreach ($keys as $key) { + Arr::set($results, $key, data_get($input, $key)); + } + + return $results; + } + + /** + * Get all of the input except for a specified array of items. + * + * @param array|mixed $keys + * @return array + */ + public function except($keys) + { + $keys = is_array($keys) ? $keys : func_get_args(); + + $results = $this->all(); + + Arr::forget($results, $keys); + + return $results; + } + + /** + * Intersect an array of items with the input data. + * + * @param array|mixed $keys + * @return array + */ + public function intersect($keys) + { + return array_filter($this->only(is_array($keys) ? $keys : func_get_args())); + } + + /** + * Retrieve a query string item from the request. + * + * @param string $key + * @param string|array|null $default + * @return string|array + */ + public function query($key = null, $default = null) + { + return $this->retrieveItem('query', $key, $default); + } + + /** + * Determine if a cookie is set on the request. + * + * @param string $key + * @return bool + */ + public function hasCookie($key) + { + return ! is_null($this->cookie($key)); + } + + /** + * Retrieve a cookie from the request. + * + * @param string $key + * @param string|array|null $default + * @return string|array + */ + public function cookie($key = null, $default = null) + { + return $this->retrieveItem('cookies', $key, $default); + } + + /** + * Get an array of all of the files on the request. + * + * @return array + */ + public function allFiles() + { + $files = $this->files->all(); + + return $this->convertedFiles + ? $this->convertedFiles + : $this->convertedFiles = $this->convertUploadedFiles($files); + } + + /** + * Convert the given array of Symfony UploadedFiles to custom Laravel UploadedFiles. + * + * @param array $files + * @return array + */ + protected function convertUploadedFiles(array $files) + { + return array_map(function ($file) { + if (is_null($file) || (is_array($file) && empty(array_filter($file)))) { + return $file; + } + + return is_array($file) + ? $this->convertUploadedFiles($file) + : UploadedFile::createFromBase($file); + }, $files); + } + + /** + * Determine if the uploaded data contains a file. + * + * @param string $key + * @return bool + */ + public function hasFile($key) + { + if (! is_array($files = $this->file($key))) { + $files = [$files]; + } + + foreach ($files as $file) { + if ($this->isValidFile($file)) { + return true; + } + } + + return false; + } + + /** + * Check that the given file is a valid file instance. + * + * @param mixed $file + * @return bool + */ + protected function isValidFile($file) + { + return $file instanceof SplFileInfo && $file->getPath() != ''; + } + + /** + * Retrieve a file from the request. + * + * @param string $key + * @param mixed $default + * @return \Illuminate\Http\UploadedFile|array|null + */ + public function file($key = null, $default = null) + { + return data_get($this->allFiles(), $key, $default); + } + + /** + * Retrieve a parameter item from a given source. + * + * @param string $source + * @param string $key + * @param string|array|null $default + * @return string|array + */ + protected function retrieveItem($source, $key, $default) + { + if (is_null($key)) { + return $this->$source->all(); + } + + return $this->$source->get($key, $default); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Http/Exceptions/HttpResponseException.php b/vendor/laravel/framework/src/Illuminate/Http/Exceptions/HttpResponseException.php new file mode 100644 index 0000000..b27052f --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Http/Exceptions/HttpResponseException.php @@ -0,0 +1,37 @@ +response = $response; + } + + /** + * Get the underlying response instance. + * + * @return \Symfony\Component\HttpFoundation\Response + */ + public function getResponse() + { + return $this->response; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Http/Exceptions/PostTooLargeException.php b/vendor/laravel/framework/src/Illuminate/Http/Exceptions/PostTooLargeException.php new file mode 100644 index 0000000..30421da --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Http/Exceptions/PostTooLargeException.php @@ -0,0 +1,10 @@ +getRealPath(); + } + + /** + * Get the file's extension. + * + * @return string + */ + public function extension() + { + return $this->guessExtension(); + } + + /** + * Get the file's extension supplied by the client. + * + * @return string + */ + public function clientExtension() + { + return $this->guessClientExtension(); + } + + /** + * Get a filename for the file. + * + * @param string $path + * @return string + */ + public function hashName($path = null) + { + if ($path) { + $path = rtrim($path, '/').'/'; + } + + $hash = $this->hashName ?: $this->hashName = Str::random(40); + + return $path.$hash.'.'.$this->guessExtension(); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Http/JsonResponse.php b/vendor/laravel/framework/src/Illuminate/Http/JsonResponse.php new file mode 100755 index 0000000..9992bf9 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Http/JsonResponse.php @@ -0,0 +1,86 @@ +encodingOptions = $options; + + parent::__construct($data, $status, $headers); + } + + /** + * Sets the JSONP callback. + * + * @param string|null $callback + * @return $this + */ + public function withCallback($callback = null) + { + return $this->setCallback($callback); + } + + /** + * Get the json_decoded data from the response. + * + * @param bool $assoc + * @param int $depth + * @return mixed + */ + public function getData($assoc = false, $depth = 512) + { + return json_decode($this->data, $assoc, $depth); + } + + /** + * {@inheritdoc} + */ + public function setData($data = []) + { + $this->original = $data; + + if ($data instanceof Arrayable) { + $this->data = json_encode($data->toArray(), $this->encodingOptions); + } elseif ($data instanceof Jsonable) { + $this->data = $data->toJson($this->encodingOptions); + } elseif ($data instanceof JsonSerializable) { + $this->data = json_encode($data->jsonSerialize(), $this->encodingOptions); + } else { + $this->data = json_encode($data, $this->encodingOptions); + } + + if (JSON_ERROR_NONE !== json_last_error()) { + throw new InvalidArgumentException(json_last_error_msg()); + } + + return $this->update(); + } + + /** + * {@inheritdoc} + */ + public function setEncodingOptions($options) + { + $this->encodingOptions = (int) $options; + + return $this->setData($this->getData()); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Http/Middleware/CheckResponseForModifications.php b/vendor/laravel/framework/src/Illuminate/Http/Middleware/CheckResponseForModifications.php new file mode 100644 index 0000000..2a93e21 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Http/Middleware/CheckResponseForModifications.php @@ -0,0 +1,27 @@ +isNotModified($request); + } + + return $response; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Http/Middleware/FrameGuard.php b/vendor/laravel/framework/src/Illuminate/Http/Middleware/FrameGuard.php new file mode 100644 index 0000000..66edce4 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Http/Middleware/FrameGuard.php @@ -0,0 +1,24 @@ +headers->set('X-Frame-Options', 'SAMEORIGIN', false); + + return $response; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Http/RedirectResponse.php b/vendor/laravel/framework/src/Illuminate/Http/RedirectResponse.php new file mode 100755 index 0000000..0c71743 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Http/RedirectResponse.php @@ -0,0 +1,232 @@ + $value]; + + foreach ($key as $k => $v) { + $this->session->flash($k, $v); + } + + return $this; + } + + /** + * Add multiple cookies to the response. + * + * @param array $cookies + * @return $this + */ + public function withCookies(array $cookies) + { + foreach ($cookies as $cookie) { + $this->headers->setCookie($cookie); + } + + return $this; + } + + /** + * Flash an array of input to the session. + * + * @param array $input + * @return $this + */ + public function withInput(array $input = null) + { + $this->session->flashInput($this->removeFilesFromInput( + ! is_null($input) ? $input : $this->request->input() + )); + + return $this; + } + + /** + * Remove all uploaded files form the given input array. + * + * @param array $input + * @return array + */ + protected function removeFilesFromInput(array $input) + { + foreach ($input as $key => $value) { + if (is_array($value)) { + $input[$key] = $this->removeFilesFromInput($value); + } + + if ($value instanceof SymfonyUploadedFile) { + unset($input[$key]); + } + } + + return $input; + } + + /** + * Flash an array of input to the session. + * + * @return $this + */ + public function onlyInput() + { + return $this->withInput($this->request->only(func_get_args())); + } + + /** + * Flash an array of input to the session. + * + * @return \Illuminate\Http\RedirectResponse + */ + public function exceptInput() + { + return $this->withInput($this->request->except(func_get_args())); + } + + /** + * Flash a container of errors to the session. + * + * @param \Illuminate\Contracts\Support\MessageProvider|array|string $provider + * @param string $key + * @return $this + */ + public function withErrors($provider, $key = 'default') + { + $value = $this->parseErrors($provider); + + $this->session->flash( + 'errors', $this->session->get('errors', new ViewErrorBag)->put($key, $value) + ); + + return $this; + } + + /** + * Parse the given errors into an appropriate value. + * + * @param \Illuminate\Contracts\Support\MessageProvider|array|string $provider + * @return \Illuminate\Support\MessageBag + */ + protected function parseErrors($provider) + { + if ($provider instanceof MessageProvider) { + return $provider->getMessageBag(); + } + + return new MessageBag((array) $provider); + } + + /** + * Get the original response content. + * + * @return null + */ + public function getOriginalContent() + { + // + } + + /** + * Get the request instance. + * + * @return \Illuminate\Http\Request|null + */ + public function getRequest() + { + return $this->request; + } + + /** + * Set the request instance. + * + * @param \Illuminate\Http\Request $request + * @return void + */ + public function setRequest(Request $request) + { + $this->request = $request; + } + + /** + * Get the session store implementation. + * + * @return \Illuminate\Session\Store|null + */ + public function getSession() + { + return $this->session; + } + + /** + * Set the session store implementation. + * + * @param \Illuminate\Session\Store $session + * @return void + */ + public function setSession(SessionStore $session) + { + $this->session = $session; + } + + /** + * Dynamically bind flash data in the session. + * + * @param string $method + * @param array $parameters + * @return $this + * + * @throws \BadMethodCallException + */ + public function __call($method, $parameters) + { + if (static::hasMacro($method)) { + return $this->macroCall($method, $parameters); + } + + if (Str::startsWith($method, 'with')) { + return $this->with(Str::snake(substr($method, 4)), $parameters[0]); + } + + throw new BadMethodCallException( + "Method [$method] does not exist on Redirect." + ); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Http/Request.php b/vendor/laravel/framework/src/Illuminate/Http/Request.php new file mode 100644 index 0000000..0d0f725 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Http/Request.php @@ -0,0 +1,595 @@ +getMethod(); + } + + /** + * Get the root URL for the application. + * + * @return string + */ + public function root() + { + return rtrim($this->getSchemeAndHttpHost().$this->getBaseUrl(), '/'); + } + + /** + * Get the URL (no query string) for the request. + * + * @return string + */ + public function url() + { + return rtrim(preg_replace('/\?.*/', '', $this->getUri()), '/'); + } + + /** + * Get the full URL for the request. + * + * @return string + */ + public function fullUrl() + { + $query = $this->getQueryString(); + + $question = $this->getBaseUrl().$this->getPathInfo() == '/' ? '/?' : '?'; + + return $query ? $this->url().$question.$query : $this->url(); + } + + /** + * Get the full URL for the request with the added query string parameters. + * + * @param array $query + * @return string + */ + public function fullUrlWithQuery(array $query) + { + $question = $this->getBaseUrl().$this->getPathInfo() == '/' ? '/?' : '?'; + + return count($this->query()) > 0 + ? $this->url().$question.http_build_query(array_merge($this->query(), $query)) + : $this->fullUrl().$question.http_build_query($query); + } + + /** + * Get the current path info for the request. + * + * @return string + */ + public function path() + { + $pattern = trim($this->getPathInfo(), '/'); + + return $pattern == '' ? '/' : $pattern; + } + + /** + * Get the current encoded path info for the request. + * + * @return string + */ + public function decodedPath() + { + return rawurldecode($this->path()); + } + + /** + * Get a segment from the URI (1 based index). + * + * @param int $index + * @param string|null $default + * @return string|null + */ + public function segment($index, $default = null) + { + return Arr::get($this->segments(), $index - 1, $default); + } + + /** + * Get all of the segments for the request path. + * + * @return array + */ + public function segments() + { + $segments = explode('/', $this->decodedPath()); + + return array_values(array_filter($segments, function ($v) { + return $v != ''; + })); + } + + /** + * Determine if the current request URI matches a pattern. + * + * @return bool + */ + public function is() + { + foreach (func_get_args() as $pattern) { + if (Str::is($pattern, $this->decodedPath())) { + return true; + } + } + + return false; + } + + /** + * Determine if the current request URL and query string matches a pattern. + * + * @return bool + */ + public function fullUrlIs() + { + $url = $this->fullUrl(); + + foreach (func_get_args() as $pattern) { + if (Str::is($pattern, $url)) { + return true; + } + } + + return false; + } + + /** + * Determine if the request is the result of an AJAX call. + * + * @return bool + */ + public function ajax() + { + return $this->isXmlHttpRequest(); + } + + /** + * Determine if the request is the result of an PJAX call. + * + * @return bool + */ + public function pjax() + { + return $this->headers->get('X-PJAX') == true; + } + + /** + * Determine if the request is over HTTPS. + * + * @return bool + */ + public function secure() + { + return $this->isSecure(); + } + + /** + * Returns the client IP address. + * + * @return string + */ + public function ip() + { + return $this->getClientIp(); + } + + /** + * Returns the client IP addresses. + * + * @return array + */ + public function ips() + { + return $this->getClientIps(); + } + + /** + * Merge new input into the current request's input array. + * + * @param array $input + * @return void + */ + public function merge(array $input) + { + $this->getInputSource()->add($input); + } + + /** + * Replace the input for the current request. + * + * @param array $input + * @return void + */ + public function replace(array $input) + { + $this->getInputSource()->replace($input); + } + + /** + * Get the JSON payload for the request. + * + * @param string $key + * @param mixed $default + * @return mixed + */ + public function json($key = null, $default = null) + { + if (! isset($this->json)) { + $this->json = new ParameterBag((array) json_decode($this->getContent(), true)); + } + + if (is_null($key)) { + return $this->json; + } + + return data_get($this->json->all(), $key, $default); + } + + /** + * Get the input source for the request. + * + * @return \Symfony\Component\HttpFoundation\ParameterBag + */ + protected function getInputSource() + { + if ($this->isJson()) { + return $this->json(); + } + + return $this->getRealMethod() == 'GET' ? $this->query : $this->request; + } + + /** + * Create an Illuminate request from a Symfony instance. + * + * @param \Symfony\Component\HttpFoundation\Request $request + * @return \Illuminate\Http\Request + */ + public static function createFromBase(SymfonyRequest $request) + { + if ($request instanceof static) { + return $request; + } + + $content = $request->content; + + $request = (new static)->duplicate( + $request->query->all(), $request->request->all(), $request->attributes->all(), + $request->cookies->all(), $request->files->all(), $request->server->all() + ); + + $request->content = $content; + + $request->request = $request->getInputSource(); + + return $request; + } + + /** + * {@inheritdoc} + */ + public function duplicate(array $query = null, array $request = null, array $attributes = null, array $cookies = null, array $files = null, array $server = null) + { + return parent::duplicate($query, $request, $attributes, $cookies, $this->filterFiles($files), $server); + } + + /** + * Filter the given array of files, removing any empty values. + * + * @param mixed $files + * @return mixed + */ + protected function filterFiles($files) + { + if (! $files) { + return; + } + + foreach ($files as $key => $file) { + if (is_array($file)) { + $files[$key] = $this->filterFiles($files[$key]); + } + + if (empty($files[$key])) { + unset($files[$key]); + } + } + + return $files; + } + + /** + * Get the session associated with the request. + * + * @return \Illuminate\Session\Store + * + * @throws \RuntimeException + */ + public function session() + { + if (! $this->hasSession()) { + throw new RuntimeException('Session store not set on request.'); + } + + return $this->getSession(); + } + + /** + * Set the session instance on the request. + * + * @param \Illuminate\Contracts\Session\Session $session + * @return void + */ + public function setLaravelSession($session) + { + $this->session = $session; + } + + /** + * Get the user making the request. + * + * @param string|null $guard + * @return mixed + */ + public function user($guard = null) + { + return call_user_func($this->getUserResolver(), $guard); + } + + /** + * Get the route handling the request. + * + * @param string|null $param + * + * @return \Illuminate\Routing\Route|object|string + */ + public function route($param = null) + { + $route = call_user_func($this->getRouteResolver()); + + if (is_null($route) || is_null($param)) { + return $route; + } else { + return $route->parameter($param); + } + } + + /** + * Get a unique fingerprint for the request / route / IP address. + * + * @return string + * + * @throws \RuntimeException + */ + public function fingerprint() + { + if (! $route = $this->route()) { + throw new RuntimeException('Unable to generate fingerprint. Route unavailable.'); + } + + return sha1(implode('|', array_merge( + $route->methods(), [$route->domain(), $route->uri(), $this->ip()] + ))); + } + + /** + * Set the JSON payload for the request. + * + * @param array $json + * @return $this + */ + public function setJson($json) + { + $this->json = $json; + + return $this; + } + + /** + * Get the user resolver callback. + * + * @return \Closure + */ + public function getUserResolver() + { + return $this->userResolver ?: function () { + // + }; + } + + /** + * Set the user resolver callback. + * + * @param \Closure $callback + * @return $this + */ + public function setUserResolver(Closure $callback) + { + $this->userResolver = $callback; + + return $this; + } + + /** + * Get the route resolver callback. + * + * @return \Closure + */ + public function getRouteResolver() + { + return $this->routeResolver ?: function () { + // + }; + } + + /** + * Set the route resolver callback. + * + * @param \Closure $callback + * @return $this + */ + public function setRouteResolver(Closure $callback) + { + $this->routeResolver = $callback; + + return $this; + } + + /** + * Get all of the input and files for the request. + * + * @return array + */ + public function toArray() + { + return $this->all(); + } + + /** + * Determine if the given offset exists. + * + * @param string $offset + * @return bool + */ + public function offsetExists($offset) + { + return array_key_exists($offset, $this->all()); + } + + /** + * Get the value at the given offset. + * + * @param string $offset + * @return mixed + */ + public function offsetGet($offset) + { + return data_get($this->all(), $offset); + } + + /** + * Set the value at the given offset. + * + * @param string $offset + * @param mixed $value + * @return void + */ + public function offsetSet($offset, $value) + { + $this->getInputSource()->set($offset, $value); + } + + /** + * Remove the value at the given offset. + * + * @param string $offset + * @return void + */ + public function offsetUnset($offset) + { + $this->getInputSource()->remove($offset); + } + + /** + * Check if an input element is set on the request. + * + * @param string $key + * @return bool + */ + public function __isset($key) + { + return ! is_null($this->__get($key)); + } + + /** + * Get an input element from the request. + * + * @param string $key + * @return mixed + */ + public function __get($key) + { + if ($this->offsetExists($key)) { + return $this->offsetGet($key); + } + + return $this->route($key); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Http/Response.php b/vendor/laravel/framework/src/Illuminate/Http/Response.php new file mode 100755 index 0000000..f3bf3fc --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Http/Response.php @@ -0,0 +1,72 @@ +original = $content; + + // If the content is "JSONable" we will set the appropriate header and convert + // the content to JSON. This is useful when returning something like models + // from routes that will be automatically transformed to their JSON form. + if ($this->shouldBeJson($content)) { + $this->header('Content-Type', 'application/json'); + + $content = $this->morphToJson($content); + } + + // If this content implements the "Renderable" interface then we will call the + // render method on the object so we will avoid any "__toString" exceptions + // that might be thrown and have their errors obscured by PHP's handling. + elseif ($content instanceof Renderable) { + $content = $content->render(); + } + + return parent::setContent($content); + } + + /** + * Determine if the given content should be turned into JSON. + * + * @param mixed $content + * @return bool + */ + protected function shouldBeJson($content) + { + return $content instanceof Jsonable || + $content instanceof ArrayObject || + $content instanceof JsonSerializable || + is_array($content); + } + + /** + * Morph the given content into JSON. + * + * @param mixed $content + * @return string + */ + protected function morphToJson($content) + { + if ($content instanceof Jsonable) { + return $content->toJson(); + } + + return json_encode($content); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Http/ResponseTrait.php b/vendor/laravel/framework/src/Illuminate/Http/ResponseTrait.php new file mode 100644 index 0000000..c7a4f80 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Http/ResponseTrait.php @@ -0,0 +1,134 @@ +getStatusCode(); + } + + /** + * Get the content of the response. + * + * @return string + */ + public function content() + { + return $this->getContent(); + } + + /** + * Get the original response content. + * + * @return mixed + */ + public function getOriginalContent() + { + return $this->original; + } + + /** + * Set a header on the Response. + * + * @param string $key + * @param array|string $values + * @param bool $replace + * @return $this + */ + public function header($key, $values, $replace = true) + { + $this->headers->set($key, $values, $replace); + + return $this; + } + + /** + * Add an array of headers to the response. + * + * @param array $headers + * @return $this + */ + public function withHeaders(array $headers) + { + foreach ($headers as $key => $value) { + $this->headers->set($key, $value); + } + + return $this; + } + + /** + * Add a cookie to the response. + * + * @param \Symfony\Component\HttpFoundation\Cookie|mixed $cookie + * @return $this + */ + public function cookie($cookie) + { + return call_user_func_array([$this, 'withCookie'], func_get_args()); + } + + /** + * Add a cookie to the response. + * + * @param \Symfony\Component\HttpFoundation\Cookie|mixed $cookie + * @return $this + */ + public function withCookie($cookie) + { + if (is_string($cookie) && function_exists('cookie')) { + $cookie = call_user_func_array('cookie', func_get_args()); + } + + $this->headers->setCookie($cookie); + + return $this; + } + + /** + * Set the exception to attach to the response. + * + * @param \Exception $e + * @return $this + */ + public function withException(Exception $e) + { + $this->exception = $e; + + return $this; + } + + /** + * Throws the response in a HttpResponseException instance. + * + * @throws \Illuminate\Http\Exceptions\HttpResponseException + */ + public function throwResponse() + { + throw new HttpResponseException($this); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Http/Testing/File.php b/vendor/laravel/framework/src/Illuminate/Http/Testing/File.php new file mode 100644 index 0000000..01c118f --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Http/Testing/File.php @@ -0,0 +1,115 @@ +name = $name; + $this->tempFile = $tempFile; + + parent::__construct( + $this->tempFilePath(), $name, $this->getMimeType(), + filesize($this->tempFilePath()), $error = null, $test = true + ); + } + + /** + * Create a new fake file. + * + * @param string $name + * @param int $kilobytes + * @return \Illuminate\Http\Testing\File + */ + public static function create($name, $kilobytes = 0) + { + return (new FileFactory)->create($name, $kilobytes); + } + + /** + * Create a new fake image. + * + * @param string $name + * @param int $width + * @param int $height + * @return \Illuminate\Http\Testing\File + */ + public static function image($name, $width = 10, $height = 10) + { + return (new FileFactory)->image($name, $width, $height); + } + + /** + * Set the "size" of the file in kilobytes. + * + * @param int $kilobytes + * @return $this + */ + public function size($kilobytes) + { + $this->sizeToReport = $kilobytes * 1024; + + return $this; + } + + /** + * Get the size of the file. + * + * @return int + */ + public function getSize() + { + return $this->sizeToReport ?: parent::getSize(); + } + + /** + * Get the MIME type for the file. + * + * @return string + */ + public function getMimeType() + { + return MimeType::from($this->name); + } + + /** + * Get the path to the temporary file. + * + * @return string + */ + protected function tempFilePath() + { + return stream_get_meta_data($this->tempFile)['uri']; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Http/Testing/FileFactory.php b/vendor/laravel/framework/src/Illuminate/Http/Testing/FileFactory.php new file mode 100644 index 0000000..0a677d7 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Http/Testing/FileFactory.php @@ -0,0 +1,51 @@ +sizeToReport = $kilobytes * 1024; + }); + } + + /** + * Create a new fake image. + * + * @param string $name + * @param int $width + * @param int $height + * @return \Illuminate\Http\Testing\File + */ + public function image($name, $width = 10, $height = 10) + { + return new File($name, $this->generateImage($width, $height)); + } + + /** + * Generate a dummy image of the given width and height. + * + * @param int $width + * @param int $height + * @return resource + */ + protected function generateImage($width, $height) + { + return tap(tmpfile(), function ($temp) use ($width, $height) { + ob_start(); + + imagepng(imagecreatetruecolor($width, $height)); + + fwrite($temp, ob_get_clean()); + }); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Http/Testing/MimeType.php b/vendor/laravel/framework/src/Illuminate/Http/Testing/MimeType.php new file mode 100644 index 0000000..61f0c2b --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Http/Testing/MimeType.php @@ -0,0 +1,792 @@ + 'application/andrew-inset', + 'aw' => 'application/applixware', + 'atom' => 'application/atom+xml', + 'atomcat' => 'application/atomcat+xml', + 'atomsvc' => 'application/atomsvc+xml', + 'ccxml' => 'application/ccxml+xml', + 'cdmia' => 'application/cdmi-capability', + 'cdmic' => 'application/cdmi-container', + 'cdmid' => 'application/cdmi-domain', + 'cdmio' => 'application/cdmi-object', + 'cdmiq' => 'application/cdmi-queue', + 'cu' => 'application/cu-seeme', + 'davmount' => 'application/davmount+xml', + 'dbk' => 'application/docbook+xml', + 'dssc' => 'application/dssc+der', + 'xdssc' => 'application/dssc+xml', + 'ecma' => 'application/ecmascript', + 'emma' => 'application/emma+xml', + 'epub' => 'application/epub+zip', + 'exi' => 'application/exi', + 'pfr' => 'application/font-tdpfr', + 'gml' => 'application/gml+xml', + 'gpx' => 'application/gpx+xml', + 'gxf' => 'application/gxf', + 'stk' => 'application/hyperstudio', + 'ink' => 'application/inkml+xml', + 'ipfix' => 'application/ipfix', + 'jar' => 'application/java-archive', + 'ser' => 'application/java-serialized-object', + 'class' => 'application/java-vm', + 'js' => 'application/javascript', + 'json' => 'application/json', + 'jsonml' => 'application/jsonml+json', + 'lostxml' => 'application/lost+xml', + 'hqx' => 'application/mac-binhex40', + 'cpt' => 'application/mac-compactpro', + 'mads' => 'application/mads+xml', + 'mrc' => 'application/marc', + 'mrcx' => 'application/marcxml+xml', + 'ma' => 'application/mathematica', + 'mathml' => 'application/mathml+xml', + 'mbox' => 'application/mbox', + 'mscml' => 'application/mediaservercontrol+xml', + 'metalink' => 'application/metalink+xml', + 'meta4' => 'application/metalink4+xml', + 'mets' => 'application/mets+xml', + 'mods' => 'application/mods+xml', + 'm21' => 'application/mp21', + 'mp4s' => 'application/mp4', + 'doc' => 'application/msword', + 'mxf' => 'application/mxf', + 'bin' => 'application/octet-stream', + 'oda' => 'application/oda', + 'opf' => 'application/oebps-package+xml', + 'ogx' => 'application/ogg', + 'omdoc' => 'application/omdoc+xml', + 'onetoc' => 'application/onenote', + 'oxps' => 'application/oxps', + 'xer' => 'application/patch-ops-error+xml', + 'pdf' => 'application/pdf', + 'pgp' => 'application/pgp-encrypted', + 'asc' => 'application/pgp-signature', + 'prf' => 'application/pics-rules', + 'p10' => 'application/pkcs10', + 'p7m' => 'application/pkcs7-mime', + 'p7s' => 'application/pkcs7-signature', + 'p8' => 'application/pkcs8', + 'ac' => 'application/pkix-attr-cert', + 'cer' => 'application/pkix-cert', + 'crl' => 'application/pkix-crl', + 'pkipath' => 'application/pkix-pkipath', + 'pki' => 'application/pkixcmp', + 'pls' => 'application/pls+xml', + 'ai' => 'application/postscript', + 'cww' => 'application/prs.cww', + 'pskcxml' => 'application/pskc+xml', + 'rdf' => 'application/rdf+xml', + 'rif' => 'application/reginfo+xml', + 'rnc' => 'application/relax-ng-compact-syntax', + 'rl' => 'application/resource-lists+xml', + 'rld' => 'application/resource-lists-diff+xml', + 'rs' => 'application/rls-services+xml', + 'gbr' => 'application/rpki-ghostbusters', + 'mft' => 'application/rpki-manifest', + 'roa' => 'application/rpki-roa', + 'rsd' => 'application/rsd+xml', + 'rss' => 'application/rss+xml', + 'sbml' => 'application/sbml+xml', + 'scq' => 'application/scvp-cv-request', + 'scs' => 'application/scvp-cv-response', + 'spq' => 'application/scvp-vp-request', + 'spp' => 'application/scvp-vp-response', + 'sdp' => 'application/sdp', + 'setpay' => 'application/set-payment-initiation', + 'setreg' => 'application/set-registration-initiation', + 'shf' => 'application/shf+xml', + 'smi' => 'application/smil+xml', + 'rq' => 'application/sparql-query', + 'srx' => 'application/sparql-results+xml', + 'gram' => 'application/srgs', + 'grxml' => 'application/srgs+xml', + 'sru' => 'application/sru+xml', + 'ssdl' => 'application/ssdl+xml', + 'ssml' => 'application/ssml+xml', + 'tei' => 'application/tei+xml', + 'tfi' => 'application/thraud+xml', + 'tsd' => 'application/timestamped-data', + 'plb' => 'application/vnd.3gpp.pic-bw-large', + 'psb' => 'application/vnd.3gpp.pic-bw-small', + 'pvb' => 'application/vnd.3gpp.pic-bw-var', + 'tcap' => 'application/vnd.3gpp2.tcap', + 'pwn' => 'application/vnd.3m.post-it-notes', + 'aso' => 'application/vnd.accpac.simply.aso', + 'imp' => 'application/vnd.accpac.simply.imp', + 'acu' => 'application/vnd.acucobol', + 'atc' => 'application/vnd.acucorp', + 'air' => 'application/vnd.adobe.air-application-installer-package+zip', + 'fcdt' => 'application/vnd.adobe.formscentral.fcdt', + 'fxp' => 'application/vnd.adobe.fxp', + 'xdp' => 'application/vnd.adobe.xdp+xml', + 'xfdf' => 'application/vnd.adobe.xfdf', + 'ahead' => 'application/vnd.ahead.space', + 'azf' => 'application/vnd.airzip.filesecure.azf', + 'azs' => 'application/vnd.airzip.filesecure.azs', + 'azw' => 'application/vnd.amazon.ebook', + 'acc' => 'application/vnd.americandynamics.acc', + 'ami' => 'application/vnd.amiga.ami', + 'apk' => 'application/vnd.android.package-archive', + 'cii' => 'application/vnd.anser-web-certificate-issue-initiation', + 'fti' => 'application/vnd.anser-web-funds-transfer-initiation', + 'atx' => 'application/vnd.antix.game-component', + 'mpkg' => 'application/vnd.apple.installer+xml', + 'm3u8' => 'application/vnd.apple.mpegurl', + 'swi' => 'application/vnd.aristanetworks.swi', + 'iota' => 'application/vnd.astraea-software.iota', + 'aep' => 'application/vnd.audiograph', + 'mpm' => 'application/vnd.blueice.multipass', + 'bmi' => 'application/vnd.bmi', + 'rep' => 'application/vnd.businessobjects', + 'cdxml' => 'application/vnd.chemdraw+xml', + 'mmd' => 'application/vnd.chipnuts.karaoke-mmd', + 'cdy' => 'application/vnd.cinderella', + 'cla' => 'application/vnd.claymore', + 'rp9' => 'application/vnd.cloanto.rp9', + 'c4g' => 'application/vnd.clonk.c4group', + 'c11amc' => 'application/vnd.cluetrust.cartomobile-config', + 'c11amz' => 'application/vnd.cluetrust.cartomobile-config-pkg', + 'csp' => 'application/vnd.commonspace', + 'cdbcmsg' => 'application/vnd.contact.cmsg', + 'cmc' => 'application/vnd.cosmocaller', + 'clkx' => 'application/vnd.crick.clicker', + 'clkk' => 'application/vnd.crick.clicker.keyboard', + 'clkp' => 'application/vnd.crick.clicker.palette', + 'clkt' => 'application/vnd.crick.clicker.template', + 'clkw' => 'application/vnd.crick.clicker.wordbank', + 'wbs' => 'application/vnd.criticaltools.wbs+xml', + 'pml' => 'application/vnd.ctc-posml', + 'ppd' => 'application/vnd.cups-ppd', + 'car' => 'application/vnd.curl.car', + 'pcurl' => 'application/vnd.curl.pcurl', + 'dart' => 'application/vnd.dart', + 'rdz' => 'application/vnd.data-vision.rdz', + 'uvf' => 'application/vnd.dece.data', + 'uvt' => 'application/vnd.dece.ttml+xml', + 'uvx' => 'application/vnd.dece.unspecified', + 'uvz' => 'application/vnd.dece.zip', + 'fe_launch' => 'application/vnd.denovo.fcselayout-link', + 'dna' => 'application/vnd.dna', + 'mlp' => 'application/vnd.dolby.mlp', + 'dpg' => 'application/vnd.dpgraph', + 'dfac' => 'application/vnd.dreamfactory', + 'kpxx' => 'application/vnd.ds-keypoint', + 'ait' => 'application/vnd.dvb.ait', + 'svc' => 'application/vnd.dvb.service', + 'geo' => 'application/vnd.dynageo', + 'mag' => 'application/vnd.ecowin.chart', + 'nml' => 'application/vnd.enliven', + 'esf' => 'application/vnd.epson.esf', + 'msf' => 'application/vnd.epson.msf', + 'qam' => 'application/vnd.epson.quickanime', + 'slt' => 'application/vnd.epson.salt', + 'ssf' => 'application/vnd.epson.ssf', + 'es3' => 'application/vnd.eszigno3+xml', + 'ez2' => 'application/vnd.ezpix-album', + 'ez3' => 'application/vnd.ezpix-package', + 'fdf' => 'application/vnd.fdf', + 'mseed' => 'application/vnd.fdsn.mseed', + 'seed' => 'application/vnd.fdsn.seed', + 'gph' => 'application/vnd.flographit', + 'ftc' => 'application/vnd.fluxtime.clip', + 'fm' => 'application/vnd.framemaker', + 'fnc' => 'application/vnd.frogans.fnc', + 'ltf' => 'application/vnd.frogans.ltf', + 'fsc' => 'application/vnd.fsc.weblaunch', + 'oas' => 'application/vnd.fujitsu.oasys', + 'oa2' => 'application/vnd.fujitsu.oasys2', + 'oa3' => 'application/vnd.fujitsu.oasys3', + 'fg5' => 'application/vnd.fujitsu.oasysgp', + 'bh2' => 'application/vnd.fujitsu.oasysprs', + 'ddd' => 'application/vnd.fujixerox.ddd', + 'xdw' => 'application/vnd.fujixerox.docuworks', + 'xbd' => 'application/vnd.fujixerox.docuworks.binder', + 'fzs' => 'application/vnd.fuzzysheet', + 'txd' => 'application/vnd.genomatix.tuxedo', + 'ggb' => 'application/vnd.geogebra.file', + 'ggt' => 'application/vnd.geogebra.tool', + 'gex' => 'application/vnd.geometry-explorer', + 'gxt' => 'application/vnd.geonext', + 'g2w' => 'application/vnd.geoplan', + 'g3w' => 'application/vnd.geospace', + 'gmx' => 'application/vnd.gmx', + 'kml' => 'application/vnd.google-earth.kml+xml', + 'kmz' => 'application/vnd.google-earth.kmz', + 'gqf' => 'application/vnd.grafeq', + 'gac' => 'application/vnd.groove-account', + 'ghf' => 'application/vnd.groove-help', + 'gim' => 'application/vnd.groove-identity-message', + 'grv' => 'application/vnd.groove-injector', + 'gtm' => 'application/vnd.groove-tool-message', + 'tpl' => 'application/vnd.groove-tool-template', + 'vcg' => 'application/vnd.groove-vcard', + 'hal' => 'application/vnd.hal+xml', + 'zmm' => 'application/vnd.handheld-entertainment+xml', + 'hbci' => 'application/vnd.hbci', + 'les' => 'application/vnd.hhe.lesson-player', + 'hpgl' => 'application/vnd.hp-hpgl', + 'hpid' => 'application/vnd.hp-hpid', + 'hps' => 'application/vnd.hp-hps', + 'jlt' => 'application/vnd.hp-jlyt', + 'pcl' => 'application/vnd.hp-pcl', + 'pclxl' => 'application/vnd.hp-pclxl', + 'sfd-hdstx' => 'application/vnd.hydrostatix.sof-data', + 'mpy' => 'application/vnd.ibm.minipay', + 'afp' => 'application/vnd.ibm.modcap', + 'irm' => 'application/vnd.ibm.rights-management', + 'sc' => 'application/vnd.ibm.secure-container', + 'icc' => 'application/vnd.iccprofile', + 'igl' => 'application/vnd.igloader', + 'ivp' => 'application/vnd.immervision-ivp', + 'ivu' => 'application/vnd.immervision-ivu', + 'igm' => 'application/vnd.insors.igm', + 'xpw' => 'application/vnd.intercon.formnet', + 'i2g' => 'application/vnd.intergeo', + 'qbo' => 'application/vnd.intu.qbo', + 'qfx' => 'application/vnd.intu.qfx', + 'rcprofile' => 'application/vnd.ipunplugged.rcprofile', + 'irp' => 'application/vnd.irepository.package+xml', + 'xpr' => 'application/vnd.is-xpr', + 'fcs' => 'application/vnd.isac.fcs', + 'jam' => 'application/vnd.jam', + 'rms' => 'application/vnd.jcp.javame.midlet-rms', + 'jisp' => 'application/vnd.jisp', + 'joda' => 'application/vnd.joost.joda-archive', + 'ktz' => 'application/vnd.kahootz', + 'karbon' => 'application/vnd.kde.karbon', + 'chrt' => 'application/vnd.kde.kchart', + 'kfo' => 'application/vnd.kde.kformula', + 'flw' => 'application/vnd.kde.kivio', + 'kon' => 'application/vnd.kde.kontour', + 'kpr' => 'application/vnd.kde.kpresenter', + 'ksp' => 'application/vnd.kde.kspread', + 'kwd' => 'application/vnd.kde.kword', + 'htke' => 'application/vnd.kenameaapp', + 'kia' => 'application/vnd.kidspiration', + 'kne' => 'application/vnd.kinar', + 'skp' => 'application/vnd.koan', + 'sse' => 'application/vnd.kodak-descriptor', + 'lasxml' => 'application/vnd.las.las+xml', + 'lbd' => 'application/vnd.llamagraphics.life-balance.desktop', + 'lbe' => 'application/vnd.llamagraphics.life-balance.exchange+xml', + '123' => 'application/vnd.lotus-1-2-3', + 'apr' => 'application/vnd.lotus-approach', + 'pre' => 'application/vnd.lotus-freelance', + 'nsf' => 'application/vnd.lotus-notes', + 'org' => 'application/vnd.lotus-organizer', + 'scm' => 'application/vnd.lotus-screencam', + 'lwp' => 'application/vnd.lotus-wordpro', + 'portpkg' => 'application/vnd.macports.portpkg', + 'mcd' => 'application/vnd.mcd', + 'mc1' => 'application/vnd.medcalcdata', + 'cdkey' => 'application/vnd.mediastation.cdkey', + 'mwf' => 'application/vnd.mfer', + 'mfm' => 'application/vnd.mfmp', + 'flo' => 'application/vnd.micrografx.flo', + 'igx' => 'application/vnd.micrografx.igx', + 'mif' => 'application/vnd.mif', + 'daf' => 'application/vnd.mobius.daf', + 'dis' => 'application/vnd.mobius.dis', + 'mbk' => 'application/vnd.mobius.mbk', + 'mqy' => 'application/vnd.mobius.mqy', + 'msl' => 'application/vnd.mobius.msl', + 'plc' => 'application/vnd.mobius.plc', + 'txf' => 'application/vnd.mobius.txf', + 'mpn' => 'application/vnd.mophun.application', + 'mpc' => 'application/vnd.mophun.certificate', + 'xul' => 'application/vnd.mozilla.xul+xml', + 'cil' => 'application/vnd.ms-artgalry', + 'cab' => 'application/vnd.ms-cab-compressed', + 'xls' => 'application/vnd.ms-excel', + 'xlam' => 'application/vnd.ms-excel.addin.macroenabled.12', + 'xlsb' => 'application/vnd.ms-excel.sheet.binary.macroenabled.12', + 'xlsm' => 'application/vnd.ms-excel.sheet.macroenabled.12', + 'xltm' => 'application/vnd.ms-excel.template.macroenabled.12', + 'eot' => 'application/vnd.ms-fontobject', + 'chm' => 'application/vnd.ms-htmlhelp', + 'ims' => 'application/vnd.ms-ims', + 'lrm' => 'application/vnd.ms-lrm', + 'thmx' => 'application/vnd.ms-officetheme', + 'cat' => 'application/vnd.ms-pki.seccat', + 'stl' => 'application/vnd.ms-pki.stl', + 'ppt' => 'application/vnd.ms-powerpoint', + 'ppam' => 'application/vnd.ms-powerpoint.addin.macroenabled.12', + 'pptm' => 'application/vnd.ms-powerpoint.presentation.macroenabled.12', + 'sldm' => 'application/vnd.ms-powerpoint.slide.macroenabled.12', + 'ppsm' => 'application/vnd.ms-powerpoint.slideshow.macroenabled.12', + 'potm' => 'application/vnd.ms-powerpoint.template.macroenabled.12', + 'mpp' => 'application/vnd.ms-project', + 'docm' => 'application/vnd.ms-word.document.macroenabled.12', + 'dotm' => 'application/vnd.ms-word.template.macroenabled.12', + 'wps' => 'application/vnd.ms-works', + 'wpl' => 'application/vnd.ms-wpl', + 'xps' => 'application/vnd.ms-xpsdocument', + 'mseq' => 'application/vnd.mseq', + 'mus' => 'application/vnd.musician', + 'msty' => 'application/vnd.muvee.style', + 'taglet' => 'application/vnd.mynfc', + 'nlu' => 'application/vnd.neurolanguage.nlu', + 'ntf' => 'application/vnd.nitf', + 'nnd' => 'application/vnd.noblenet-directory', + 'nns' => 'application/vnd.noblenet-sealer', + 'nnw' => 'application/vnd.noblenet-web', + 'ngdat' => 'application/vnd.nokia.n-gage.data', + 'n-gage' => 'application/vnd.nokia.n-gage.symbian.install', + 'rpst' => 'application/vnd.nokia.radio-preset', + 'rpss' => 'application/vnd.nokia.radio-presets', + 'edm' => 'application/vnd.novadigm.edm', + 'edx' => 'application/vnd.novadigm.edx', + 'ext' => 'application/vnd.novadigm.ext', + 'odc' => 'application/vnd.oasis.opendocument.chart', + 'otc' => 'application/vnd.oasis.opendocument.chart-template', + 'odb' => 'application/vnd.oasis.opendocument.database', + 'odf' => 'application/vnd.oasis.opendocument.formula', + 'odft' => 'application/vnd.oasis.opendocument.formula-template', + 'odg' => 'application/vnd.oasis.opendocument.graphics', + 'otg' => 'application/vnd.oasis.opendocument.graphics-template', + 'odi' => 'application/vnd.oasis.opendocument.image', + 'oti' => 'application/vnd.oasis.opendocument.image-template', + 'odp' => 'application/vnd.oasis.opendocument.presentation', + 'otp' => 'application/vnd.oasis.opendocument.presentation-template', + 'ods' => 'application/vnd.oasis.opendocument.spreadsheet', + 'ots' => 'application/vnd.oasis.opendocument.spreadsheet-template', + 'odt' => 'application/vnd.oasis.opendocument.text', + 'odm' => 'application/vnd.oasis.opendocument.text-master', + 'ott' => 'application/vnd.oasis.opendocument.text-template', + 'oth' => 'application/vnd.oasis.opendocument.text-web', + 'xo' => 'application/vnd.olpc-sugar', + 'dd2' => 'application/vnd.oma.dd2+xml', + 'oxt' => 'application/vnd.openofficeorg.extension', + 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation', + 'sldx' => 'application/vnd.openxmlformats-officedocument.presentationml.slide', + 'ppsx' => 'application/vnd.openxmlformats-officedocument.presentationml.slideshow', + 'potx' => 'application/vnd.openxmlformats-officedocument.presentationml.template', + 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', + 'xltx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.template', + 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', + 'dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.template', + 'mgp' => 'application/vnd.osgeo.mapguide.package', + 'dp' => 'application/vnd.osgi.dp', + 'esa' => 'application/vnd.osgi.subsystem', + 'pdb' => 'application/vnd.palm', + 'paw' => 'application/vnd.pawaafile', + 'str' => 'application/vnd.pg.format', + 'ei6' => 'application/vnd.pg.osasli', + 'efif' => 'application/vnd.picsel', + 'wg' => 'application/vnd.pmi.widget', + 'plf' => 'application/vnd.pocketlearn', + 'pbd' => 'application/vnd.powerbuilder6', + 'box' => 'application/vnd.previewsystems.box', + 'mgz' => 'application/vnd.proteus.magazine', + 'qps' => 'application/vnd.publishare-delta-tree', + 'ptid' => 'application/vnd.pvi.ptid1', + 'qxd' => 'application/vnd.quark.quarkxpress', + 'bed' => 'application/vnd.realvnc.bed', + 'mxl' => 'application/vnd.recordare.musicxml', + 'musicxml' => 'application/vnd.recordare.musicxml+xml', + 'cryptonote' => 'application/vnd.rig.cryptonote', + 'cod' => 'application/vnd.rim.cod', + 'rm' => 'application/vnd.rn-realmedia', + 'rmvb' => 'application/vnd.rn-realmedia-vbr', + 'link66' => 'application/vnd.route66.link66+xml', + 'st' => 'application/vnd.sailingtracker.track', + 'see' => 'application/vnd.seemail', + 'sema' => 'application/vnd.sema', + 'semd' => 'application/vnd.semd', + 'semf' => 'application/vnd.semf', + 'ifm' => 'application/vnd.shana.informed.formdata', + 'itp' => 'application/vnd.shana.informed.formtemplate', + 'iif' => 'application/vnd.shana.informed.interchange', + 'ipk' => 'application/vnd.shana.informed.package', + 'twd' => 'application/vnd.simtech-mindmapper', + 'mmf' => 'application/vnd.smaf', + 'teacher' => 'application/vnd.smart.teacher', + 'sdkm' => 'application/vnd.solent.sdkm+xml', + 'dxp' => 'application/vnd.spotfire.dxp', + 'sfs' => 'application/vnd.spotfire.sfs', + 'sdc' => 'application/vnd.stardivision.calc', + 'sda' => 'application/vnd.stardivision.draw', + 'sdd' => 'application/vnd.stardivision.impress', + 'smf' => 'application/vnd.stardivision.math', + 'sdw' => 'application/vnd.stardivision.writer', + 'sgl' => 'application/vnd.stardivision.writer-global', + 'smzip' => 'application/vnd.stepmania.package', + 'sm' => 'application/vnd.stepmania.stepchart', + 'sxc' => 'application/vnd.sun.xml.calc', + 'stc' => 'application/vnd.sun.xml.calc.template', + 'sxd' => 'application/vnd.sun.xml.draw', + 'std' => 'application/vnd.sun.xml.draw.template', + 'sxi' => 'application/vnd.sun.xml.impress', + 'sti' => 'application/vnd.sun.xml.impress.template', + 'sxm' => 'application/vnd.sun.xml.math', + 'sxw' => 'application/vnd.sun.xml.writer', + 'sxg' => 'application/vnd.sun.xml.writer.global', + 'stw' => 'application/vnd.sun.xml.writer.template', + 'sus' => 'application/vnd.sus-calendar', + 'svd' => 'application/vnd.svd', + 'sis' => 'application/vnd.symbian.install', + 'xsm' => 'application/vnd.syncml+xml', + 'bdm' => 'application/vnd.syncml.dm+wbxml', + 'xdm' => 'application/vnd.syncml.dm+xml', + 'tao' => 'application/vnd.tao.intent-module-archive', + 'pcap' => 'application/vnd.tcpdump.pcap', + 'tmo' => 'application/vnd.tmobile-livetv', + 'tpt' => 'application/vnd.trid.tpt', + 'mxs' => 'application/vnd.triscape.mxs', + 'tra' => 'application/vnd.trueapp', + 'ufd' => 'application/vnd.ufdl', + 'utz' => 'application/vnd.uiq.theme', + 'umj' => 'application/vnd.umajin', + 'unityweb' => 'application/vnd.unity', + 'uoml' => 'application/vnd.uoml+xml', + 'vcx' => 'application/vnd.vcx', + 'vsd' => 'application/vnd.visio', + 'vis' => 'application/vnd.visionary', + 'vsf' => 'application/vnd.vsf', + 'wbxml' => 'application/vnd.wap.wbxml', + 'wmlc' => 'application/vnd.wap.wmlc', + 'wmlsc' => 'application/vnd.wap.wmlscriptc', + 'wtb' => 'application/vnd.webturbo', + 'nbp' => 'application/vnd.wolfram.player', + 'wpd' => 'application/vnd.wordperfect', + 'wqd' => 'application/vnd.wqd', + 'stf' => 'application/vnd.wt.stf', + 'xar' => 'application/vnd.xara', + 'xfdl' => 'application/vnd.xfdl', + 'hvd' => 'application/vnd.yamaha.hv-dic', + 'hvs' => 'application/vnd.yamaha.hv-script', + 'hvp' => 'application/vnd.yamaha.hv-voice', + 'osf' => 'application/vnd.yamaha.openscoreformat', + 'osfpvg' => 'application/vnd.yamaha.openscoreformat.osfpvg+xml', + 'saf' => 'application/vnd.yamaha.smaf-audio', + 'spf' => 'application/vnd.yamaha.smaf-phrase', + 'cmp' => 'application/vnd.yellowriver-custom-menu', + 'zir' => 'application/vnd.zul', + 'zaz' => 'application/vnd.zzazz.deck+xml', + 'vxml' => 'application/voicexml+xml', + 'wgt' => 'application/widget', + 'hlp' => 'application/winhlp', + 'wsdl' => 'application/wsdl+xml', + 'wspolicy' => 'application/wspolicy+xml', + '7z' => 'application/x-7z-compressed', + 'abw' => 'application/x-abiword', + 'ace' => 'application/x-ace-compressed', + 'dmg' => 'application/x-apple-diskimage', + 'aab' => 'application/x-authorware-bin', + 'aam' => 'application/x-authorware-map', + 'aas' => 'application/x-authorware-seg', + 'bcpio' => 'application/x-bcpio', + 'torrent' => 'application/x-bittorrent', + 'blb' => 'application/x-blorb', + 'bz' => 'application/x-bzip', + 'bz2' => 'application/x-bzip2', + 'cbr' => 'application/x-cbr', + 'vcd' => 'application/x-cdlink', + 'cfs' => 'application/x-cfs-compressed', + 'chat' => 'application/x-chat', + 'pgn' => 'application/x-chess-pgn', + 'nsc' => 'application/x-conference', + 'cpio' => 'application/x-cpio', + 'csh' => 'application/x-csh', + 'deb' => 'application/x-debian-package', + 'dgc' => 'application/x-dgc-compressed', + 'dir' => 'application/x-director', + 'wad' => 'application/x-doom', + 'ncx' => 'application/x-dtbncx+xml', + 'dtb' => 'application/x-dtbook+xml', + 'res' => 'application/x-dtbresource+xml', + 'dvi' => 'application/x-dvi', + 'evy' => 'application/x-envoy', + 'eva' => 'application/x-eva', + 'bdf' => 'application/x-font-bdf', + 'gsf' => 'application/x-font-ghostscript', + 'psf' => 'application/x-font-linux-psf', + 'otf' => 'application/x-font-otf', + 'pcf' => 'application/x-font-pcf', + 'snf' => 'application/x-font-snf', + 'ttf' => 'application/x-font-ttf', + 'pfa' => 'application/x-font-type1', + 'woff' => 'application/x-font-woff', + 'arc' => 'application/x-freearc', + 'spl' => 'application/x-futuresplash', + 'gca' => 'application/x-gca-compressed', + 'ulx' => 'application/x-glulx', + 'gnumeric' => 'application/x-gnumeric', + 'gramps' => 'application/x-gramps-xml', + 'gtar' => 'application/x-gtar', + 'hdf' => 'application/x-hdf', + 'install' => 'application/x-install-instructions', + 'iso' => 'application/x-iso9660-image', + 'jnlp' => 'application/x-java-jnlp-file', + 'latex' => 'application/x-latex', + 'lzh' => 'application/x-lzh-compressed', + 'mie' => 'application/x-mie', + 'prc' => 'application/x-mobipocket-ebook', + 'application' => 'application/x-ms-application', + 'lnk' => 'application/x-ms-shortcut', + 'wmd' => 'application/x-ms-wmd', + 'wmz' => 'application/x-ms-wmz', + 'xbap' => 'application/x-ms-xbap', + 'mdb' => 'application/x-msaccess', + 'obd' => 'application/x-msbinder', + 'crd' => 'application/x-mscardfile', + 'clp' => 'application/x-msclip', + 'exe' => 'application/x-msdownload', + 'mvb' => 'application/x-msmediaview', + 'wmf' => 'application/x-msmetafile', + 'mny' => 'application/x-msmoney', + 'pub' => 'application/x-mspublisher', + 'scd' => 'application/x-msschedule', + 'trm' => 'application/x-msterminal', + 'wri' => 'application/x-mswrite', + 'nc' => 'application/x-netcdf', + 'nzb' => 'application/x-nzb', + 'p12' => 'application/x-pkcs12', + 'p7b' => 'application/x-pkcs7-certificates', + 'p7r' => 'application/x-pkcs7-certreqresp', + 'rar' => 'application/x-rar', + 'ris' => 'application/x-research-info-systems', + 'sh' => 'application/x-sh', + 'shar' => 'application/x-shar', + 'swf' => 'application/x-shockwave-flash', + 'xap' => 'application/x-silverlight-app', + 'sql' => 'application/x-sql', + 'sit' => 'application/x-stuffit', + 'sitx' => 'application/x-stuffitx', + 'srt' => 'application/x-subrip', + 'sv4cpio' => 'application/x-sv4cpio', + 'sv4crc' => 'application/x-sv4crc', + 't3' => 'application/x-t3vm-image', + 'gam' => 'application/x-tads', + 'tar' => 'application/x-tar', + 'tcl' => 'application/x-tcl', + 'tex' => 'application/x-tex', + 'tfm' => 'application/x-tex-tfm', + 'texinfo' => 'application/x-texinfo', + 'obj' => 'application/x-tgif', + 'ustar' => 'application/x-ustar', + 'src' => 'application/x-wais-source', + 'der' => 'application/x-x509-ca-cert', + 'fig' => 'application/x-xfig', + 'xlf' => 'application/x-xliff+xml', + 'xpi' => 'application/x-xpinstall', + 'xz' => 'application/x-xz', + 'z1' => 'application/x-zmachine', + 'xaml' => 'application/xaml+xml', + 'xdf' => 'application/xcap-diff+xml', + 'xenc' => 'application/xenc+xml', + 'xhtml' => 'application/xhtml+xml', + 'xml' => 'application/xml', + 'dtd' => 'application/xml-dtd', + 'xop' => 'application/xop+xml', + 'xpl' => 'application/xproc+xml', + 'xslt' => 'application/xslt+xml', + 'xspf' => 'application/xspf+xml', + 'mxml' => 'application/xv+xml', + 'yang' => 'application/yang', + 'yin' => 'application/yin+xml', + 'zip' => 'application/zip', + 'adp' => 'audio/adpcm', + 'au' => 'audio/basic', + 'mid' => 'audio/midi', + 'mp4a' => 'audio/mp4', + 'mpga' => 'audio/mpeg', + 'oga' => 'audio/ogg', + 's3m' => 'audio/s3m', + 'sil' => 'audio/silk', + 'uva' => 'audio/vnd.dece.audio', + 'eol' => 'audio/vnd.digital-winds', + 'dra' => 'audio/vnd.dra', + 'dts' => 'audio/vnd.dts', + 'dtshd' => 'audio/vnd.dts.hd', + 'lvp' => 'audio/vnd.lucent.voice', + 'pya' => 'audio/vnd.ms-playready.media.pya', + 'ecelp4800' => 'audio/vnd.nuera.ecelp4800', + 'ecelp7470' => 'audio/vnd.nuera.ecelp7470', + 'ecelp9600' => 'audio/vnd.nuera.ecelp9600', + 'rip' => 'audio/vnd.rip', + 'weba' => 'audio/webm', + 'aac' => 'audio/x-aac', + 'aif' => 'audio/x-aiff', + 'caf' => 'audio/x-caf', + 'flac' => 'audio/x-flac', + 'mka' => 'audio/x-matroska', + 'm3u' => 'audio/x-mpegurl', + 'wax' => 'audio/x-ms-wax', + 'wma' => 'audio/x-ms-wma', + 'ram' => 'audio/x-pn-realaudio', + 'rmp' => 'audio/x-pn-realaudio-plugin', + 'wav' => 'audio/x-wav', + 'xm' => 'audio/xm', + 'cdx' => 'chemical/x-cdx', + 'cif' => 'chemical/x-cif', + 'cmdf' => 'chemical/x-cmdf', + 'cml' => 'chemical/x-cml', + 'csml' => 'chemical/x-csml', + 'xyz' => 'chemical/x-xyz', + 'bmp' => 'image/bmp', + 'cgm' => 'image/cgm', + 'g3' => 'image/g3fax', + 'gif' => 'image/gif', + 'ief' => 'image/ief', + 'jpg' => 'image/jpeg', + 'jpeg' => 'image/jpeg', + 'ktx' => 'image/ktx', + 'png' => 'image/png', + 'btif' => 'image/prs.btif', + 'sgi' => 'image/sgi', + 'svg' => 'image/svg+xml', + 'tiff' => 'image/tiff', + 'psd' => 'image/vnd.adobe.photoshop', + 'uvi' => 'image/vnd.dece.graphic', + 'djvu' => 'image/vnd.djvu', + 'dwg' => 'image/vnd.dwg', + 'dxf' => 'image/vnd.dxf', + 'fbs' => 'image/vnd.fastbidsheet', + 'fpx' => 'image/vnd.fpx', + 'fst' => 'image/vnd.fst', + 'mmr' => 'image/vnd.fujixerox.edmics-mmr', + 'rlc' => 'image/vnd.fujixerox.edmics-rlc', + 'mdi' => 'image/vnd.ms-modi', + 'wdp' => 'image/vnd.ms-photo', + 'npx' => 'image/vnd.net-fpx', + 'wbmp' => 'image/vnd.wap.wbmp', + 'xif' => 'image/vnd.xiff', + 'webp' => 'image/webp', + '3ds' => 'image/x-3ds', + 'ras' => 'image/x-cmu-raster', + 'cmx' => 'image/x-cmx', + 'fh' => 'image/x-freehand', + 'ico' => 'image/x-icon', + 'sid' => 'image/x-mrsid-image', + 'pcx' => 'image/x-pcx', + 'pic' => 'image/x-pict', + 'pnm' => 'image/x-portable-anymap', + 'pbm' => 'image/x-portable-bitmap', + 'pgm' => 'image/x-portable-graymap', + 'ppm' => 'image/x-portable-pixmap', + 'rgb' => 'image/x-rgb', + 'tga' => 'image/x-tga', + 'xbm' => 'image/x-xbitmap', + 'xpm' => 'image/x-xpixmap', + 'xwd' => 'image/x-xwindowdump', + 'eml' => 'message/rfc822', + 'igs' => 'model/iges', + 'msh' => 'model/mesh', + 'dae' => 'model/vnd.collada+xml', + 'dwf' => 'model/vnd.dwf', + 'gdl' => 'model/vnd.gdl', + 'gtw' => 'model/vnd.gtw', + 'mts' => 'model/vnd.mts', + 'vtu' => 'model/vnd.vtu', + 'wrl' => 'model/vrml', + 'x3db' => 'model/x3d+binary', + 'x3dv' => 'model/x3d+vrml', + 'x3d' => 'model/x3d+xml', + 'appcache' => 'text/cache-manifest', + 'ics' => 'text/calendar', + 'css' => 'text/css', + 'csv' => 'text/csv', + 'html' => 'text/html', + 'n3' => 'text/n3', + 'txt' => 'text/plain', + 'dsc' => 'text/prs.lines.tag', + 'rtx' => 'text/richtext', + 'rtf' => 'text/rtf', + 'sgml' => 'text/sgml', + 'tsv' => 'text/tab-separated-values', + 't' => 'text/troff', + 'ttl' => 'text/turtle', + 'uri' => 'text/uri-list', + 'vcard' => 'text/vcard', + 'curl' => 'text/vnd.curl', + 'dcurl' => 'text/vnd.curl.dcurl', + 'scurl' => 'text/vnd.curl.scurl', + 'mcurl' => 'text/vnd.curl.mcurl', + 'sub' => 'text/vnd.dvb.subtitle', + 'fly' => 'text/vnd.fly', + 'flx' => 'text/vnd.fmi.flexstor', + 'gv' => 'text/vnd.graphviz', + '3dml' => 'text/vnd.in3d.3dml', + 'spot' => 'text/vnd.in3d.spot', + 'jad' => 'text/vnd.sun.j2me.app-descriptor', + 'wml' => 'text/vnd.wap.wml', + 'wmls' => 'text/vnd.wap.wmlscript', + 's' => 'text/x-asm', + 'c' => 'text/x-c', + 'f' => 'text/x-fortran', + 'p' => 'text/x-pascal', + 'java' => 'text/x-java-source', + 'opml' => 'text/x-opml', + 'nfo' => 'text/x-nfo', + 'etx' => 'text/x-setext', + 'sfv' => 'text/x-sfv', + 'uu' => 'text/x-uuencode', + 'vcs' => 'text/x-vcalendar', + 'vcf' => 'text/x-vcard', + '3gp' => 'video/3gpp', + '3g2' => 'video/3gpp2', + 'h261' => 'video/h261', + 'h263' => 'video/h263', + 'h264' => 'video/h264', + 'jpgv' => 'video/jpeg', + 'jpm' => 'video/jpm', + 'mj2' => 'video/mj2', + 'mp4' => 'video/mp4', + 'mpeg' => 'video/mpeg', + 'ogv' => 'video/ogg', + 'qt' => 'video/quicktime', + 'uvh' => 'video/vnd.dece.hd', + 'uvm' => 'video/vnd.dece.mobile', + 'uvp' => 'video/vnd.dece.pd', + 'uvs' => 'video/vnd.dece.sd', + 'uvv' => 'video/vnd.dece.video', + 'dvb' => 'video/vnd.dvb.file', + 'fvt' => 'video/vnd.fvt', + 'mxu' => 'video/vnd.mpegurl', + 'pyv' => 'video/vnd.ms-playready.media.pyv', + 'uvu' => 'video/vnd.uvvu.mp4', + 'viv' => 'video/vnd.vivo', + 'webm' => 'video/webm', + 'f4v' => 'video/x-f4v', + 'fli' => 'video/x-fli', + 'flv' => 'video/x-flv', + 'm4v' => 'video/x-m4v', + 'mkv' => 'video/x-matroska', + 'mng' => 'video/x-mng', + 'asf' => 'video/x-ms-asf', + 'vob' => 'video/x-ms-vob', + 'wm' => 'video/x-ms-wm', + 'wmv' => 'video/x-ms-wmv', + 'wmx' => 'video/x-ms-wmx', + 'wvx' => 'video/x-ms-wvx', + 'avi' => 'video/x-msvideo', + 'movie' => 'video/x-sgi-movie', + 'smv' => 'video/x-smv', + 'ice' => 'x-conference/x-cooltalk', + ]; + + /** + * Get the MIME type for a file based on the file's extension. + * + * @param string $filename + * @return string + */ + public static function from($filename) + { + $extension = pathinfo($filename, PATHINFO_EXTENSION); + + return collect(self::$mimes)->get($extension, 'application/octet-stream'); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Http/UploadedFile.php b/vendor/laravel/framework/src/Illuminate/Http/UploadedFile.php new file mode 100644 index 0000000..f07e326 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Http/UploadedFile.php @@ -0,0 +1,122 @@ +storeAs($path, $this->hashName(), $this->parseOptions($options)); + } + + /** + * Store the uploaded file on a filesystem disk with public visibility. + * + * @param string $path + * @param array $options + * @return string|false + */ + public function storePublicly($path, $options = []) + { + $options = $this->parseOptions($options); + + $options['visibility'] = 'public'; + + return $this->storeAs($path, $this->hashName(), $options); + } + + /** + * Store the uploaded file on a filesystem disk with public visibility. + * + * @param string $path + * @param string $name + * @param array $options + * @return string|false + */ + public function storePubliclyAs($path, $name, $options = []) + { + $options = $this->parseOptions($options); + + $options['visibility'] = 'public'; + + return $this->storeAs($path, $name, $options); + } + + /** + * Store the uploaded file on a filesystem disk. + * + * @param string $path + * @param string $name + * @param array $options + * @return string|false + */ + public function storeAs($path, $name, $options = []) + { + $options = $this->parseOptions($options); + + $disk = Arr::pull($options, 'disk'); + + return Container::getInstance()->make(FilesystemFactory::class)->disk($disk)->putFileAs( + $path, $this, $name, $options + ); + } + + /** + * Create a new file instance from a base instance. + * + * @param \Symfony\Component\HttpFoundation\File\UploadedFile $file + * @param bool $test + * @return static + */ + public static function createFromBase(SymfonyUploadedFile $file, $test = false) + { + return $file instanceof static ? $file : new static( + $file->getPathname(), + $file->getClientOriginalName(), + $file->getClientMimeType(), + $file->getClientSize(), + $file->getError(), + $test + ); + } + + /** + * Parse and format the given options. + * + * @param array|string $options + * @return array + */ + protected function parseOptions($options) + { + if (is_string($options)) { + $options = ['disk' => $options]; + } + + return $options; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Http/composer.json b/vendor/laravel/framework/src/Illuminate/Http/composer.json new file mode 100755 index 0000000..14bf748 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Http/composer.json @@ -0,0 +1,37 @@ +{ + "name": "illuminate/http", + "description": "The Illuminate Http package.", + "license": "MIT", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "require": { + "php": ">=5.6.4", + "illuminate/session": "5.4.*", + "illuminate/support": "5.4.*", + "symfony/http-foundation": "~3.2", + "symfony/http-kernel": "~3.2" + }, + "autoload": { + "psr-4": { + "Illuminate\\Http\\": "" + } + }, + "extra": { + "branch-alias": { + "dev-master": "5.4-dev" + } + }, + "config": { + "sort-packages": true + }, + "minimum-stability": "dev" +} diff --git a/vendor/laravel/framework/src/Illuminate/Log/Events/MessageLogged.php b/vendor/laravel/framework/src/Illuminate/Log/Events/MessageLogged.php new file mode 100644 index 0000000..312b343 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Log/Events/MessageLogged.php @@ -0,0 +1,42 @@ +level = $level; + $this->message = $message; + $this->context = $context; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Log/LogServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Log/LogServiceProvider.php new file mode 100644 index 0000000..a927dbf --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Log/LogServiceProvider.php @@ -0,0 +1,154 @@ +app->singleton('log', function () { + return $this->createLogger(); + }); + } + + /** + * Create the logger. + * + * @return \Illuminate\Log\Writer + */ + public function createLogger() + { + $log = new Writer( + new Monolog($this->channel()), $this->app['events'] + ); + + if ($this->app->hasMonologConfigurator()) { + call_user_func($this->app->getMonologConfigurator(), $log->getMonolog()); + } else { + $this->configureHandler($log); + } + + return $log; + } + + /** + * Get the name of the log "channel". + * + * @return string + */ + protected function channel() + { + return $this->app->bound('env') ? $this->app->environment() : 'production'; + } + + /** + * Configure the Monolog handlers for the application. + * + * @param \Illuminate\Log\Writer $log + * @return void + */ + protected function configureHandler(Writer $log) + { + $this->{'configure'.ucfirst($this->handler()).'Handler'}($log); + } + + /** + * Configure the Monolog handlers for the application. + * + * @param \Illuminate\Log\Writer $log + * @return void + */ + protected function configureSingleHandler(Writer $log) + { + $log->useFiles( + $this->app->storagePath().'/logs/laravel.log', + $this->logLevel() + ); + } + + /** + * Configure the Monolog handlers for the application. + * + * @param \Illuminate\Log\Writer $log + * @return void + */ + protected function configureDailyHandler(Writer $log) + { + $log->useDailyFiles( + $this->app->storagePath().'/logs/laravel.log', $this->maxFiles(), + $this->logLevel() + ); + } + + /** + * Configure the Monolog handlers for the application. + * + * @param \Illuminate\Log\Writer $log + * @return void + */ + protected function configureSyslogHandler(Writer $log) + { + $log->useSyslog('laravel', $this->logLevel()); + } + + /** + * Configure the Monolog handlers for the application. + * + * @param \Illuminate\Log\Writer $log + * @return void + */ + protected function configureErrorlogHandler(Writer $log) + { + $log->useErrorLog($this->logLevel()); + } + + /** + * Get the default log handler. + * + * @return string + */ + protected function handler() + { + if ($this->app->bound('config')) { + return $this->app->make('config')->get('app.log', 'single'); + } + + return 'single'; + } + + /** + * Get the log level for the application. + * + * @return string + */ + protected function logLevel() + { + if ($this->app->bound('config')) { + return $this->app->make('config')->get('app.log_level', 'debug'); + } + + return 'debug'; + } + + /** + * Get the maximum number of log files for the application. + * + * @return int + */ + protected function maxFiles() + { + if ($this->app->bound('config')) { + return $this->app->make('config')->get('app.log_max_files', 5); + } + + return 0; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Log/Writer.php b/vendor/laravel/framework/src/Illuminate/Log/Writer.php new file mode 100755 index 0000000..94b3e2d --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Log/Writer.php @@ -0,0 +1,377 @@ + MonologLogger::DEBUG, + 'info' => MonologLogger::INFO, + 'notice' => MonologLogger::NOTICE, + 'warning' => MonologLogger::WARNING, + 'error' => MonologLogger::ERROR, + 'critical' => MonologLogger::CRITICAL, + 'alert' => MonologLogger::ALERT, + 'emergency' => MonologLogger::EMERGENCY, + ]; + + /** + * Create a new log writer instance. + * + * @param \Monolog\Logger $monolog + * @param \Illuminate\Contracts\Events\Dispatcher $dispatcher + * @return void + */ + public function __construct(MonologLogger $monolog, Dispatcher $dispatcher = null) + { + $this->monolog = $monolog; + + if (isset($dispatcher)) { + $this->dispatcher = $dispatcher; + } + } + + /** + * Log an emergency message to the logs. + * + * @param string $message + * @param array $context + * @return void + */ + public function emergency($message, array $context = []) + { + $this->writeLog(__FUNCTION__, $message, $context); + } + + /** + * Log an alert message to the logs. + * + * @param string $message + * @param array $context + * @return void + */ + public function alert($message, array $context = []) + { + $this->writeLog(__FUNCTION__, $message, $context); + } + + /** + * Log a critical message to the logs. + * + * @param string $message + * @param array $context + * @return void + */ + public function critical($message, array $context = []) + { + $this->writeLog(__FUNCTION__, $message, $context); + } + + /** + * Log an error message to the logs. + * + * @param string $message + * @param array $context + * @return void + */ + public function error($message, array $context = []) + { + $this->writeLog(__FUNCTION__, $message, $context); + } + + /** + * Log a warning message to the logs. + * + * @param string $message + * @param array $context + * @return void + */ + public function warning($message, array $context = []) + { + $this->writeLog(__FUNCTION__, $message, $context); + } + + /** + * Log a notice to the logs. + * + * @param string $message + * @param array $context + * @return void + */ + public function notice($message, array $context = []) + { + $this->writeLog(__FUNCTION__, $message, $context); + } + + /** + * Log an informational message to the logs. + * + * @param string $message + * @param array $context + * @return void + */ + public function info($message, array $context = []) + { + $this->writeLog(__FUNCTION__, $message, $context); + } + + /** + * Log a debug message to the logs. + * + * @param string $message + * @param array $context + * @return void + */ + public function debug($message, array $context = []) + { + $this->writeLog(__FUNCTION__, $message, $context); + } + + /** + * Log a message to the logs. + * + * @param string $level + * @param string $message + * @param array $context + * @return void + */ + public function log($level, $message, array $context = []) + { + $this->writeLog($level, $message, $context); + } + + /** + * Dynamically pass log calls into the writer. + * + * @param string $level + * @param string $message + * @param array $context + * @return void + */ + public function write($level, $message, array $context = []) + { + $this->writeLog($level, $message, $context); + } + + /** + * Write a message to Monolog. + * + * @param string $level + * @param string $message + * @param array $context + * @return void + */ + protected function writeLog($level, $message, $context) + { + $this->fireLogEvent($level, $message = $this->formatMessage($message), $context); + + $this->monolog->{$level}($message, $context); + } + + /** + * Register a file log handler. + * + * @param string $path + * @param string $level + * @return void + */ + public function useFiles($path, $level = 'debug') + { + $this->monolog->pushHandler($handler = new StreamHandler($path, $this->parseLevel($level))); + + $handler->setFormatter($this->getDefaultFormatter()); + } + + /** + * Register a daily file log handler. + * + * @param string $path + * @param int $days + * @param string $level + * @return void + */ + public function useDailyFiles($path, $days = 0, $level = 'debug') + { + $this->monolog->pushHandler( + $handler = new RotatingFileHandler($path, $days, $this->parseLevel($level)) + ); + + $handler->setFormatter($this->getDefaultFormatter()); + } + + /** + * Register a Syslog handler. + * + * @param string $name + * @param string $level + * @param mixed $facility + * @return \Psr\Log\LoggerInterface + */ + public function useSyslog($name = 'laravel', $level = 'debug', $facility = LOG_USER) + { + return $this->monolog->pushHandler(new SyslogHandler($name, $facility, $level)); + } + + /** + * Register an error_log handler. + * + * @param string $level + * @param int $messageType + * @return void + */ + public function useErrorLog($level = 'debug', $messageType = ErrorLogHandler::OPERATING_SYSTEM) + { + $this->monolog->pushHandler( + $handler = new ErrorLogHandler($messageType, $this->parseLevel($level)) + ); + + $handler->setFormatter($this->getDefaultFormatter()); + } + + /** + * Register a new callback handler for when a log event is triggered. + * + * @param \Closure $callback + * @return void + * + * @throws \RuntimeException + */ + public function listen(Closure $callback) + { + if (! isset($this->dispatcher)) { + throw new RuntimeException('Events dispatcher has not been set.'); + } + + $this->dispatcher->listen(MessageLogged::class, $callback); + } + + /** + * Fires a log event. + * + * @param string $level + * @param string $message + * @param array $context + * @return void + */ + protected function fireLogEvent($level, $message, array $context = []) + { + // If the event dispatcher is set, we will pass along the parameters to the + // log listeners. These are useful for building profilers or other tools + // that aggregate all of the log messages for a given "request" cycle. + if (isset($this->dispatcher)) { + $this->dispatcher->dispatch(new MessageLogged($level, $message, $context)); + } + } + + /** + * Format the parameters for the logger. + * + * @param mixed $message + * @return mixed + */ + protected function formatMessage($message) + { + if (is_array($message)) { + return var_export($message, true); + } elseif ($message instanceof Jsonable) { + return $message->toJson(); + } elseif ($message instanceof Arrayable) { + return var_export($message->toArray(), true); + } + + return $message; + } + + /** + * Parse the string level into a Monolog constant. + * + * @param string $level + * @return int + * + * @throws \InvalidArgumentException + */ + protected function parseLevel($level) + { + if (isset($this->levels[$level])) { + return $this->levels[$level]; + } + + throw new InvalidArgumentException('Invalid log level.'); + } + + /** + * Get the underlying Monolog instance. + * + * @return \Monolog\Logger + */ + public function getMonolog() + { + return $this->monolog; + } + + /** + * Get a default Monolog formatter instance. + * + * @return \Monolog\Formatter\LineFormatter + */ + protected function getDefaultFormatter() + { + return new LineFormatter(null, null, true, true); + } + + /** + * Get the event dispatcher instance. + * + * @return \Illuminate\Contracts\Events\Dispatcher + */ + public function getEventDispatcher() + { + return $this->dispatcher; + } + + /** + * Set the event dispatcher instance. + * + * @param \Illuminate\Contracts\Events\Dispatcher $dispatcher + * @return void + */ + public function setEventDispatcher(Dispatcher $dispatcher) + { + $this->dispatcher = $dispatcher; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Log/composer.json b/vendor/laravel/framework/src/Illuminate/Log/composer.json new file mode 100755 index 0000000..cfcad97 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Log/composer.json @@ -0,0 +1,36 @@ +{ + "name": "illuminate/log", + "description": "The Illuminate Log package.", + "license": "MIT", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "require": { + "php": ">=5.6.4", + "illuminate/contracts": "5.4.*", + "illuminate/support": "5.4.*", + "monolog/monolog": "~1.11" + }, + "autoload": { + "psr-4": { + "Illuminate\\Log\\": "" + } + }, + "extra": { + "branch-alias": { + "dev-master": "5.4-dev" + } + }, + "config": { + "sort-packages": true + }, + "minimum-stability": "dev" +} diff --git a/vendor/laravel/framework/src/Illuminate/Mail/Events/MessageSending.php b/vendor/laravel/framework/src/Illuminate/Mail/Events/MessageSending.php new file mode 100644 index 0000000..17bc257 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Mail/Events/MessageSending.php @@ -0,0 +1,24 @@ +message = $message; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Mail/Events/MessageSent.php b/vendor/laravel/framework/src/Illuminate/Mail/Events/MessageSent.php new file mode 100644 index 0000000..8af4a0e --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Mail/Events/MessageSent.php @@ -0,0 +1,24 @@ +message = $message; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Mail/MailServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Mail/MailServiceProvider.php new file mode 100755 index 0000000..e185c37 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Mail/MailServiceProvider.php @@ -0,0 +1,145 @@ +registerSwiftMailer(); + + $this->registerIlluminateMailer(); + + $this->registerMarkdownRenderer(); + } + + /** + * Register the Illuminate mailer instance. + * + * @return void + */ + protected function registerIlluminateMailer() + { + $this->app->singleton('mailer', function ($app) { + $config = $app->make('config')->get('mail'); + + // Once we have create the mailer instance, we will set a container instance + // on the mailer. This allows us to resolve mailer classes via containers + // for maximum testability on said classes instead of passing Closures. + $mailer = new Mailer( + $app['view'], $app['swift.mailer'], $app['events'] + ); + + if ($app->bound('queue')) { + $mailer->setQueue($app['queue']); + } + + // Next we will set all of the global addresses on this mailer, which allows + // for easy unification of all "from" addresses as well as easy debugging + // of sent messages since they get be sent into a single email address. + foreach (['from', 'reply_to', 'to'] as $type) { + $this->setGlobalAddress($mailer, $config, $type); + } + + return $mailer; + }); + } + + /** + * Set a global address on the mailer by type. + * + * @param \Illuminate\Mail\Mailer $mailer + * @param array $config + * @param string $type + * @return void + */ + protected function setGlobalAddress($mailer, array $config, $type) + { + $address = Arr::get($config, $type); + + if (is_array($address) && isset($address['address'])) { + $mailer->{'always'.Str::studly($type)}($address['address'], $address['name']); + } + } + + /** + * Register the Swift Mailer instance. + * + * @return void + */ + public function registerSwiftMailer() + { + $this->registerSwiftTransport(); + + // Once we have the transporter registered, we will register the actual Swift + // mailer instance, passing in the transport instances, which allows us to + // override this transporter instances during app start-up if necessary. + $this->app->singleton('swift.mailer', function ($app) { + return new Swift_Mailer($app['swift.transport']->driver()); + }); + } + + /** + * Register the Swift Transport instance. + * + * @return void + */ + protected function registerSwiftTransport() + { + $this->app->singleton('swift.transport', function ($app) { + return new TransportManager($app); + }); + } + + /** + * Register the Markdown renderer instance. + * + * @return void + */ + protected function registerMarkdownRenderer() + { + if ($this->app->runningInConsole()) { + $this->publishes([ + __DIR__.'/resources/views' => $this->app->resourcePath('views/vendor/mail'), + ], 'laravel-mail'); + } + + $this->app->singleton(Markdown::class, function ($app) { + $config = $app->make('config'); + + return new Markdown($app->make('view'), [ + 'theme' => $config->get('mail.markdown.theme', 'default'), + 'paths' => $config->get('mail.markdown.paths', []), + ]); + }); + } + + /** + * Get the services provided by the provider. + * + * @return array + */ + public function provides() + { + return [ + 'mailer', 'swift.mailer', 'swift.transport', Markdown::class, + ]; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Mail/Mailable.php b/vendor/laravel/framework/src/Illuminate/Mail/Mailable.php new file mode 100644 index 0000000..9e1f8ee --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Mail/Mailable.php @@ -0,0 +1,647 @@ +call([$this, 'build']); + + $mailer->send($this->buildView(), $this->buildViewData(), function ($message) { + $this->buildFrom($message) + ->buildRecipients($message) + ->buildSubject($message) + ->buildAttachments($message) + ->runCallbacks($message); + }); + } + + /** + * Queue the message for sending. + * + * @param \Illuminate\Contracts\Queue\Factory $queue + * @return mixed + */ + public function queue(Queue $queue) + { + $connection = property_exists($this, 'connection') ? $this->connection : null; + + $queueName = property_exists($this, 'queue') ? $this->queue : null; + + return $queue->connection($connection)->pushOn( + $queueName ?: null, new SendQueuedMailable($this) + ); + } + + /** + * Deliver the queued message after the given delay. + * + * @param \DateTime|int $delay + * @param Queue $queue + * @return mixed + */ + public function later($delay, Queue $queue) + { + $connection = property_exists($this, 'connection') ? $this->connection : null; + + $queueName = property_exists($this, 'queue') ? $this->queue : null; + + return $queue->connection($connection)->laterOn( + $queueName ?: null, $delay, new SendQueuedMailable($this) + ); + } + + /** + * Build the view for the message. + * + * @return array|string + */ + protected function buildView() + { + if (isset($this->markdown)) { + return $this->buildMarkdownView(); + } + + if (isset($this->view, $this->textView)) { + return [$this->view, $this->textView]; + } elseif (isset($this->textView)) { + return ['text' => $this->textView]; + } + + return $this->view; + } + + /** + * Build the Markdown view for the message. + * + * @return array + */ + protected function buildMarkdownView() + { + $markdown = Container::getInstance()->make(Markdown::class); + + $data = $this->buildViewData(); + + return [ + 'html' => $markdown->render($this->markdown, $data), + 'text' => $markdown->renderText($this->markdown, $data), + ]; + } + + /** + * Build the view data for the message. + * + * @return array + */ + public function buildViewData() + { + $data = $this->viewData; + + foreach ((new ReflectionClass($this))->getProperties(ReflectionProperty::IS_PUBLIC) as $property) { + if ($property->getDeclaringClass()->getName() != self::class) { + $data[$property->getName()] = $property->getValue($this); + } + } + + return $data; + } + + /** + * Add the sender to the message. + * + * @param \Illuminate\Mail\Message $message + * @return $this + */ + protected function buildFrom($message) + { + if (! empty($this->from)) { + $message->from($this->from[0]['address'], $this->from[0]['name']); + } + + return $this; + } + + /** + * Add all of the recipients to the message. + * + * @param \Illuminate\Mail\Message $message + * @return $this + */ + protected function buildRecipients($message) + { + foreach (['to', 'cc', 'bcc', 'replyTo'] as $type) { + foreach ($this->{$type} as $recipient) { + $message->{$type}($recipient['address'], $recipient['name']); + } + } + + return $this; + } + + /** + * Set the subject for the message. + * + * @param \Illuminate\Mail\Message $message + * @return $this + */ + protected function buildSubject($message) + { + if ($this->subject) { + $message->subject($this->subject); + } else { + $message->subject(Str::title(Str::snake(class_basename($this), ' '))); + } + + return $this; + } + + /** + * Add all of the attachments to the message. + * + * @param \Illuminate\Mail\Message $message + * @return $this + */ + protected function buildAttachments($message) + { + foreach ($this->attachments as $attachment) { + $message->attach($attachment['file'], $attachment['options']); + } + + foreach ($this->rawAttachments as $attachment) { + $message->attachData( + $attachment['data'], $attachment['name'], $attachment['options'] + ); + } + + return $this; + } + + /** + * Run the callbacks for the message. + * + * @param \Illuminate\Mail\Message $message + * @return $this + */ + protected function runCallbacks($message) + { + foreach ($this->callbacks as $callback) { + $callback($message->getSwiftMessage()); + } + + return $this; + } + + /** + * Set the priority of this message. + * + * The value is an integer where 1 is the highest priority and 5 is the lowest. + * + * @param int $level + * @return $this + */ + public function priority($level = 3) + { + $this->callbacks[] = function ($message) use ($level) { + $message->setPriority($level); + }; + + return $this; + } + + /** + * Set the sender of the message. + * + * @param object|array|string $address + * @param string|null $name + * @return $this + */ + public function from($address, $name = null) + { + return $this->setAddress($address, $name, 'from'); + } + + /** + * Determine if the given recipient is set on the mailable. + * + * @param object|array|string $address + * @param string|null $name + * @return bool + */ + public function hasFrom($address, $name = null) + { + return $this->hasRecipient($address, $name, 'from'); + } + + /** + * Set the recipients of the message. + * + * @param object|array|string $address + * @param string|null $name + * @return $this + */ + public function to($address, $name = null) + { + return $this->setAddress($address, $name, 'to'); + } + + /** + * Determine if the given recipient is set on the mailable. + * + * @param object|array|string $address + * @param string|null $name + * @return bool + */ + public function hasTo($address, $name = null) + { + return $this->hasRecipient($address, $name, 'to'); + } + + /** + * Set the recipients of the message. + * + * @param object|array|string $address + * @param string|null $name + * @return $this + */ + public function cc($address, $name = null) + { + return $this->setAddress($address, $name, 'cc'); + } + + /** + * Determine if the given recipient is set on the mailable. + * + * @param object|array|string $address + * @param string|null $name + * @return bool + */ + public function hasCc($address, $name = null) + { + return $this->hasRecipient($address, $name, 'cc'); + } + + /** + * Set the recipients of the message. + * + * @param object|array|string $address + * @param string|null $name + * @return $this + */ + public function bcc($address, $name = null) + { + return $this->setAddress($address, $name, 'bcc'); + } + + /** + * Determine if the given recipient is set on the mailable. + * + * @param object|array|string $address + * @param string|null $name + * @return bool + */ + public function hasBcc($address, $name = null) + { + return $this->hasRecipient($address, $name, 'bcc'); + } + + /** + * Set the "reply to" address of the message. + * + * @param object|array|string $address + * @param string|null $name + * @return $this + */ + public function replyTo($address, $name = null) + { + return $this->setAddress($address, $name, 'replyTo'); + } + + /** + * Set the recipients of the message. + * + * All recipients are stored internally as [['name' => ?, 'address' => ?]] + * + * @param object|array|string $address + * @param string|null $name + * @param string $property + * @return $this + */ + protected function setAddress($address, $name = null, $property = 'to') + { + foreach ($this->addressesToArray($address, $name) as $recipient) { + $recipient = $this->normalizeRecipient($recipient); + + $this->{$property}[] = [ + 'name' => isset($recipient->name) ? $recipient->name : null, + 'address' => $recipient->email, + ]; + } + + return $this; + } + + /** + * Convert the given recipient arguments to an array. + * + * @param object|array|string $address + * @param string|null $name + * @return array + */ + protected function addressesToArray($address, $name) + { + if (! is_array($address) && ! $address instanceof Collection) { + $address = is_string($name) ? [['name' => $name, 'email' => $address]] : [$address]; + } + + return $address; + } + + /** + * Convert the given recipient into an object. + * + * @param mixed $recipient + * @return object + */ + protected function normalizeRecipient($recipient) + { + if (is_array($recipient)) { + return (object) $recipient; + } elseif (is_string($recipient)) { + return (object) ['email' => $recipient]; + } + + return $recipient; + } + + /** + * Determine if the given recipient is set on the mailable. + * + * @param object|array|string $address + * @param string|null $name + * @param string $property + * @return bool + */ + protected function hasRecipient($address, $name = null, $property = 'to') + { + $expected = $this->normalizeRecipient( + $this->addressesToArray($address, $name)[0] + ); + + $expected = [ + 'name' => isset($expected->name) ? $expected->name : null, + 'address' => $expected->email, + ]; + + return collect($this->{$property})->contains(function ($actual) use ($expected) { + if (! isset($expected['name'])) { + return $actual['address'] == $expected['address']; + } else { + return $actual == $expected; + } + }); + } + + /** + * Set the subject of the message. + * + * @param string $subject + * @return $this + */ + public function subject($subject) + { + $this->subject = $subject; + + return $this; + } + + /** + * Set the Markdown template for the message. + * + * @param string $view + * @param array $data + * @return $this + */ + public function markdown($view, array $data = []) + { + $this->markdown = $view; + $this->viewData = array_merge($this->viewData, $data); + + return $this; + } + + /** + * Set the view and view data for the message. + * + * @param string $view + * @param array $data + * @return $this + */ + public function view($view, array $data = []) + { + $this->view = $view; + $this->viewData = array_merge($this->viewData, $data); + + return $this; + } + + /** + * Set the plain text view for the message. + * + * @param string $textView + * @param array $data + * @return $this + */ + public function text($textView, array $data = []) + { + $this->textView = $textView; + $this->viewData = array_merge($this->viewData, $data); + + return $this; + } + + /** + * Set the view data for the message. + * + * @param string|array $key + * @param mixed $value + * @return $this + */ + public function with($key, $value = null) + { + if (is_array($key)) { + $this->viewData = array_merge($this->viewData, $key); + } else { + $this->viewData[$key] = $value; + } + + return $this; + } + + /** + * Attach a file to the message. + * + * @param string $file + * @param array $options + * @return $this + */ + public function attach($file, array $options = []) + { + $this->attachments[] = compact('file', 'options'); + + return $this; + } + + /** + * Attach in-memory data as an attachment. + * + * @param string $data + * @param string $name + * @param array $options + * @return $this + */ + public function attachData($data, $name, array $options = []) + { + $this->rawAttachments[] = compact('data', 'name', 'options'); + + return $this; + } + + /** + * Register a callback to be called with the Swift message instance. + * + * @param callable $callback + * @return $this + */ + public function withSwiftMessage($callback) + { + $this->callbacks[] = $callback; + + return $this; + } + + /** + * Dynamically bind parameters to the message. + * + * @param string $method + * @param array $parameters + * @return $this + * + * @throws \BadMethodCallException + */ + public function __call($method, $parameters) + { + if (Str::startsWith($method, 'with')) { + return $this->with(Str::snake(substr($method, 4)), $parameters[0]); + } + + throw new BadMethodCallException("Method [$method] does not exist on mailable."); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Mail/Mailer.php b/vendor/laravel/framework/src/Illuminate/Mail/Mailer.php new file mode 100755 index 0000000..3252eca --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Mail/Mailer.php @@ -0,0 +1,543 @@ +views = $views; + $this->swift = $swift; + $this->events = $events; + } + + /** + * Set the global from address and name. + * + * @param string $address + * @param string|null $name + * @return void + */ + public function alwaysFrom($address, $name = null) + { + $this->from = compact('address', 'name'); + } + + /** + * Set the global reply-to address and name. + * + * @param string $address + * @param string|null $name + * @return void + */ + public function alwaysReplyTo($address, $name = null) + { + $this->replyTo = compact('address', 'name'); + } + + /** + * Set the global to address and name. + * + * @param string $address + * @param string|null $name + * @return void + */ + public function alwaysTo($address, $name = null) + { + $this->to = compact('address', 'name'); + } + + /** + * Begin the process of mailing a mailable class instance. + * + * @param mixed $users + * @return \Illuminate\Mail\PendingMail + */ + public function to($users) + { + return (new PendingMail($this))->to($users); + } + + /** + * Begin the process of mailing a mailable class instance. + * + * @param mixed $users + * @return \Illuminate\Mail\PendingMail + */ + public function bcc($users) + { + return (new PendingMail($this))->bcc($users); + } + + /** + * Send a new message when only a raw text part. + * + * @param string $text + * @param mixed $callback + * @return void + */ + public function raw($text, $callback) + { + return $this->send(['raw' => $text], [], $callback); + } + + /** + * Send a new message when only a plain part. + * + * @param string $view + * @param array $data + * @param mixed $callback + * @return void + */ + public function plain($view, array $data, $callback) + { + return $this->send(['text' => $view], $data, $callback); + } + + /** + * Send a new message using a view. + * + * @param string|array $view + * @param array $data + * @param \Closure|string $callback + * @return void + */ + public function send($view, array $data = [], $callback = null) + { + if ($view instanceof MailableContract) { + return $this->sendMailable($view); + } + + // First we need to parse the view, which could either be a string or an array + // containing both an HTML and plain text versions of the view which should + // be used when sending an e-mail. We will extract both of them out here. + list($view, $plain, $raw) = $this->parseView($view); + + $data['message'] = $message = $this->createMessage(); + + // Once we have retrieved the view content for the e-mail we will set the body + // of this message using the HTML type, which will provide a simple wrapper + // to creating view based emails that are able to receive arrays of data. + $this->addContent($message, $view, $plain, $raw, $data); + + call_user_func($callback, $message); + + // If a global "to" address has been set, we will set that address on the mail + // message. This is primarily useful during local development in which each + // message should be delivered into a single mail address for inspection. + if (isset($this->to['address'])) { + $this->setGlobalTo($message); + } + + $this->sendSwiftMessage($message->getSwiftMessage()); + + $this->dispatchSentEvent($message); + } + + /** + * Send the given mailable. + * + * @param MailableContract $mailable + * @return mixed + */ + protected function sendMailable(MailableContract $mailable) + { + return $mailable instanceof ShouldQueue + ? $mailable->queue($this->queue) : $mailable->send($this); + } + + /** + * Parse the given view name or array. + * + * @param string|array $view + * @return array + * + * @throws \InvalidArgumentException + */ + protected function parseView($view) + { + if (is_string($view)) { + return [$view, null, null]; + } + + // If the given view is an array with numeric keys, we will just assume that + // both a "pretty" and "plain" view were provided, so we will return this + // array as is, since must should contain both views with numeric keys. + if (is_array($view) && isset($view[0])) { + return [$view[0], $view[1], null]; + } + + // If this view is an array but doesn't contain numeric keys, we will assume + // the views are being explicitly specified and will extract them via the + // named keys instead, allowing the developers to use one or the other. + if (is_array($view)) { + return [ + Arr::get($view, 'html'), + Arr::get($view, 'text'), + Arr::get($view, 'raw'), + ]; + } + + throw new InvalidArgumentException('Invalid view.'); + } + + /** + * Add the content to a given message. + * + * @param \Illuminate\Mail\Message $message + * @param string $view + * @param string $plain + * @param string $raw + * @param array $data + * @return void + */ + protected function addContent($message, $view, $plain, $raw, $data) + { + if (isset($view)) { + $message->setBody($this->renderView($view, $data), 'text/html'); + } + + if (isset($plain)) { + $method = isset($view) ? 'addPart' : 'setBody'; + + $message->$method($this->renderView($plain, $data), 'text/plain'); + } + + if (isset($raw)) { + $method = (isset($view) || isset($plain)) ? 'addPart' : 'setBody'; + + $message->$method($raw, 'text/plain'); + } + } + + /** + * Render the given view. + * + * @param string $view + * @param array $data + * @return string + */ + protected function renderView($view, $data) + { + return $view instanceof Htmlable + ? $view->toHtml() + : $this->views->make($view, $data)->render(); + } + + /** + * Set the global "to" address on the given message. + * + * @param \Illuminate\Mail\Message $message + * @return void + */ + protected function setGlobalTo($message) + { + $message->to($this->to['address'], $this->to['name'], true); + $message->cc($this->to['address'], $this->to['name'], true); + $message->bcc($this->to['address'], $this->to['name'], true); + } + + /** + * Queue a new e-mail message for sending. + * + * @param string|array $view + * @param array $data + * @param \Closure|string $callback + * @param string|null $queue + * @return mixed + */ + public function queue($view, array $data = [], $callback = null, $queue = null) + { + if (! $view instanceof MailableContract) { + throw new InvalidArgumentException('Only mailables may be queued.'); + } + + return $view->queue($this->queue); + } + + /** + * Queue a new e-mail message for sending on the given queue. + * + * @param string $queue + * @param string|array $view + * @param array $data + * @param \Closure|string $callback + * @return mixed + */ + public function onQueue($queue, $view, array $data, $callback) + { + return $this->queue($view, $data, $callback, $queue); + } + + /** + * Queue a new e-mail message for sending on the given queue. + * + * This method didn't match rest of framework's "onQueue" phrasing. Added "onQueue". + * + * @param string $queue + * @param string|array $view + * @param array $data + * @param \Closure|string $callback + * @return mixed + */ + public function queueOn($queue, $view, array $data, $callback) + { + return $this->onQueue($queue, $view, $data, $callback); + } + + /** + * Queue a new e-mail message for sending after (n) seconds. + * + * @param int $delay + * @param string|array $view + * @param array $data + * @param \Closure|string $callback + * @param string|null $queue + * @return mixed + */ + public function later($delay, $view, array $data = [], $callback = null, $queue = null) + { + if (! $view instanceof MailableContract) { + throw new InvalidArgumentException('Only mailables may be queued.'); + } + + return $view->later($delay, $this->queue); + } + + /** + * Queue a new e-mail message for sending after (n) seconds on the given queue. + * + * @param string $queue + * @param int $delay + * @param string|array $view + * @param array $data + * @param \Closure|string $callback + * @return mixed + */ + public function laterOn($queue, $delay, $view, array $data, $callback) + { + return $this->later($delay, $view, $data, $callback, $queue); + } + + /** + * Create a new message instance. + * + * @return \Illuminate\Mail\Message + */ + protected function createMessage() + { + $message = new Message($this->swift->createMessage('message')); + + // If a global from address has been specified we will set it on every message + // instances so the developer does not have to repeat themselves every time + // they create a new message. We will just go ahead and push the address. + if (! empty($this->from['address'])) { + $message->from($this->from['address'], $this->from['name']); + } + + // When a global reply address was specified we will set this on every message + // instances so the developer does not have to repeat themselves every time + // they create a new message. We will just go ahead and push the address. + if (! empty($this->replyTo['address'])) { + $message->replyTo($this->replyTo['address'], $this->replyTo['name']); + } + + return $message; + } + + /** + * Send a Swift Message instance. + * + * @param \Swift_Message $message + * @return void + */ + protected function sendSwiftMessage($message) + { + if (! $this->shouldSendMessage($message)) { + return; + } + + try { + return $this->swift->send($message, $this->failedRecipients); + } finally { + $this->forceReconnection(); + } + } + + /** + * Determines if the message can be sent. + * + * @param \Swift_Message $message + * @return bool + */ + protected function shouldSendMessage($message) + { + if (! $this->events) { + return true; + } + + return $this->events->until( + new Events\MessageSending($message) + ) !== false; + } + + /** + * Dispatch the message sent event. + * + * @param \Illuminate\Mail\Message $message + * @return void + */ + protected function dispatchSentEvent($message) + { + if ($this->events) { + $this->events->dispatch( + new Events\MessageSent($message->getSwiftMessage()) + ); + } + } + + /** + * Force the transport to re-connect. + * + * This will prevent errors in daemon queue situations. + * + * @return void + */ + protected function forceReconnection() + { + $this->getSwiftMailer()->getTransport()->stop(); + } + + /** + * Get the view factory instance. + * + * @return \Illuminate\Contracts\View\Factory + */ + public function getViewFactory() + { + return $this->views; + } + + /** + * Get the Swift Mailer instance. + * + * @return \Swift_Mailer + */ + public function getSwiftMailer() + { + return $this->swift; + } + + /** + * Get the array of failed recipients. + * + * @return array + */ + public function failures() + { + return $this->failedRecipients; + } + + /** + * Set the Swift Mailer instance. + * + * @param \Swift_Mailer $swift + * @return void + */ + public function setSwiftMailer($swift) + { + $this->swift = $swift; + } + + /** + * Set the queue manager instance. + * + * @param \Illuminate\Contracts\Queue\Factory $queue + * @return $this + */ + public function setQueue(QueueContract $queue) + { + $this->queue = $queue; + + return $this; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Mail/Markdown.php b/vendor/laravel/framework/src/Illuminate/Mail/Markdown.php new file mode 100644 index 0000000..4de1df6 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Mail/Markdown.php @@ -0,0 +1,144 @@ +view = $view; + $this->theme = Arr::get($options, 'theme', 'default'); + $this->loadComponentsFrom(Arr::get($options, 'paths', [])); + } + + /** + * Render the Markdown template into HTML. + * + * @param string $view + * @param array $data + * @param \TijsVerkoyen\CssToInlineStyles\CssToInlineStyles|null $inliner + * @return \Illuminate\Support\HtmlString + */ + public function render($view, array $data = [], $inliner = null) + { + $this->view->flushFinderCache(); + + $contents = $this->view->replaceNamespace( + 'mail', $this->htmlComponentPaths() + )->make($view, $data)->render(); + + return new HtmlString(with($inliner ?: new CssToInlineStyles)->convert( + $contents, $this->view->make('mail::themes.'.$this->theme)->render() + )); + } + + /** + * Render the Markdown template into HTML. + * + * @param string $view + * @param array $data + * @return \Illuminate\Support\HtmlString + */ + public function renderText($view, array $data = []) + { + $this->view->flushFinderCache(); + + return new HtmlString(preg_replace("/[\r\n]{2,}/", "\n\n", $this->view->replaceNamespace( + 'mail', $this->markdownComponentPaths() + )->make($view, $data)->render())); + } + + /** + * Parse the given Markdown text into HTML. + * + * @param string $text + * @return string + */ + public static function parse($text) + { + $parsedown = new Parsedown; + + return new HtmlString($parsedown->text($text)); + } + + /** + * Get the HTML component paths. + * + * @return array + */ + public function htmlComponentPaths() + { + return array_map(function ($path) { + return $path.'/html'; + }, $this->componentPaths()); + } + + /** + * Get the Markdown component paths. + * + * @return array + */ + public function markdownComponentPaths() + { + return array_map(function ($path) { + return $path.'/markdown'; + }, $this->componentPaths()); + } + + /** + * Get the component paths. + * + * @return array + */ + protected function componentPaths() + { + return array_unique(array_merge($this->componentPaths, [ + __DIR__.'/resources/views', + ])); + } + + /** + * Register new mail component paths. + * + * @param array $paths + * @return void + */ + public function loadComponentsFrom(array $paths = []) + { + $this->componentPaths = $paths; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Mail/Message.php b/vendor/laravel/framework/src/Illuminate/Mail/Message.php new file mode 100755 index 0000000..1b2aa0b --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Mail/Message.php @@ -0,0 +1,325 @@ +swift = $swift; + } + + /** + * Add a "from" address to the message. + * + * @param string|array $address + * @param string|null $name + * @return $this + */ + public function from($address, $name = null) + { + $this->swift->setFrom($address, $name); + + return $this; + } + + /** + * Set the "sender" of the message. + * + * @param string|array $address + * @param string|null $name + * @return $this + */ + public function sender($address, $name = null) + { + $this->swift->setSender($address, $name); + + return $this; + } + + /** + * Set the "return path" of the message. + * + * @param string $address + * @return $this + */ + public function returnPath($address) + { + $this->swift->setReturnPath($address); + + return $this; + } + + /** + * Add a recipient to the message. + * + * @param string|array $address + * @param string|null $name + * @param bool $override + * @return $this + */ + public function to($address, $name = null, $override = false) + { + if ($override) { + $this->swift->setTo($address, $name); + + return $this; + } + + return $this->addAddresses($address, $name, 'To'); + } + + /** + * Add a carbon copy to the message. + * + * @param string|array $address + * @param string|null $name + * @param bool $override + * @return $this + */ + public function cc($address, $name = null, $override = false) + { + if ($override) { + $this->swift->setCc($address, $name); + + return $this; + } + + return $this->addAddresses($address, $name, 'Cc'); + } + + /** + * Add a blind carbon copy to the message. + * + * @param string|array $address + * @param string|null $name + * @param bool $override + * @return $this + */ + public function bcc($address, $name = null, $override = false) + { + if ($override) { + $this->swift->setBcc($address, $name); + + return $this; + } + + return $this->addAddresses($address, $name, 'Bcc'); + } + + /** + * Add a reply to address to the message. + * + * @param string|array $address + * @param string|null $name + * @return $this + */ + public function replyTo($address, $name = null) + { + return $this->addAddresses($address, $name, 'ReplyTo'); + } + + /** + * Add a recipient to the message. + * + * @param string|array $address + * @param string $name + * @param string $type + * @return $this + */ + protected function addAddresses($address, $name, $type) + { + if (is_array($address)) { + $this->swift->{"set{$type}"}($address, $name); + } else { + $this->swift->{"add{$type}"}($address, $name); + } + + return $this; + } + + /** + * Set the subject of the message. + * + * @param string $subject + * @return $this + */ + public function subject($subject) + { + $this->swift->setSubject($subject); + + return $this; + } + + /** + * Set the message priority level. + * + * @param int $level + * @return $this + */ + public function priority($level) + { + $this->swift->setPriority($level); + + return $this; + } + + /** + * Attach a file to the message. + * + * @param string $file + * @param array $options + * @return $this + */ + public function attach($file, array $options = []) + { + $attachment = $this->createAttachmentFromPath($file); + + return $this->prepAttachment($attachment, $options); + } + + /** + * Create a Swift Attachment instance. + * + * @param string $file + * @return \Swift_Attachment + */ + protected function createAttachmentFromPath($file) + { + return Swift_Attachment::fromPath($file); + } + + /** + * Attach in-memory data as an attachment. + * + * @param string $data + * @param string $name + * @param array $options + * @return $this + */ + public function attachData($data, $name, array $options = []) + { + $attachment = $this->createAttachmentFromData($data, $name); + + return $this->prepAttachment($attachment, $options); + } + + /** + * Create a Swift Attachment instance from data. + * + * @param string $data + * @param string $name + * @return \Swift_Attachment + */ + protected function createAttachmentFromData($data, $name) + { + return Swift_Attachment::newInstance($data, $name); + } + + /** + * Embed a file in the message and get the CID. + * + * @param string $file + * @return string + */ + public function embed($file) + { + if (isset($this->embeddedFiles[$file])) { + return $this->embeddedFiles[$file]; + } + + return $this->embeddedFiles[$file] = $this->swift->embed( + Swift_Image::fromPath($file) + ); + } + + /** + * Embed in-memory data in the message and get the CID. + * + * @param string $data + * @param string $name + * @param string|null $contentType + * @return string + */ + public function embedData($data, $name, $contentType = null) + { + $image = Swift_Image::newInstance($data, $name, $contentType); + + return $this->swift->embed($image); + } + + /** + * Prepare and attach the given attachment. + * + * @param \Swift_Attachment $attachment + * @param array $options + * @return $this + */ + protected function prepAttachment($attachment, $options = []) + { + // First we will check for a MIME type on the message, which instructs the + // mail client on what type of attachment the file is so that it may be + // downloaded correctly by the user. The MIME option is not required. + if (isset($options['mime'])) { + $attachment->setContentType($options['mime']); + } + + // If an alternative name was given as an option, we will set that on this + // attachment so that it will be downloaded with the desired names from + // the developer, otherwise the default file names will get assigned. + if (isset($options['as'])) { + $attachment->setFilename($options['as']); + } + + $this->swift->attach($attachment); + + return $this; + } + + /** + * Get the underlying Swift Message instance. + * + * @return \Swift_Message + */ + public function getSwiftMessage() + { + return $this->swift; + } + + /** + * Dynamically pass missing methods to the Swift instance. + * + * @param string $method + * @param array $parameters + * @return mixed + */ + public function __call($method, $parameters) + { + $callable = [$this->swift, $method]; + + return call_user_func_array($callable, $parameters); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Mail/PendingMail.php b/vendor/laravel/framework/src/Illuminate/Mail/PendingMail.php new file mode 100644 index 0000000..716c825 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Mail/PendingMail.php @@ -0,0 +1,154 @@ +mailer = $mailer; + } + + /** + * Set the recipients of the message. + * + * @param mixed $users + * @return $this + */ + public function to($users) + { + $this->to = $users; + + return $this; + } + + /** + * Set the recipients of the message. + * + * @param mixed $users + * @return $this + */ + public function cc($users) + { + $this->cc = $users; + + return $this; + } + + /** + * Set the recipients of the message. + * + * @param mixed $users + * @return $this + */ + public function bcc($users) + { + $this->bcc = $users; + + return $this; + } + + /** + * Send a new mailable message instance. + * + * @param Mailable $mailable + * @return mixed + */ + public function send(Mailable $mailable) + { + if ($mailable instanceof ShouldQueue) { + return $this->queue($mailable); + } + + return $this->mailer->send($this->fill($mailable)); + } + + /** + * Send a mailable message immediately. + * + * @param Mailable $mailable + * @return mixed + */ + public function sendNow(Mailable $mailable) + { + return $this->mailer->send($this->fill($mailable)); + } + + /** + * Push the given mailable onto the queue. + * + * @param Mailable $mailable + * @return mixed + */ + public function queue(Mailable $mailable) + { + $mailable = $this->fill($mailable); + + if (isset($mailable->delay)) { + return $this->mailer->later($mailable->delay, $mailable); + } + + return $this->mailer->queue($mailable); + } + + /** + * Deliver the queued message after the given delay. + * + * @param \DateTime|int $delay + * @param Mailable $mailable + * @return mixed + */ + public function later($delay, Mailable $mailable) + { + return $this->mailer->later($delay, $this->fill($mailable)); + } + + /** + * Populate the mailable with the addresses. + * + * @param Mailable $mailable + * @return Mailable + */ + protected function fill(Mailable $mailable) + { + return $mailable->to($this->to) + ->cc($this->cc) + ->bcc($this->bcc); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Mail/SendQueuedMailable.php b/vendor/laravel/framework/src/Illuminate/Mail/SendQueuedMailable.php new file mode 100644 index 0000000..bab0576 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Mail/SendQueuedMailable.php @@ -0,0 +1,64 @@ +mailable = $mailable; + $this->tries = property_exists($mailable, 'tries') ? $mailable->tries : null; + $this->timeout = property_exists($mailable, 'timeout') ? $mailable->timeout : null; + } + + /** + * Handle the queued job. + * + * @param \Illuminate\Contracts\Mail\Mailer $mailer + * @return void + */ + public function handle(MailerContract $mailer) + { + $this->mailable->send($mailer); + } + + /** + * Get the display name for the queued job. + * + * @return string + */ + public function displayName() + { + return get_class($this->mailable); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Mail/Transport/ArrayTransport.php b/vendor/laravel/framework/src/Illuminate/Mail/Transport/ArrayTransport.php new file mode 100644 index 0000000..6213b5b --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Mail/Transport/ArrayTransport.php @@ -0,0 +1,58 @@ +messages = new Collection; + } + + /** + * {@inheritdoc} + */ + public function send(Swift_Mime_Message $message, &$failedRecipients = null) + { + $this->beforeSendPerformed($message); + + $this->messages[] = $message; + + return $this->numberOfRecipients($message); + } + + /** + * Retrieve the collection of messages. + * + * @return \Illuminate\Support\Collection + */ + public function messages() + { + return $this->messages; + } + + /** + * Clear all of the messages from the local collection. + * + * @return \Illuminate\Support\Collection + */ + public function flush() + { + return $this->messages = new Collection; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Mail/Transport/LogTransport.php b/vendor/laravel/framework/src/Illuminate/Mail/Transport/LogTransport.php new file mode 100644 index 0000000..26c2c22 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Mail/Transport/LogTransport.php @@ -0,0 +1,59 @@ +logger = $logger; + } + + /** + * {@inheritdoc} + */ + public function send(Swift_Mime_Message $message, &$failedRecipients = null) + { + $this->beforeSendPerformed($message); + + $this->logger->debug($this->getMimeEntityString($message)); + + $this->sendPerformed($message); + + return $this->numberOfRecipients($message); + } + + /** + * Get a loggable string out of a Swiftmailer entity. + * + * @param \Swift_Mime_MimeEntity $entity + * @return string + */ + protected function getMimeEntityString(Swift_Mime_MimeEntity $entity) + { + $string = (string) $entity->getHeaders().PHP_EOL.$entity->getBody(); + + foreach ($entity->getChildren() as $children) { + $string .= PHP_EOL.PHP_EOL.$this->getMimeEntityString($children); + } + + return $string; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Mail/Transport/MailgunTransport.php b/vendor/laravel/framework/src/Illuminate/Mail/Transport/MailgunTransport.php new file mode 100644 index 0000000..3b48680 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Mail/Transport/MailgunTransport.php @@ -0,0 +1,168 @@ +key = $key; + $this->client = $client; + $this->setDomain($domain); + } + + /** + * {@inheritdoc} + */ + public function send(Swift_Mime_Message $message, &$failedRecipients = null) + { + $this->beforeSendPerformed($message); + + $to = $this->getTo($message); + + $message->setBcc([]); + + $this->client->post($this->url, $this->payload($message, $to)); + + $this->sendPerformed($message); + + return $this->numberOfRecipients($message); + } + + /** + * Get the HTTP payload for sending the Mailgun message. + * + * @param \Swift_Mime_Message $message + * @param string $to + * @return array + */ + protected function payload(Swift_Mime_Message $message, $to) + { + return [ + 'auth' => [ + 'api', + $this->key, + ], + 'multipart' => [ + [ + 'name' => 'to', + 'contents' => $to, + ], + [ + 'name' => 'message', + 'contents' => $message->toString(), + 'filename' => 'message.mime', + ], + ], + ]; + } + + /** + * Get the "to" payload field for the API request. + * + * @param \Swift_Mime_Message $message + * @return string + */ + protected function getTo(Swift_Mime_Message $message) + { + return collect($this->allContacts($message))->map(function ($display, $address) { + return $display ? $display." <{$address}>" : $address; + })->values()->implode(','); + } + + /** + * Get all of the contacts for the message. + * + * @param \Swift_Mime_Message $message + * @return array + */ + protected function allContacts(Swift_Mime_Message $message) + { + return array_merge( + (array) $message->getTo(), (array) $message->getCc(), (array) $message->getBcc() + ); + } + + /** + * Get the API key being used by the transport. + * + * @return string + */ + public function getKey() + { + return $this->key; + } + + /** + * Set the API key being used by the transport. + * + * @param string $key + * @return string + */ + public function setKey($key) + { + return $this->key = $key; + } + + /** + * Get the domain being used by the transport. + * + * @return string + */ + public function getDomain() + { + return $this->domain; + } + + /** + * Set the domain being used by the transport. + * + * @param string $domain + * @return void + */ + public function setDomain($domain) + { + $this->url = 'https://api.mailgun.net/v3/'.$domain.'/messages.mime'; + + return $this->domain = $domain; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Mail/Transport/MandrillTransport.php b/vendor/laravel/framework/src/Illuminate/Mail/Transport/MandrillTransport.php new file mode 100644 index 0000000..c8fdfa3 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Mail/Transport/MandrillTransport.php @@ -0,0 +1,105 @@ +key = $key; + $this->client = $client; + } + + /** + * {@inheritdoc} + */ + public function send(Swift_Mime_Message $message, &$failedRecipients = null) + { + $this->beforeSendPerformed($message); + + $this->client->post('https://mandrillapp.com/api/1.0/messages/send-raw.json', [ + 'form_params' => [ + 'key' => $this->key, + 'to' => $this->getTo($message), + 'raw_message' => $message->toString(), + 'async' => true, + ], + ]); + + $this->sendPerformed($message); + + return $this->numberOfRecipients($message); + } + + /** + * Get all the addresses this message should be sent to. + * + * Note that Mandrill still respects CC, BCC headers in raw message itself. + * + * @param \Swift_Mime_Message $message + * @return array + */ + protected function getTo(Swift_Mime_Message $message) + { + $to = []; + + if ($message->getTo()) { + $to = array_merge($to, array_keys($message->getTo())); + } + + if ($message->getCc()) { + $to = array_merge($to, array_keys($message->getCc())); + } + + if ($message->getBcc()) { + $to = array_merge($to, array_keys($message->getBcc())); + } + + return $to; + } + + /** + * Get the API key being used by the transport. + * + * @return string + */ + public function getKey() + { + return $this->key; + } + + /** + * Set the API key being used by the transport. + * + * @param string $key + * @return string + */ + public function setKey($key) + { + return $this->key = $key; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Mail/Transport/SesTransport.php b/vendor/laravel/framework/src/Illuminate/Mail/Transport/SesTransport.php new file mode 100644 index 0000000..a790423 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Mail/Transport/SesTransport.php @@ -0,0 +1,48 @@ +ses = $ses; + } + + /** + * {@inheritdoc} + */ + public function send(Swift_Mime_Message $message, &$failedRecipients = null) + { + $this->beforeSendPerformed($message); + + $headers = $message->getHeaders(); + + $headers->addTextHeader('X-SES-Message-ID', $this->ses->sendRawEmail([ + 'Source' => key($message->getSender() ?: $message->getFrom()), + 'RawMessage' => [ + 'Data' => $message->toString(), + ], + ])->get('MessageId')); + + $this->sendPerformed($message); + + return $this->numberOfRecipients($message); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Mail/Transport/SparkPostTransport.php b/vendor/laravel/framework/src/Illuminate/Mail/Transport/SparkPostTransport.php new file mode 100644 index 0000000..0a59bf4 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Mail/Transport/SparkPostTransport.php @@ -0,0 +1,159 @@ +key = $key; + $this->client = $client; + $this->options = $options; + } + + /** + * {@inheritdoc} + */ + public function send(Swift_Mime_Message $message, &$failedRecipients = null) + { + $this->beforeSendPerformed($message); + + $recipients = $this->getRecipients($message); + + $message->setBcc([]); + + $response = $this->client->post('https://api.sparkpost.com/api/v1/transmissions', [ + 'headers' => [ + 'Authorization' => $this->key, + ], + 'json' => array_merge([ + 'recipients' => $recipients, + 'content' => [ + 'email_rfc822' => $message->toString(), + ], + ], $this->options), + ]); + + $message->getHeaders()->addTextHeader( + 'X-SparkPost-Transmission-ID', $this->getTransmissionId($response) + ); + + $this->sendPerformed($message); + + return $this->numberOfRecipients($message); + } + + /** + * Get all the addresses this message should be sent to. + * + * Note that SparkPost still respects CC, BCC headers in raw message itself. + * + * @param \Swift_Mime_Message $message + * @return array + */ + protected function getRecipients(Swift_Mime_Message $message) + { + $recipients = []; + + foreach ((array) $message->getTo() as $email => $name) { + $recipients[] = ['address' => compact('name', 'email')]; + } + + foreach ((array) $message->getCc() as $email => $name) { + $recipients[] = ['address' => compact('name', 'email')]; + } + + foreach ((array) $message->getBcc() as $email => $name) { + $recipients[] = ['address' => compact('name', 'email')]; + } + + return $recipients; + } + + /** + * Get the transmission ID from the response. + * + * @param \GuzzleHttp\Psr7\Response $response + * @return string + */ + protected function getTransmissionId($response) + { + return object_get( + json_decode($response->getBody()->getContents()), 'results.id' + ); + } + + /** + * Get the API key being used by the transport. + * + * @return string + */ + public function getKey() + { + return $this->key; + } + + /** + * Set the API key being used by the transport. + * + * @param string $key + * @return string + */ + public function setKey($key) + { + return $this->key = $key; + } + + /** + * Get the transmission options being used by the transport. + * + * @return string + */ + public function getOptions() + { + return $this->options; + } + + /** + * Set the transmission options being used by the transport. + * + * @param array $options + * @return array + */ + public function setOptions(array $options) + { + return $this->options = $options; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Mail/Transport/Transport.php b/vendor/laravel/framework/src/Illuminate/Mail/Transport/Transport.php new file mode 100644 index 0000000..76e5d52 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Mail/Transport/Transport.php @@ -0,0 +1,100 @@ +plugins, $plugin); + } + + /** + * Iterate through registered plugins and execute plugins' methods. + * + * @param \Swift_Mime_Message $message + * @return void + */ + protected function beforeSendPerformed(Swift_Mime_Message $message) + { + $event = new Swift_Events_SendEvent($this, $message); + + foreach ($this->plugins as $plugin) { + if (method_exists($plugin, 'beforeSendPerformed')) { + $plugin->beforeSendPerformed($event); + } + } + } + + /** + * Iterate through registered plugins and execute plugins' methods. + * + * @param \Swift_Mime_Message $message + * @return void + */ + protected function sendPerformed(Swift_Mime_Message $message) + { + $event = new Swift_Events_SendEvent($this, $message); + + foreach ($this->plugins as $plugin) { + if (method_exists($plugin, 'sendPerformed')) { + $plugin->sendPerformed($event); + } + } + } + + /** + * Get the number of recipients. + * + * @param \Swift_Mime_Message $message + * @return int + */ + protected function numberOfRecipients(Swift_Mime_Message $message) + { + return count(array_merge( + (array) $message->getTo(), (array) $message->getCc(), (array) $message->getBcc() + )); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Mail/TransportManager.php b/vendor/laravel/framework/src/Illuminate/Mail/TransportManager.php new file mode 100644 index 0000000..b61c945 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Mail/TransportManager.php @@ -0,0 +1,210 @@ +app->make('config')->get('mail'); + + // The Swift SMTP transport instance will allow us to use any SMTP backend + // for delivering mail such as Sendgrid, Amazon SES, or a custom server + // a developer has available. We will just pass this configured host. + $transport = SmtpTransport::newInstance( + $config['host'], $config['port'] + ); + + if (isset($config['encryption'])) { + $transport->setEncryption($config['encryption']); + } + + // Once we have the transport we will check for the presence of a username + // and password. If we have it we will set the credentials on the Swift + // transporter instance so that we'll properly authenticate delivery. + if (isset($config['username'])) { + $transport->setUsername($config['username']); + + $transport->setPassword($config['password']); + } + + // Next we will set any stream context options specified for the transport + // and then return it. The option is not required any may not be inside + // the configuration array at all so we'll verify that before adding. + if (isset($config['stream'])) { + $transport->setStreamOptions($config['stream']); + } + + return $transport; + } + + /** + * Create an instance of the Sendmail Swift Transport driver. + * + * @return \Swift_SendmailTransport + */ + protected function createSendmailDriver() + { + return SendmailTransport::newInstance( + $this->app['config']['mail']['sendmail'] + ); + } + + /** + * Create an instance of the Amazon SES Swift Transport driver. + * + * @return \Swift_SendmailTransport + */ + protected function createSesDriver() + { + $config = array_merge($this->app['config']->get('services.ses', []), [ + 'version' => 'latest', 'service' => 'email', + ]); + + return new SesTransport(new SesClient( + $this->addSesCredentials($config) + )); + } + + /** + * Add the SES credentials to the configuration array. + * + * @param array $config + * @return array + */ + protected function addSesCredentials(array $config) + { + if ($config['key'] && $config['secret']) { + $config['credentials'] = Arr::only($config, ['key', 'secret']); + } + + return $config; + } + + /** + * Create an instance of the Mail Swift Transport driver. + * + * @return \Swift_MailTransport + */ + protected function createMailDriver() + { + return MailTransport::newInstance(); + } + + /** + * Create an instance of the Mailgun Swift Transport driver. + * + * @return \Illuminate\Mail\Transport\MailgunTransport + */ + protected function createMailgunDriver() + { + $config = $this->app['config']->get('services.mailgun', []); + + return new MailgunTransport( + $this->guzzle($config), + $config['secret'], $config['domain'] + ); + } + + /** + * Create an instance of the Mandrill Swift Transport driver. + * + * @return \Illuminate\Mail\Transport\MandrillTransport + */ + protected function createMandrillDriver() + { + $config = $this->app['config']->get('services.mandrill', []); + + return new MandrillTransport( + $this->guzzle($config), $config['secret'] + ); + } + + /** + * Create an instance of the SparkPost Swift Transport driver. + * + * @return \Illuminate\Mail\Transport\SparkPostTransport + */ + protected function createSparkPostDriver() + { + $config = $this->app['config']->get('services.sparkpost', []); + + return new SparkPostTransport( + $this->guzzle($config), $config['secret'], Arr::get($config, 'options', []) + ); + } + + /** + * Create an instance of the Log Swift Transport driver. + * + * @return \Illuminate\Mail\Transport\LogTransport + */ + protected function createLogDriver() + { + return new LogTransport($this->app->make(LoggerInterface::class)); + } + + /** + * Create an instance of the Array Swift Transport Driver. + * + * @return \Illuminate\Mail\Transport\ArrayTransport + */ + protected function createArrayDriver() + { + return new ArrayTransport; + } + + /** + * Get a fresh Guzzle HTTP client instance. + * + * @param array $config + * @return \GuzzleHttp\Client + */ + protected function guzzle($config) + { + return new HttpClient(Arr::add( + Arr::get($config, 'guzzle', []), 'connect_timeout', 60 + )); + } + + /** + * Get the default mail driver name. + * + * @return string + */ + public function getDefaultDriver() + { + return $this->app['config']['mail.driver']; + } + + /** + * Set the default mail driver name. + * + * @param string $name + * @return void + */ + public function setDefaultDriver($name) + { + $this->app['config']['mail.driver'] = $name; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Mail/composer.json b/vendor/laravel/framework/src/Illuminate/Mail/composer.json new file mode 100755 index 0000000..80a9f66 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Mail/composer.json @@ -0,0 +1,44 @@ +{ + "name": "illuminate/mail", + "description": "The Illuminate Mail package.", + "license": "MIT", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "require": { + "php": ">=5.6.4", + "erusev/parsedown": "~1.6", + "illuminate/container": "5.4.*", + "illuminate/contracts": "5.4.*", + "illuminate/support": "5.4.*", + "psr/log": "~1.0", + "swiftmailer/swiftmailer": "~5.4", + "tijsverkoyen/css-to-inline-styles": "~2.2" + }, + "autoload": { + "psr-4": { + "Illuminate\\Mail\\": "" + } + }, + "extra": { + "branch-alias": { + "dev-master": "5.4-dev" + } + }, + "suggest": { + "aws/aws-sdk-php": "Required to use the SES mail driver (~3.0).", + "guzzlehttp/guzzle": "Required to use the Mailgun and Mandrill mail drivers (~6.0)." + }, + "config": { + "sort-packages": true + }, + "minimum-stability": "dev" +} diff --git a/vendor/laravel/framework/src/Illuminate/Mail/resources/views/html/button.blade.php b/vendor/laravel/framework/src/Illuminate/Mail/resources/views/html/button.blade.php new file mode 100644 index 0000000..c7aae1b --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Mail/resources/views/html/button.blade.php @@ -0,0 +1,19 @@ + + + + +
+ + + + +
+ + + + +
+ {{ $slot }} +
+
+
diff --git a/vendor/laravel/framework/src/Illuminate/Mail/resources/views/html/footer.blade.php b/vendor/laravel/framework/src/Illuminate/Mail/resources/views/html/footer.blade.php new file mode 100644 index 0000000..c3f9360 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Mail/resources/views/html/footer.blade.php @@ -0,0 +1,11 @@ + + + + + + + + + diff --git a/vendor/laravel/framework/src/Illuminate/Mail/resources/views/html/header.blade.php b/vendor/laravel/framework/src/Illuminate/Mail/resources/views/html/header.blade.php new file mode 100644 index 0000000..eefabab --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Mail/resources/views/html/header.blade.php @@ -0,0 +1,7 @@ + + + + {{ $slot }} + + + diff --git a/vendor/laravel/framework/src/Illuminate/Mail/resources/views/html/layout.blade.php b/vendor/laravel/framework/src/Illuminate/Mail/resources/views/html/layout.blade.php new file mode 100644 index 0000000..991ae52 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Mail/resources/views/html/layout.blade.php @@ -0,0 +1,54 @@ + + + + + + + + + + + + + +
+ + {{ $header or '' }} + + + + + + + {{ $footer or '' }} +
+ + + + + +
+ {{ Illuminate\Mail\Markdown::parse($slot) }} + + {{ $subcopy or '' }} +
+
+
+ + diff --git a/vendor/laravel/framework/src/Illuminate/Mail/resources/views/html/message.blade.php b/vendor/laravel/framework/src/Illuminate/Mail/resources/views/html/message.blade.php new file mode 100644 index 0000000..4ba1a45 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Mail/resources/views/html/message.blade.php @@ -0,0 +1,27 @@ +@component('mail::layout') + {{-- Header --}} + @slot('header') + @component('mail::header', ['url' => config('app.url')]) + {{ config('app.name') }} + @endcomponent + @endslot + + {{-- Body --}} + {{ $slot }} + + {{-- Subcopy --}} + @if (isset($subcopy)) + @slot('subcopy') + @component('mail::subcopy') + {{ $subcopy }} + @endcomponent + @endslot + @endif + + {{-- Footer --}} + @slot('footer') + @component('mail::footer') + © {{ date('Y') }} {{ config('app.name') }}. All rights reserved. + @endcomponent + @endslot +@endcomponent diff --git a/vendor/laravel/framework/src/Illuminate/Mail/resources/views/html/panel.blade.php b/vendor/laravel/framework/src/Illuminate/Mail/resources/views/html/panel.blade.php new file mode 100644 index 0000000..f397080 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Mail/resources/views/html/panel.blade.php @@ -0,0 +1,13 @@ + + + + +
+ + + + +
+ {{ Illuminate\Mail\Markdown::parse($slot) }} +
+
diff --git a/vendor/laravel/framework/src/Illuminate/Mail/resources/views/html/promotion.blade.php b/vendor/laravel/framework/src/Illuminate/Mail/resources/views/html/promotion.blade.php new file mode 100644 index 0000000..0debcf8 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Mail/resources/views/html/promotion.blade.php @@ -0,0 +1,7 @@ + + + + +
+ {{ Illuminate\Mail\Markdown::parse($slot) }} +
diff --git a/vendor/laravel/framework/src/Illuminate/Mail/resources/views/html/promotion/button.blade.php b/vendor/laravel/framework/src/Illuminate/Mail/resources/views/html/promotion/button.blade.php new file mode 100644 index 0000000..8e79081 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Mail/resources/views/html/promotion/button.blade.php @@ -0,0 +1,13 @@ + + + + +
+ + + + +
+ {{ $slot }} +
+
diff --git a/vendor/laravel/framework/src/Illuminate/Mail/resources/views/html/subcopy.blade.php b/vendor/laravel/framework/src/Illuminate/Mail/resources/views/html/subcopy.blade.php new file mode 100644 index 0000000..c3df7b4 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Mail/resources/views/html/subcopy.blade.php @@ -0,0 +1,7 @@ + + + + +
+ {{ Illuminate\Mail\Markdown::parse($slot) }} +
diff --git a/vendor/laravel/framework/src/Illuminate/Mail/resources/views/html/table.blade.php b/vendor/laravel/framework/src/Illuminate/Mail/resources/views/html/table.blade.php new file mode 100644 index 0000000..a5f3348 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Mail/resources/views/html/table.blade.php @@ -0,0 +1,3 @@ +
+{{ Illuminate\Mail\Markdown::parse($slot) }} +
diff --git a/vendor/laravel/framework/src/Illuminate/Mail/resources/views/html/themes/default.css b/vendor/laravel/framework/src/Illuminate/Mail/resources/views/html/themes/default.css new file mode 100644 index 0000000..f2bb16d --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Mail/resources/views/html/themes/default.css @@ -0,0 +1,279 @@ +/* Base */ + +body, body *:not(html):not(style):not(br):not(tr):not(code) { + font-family: Avenir, Helvetica, sans-serif; + box-sizing: border-box; +} + +body { + background-color: #F2F4F6; + color: #74787E; + height: 100%; + line-height: 1.4; + margin: 0; + width: 100% !important; + -webkit-text-size-adjust: none; +} + +p, +ul, +ol, +blockquote { + line-height: 1.4; + text-align: left; +} + +a { + color: #3869D4; +} + +a img { + border: none; +} + +/* Typography */ + +h1 { + color: #2F3133; + font-size: 19px; + font-weight: bold; + margin-top: 0; + text-align: left; +} + +h2 { + color: #2F3133; + font-size: 16px; + font-weight: bold; + margin-top: 0; + text-align: left; +} + +h3 { + color: #2F3133; + font-size: 14px; + font-weight: bold; + margin-top: 0; + text-align: left; +} + +p { + color: #74787E; + font-size: 16px; + line-height: 1.5em; + margin-top: 0; + text-align: left; +} + +p.sub { + font-size: 12px; +} + +img { + max-width: 100%; +} + +/* Layout */ + +.wrapper { + background-color: #f5f8fa; + margin: 0; + padding: 0; + width: 100%; + -premailer-cellpadding: 0; + -premailer-cellspacing: 0; + -premailer-width: 100%; +} + +.content { + margin: 0; + padding: 0; + width: 100%; + -premailer-cellpadding: 0; + -premailer-cellspacing: 0; + -premailer-width: 100%; +} + +/* Header */ + +.header { + padding: 25px 0; + text-align: center; +} + +.header a { + color: #bbbfc3; + font-size: 19px; + font-weight: bold; + text-decoration: none; + text-shadow: 0 1px 0 white; +} + +/* Body */ + +.body { + background-color: #FFFFFF; + border-bottom: 1px solid #EDEFF2; + border-top: 1px solid #EDEFF2; + margin: 0; + padding: 0; + width: 100%; + -premailer-cellpadding: 0; + -premailer-cellspacing: 0; + -premailer-width: 100%; +} + +.inner-body { + background-color: #FFFFFF; + margin: 0 auto; + padding: 0; + width: 570px; + -premailer-cellpadding: 0; + -premailer-cellspacing: 0; + -premailer-width: 570px; +} + +/* Subcopy */ + +.subcopy { + border-top: 1px solid #EDEFF2; + margin-top: 25px; + padding-top: 25px; +} + +.subcopy p { + font-size: 12px; +} + +/* Footer */ + +.footer { + margin: 0 auto; + padding: 0; + text-align: center; + width: 570px; + -premailer-cellpadding: 0; + -premailer-cellspacing: 0; + -premailer-width: 570px; +} + +.footer p { + color: #AEAEAE; + font-size: 12px; + text-align: center; +} + +/* Tables */ + +.table table { + margin: 30px auto; + width: 100%; + -premailer-cellpadding: 0; + -premailer-cellspacing: 0; + -premailer-width: 100%; +} + +.table th { + border-bottom: 1px solid #EDEFF2; + padding-bottom: 8px; +} + +.table td { + color: #74787E; + font-size: 15px; + line-height: 18px; + padding: 10px 0; +} + +.content-cell { + padding: 35px; +} + +/* Buttons */ + +.action { + margin: 30px auto; + padding: 0; + text-align: center; + width: 100%; + -premailer-cellpadding: 0; + -premailer-cellspacing: 0; + -premailer-width: 100%; +} + +.button { + border-radius: 3px; + box-shadow: 0 2px 3px rgba(0, 0, 0, 0.16); + color: #FFF; + display: inline-block; + text-decoration: none; + -webkit-text-size-adjust: none; +} + +.button-blue { + background-color: #3097D1; + border-top: 10px solid #3097D1; + border-right: 18px solid #3097D1; + border-bottom: 10px solid #3097D1; + border-left: 18px solid #3097D1; +} + +.button-green { + background-color: #2ab27b; + border-top: 10px solid #2ab27b; + border-right: 18px solid #2ab27b; + border-bottom: 10px solid #2ab27b; + border-left: 18px solid #2ab27b; +} + +.button-red { + background-color: #bf5329; + border-top: 10px solid #bf5329; + border-right: 18px solid #bf5329; + border-bottom: 10px solid #bf5329; + border-left: 18px solid #bf5329; +} + +/* Panels */ + +.panel { + margin: 0 0 21px; +} + +.panel-content { + background-color: #EDEFF2; + padding: 16px; +} + +.panel-item { + padding: 0; +} + +.panel-item p:last-of-type { + margin-bottom: 0; + padding-bottom: 0; +} + +/* Promotions */ + +.promotion { + background-color: #FFFFFF; + border: 2px dashed #9BA2AB; + margin: 0; + margin-bottom: 25px; + margin-top: 25px; + padding: 24px; + width: 100%; + -premailer-cellpadding: 0; + -premailer-cellspacing: 0; + -premailer-width: 100%; +} + +.promotion h1 { + text-align: center; +} + +.promotion p { + font-size: 15px; + text-align: center; +} diff --git a/vendor/laravel/framework/src/Illuminate/Mail/resources/views/markdown/button.blade.php b/vendor/laravel/framework/src/Illuminate/Mail/resources/views/markdown/button.blade.php new file mode 100644 index 0000000..97444eb --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Mail/resources/views/markdown/button.blade.php @@ -0,0 +1 @@ +{{ $slot }}: {{ $url }} diff --git a/vendor/laravel/framework/src/Illuminate/Mail/resources/views/markdown/footer.blade.php b/vendor/laravel/framework/src/Illuminate/Mail/resources/views/markdown/footer.blade.php new file mode 100644 index 0000000..3338f62 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Mail/resources/views/markdown/footer.blade.php @@ -0,0 +1 @@ +{{ $slot }} diff --git a/vendor/laravel/framework/src/Illuminate/Mail/resources/views/markdown/header.blade.php b/vendor/laravel/framework/src/Illuminate/Mail/resources/views/markdown/header.blade.php new file mode 100644 index 0000000..aaa3e57 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Mail/resources/views/markdown/header.blade.php @@ -0,0 +1 @@ +[{{ $slot }}]({{ $url }}) diff --git a/vendor/laravel/framework/src/Illuminate/Mail/resources/views/markdown/layout.blade.php b/vendor/laravel/framework/src/Illuminate/Mail/resources/views/markdown/layout.blade.php new file mode 100644 index 0000000..f81a630 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Mail/resources/views/markdown/layout.blade.php @@ -0,0 +1,9 @@ +{!! strip_tags($header) !!} + +{!! strip_tags($slot) !!} +@if (isset($subcopy)) + +{!! strip_tags($subcopy) !!} +@endif + +{!! strip_tags($footer) !!} diff --git a/vendor/laravel/framework/src/Illuminate/Mail/resources/views/markdown/message.blade.php b/vendor/laravel/framework/src/Illuminate/Mail/resources/views/markdown/message.blade.php new file mode 100644 index 0000000..d747f55 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Mail/resources/views/markdown/message.blade.php @@ -0,0 +1,27 @@ +@component('mail::layout') + {{-- Header --}} + @slot('header') + @component('mail::header', ['url' => config('app.url')]) + {{ config('app.name') }} + @endcomponent + @endslot + + {{-- Body --}} + {{ $slot }} + + {{-- Subcopy --}} + @if (isset($subcopy)) + @slot('subcopy') + @component('mail::subcopy') + {{ $subcopy }} + @endcomponent + @endslot + @endif + + {{-- Footer --}} + @slot('footer') + @component('mail::footer') + © {{ date('Y') }} {{ config('app.name') }}. All rights reserved. + @endcomponent + @endslot +@endcomponent diff --git a/vendor/laravel/framework/src/Illuminate/Mail/resources/views/markdown/panel.blade.php b/vendor/laravel/framework/src/Illuminate/Mail/resources/views/markdown/panel.blade.php new file mode 100644 index 0000000..3338f62 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Mail/resources/views/markdown/panel.blade.php @@ -0,0 +1 @@ +{{ $slot }} diff --git a/vendor/laravel/framework/src/Illuminate/Mail/resources/views/markdown/promotion.blade.php b/vendor/laravel/framework/src/Illuminate/Mail/resources/views/markdown/promotion.blade.php new file mode 100644 index 0000000..3338f62 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Mail/resources/views/markdown/promotion.blade.php @@ -0,0 +1 @@ +{{ $slot }} diff --git a/vendor/laravel/framework/src/Illuminate/Mail/resources/views/markdown/promotion/button.blade.php b/vendor/laravel/framework/src/Illuminate/Mail/resources/views/markdown/promotion/button.blade.php new file mode 100644 index 0000000..aaa3e57 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Mail/resources/views/markdown/promotion/button.blade.php @@ -0,0 +1 @@ +[{{ $slot }}]({{ $url }}) diff --git a/vendor/laravel/framework/src/Illuminate/Mail/resources/views/markdown/subcopy.blade.php b/vendor/laravel/framework/src/Illuminate/Mail/resources/views/markdown/subcopy.blade.php new file mode 100644 index 0000000..3338f62 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Mail/resources/views/markdown/subcopy.blade.php @@ -0,0 +1 @@ +{{ $slot }} diff --git a/vendor/laravel/framework/src/Illuminate/Mail/resources/views/markdown/table.blade.php b/vendor/laravel/framework/src/Illuminate/Mail/resources/views/markdown/table.blade.php new file mode 100644 index 0000000..3338f62 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Mail/resources/views/markdown/table.blade.php @@ -0,0 +1 @@ +{{ $slot }} diff --git a/vendor/laravel/framework/src/Illuminate/Notifications/Action.php b/vendor/laravel/framework/src/Illuminate/Notifications/Action.php new file mode 100644 index 0000000..071db2d --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Notifications/Action.php @@ -0,0 +1,33 @@ +url = $url; + $this->text = $text; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Notifications/ChannelManager.php b/vendor/laravel/framework/src/Illuminate/Notifications/ChannelManager.php new file mode 100644 index 0000000..45a11e6 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Notifications/ChannelManager.php @@ -0,0 +1,174 @@ +app->make(Bus::class), $this->app->make(Dispatcher::class)) + )->send($notifiables, $notification); + } + + /** + * Send the given notification immediately. + * + * @param \Illuminate\Support\Collection|array|mixed $notifiables + * @param mixed $notification + * @param array|null $channels + * @return void + */ + public function sendNow($notifiables, $notification, array $channels = null) + { + return (new NotificationSender( + $this, $this->app->make(Bus::class), $this->app->make(Dispatcher::class)) + )->sendNow($notifiables, $notification, $channels); + } + + /** + * Get a channel instance. + * + * @param string|null $name + * @return mixed + */ + public function channel($name = null) + { + return $this->driver($name); + } + + /** + * Create an instance of the database driver. + * + * @return \Illuminate\Notifications\Channels\DatabaseChannel + */ + protected function createDatabaseDriver() + { + return $this->app->make(Channels\DatabaseChannel::class); + } + + /** + * Create an instance of the broadcast driver. + * + * @return \Illuminate\Notifications\Channels\BroadcastChannel + */ + protected function createBroadcastDriver() + { + return $this->app->make(Channels\BroadcastChannel::class); + } + + /** + * Create an instance of the mail driver. + * + * @return \Illuminate\Notifications\Channels\MailChannel + */ + protected function createMailDriver() + { + return $this->app->make(Channels\MailChannel::class)->setMarkdownResolver(function () { + return $this->app->make(Markdown::class); + }); + } + + /** + * Create an instance of the Nexmo driver. + * + * @return \Illuminate\Notifications\Channels\NexmoSmsChannel + */ + protected function createNexmoDriver() + { + return new Channels\NexmoSmsChannel( + new NexmoClient(new NexmoCredentials( + $this->app['config']['services.nexmo.key'], + $this->app['config']['services.nexmo.secret'] + )), + $this->app['config']['services.nexmo.sms_from'] + ); + } + + /** + * Create an instance of the Slack driver. + * + * @return \Illuminate\Notifications\Channels\SlackWebhookChannel + */ + protected function createSlackDriver() + { + return new Channels\SlackWebhookChannel(new HttpClient); + } + + /** + * Create a new driver instance. + * + * @param string $driver + * @return mixed + * + * @throws \InvalidArgumentException + */ + protected function createDriver($driver) + { + try { + return parent::createDriver($driver); + } catch (InvalidArgumentException $e) { + if (class_exists($driver)) { + return $this->app->make($driver); + } + + throw $e; + } + } + + /** + * Get the default channel driver name. + * + * @return string + */ + public function getDefaultDriver() + { + return $this->defaultChannel; + } + + /** + * Get the default channel driver name. + * + * @return string + */ + public function deliversVia() + { + return $this->getDefaultDriver(); + } + + /** + * Set the default channel driver name. + * + * @param string $channel + * @return void + */ + public function deliverVia($channel) + { + $this->defaultChannel = $channel; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Notifications/Channels/BroadcastChannel.php b/vendor/laravel/framework/src/Illuminate/Notifications/Channels/BroadcastChannel.php new file mode 100644 index 0000000..63f85ce --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Notifications/Channels/BroadcastChannel.php @@ -0,0 +1,77 @@ +events = $events; + } + + /** + * Send the given notification. + * + * @param mixed $notifiable + * @param \Illuminate\Notifications\Notification $notification + * @return array|null + */ + public function send($notifiable, Notification $notification) + { + $message = $this->getData($notifiable, $notification); + + $event = new BroadcastNotificationCreated( + $notifiable, $notification, is_array($message) ? $message : $message->data + ); + + if ($message instanceof BroadcastMessage) { + $event->onConnection($message->connection) + ->onQueue($message->queue); + } + + return $this->events->dispatch($event); + } + + /** + * Get the data for the notification. + * + * @param mixed $notifiable + * @param \Illuminate\Notifications\Notification $notification + * @return mixed + * + * @throws \RuntimeException + */ + protected function getData($notifiable, Notification $notification) + { + if (method_exists($notification, 'toBroadcast')) { + return $notification->toBroadcast($notifiable); + } + + if (method_exists($notification, 'toArray')) { + return $notification->toArray($notifiable); + } + + throw new RuntimeException( + 'Notification is missing toArray method.' + ); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Notifications/Channels/DatabaseChannel.php b/vendor/laravel/framework/src/Illuminate/Notifications/Channels/DatabaseChannel.php new file mode 100644 index 0000000..41767c3 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Notifications/Channels/DatabaseChannel.php @@ -0,0 +1,51 @@ +routeNotificationFor('database')->create([ + 'id' => $notification->id, + 'type' => get_class($notification), + 'data' => $this->getData($notifiable, $notification), + 'read_at' => null, + ]); + } + + /** + * Get the data for the notification. + * + * @param mixed $notifiable + * @param \Illuminate\Notifications\Notification $notification + * @return array + * + * @throws \RuntimeException + */ + protected function getData($notifiable, Notification $notification) + { + if (method_exists($notification, 'toDatabase')) { + return is_array($data = $notification->toDatabase($notifiable)) + ? $data : $data->data; + } + + if (method_exists($notification, 'toArray')) { + return $notification->toArray($notifiable); + } + + throw new RuntimeException( + 'Notification is missing toDatabase / toArray method.' + ); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Notifications/Channels/MailChannel.php b/vendor/laravel/framework/src/Illuminate/Notifications/Channels/MailChannel.php new file mode 100644 index 0000000..8116575 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Notifications/Channels/MailChannel.php @@ -0,0 +1,188 @@ +mailer = $mailer; + } + + /** + * Send the given notification. + * + * @param mixed $notifiable + * @param \Illuminate\Notifications\Notification $notification + * @return void + */ + public function send($notifiable, Notification $notification) + { + if (! $notifiable->routeNotificationFor('mail')) { + return; + } + + $message = $notification->toMail($notifiable); + + if ($message instanceof Mailable) { + return $message->send($this->mailer); + } + + $this->mailer->send($this->buildView($message), $message->data(), function ($mailMessage) use ($notifiable, $notification, $message) { + $this->buildMessage($mailMessage, $notifiable, $notification, $message); + }); + } + + /** + * Build the notification's view. + * + * @param \Illuminate\Notifications\Messages\MailMessage $message + * @return void + */ + protected function buildView($message) + { + if ($message->view) { + return $message->view; + } + + $markdown = call_user_func($this->markdownResolver); + + return [ + 'html' => $markdown->render($message->markdown, $message->data()), + 'text' => $markdown->renderText($message->markdown, $message->data()), + ]; + } + + /** + * Build the mail message. + * + * @param \Illuminate\Mail\Message $mailMessage + * @param mixed $notifiable + * @param \Illuminate\Notifications\Notification $notification + * @param \Illuminate\Notifications\Messages\MailMessage $message + * @return void + */ + protected function buildMessage($mailMessage, $notifiable, $notification, $message) + { + $this->addressMessage($mailMessage, $notifiable, $message); + + $mailMessage->subject($message->subject ?: Str::title( + Str::snake(class_basename($notification), ' ') + )); + + $this->addAttachments($mailMessage, $message); + + if (! is_null($message->priority)) { + $mailMessage->setPriority($message->priority); + } + } + + /** + * Address the mail message. + * + * @param \Illuminate\Mail\Message $mailMessage + * @param mixed $notifiable + * @param \Illuminate\Notifications\Messages\MailMessage $message + * @return void + */ + protected function addressMessage($mailMessage, $notifiable, $message) + { + $this->addSender($mailMessage, $message); + + $mailMessage->to($this->getRecipients($notifiable, $message)); + } + + /** + * Add the "from" and "reply to" addresses to the message. + * + * @param \Illuminate\Mail\Message $mailMessage + * @param \Illuminate\Notifications\Messages\MailMessage $message + * @return void + */ + protected function addSender($mailMessage, $message) + { + if (! empty($message->from)) { + $mailMessage->from($message->from[0], Arr::get($message->from, 1)); + } + + if (! empty($message->replyTo)) { + $mailMessage->replyTo($message->replyTo[0], Arr::get($message->replyTo, 1)); + } + } + + /** + * Get the recipients of the given message. + * + * @param mixed $notifiable + * @param \Illuminate\Notifications\Messages\MailMessage $message + * @return mixed + */ + protected function getRecipients($notifiable, $message) + { + if (is_string($recipients = $notifiable->routeNotificationFor('mail'))) { + $recipients = [$recipients]; + } + + return collect($recipients)->map(function ($recipient) { + return is_string($recipient) ? $recipient : $recipient->email; + })->all(); + } + + /** + * Add the attachments to the message. + * + * @param \Illuminate\Mail\Message $mailMessage + * @param \Illuminate\Notifications\Messages\MailMessage $message + * @return void + */ + protected function addAttachments($mailMessage, $message) + { + foreach ($message->attachments as $attachment) { + $mailMessage->attach($attachment['file'], $attachment['options']); + } + + foreach ($message->rawAttachments as $attachment) { + $mailMessage->attachData($attachment['data'], $attachment['name'], $attachment['options']); + } + } + + /** + * Set the Markdown resolver callback. + * + * @param \Closure $callback + * @return $this + */ + public function setMarkdownResolver(Closure $callback) + { + $this->markdownResolver = $callback; + + return $this; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Notifications/Channels/NexmoSmsChannel.php b/vendor/laravel/framework/src/Illuminate/Notifications/Channels/NexmoSmsChannel.php new file mode 100644 index 0000000..6193324 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Notifications/Channels/NexmoSmsChannel.php @@ -0,0 +1,64 @@ +from = $from; + $this->nexmo = $nexmo; + } + + /** + * Send the given notification. + * + * @param mixed $notifiable + * @param \Illuminate\Notifications\Notification $notification + * @return \Nexmo\Message\Message + */ + public function send($notifiable, Notification $notification) + { + if (! $to = $notifiable->routeNotificationFor('nexmo')) { + return; + } + + $message = $notification->toNexmo($notifiable); + + if (is_string($message)) { + $message = new NexmoMessage($message); + } + + return $this->nexmo->message()->send([ + 'type' => $message->type, + 'from' => $message->from ?: $this->from, + 'to' => $to, + 'text' => trim($message->content), + ]); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Notifications/Channels/SlackWebhookChannel.php b/vendor/laravel/framework/src/Illuminate/Notifications/Channels/SlackWebhookChannel.php new file mode 100644 index 0000000..77032e3 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Notifications/Channels/SlackWebhookChannel.php @@ -0,0 +1,114 @@ +http = $http; + } + + /** + * Send the given notification. + * + * @param mixed $notifiable + * @param \Illuminate\Notifications\Notification $notification + * @return \Psr\Http\Message\ResponseInterface + */ + public function send($notifiable, Notification $notification) + { + if (! $url = $notifiable->routeNotificationFor('slack')) { + return; + } + + $this->http->post($url, $this->buildJsonPayload( + $notification->toSlack($notifiable) + )); + } + + /** + * Build up a JSON payload for the Slack webhook. + * + * @param \Illuminate\Notifications\Messages\SlackMessage $message + * @return array + */ + protected function buildJsonPayload(SlackMessage $message) + { + $optionalFields = array_filter([ + 'channel' => data_get($message, 'channel'), + 'icon_emoji' => data_get($message, 'icon'), + 'icon_url' => data_get($message, 'image'), + 'link_names' => data_get($message, 'linkNames'), + 'username' => data_get($message, 'username'), + ]); + + return array_merge([ + 'json' => array_merge([ + 'text' => $message->content, + 'attachments' => $this->attachments($message), + ], $optionalFields), + ], $message->http); + } + + /** + * Format the message's attachments. + * + * @param \Illuminate\Notifications\Messages\SlackMessage $message + * @return array + */ + protected function attachments(SlackMessage $message) + { + return collect($message->attachments)->map(function ($attachment) use ($message) { + return array_filter([ + 'color' => $attachment->color ?: $message->color(), + 'fallback' => $attachment->fallback, + 'fields' => $this->fields($attachment), + 'footer' => $attachment->footer, + 'footer_icon' => $attachment->footerIcon, + 'image_url' => $attachment->imageUrl, + 'mrkdwn_in' => $attachment->markdown, + 'text' => $attachment->content, + 'title' => $attachment->title, + 'title_link' => $attachment->url, + 'ts' => $attachment->timestamp, + ]); + })->all(); + } + + /** + * Format the attachment's fields. + * + * @param \Illuminate\Notifications\Messages\SlackAttachment $attachment + * @return array + */ + protected function fields(SlackAttachment $attachment) + { + return collect($attachment->fields)->map(function ($value, $key) { + if ($value instanceof SlackAttachmentField) { + return $value->toArray(); + } + + return ['title' => $key, 'value' => $value, 'short' => true]; + })->values()->all(); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Notifications/Console/NotificationTableCommand.php b/vendor/laravel/framework/src/Illuminate/Notifications/Console/NotificationTableCommand.php new file mode 100644 index 0000000..09b0e3e --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Notifications/Console/NotificationTableCommand.php @@ -0,0 +1,81 @@ +files = $files; + $this->composer = $composer; + } + + /** + * Execute the console command. + * + * @return void + */ + public function fire() + { + $fullPath = $this->createBaseMigration(); + + $this->files->put($fullPath, $this->files->get(__DIR__.'/stubs/notifications.stub')); + + $this->info('Migration created successfully!'); + + $this->composer->dumpAutoloads(); + } + + /** + * Create a base migration file for the notifications. + * + * @return string + */ + protected function createBaseMigration() + { + $name = 'create_notifications_table'; + + $path = $this->laravel->databasePath().'/migrations'; + + return $this->laravel['migration.creator']->create($name, $path); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Notifications/Console/stubs/notifications.stub b/vendor/laravel/framework/src/Illuminate/Notifications/Console/stubs/notifications.stub new file mode 100644 index 0000000..fb16d5b --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Notifications/Console/stubs/notifications.stub @@ -0,0 +1,35 @@ +uuid('id')->primary(); + $table->string('type'); + $table->morphs('notifiable'); + $table->text('data'); + $table->timestamp('read_at')->nullable(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('notifications'); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Notifications/DatabaseNotification.php b/vendor/laravel/framework/src/Illuminate/Notifications/DatabaseNotification.php new file mode 100644 index 0000000..f50006e --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Notifications/DatabaseNotification.php @@ -0,0 +1,90 @@ + 'array', + 'read_at' => 'datetime', + ]; + + /** + * Get the notifiable entity that the notification belongs to. + */ + public function notifiable() + { + return $this->morphTo(); + } + + /** + * Mark the notification as read. + * + * @return void + */ + public function markAsRead() + { + if (is_null($this->read_at)) { + $this->forceFill(['read_at' => $this->freshTimestamp()])->save(); + } + } + + /** + * Determine if a notification has been read. + * + * @return bool + */ + public function read() + { + return $this->read_at !== null; + } + + /** + * Determine if a notification has not been read. + * + * @return bool + */ + public function unread() + { + return $this->read_at === null; + } + + /** + * Create a new database notification collection instance. + * + * @param array $models + * @return \Illuminate\Notifications\DatabaseNotificationCollection + */ + public function newCollection(array $models = []) + { + return new DatabaseNotificationCollection($models); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Notifications/DatabaseNotificationCollection.php b/vendor/laravel/framework/src/Illuminate/Notifications/DatabaseNotificationCollection.php new file mode 100644 index 0000000..5ef3f27 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Notifications/DatabaseNotificationCollection.php @@ -0,0 +1,20 @@ +each(function ($notification) { + $notification->markAsRead(); + }); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Notifications/Events/BroadcastNotificationCreated.php b/vendor/laravel/framework/src/Illuminate/Notifications/Events/BroadcastNotificationCreated.php new file mode 100644 index 0000000..c93fe5c --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Notifications/Events/BroadcastNotificationCreated.php @@ -0,0 +1,94 @@ +data = $data; + $this->notifiable = $notifiable; + $this->notification = $notification; + } + + /** + * Get the channels the event should broadcast on. + * + * @return array + */ + public function broadcastOn() + { + $channels = $this->notification->broadcastOn(); + + if (! empty($channels)) { + return $channels; + } + + return [new PrivateChannel($this->channelName())]; + } + + /** + * Get the data that should be sent with the broadcasted event. + * + * @return array + */ + public function broadcastWith() + { + return array_merge($this->data, [ + 'id' => $this->notification->id, + 'type' => get_class($this->notification), + ]); + } + + /** + * Get the broadcast channel name for the event. + * + * @return string + */ + protected function channelName() + { + if (method_exists($this->notifiable, 'receivesBroadcastNotificationsOn')) { + return $this->notifiable->receivesBroadcastNotificationsOn($this->notification); + } + + $class = str_replace('\\', '.', get_class($this->notifiable)); + + return $class.'.'.$this->notifiable->getKey(); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Notifications/Events/NotificationFailed.php b/vendor/laravel/framework/src/Illuminate/Notifications/Events/NotificationFailed.php new file mode 100644 index 0000000..1ddd965 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Notifications/Events/NotificationFailed.php @@ -0,0 +1,51 @@ +data = $data; + $this->channel = $channel; + $this->notifiable = $notifiable; + $this->notification = $notification; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Notifications/Events/NotificationSending.php b/vendor/laravel/framework/src/Illuminate/Notifications/Events/NotificationSending.php new file mode 100644 index 0000000..81a218e --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Notifications/Events/NotificationSending.php @@ -0,0 +1,42 @@ +channel = $channel; + $this->notifiable = $notifiable; + $this->notification = $notification; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Notifications/Events/NotificationSent.php b/vendor/laravel/framework/src/Illuminate/Notifications/Events/NotificationSent.php new file mode 100644 index 0000000..725d880 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Notifications/Events/NotificationSent.php @@ -0,0 +1,51 @@ +channel = $channel; + $this->response = $response; + $this->notifiable = $notifiable; + $this->notification = $notification; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Notifications/HasDatabaseNotifications.php b/vendor/laravel/framework/src/Illuminate/Notifications/HasDatabaseNotifications.php new file mode 100644 index 0000000..0b938b0 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Notifications/HasDatabaseNotifications.php @@ -0,0 +1,33 @@ +morphMany(DatabaseNotification::class, 'notifiable') + ->orderBy('created_at', 'desc'); + } + + /** + * Get the entity's read notifications. + */ + public function readNotifications() + { + return $this->notifications() + ->whereNotNull('read_at'); + } + + /** + * Get the entity's unread notifications. + */ + public function unreadNotifications() + { + return $this->notifications() + ->whereNull('read_at'); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Notifications/Messages/BroadcastMessage.php b/vendor/laravel/framework/src/Illuminate/Notifications/Messages/BroadcastMessage.php new file mode 100644 index 0000000..9884a8f --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Notifications/Messages/BroadcastMessage.php @@ -0,0 +1,41 @@ +data = $data; + } + + /** + * Set the message data. + * + * @param array $data + * @return $this + */ + public function data($data) + { + $this->data = $data; + + return $this; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Notifications/Messages/DatabaseMessage.php b/vendor/laravel/framework/src/Illuminate/Notifications/Messages/DatabaseMessage.php new file mode 100644 index 0000000..55707a7 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Notifications/Messages/DatabaseMessage.php @@ -0,0 +1,24 @@ +data = $data; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Notifications/Messages/MailMessage.php b/vendor/laravel/framework/src/Illuminate/Notifications/Messages/MailMessage.php new file mode 100644 index 0000000..cf3257e --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Notifications/Messages/MailMessage.php @@ -0,0 +1,178 @@ +view = $view; + $this->viewData = $data; + + $this->markdown = null; + + return $this; + } + + /** + * Set the Markdown template for the notification. + * + * @param string $view + * @param array $data + * @return $this + */ + public function markdown($view, array $data = []) + { + $this->markdown = $view; + $this->viewData = $data; + + $this->view = null; + + return $this; + } + + /** + * Set the from address for the mail message. + * + * @param string $address + * @param string|null $name + * @return $this + */ + public function from($address, $name = null) + { + $this->from = [$address, $name]; + + return $this; + } + + /** + * Set the "reply to" address of the message. + * + * @param array|string $address + * @param string|null $name + * @return $this + */ + public function replyTo($address, $name = null) + { + $this->replyTo = [$address, $name]; + + return $this; + } + + /** + * Attach a file to the message. + * + * @param string $file + * @param array $options + * @return $this + */ + public function attach($file, array $options = []) + { + $this->attachments[] = compact('file', 'options'); + + return $this; + } + + /** + * Attach in-memory data as an attachment. + * + * @param string $data + * @param string $name + * @param array $options + * @return $this + */ + public function attachData($data, $name, array $options = []) + { + $this->rawAttachments[] = compact('data', 'name', 'options'); + + return $this; + } + + /** + * Set the priority of this message. + * + * The value is an integer where 1 is the highest priority and 5 is the lowest. + * + * @param int $level + * @return $this + */ + public function priority($level) + { + $this->priority = $level; + + return $this; + } + + /** + * Get the data array for the mail message. + * + * @return array + */ + public function data() + { + return array_merge($this->toArray(), $this->viewData); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Notifications/Messages/NexmoMessage.php b/vendor/laravel/framework/src/Illuminate/Notifications/Messages/NexmoMessage.php new file mode 100644 index 0000000..293cf03 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Notifications/Messages/NexmoMessage.php @@ -0,0 +1,76 @@ +content = $content; + } + + /** + * Set the message content. + * + * @param string $content + * @return $this + */ + public function content($content) + { + $this->content = $content; + + return $this; + } + + /** + * Set the phone number the message should be sent from. + * + * @param string $from + * @return $this + */ + public function from($from) + { + $this->from = $from; + + return $this; + } + + /** + * Set the message type. + * + * @return $this + */ + public function unicode() + { + $this->type = 'unicode'; + + return $this; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Notifications/Messages/SimpleMessage.php b/vendor/laravel/framework/src/Illuminate/Notifications/Messages/SimpleMessage.php new file mode 100644 index 0000000..bbc7874 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Notifications/Messages/SimpleMessage.php @@ -0,0 +1,219 @@ +level = 'success'; + + return $this; + } + + /** + * Indicate that the notification gives information about an error. + * + * @return $this + */ + public function error() + { + $this->level = 'error'; + + return $this; + } + + /** + * Set the "level" of the notification (success, error, etc.). + * + * @param string $level + * @return $this + */ + public function level($level) + { + $this->level = $level; + + return $this; + } + + /** + * Set the subject of the notification. + * + * @param string $subject + * @return $this + */ + public function subject($subject) + { + $this->subject = $subject; + + return $this; + } + + /** + * Set the greeting of the notification. + * + * @param string $greeting + * @return $this + */ + public function greeting($greeting) + { + $this->greeting = $greeting; + + return $this; + } + + /** + * Set the salutation of the notification. + * + * @param string $salutation + * @return $this + */ + public function salutation($salutation) + { + $this->salutation = $salutation; + + return $this; + } + + /** + * Add a line of text to the notification. + * + * @param \Illuminate\Notifications\Action|string $line + * @return $this + */ + public function line($line) + { + return $this->with($line); + } + + /** + * Add a line of text to the notification. + * + * @param \Illuminate\Notifications\Action|string|array $line + * @return $this + */ + public function with($line) + { + if ($line instanceof Action) { + $this->action($line->text, $line->url); + } elseif (! $this->actionText) { + $this->introLines[] = $this->formatLine($line); + } else { + $this->outroLines[] = $this->formatLine($line); + } + + return $this; + } + + /** + * Format the given line of text. + * + * @param string|array $line + * @return string + */ + protected function formatLine($line) + { + if (is_array($line)) { + return implode(' ', array_map('trim', $line)); + } + + return trim(implode(' ', array_map('trim', preg_split('/\\r\\n|\\r|\\n/', $line)))); + } + + /** + * Configure the "call to action" button. + * + * @param string $text + * @param string $url + * @return $this + */ + public function action($text, $url) + { + $this->actionText = $text; + $this->actionUrl = $url; + + return $this; + } + + /** + * Get an array representation of the message. + * + * @return array + */ + public function toArray() + { + return [ + 'level' => $this->level, + 'subject' => $this->subject, + 'greeting' => $this->greeting, + 'salutation' => $this->salutation, + 'introLines' => $this->introLines, + 'outroLines' => $this->outroLines, + 'actionText' => $this->actionText, + 'actionUrl' => $this->actionUrl, + ]; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Notifications/Messages/SlackAttachment.php b/vendor/laravel/framework/src/Illuminate/Notifications/Messages/SlackAttachment.php new file mode 100644 index 0000000..a2e49cf --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Notifications/Messages/SlackAttachment.php @@ -0,0 +1,241 @@ +title = $title; + $this->url = $url; + + return $this; + } + + /** + * Set the content (text) of the attachment. + * + * @param string $content + * @return $this + */ + public function content($content) + { + $this->content = $content; + + return $this; + } + + /** + * A plain-text summary of the attachment. + * + * @param string $fallback + * @return $this + */ + public function fallback($fallback) + { + $this->fallback = $fallback; + + return $this; + } + + /** + * Set the color of the attachment. + * + * @param string $color + * @return $this + */ + public function color($color) + { + $this->color = $color; + + return $this; + } + + /** + * Add a field to the attachment. + * + * @param \Closure|string $title + * @param string $content + * @return $this + */ + public function field($title, $content = '') + { + if (is_callable($title)) { + $callback = $title; + + $callback($attachmentField = new SlackAttachmentField); + + $this->fields[] = $attachmentField; + + return $this; + } + + $this->fields[$title] = $content; + + return $this; + } + + /** + * Set the fields of the attachment. + * + * @param array $fields + * @return $this + */ + public function fields(array $fields) + { + $this->fields = $fields; + + return $this; + } + + /** + * Set the fields containing markdown. + * + * @param array $fields + * @return $this + */ + public function markdown(array $fields) + { + $this->markdown = $fields; + + return $this; + } + + /** + * Set the image URL. + * + * @param string $url + * @return $this + */ + public function image($url) + { + $this->imageUrl = $url; + + return $this; + } + + /** + * Set the footer content. + * + * @param string $footer + * @return $this + */ + public function footer($footer) + { + $this->footer = $footer; + + return $this; + } + + /** + * Set the footer icon. + * + * @param string $icon + * @return $this + */ + public function footerIcon($icon) + { + $this->footerIcon = $icon; + + return $this; + } + + /** + * Set the timestamp. + * + * @param Carbon $timestamp + * @return $this + */ + public function timestamp(Carbon $timestamp) + { + $this->timestamp = $timestamp->getTimestamp(); + + return $this; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Notifications/Messages/SlackAttachmentField.php b/vendor/laravel/framework/src/Illuminate/Notifications/Messages/SlackAttachmentField.php new file mode 100644 index 0000000..f63bb26 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Notifications/Messages/SlackAttachmentField.php @@ -0,0 +1,79 @@ +title = $title; + + return $this; + } + + /** + * Set the content of the field. + * + * @param string $content + * @return $this + */ + public function content($content) + { + $this->content = $content; + + return $this; + } + + /** + * Indicates that the content should not be displayed side-by-side with other fields. + * + * @return $this + */ + public function long() + { + $this->short = false; + + return $this; + } + + /** + * Get the array representation of the attachment field. + * + * @return array + */ + public function toArray() + { + return [ + 'title' => $this->title, + 'value' => $this->content, + 'short' => $this->short, + ]; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Notifications/Messages/SlackMessage.php b/vendor/laravel/framework/src/Illuminate/Notifications/Messages/SlackMessage.php new file mode 100644 index 0000000..cb0104f --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Notifications/Messages/SlackMessage.php @@ -0,0 +1,221 @@ +level = 'success'; + + return $this; + } + + /** + * Indicate that the notification gives information about a warning. + * + * @return $this + */ + public function warning() + { + $this->level = 'warning'; + + return $this; + } + + /** + * Indicate that the notification gives information about an error. + * + * @return $this + */ + public function error() + { + $this->level = 'error'; + + return $this; + } + + /** + * Set a custom username and optional emoji icon for the Slack message. + * + * @param string $username + * @param string|null $icon + * @return $this + */ + public function from($username, $icon = null) + { + $this->username = $username; + + if (! is_null($icon)) { + $this->icon = $icon; + } + + return $this; + } + + /** + * Set a custom image icon the message should use. + * + * @param string $channel + * @return $this + */ + public function image($image) + { + $this->image = $image; + + return $this; + } + + /** + * Set the Slack channel the message should be sent to. + * + * @param string $channel + * @return $this + */ + public function to($channel) + { + $this->channel = $channel; + + return $this; + } + + /** + * Set the content of the Slack message. + * + * @param string $content + * @return $this + */ + public function content($content) + { + $this->content = $content; + + return $this; + } + + /** + * Define an attachment for the message. + * + * @param \Closure $callback + * @return $this + */ + public function attachment(Closure $callback) + { + $this->attachments[] = $attachment = new SlackAttachment; + + $callback($attachment); + + return $this; + } + + /** + * Get the color for the message. + * + * @return string + */ + public function color() + { + switch ($this->level) { + case 'success': + return 'good'; + case 'error': + return 'danger'; + case 'warning': + return 'warning'; + } + } + + /** + * Find and link channel names and usernames. + * + * @return $this + */ + public function linkNames() + { + $this->linkNames = 1; + + return $this; + } + + /** + * Set additional request options for the Guzzle HTTP client. + * + * @param array $options + * @return $this + */ + public function http(array $options) + { + $this->http = $options; + + return $this; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Notifications/Notifiable.php b/vendor/laravel/framework/src/Illuminate/Notifications/Notifiable.php new file mode 100644 index 0000000..82381e1 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Notifications/Notifiable.php @@ -0,0 +1,8 @@ +bus = $bus; + $this->events = $events; + $this->manager = $manager; + } + + /** + * Send the given notification to the given notifiable entities. + * + * @param \Illuminate\Support\Collection|array|mixed $notifiables + * @param mixed $notification + * @return void + */ + public function send($notifiables, $notification) + { + $notifiables = $this->formatNotifiables($notifiables); + + if ($notification instanceof ShouldQueue) { + return $this->queueNotification($notifiables, $notification); + } + + return $this->sendNow($notifiables, $notification); + } + + /** + * Send the given notification immediately. + * + * @param \Illuminate\Support\Collection|array|mixed $notifiables + * @param mixed $notification + * @param array $channels + * @return void + */ + public function sendNow($notifiables, $notification, array $channels = null) + { + $notifiables = $this->formatNotifiables($notifiables); + + $original = clone $notification; + + foreach ($notifiables as $notifiable) { + $notificationId = Uuid::uuid4()->toString(); + + if (empty($viaChannels = $channels ?: $notification->via($notifiable))) { + continue; + } + + foreach ($viaChannels as $channel) { + $this->sendToNotifiable($notifiable, $notificationId, clone $original, $channel); + } + } + } + + /** + * Send the given notification to the given notifiable via a channel. + * + * @param mixed $notifiable + * @param string $id + * @param mixed $notification + * @param string $channel + * @return void + */ + protected function sendToNotifiable($notifiable, $id, $notification, $channel) + { + if (! $notification->id) { + $notification->id = $id; + } + + if (! $this->shouldSendNotification($notifiable, $notification, $channel)) { + return; + } + + $response = $this->manager->driver($channel)->send($notifiable, $notification); + + $this->events->dispatch( + new Events\NotificationSent($notifiable, $notification, $channel, $response) + ); + } + + /** + * Determines if the notification can be sent. + * + * @param mixed $notifiable + * @param mixed $notification + * @param string $channel + * @return bool + */ + protected function shouldSendNotification($notifiable, $notification, $channel) + { + return $this->events->until( + new Events\NotificationSending($notifiable, $notification, $channel) + ) !== false; + } + + /** + * Queue the given notification instances. + * + * @param mixed $notifiables + * @param array[\Illuminate\Notifications\Channels\Notification] $notification + * @return void + */ + protected function queueNotification($notifiables, $notification) + { + $notifiables = $this->formatNotifiables($notifiables); + + $original = clone $notification; + + foreach ($notifiables as $notifiable) { + $notificationId = Uuid::uuid4()->toString(); + + foreach ($original->via($notifiable) as $channel) { + $notification = clone $original; + + $notification->id = $notificationId; + + $this->bus->dispatch( + (new SendQueuedNotifications($this->formatNotifiables($notifiable), $notification, [$channel])) + ->onConnection($notification->connection) + ->onQueue($notification->queue) + ->delay($notification->delay) + ); + } + } + } + + /** + * Format the notifiables into a Collection / array if necessary. + * + * @param mixed $notifiables + * @return ModelCollection|array + */ + protected function formatNotifiables($notifiables) + { + if (! $notifiables instanceof Collection && ! is_array($notifiables)) { + return $notifiables instanceof Model + ? new ModelCollection([$notifiables]) : [$notifiables]; + } + + return $notifiables; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Notifications/NotificationServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Notifications/NotificationServiceProvider.php new file mode 100644 index 0000000..e8909f4 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Notifications/NotificationServiceProvider.php @@ -0,0 +1,46 @@ +loadViewsFrom(__DIR__.'/resources/views', 'notifications'); + + if ($this->app->runningInConsole()) { + $this->publishes([ + __DIR__.'/resources/views' => $this->app->resourcePath('views/vendor/notifications'), + ], 'laravel-notifications'); + } + } + + /** + * Register the service provider. + * + * @return void + */ + public function register() + { + $this->app->singleton(ChannelManager::class, function ($app) { + return new ChannelManager($app); + }); + + $this->app->alias( + ChannelManager::class, DispatcherContract::class + ); + + $this->app->alias( + ChannelManager::class, FactoryContract::class + ); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Notifications/RoutesNotifications.php b/vendor/laravel/framework/src/Illuminate/Notifications/RoutesNotifications.php new file mode 100644 index 0000000..bedbe96 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Notifications/RoutesNotifications.php @@ -0,0 +1,42 @@ +send($this, $instance); + } + + /** + * Get the notification routing information for the given driver. + * + * @param string $driver + * @return mixed + */ + public function routeNotificationFor($driver) + { + if (method_exists($this, $method = 'routeNotificationFor'.Str::studly($driver))) { + return $this->{$method}(); + } + + switch ($driver) { + case 'database': + return $this->notifications(); + case 'mail': + return $this->email; + case 'nexmo': + return $this->phone_number; + } + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Notifications/SendQueuedNotifications.php b/vendor/laravel/framework/src/Illuminate/Notifications/SendQueuedNotifications.php new file mode 100644 index 0000000..8463ea4 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Notifications/SendQueuedNotifications.php @@ -0,0 +1,69 @@ +channels = $channels; + $this->notifiables = $notifiables; + $this->notification = $notification; + } + + /** + * Send the notifications. + * + * @param \Illuminate\Notifications\ChannelManager $manager + * @return void + */ + public function handle(ChannelManager $manager) + { + $manager->sendNow($this->notifiables, $this->notification, $this->channels); + } + + /** + * Get the display name for the queued job. + * + * @return string + */ + public function displayName() + { + return get_class($this->notification); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Notifications/composer.json b/vendor/laravel/framework/src/Illuminate/Notifications/composer.json new file mode 100644 index 0000000..a8c1cc8 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Notifications/composer.json @@ -0,0 +1,47 @@ +{ + "name": "illuminate/notifications", + "description": "The Illuminate Notifications package.", + "license": "MIT", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "require": { + "php": ">=5.6.4", + "illuminate/broadcasting": "5.4.*", + "illuminate/bus": "5.4.*", + "illuminate/container": "5.4.*", + "illuminate/contracts": "5.4.*", + "illuminate/filesystem": "5.4.*", + "illuminate/mail": "5.4.*", + "illuminate/queue": "5.4.*", + "illuminate/support": "5.4.*", + "ramsey/uuid": "~3.0" + }, + "autoload": { + "psr-4": { + "Illuminate\\Notifications\\": "" + } + }, + "extra": { + "branch-alias": { + "dev-master": "5.4-dev" + } + }, + "suggest": { + "guzzlehttp/guzzle": "Required to use the Slack transport (~6.0).", + "illuminate/database": "Required to use the database transport (5.4.*).", + "nexmo/client": "Required to use the Nexmo transport (~1.0)." + }, + "config": { + "sort-packages": true + }, + "minimum-stability": "dev" +} diff --git a/vendor/laravel/framework/src/Illuminate/Notifications/resources/views/email.blade.php b/vendor/laravel/framework/src/Illuminate/Notifications/resources/views/email.blade.php new file mode 100644 index 0000000..66a35f5 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Notifications/resources/views/email.blade.php @@ -0,0 +1,58 @@ +@component('mail::message') +{{-- Greeting --}} +@if (! empty($greeting)) +# {{ $greeting }} +@else +@if ($level == 'error') +# Whoops! +@else +# Hello! +@endif +@endif + +{{-- Intro Lines --}} +@foreach ($introLines as $line) +{{ $line }} + +@endforeach + +{{-- Action Button --}} +@if (isset($actionText)) + +@component('mail::button', ['url' => $actionUrl, 'color' => $color]) +{{ $actionText }} +@endcomponent +@endif + +{{-- Outro Lines --}} +@foreach ($outroLines as $line) +{{ $line }} + +@endforeach + + +@if (! empty($salutation)) +{{ $salutation }} +@else +Regards,
{{ config('app.name') }} +@endif + + +@if (isset($actionText)) +@component('mail::subcopy') +If you’re having trouble clicking the "{{ $actionText }}" button, copy and paste the URL below +into your web browser: [{{ $actionUrl }}]({{ $actionUrl }}) +@endcomponent +@endif +@endcomponent diff --git a/vendor/laravel/framework/src/Illuminate/Pagination/AbstractPaginator.php b/vendor/laravel/framework/src/Illuminate/Pagination/AbstractPaginator.php new file mode 100644 index 0000000..0e239ba --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Pagination/AbstractPaginator.php @@ -0,0 +1,577 @@ += 1 && filter_var($page, FILTER_VALIDATE_INT) !== false; + } + + /** + * Get the URL for the previous page. + * + * @return string|null + */ + public function previousPageUrl() + { + if ($this->currentPage() > 1) { + return $this->url($this->currentPage() - 1); + } + } + + /** + * Create a range of pagination URLs. + * + * @param int $start + * @param int $end + * @return array + */ + public function getUrlRange($start, $end) + { + return collect(range($start, $end))->mapWithKeys(function ($page) { + return [$page => $this->url($page)]; + })->all(); + } + + /** + * Get the URL for a given page number. + * + * @param int $page + * @return string + */ + public function url($page) + { + if ($page <= 0) { + $page = 1; + } + + // If we have any extra query string key / value pairs that need to be added + // onto the URL, we will put them in query string form and then attach it + // to the URL. This allows for extra information like sortings storage. + $parameters = [$this->pageName => $page]; + + if (count($this->query) > 0) { + $parameters = array_merge($this->query, $parameters); + } + + return $this->path + .(Str::contains($this->path, '?') ? '&' : '?') + .http_build_query($parameters, '', '&') + .$this->buildFragment(); + } + + /** + * Get / set the URL fragment to be appended to URLs. + * + * @param string|null $fragment + * @return $this|string|null + */ + public function fragment($fragment = null) + { + if (is_null($fragment)) { + return $this->fragment; + } + + $this->fragment = $fragment; + + return $this; + } + + /** + * Add a set of query string values to the paginator. + * + * @param array|string $key + * @param string|null $value + * @return $this + */ + public function appends($key, $value = null) + { + if (is_array($key)) { + return $this->appendArray($key); + } + + return $this->addQuery($key, $value); + } + + /** + * Add an array of query string values. + * + * @param array $keys + * @return $this + */ + protected function appendArray(array $keys) + { + foreach ($keys as $key => $value) { + $this->addQuery($key, $value); + } + + return $this; + } + + /** + * Add a query string value to the paginator. + * + * @param string $key + * @param string $value + * @return $this + */ + protected function addQuery($key, $value) + { + if ($key !== $this->pageName) { + $this->query[$key] = $value; + } + + return $this; + } + + /** + * Build the full fragment portion of a URL. + * + * @return string + */ + protected function buildFragment() + { + return $this->fragment ? '#'.$this->fragment : ''; + } + + /** + * Get the slice of items being paginated. + * + * @return array + */ + public function items() + { + return $this->items->all(); + } + + /** + * Get the number of the first item in the slice. + * + * @return int + */ + public function firstItem() + { + return count($this->items) > 0 ? ($this->currentPage - 1) * $this->perPage + 1 : null; + } + + /** + * Get the number of the last item in the slice. + * + * @return int + */ + public function lastItem() + { + return count($this->items) > 0 ? $this->firstItem() + $this->count() - 1 : null; + } + + /** + * Get the number of items shown per page. + * + * @return int + */ + public function perPage() + { + return $this->perPage; + } + + /** + * Determine if there are enough items to split into multiple pages. + * + * @return bool + */ + public function hasPages() + { + return $this->currentPage() != 1 || $this->hasMorePages(); + } + + /** + * Determine if the paginator is on the first page. + * + * @return bool + */ + public function onFirstPage() + { + return $this->currentPage() <= 1; + } + + /** + * Get the current page. + * + * @return int + */ + public function currentPage() + { + return $this->currentPage; + } + + /** + * Get the query string variable used to store the page. + * + * @return string + */ + public function getPageName() + { + return $this->pageName; + } + + /** + * Set the query string variable used to store the page. + * + * @param string $name + * @return $this + */ + public function setPageName($name) + { + $this->pageName = $name; + + return $this; + } + + /** + * Set the base path to assign to all URLs. + * + * @param string $path + * @return $this + */ + public function withPath($path) + { + return $this->setPath($path); + } + + /** + * Set the base path to assign to all URLs. + * + * @param string $path + * @return $this + */ + public function setPath($path) + { + $this->path = $path; + + return $this; + } + + /** + * Resolve the current request path or return the default value. + * + * @param string $default + * @return string + */ + public static function resolveCurrentPath($default = '/') + { + if (isset(static::$currentPathResolver)) { + return call_user_func(static::$currentPathResolver); + } + + return $default; + } + + /** + * Set the current request path resolver callback. + * + * @param \Closure $resolver + * @return void + */ + public static function currentPathResolver(Closure $resolver) + { + static::$currentPathResolver = $resolver; + } + + /** + * Resolve the current page or return the default value. + * + * @param string $pageName + * @param int $default + * @return int + */ + public static function resolveCurrentPage($pageName = 'page', $default = 1) + { + if (isset(static::$currentPageResolver)) { + return call_user_func(static::$currentPageResolver, $pageName); + } + + return $default; + } + + /** + * Set the current page resolver callback. + * + * @param \Closure $resolver + * @return void + */ + public static function currentPageResolver(Closure $resolver) + { + static::$currentPageResolver = $resolver; + } + + /** + * Get an instance of the view factory from the resolver. + * + * @return \Illuminate\Contracts\View\Factory + */ + public static function viewFactory() + { + return call_user_func(static::$viewFactoryResolver); + } + + /** + * Set the view factory resolver callback. + * + * @param \Closure $resolver + * @return void + */ + public static function viewFactoryResolver(Closure $resolver) + { + static::$viewFactoryResolver = $resolver; + } + + /** + * Set the default pagination view. + * + * @param string $view + * @return void + */ + public static function defaultView($view) + { + static::$defaultView = $view; + } + + /** + * Set the default "simple" pagination view. + * + * @param string $view + * @return void + */ + public static function defaultSimpleView($view) + { + static::$defaultSimpleView = $view; + } + + /** + * Get an iterator for the items. + * + * @return \ArrayIterator + */ + public function getIterator() + { + return new ArrayIterator($this->items->all()); + } + + /** + * Determine if the list of items is empty or not. + * + * @return bool + */ + public function isEmpty() + { + return $this->items->isEmpty(); + } + + /** + * Get the number of items for the current page. + * + * @return int + */ + public function count() + { + return $this->items->count(); + } + + /** + * Get the paginator's underlying collection. + * + * @return \Illuminate\Support\Collection + */ + public function getCollection() + { + return $this->items; + } + + /** + * Set the paginator's underlying collection. + * + * @param \Illuminate\Support\Collection $collection + * @return $this + */ + public function setCollection(Collection $collection) + { + $this->items = $collection; + + return $this; + } + + /** + * Determine if the given item exists. + * + * @param mixed $key + * @return bool + */ + public function offsetExists($key) + { + return $this->items->has($key); + } + + /** + * Get the item at the given offset. + * + * @param mixed $key + * @return mixed + */ + public function offsetGet($key) + { + return $this->items->get($key); + } + + /** + * Set the item at the given offset. + * + * @param mixed $key + * @param mixed $value + * @return void + */ + public function offsetSet($key, $value) + { + $this->items->put($key, $value); + } + + /** + * Unset the item at the given key. + * + * @param mixed $key + * @return void + */ + public function offsetUnset($key) + { + $this->items->forget($key); + } + + /** + * Render the contents of the paginator to HTML. + * + * @return string + */ + public function toHtml() + { + return (string) $this->render(); + } + + /** + * Make dynamic calls into the collection. + * + * @param string $method + * @param array $parameters + * @return mixed + */ + public function __call($method, $parameters) + { + return $this->getCollection()->$method(...$parameters); + } + + /** + * Render the contents of the paginator when casting to string. + * + * @return string + */ + public function __toString() + { + return (string) $this->render(); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Pagination/LengthAwarePaginator.php b/vendor/laravel/framework/src/Illuminate/Pagination/LengthAwarePaginator.php new file mode 100644 index 0000000..67a04a9 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Pagination/LengthAwarePaginator.php @@ -0,0 +1,196 @@ + $value) { + $this->{$key} = $value; + } + + $this->total = $total; + $this->perPage = $perPage; + $this->lastPage = (int) ceil($total / $perPage); + $this->path = $this->path != '/' ? rtrim($this->path, '/') : $this->path; + $this->currentPage = $this->setCurrentPage($currentPage, $this->pageName); + $this->items = $items instanceof Collection ? $items : Collection::make($items); + } + + /** + * Get the current page for the request. + * + * @param int $currentPage + * @param string $pageName + * @return int + */ + protected function setCurrentPage($currentPage, $pageName) + { + $currentPage = $currentPage ?: static::resolveCurrentPage($pageName); + + return $this->isValidPageNumber($currentPage) ? (int) $currentPage : 1; + } + + /** + * Render the paginator using the given view. + * + * @param string $view + * @param array $data + * @return string + */ + public function links($view = null, $data = []) + { + return $this->render($view, $data); + } + + /** + * Render the paginator using the given view. + * + * @param string $view + * @param array $data + * @return string + */ + public function render($view = null, $data = []) + { + return new HtmlString(static::viewFactory()->make($view ?: static::$defaultView, array_merge($data, [ + 'paginator' => $this, + 'elements' => $this->elements(), + ]))->render()); + } + + /** + * Get the array of elements to pass to the view. + * + * @return array + */ + protected function elements() + { + $window = UrlWindow::make($this); + + return array_filter([ + $window['first'], + is_array($window['slider']) ? '...' : null, + $window['slider'], + is_array($window['last']) ? '...' : null, + $window['last'], + ]); + } + + /** + * Get the total number of items being paginated. + * + * @return int + */ + public function total() + { + return $this->total; + } + + /** + * Determine if there are more items in the data source. + * + * @return bool + */ + public function hasMorePages() + { + return $this->currentPage() < $this->lastPage(); + } + + /** + * Get the URL for the next page. + * + * @return string|null + */ + public function nextPageUrl() + { + if ($this->lastPage() > $this->currentPage()) { + return $this->url($this->currentPage() + 1); + } + } + + /** + * Get the last page. + * + * @return int + */ + public function lastPage() + { + return $this->lastPage; + } + + /** + * Get the instance as an array. + * + * @return array + */ + public function toArray() + { + return [ + 'total' => $this->total(), + 'per_page' => $this->perPage(), + 'current_page' => $this->currentPage(), + 'last_page' => $this->lastPage(), + 'next_page_url' => $this->nextPageUrl(), + 'prev_page_url' => $this->previousPageUrl(), + 'from' => $this->firstItem(), + 'to' => $this->lastItem(), + 'data' => $this->items->toArray(), + ]; + } + + /** + * Convert the object into something JSON serializable. + * + * @return array + */ + public function jsonSerialize() + { + return $this->toArray(); + } + + /** + * Convert the object to its JSON representation. + * + * @param int $options + * @return string + */ + public function toJson($options = 0) + { + return json_encode($this->jsonSerialize(), $options); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Pagination/PaginationServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Pagination/PaginationServiceProvider.php new file mode 100755 index 0000000..d5ca6da --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Pagination/PaginationServiceProvider.php @@ -0,0 +1,50 @@ +loadViewsFrom(__DIR__.'/resources/views', 'pagination'); + + if ($this->app->runningInConsole()) { + $this->publishes([ + __DIR__.'/resources/views' => $this->app->resourcePath('views/vendor/pagination'), + ], 'laravel-pagination'); + } + } + + /** + * Register the service provider. + * + * @return void + */ + public function register() + { + Paginator::viewFactoryResolver(function () { + return $this->app['view']; + }); + + Paginator::currentPathResolver(function () { + return $this->app['request']->url(); + }); + + Paginator::currentPageResolver(function ($pageName = 'page') { + $page = $this->app['request']->input($pageName); + + if (filter_var($page, FILTER_VALIDATE_INT) !== false && (int) $page >= 1) { + return $page; + } + + return 1; + }); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Pagination/Paginator.php b/vendor/laravel/framework/src/Illuminate/Pagination/Paginator.php new file mode 100644 index 0000000..61cef77 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Pagination/Paginator.php @@ -0,0 +1,175 @@ + $value) { + $this->{$key} = $value; + } + + $this->perPage = $perPage; + $this->currentPage = $this->setCurrentPage($currentPage); + $this->path = $this->path != '/' ? rtrim($this->path, '/') : $this->path; + + $this->setItems($items); + } + + /** + * Get the current page for the request. + * + * @param int $currentPage + * @return int + */ + protected function setCurrentPage($currentPage) + { + $currentPage = $currentPage ?: static::resolveCurrentPage(); + + return $this->isValidPageNumber($currentPage) ? (int) $currentPage : 1; + } + + /** + * Set the items for the paginator. + * + * @param mixed $items + * @return void + */ + protected function setItems($items) + { + $this->items = $items instanceof Collection ? $items : Collection::make($items); + + $this->hasMore = count($this->items) > ($this->perPage); + + $this->items = $this->items->slice(0, $this->perPage); + } + + /** + * Get the URL for the next page. + * + * @return string|null + */ + public function nextPageUrl() + { + if ($this->hasMorePages()) { + return $this->url($this->currentPage() + 1); + } + } + + /** + * Render the paginator using the given view. + * + * @param string|null $view + * @param array $data + * @return string + */ + public function links($view = null, $data = []) + { + return $this->render($view, $data); + } + + /** + * Render the paginator using the given view. + * + * @param string|null $view + * @param array $data + * @return string + */ + public function render($view = null, $data = []) + { + return new HtmlString( + static::viewFactory()->make($view ?: static::$defaultSimpleView, array_merge($data, [ + 'paginator' => $this, + ]))->render() + ); + } + + /** + * Manually indicate that the paginator does have more pages. + * + * @param bool $value + * @return $this + */ + public function hasMorePagesWhen($value = true) + { + $this->hasMore = $value; + + return $this; + } + + /** + * Determine if there are more items in the data source. + * + * @return bool + */ + public function hasMorePages() + { + return $this->hasMore; + } + + /** + * Get the instance as an array. + * + * @return array + */ + 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(), + ]; + } + + /** + * Convert the object into something JSON serializable. + * + * @return array + */ + public function jsonSerialize() + { + return $this->toArray(); + } + + /** + * Convert the object to its JSON representation. + * + * @param int $options + * @return string + */ + public function toJson($options = 0) + { + return json_encode($this->jsonSerialize(), $options); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Pagination/UrlWindow.php b/vendor/laravel/framework/src/Illuminate/Pagination/UrlWindow.php new file mode 100644 index 0000000..6ec0b0c --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Pagination/UrlWindow.php @@ -0,0 +1,218 @@ +paginator = $paginator; + } + + /** + * Create a new URL window instance. + * + * @param \Illuminate\Contracts\Pagination\LengthAwarePaginator $paginator + * @param int $onEachSide + * @return array + */ + public static function make(PaginatorContract $paginator, $onEachSide = 3) + { + return (new static($paginator))->get($onEachSide); + } + + /** + * Get the window of URLs to be shown. + * + * @param int $onEachSide + * @return array + */ + public function get($onEachSide = 3) + { + if ($this->paginator->lastPage() < ($onEachSide * 2) + 6) { + return $this->getSmallSlider(); + } + + return $this->getUrlSlider($onEachSide); + } + + /** + * Get the slider of URLs there are not enough pages to slide. + * + * @return array + */ + protected function getSmallSlider() + { + return [ + 'first' => $this->paginator->getUrlRange(1, $this->lastPage()), + 'slider' => null, + 'last' => null, + ]; + } + + /** + * Create a URL slider links. + * + * @param int $onEachSide + * @return array + */ + protected function getUrlSlider($onEachSide) + { + $window = $onEachSide * 2; + + if (! $this->hasPages()) { + return ['first' => null, 'slider' => null, 'last' => null]; + } + + // If the current page is very close to the beginning of the page range, we will + // just render the beginning of the page range, followed by the last 2 of the + // links in this list, since we will not have room to create a full slider. + if ($this->currentPage() <= $window) { + return $this->getSliderTooCloseToBeginning($window); + } + + // If the current page is close to the ending of the page range we will just get + // this first couple pages, followed by a larger window of these ending pages + // since we're too close to the end of the list to create a full on slider. + elseif ($this->currentPage() > ($this->lastPage() - $window)) { + return $this->getSliderTooCloseToEnding($window); + } + + // If we have enough room on both sides of the current page to build a slider we + // will surround it with both the beginning and ending caps, with this window + // of pages in the middle providing a Google style sliding paginator setup. + return $this->getFullSlider($onEachSide); + } + + /** + * Get the slider of URLs when too close to beginning of window. + * + * @param int $window + * @return array + */ + protected function getSliderTooCloseToBeginning($window) + { + return [ + 'first' => $this->paginator->getUrlRange(1, $window + 2), + 'slider' => null, + 'last' => $this->getFinish(), + ]; + } + + /** + * Get the slider of URLs when too close to ending of window. + * + * @param int $window + * @return array + */ + protected function getSliderTooCloseToEnding($window) + { + $last = $this->paginator->getUrlRange( + $this->lastPage() - ($window + 2), + $this->lastPage() + ); + + return [ + 'first' => $this->getStart(), + 'slider' => null, + 'last' => $last, + ]; + } + + /** + * Get the slider of URLs when a full slider can be made. + * + * @param int $onEachSide + * @return array + */ + protected function getFullSlider($onEachSide) + { + return [ + 'first' => $this->getStart(), + 'slider' => $this->getAdjacentUrlRange($onEachSide), + 'last' => $this->getFinish(), + ]; + } + + /** + * Get the page range for the current page window. + * + * @param int $onEachSide + * @return array + */ + public function getAdjacentUrlRange($onEachSide) + { + return $this->paginator->getUrlRange( + $this->currentPage() - $onEachSide, + $this->currentPage() + $onEachSide + ); + } + + /** + * Get the starting URLs of a pagination slider. + * + * @return array + */ + public function getStart() + { + return $this->paginator->getUrlRange(1, 2); + } + + /** + * Get the ending URLs of a pagination slider. + * + * @return array + */ + public function getFinish() + { + return $this->paginator->getUrlRange( + $this->lastPage() - 1, + $this->lastPage() + ); + } + + /** + * Determine if the underlying paginator being presented has pages to show. + * + * @return bool + */ + public function hasPages() + { + return $this->paginator->lastPage() > 1; + } + + /** + * Get the current page from the paginator. + * + * @return int + */ + protected function currentPage() + { + return $this->paginator->currentPage(); + } + + /** + * Get the last page from the paginator. + * + * @return int + */ + protected function lastPage() + { + return $this->paginator->lastPage(); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Pagination/composer.json b/vendor/laravel/framework/src/Illuminate/Pagination/composer.json new file mode 100755 index 0000000..09563f6 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Pagination/composer.json @@ -0,0 +1,35 @@ +{ + "name": "illuminate/pagination", + "description": "The Illuminate Pagination package.", + "license": "MIT", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "require": { + "php": ">=5.6.4", + "illuminate/contracts": "5.4.*", + "illuminate/support": "5.4.*" + }, + "autoload": { + "psr-4": { + "Illuminate\\Pagination\\": "" + } + }, + "extra": { + "branch-alias": { + "dev-master": "5.4-dev" + } + }, + "config": { + "sort-packages": true + }, + "minimum-stability": "dev" +} diff --git a/vendor/laravel/framework/src/Illuminate/Pagination/resources/views/bootstrap-4.blade.php b/vendor/laravel/framework/src/Illuminate/Pagination/resources/views/bootstrap-4.blade.php new file mode 100644 index 0000000..3f98455 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Pagination/resources/views/bootstrap-4.blade.php @@ -0,0 +1,36 @@ +@if ($paginator->hasPages()) +
    + {{-- Previous Page Link --}} + @if ($paginator->onFirstPage()) +
  • «
  • + @else +
  • + @endif + + {{-- Pagination Elements --}} + @foreach ($elements as $element) + {{-- "Three Dots" Separator --}} + @if (is_string($element)) +
  • {{ $element }}
  • + @endif + + {{-- Array Of Links --}} + @if (is_array($element)) + @foreach ($element as $page => $url) + @if ($page == $paginator->currentPage()) +
  • {{ $page }}
  • + @else +
  • {{ $page }}
  • + @endif + @endforeach + @endif + @endforeach + + {{-- Next Page Link --}} + @if ($paginator->hasMorePages()) +
  • + @else +
  • »
  • + @endif +
+@endif diff --git a/vendor/laravel/framework/src/Illuminate/Pagination/resources/views/default.blade.php b/vendor/laravel/framework/src/Illuminate/Pagination/resources/views/default.blade.php new file mode 100644 index 0000000..4e795ff --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Pagination/resources/views/default.blade.php @@ -0,0 +1,36 @@ +@if ($paginator->hasPages()) +
    + {{-- Previous Page Link --}} + @if ($paginator->onFirstPage()) +
  • «
  • + @else +
  • + @endif + + {{-- Pagination Elements --}} + @foreach ($elements as $element) + {{-- "Three Dots" Separator --}} + @if (is_string($element)) +
  • {{ $element }}
  • + @endif + + {{-- Array Of Links --}} + @if (is_array($element)) + @foreach ($element as $page => $url) + @if ($page == $paginator->currentPage()) +
  • {{ $page }}
  • + @else +
  • {{ $page }}
  • + @endif + @endforeach + @endif + @endforeach + + {{-- Next Page Link --}} + @if ($paginator->hasMorePages()) +
  • + @else +
  • »
  • + @endif +
+@endif diff --git a/vendor/laravel/framework/src/Illuminate/Pagination/resources/views/simple-bootstrap-4.blade.php b/vendor/laravel/framework/src/Illuminate/Pagination/resources/views/simple-bootstrap-4.blade.php new file mode 100644 index 0000000..a9a18d3 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Pagination/resources/views/simple-bootstrap-4.blade.php @@ -0,0 +1,17 @@ +@if ($paginator->hasPages()) +
    + {{-- Previous Page Link --}} + @if ($paginator->onFirstPage()) +
  • @lang('pagination.previous')
  • + @else +
  • + @endif + + {{-- Next Page Link --}} + @if ($paginator->hasMorePages()) +
  • + @else +
  • @lang('pagination.next')
  • + @endif +
+@endif diff --git a/vendor/laravel/framework/src/Illuminate/Pagination/resources/views/simple-default.blade.php b/vendor/laravel/framework/src/Illuminate/Pagination/resources/views/simple-default.blade.php new file mode 100644 index 0000000..1801609 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Pagination/resources/views/simple-default.blade.php @@ -0,0 +1,17 @@ +@if ($paginator->hasPages()) +
    + {{-- Previous Page Link --}} + @if ($paginator->onFirstPage()) +
  • @lang('pagination.previous')
  • + @else +
  • + @endif + + {{-- Next Page Link --}} + @if ($paginator->hasMorePages()) +
  • + @else +
  • @lang('pagination.next')
  • + @endif +
+@endif diff --git a/vendor/laravel/framework/src/Illuminate/Pipeline/Hub.php b/vendor/laravel/framework/src/Illuminate/Pipeline/Hub.php new file mode 100644 index 0000000..87331a5 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Pipeline/Hub.php @@ -0,0 +1,74 @@ +container = $container; + } + + /** + * Define the default named pipeline. + * + * @param \Closure $callback + * @return void + */ + public function defaults(Closure $callback) + { + return $this->pipeline('default', $callback); + } + + /** + * Define a new named pipeline. + * + * @param string $name + * @param \Closure $callback + * @return void + */ + public function pipeline($name, Closure $callback) + { + $this->pipelines[$name] = $callback; + } + + /** + * Send an object through one of the available pipelines. + * + * @param mixed $object + * @param string|null $pipeline + * @return mixed + */ + public function pipe($object, $pipeline = null) + { + $pipeline = $pipeline ?: 'default'; + + return call_user_func( + $this->pipelines[$pipeline], new Pipeline($this->container), $object + ); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php b/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php new file mode 100644 index 0000000..4a481fe --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php @@ -0,0 +1,184 @@ +container = $container; + } + + /** + * Set the object being sent through the pipeline. + * + * @param mixed $passable + * @return $this + */ + public function send($passable) + { + $this->passable = $passable; + + return $this; + } + + /** + * Set the array of pipes. + * + * @param array|mixed $pipes + * @return $this + */ + public function through($pipes) + { + $this->pipes = is_array($pipes) ? $pipes : func_get_args(); + + return $this; + } + + /** + * Set the method to call on the pipes. + * + * @param string $method + * @return $this + */ + public function via($method) + { + $this->method = $method; + + return $this; + } + + /** + * Run the pipeline with a final destination callback. + * + * @param \Closure $destination + * @return mixed + */ + public function then(Closure $destination) + { + $pipeline = array_reduce( + array_reverse($this->pipes), $this->carry(), $this->prepareDestination($destination) + ); + + return $pipeline($this->passable); + } + + /** + * Get the final piece of the Closure onion. + * + * @param \Closure $destination + * @return \Closure + */ + protected function prepareDestination(Closure $destination) + { + return function ($passable) use ($destination) { + return $destination($passable); + }; + } + + /** + * Get a Closure that represents a slice of the application onion. + * + * @return \Closure + */ + protected function carry() + { + return function ($stack, $pipe) { + return function ($passable) use ($stack, $pipe) { + if ($pipe instanceof Closure) { + // If the pipe is an instance of a Closure, we will just call it directly but + // otherwise we'll resolve the pipes out of the container and call it with + // the appropriate method and arguments, returning the results back out. + return $pipe($passable, $stack); + } elseif (! is_object($pipe)) { + list($name, $parameters) = $this->parsePipeString($pipe); + + // If the pipe is a string we will parse the string and resolve the class out + // of the dependency injection container. We can then build a callable and + // execute the pipe function giving in the parameters that are required. + $pipe = $this->getContainer()->make($name); + + $parameters = array_merge([$passable, $stack], $parameters); + } else { + // If the pipe is already an object we'll just make a callable and pass it to + // the pipe as-is. There is no need to do any extra parsing and formatting + // since the object we're given was already a fully instantiated object. + $parameters = [$passable, $stack]; + } + + return $pipe->{$this->method}(...$parameters); + }; + }; + } + + /** + * Parse full pipe string to get name and parameters. + * + * @param string $pipe + * @return array + */ + protected function parsePipeString($pipe) + { + list($name, $parameters) = array_pad(explode(':', $pipe, 2), 2, []); + + if (is_string($parameters)) { + $parameters = explode(',', $parameters); + } + + return [$name, $parameters]; + } + + /** + * Get the container instance. + * + * @return \Illuminate\Contracts\Container\Container + * @throws \RuntimeException + */ + protected function getContainer() + { + if (! $this->container) { + throw new RuntimeException('A container instance has not been passed to the Pipeline.'); + } + + return $this->container; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Pipeline/PipelineServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Pipeline/PipelineServiceProvider.php new file mode 100644 index 0000000..d829187 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Pipeline/PipelineServiceProvider.php @@ -0,0 +1,40 @@ +app->singleton( + PipelineHubContract::class, Hub::class + ); + } + + /** + * Get the services provided by the provider. + * + * @return array + */ + public function provides() + { + return [ + PipelineHubContract::class, + ]; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Pipeline/composer.json b/vendor/laravel/framework/src/Illuminate/Pipeline/composer.json new file mode 100644 index 0000000..c6efbd5 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Pipeline/composer.json @@ -0,0 +1,35 @@ +{ + "name": "illuminate/pipeline", + "description": "The Illuminate Pipeline package.", + "license": "MIT", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "require": { + "php": ">=5.6.4", + "illuminate/contracts": "5.4.*", + "illuminate/support": "5.4.*" + }, + "autoload": { + "psr-4": { + "Illuminate\\Pipeline\\": "" + } + }, + "extra": { + "branch-alias": { + "dev-master": "5.4-dev" + } + }, + "config": { + "sort-packages": true + }, + "minimum-stability": "dev" +} diff --git a/vendor/laravel/framework/src/Illuminate/Queue/BeanstalkdQueue.php b/vendor/laravel/framework/src/Illuminate/Queue/BeanstalkdQueue.php new file mode 100755 index 0000000..24dc9c0 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Queue/BeanstalkdQueue.php @@ -0,0 +1,163 @@ +default = $default; + $this->timeToRun = $timeToRun; + $this->pheanstalk = $pheanstalk; + } + + /** + * Get the size of the queue. + * + * @param string $queue + * @return int + */ + public function size($queue = null) + { + $queue = $this->getQueue($queue); + + return (int) $this->pheanstalk->statsTube($queue)->total_jobs; + } + + /** + * Push a new job onto the queue. + * + * @param string $job + * @param mixed $data + * @param string $queue + * @return mixed + */ + public function push($job, $data = '', $queue = null) + { + return $this->pushRaw($this->createPayload($job, $data), $queue); + } + + /** + * Push a raw payload onto the queue. + * + * @param string $payload + * @param string $queue + * @param array $options + * @return mixed + */ + public function pushRaw($payload, $queue = null, array $options = []) + { + return $this->pheanstalk->useTube($this->getQueue($queue))->put( + $payload, Pheanstalk::DEFAULT_PRIORITY, Pheanstalk::DEFAULT_DELAY, $this->timeToRun + ); + } + + /** + * Push a new job onto the queue after a delay. + * + * @param \DateTime|int $delay + * @param string $job + * @param mixed $data + * @param string $queue + * @return mixed + */ + public function later($delay, $job, $data = '', $queue = null) + { + $pheanstalk = $this->pheanstalk->useTube($this->getQueue($queue)); + + return $pheanstalk->put( + $this->createPayload($job, $data), + Pheanstalk::DEFAULT_PRIORITY, + $this->secondsUntil($delay), + $this->timeToRun + ); + } + + /** + * Pop the next job off of the queue. + * + * @param string $queue + * @return \Illuminate\Contracts\Queue\Job|null + */ + public function pop($queue = null) + { + $queue = $this->getQueue($queue); + + $job = $this->pheanstalk->watchOnly($queue)->reserve(0); + + if ($job instanceof PheanstalkJob) { + return new BeanstalkdJob( + $this->container, $this->pheanstalk, $job, $this->connectionName, $queue + ); + } + } + + /** + * Delete a message from the Beanstalk queue. + * + * @param string $queue + * @param string $id + * @return void + */ + public function deleteMessage($queue, $id) + { + $queue = $this->getQueue($queue); + + $this->pheanstalk->useTube($queue)->delete(new PheanstalkJob($id, '')); + } + + /** + * Get the queue or return the default. + * + * @param string|null $queue + * @return string + */ + public function getQueue($queue) + { + return $queue ?: $this->default; + } + + /** + * Get the underlying Pheanstalk instance. + * + * @return \Pheanstalk\Pheanstalk + */ + public function getPheanstalk() + { + return $this->pheanstalk; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php b/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php new file mode 100644 index 0000000..ebfb48b --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php @@ -0,0 +1,101 @@ +dispatcher = $dispatcher; + } + + /** + * Handle the queued job. + * + * @param \Illuminate\Contracts\Queue\Job $job + * @param array $data + * @return void + */ + public function call(Job $job, array $data) + { + $command = $this->setJobInstanceIfNecessary( + $job, unserialize($data['command']) + ); + + $this->dispatcher->dispatchNow( + $command, $handler = $this->resolveHandler($job, $command) + ); + + if (! $job->isDeletedOrReleased()) { + $job->delete(); + } + } + + /** + * Resolve the handler for the given command. + * + * @param \Illuminate\Contracts\Queue\Job $job + * @param mixed $command + * @return mixed + */ + protected function resolveHandler($job, $command) + { + $handler = $this->dispatcher->getCommandHandler($command) ?: null; + + if ($handler) { + $this->setJobInstanceIfNecessary($job, $handler); + } + + return $handler; + } + + /** + * Set the job instance of the given class if necessary. + * + * @param \Illuminate\Contracts\Queue\Job $job + * @param mixed $instance + * @return mixed + */ + protected function setJobInstanceIfNecessary(Job $job, $instance) + { + if (in_array(InteractsWithQueue::class, class_uses_recursive(get_class($instance)))) { + $instance->setJob($job); + } + + return $instance; + } + + /** + * Call the failed method on the job instance. + * + * The exception that caused the failure will be passed. + * + * @param array $data + * @param \Exception $e + * @return void + */ + public function failed(array $data, $e) + { + $command = unserialize($data['command']); + + if (method_exists($command, 'failed')) { + $command->failed($e); + } + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Capsule/Manager.php b/vendor/laravel/framework/src/Illuminate/Queue/Capsule/Manager.php new file mode 100644 index 0000000..9c32fe3 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Queue/Capsule/Manager.php @@ -0,0 +1,183 @@ +setupContainer($container ?: new Container); + + // Once we have the container setup, we will setup the default configuration + // options in the container "config" bindings. This just makes this queue + // manager behave correctly since all the correct binding are in place. + $this->setupDefaultConfiguration(); + + $this->setupManager(); + + $this->registerConnectors(); + } + + /** + * Setup the default queue configuration options. + * + * @return void + */ + protected function setupDefaultConfiguration() + { + $this->container['config']['queue.default'] = 'default'; + } + + /** + * Build the queue manager instance. + * + * @return void + */ + protected function setupManager() + { + $this->manager = new QueueManager($this->container); + } + + /** + * Register the default connectors that the component ships with. + * + * @return void + */ + protected function registerConnectors() + { + $provider = new QueueServiceProvider($this->container); + + $provider->registerConnectors($this->manager); + } + + /** + * Get a connection instance from the global manager. + * + * @param string $connection + * @return \Illuminate\Contracts\Queue\Queue + */ + public static function connection($connection = null) + { + return static::$instance->getConnection($connection); + } + + /** + * Push a new job onto the queue. + * + * @param string $job + * @param mixed $data + * @param string $queue + * @param string $connection + * @return mixed + */ + public static function push($job, $data = '', $queue = null, $connection = null) + { + return static::$instance->connection($connection)->push($job, $data, $queue); + } + + /** + * Push a new an array of jobs onto the queue. + * + * @param array $jobs + * @param mixed $data + * @param string $queue + * @param string $connection + * @return mixed + */ + public static function bulk($jobs, $data = '', $queue = null, $connection = null) + { + return static::$instance->connection($connection)->bulk($jobs, $data, $queue); + } + + /** + * Push a new job onto the queue after a delay. + * + * @param \DateTime|int $delay + * @param string $job + * @param mixed $data + * @param string $queue + * @param string $connection + * @return mixed + */ + public static function later($delay, $job, $data = '', $queue = null, $connection = null) + { + return static::$instance->connection($connection)->later($delay, $job, $data, $queue); + } + + /** + * Get a registered connection instance. + * + * @param string $name + * @return \Illuminate\Contracts\Queue\Queue + */ + public function getConnection($name = null) + { + return $this->manager->connection($name); + } + + /** + * Register a connection with the manager. + * + * @param array $config + * @param string $name + * @return void + */ + public function addConnection(array $config, $name = 'default') + { + $this->container['config']["queue.connections.{$name}"] = $config; + } + + /** + * Get the queue manager instance. + * + * @return \Illuminate\Queue\QueueManager + */ + public function getQueueManager() + { + return $this->manager; + } + + /** + * Pass dynamic instance methods to the manager. + * + * @param string $method + * @param array $parameters + * @return mixed + */ + public function __call($method, $parameters) + { + return $this->manager->$method(...$parameters); + } + + /** + * Dynamically pass methods to the default connection. + * + * @param string $method + * @param array $parameters + * @return mixed + */ + public static function __callStatic($method, $parameters) + { + return static::connection()->$method(...$parameters); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Connectors/BeanstalkdConnector.php b/vendor/laravel/framework/src/Illuminate/Queue/Connectors/BeanstalkdConnector.php new file mode 100755 index 0000000..33840a7 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Queue/Connectors/BeanstalkdConnector.php @@ -0,0 +1,41 @@ +pheanstalk($config), $config['queue'], $retryAfter); + } + + /** + * Create a Pheanstalk instance. + * + * @param array $config + * @return \Pheanstalk\Pheanstalk + */ + protected function pheanstalk(array $config) + { + return new Pheanstalk( + $config['host'], + Arr::get($config, 'port', PheanstalkInterface::DEFAULT_PORT), + Arr::get($config, 'timeout', Connection::DEFAULT_CONNECT_TIMEOUT), + Arr::get($config, 'persistent', false) + ); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Connectors/ConnectorInterface.php b/vendor/laravel/framework/src/Illuminate/Queue/Connectors/ConnectorInterface.php new file mode 100755 index 0000000..617bf09 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Queue/Connectors/ConnectorInterface.php @@ -0,0 +1,14 @@ +connections = $connections; + } + + /** + * Establish a queue connection. + * + * @param array $config + * @return \Illuminate\Contracts\Queue\Queue + */ + public function connect(array $config) + { + return new DatabaseQueue( + $this->connections->connection(Arr::get($config, 'connection')), + $config['table'], + $config['queue'], + Arr::get($config, 'retry_after', 60) + ); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Connectors/NullConnector.php b/vendor/laravel/framework/src/Illuminate/Queue/Connectors/NullConnector.php new file mode 100644 index 0000000..39de480 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Queue/Connectors/NullConnector.php @@ -0,0 +1,19 @@ +redis = $redis; + $this->connection = $connection; + } + + /** + * Establish a queue connection. + * + * @param array $config + * @return \Illuminate\Contracts\Queue\Queue + */ + public function connect(array $config) + { + return new RedisQueue( + $this->redis, $config['queue'], + Arr::get($config, 'connection', $this->connection), + Arr::get($config, 'retry_after', 60) + ); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Connectors/SqsConnector.php b/vendor/laravel/framework/src/Illuminate/Queue/Connectors/SqsConnector.php new file mode 100755 index 0000000..4e8e5e6 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Queue/Connectors/SqsConnector.php @@ -0,0 +1,46 @@ +getDefaultConfiguration($config); + + if ($config['key'] && $config['secret']) { + $config['credentials'] = Arr::only($config, ['key', 'secret']); + } + + return new SqsQueue( + new SqsClient($config), $config['queue'], Arr::get($config, 'prefix', '') + ); + } + + /** + * Get the default configuration for SQS. + * + * @param array $config + * @return array + */ + protected function getDefaultConfiguration(array $config) + { + return array_merge([ + 'version' => 'latest', + 'http' => [ + 'timeout' => 60, + 'connect_timeout' => 60, + ], + ], $config); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Connectors/SyncConnector.php b/vendor/laravel/framework/src/Illuminate/Queue/Connectors/SyncConnector.php new file mode 100755 index 0000000..4269b80 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Queue/Connectors/SyncConnector.php @@ -0,0 +1,19 @@ +files = $files; + $this->composer = $composer; + } + + /** + * Execute the console command. + * + * @return void + */ + public function fire() + { + $table = $this->laravel['config']['queue.failed.table']; + + $this->replaceMigration( + $this->createBaseMigration($table), $table, Str::studly($table) + ); + + $this->info('Migration created successfully!'); + + $this->composer->dumpAutoloads(); + } + + /** + * Create a base migration file for the table. + * + * @param string $table + * @return string + */ + protected function createBaseMigration($table = 'failed_jobs') + { + return $this->laravel['migration.creator']->create( + 'create_'.$table.'_table', $this->laravel->databasePath().'/migrations' + ); + } + + /** + * Replace the generated migration with the failed job table stub. + * + * @param string $path + * @param string $table + * @param string $tableClassName + * @return void + */ + protected function replaceMigration($path, $table, $tableClassName) + { + $stub = str_replace( + ['{{table}}', '{{tableClassName}}'], + [$table, $tableClassName], + $this->files->get(__DIR__.'/stubs/failed_jobs.stub') + ); + + $this->files->put($path, $stub); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Console/FlushFailedCommand.php b/vendor/laravel/framework/src/Illuminate/Queue/Console/FlushFailedCommand.php new file mode 100644 index 0000000..fc21093 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Queue/Console/FlushFailedCommand.php @@ -0,0 +1,34 @@ +laravel['queue.failer']->flush(); + + $this->info('All failed jobs deleted successfully!'); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Console/ForgetFailedCommand.php b/vendor/laravel/framework/src/Illuminate/Queue/Console/ForgetFailedCommand.php new file mode 100644 index 0000000..2a016cf --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Queue/Console/ForgetFailedCommand.php @@ -0,0 +1,49 @@ +laravel['queue.failer']->forget($this->argument('id'))) { + $this->info('Failed job deleted successfully!'); + } else { + $this->error('No failed job matches the given ID.'); + } + } + + /** + * Get the console command arguments. + * + * @return array + */ + protected function getArguments() + { + return [ + ['id', InputArgument::REQUIRED, 'The ID of the failed job'], + ]; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Console/ListFailedCommand.php b/vendor/laravel/framework/src/Illuminate/Queue/Console/ListFailedCommand.php new file mode 100644 index 0000000..0b061f4 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Queue/Console/ListFailedCommand.php @@ -0,0 +1,118 @@ +getFailedJobs()) == 0) { + return $this->info('No failed jobs!'); + } + + $this->displayFailedJobs($jobs); + } + + /** + * Compile the failed jobs into a displayable format. + * + * @return array + */ + protected function getFailedJobs() + { + $failed = $this->laravel['queue.failer']->all(); + + return collect($failed)->map(function ($failed) { + return $this->parseFailedJob((array) $failed); + })->filter()->all(); + } + + /** + * Parse the failed job row. + * + * @param array $failed + * @return array + */ + protected function parseFailedJob(array $failed) + { + $row = array_values(Arr::except($failed, ['payload', 'exception'])); + + array_splice($row, 3, 0, $this->extractJobName($failed['payload'])); + + return $row; + } + + /** + * Extract the failed job name from payload. + * + * @param string $payload + * @return string|null + */ + private function extractJobName($payload) + { + $payload = json_decode($payload, true); + + if ($payload && (! isset($payload['data']['command']))) { + return Arr::get($payload, 'job'); + } elseif ($payload && isset($payload['data']['command'])) { + return $this->matchJobName($payload); + } + } + + /** + * Match the job name from the payload. + * + * @param array $payload + * @return string + */ + protected function matchJobName($payload) + { + preg_match('/"([^"]+)"/', $payload['data']['command'], $matches); + + if (isset($matches[1])) { + return $matches[1]; + } else { + return Arr::get($payload, 'job'); + } + } + + /** + * Display the failed jobs in the console. + * + * @param array $jobs + * @return void + */ + protected function displayFailedJobs(array $jobs) + { + $this->table($this->headers, $jobs); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Console/ListenCommand.php b/vendor/laravel/framework/src/Illuminate/Queue/Console/ListenCommand.php new file mode 100755 index 0000000..3d6d1b0 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Queue/Console/ListenCommand.php @@ -0,0 +1,114 @@ +setOutputHandler($this->listener = $listener); + } + + /** + * Execute the console command. + * + * @return void + */ + public function fire() + { + // We need to get the right queue for the connection which is set in the queue + // configuration file for the application. We will pull it based on the set + // connection being run for the queue operation currently being executed. + $queue = $this->getQueue( + $connection = $this->input->getArgument('connection') + ); + + $this->listener->listen( + $connection, $queue, $this->gatherOptions() + ); + } + + /** + * Get the name of the queue connection to listen on. + * + * @param string $connection + * @return string + */ + protected function getQueue($connection) + { + $connection = $connection ?: $this->laravel['config']['queue.default']; + + return $this->input->getOption('queue') ?: $this->laravel['config']->get( + "queue.connections.{$connection}.queue", 'default' + ); + } + + /** + * Get the listener options for the command. + * + * @return \Illuminate\Queue\ListenerOptions + */ + protected function gatherOptions() + { + return new ListenerOptions( + $this->option('env'), $this->option('delay'), + $this->option('memory'), $this->option('timeout'), + $this->option('sleep'), $this->option('tries'), + $this->option('force') + ); + } + + /** + * Set the options on the queue listener. + * + * @param \Illuminate\Queue\Listener $listener + * @return void + */ + protected function setOutputHandler(Listener $listener) + { + $listener->setOutputHandler(function ($type, $line) { + $this->output->write($line); + }); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Console/RestartCommand.php b/vendor/laravel/framework/src/Illuminate/Queue/Console/RestartCommand.php new file mode 100644 index 0000000..4d9b587 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Queue/Console/RestartCommand.php @@ -0,0 +1,35 @@ +laravel['cache']->forever('illuminate:queue:restart', Carbon::now()->getTimestamp()); + + $this->info('Broadcasting queue restart signal.'); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Console/RetryCommand.php b/vendor/laravel/framework/src/Illuminate/Queue/Console/RetryCommand.php new file mode 100644 index 0000000..df82717 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Queue/Console/RetryCommand.php @@ -0,0 +1,106 @@ +getJobIds() as $id) { + $job = $this->laravel['queue.failer']->find($id); + + if (is_null($job)) { + $this->error("Unable to find failed job with ID [{$id}]."); + } else { + $this->retryJob($job); + + $this->info("The failed job [{$id}] has been pushed back onto the queue!"); + + $this->laravel['queue.failer']->forget($id); + } + } + } + + /** + * Get the job IDs to be retried. + * + * @return array + */ + protected function getJobIds() + { + $ids = $this->argument('id'); + + if (count($ids) === 1 && $ids[0] === 'all') { + $ids = Arr::pluck($this->laravel['queue.failer']->all(), 'id'); + } + + return $ids; + } + + /** + * Retry the queue job. + * + * @param \stdClass $job + * @return void + */ + protected function retryJob($job) + { + $this->laravel['queue']->connection($job->connection)->pushRaw( + $this->resetAttempts($job->payload), $job->queue + ); + } + + /** + * Reset the payload attempts. + * + * Applicable to Redis jobs which store attempts in their payload. + * + * @param string $payload + * @return string + */ + protected function resetAttempts($payload) + { + $payload = json_decode($payload, true); + + if (isset($payload['attempts'])) { + $payload['attempts'] = 0; + } + + return json_encode($payload); + } + + /** + * Get the console command arguments. + * + * @return array + */ + protected function getArguments() + { + return [ + ['id', InputArgument::IS_ARRAY, 'The ID of the failed job'], + ]; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Console/TableCommand.php b/vendor/laravel/framework/src/Illuminate/Queue/Console/TableCommand.php new file mode 100644 index 0000000..e0d2030 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Queue/Console/TableCommand.php @@ -0,0 +1,102 @@ +files = $files; + $this->composer = $composer; + } + + /** + * Execute the console command. + * + * @return void + */ + public function fire() + { + $table = $this->laravel['config']['queue.connections.database.table']; + + $this->replaceMigration( + $this->createBaseMigration($table), $table, Str::studly($table) + ); + + $this->info('Migration created successfully!'); + + $this->composer->dumpAutoloads(); + } + + /** + * Create a base migration file for the table. + * + * @param string $table + * @return string + */ + protected function createBaseMigration($table = 'jobs') + { + return $this->laravel['migration.creator']->create( + 'create_'.$table.'_table', $this->laravel->databasePath().'/migrations' + ); + } + + /** + * Replace the generated migration with the job table stub. + * + * @param string $path + * @param string $table + * @param string $tableClassName + * @return void + */ + protected function replaceMigration($path, $table, $tableClassName) + { + $stub = str_replace( + ['{{table}}', '{{tableClassName}}'], + [$table, $tableClassName], + $this->files->get(__DIR__.'/stubs/jobs.stub') + ); + + $this->files->put($path, $stub); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php b/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php new file mode 100644 index 0000000..c430881 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php @@ -0,0 +1,213 @@ +worker = $worker; + } + + /** + * Execute the console command. + * + * @return void + */ + public function fire() + { + if ($this->downForMaintenance() && $this->option('once')) { + return $this->worker->sleep($this->option('sleep')); + } + + // We'll listen to the processed and failed events so we can write information + // to the console as jobs are processed, which will let the developer watch + // which jobs are coming through a queue and be informed on its progress. + $this->listenForEvents(); + + $connection = $this->argument('connection') + ?: $this->laravel['config']['queue.default']; + + // We need to get the right queue for the connection which is set in the queue + // configuration file for the application. We will pull it based on the set + // connection being run for the queue operation currently being executed. + $queue = $this->getQueue($connection); + + $this->runWorker( + $connection, $queue + ); + } + + /** + * Run the worker instance. + * + * @param string $connection + * @param string $queue + * @return array + */ + protected function runWorker($connection, $queue) + { + $this->worker->setCache($this->laravel['cache']->driver()); + + return $this->worker->{$this->option('once') ? 'runNextJob' : 'daemon'}( + $connection, $queue, $this->gatherWorkerOptions() + ); + } + + /** + * Gather all of the queue worker options as a single object. + * + * @return \Illuminate\Queue\WorkerOptions + */ + protected function gatherWorkerOptions() + { + return new WorkerOptions( + $this->option('delay'), $this->option('memory'), + $this->option('timeout'), $this->option('sleep'), + $this->option('tries'), $this->option('force') + ); + } + + /** + * Listen for the queue events in order to update the console output. + * + * @return void + */ + protected function listenForEvents() + { + $this->laravel['events']->listen(JobProcessing::class, function ($event) { + $this->writeOutput($event->job, 'starting'); + }); + + $this->laravel['events']->listen(JobProcessed::class, function ($event) { + $this->writeOutput($event->job, 'success'); + }); + + $this->laravel['events']->listen(JobFailed::class, function ($event) { + $this->writeOutput($event->job, 'failed'); + + $this->logFailedJob($event); + }); + } + + /** + * Write the status output for the queue worker. + * + * @param \Illuminate\Contracts\Queue\Job $job + * @param string $status + * @return void + */ + protected function writeOutput(Job $job, $status) + { + switch ($status) { + case 'starting': + return $this->writeStatus($job, 'Processing', 'comment'); + case 'success': + return $this->writeStatus($job, 'Processed', 'info'); + case 'failed': + return $this->writeStatus($job, 'Failed', 'error'); + } + } + + /** + * Format the status output for the queue worker. + * + * @param \Illuminate\Contracts\Queue\Job $job + * @param string $status + * @param string $type + * @return void + */ + protected function writeStatus(Job $job, $status, $type) + { + $this->output->writeln(sprintf( + "<{$type}>[%s] %s %s", + Carbon::now()->format('Y-m-d H:i:s'), + str_pad("{$status}:", 11), $job->resolveName() + )); + } + + /** + * Store a failed job event. + * + * @param JobFailed $event + * @return void + */ + protected function logFailedJob(JobFailed $event) + { + $this->laravel['queue.failer']->log( + $event->connectionName, $event->job->getQueue(), + $event->job->getRawBody(), $event->exception + ); + } + + /** + * Get the queue name for the worker. + * + * @param string $connection + * @return string + */ + protected function getQueue($connection) + { + return $this->option('queue') ?: $this->laravel['config']->get( + "queue.connections.{$connection}.queue", 'default' + ); + } + + /** + * Determine if the worker should run in maintenance mode. + * + * @return bool + */ + protected function downForMaintenance() + { + return $this->option('force') ? false : $this->laravel->isDownForMaintenance(); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Console/stubs/failed_jobs.stub b/vendor/laravel/framework/src/Illuminate/Queue/Console/stubs/failed_jobs.stub new file mode 100644 index 0000000..037b5ee --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Queue/Console/stubs/failed_jobs.stub @@ -0,0 +1,35 @@ +bigIncrements('id'); + $table->text('connection'); + $table->text('queue'); + $table->longText('payload'); + $table->longText('exception'); + $table->timestamp('failed_at')->useCurrent(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('{{table}}'); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Console/stubs/jobs.stub b/vendor/laravel/framework/src/Illuminate/Queue/Console/stubs/jobs.stub new file mode 100644 index 0000000..347ac2e --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Queue/Console/stubs/jobs.stub @@ -0,0 +1,38 @@ +bigIncrements('id'); + $table->string('queue'); + $table->longText('payload'); + $table->tinyInteger('attempts')->unsigned(); + $table->unsignedInteger('reserved_at')->nullable(); + $table->unsignedInteger('available_at'); + $table->unsignedInteger('created_at'); + + $table->index(['queue', 'reserved_at']); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('{{table}}'); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Queue/DatabaseQueue.php b/vendor/laravel/framework/src/Illuminate/Queue/DatabaseQueue.php new file mode 100644 index 0000000..51a30a7 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Queue/DatabaseQueue.php @@ -0,0 +1,323 @@ +table = $table; + $this->default = $default; + $this->database = $database; + $this->retryAfter = $retryAfter; + } + + /** + * Get the size of the queue. + * + * @param string $queue + * @return int + */ + public function size($queue = null) + { + return $this->database->table($this->table) + ->where('queue', $this->getQueue($queue)) + ->count(); + } + + /** + * Push a new job onto the queue. + * + * @param string $job + * @param mixed $data + * @param string $queue + * @return mixed + */ + public function push($job, $data = '', $queue = null) + { + return $this->pushToDatabase($queue, $this->createPayload($job, $data)); + } + + /** + * Push a raw payload onto the queue. + * + * @param string $payload + * @param string $queue + * @param array $options + * @return mixed + */ + public function pushRaw($payload, $queue = null, array $options = []) + { + return $this->pushToDatabase($queue, $payload); + } + + /** + * Push a new job onto the queue after a delay. + * + * @param \DateTime|int $delay + * @param string $job + * @param mixed $data + * @param string $queue + * @return void + */ + public function later($delay, $job, $data = '', $queue = null) + { + return $this->pushToDatabase($queue, $this->createPayload($job, $data), $delay); + } + + /** + * Push an array of jobs onto the queue. + * + * @param array $jobs + * @param mixed $data + * @param string $queue + * @return mixed + */ + public function bulk($jobs, $data = '', $queue = null) + { + $queue = $this->getQueue($queue); + + $availableAt = $this->availableAt(); + + return $this->database->table($this->table)->insert(collect((array) $jobs)->map( + function ($job) use ($queue, $data, $availableAt) { + return $this->buildDatabaseRecord($queue, $this->createPayload($job, $data), $availableAt); + } + )->all()); + } + + /** + * Release a reserved job back onto the queue. + * + * @param string $queue + * @param \Illuminate\Queue\Jobs\DatabaseJobRecord $job + * @param int $delay + * @return mixed + */ + public function release($queue, $job, $delay) + { + return $this->pushToDatabase($queue, $job->payload, $delay, $job->attempts); + } + + /** + * Push a raw payload to the database with a given delay. + * + * @param string|null $queue + * @param string $payload + * @param \DateTime|int $delay + * @param int $attempts + * @return mixed + */ + protected function pushToDatabase($queue, $payload, $delay = 0, $attempts = 0) + { + return $this->database->table($this->table)->insertGetId($this->buildDatabaseRecord( + $this->getQueue($queue), $payload, $this->availableAt($delay), $attempts + )); + } + + /** + * Create an array to insert for the given job. + * + * @param string|null $queue + * @param string $payload + * @param int $availableAt + * @param int $attempts + * @return array + */ + protected function buildDatabaseRecord($queue, $payload, $availableAt, $attempts = 0) + { + return [ + 'queue' => $queue, + 'payload' => $payload, + 'attempts' => $attempts, + 'reserved_at' => null, + 'available_at' => $availableAt, + 'created_at' => $this->currentTime(), + ]; + } + + /** + * Pop the next job off of the queue. + * + * @param string $queue + * @return \Illuminate\Contracts\Queue\Job|null + */ + public function pop($queue = null) + { + $queue = $this->getQueue($queue); + + $this->database->beginTransaction(); + + if ($job = $this->getNextAvailableJob($queue)) { + return $this->marshalJob($queue, $job); + } + + $this->database->commit(); + } + + /** + * Get the next available job for the queue. + * + * @param string|null $queue + * @return \Illuminate\Queue\Jobs\DatabaseJobRecord|null + */ + protected function getNextAvailableJob($queue) + { + $job = $this->database->table($this->table) + ->lockForUpdate() + ->where('queue', $this->getQueue($queue)) + ->where(function ($query) { + $this->isAvailable($query); + $this->isReservedButExpired($query); + }) + ->orderBy('id', 'asc') + ->first(); + + return $job ? new DatabaseJobRecord((object) $job) : null; + } + + /** + * Modify the query to check for available jobs. + * + * @param \Illuminate\Database\Query\Builder $query + * @return void + */ + protected function isAvailable($query) + { + $query->where(function ($query) { + $query->whereNull('reserved_at') + ->where('available_at', '<=', $this->currentTime()); + }); + } + + /** + * Modify the query to check for jobs that are reserved but have expired. + * + * @param \Illuminate\Database\Query\Builder $query + * @return void + */ + protected function isReservedButExpired($query) + { + $expiration = Carbon::now()->subSeconds($this->retryAfter)->getTimestamp(); + + $query->orWhere(function ($query) use ($expiration) { + $query->where('reserved_at', '<=', $expiration); + }); + } + + /** + * Marshal the reserved job into a DatabaseJob instance. + * + * @param string $queue + * @param \Illuminate\Queue\Jobs\DatabaseJobRecord $job + * @return \Illuminate\Queue\Jobs\DatabaseJob + */ + protected function marshalJob($queue, $job) + { + $job = $this->markJobAsReserved($job); + + $this->database->commit(); + + return new DatabaseJob( + $this->container, $this, $job, $this->connectionName, $queue + ); + } + + /** + * Mark the given job ID as reserved. + * + * @param \Illuminate\Queue\Jobs\DatabaseJobRecord $job + * @return \Illuminate\Queue\Jobs\DatabaseJobRecord + */ + protected function markJobAsReserved($job) + { + $this->database->table($this->table)->where('id', $job->id)->update([ + 'reserved_at' => $job->touch(), + 'attempts' => $job->increment(), + ]); + + return $job; + } + + /** + * Delete a reserved job from the queue. + * + * @param string $queue + * @param string $id + * @return void + */ + public function deleteReserved($queue, $id) + { + $this->database->beginTransaction(); + + if ($this->database->table($this->table)->lockForUpdate()->find($id)) { + $this->database->table($this->table)->where('id', $id)->delete(); + } + + $this->database->commit(); + } + + /** + * Get the queue or return the default. + * + * @param string|null $queue + * @return string + */ + protected function getQueue($queue) + { + return $queue ?: $this->default; + } + + /** + * Get the underlying database instance. + * + * @return \Illuminate\Database\Connection + */ + public function getDatabase() + { + return $this->database; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Events/JobExceptionOccurred.php b/vendor/laravel/framework/src/Illuminate/Queue/Events/JobExceptionOccurred.php new file mode 100644 index 0000000..dc7940e --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Queue/Events/JobExceptionOccurred.php @@ -0,0 +1,42 @@ +job = $job; + $this->exception = $exception; + $this->connectionName = $connectionName; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Events/JobFailed.php b/vendor/laravel/framework/src/Illuminate/Queue/Events/JobFailed.php new file mode 100644 index 0000000..49b84f7 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Queue/Events/JobFailed.php @@ -0,0 +1,42 @@ +job = $job; + $this->exception = $exception; + $this->connectionName = $connectionName; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Events/JobProcessed.php b/vendor/laravel/framework/src/Illuminate/Queue/Events/JobProcessed.php new file mode 100644 index 0000000..f8abefb --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Queue/Events/JobProcessed.php @@ -0,0 +1,33 @@ +job = $job; + $this->connectionName = $connectionName; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Events/JobProcessing.php b/vendor/laravel/framework/src/Illuminate/Queue/Events/JobProcessing.php new file mode 100644 index 0000000..3dd9724 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Queue/Events/JobProcessing.php @@ -0,0 +1,33 @@ +job = $job; + $this->connectionName = $connectionName; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Events/Looping.php b/vendor/laravel/framework/src/Illuminate/Queue/Events/Looping.php new file mode 100644 index 0000000..16923c0 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Queue/Events/Looping.php @@ -0,0 +1,8 @@ +table = $table; + $this->resolver = $resolver; + $this->database = $database; + } + + /** + * Log a failed job into storage. + * + * @param string $connection + * @param string $queue + * @param string $payload + * @param \Exception $exception + * @return int|null + */ + public function log($connection, $queue, $payload, $exception) + { + $failed_at = Carbon::now(); + + $exception = (string) $exception; + + return $this->getTable()->insertGetId(compact( + 'connection', 'queue', 'payload', 'exception', 'failed_at' + )); + } + + /** + * Get a list of all of the failed jobs. + * + * @return array + */ + public function all() + { + return $this->getTable()->orderBy('id', 'desc')->get()->all(); + } + + /** + * Get a single failed job. + * + * @param mixed $id + * @return array + */ + public function find($id) + { + return $this->getTable()->find($id); + } + + /** + * Delete a single failed job from storage. + * + * @param mixed $id + * @return bool + */ + public function forget($id) + { + return $this->getTable()->where('id', $id)->delete() > 0; + } + + /** + * Flush all of the failed jobs from storage. + * + * @return void + */ + public function flush() + { + $this->getTable()->delete(); + } + + /** + * Get a new query builder instance for the table. + * + * @return \Illuminate\Database\Query\Builder + */ + protected function getTable() + { + return $this->resolver->connection($this->database)->table($this->table); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Failed/FailedJobProviderInterface.php b/vendor/laravel/framework/src/Illuminate/Queue/Failed/FailedJobProviderInterface.php new file mode 100644 index 0000000..0268002 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Queue/Failed/FailedJobProviderInterface.php @@ -0,0 +1,47 @@ +markAsFailed(); + + if ($job->isDeleted()) { + return; + } + + try { + // If the job has failed, we will delete it, call the "failed" method and then call + // an event indicating the job has failed so it can be logged if needed. This is + // to allow every developer to better keep monitor of their failed queue jobs. + $job->delete(); + + $job->failed($e); + } finally { + static::events()->fire(new JobFailed( + $connectionName, $job, $e ?: new ManuallyFailedException + )); + } + } + + /** + * Get the event dispatcher instance. + * + * @return \Illuminate\Contracts\Events\Dispatcher + */ + protected static function events() + { + return Container::getInstance()->make(Dispatcher::class); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Queue/InteractsWithQueue.php b/vendor/laravel/framework/src/Illuminate/Queue/InteractsWithQueue.php new file mode 100644 index 0000000..20bcecb --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Queue/InteractsWithQueue.php @@ -0,0 +1,76 @@ +job ? $this->job->attempts() : 1; + } + + /** + * Delete the job from the queue. + * + * @return void + */ + public function delete() + { + if ($this->job) { + return $this->job->delete(); + } + } + + /** + * Fail the job from the queue. + * + * @param \Throwable $exception + * @return void + */ + public function fail($exception = null) + { + if ($this->job) { + FailingJob::handle($this->job->getConnectionName(), $this->job, $exception); + } + } + + /** + * Release the job back into the queue. + * + * @param int $delay + * @return void + */ + public function release($delay = 0) + { + if ($this->job) { + return $this->job->release($delay); + } + } + + /** + * Set the base queue job instance. + * + * @param \Illuminate\Contracts\Queue\Job $job + * @return $this + */ + public function setJob(JobContract $job) + { + $this->job = $job; + + return $this; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Queue/InteractsWithTime.php b/vendor/laravel/framework/src/Illuminate/Queue/InteractsWithTime.php new file mode 100644 index 0000000..92a881f --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Queue/InteractsWithTime.php @@ -0,0 +1,45 @@ +getTimestamp() - $this->currentTime()) + : (int) $delay; + } + + /** + * Get the "available at" UNIX timestamp. + * + * @param \DateTimeInterface|int $delay + * @return int + */ + protected function availableAt($delay = 0) + { + return $delay instanceof DateTimeInterface + ? $delay->getTimestamp() + : Carbon::now()->addSeconds($delay)->getTimestamp(); + } + + /** + * Get the current system time as a UNIX timestamp. + * + * @return int + */ + protected function currentTime() + { + return Carbon::now()->getTimestamp(); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Queue/InvalidPayloadException.php b/vendor/laravel/framework/src/Illuminate/Queue/InvalidPayloadException.php new file mode 100644 index 0000000..788fa66 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Queue/InvalidPayloadException.php @@ -0,0 +1,19 @@ +job = $job; + $this->queue = $queue; + $this->container = $container; + $this->pheanstalk = $pheanstalk; + $this->connectionName = $connectionName; + } + + /** + * Release the job back into the queue. + * + * @param int $delay + * @return void + */ + public function release($delay = 0) + { + parent::release($delay); + + $priority = Pheanstalk::DEFAULT_PRIORITY; + + $this->pheanstalk->release($this->job, $priority, $delay); + } + + /** + * Bury the job in the queue. + * + * @return void + */ + public function bury() + { + parent::release(); + + $this->pheanstalk->bury($this->job); + } + + /** + * Delete the job from the queue. + * + * @return void + */ + public function delete() + { + parent::delete(); + + $this->pheanstalk->delete($this->job); + } + + /** + * Get the number of times the job has been attempted. + * + * @return int + */ + public function attempts() + { + $stats = $this->pheanstalk->statsJob($this->job); + + return (int) $stats->reserves; + } + + /** + * Get the job identifier. + * + * @return string + */ + public function getJobId() + { + return $this->job->getId(); + } + + /** + * Get the raw body string for the job. + * + * @return string + */ + public function getRawBody() + { + return $this->job->getData(); + } + + /** + * Get the underlying Pheanstalk instance. + * + * @return \Pheanstalk\Pheanstalk + */ + public function getPheanstalk() + { + return $this->pheanstalk; + } + + /** + * Get the underlying Pheanstalk job. + * + * @return \Pheanstalk\Job + */ + public function getPheanstalkJob() + { + return $this->job; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Jobs/DatabaseJob.php b/vendor/laravel/framework/src/Illuminate/Queue/Jobs/DatabaseJob.php new file mode 100644 index 0000000..9b57fb0 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Queue/Jobs/DatabaseJob.php @@ -0,0 +1,100 @@ +job = $job; + $this->queue = $queue; + $this->database = $database; + $this->container = $container; + $this->connectionName = $connectionName; + } + + /** + * Release the job back into the queue. + * + * @param int $delay + * @return mixed + */ + public function release($delay = 0) + { + parent::release($delay); + + $this->delete(); + + return $this->database->release($this->queue, $this->job, $delay); + } + + /** + * Delete the job from the queue. + * + * @return void + */ + public function delete() + { + parent::delete(); + + $this->database->deleteReserved($this->queue, $this->job->id); + } + + /** + * Get the number of times the job has been attempted. + * + * @return int + */ + public function attempts() + { + return (int) $this->job->attempts; + } + + /** + * Get the job identifier. + * + * @return string + */ + public function getJobId() + { + return $this->job->id; + } + + /** + * Get the raw body string for the job. + * + * @return string + */ + public function getRawBody() + { + return $this->job->payload; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Jobs/DatabaseJobRecord.php b/vendor/laravel/framework/src/Illuminate/Queue/Jobs/DatabaseJobRecord.php new file mode 100644 index 0000000..a0e2ac8 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Queue/Jobs/DatabaseJobRecord.php @@ -0,0 +1,63 @@ +record = $record; + } + + /** + * Increment the number of times the job has been attempted. + * + * @return int + */ + public function increment() + { + $this->record->attempts++; + + return $this->record->attempts; + } + + /** + * Update the "reserved at" timestamp of the job. + * + * @return int + */ + public function touch() + { + $this->record->reserved_at = $this->currentTime(); + + return $this->record->reserved_at; + } + + /** + * Dynamically access the underlying job information. + * + * @param string $key + * @return mixed + */ + public function __get($key) + { + return $this->record->{$key}; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Jobs/Job.php b/vendor/laravel/framework/src/Illuminate/Queue/Jobs/Job.php new file mode 100755 index 0000000..9d80e06 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Queue/Jobs/Job.php @@ -0,0 +1,254 @@ +payload(); + + list($class, $method) = JobName::parse($payload['job']); + + with($this->instance = $this->resolve($class))->{$method}($this, $payload['data']); + } + + /** + * Delete the job from the queue. + * + * @return void + */ + public function delete() + { + $this->deleted = true; + } + + /** + * Determine if the job has been deleted. + * + * @return bool + */ + public function isDeleted() + { + return $this->deleted; + } + + /** + * Release the job back into the queue. + * + * @param int $delay + * @return void + */ + public function release($delay = 0) + { + $this->released = true; + } + + /** + * Determine if the job was released back into the queue. + * + * @return bool + */ + public function isReleased() + { + return $this->released; + } + + /** + * Determine if the job has been deleted or released. + * + * @return bool + */ + public function isDeletedOrReleased() + { + return $this->isDeleted() || $this->isReleased(); + } + + /** + * Determine if the job has been marked as a failure. + * + * @return bool + */ + public function hasFailed() + { + return $this->failed; + } + + /** + * Mark the job as "failed". + * + * @return void + */ + public function markAsFailed() + { + $this->failed = true; + } + + /** + * Process an exception that caused the job to fail. + * + * @param \Exception $e + * @return void + */ + public function failed($e) + { + $this->markAsFailed(); + + $payload = $this->payload(); + + list($class, $method) = JobName::parse($payload['job']); + + if (method_exists($this->instance = $this->resolve($class), 'failed')) { + $this->instance->failed($payload['data'], $e); + } + } + + /** + * Resolve the given class. + * + * @param string $class + * @return mixed + */ + protected function resolve($class) + { + return $this->container->make($class); + } + + /** + * Get the decoded body of the job. + * + * @return array + */ + public function payload() + { + return json_decode($this->getRawBody(), true); + } + + /** + * The number of times to attempt a job. + * + * @return int|null + */ + public function maxTries() + { + return array_get($this->payload(), 'maxTries'); + } + + /** + * The number of seconds the job can run. + * + * @return int|null + */ + public function timeout() + { + return array_get($this->payload(), 'timeout'); + } + + /** + * Get the name of the queued job class. + * + * @return string + */ + public function getName() + { + return $this->payload()['job']; + } + + /** + * Get the resolved name of the queued job class. + * + * Resolves the name of "wrapped" jobs such as class-based handlers. + * + * @return string + */ + public function resolveName() + { + return JobName::resolve($this->getName(), $this->payload()); + } + + /** + * Get the name of the connection the job belongs to. + * + * @return string + */ + public function getConnectionName() + { + return $this->connectionName; + } + + /** + * Get the name of the queue the job belongs to. + * + * @return string + */ + public function getQueue() + { + return $this->queue; + } + + /** + * Get the service container instance. + * + * @return \Illuminate\Container\Container + */ + public function getContainer() + { + return $this->container; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Jobs/JobName.php b/vendor/laravel/framework/src/Illuminate/Queue/Jobs/JobName.php new file mode 100644 index 0000000..3ce43f9 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Queue/Jobs/JobName.php @@ -0,0 +1,44 @@ +job = $job; + $this->redis = $redis; + $this->queue = $queue; + $this->reserved = $reserved; + $this->container = $container; + $this->connectionName = $connectionName; + + $this->decoded = $this->payload(); + } + + /** + * Get the raw body string for the job. + * + * @return string + */ + public function getRawBody() + { + return $this->job; + } + + /** + * Delete the job from the queue. + * + * @return void + */ + public function delete() + { + parent::delete(); + + $this->redis->deleteReserved($this->queue, $this); + } + + /** + * Release the job back into the queue. + * + * @param int $delay + * @return void + */ + public function release($delay = 0) + { + parent::release($delay); + + $this->redis->deleteAndRelease($this->queue, $this, $delay); + } + + /** + * Get the number of times the job has been attempted. + * + * @return int + */ + public function attempts() + { + return Arr::get($this->decoded, 'attempts') + 1; + } + + /** + * Get the job identifier. + * + * @return string + */ + public function getJobId() + { + return Arr::get($this->decoded, 'id'); + } + + /** + * Get the underlying Redis factory implementation. + * + * @return \Illuminate\Contracts\Redis\Factory + */ + public function getRedisQueue() + { + return $this->redis; + } + + /** + * Get the underlying reserved Redis job. + * + * @return string + */ + public function getReservedJob() + { + return $this->reserved; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Jobs/SqsJob.php b/vendor/laravel/framework/src/Illuminate/Queue/Jobs/SqsJob.php new file mode 100755 index 0000000..962d758 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Queue/Jobs/SqsJob.php @@ -0,0 +1,124 @@ +sqs = $sqs; + $this->job = $job; + $this->queue = $queue; + $this->container = $container; + $this->connectionName = $connectionName; + } + + /** + * Release the job back into the queue. + * + * @param int $delay + * @return void + */ + public function release($delay = 0) + { + parent::release($delay); + + $this->sqs->changeMessageVisibility([ + 'QueueUrl' => $this->queue, + 'ReceiptHandle' => $this->job['ReceiptHandle'], + 'VisibilityTimeout' => $delay, + ]); + } + + /** + * Delete the job from the queue. + * + * @return void + */ + public function delete() + { + parent::delete(); + + $this->sqs->deleteMessage([ + 'QueueUrl' => $this->queue, 'ReceiptHandle' => $this->job['ReceiptHandle'], + ]); + } + + /** + * Get the number of times the job has been attempted. + * + * @return int + */ + public function attempts() + { + return (int) $this->job['Attributes']['ApproximateReceiveCount']; + } + + /** + * Get the job identifier. + * + * @return string + */ + public function getJobId() + { + return $this->job['MessageId']; + } + + /** + * Get the raw body string for the job. + * + * @return string + */ + public function getRawBody() + { + return $this->job['Body']; + } + + /** + * Get the underlying SQS client instance. + * + * @return \Aws\Sqs\SqsClient + */ + public function getSqs() + { + return $this->sqs; + } + + /** + * Get the underlying raw SQS job. + * + * @return array + */ + public function getSqsJob() + { + return $this->job; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Jobs/SyncJob.php b/vendor/laravel/framework/src/Illuminate/Queue/Jobs/SyncJob.php new file mode 100755 index 0000000..9aafb8a --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Queue/Jobs/SyncJob.php @@ -0,0 +1,91 @@ +queue = $queue; + $this->payload = $payload; + $this->container = $container; + $this->connectionName = $connectionName; + } + + /** + * Release the job back into the queue. + * + * @param int $delay + * @return void + */ + public function release($delay = 0) + { + parent::release($delay); + } + + /** + * Get the number of times the job has been attempted. + * + * @return int + */ + public function attempts() + { + return 1; + } + + /** + * Get the job identifier. + * + * @return string + */ + public function getJobId() + { + return ''; + } + + /** + * Get the raw body string for the job. + * + * @return string + */ + public function getRawBody() + { + return $this->payload; + } + + /** + * Get the name of the queue the job belongs to. + * + * @return string + */ + public function getQueue() + { + return 'sync'; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Listener.php b/vendor/laravel/framework/src/Illuminate/Queue/Listener.php new file mode 100755 index 0000000..fef3299 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Queue/Listener.php @@ -0,0 +1,248 @@ +commandPath = $commandPath; + $this->workerCommand = $this->buildCommandTemplate(); + } + + /** + * Build the environment specific worker command. + * + * @return string + */ + protected function buildCommandTemplate() + { + $command = 'queue:work %s --once --queue=%s --delay=%s --memory=%s --sleep=%s --tries=%s'; + + return "{$this->phpBinary()} {$this->artisanBinary()} {$command}"; + } + + /** + * Get the PHP binary. + * + * @return string + */ + protected function phpBinary() + { + return ProcessUtils::escapeArgument( + (new PhpExecutableFinder)->find(false) + ); + } + + /** + * Get the Artisan binary. + * + * @return string + */ + protected function artisanBinary() + { + return defined('ARTISAN_BINARY') + ? ProcessUtils::escapeArgument(ARTISAN_BINARY) + : 'artisan'; + } + + /** + * Listen to the given queue connection. + * + * @param string $connection + * @param string $queue + * @param \Illuminate\Queue\ListenerOptions $options + * @return void + */ + public function listen($connection, $queue, ListenerOptions $options) + { + $process = $this->makeProcess($connection, $queue, $options); + + while (true) { + $this->runProcess($process, $options->memory); + } + } + + /** + * Create a new Symfony process for the worker. + * + * @param string $connection + * @param string $queue + * @param \Illuminate\Queue\ListenerOptions $options + * @return \Symfony\Component\Process\Process + */ + public function makeProcess($connection, $queue, ListenerOptions $options) + { + $command = $this->workerCommand; + + // If the environment is set, we will append it to the command string so the + // workers will run under the specified environment. Otherwise, they will + // just run under the production environment which is not always right. + if (isset($options->environment)) { + $command = $this->addEnvironment($command, $options); + } + + // Next, we will just format out the worker commands with all of the various + // options available for the command. This will produce the final command + // line that we will pass into a Symfony process object for processing. + $command = $this->formatCommand( + $command, $connection, $queue, $options + ); + + return new Process( + $command, $this->commandPath, null, null, $options->timeout + ); + } + + /** + * Add the environment option to the given command. + * + * @param string $command + * @param \Illuminate\Queue\ListenerOptions $options + * @return string + */ + protected function addEnvironment($command, ListenerOptions $options) + { + return $command.' --env='.ProcessUtils::escapeArgument($options->environment); + } + + /** + * Format the given command with the listener options. + * + * @param string $command + * @param string $connection + * @param string $queue + * @param \Illuminate\Queue\ListenerOptions $options + * @return string + */ + protected function formatCommand($command, $connection, $queue, ListenerOptions $options) + { + return sprintf( + $command, + ProcessUtils::escapeArgument($connection), + ProcessUtils::escapeArgument($queue), + $options->delay, $options->memory, + $options->sleep, $options->maxTries + ); + } + + /** + * Run the given process. + * + * @param \Symfony\Component\Process\Process $process + * @param int $memory + * @return void + */ + public function runProcess(Process $process, $memory) + { + $process->run(function ($type, $line) { + $this->handleWorkerOutput($type, $line); + }); + + // Once we have run the job we'll go check if the memory limit has been exceeded + // for the script. If it has, we will kill this script so the process manager + // will restart this with a clean slate of memory automatically on exiting. + if ($this->memoryExceeded($memory)) { + $this->stop(); + } + } + + /** + * Handle output from the worker process. + * + * @param int $type + * @param string $line + * @return void + */ + protected function handleWorkerOutput($type, $line) + { + if (isset($this->outputHandler)) { + call_user_func($this->outputHandler, $type, $line); + } + } + + /** + * Determine if the memory limit has been exceeded. + * + * @param int $memoryLimit + * @return bool + */ + public function memoryExceeded($memoryLimit) + { + return (memory_get_usage() / 1024 / 1024) >= $memoryLimit; + } + + /** + * Stop listening and bail out of the script. + * + * @return void + */ + public function stop() + { + die; + } + + /** + * Set the output handler callback. + * + * @param \Closure $outputHandler + * @return void + */ + public function setOutputHandler(Closure $outputHandler) + { + $this->outputHandler = $outputHandler; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Queue/ListenerOptions.php b/vendor/laravel/framework/src/Illuminate/Queue/ListenerOptions.php new file mode 100644 index 0000000..9812a31 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Queue/ListenerOptions.php @@ -0,0 +1,31 @@ +environment = $environment; + + parent::__construct($delay, $memory, $timeout, $sleep, $maxTries, $force); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Queue/LuaScripts.php b/vendor/laravel/framework/src/Illuminate/Queue/LuaScripts.php new file mode 100644 index 0000000..93ac047 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Queue/LuaScripts.php @@ -0,0 +1,103 @@ +push($job, $data, $queue); + } + + /** + * Push a new job onto the queue after a delay. + * + * @param string $queue + * @param \DateTime|int $delay + * @param string $job + * @param mixed $data + * @return mixed + */ + public function laterOn($queue, $delay, $job, $data = '') + { + return $this->later($delay, $job, $data, $queue); + } + + /** + * Push an array of jobs onto the queue. + * + * @param array $jobs + * @param mixed $data + * @param string $queue + * @return mixed + */ + public function bulk($jobs, $data = '', $queue = null) + { + foreach ((array) $jobs as $job) { + $this->push($job, $data, $queue); + } + } + + /** + * Create a payload string from the given job and data. + * + * @param string $job + * @param mixed $data + * @param string $queue + * @return string + * + * @throws \Illuminate\Queue\InvalidPayloadException + */ + protected function createPayload($job, $data = '', $queue = null) + { + $payload = json_encode($this->createPayloadArray($job, $data, $queue)); + + if (JSON_ERROR_NONE !== json_last_error()) { + throw new InvalidPayloadException; + } + + return $payload; + } + + /** + * Create a payload array from the given job and data. + * + * @param string $job + * @param mixed $data + * @param string $queue + * @return array + */ + protected function createPayloadArray($job, $data = '', $queue = null) + { + return is_object($job) + ? $this->createObjectPayload($job) + : $this->createStringPayload($job, $data); + } + + /** + * Create a payload for an object-based queue handler. + * + * @param mixed $job + * @return array + */ + protected function createObjectPayload($job) + { + return [ + 'displayName' => $this->getDisplayName($job), + 'job' => 'Illuminate\Queue\CallQueuedHandler@call', + 'maxTries' => isset($job->tries) ? $job->tries : null, + 'timeout' => isset($job->timeout) ? $job->timeout : null, + 'data' => [ + 'commandName' => get_class($job), + 'command' => serialize(clone $job), + ], + ]; + } + + /** + * Get the display name for the given job. + * + * @param mixed $job + * @return string + */ + protected function getDisplayName($job) + { + return method_exists($job, 'displayName') + ? $job->displayName() : get_class($job); + } + + /** + * Create a typical, string based queue payload array. + * + * @param string $job + * @param mixed $data + * @return array + */ + protected function createStringPayload($job, $data) + { + return [ + 'displayName' => is_string($job) ? explode('@', $job)[0] : null, + 'job' => $job, 'maxTries' => null, + 'timeout' => null, 'data' => $data, + ]; + } + + /** + * Get the connection name for the queue. + * + * @return string + */ + public function getConnectionName() + { + return $this->connectionName; + } + + /** + * Set the connection name for the queue. + * + * @param string $name + * @return $this + */ + public function setConnectionName($name) + { + $this->connectionName = $name; + + return $this; + } + + /** + * Set the IoC container instance. + * + * @param \Illuminate\Container\Container $container + * @return void + */ + public function setContainer(Container $container) + { + $this->container = $container; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Queue/QueueManager.php b/vendor/laravel/framework/src/Illuminate/Queue/QueueManager.php new file mode 100755 index 0000000..b8fcb3c --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Queue/QueueManager.php @@ -0,0 +1,267 @@ +app = $app; + } + + /** + * Register an event listener for the before job event. + * + * @param mixed $callback + * @return void + */ + public function before($callback) + { + $this->app['events']->listen(Events\JobProcessing::class, $callback); + } + + /** + * Register an event listener for the after job event. + * + * @param mixed $callback + * @return void + */ + public function after($callback) + { + $this->app['events']->listen(Events\JobProcessed::class, $callback); + } + + /** + * Register an event listener for the exception occurred job event. + * + * @param mixed $callback + * @return void + */ + public function exceptionOccurred($callback) + { + $this->app['events']->listen(Events\JobExceptionOccurred::class, $callback); + } + + /** + * Register an event listener for the daemon queue loop. + * + * @param mixed $callback + * @return void + */ + public function looping($callback) + { + $this->app['events']->listen(Events\Looping::class, $callback); + } + + /** + * Register an event listener for the failed job event. + * + * @param mixed $callback + * @return void + */ + public function failing($callback) + { + $this->app['events']->listen(Events\JobFailed::class, $callback); + } + + /** + * Register an event listener for the daemon queue stopping. + * + * @param mixed $callback + * @return void + */ + public function stopping($callback) + { + $this->app['events']->listen(Events\WorkerStopping::class, $callback); + } + + /** + * Determine if the driver is connected. + * + * @param string $name + * @return bool + */ + public function connected($name = null) + { + return isset($this->connections[$name ?: $this->getDefaultDriver()]); + } + + /** + * Resolve a queue connection instance. + * + * @param string $name + * @return \Illuminate\Contracts\Queue\Queue + */ + public function connection($name = null) + { + $name = $name ?: $this->getDefaultDriver(); + + // If the connection has not been resolved yet we will resolve it now as all + // of the connections are resolved when they are actually needed so we do + // not make any unnecessary connection to the various queue end-points. + if (! isset($this->connections[$name])) { + $this->connections[$name] = $this->resolve($name); + + $this->connections[$name]->setContainer($this->app); + } + + return $this->connections[$name]; + } + + /** + * Resolve a queue connection. + * + * @param string $name + * @return \Illuminate\Contracts\Queue\Queue + */ + protected function resolve($name) + { + $config = $this->getConfig($name); + + return $this->getConnector($config['driver']) + ->connect($config) + ->setConnectionName($name); + } + + /** + * Get the connector for a given driver. + * + * @param string $driver + * @return \Illuminate\Queue\Connectors\ConnectorInterface + * + * @throws \InvalidArgumentException + */ + protected function getConnector($driver) + { + if (! isset($this->connectors[$driver])) { + throw new InvalidArgumentException("No connector for [$driver]"); + } + + return call_user_func($this->connectors[$driver]); + } + + /** + * Add a queue connection resolver. + * + * @param string $driver + * @param \Closure $resolver + * @return void + */ + public function extend($driver, Closure $resolver) + { + return $this->addConnector($driver, $resolver); + } + + /** + * Add a queue connection resolver. + * + * @param string $driver + * @param \Closure $resolver + * @return void + */ + public function addConnector($driver, Closure $resolver) + { + $this->connectors[$driver] = $resolver; + } + + /** + * Get the queue connection configuration. + * + * @param string $name + * @return array + */ + protected function getConfig($name) + { + if (! is_null($name) && $name !== 'null') { + return $this->app['config']["queue.connections.{$name}"]; + } + + return ['driver' => 'null']; + } + + /** + * Get the name of the default queue connection. + * + * @return string + */ + public function getDefaultDriver() + { + return $this->app['config']['queue.default']; + } + + /** + * Set the name of the default queue connection. + * + * @param string $name + * @return void + */ + public function setDefaultDriver($name) + { + $this->app['config']['queue.default'] = $name; + } + + /** + * Get the full name for the given connection. + * + * @param string $connection + * @return string + */ + public function getName($connection = null) + { + return $connection ?: $this->getDefaultDriver(); + } + + /** + * Determine if the application is in maintenance mode. + * + * @return bool + */ + public function isDownForMaintenance() + { + return $this->app->isDownForMaintenance(); + } + + /** + * Dynamically pass calls to the default connection. + * + * @param string $method + * @param array $parameters + * @return mixed + */ + public function __call($method, $parameters) + { + return $this->connection()->$method(...$parameters); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Queue/QueueServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Queue/QueueServiceProvider.php new file mode 100755 index 0000000..2ad923e --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Queue/QueueServiceProvider.php @@ -0,0 +1,230 @@ +registerManager(); + + $this->registerConnection(); + + $this->registerWorker(); + + $this->registerListener(); + + $this->registerFailedJobServices(); + } + + /** + * Register the queue manager. + * + * @return void + */ + protected function registerManager() + { + $this->app->singleton('queue', function ($app) { + // Once we have an instance of the queue manager, we will register the various + // resolvers for the queue connectors. These connectors are responsible for + // creating the classes that accept queue configs and instantiate queues. + return tap(new QueueManager($app), function ($manager) { + $this->registerConnectors($manager); + }); + }); + } + + /** + * Register the default queue connection binding. + * + * @return void + */ + protected function registerConnection() + { + $this->app->singleton('queue.connection', function ($app) { + return $app['queue']->connection(); + }); + } + + /** + * Register the connectors on the queue manager. + * + * @param \Illuminate\Queue\QueueManager $manager + * @return void + */ + public function registerConnectors($manager) + { + foreach (['Null', 'Sync', 'Database', 'Redis', 'Beanstalkd', 'Sqs'] as $connector) { + $this->{"register{$connector}Connector"}($manager); + } + } + + /** + * Register the Null queue connector. + * + * @param \Illuminate\Queue\QueueManager $manager + * @return void + */ + protected function registerNullConnector($manager) + { + $manager->addConnector('null', function () { + return new NullConnector; + }); + } + + /** + * Register the Sync queue connector. + * + * @param \Illuminate\Queue\QueueManager $manager + * @return void + */ + protected function registerSyncConnector($manager) + { + $manager->addConnector('sync', function () { + return new SyncConnector; + }); + } + + /** + * Register the database queue connector. + * + * @param \Illuminate\Queue\QueueManager $manager + * @return void + */ + protected function registerDatabaseConnector($manager) + { + $manager->addConnector('database', function () { + return new DatabaseConnector($this->app['db']); + }); + } + + /** + * Register the Redis queue connector. + * + * @param \Illuminate\Queue\QueueManager $manager + * @return void + */ + protected function registerRedisConnector($manager) + { + $manager->addConnector('redis', function () { + return new RedisConnector($this->app['redis']); + }); + } + + /** + * Register the Beanstalkd queue connector. + * + * @param \Illuminate\Queue\QueueManager $manager + * @return void + */ + protected function registerBeanstalkdConnector($manager) + { + $manager->addConnector('beanstalkd', function () { + return new BeanstalkdConnector; + }); + } + + /** + * Register the Amazon SQS queue connector. + * + * @param \Illuminate\Queue\QueueManager $manager + * @return void + */ + protected function registerSqsConnector($manager) + { + $manager->addConnector('sqs', function () { + return new SqsConnector; + }); + } + + /** + * Register the queue worker. + * + * @return void + */ + protected function registerWorker() + { + $this->app->singleton('queue.worker', function () { + return new Worker( + $this->app['queue'], $this->app['events'], $this->app[ExceptionHandler::class] + ); + }); + } + + /** + * Register the queue listener. + * + * @return void + */ + protected function registerListener() + { + $this->app->singleton('queue.listener', function () { + return new Listener($this->app->basePath()); + }); + } + + /** + * Register the failed job services. + * + * @return void + */ + protected function registerFailedJobServices() + { + $this->app->singleton('queue.failer', function () { + $config = $this->app['config']['queue.failed']; + + return isset($config['table']) + ? $this->databaseFailedJobProvider($config) + : new NullFailedJobProvider; + }); + } + + /** + * Create a new database failed job provider. + * + * @param array $config + * @return \Illuminate\Queue\Failed\DatabaseFailedJobProvider + */ + protected function databaseFailedJobProvider($config) + { + return new DatabaseFailedJobProvider( + $this->app['db'], $config['database'], $config['table'] + ); + } + + /** + * Get the services provided by the provider. + * + * @return array + */ + public function provides() + { + return [ + 'queue', 'queue.worker', 'queue.listener', + 'queue.failer', 'queue.connection', + ]; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Queue/README.md b/vendor/laravel/framework/src/Illuminate/Queue/README.md new file mode 100644 index 0000000..d0f2ba4 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Queue/README.md @@ -0,0 +1,34 @@ +## Illuminate Queue + +The Laravel Queue component provides a unified API across a variety of different queue services. Queues allow you to defer the processing of a time consuming task, such as sending an e-mail, until a later time, thus drastically speeding up the web requests to your application. + +### Usage Instructions + +First, create a new Queue `Capsule` manager instance. Similar to the "Capsule" provided for the Eloquent ORM, the queue Capsule aims to make configuring the library for usage outside of the Laravel framework as easy as possible. + +```PHP +use Illuminate\Queue\Capsule\Manager as Queue; + +$queue = new Queue; + +$queue->addConnection([ + 'driver' => 'beanstalkd', + 'host' => 'localhost', + 'queue' => 'default', +]); + +// Make this Capsule instance available globally via static methods... (optional) +$queue->setAsGlobal(); +``` + +Once the Capsule instance has been registered. You may use it like so: + +```PHP +// As an instance... +$queue->push('SendEmail', array('message' => $message)); + +// If setAsGlobal has been called... +Queue::push('SendEmail', array('message' => $message)); +``` + +For further documentation on using the queue, consult the [Laravel framework documentation](https://laravel.com/docs). diff --git a/vendor/laravel/framework/src/Illuminate/Queue/RedisQueue.php b/vendor/laravel/framework/src/Illuminate/Queue/RedisQueue.php new file mode 100644 index 0000000..9dad241 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Queue/RedisQueue.php @@ -0,0 +1,281 @@ +redis = $redis; + $this->default = $default; + $this->connection = $connection; + $this->retryAfter = $retryAfter; + } + + /** + * Get the size of the queue. + * + * @param string $queue + * @return int + */ + public function size($queue = null) + { + $queue = $this->getQueue($queue); + + return $this->getConnection()->eval( + LuaScripts::size(), 3, $queue, $queue.':delayed', $queue.':reserved' + ); + } + + /** + * Push a new job onto the queue. + * + * @param object|string $job + * @param mixed $data + * @param string $queue + * @return mixed + */ + public function push($job, $data = '', $queue = null) + { + return $this->pushRaw($this->createPayload($job, $data), $queue); + } + + /** + * Push a raw payload onto the queue. + * + * @param string $payload + * @param string $queue + * @param array $options + * @return mixed + */ + public function pushRaw($payload, $queue = null, array $options = []) + { + $this->getConnection()->rpush($this->getQueue($queue), $payload); + + return Arr::get(json_decode($payload, true), 'id'); + } + + /** + * Push a new job onto the queue after a delay. + * + * @param \DateTime|int $delay + * @param object|string $job + * @param mixed $data + * @param string $queue + * @return mixed + */ + public function later($delay, $job, $data = '', $queue = null) + { + return $this->laterRaw($delay, $this->createPayload($job, $data), $queue); + } + + /** + * Push a raw job onto the queue after a delay. + * + * @param \DateTime|int $delay + * @param string $payload + * @param string $queue + * @return mixed + */ + protected function laterRaw($delay, $payload, $queue = null) + { + $this->getConnection()->zadd( + $this->getQueue($queue).':delayed', $this->availableAt($delay), $payload + ); + + return Arr::get(json_decode($payload, true), 'id'); + } + + /** + * Create a payload string from the given job and data. + * + * @param string $job + * @param mixed $data + * @param string $queue + * @return string + */ + protected function createPayloadArray($job, $data = '', $queue = null) + { + return array_merge(parent::createPayloadArray($job, $data, $queue), [ + 'id' => $this->getRandomId(), + 'attempts' => 0, + ]); + } + + /** + * Pop the next job off of the queue. + * + * @param string $queue + * @return \Illuminate\Contracts\Queue\Job|null + */ + public function pop($queue = null) + { + $this->migrate($prefixed = $this->getQueue($queue)); + + list($job, $reserved) = $this->retrieveNextJob($prefixed); + + if ($reserved) { + return new RedisJob( + $this->container, $this, $job, + $reserved, $this->connectionName, $queue ?: $this->default + ); + } + } + + /** + * Migrate any delayed or expired jobs onto the primary queue. + * + * @param string $queue + * @return void + */ + protected function migrate($queue) + { + $this->migrateExpiredJobs($queue.':delayed', $queue); + + if (! is_null($this->retryAfter)) { + $this->migrateExpiredJobs($queue.':reserved', $queue); + } + } + + /** + * Migrate the delayed jobs that are ready to the regular queue. + * + * @param string $from + * @param string $to + * @return array + */ + public function migrateExpiredJobs($from, $to) + { + return $this->getConnection()->eval( + LuaScripts::migrateExpiredJobs(), 2, $from, $to, $this->currentTime() + ); + } + + /** + * Retrieve the next job from the queue. + * + * @param string $queue + * @return array + */ + protected function retrieveNextJob($queue) + { + return $this->getConnection()->eval( + LuaScripts::pop(), 2, $queue, $queue.':reserved', + $this->availableAt($this->retryAfter) + ); + } + + /** + * Delete a reserved job from the queue. + * + * @param string $queue + * @param \Illuminate\Queue\Jobs\RedisJob $job + * @return void + */ + public function deleteReserved($queue, $job) + { + $this->getConnection()->zrem($this->getQueue($queue).':reserved', $job->getReservedJob()); + } + + /** + * Delete a reserved job from the reserved queue and release it. + * + * @param string $queue + * @param \Illuminate\Queue\Jobs\RedisJob $job + * @param int $delay + * @return void + */ + public function deleteAndRelease($queue, $job, $delay) + { + $queue = $this->getQueue($queue); + + $this->getConnection()->eval( + LuaScripts::release(), 2, $queue.':delayed', $queue.':reserved', + $job->getReservedJob(), $this->availableAt($delay) + ); + } + + /** + * Get a random ID string. + * + * @return string + */ + protected function getRandomId() + { + return Str::random(32); + } + + /** + * Get the queue or return the default. + * + * @param string|null $queue + * @return string + */ + protected function getQueue($queue) + { + return 'queues:'.($queue ?: $this->default); + } + + /** + * Get the connection for the queue. + * + * @return \Predis\ClientInterface + */ + protected function getConnection() + { + return $this->redis->connection($this->connection); + } + + /** + * Get the underlying Redis instance. + * + * @return \Illuminate\Contracts\Redis\Factory + */ + public function getRedis() + { + return $this->redis; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Queue/SerializesAndRestoresModelIdentifiers.php b/vendor/laravel/framework/src/Illuminate/Queue/SerializesAndRestoresModelIdentifiers.php new file mode 100644 index 0000000..2e5fedb --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Queue/SerializesAndRestoresModelIdentifiers.php @@ -0,0 +1,77 @@ +getQueueableClass(), $value->getQueueableIds()); + } + + if ($value instanceof QueueableEntity) { + return new ModelIdentifier(get_class($value), $value->getQueueableId()); + } + + return $value; + } + + /** + * Get the restored property value after deserialization. + * + * @param mixed $value + * @return mixed + */ + protected function getRestoredPropertyValue($value) + { + if (! $value instanceof ModelIdentifier) { + return $value; + } + + return is_array($value->id) + ? $this->restoreCollection($value) + : $this->getQueryForModelRestoration(new $value->class) + ->useWritePdo()->findOrFail($value->id); + } + + /** + * Restore a queueable collection instance. + * + * @param \Illuminate\Contracts\Database\ModelIdentifier $value + * @return \Illuminate\Database\Eloquent\Collection + */ + protected function restoreCollection($value) + { + if (! $value->class || count($value->id) === 0) { + return new EloquentCollection; + } + + $model = new $value->class; + + return $this->getQueryForModelRestoration($model)->useWritePdo() + ->whereIn($model->getQualifiedKeyName(), $value->id)->get(); + } + + /** + * Get the query for restoration. + * + * @param \Illuminate\Database\Eloquent\Model $model + * @return \Illuminate\Database\Eloquent\Builder + */ + protected function getQueryForModelRestoration($model) + { + return $model->newQueryWithoutScopes(); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Queue/SerializesModels.php b/vendor/laravel/framework/src/Illuminate/Queue/SerializesModels.php new file mode 100644 index 0000000..62f7e72 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Queue/SerializesModels.php @@ -0,0 +1,58 @@ +getProperties(); + + foreach ($properties as $property) { + $property->setValue($this, $this->getSerializedPropertyValue( + $this->getPropertyValue($property) + )); + } + + return array_map(function ($p) { + return $p->getName(); + }, $properties); + } + + /** + * Restore the model after serialization. + * + * @return void + */ + public function __wakeup() + { + foreach ((new ReflectionClass($this))->getProperties() as $property) { + $property->setValue($this, $this->getRestoredPropertyValue( + $this->getPropertyValue($property) + )); + } + } + + /** + * Get the property value for the given property. + * + * @param \ReflectionProperty $property + * @return mixed + */ + protected function getPropertyValue(ReflectionProperty $property) + { + $property->setAccessible(true); + + return $property->getValue($this); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Queue/SqsQueue.php b/vendor/laravel/framework/src/Illuminate/Queue/SqsQueue.php new file mode 100755 index 0000000..dc85d97 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Queue/SqsQueue.php @@ -0,0 +1,155 @@ +sqs = $sqs; + $this->prefix = $prefix; + $this->default = $default; + } + + /** + * Get the size of the queue. + * + * @param string $queue + * @return int + */ + public function size($queue = null) + { + $response = $this->sqs->getQueueAttributes([ + 'QueueUrl' => $this->getQueue($queue), + 'AttributeNames' => ['ApproximateNumberOfMessages'], + ]); + + $attributes = $response->get('Attributes'); + + return (int) $attributes['ApproximateNumberOfMessages']; + } + + /** + * Push a new job onto the queue. + * + * @param string $job + * @param mixed $data + * @param string $queue + * @return mixed + */ + public function push($job, $data = '', $queue = null) + { + return $this->pushRaw($this->createPayload($job, $data), $queue); + } + + /** + * Push a raw payload onto the queue. + * + * @param string $payload + * @param string $queue + * @param array $options + * @return mixed + */ + public function pushRaw($payload, $queue = null, array $options = []) + { + return $this->sqs->sendMessage([ + 'QueueUrl' => $this->getQueue($queue), 'MessageBody' => $payload, + ])->get('MessageId'); + } + + /** + * Push a new job onto the queue after a delay. + * + * @param \DateTime|int $delay + * @param string $job + * @param mixed $data + * @param string $queue + * @return mixed + */ + public function later($delay, $job, $data = '', $queue = null) + { + return $this->sqs->sendMessage([ + 'QueueUrl' => $this->getQueue($queue), + 'MessageBody' => $this->createPayload($job, $data), + 'DelaySeconds' => $this->secondsUntil($delay), + ])->get('MessageId'); + } + + /** + * Pop the next job off of the queue. + * + * @param string $queue + * @return \Illuminate\Contracts\Queue\Job|null + */ + public function pop($queue = null) + { + $response = $this->sqs->receiveMessage([ + 'QueueUrl' => $queue = $this->getQueue($queue), + 'AttributeNames' => ['ApproximateReceiveCount'], + ]); + + if (count($response['Messages']) > 0) { + return new SqsJob( + $this->container, $this->sqs, $response['Messages'][0], + $this->connectionName, $queue + ); + } + } + + /** + * Get the queue or return the default. + * + * @param string|null $queue + * @return string + */ + public function getQueue($queue) + { + $queue = $queue ?: $this->default; + + return filter_var($queue, FILTER_VALIDATE_URL) === false + ? rtrim($this->prefix, '/').'/'.$queue : $queue; + } + + /** + * Get the underlying SQS instance. + * + * @return \Aws\Sqs\SqsClient + */ + public function getSqs() + { + return $this->sqs; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Queue/SyncQueue.php b/vendor/laravel/framework/src/Illuminate/Queue/SyncQueue.php new file mode 100755 index 0000000..4d8184c --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Queue/SyncQueue.php @@ -0,0 +1,161 @@ +resolveJob($this->createPayload($job, $data, $queue), $queue); + + try { + $this->raiseBeforeJobEvent($queueJob); + + $queueJob->fire(); + + $this->raiseAfterJobEvent($queueJob); + } catch (Exception $e) { + $this->handleException($queueJob, $e); + } catch (Throwable $e) { + $this->handleException($queueJob, new FatalThrowableError($e)); + } + + return 0; + } + + /** + * Resolve a Sync job instance. + * + * @param string $payload + * @param string $queue + * @return \Illuminate\Queue\Jobs\SyncJob + */ + protected function resolveJob($payload, $queue) + { + return new SyncJob($this->container, $payload, $this->connectionName, $queue); + } + + /** + * Raise the before queue job event. + * + * @param \Illuminate\Contracts\Queue\Job $job + * @return void + */ + protected function raiseBeforeJobEvent(Job $job) + { + if ($this->container->bound('events')) { + $this->container['events']->fire(new Events\JobProcessing($this->connectionName, $job)); + } + } + + /** + * Raise the after queue job event. + * + * @param \Illuminate\Contracts\Queue\Job $job + * @return void + */ + protected function raiseAfterJobEvent(Job $job) + { + if ($this->container->bound('events')) { + $this->container['events']->fire(new Events\JobProcessed($this->connectionName, $job)); + } + } + + /** + * Raise the exception occurred queue job event. + * + * @param \Illuminate\Contracts\Queue\Job $job + * @param \Exception $e + * @return void + */ + protected function raiseExceptionOccurredJobEvent(Job $job, $e) + { + if ($this->container->bound('events')) { + $this->container['events']->fire(new Events\JobExceptionOccurred($this->connectionName, $job, $e)); + } + } + + /** + * Handle an exception that occurred while processing a job. + * + * @param \Illuminate\Queue\Jobs\Job $queueJob + * @param \Exception $e + * @return void + * + * @throws \Exception + */ + protected function handleException($queueJob, $e) + { + $this->raiseExceptionOccurredJobEvent($queueJob, $e); + + FailingJob::handle($this->connectionName, $queueJob, $e); + + throw $e; + } + + /** + * Push a raw payload onto the queue. + * + * @param string $payload + * @param string $queue + * @param array $options + * @return mixed + */ + public function pushRaw($payload, $queue = null, array $options = []) + { + // + } + + /** + * Push a new job onto the queue after a delay. + * + * @param \DateTime|int $delay + * @param string $job + * @param mixed $data + * @param string $queue + * @return mixed + */ + public function later($delay, $job, $data = '', $queue = null) + { + return $this->push($job, $data, $queue); + } + + /** + * Pop the next job off of the queue. + * + * @param string $queue + * @return \Illuminate\Contracts\Queue\Job|null + */ + public function pop($queue = null) + { + // + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Worker.php b/vendor/laravel/framework/src/Illuminate/Queue/Worker.php new file mode 100644 index 0000000..782a863 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Queue/Worker.php @@ -0,0 +1,592 @@ +events = $events; + $this->manager = $manager; + $this->exceptions = $exceptions; + } + + /** + * Listen to the given queue in a loop. + * + * @param string $connectionName + * @param string $queue + * @param \Illuminate\Queue\WorkerOptions $options + * @return void + */ + public function daemon($connectionName, $queue, WorkerOptions $options) + { + $this->listenForSignals(); + + $lastRestart = $this->getTimestampOfLastQueueRestart(); + + while (true) { + // Before reserving any jobs, we will make sure this queue is not paused and + // if it is we will just pause this worker for a given amount of time and + // make sure we do not need to kill this worker process off completely. + if (! $this->daemonShouldRun($options)) { + $this->pauseWorker($options, $lastRestart); + + continue; + } + + // First, we will attempt to get the next job off of the queue. We will also + // register the timeout handler and reset the alarm for this job so it is + // not stuck in a frozen state forever. Then, we can fire off this job. + $job = $this->getNextJob( + $this->manager->connection($connectionName), $queue + ); + + $this->registerTimeoutHandler($job, $options); + + // If the daemon should run (not in maintenance mode, etc.), then we can run + // fire off this job for processing. Otherwise, we will need to sleep the + // worker so no more jobs are processed until they should be processed. + if ($job) { + $this->runJob($job, $connectionName, $options); + } else { + $this->sleep($options->sleep); + } + + // Finally, we will check to see if we have exceeded our memory limits or if + // the queue should restart based on other indications. If so, we'll stop + // this worker and let whatever is "monitoring" it restart the process. + $this->stopIfNecessary($options, $lastRestart); + } + } + + /** + * Register the worker timeout handler (PHP 7.1+). + * + * @param \Illuminate\Contracts\Queue\Job|null $job + * @param WorkerOptions $options + * @return void + */ + protected function registerTimeoutHandler($job, WorkerOptions $options) + { + if ($options->timeout > 0 && $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. + pcntl_signal(SIGALRM, function () { + $this->kill(1); + }); + + pcntl_alarm($this->timeoutForJob($job, $options) + $options->sleep); + } + } + + /** + * Get the appropriate timeout for the given job. + * + * @param \Illuminate\Contracts\Queue\Job|null $job + * @param WorkerOptions $options + * @return int + */ + protected function timeoutForJob($job, WorkerOptions $options) + { + return $job && ! is_null($job->timeout()) ? $job->timeout() : $options->timeout; + } + + /** + * Determine if the daemon should process on this iteration. + * + * @param WorkerOptions $options + * @return bool + */ + protected function daemonShouldRun(WorkerOptions $options) + { + return ! (($this->manager->isDownForMaintenance() && ! $options->force) || + $this->paused || + $this->events->until(new Events\Looping) === false); + } + + /** + * Pause the worker for the current loop. + * + * @param WorkerOptions $options + * @param int $lastRestart + * @return void + */ + protected function pauseWorker(WorkerOptions $options, $lastRestart) + { + $this->sleep($options->sleep > 0 ? $options->sleep : 1); + + $this->stopIfNecessary($options, $lastRestart); + } + + /** + * Stop the process if necessary. + * + * @param WorkerOptions $options + * @param int $lastRestart + */ + protected function stopIfNecessary(WorkerOptions $options, $lastRestart) + { + if ($this->shouldQuit) { + $this->kill(); + } + + if ($this->memoryExceeded($options->memory)) { + $this->stop(12); + } elseif ($this->queueShouldRestart($lastRestart)) { + $this->stop(); + } + } + + /** + * Process the next job on the queue. + * + * @param string $connectionName + * @param string $queue + * @param \Illuminate\Queue\WorkerOptions $options + * @return void + */ + public function runNextJob($connectionName, $queue, WorkerOptions $options) + { + $job = $this->getNextJob( + $this->manager->connection($connectionName), $queue + ); + + // If we're able to pull a job off of the stack, we will process it and then return + // from this method. If there is no job on the queue, we will "sleep" the worker + // for the specified number of seconds, then keep processing jobs after sleep. + if ($job) { + return $this->runJob($job, $connectionName, $options); + } + + $this->sleep($options->sleep); + } + + /** + * Get the next job from the queue connection. + * + * @param \Illuminate\Contracts\Queue\Queue $connection + * @param string $queue + * @return \Illuminate\Contracts\Queue\Job|null + */ + protected function getNextJob($connection, $queue) + { + try { + foreach (explode(',', $queue) as $queue) { + if (! is_null($job = $connection->pop($queue))) { + return $job; + } + } + } catch (Exception $e) { + $this->exceptions->report($e); + } catch (Throwable $e) { + $this->exceptions->report(new FatalThrowableError($e)); + } + } + + /** + * Process the given job. + * + * @param \Illuminate\Contracts\Queue\Job $job + * @param string $connectionName + * @param \Illuminate\Queue\WorkerOptions $options + * @return void + */ + protected function runJob($job, $connectionName, WorkerOptions $options) + { + try { + return $this->process($connectionName, $job, $options); + } catch (Exception $e) { + $this->exceptions->report($e); + } catch (Throwable $e) { + $this->exceptions->report(new FatalThrowableError($e)); + } + } + + /** + * Process the given job from the queue. + * + * @param string $connectionName + * @param \Illuminate\Contracts\Queue\Job $job + * @param \Illuminate\Queue\WorkerOptions $options + * @return void + * + * @throws \Throwable + */ + public function process($connectionName, $job, WorkerOptions $options) + { + try { + // First we will raise the before job event and determine if the job has already ran + // over the its maximum attempt limit, which could primarily happen if the job is + // continually timing out and not actually throwing any exceptions from itself. + $this->raiseBeforeJobEvent($connectionName, $job); + + $this->markJobAsFailedIfAlreadyExceedsMaxAttempts( + $connectionName, $job, (int) $options->maxTries + ); + + // Here we will fire off the job and let it process. We will catch any exceptions so + // they can be reported to the developers logs, etc. Once the job is finished the + // proper events will be fired to let any listeners know this job has finished. + $job->fire(); + + $this->raiseAfterJobEvent($connectionName, $job); + } catch (Exception $e) { + $this->handleJobException($connectionName, $job, $options, $e); + } catch (Throwable $e) { + $this->handleJobException( + $connectionName, $job, $options, new FatalThrowableError($e) + ); + } + } + + /** + * Handle an exception that occurred while the job was running. + * + * @param string $connectionName + * @param \Illuminate\Contracts\Queue\Job $job + * @param \Illuminate\Queue\WorkerOptions $options + * @param \Exception $e + * @return void + * + * @throws \Exception + */ + protected function handleJobException($connectionName, $job, WorkerOptions $options, $e) + { + try { + // 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 + ); + + $this->raiseExceptionOccurredJobEvent( + $connectionName, $job, $e + ); + } finally { + // If we catch an exception, we will attempt to release the job back onto the queue + // so it is not lost entirely. This'll let the job be retried at a later time by + // another listener (or this same one). We will re-throw this exception after. + if (! $job->isDeleted() && ! $job->isReleased() && ! $job->hasFailed()) { + $job->release($options->delay); + } + } + + throw $e; + } + + /** + * Mark the given job as failed if it has exceeded the maximum allowed attempts. + * + * This will likely be because the job previously exceeded a timeout. + * + * @param string $connectionName + * @param \Illuminate\Contracts\Queue\Job $job + * @param int $maxTries + * @return void + */ + protected function markJobAsFailedIfAlreadyExceedsMaxAttempts($connectionName, $job, $maxTries) + { + $maxTries = ! is_null($job->maxTries()) ? $job->maxTries() : $maxTries; + + if ($maxTries === 0 || $job->attempts() <= $maxTries) { + return; + } + + $this->failJob($connectionName, $job, $e = new MaxAttemptsExceededException( + 'A queued job has been attempted too many times. The job may have previously timed out.' + )); + + throw $e; + } + + /** + * Mark the given job as failed if it has exceeded the maximum allowed attempts. + * + * @param string $connectionName + * @param \Illuminate\Contracts\Queue\Job $job + * @param int $maxTries + * @param \Exception $e + * @return void + */ + protected function markJobAsFailedIfWillExceedMaxAttempts($connectionName, $job, $maxTries, $e) + { + $maxTries = ! is_null($job->maxTries()) ? $job->maxTries() : $maxTries; + + if ($maxTries > 0 && $job->attempts() >= $maxTries) { + $this->failJob($connectionName, $job, $e); + } + } + + /** + * Mark the given job as failed and raise the relevant event. + * + * @param string $connectionName + * @param \Illuminate\Contracts\Queue\Job $job + * @param \Exception $e + * @return void + */ + protected function failJob($connectionName, $job, $e) + { + return FailingJob::handle($connectionName, $job, $e); + } + + /** + * Raise the before queue job event. + * + * @param string $connectionName + * @param \Illuminate\Contracts\Queue\Job $job + * @return void + */ + protected function raiseBeforeJobEvent($connectionName, $job) + { + $this->events->fire(new Events\JobProcessing( + $connectionName, $job + )); + } + + /** + * Raise the after queue job event. + * + * @param string $connectionName + * @param \Illuminate\Contracts\Queue\Job $job + * @return void + */ + protected function raiseAfterJobEvent($connectionName, $job) + { + $this->events->fire(new Events\JobProcessed( + $connectionName, $job + )); + } + + /** + * Raise the exception occurred queue job event. + * + * @param string $connectionName + * @param \Illuminate\Contracts\Queue\Job $job + * @param \Exception $e + * @return void + */ + protected function raiseExceptionOccurredJobEvent($connectionName, $job, $e) + { + $this->events->fire(new Events\JobExceptionOccurred( + $connectionName, $job, $e + )); + } + + /** + * Raise the failed queue job event. + * + * @param string $connectionName + * @param \Illuminate\Contracts\Queue\Job $job + * @param \Exception $e + * @return void + */ + protected function raiseFailedJobEvent($connectionName, $job, $e) + { + $this->events->fire(new Events\JobFailed( + $connectionName, $job, $e + )); + } + + /** + * Determine if the queue worker should restart. + * + * @param int|null $lastRestart + * @return bool + */ + protected function queueShouldRestart($lastRestart) + { + return $this->getTimestampOfLastQueueRestart() != $lastRestart; + } + + /** + * Get the last queue restart timestamp, or null. + * + * @return int|null + */ + protected function getTimestampOfLastQueueRestart() + { + if ($this->cache) { + return $this->cache->get('illuminate:queue:restart'); + } + } + + /** + * Enable async signals for the process. + * + * @return void + */ + protected function listenForSignals() + { + if ($this->supportsAsyncSignals()) { + pcntl_async_signals(true); + + pcntl_signal(SIGTERM, function () { + $this->shouldQuit = true; + }); + + pcntl_signal(SIGUSR2, function () { + $this->paused = true; + }); + + pcntl_signal(SIGCONT, function () { + $this->paused = false; + }); + } + } + + /** + * Determine if "async" signals are supported. + * + * @return bool + */ + protected function supportsAsyncSignals() + { + return version_compare(PHP_VERSION, '7.1.0') >= 0 && + extension_loaded('pcntl'); + } + + /** + * Determine if the memory limit has been exceeded. + * + * @param int $memoryLimit + * @return bool + */ + public function memoryExceeded($memoryLimit) + { + return (memory_get_usage() / 1024 / 1024) >= $memoryLimit; + } + + /** + * Stop listening and bail out of the script. + * + * @param int $status + * @return void + */ + public function stop($status = 0) + { + $this->events->fire(new Events\WorkerStopping); + + exit($status); + } + + /** + * Kill the process. + * + * @param int $status + * @return void + */ + public function kill($status = 0) + { + if (extension_loaded('posix')) { + posix_kill(getmypid(), SIGKILL); + } + + exit($status); + } + + /** + * Sleep the script for a given number of seconds. + * + * @param int $seconds + * @return void + */ + public function sleep($seconds) + { + sleep($seconds); + } + + /** + * Set the cache repository implementation. + * + * @param \Illuminate\Contracts\Cache\Repository $cache + * @return void + */ + public function setCache(CacheContract $cache) + { + $this->cache = $cache; + } + + /** + * Get the queue manager instance. + * + * @return \Illuminate\Queue\QueueManager + */ + public function getManager() + { + return $this->manager; + } + + /** + * Set the queue manager instance. + * + * @param \Illuminate\Queue\QueueManager $manager + * @return void + */ + public function setManager(QueueManager $manager) + { + $this->manager = $manager; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Queue/WorkerOptions.php b/vendor/laravel/framework/src/Illuminate/Queue/WorkerOptions.php new file mode 100644 index 0000000..ba35e75 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Queue/WorkerOptions.php @@ -0,0 +1,68 @@ +delay = $delay; + $this->sleep = $sleep; + $this->force = $force; + $this->memory = $memory; + $this->timeout = $timeout; + $this->maxTries = $maxTries; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Queue/composer.json b/vendor/laravel/framework/src/Illuminate/Queue/composer.json new file mode 100644 index 0000000..40a774a --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Queue/composer.json @@ -0,0 +1,46 @@ +{ + "name": "illuminate/queue", + "description": "The Illuminate Queue package.", + "license": "MIT", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "require": { + "php": ">=5.6.4", + "illuminate/console": "5.4.*", + "illuminate/container": "5.4.*", + "illuminate/contracts": "5.4.*", + "illuminate/filesystem": "5.4.*", + "illuminate/support": "5.4.*", + "nesbot/carbon": "~1.20", + "symfony/debug": "~3.2", + "symfony/process": "~3.2" + }, + "autoload": { + "psr-4": { + "Illuminate\\Queue\\": "" + } + }, + "extra": { + "branch-alias": { + "dev-master": "5.4-dev" + } + }, + "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)." + }, + "config": { + "sort-packages": true + }, + "minimum-stability": "dev" +} diff --git a/vendor/laravel/framework/src/Illuminate/Redis/Connections/Connection.php b/vendor/laravel/framework/src/Illuminate/Redis/Connections/Connection.php new file mode 100644 index 0000000..9a7c163 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Redis/Connections/Connection.php @@ -0,0 +1,83 @@ +client; + } + + /** + * Subscribe to a set of given channels for messages. + * + * @param array|string $channels + * @param \Closure $callback + * @return void + */ + public function subscribe($channels, Closure $callback) + { + return $this->createSubscription($channels, $callback, __FUNCTION__); + } + + /** + * Subscribe to a set of given channels with wildcards. + * + * @param array|string $channels + * @param \Closure $callback + * @return void + */ + public function psubscribe($channels, Closure $callback) + { + return $this->createSubscription($channels, $callback, __FUNCTION__); + } + + /** + * Run a command against the Redis database. + * + * @param string $method + * @param array $parameters + * @return mixed + */ + public function command($method, array $parameters = []) + { + return $this->client->{$method}(...$parameters); + } + + /** + * Pass other method calls down to the underlying client. + * + * @param string $method + * @param array $parameters + * @return mixed + */ + public function __call($method, $parameters) + { + return $this->command($method, $parameters); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Redis/Connections/PhpRedisClusterConnection.php b/vendor/laravel/framework/src/Illuminate/Redis/Connections/PhpRedisClusterConnection.php new file mode 100644 index 0000000..e246fe6 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Redis/Connections/PhpRedisClusterConnection.php @@ -0,0 +1,8 @@ +client = $client; + } + + /** + * Returns the value of the given key. + * + * @param string $key + * @return string|null + */ + public function get($key) + { + $result = $this->client->get($key); + + return $result !== false ? $result : null; + } + + /** + * Get the values of all the given keys. + * + * @param array $keys + * @return array + */ + public function mget(array $keys) + { + return array_map(function ($value) { + return $value !== false ? $value : null; + }, $this->client->mget($keys)); + } + + /** + * Set the string value in argument as value of the key. + * + * @param string $key + * @param mixed $value + * @param string|null $expireResolution + * @param int|null $expireTTL + * @param string|null $flag + * @return bool + */ + public function set($key, $value, $expireResolution = null, $expireTTL = null, $flag = null) + { + return $this->command('set', [ + $key, + $value, + $expireResolution ? [$expireResolution, $flag => $expireTTL] : null, + ]); + } + + /** + * Removes the first count occurences of the value element from the list. + * + * @param string $key + * @param int $count + * @param $value $value + * @return int|false + */ + public function lrem($key, $count, $value) + { + return $this->command('lrem', [$key, $value, $count]); + } + + /** + * Removes and returns a random element from the set value at key. + * + * @param string $key + * @param int|null $count + * @return mixed|false + */ + public function spop($key, $count = null) + { + return $this->command('spop', [$key]); + } + + /** + * Add one or more members to a sorted set or update its score if it already exists. + * + * @param string $key + * @param mixed $dictionary + * @return int + */ + public function zadd($key, ...$dictionary) + { + if (count($dictionary) === 1) { + $_dictionary = []; + + foreach ($dictionary[0] as $member => $score) { + $_dictionary[] = $score; + $_dictionary[] = $member; + } + + $dictionary = $_dictionary; + } + + return $this->client->zadd($key, ...$dictionary); + } + + /** + * Execute commands in a pipeline. + * + * @param callable $callback + * @return array|\Redis + */ + public function pipeline(callable $callback = null) + { + $pipeline = $this->client()->pipeline(); + + return is_null($callback) + ? $pipeline + : tap($pipeline, $callback)->exec(); + } + + /** + * Execute commands in a transaction. + * + * @param callable $callback + * @return array|\Redis + */ + public function transaction(callable $callback = null) + { + $transaction = $this->client()->multi(); + + return is_null($callback) + ? $transaction + : tap($transaction, $callback)->exec(); + } + + /** + * Evaluate a LUA script serverside, from the SHA1 hash of the script instead of the script itself. + * + * @param string $script + * @param int $numkeys + * @param mixed $arguments + * @return mixed + */ + public function evalsha($script, $numkeys, ...$arguments) + { + return $this->command('evalsha', [ + $this->script('load', $script), $arguments, $numkeys, + ]); + } + + /** + * Proxy a call to the eval function of PhpRedis. + * + * @param array $parameters + * @return mixed + */ + protected function proxyToEval(array $parameters) + { + return $this->command('eval', [ + isset($parameters[0]) ? $parameters[0] : null, + array_slice($parameters, 2), + isset($parameters[1]) ? $parameters[1] : null, + ]); + } + + /** + * Subscribe to a set of given channels for messages. + * + * @param array|string $channels + * @param \Closure $callback + * @return void + */ + public function subscribe($channels, Closure $callback) + { + $this->client->subscribe((array) $channels, function ($redis, $channel, $message) use ($callback) { + $callback($message, $channel); + }); + } + + /** + * Subscribe to a set of given channels with wildcards. + * + * @param array|string $channels + * @param \Closure $callback + * @return void + */ + public function psubscribe($channels, Closure $callback) + { + $this->client->psubscribe((array) $channels, function ($redis, $pattern, $channel, $message) use ($callback) { + $callback($message, $channel); + }); + } + + /** + * Subscribe to a set of given channels for messages. + * + * @param array|string $channels + * @param \Closure $callback + * @param string $method + * @return void + */ + public function createSubscription($channels, Closure $callback, $method = 'subscribe') + { + // + } + + /** + * Execute a raw command. + * + * @param array $parameters + * @return mixed + */ + public function executeRaw(array $parameters) + { + return $this->command('rawCommand', $parameters); + } + + /** + * Disconnects from the Redis instance. + * + * @return void + */ + public function disconnect() + { + $this->client->close(); + } + + /** + * Pass other method calls down to the underlying client. + * + * @param string $method + * @param array $parameters + * @return mixed + */ + public function __call($method, $parameters) + { + $method = strtolower($method); + + if ($method == 'eval') { + return $this->proxyToEval($parameters); + } + + if ($method == 'zrangebyscore' || $method == 'zrevrangebyscore') { + $parameters = array_map(function ($parameter) { + return is_array($parameter) ? array_change_key_case($parameter) : $parameter; + }, $parameters); + } + + return parent::__call($method, $parameters); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Redis/Connections/PredisClusterConnection.php b/vendor/laravel/framework/src/Illuminate/Redis/Connections/PredisClusterConnection.php new file mode 100644 index 0000000..399be1e --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Redis/Connections/PredisClusterConnection.php @@ -0,0 +1,8 @@ +client = $client; + } + + /** + * Subscribe to a set of given channels for messages. + * + * @param array|string $channels + * @param \Closure $callback + * @param string $method + * @return void + */ + public function createSubscription($channels, Closure $callback, $method = 'subscribe') + { + $loop = $this->pubSubLoop(); + + call_user_func_array([$loop, $method], (array) $channels); + + foreach ($loop as $message) { + if ($message->kind === 'message' || $message->kind === 'pmessage') { + call_user_func($callback, $message->payload, $message->channel); + } + } + + unset($loop); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Redis/Connectors/PhpRedisConnector.php b/vendor/laravel/framework/src/Illuminate/Redis/Connectors/PhpRedisConnector.php new file mode 100644 index 0000000..970a770 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Redis/Connectors/PhpRedisConnector.php @@ -0,0 +1,117 @@ +createClient(array_merge( + $config, $options, Arr::pull($config, 'options', []) + ))); + } + + /** + * Create a new clustered Predis connection. + * + * @param array $config + * @param array $clusterOptions + * @param array $options + * @return \Illuminate\Redis\Connections\PhpRedisClusterConnection + */ + public function connectToCluster(array $config, array $clusterOptions, array $options) + { + $options = array_merge($options, $clusterOptions, Arr::pull($config, 'options', [])); + + return new PhpRedisClusterConnection($this->createRedisClusterInstance( + array_map([$this, 'buildClusterConnectionString'], $config), $options + )); + } + + /** + * Build a single cluster seed string from array. + * + * @param array $server + * @return string + */ + protected function buildClusterConnectionString(array $server) + { + return $server['host'].':'.$server['port'].'?'.http_build_query(Arr::only($server, [ + 'database', 'password', 'prefix', 'read_timeout', + ])); + } + + /** + * Create the Redis client instance. + * + * @param array $config + * @return \Redis + */ + protected function createClient(array $config) + { + return tap(new Redis, function ($client) use ($config) { + $this->establishConnection($client, $config); + + if (! empty($config['password'])) { + $client->auth($config['password']); + } + + if (! empty($config['database'])) { + $client->select($config['database']); + } + + if (! empty($config['prefix'])) { + $client->setOption(Redis::OPT_PREFIX, $config['prefix']); + } + + if (! empty($config['read_timeout'])) { + $client->setOption(Redis::OPT_READ_TIMEOUT, $config['read_timeout']); + } + }); + } + + /** + * Establish a connection with the Redis host. + * + * @param \Redis $client + * @param array $config + * @return void + */ + protected function establishConnection($client, array $config) + { + $client->{Arr::get($config, 'persistent', false) === true ? 'pconnect' : 'connect'}( + $config['host'], $config['port'], Arr::get($config, 'timeout', 0) + ); + } + + /** + * Create a new redis cluster instance. + * + * @param array $servers + * @param array $options + * @return \RedisCluster + */ + protected function createRedisClusterInstance(array $servers, array $options) + { + return new RedisCluster( + null, + array_values($servers), + Arr::get($options, 'timeout', 0), + Arr::get($options, 'read_timeout', 0), + isset($options['persistent']) && $options['persistent'] + ); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Redis/Connectors/PredisConnector.php b/vendor/laravel/framework/src/Illuminate/Redis/Connectors/PredisConnector.php new file mode 100644 index 0000000..1288520 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Redis/Connectors/PredisConnector.php @@ -0,0 +1,42 @@ + 10.0], $options, Arr::pull($config, 'options', []) + ))); + } + + /** + * Create a new clustered Predis connection. + * + * @param array $config + * @param array $clusterOptions + * @param array $options + * @return \Illuminate\Redis\Connections\PredisClusterConnection + */ + public function connectToCluster(array $config, array $clusterOptions, array $options) + { + $clusterSpecificOptions = Arr::pull($config, 'options', []); + + return new PredisClusterConnection(new Client(array_values($config), array_merge( + $options, $clusterOptions, $clusterSpecificOptions + ))); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Redis/RedisManager.php b/vendor/laravel/framework/src/Illuminate/Redis/RedisManager.php new file mode 100644 index 0000000..0f8f059 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Redis/RedisManager.php @@ -0,0 +1,127 @@ +driver = $driver; + $this->config = $config; + } + + /** + * Get a Redis connection by name. + * + * @param string|null $name + * @return \Illuminate\Redis\Connections\Connection + */ + public function connection($name = null) + { + $name = $name ?: 'default'; + + if (isset($this->connections[$name])) { + return $this->connections[$name]; + } + + return $this->connections[$name] = $this->resolve($name); + } + + /** + * Resolve the given connection by name. + * + * @param string $name + * @return \Illuminate\Redis\Connections\Connection + * + * @throws \InvalidArgumentException + */ + protected function resolve($name) + { + $options = Arr::get($this->config, 'options', []); + + if (isset($this->config[$name])) { + return $this->connector()->connect($this->config[$name], $options); + } + + if (isset($this->config['clusters'][$name])) { + return $this->resolveCluster($name); + } + + throw new InvalidArgumentException( + "Redis connection [{$name}] not configured." + ); + } + + /** + * Resolve the given cluster connection by name. + * + * @param string $name + * @return \Illuminate\Redis\Connections\Connection + */ + protected function resolveCluster($name) + { + $clusterOptions = Arr::get($this->config, 'clusters.options', []); + + return $this->connector()->connectToCluster( + $this->config['clusters'][$name], $clusterOptions, Arr::get($this->config, 'options', []) + ); + } + + /** + * Get the connector instance for the current driver. + * + * @return \Illuminate\Redis\Connectors\PhpRedisConnector|\Illuminate\Redis\Connectors\PredisConnector + */ + protected function connector() + { + switch ($this->driver) { + case 'predis': + return new Connectors\PredisConnector; + case 'phpredis': + return new Connectors\PhpRedisConnector; + } + } + + /** + * Pass methods onto the default Redis connection. + * + * @param string $method + * @param array $parameters + * @return mixed + */ + public function __call($method, $parameters) + { + return $this->connection()->{$method}(...$parameters); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Redis/RedisServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Redis/RedisServiceProvider.php new file mode 100755 index 0000000..20d78e6 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Redis/RedisServiceProvider.php @@ -0,0 +1,44 @@ +app->singleton('redis', function ($app) { + $config = $app->make('config')->get('database.redis'); + + return new RedisManager(Arr::pull($config, 'client', 'predis'), $config); + }); + + $this->app->bind('redis.connection', function ($app) { + return $app['redis']->connection(); + }); + } + + /** + * Get the services provided by the provider. + * + * @return array + */ + public function provides() + { + return ['redis', 'redis.connection']; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Redis/composer.json b/vendor/laravel/framework/src/Illuminate/Redis/composer.json new file mode 100755 index 0000000..ac41ba3 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Redis/composer.json @@ -0,0 +1,36 @@ +{ + "name": "illuminate/redis", + "description": "The Illuminate Redis package.", + "license": "MIT", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "require": { + "php": ">=5.6.4", + "illuminate/contracts": "5.4.*", + "illuminate/support": "5.4.*", + "predis/predis": "~1.0" + }, + "autoload": { + "psr-4": { + "Illuminate\\Redis\\": "" + } + }, + "extra": { + "branch-alias": { + "dev-master": "5.4-dev" + } + }, + "config": { + "sort-packages": true + }, + "minimum-stability": "dev" +} diff --git a/vendor/laravel/framework/src/Illuminate/Routing/Console/ControllerMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Routing/Console/ControllerMakeCommand.php new file mode 100755 index 0000000..27a80c4 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Routing/Console/ControllerMakeCommand.php @@ -0,0 +1,172 @@ +option('parent')) { + return __DIR__.'/stubs/controller.nested.stub'; + } elseif ($this->option('model')) { + return __DIR__.'/stubs/controller.model.stub'; + } elseif ($this->option('resource')) { + return __DIR__.'/stubs/controller.stub'; + } + + return __DIR__.'/stubs/controller.plain.stub'; + } + + /** + * Get the default namespace for the class. + * + * @param string $rootNamespace + * @return string + */ + protected function getDefaultNamespace($rootNamespace) + { + return $rootNamespace.'\Http\Controllers'; + } + + /** + * Build the class with the given name. + * + * Remove the base controller import if we are already in base namespace. + * + * @param string $name + * @return string + */ + protected function buildClass($name) + { + $controllerNamespace = $this->getNamespace($name); + + $replace = []; + + if ($this->option('parent')) { + $replace = $this->buildParentReplacements(); + } + + if ($this->option('model')) { + $replace = $this->buildModelReplacements($replace); + } + + $replace["use {$controllerNamespace}\Controller;\n"] = ''; + + return str_replace( + array_keys($replace), array_values($replace), parent::buildClass($name) + ); + } + + /** + * Build the replacemnets for a parent controller. + * + * @return array + */ + protected function buildParentReplacements() + { + $parentModelClass = $this->parseModel($this->option('parent')); + + if (! class_exists($parentModelClass)) { + if ($this->confirm("A {$parentModelClass} model does not exist. Do you want to generate it?", true)) { + $this->call('make:model', ['name' => $parentModelClass]); + } + } + + return [ + 'ParentDummyFullModelClass' => $parentModelClass, + 'ParentDummyModelClass' => class_basename($parentModelClass), + 'ParentDummyModelVariable' => lcfirst(class_basename($parentModelClass)), + ]; + } + + /** + * Build the model replacement values. + * + * @param array $replace + * @return array + */ + protected function buildModelReplacements(array $replace) + { + $modelClass = $this->parseModel($this->option('model')); + + if (! class_exists($modelClass)) { + if ($this->confirm("A {$modelClass} model does not exist. Do you want to generate it?", true)) { + $this->call('make:model', ['name' => $modelClass]); + } + } + + return array_merge($replace, [ + 'DummyFullModelClass' => $modelClass, + 'DummyModelClass' => class_basename($modelClass), + 'DummyModelVariable' => lcfirst(class_basename($modelClass)), + ]); + } + + /** + * Get the fully-qualified model class name. + * + * @param string $model + * @return string + */ + protected function parseModel($model) + { + if (preg_match('([^A-Za-z0-9_/\\\\])', $model)) { + throw new InvalidArgumentException('Model name contains invalid characters.'); + } + + $model = trim(str_replace('/', '\\', $model), '\\'); + + if (! Str::startsWith($model, $rootNamespace = $this->laravel->getNamespace())) { + $model = $rootNamespace.$model; + } + + return $model; + } + + /** + * Get the console command options. + * + * @return array + */ + protected function getOptions() + { + return [ + ['model', 'm', InputOption::VALUE_OPTIONAL, 'Generate a resource controller for the given model.'], + + ['resource', 'r', InputOption::VALUE_NONE, 'Generate a resource controller class.'], + + ['parent', 'p', InputOption::VALUE_OPTIONAL, 'Generate a nested resource controller class.'], + ]; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Routing/Console/MiddlewareMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Routing/Console/MiddlewareMakeCommand.php new file mode 100644 index 0000000..e41813d --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Routing/Console/MiddlewareMakeCommand.php @@ -0,0 +1,50 @@ +middleware[] = [ + 'middleware' => $m, + 'options' => &$options, + ]; + } + + return new ControllerMiddlewareOptions($options); + } + + /** + * Get the middleware assigned to the controller. + * + * @return array + */ + public function getMiddleware() + { + return $this->middleware; + } + + /** + * Execute an action on the controller. + * + * @param string $method + * @param array $parameters + * @return \Symfony\Component\HttpFoundation\Response + */ + public function callAction($method, $parameters) + { + return call_user_func_array([$this, $method], $parameters); + } + + /** + * Handle calls to missing methods on the controller. + * + * @param array $parameters + * @return mixed + * + * @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException + */ + public function missingMethod($parameters = []) + { + throw new NotFoundHttpException('Controller method not found.'); + } + + /** + * Handle calls to missing methods on the controller. + * + * @param string $method + * @param array $parameters + * @return mixed + * + * @throws \BadMethodCallException + */ + public function __call($method, $parameters) + { + throw new BadMethodCallException("Method [{$method}] does not exist."); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php b/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php new file mode 100644 index 0000000..979c4b5 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php @@ -0,0 +1,80 @@ +container = $container; + } + + /** + * Dispatch a request to a given controller and method. + * + * @param \Illuminate\Routing\Route $route + * @param mixed $controller + * @param string $method + * @return mixed + */ + public function dispatch(Route $route, $controller, $method) + { + $parameters = $this->resolveClassMethodDependencies( + $route->parametersWithoutNulls(), $controller, $method + ); + + if (method_exists($controller, 'callAction')) { + return $controller->callAction($method, $parameters); + } + + return $controller->{$method}(...array_values($parameters)); + } + + /** + * Get the middleware for the controller instance. + * + * @param \Illuminate\Routing\Controller $controller + * @param string $method + * @return array + */ + public static function getMiddleware($controller, $method) + { + if (! method_exists($controller, 'getMiddleware')) { + return []; + } + + return collect($controller->getMiddleware())->reject(function ($data) use ($method) { + return static::methodExcludedByOptions($method, $data['options']); + })->pluck('middleware')->all(); + } + + /** + * Determine if the given options exclude a particular method. + * + * @param string $method + * @param array $options + * @return bool + */ + protected static function methodExcludedByOptions($method, array $options) + { + return (isset($options['only']) && ! in_array($method, (array) $options['only'])) || + (! empty($options['except']) && in_array($method, (array) $options['except'])); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Routing/ControllerMiddlewareOptions.php b/vendor/laravel/framework/src/Illuminate/Routing/ControllerMiddlewareOptions.php new file mode 100644 index 0000000..13ef189 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Routing/ControllerMiddlewareOptions.php @@ -0,0 +1,50 @@ +options = &$options; + } + + /** + * Set the controller methods the middleware should apply to. + * + * @param array|string|dynamic $methods + * @return $this + */ + public function only($methods) + { + $this->options['only'] = is_array($methods) ? $methods : func_get_args(); + + return $this; + } + + /** + * Set the controller methods the middleware should exclude. + * + * @param array|string|dynamic $methods + * @return $this + */ + public function except($methods) + { + $this->options['except'] = is_array($methods) ? $methods : func_get_args(); + + return $this; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Routing/Events/RouteMatched.php b/vendor/laravel/framework/src/Illuminate/Routing/Events/RouteMatched.php new file mode 100644 index 0000000..c848607 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Routing/Events/RouteMatched.php @@ -0,0 +1,33 @@ +route = $route; + $this->request = $request; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Routing/Exceptions/UrlGenerationException.php b/vendor/laravel/framework/src/Illuminate/Routing/Exceptions/UrlGenerationException.php new file mode 100644 index 0000000..1853b2a --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Routing/Exceptions/UrlGenerationException.php @@ -0,0 +1,19 @@ +getName()}] [URI: {$route->uri()}]."); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Routing/ImplicitRouteBinding.php b/vendor/laravel/framework/src/Illuminate/Routing/ImplicitRouteBinding.php new file mode 100644 index 0000000..f357a24 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Routing/ImplicitRouteBinding.php @@ -0,0 +1,58 @@ +parameters(); + + foreach ($route->signatureParameters(Model::class) as $parameter) { + if (! $parameterName = static::getParameterName($parameter->name, $parameters)) { + continue; + } + + $parameterValue = $parameters[$parameterName]; + + if ($parameterValue instanceof Model) { + continue; + } + + $model = $container->make($parameter->getClass()->name); + + $route->setParameter($parameterName, $model->where( + $model->getRouteKeyName(), $parameterValue + )->firstOrFail()); + } + } + + /** + * Return the parameter name if it exists in the given parameters. + * + * @param string $name + * @param array $parameters + * @return string|null + */ + protected static function getParameterName($name, $parameters) + { + if (array_key_exists($name, $parameters)) { + return $name; + } + + $snakedName = snake_case($name); + + if (array_key_exists($snakedName, $parameters)) { + return $snakedName; + } + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Routing/Matching/HostValidator.php b/vendor/laravel/framework/src/Illuminate/Routing/Matching/HostValidator.php new file mode 100644 index 0000000..76f9d87 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Routing/Matching/HostValidator.php @@ -0,0 +1,25 @@ +getCompiled()->getHostRegex())) { + return true; + } + + return preg_match($route->getCompiled()->getHostRegex(), $request->getHost()); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Routing/Matching/MethodValidator.php b/vendor/laravel/framework/src/Illuminate/Routing/Matching/MethodValidator.php new file mode 100644 index 0000000..f9cf155 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Routing/Matching/MethodValidator.php @@ -0,0 +1,21 @@ +getMethod(), $route->methods()); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Routing/Matching/SchemeValidator.php b/vendor/laravel/framework/src/Illuminate/Routing/Matching/SchemeValidator.php new file mode 100644 index 0000000..fd5d5af --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Routing/Matching/SchemeValidator.php @@ -0,0 +1,27 @@ +httpOnly()) { + return ! $request->secure(); + } elseif ($route->secure()) { + return $request->secure(); + } + + return true; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Routing/Matching/UriValidator.php b/vendor/laravel/framework/src/Illuminate/Routing/Matching/UriValidator.php new file mode 100644 index 0000000..6a54d12 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Routing/Matching/UriValidator.php @@ -0,0 +1,23 @@ +path() == '/' ? '/' : '/'.$request->path(); + + return preg_match($route->getCompiled()->getRegex(), rawurldecode($path)); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Routing/Matching/ValidatorInterface.php b/vendor/laravel/framework/src/Illuminate/Routing/Matching/ValidatorInterface.php new file mode 100644 index 0000000..0f178f1 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Routing/Matching/ValidatorInterface.php @@ -0,0 +1,18 @@ +router = $router; + } + + /** + * Handle an incoming request. + * + * @param \Illuminate\Http\Request $request + * @param \Closure $next + * @return mixed + */ + public function handle($request, Closure $next) + { + $this->router->substituteBindings($route = $request->route()); + + $this->router->substituteImplicitBindings($route); + + return $next($request); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php b/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php new file mode 100644 index 0000000..5d0af90 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php @@ -0,0 +1,130 @@ +limiter = $limiter; + } + + /** + * Handle an incoming request. + * + * @param \Illuminate\Http\Request $request + * @param \Closure $next + * @param int $maxAttempts + * @param float|int $decayMinutes + * @return mixed + */ + public function handle($request, Closure $next, $maxAttempts = 60, $decayMinutes = 1) + { + $key = $this->resolveRequestSignature($request); + + if ($this->limiter->tooManyAttempts($key, $maxAttempts, $decayMinutes)) { + return $this->buildResponse($key, $maxAttempts); + } + + $this->limiter->hit($key, $decayMinutes); + + $response = $next($request); + + return $this->addHeaders( + $response, $maxAttempts, + $this->calculateRemainingAttempts($key, $maxAttempts) + ); + } + + /** + * Resolve request signature. + * + * @param \Illuminate\Http\Request $request + * @return string + */ + protected function resolveRequestSignature($request) + { + return $request->fingerprint(); + } + + /** + * Create a 'too many attempts' response. + * + * @param string $key + * @param int $maxAttempts + * @return \Symfony\Component\HttpFoundation\Response + */ + protected function buildResponse($key, $maxAttempts) + { + $response = new Response('Too Many Attempts.', 429); + + $retryAfter = $this->limiter->availableIn($key); + + return $this->addHeaders( + $response, $maxAttempts, + $this->calculateRemainingAttempts($key, $maxAttempts, $retryAfter), + $retryAfter + ); + } + + /** + * Add the limit header information to the given response. + * + * @param \Symfony\Component\HttpFoundation\Response $response + * @param int $maxAttempts + * @param int $remainingAttempts + * @param int|null $retryAfter + * @return \Symfony\Component\HttpFoundation\Response + */ + protected function addHeaders(Response $response, $maxAttempts, $remainingAttempts, $retryAfter = null) + { + $headers = [ + 'X-RateLimit-Limit' => $maxAttempts, + 'X-RateLimit-Remaining' => $remainingAttempts, + ]; + + if (! is_null($retryAfter)) { + $headers['Retry-After'] = $retryAfter; + $headers['X-RateLimit-Reset'] = Carbon::now()->getTimestamp() + $retryAfter; + } + + $response->headers->add($headers); + + return $response; + } + + /** + * Calculate the number of remaining attempts. + * + * @param string $key + * @param int $maxAttempts + * @param int|null $retryAfter + * @return int + */ + protected function calculateRemainingAttempts($key, $maxAttempts, $retryAfter = null) + { + if (is_null($retryAfter)) { + return $this->limiter->retriesLeft($key, $maxAttempts); + } + + return 0; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Routing/MiddlewareNameResolver.php b/vendor/laravel/framework/src/Illuminate/Routing/MiddlewareNameResolver.php new file mode 100644 index 0000000..154fde0 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Routing/MiddlewareNameResolver.php @@ -0,0 +1,86 @@ +handleException($passable, $e); + } catch (Throwable $e) { + return $this->handleException($passable, new FatalThrowableError($e)); + } + }; + } + + /** + * Get a Closure that represents a slice of the application onion. + * + * @return \Closure + */ + protected function carry() + { + return function ($stack, $pipe) { + return function ($passable) use ($stack, $pipe) { + try { + $slice = parent::carry(); + + $callable = $slice($stack, $pipe); + + return $callable($passable); + } catch (Exception $e) { + return $this->handleException($passable, $e); + } catch (Throwable $e) { + return $this->handleException($passable, new FatalThrowableError($e)); + } + }; + }; + } + + /** + * Handle the given exception. + * + * @param mixed $passable + * @param \Exception $e + * @return mixed + * + * @throws \Exception + */ + protected function handleException($passable, Exception $e) + { + if (! $this->container->bound(ExceptionHandler::class) || ! $passable instanceof Request) { + throw $e; + } + + $handler = $this->container->make(ExceptionHandler::class); + + $handler->report($e); + + $response = $handler->render($passable, $e); + + if (method_exists($response, 'withException')) { + $response->withException($e); + } + + return $response; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Routing/Redirector.php b/vendor/laravel/framework/src/Illuminate/Routing/Redirector.php new file mode 100755 index 0000000..59d6a98 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Routing/Redirector.php @@ -0,0 +1,210 @@ +generator = $generator; + } + + /** + * Create a new redirect response to the "home" route. + * + * @param int $status + * @return \Illuminate\Http\RedirectResponse + */ + public function home($status = 302) + { + return $this->to($this->generator->route('home'), $status); + } + + /** + * Create a new redirect response to the previous location. + * + * @param int $status + * @param array $headers + * @param mixed $fallback + * @return \Illuminate\Http\RedirectResponse + */ + public function back($status = 302, $headers = [], $fallback = false) + { + return $this->createRedirect($this->generator->previous($fallback), $status, $headers); + } + + /** + * Create a new redirect response to the current URI. + * + * @param int $status + * @param array $headers + * @return \Illuminate\Http\RedirectResponse + */ + public function refresh($status = 302, $headers = []) + { + return $this->to($this->generator->getRequest()->path(), $status, $headers); + } + + /** + * Create a new redirect response, while putting the current URL in the session. + * + * @param string $path + * @param int $status + * @param array $headers + * @param bool $secure + * @return \Illuminate\Http\RedirectResponse + */ + public function guest($path, $status = 302, $headers = [], $secure = null) + { + $this->session->put('url.intended', $this->generator->full()); + + return $this->to($path, $status, $headers, $secure); + } + + /** + * Create a new redirect response to the previously intended location. + * + * @param string $default + * @param int $status + * @param array $headers + * @param bool $secure + * @return \Illuminate\Http\RedirectResponse + */ + public function intended($default = '/', $status = 302, $headers = [], $secure = null) + { + $path = $this->session->pull('url.intended', $default); + + return $this->to($path, $status, $headers, $secure); + } + + /** + * Create a new redirect response to the given path. + * + * @param string $path + * @param int $status + * @param array $headers + * @param bool $secure + * @return \Illuminate\Http\RedirectResponse + */ + public function to($path, $status = 302, $headers = [], $secure = null) + { + return $this->createRedirect($this->generator->to($path, [], $secure), $status, $headers); + } + + /** + * Create a new redirect response to an external URL (no validation). + * + * @param string $path + * @param int $status + * @param array $headers + * @return \Illuminate\Http\RedirectResponse + */ + public function away($path, $status = 302, $headers = []) + { + return $this->createRedirect($path, $status, $headers); + } + + /** + * Create a new redirect response to the given HTTPS path. + * + * @param string $path + * @param int $status + * @param array $headers + * @return \Illuminate\Http\RedirectResponse + */ + public function secure($path, $status = 302, $headers = []) + { + return $this->to($path, $status, $headers, true); + } + + /** + * Create a new redirect response to a named route. + * + * @param string $route + * @param array $parameters + * @param int $status + * @param array $headers + * @return \Illuminate\Http\RedirectResponse + */ + public function route($route, $parameters = [], $status = 302, $headers = []) + { + return $this->to($this->generator->route($route, $parameters), $status, $headers); + } + + /** + * Create a new redirect response to a controller action. + * + * @param string $action + * @param array $parameters + * @param int $status + * @param array $headers + * @return \Illuminate\Http\RedirectResponse + */ + public function action($action, $parameters = [], $status = 302, $headers = []) + { + return $this->to($this->generator->action($action, $parameters), $status, $headers); + } + + /** + * Create a new redirect response. + * + * @param string $path + * @param int $status + * @param array $headers + * @return \Illuminate\Http\RedirectResponse + */ + protected function createRedirect($path, $status, $headers) + { + return tap(new RedirectResponse($path, $status, $headers), function ($redirect) { + if (isset($this->session)) { + $redirect->setSession($this->session); + } + + $redirect->setRequest($this->generator->getRequest()); + }); + } + + /** + * Get the URL generator instance. + * + * @return \Illuminate\Routing\UrlGenerator + */ + public function getUrlGenerator() + { + return $this->generator; + } + + /** + * Set the active session store. + * + * @param \Illuminate\Session\Store $session + * @return void + */ + public function setSession(SessionStore $session) + { + $this->session = $session; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Routing/ResourceRegistrar.php b/vendor/laravel/framework/src/Illuminate/Routing/ResourceRegistrar.php new file mode 100644 index 0000000..5209e9e --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Routing/ResourceRegistrar.php @@ -0,0 +1,440 @@ + 'create', + 'edit' => 'edit', + ]; + + /** + * Create a new resource registrar instance. + * + * @param \Illuminate\Routing\Router $router + * @return void + */ + public function __construct(Router $router) + { + $this->router = $router; + } + + /** + * Route a resource to a controller. + * + * @param string $name + * @param string $controller + * @param array $options + * @return void + */ + public function register($name, $controller, array $options = []) + { + if (isset($options['parameters']) && ! isset($this->parameters)) { + $this->parameters = $options['parameters']; + } + + // If the resource name contains a slash, we will assume the developer wishes to + // register these resource routes with a prefix so we will set that up out of + // the box so they don't have to mess with it. Otherwise, we will continue. + if (Str::contains($name, '/')) { + $this->prefixedResource($name, $controller, $options); + + return; + } + + // We need to extract the base resource from the resource name. Nested resources + // are supported in the framework, but we need to know what name to use for a + // place-holder on the route parameters, which should be the base resources. + $base = $this->getResourceWildcard(last(explode('.', $name))); + + $defaults = $this->resourceDefaults; + + foreach ($this->getResourceMethods($defaults, $options) as $m) { + $this->{'addResource'.ucfirst($m)}($name, $base, $controller, $options); + } + } + + /** + * Build a set of prefixed resource routes. + * + * @param string $name + * @param string $controller + * @param array $options + * @return void + */ + protected function prefixedResource($name, $controller, array $options) + { + list($name, $prefix) = $this->getResourcePrefix($name); + + // We need to extract the base resource from the resource name. Nested resources + // are supported in the framework, but we need to know what name to use for a + // place-holder on the route parameters, which should be the base resources. + $callback = function ($me) use ($name, $controller, $options) { + $me->resource($name, $controller, $options); + }; + + return $this->router->group(compact('prefix'), $callback); + } + + /** + * Extract the resource and prefix from a resource name. + * + * @param string $name + * @return array + */ + protected function getResourcePrefix($name) + { + $segments = explode('/', $name); + + // To get the prefix, we will take all of the name segments and implode them on + // a slash. This will generate a proper URI prefix for us. Then we take this + // last segment, which will be considered the final resources name we use. + $prefix = implode('/', array_slice($segments, 0, -1)); + + return [end($segments), $prefix]; + } + + /** + * Get the applicable resource methods. + * + * @param array $defaults + * @param array $options + * @return array + */ + protected function getResourceMethods($defaults, $options) + { + if (isset($options['only'])) { + return array_intersect($defaults, (array) $options['only']); + } elseif (isset($options['except'])) { + return array_diff($defaults, (array) $options['except']); + } + + return $defaults; + } + + /** + * Add the index method for a resourceful route. + * + * @param string $name + * @param string $base + * @param string $controller + * @param array $options + * @return \Illuminate\Routing\Route + */ + protected function addResourceIndex($name, $base, $controller, $options) + { + $uri = $this->getResourceUri($name); + + $action = $this->getResourceAction($name, $controller, 'index', $options); + + return $this->router->get($uri, $action); + } + + /** + * Add the create method for a resourceful route. + * + * @param string $name + * @param string $base + * @param string $controller + * @param array $options + * @return \Illuminate\Routing\Route + */ + protected function addResourceCreate($name, $base, $controller, $options) + { + $uri = $this->getResourceUri($name).'/'.static::$verbs['create']; + + $action = $this->getResourceAction($name, $controller, 'create', $options); + + return $this->router->get($uri, $action); + } + + /** + * Add the store method for a resourceful route. + * + * @param string $name + * @param string $base + * @param string $controller + * @param array $options + * @return \Illuminate\Routing\Route + */ + protected function addResourceStore($name, $base, $controller, $options) + { + $uri = $this->getResourceUri($name); + + $action = $this->getResourceAction($name, $controller, 'store', $options); + + return $this->router->post($uri, $action); + } + + /** + * Add the show method for a resourceful route. + * + * @param string $name + * @param string $base + * @param string $controller + * @param array $options + * @return \Illuminate\Routing\Route + */ + protected function addResourceShow($name, $base, $controller, $options) + { + $uri = $this->getResourceUri($name).'/{'.$base.'}'; + + $action = $this->getResourceAction($name, $controller, 'show', $options); + + return $this->router->get($uri, $action); + } + + /** + * Add the edit method for a resourceful route. + * + * @param string $name + * @param string $base + * @param string $controller + * @param array $options + * @return \Illuminate\Routing\Route + */ + protected function addResourceEdit($name, $base, $controller, $options) + { + $uri = $this->getResourceUri($name).'/{'.$base.'}/'.static::$verbs['edit']; + + $action = $this->getResourceAction($name, $controller, 'edit', $options); + + return $this->router->get($uri, $action); + } + + /** + * Add the update method for a resourceful route. + * + * @param string $name + * @param string $base + * @param string $controller + * @param array $options + * @return \Illuminate\Routing\Route + */ + protected function addResourceUpdate($name, $base, $controller, $options) + { + $uri = $this->getResourceUri($name).'/{'.$base.'}'; + + $action = $this->getResourceAction($name, $controller, 'update', $options); + + return $this->router->match(['PUT', 'PATCH'], $uri, $action); + } + + /** + * Add the destroy method for a resourceful route. + * + * @param string $name + * @param string $base + * @param string $controller + * @param array $options + * @return \Illuminate\Routing\Route + */ + protected function addResourceDestroy($name, $base, $controller, $options) + { + $uri = $this->getResourceUri($name).'/{'.$base.'}'; + + $action = $this->getResourceAction($name, $controller, 'destroy', $options); + + return $this->router->delete($uri, $action); + } + + /** + * Get the base resource URI for a given resource. + * + * @param string $resource + * @return string + */ + public function getResourceUri($resource) + { + if (! Str::contains($resource, '.')) { + return $resource; + } + + // Once we have built the base URI, we'll remove the parameter holder for this + // base resource name so that the individual route adders can suffix these + // paths however they need to, as some do not have any parameters at all. + $segments = explode('.', $resource); + + $uri = $this->getNestedResourceUri($segments); + + return str_replace('/{'.$this->getResourceWildcard(end($segments)).'}', '', $uri); + } + + /** + * Get the URI for a nested resource segment array. + * + * @param array $segments + * @return string + */ + protected function getNestedResourceUri(array $segments) + { + // We will spin through the segments and create a place-holder for each of the + // resource segments, as well as the resource itself. Then we should get an + // entire string for the resource URI that contains all nested resources. + return implode('/', array_map(function ($s) { + return $s.'/{'.$this->getResourceWildcard($s).'}'; + }, $segments)); + } + + /** + * Format a resource parameter for usage. + * + * @param string $value + * @return string + */ + public function getResourceWildcard($value) + { + if (isset($this->parameters[$value])) { + $value = $this->parameters[$value]; + } elseif (isset(static::$parameterMap[$value])) { + $value = static::$parameterMap[$value]; + } elseif ($this->parameters === 'singular' || static::$singularParameters) { + $value = Str::singular($value); + } + + return str_replace('-', '_', $value); + } + + /** + * Get the action array for a resource route. + * + * @param string $resource + * @param string $controller + * @param string $method + * @param array $options + * @return array + */ + protected function getResourceAction($resource, $controller, $method, $options) + { + $name = $this->getResourceRouteName($resource, $method, $options); + + $action = ['as' => $name, 'uses' => $controller.'@'.$method]; + + if (isset($options['middleware'])) { + $action['middleware'] = $options['middleware']; + } + + return $action; + } + + /** + * Get the name for a given resource. + * + * @param string $resource + * @param string $method + * @param array $options + * @return string + */ + protected function getResourceRouteName($resource, $method, $options) + { + $name = $resource; + + // If the names array has been provided to us we will check for an entry in the + // array first. We will also check for the specific method within this array + // so the names may be specified on a more "granular" level using methods. + if (isset($options['names'])) { + if (is_string($options['names'])) { + $name = $options['names']; + } elseif (isset($options['names'][$method])) { + return $options['names'][$method]; + } + } + + // If a global prefix has been assigned to all names for this resource, we will + // grab that so we can prepend it onto the name when we create this name for + // the resource action. Otherwise we'll just use an empty string for here. + $prefix = isset($options['as']) ? $options['as'].'.' : ''; + + return trim(sprintf('%s%s.%s', $prefix, $name, $method), '.'); + } + + /** + * Set or unset the unmapped global parameters to singular. + * + * @param bool $singular + * @return void + */ + public static function singularParameters($singular = true) + { + static::$singularParameters = (bool) $singular; + } + + /** + * Get the global parameter map. + * + * @return array + */ + public static function getParameters() + { + return static::$parameterMap; + } + + /** + * Set the global parameter mapping. + * + * @param array $parameters + * @return void + */ + public static function setParameters(array $parameters = []) + { + static::$parameterMap = $parameters; + } + + /** + * Get or set the action verbs used in the resource URIs. + * + * @param array $verbs + * @return array + */ + public static function verbs(array $verbs = []) + { + if (empty($verbs)) { + return static::$verbs; + } else { + static::$verbs = array_merge(static::$verbs, $verbs); + } + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Routing/ResponseFactory.php b/vendor/laravel/framework/src/Illuminate/Routing/ResponseFactory.php new file mode 100644 index 0000000..0fe0151 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Routing/ResponseFactory.php @@ -0,0 +1,215 @@ +view = $view; + $this->redirector = $redirector; + } + + /** + * Return a new response from the application. + * + * @param string $content + * @param int $status + * @param array $headers + * @return \Illuminate\Http\Response + */ + public function make($content = '', $status = 200, array $headers = []) + { + return new Response($content, $status, $headers); + } + + /** + * Return a new view response from the application. + * + * @param string $view + * @param array $data + * @param int $status + * @param array $headers + * @return \Illuminate\Http\Response + */ + public function view($view, $data = [], $status = 200, array $headers = []) + { + return $this->make($this->view->make($view, $data), $status, $headers); + } + + /** + * Return a new JSON response from the application. + * + * @param mixed $data + * @param int $status + * @param array $headers + * @param int $options + * @return \Illuminate\Http\JsonResponse + */ + public function json($data = [], $status = 200, array $headers = [], $options = 0) + { + return new JsonResponse($data, $status, $headers, $options); + } + + /** + * Return a new JSONP response from the application. + * + * @param string $callback + * @param mixed $data + * @param int $status + * @param array $headers + * @param int $options + * @return \Illuminate\Http\JsonResponse + */ + public function jsonp($callback, $data = [], $status = 200, array $headers = [], $options = 0) + { + return $this->json($data, $status, $headers, $options)->setCallback($callback); + } + + /** + * Return a new streamed response from the application. + * + * @param \Closure $callback + * @param int $status + * @param array $headers + * @return \Symfony\Component\HttpFoundation\StreamedResponse + */ + public function stream($callback, $status = 200, array $headers = []) + { + return new StreamedResponse($callback, $status, $headers); + } + + /** + * Create a new file download response. + * + * @param \SplFileInfo|string $file + * @param string $name + * @param array $headers + * @param string|null $disposition + * @return \Symfony\Component\HttpFoundation\BinaryFileResponse + */ + public function download($file, $name = null, array $headers = [], $disposition = 'attachment') + { + $response = new BinaryFileResponse($file, 200, $headers, true, $disposition); + + if (! is_null($name)) { + return $response->setContentDisposition($disposition, $name, str_replace('%', '', Str::ascii($name))); + } + + return $response; + } + + /** + * Return the raw contents of a binary file. + * + * @param \SplFileInfo|string $file + * @param array $headers + * @return \Symfony\Component\HttpFoundation\BinaryFileResponse + */ + public function file($file, array $headers = []) + { + return new BinaryFileResponse($file, 200, $headers); + } + + /** + * Create a new redirect response to the given path. + * + * @param string $path + * @param int $status + * @param array $headers + * @param bool|null $secure + * @return \Illuminate\Http\RedirectResponse + */ + public function redirectTo($path, $status = 302, $headers = [], $secure = null) + { + return $this->redirector->to($path, $status, $headers, $secure); + } + + /** + * Create a new redirect response to a named route. + * + * @param string $route + * @param array $parameters + * @param int $status + * @param array $headers + * @return \Illuminate\Http\RedirectResponse + */ + public function redirectToRoute($route, $parameters = [], $status = 302, $headers = []) + { + return $this->redirector->route($route, $parameters, $status, $headers); + } + + /** + * Create a new redirect response to a controller action. + * + * @param string $action + * @param array $parameters + * @param int $status + * @param array $headers + * @return \Illuminate\Http\RedirectResponse + */ + public function redirectToAction($action, $parameters = [], $status = 302, $headers = []) + { + return $this->redirector->action($action, $parameters, $status, $headers); + } + + /** + * Create a new redirect response, while putting the current URL in the session. + * + * @param string $path + * @param int $status + * @param array $headers + * @param bool|null $secure + * @return \Illuminate\Http\RedirectResponse + */ + public function redirectGuest($path, $status = 302, $headers = [], $secure = null) + { + return $this->redirector->guest($path, $status, $headers, $secure); + } + + /** + * Create a new redirect response to the previously intended location. + * + * @param string $default + * @param int $status + * @param array $headers + * @param bool|null $secure + * @return \Illuminate\Http\RedirectResponse + */ + public function redirectToIntended($default = '/', $status = 302, $headers = [], $secure = null) + { + return $this->redirector->intended($default, $status, $headers, $secure); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Routing/Route.php b/vendor/laravel/framework/src/Illuminate/Routing/Route.php new file mode 100755 index 0000000..de94b09 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Routing/Route.php @@ -0,0 +1,824 @@ +uri = $uri; + $this->methods = (array) $methods; + $this->action = $this->parseAction($action); + + if (in_array('GET', $this->methods) && ! in_array('HEAD', $this->methods)) { + $this->methods[] = 'HEAD'; + } + + if (isset($this->action['prefix'])) { + $this->prefix($this->action['prefix']); + } + } + + /** + * Parse the route action into a standard array. + * + * @param callable|array|null $action + * @return array + * + * @throws \UnexpectedValueException + */ + protected function parseAction($action) + { + return RouteAction::parse($this->uri, $action); + } + + /** + * Run the route action and return the response. + * + * @return mixed + */ + public function run() + { + $this->container = $this->container ?: new Container; + + try { + if ($this->isControllerAction()) { + return $this->runController(); + } + + return $this->runCallable(); + } catch (HttpResponseException $e) { + return $e->getResponse(); + } + } + + /** + * Checks whether the route's action is a controller. + * + * @return bool + */ + protected function isControllerAction() + { + return is_string($this->action['uses']); + } + + /** + * Run the route action and return the response. + * + * @return mixed + */ + protected function runCallable() + { + $callable = $this->action['uses']; + + return $callable(...array_values($this->resolveMethodDependencies( + $this->parametersWithoutNulls(), new ReflectionFunction($this->action['uses']) + ))); + } + + /** + * Run the route action and return the response. + * + * @return mixed + * + * @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException + */ + protected function runController() + { + return (new ControllerDispatcher($this->container))->dispatch( + $this, $this->getController(), $this->getControllerMethod() + ); + } + + /** + * Get the controller instance for the route. + * + * @return mixed + */ + public function getController() + { + $class = $this->parseControllerCallback()[0]; + + if (! $this->controller) { + $this->controller = $this->container->make($class); + } + + return $this->controller; + } + + /** + * Get the controller method used for the route. + * + * @return string + */ + protected function getControllerMethod() + { + return $this->parseControllerCallback()[1]; + } + + /** + * Parse the controller. + * + * @return array + */ + protected function parseControllerCallback() + { + return Str::parseCallback($this->action['uses']); + } + + /** + * Determine if the route matches given request. + * + * @param \Illuminate\Http\Request $request + * @param bool $includingMethod + * @return bool + */ + public function matches(Request $request, $includingMethod = true) + { + $this->compileRoute(); + + foreach ($this->getValidators() as $validator) { + if (! $includingMethod && $validator instanceof MethodValidator) { + continue; + } + + if (! $validator->matches($this, $request)) { + return false; + } + } + + return true; + } + + /** + * Compile the route into a Symfony CompiledRoute instance. + * + * @return void + */ + protected function compileRoute() + { + if (! $this->compiled) { + $this->compiled = (new RouteCompiler($this))->compile(); + } + + return $this->compiled; + } + + /** + * Bind the route to a given request for execution. + * + * @param \Illuminate\Http\Request $request + * @return $this + */ + public function bind(Request $request) + { + $this->compileRoute(); + + $this->parameters = (new RouteParameterBinder($this)) + ->parameters($request); + + return $this; + } + + /** + * Determine if the route has parameters. + * + * @return bool + */ + public function hasParameters() + { + return isset($this->parameters); + } + + /** + * Determine a given parameter exists from the route. + * + * @param string $name + * @return bool + */ + public function hasParameter($name) + { + if ($this->hasParameters()) { + return array_key_exists($name, $this->parameters()); + } + + return false; + } + + /** + * Get a given parameter from the route. + * + * @param string $name + * @param mixed $default + * @return string|object + */ + public function parameter($name, $default = null) + { + return Arr::get($this->parameters(), $name, $default); + } + + /** + * Set a parameter to the given value. + * + * @param string $name + * @param mixed $value + * @return void + */ + public function setParameter($name, $value) + { + $this->parameters(); + + $this->parameters[$name] = $value; + } + + /** + * Unset a parameter on the route if it is set. + * + * @param string $name + * @return void + */ + public function forgetParameter($name) + { + $this->parameters(); + + unset($this->parameters[$name]); + } + + /** + * Get the key / value list of parameters for the route. + * + * @return array + * + * @throws \LogicException + */ + public function parameters() + { + if (isset($this->parameters)) { + return $this->parameters; + } + + throw new LogicException('Route is not bound.'); + } + + /** + * Get the key / value list of parameters without null values. + * + * @return array + */ + public function parametersWithoutNulls() + { + return array_filter($this->parameters(), function ($p) { + return ! is_null($p); + }); + } + + /** + * Get all of the parameter names for the route. + * + * @return array + */ + public function parameterNames() + { + if (isset($this->parameterNames)) { + return $this->parameterNames; + } + + return $this->parameterNames = $this->compileParameterNames(); + } + + /** + * Get the parameter names for the route. + * + * @return array + */ + protected function compileParameterNames() + { + preg_match_all('/\{(.*?)\}/', $this->domain().$this->uri, $matches); + + return array_map(function ($m) { + return trim($m, '?'); + }, $matches[1]); + } + + /** + * Get the parameters that are listed in the route / controller signature. + * + * @param string|null $subClass + * @return array + */ + public function signatureParameters($subClass = null) + { + return RouteSignatureParameters::fromAction($this->action, $subClass); + } + + /** + * Set a default value for the route. + * + * @param string $key + * @param mixed $value + * @return $this + */ + public function defaults($key, $value) + { + $this->defaults[$key] = $value; + + return $this; + } + + /** + * Set a regular expression requirement on the route. + * + * @param array|string $name + * @param string $expression + * @return $this + */ + public function where($name, $expression = null) + { + foreach ($this->parseWhere($name, $expression) as $name => $expression) { + $this->wheres[$name] = $expression; + } + + return $this; + } + + /** + * Parse arguments to the where method into an array. + * + * @param array|string $name + * @param string $expression + * @return array + */ + protected function parseWhere($name, $expression) + { + return is_array($name) ? $name : [$name => $expression]; + } + + /** + * Set a list of regular expression requirements on the route. + * + * @param array $wheres + * @return $this + */ + protected function whereArray(array $wheres) + { + foreach ($wheres as $name => $expression) { + $this->where($name, $expression); + } + + return $this; + } + + /** + * Get the HTTP verbs the route responds to. + * + * @return array + */ + public function methods() + { + return $this->methods; + } + + /** + * Determine if the route only responds to HTTP requests. + * + * @return bool + */ + public function httpOnly() + { + return in_array('http', $this->action, true); + } + + /** + * Determine if the route only responds to HTTPS requests. + * + * @return bool + */ + public function httpsOnly() + { + return $this->secure(); + } + + /** + * Determine if the route only responds to HTTPS requests. + * + * @return bool + */ + public function secure() + { + return in_array('https', $this->action, true); + } + + /** + * Get the domain defined for the route. + * + * @return string|null + */ + public function domain() + { + return isset($this->action['domain']) + ? str_replace(['http://', 'https://'], '', $this->action['domain']) : null; + } + + /** + * Get the prefix of the route instance. + * + * @return string + */ + public function getPrefix() + { + return isset($this->action['prefix']) ? $this->action['prefix'] : null; + } + + /** + * Add a prefix to the route URI. + * + * @param string $prefix + * @return $this + */ + public function prefix($prefix) + { + $uri = rtrim($prefix, '/').'/'.ltrim($this->uri, '/'); + + $this->uri = trim($uri, '/'); + + return $this; + } + + /** + * Get the URI associated with the route. + * + * @return string + */ + public function uri() + { + return $this->uri; + } + + /** + * Set the URI that the route responds to. + * + * @param string $uri + * @return $this + */ + public function setUri($uri) + { + $this->uri = $uri; + + return $this; + } + + /** + * Get the name of the route instance. + * + * @return string + */ + public function getName() + { + return isset($this->action['as']) ? $this->action['as'] : null; + } + + /** + * Add or change the route name. + * + * @param string $name + * @return $this + */ + public function name($name) + { + $this->action['as'] = isset($this->action['as']) ? $this->action['as'].$name : $name; + + return $this; + } + + /** + * Set the handler for the route. + * + * @param \Closure|string $action + * @return $this + */ + public function uses($action) + { + $action = is_string($action) ? $this->addGroupNamespaceToStringUses($action) : $action; + + return $this->setAction(array_merge($this->action, $this->parseAction([ + 'uses' => $action, + 'controller' => $action, + ]))); + } + + /** + * Parse a string based action for the "uses" fluent method. + * + * @param string $action + * @return string + */ + protected function addGroupNamespaceToStringUses($action) + { + $groupStack = last($this->router->getGroupStack()); + + if (isset($groupStack['namespace']) && strpos($action, '\\') !== 0) { + return $groupStack['namespace'].'\\'.$action; + } + + return $action; + } + + /** + * Get the action name for the route. + * + * @return string + */ + public function getActionName() + { + return isset($this->action['controller']) ? $this->action['controller'] : 'Closure'; + } + + /** + * Get the method name of the route action. + * + * @return string + */ + public function getActionMethod() + { + return array_last(explode('@', $this->getActionName())); + } + + /** + * Get the action array for the route. + * + * @return array + */ + public function getAction() + { + return $this->action; + } + + /** + * Set the action array for the route. + * + * @param array $action + * @return $this + */ + public function setAction(array $action) + { + $this->action = $action; + + return $this; + } + + /** + * Get all middleware, including the ones from the controller. + * + * @return array + */ + public function gatherMiddleware() + { + if (! is_null($this->computedMiddleware)) { + return $this->computedMiddleware; + } + + $this->computedMiddleware = []; + + return $this->computedMiddleware = array_unique(array_merge( + $this->middleware(), $this->controllerMiddleware() + ), SORT_REGULAR); + } + + /** + * Get or set the middlewares attached to the route. + * + * @param array|string|null $middleware + * @return $this|array + */ + public function middleware($middleware = null) + { + if (is_null($middleware)) { + return (array) Arr::get($this->action, 'middleware', []); + } + + if (is_string($middleware)) { + $middleware = func_get_args(); + } + + $this->action['middleware'] = array_merge( + (array) Arr::get($this->action, 'middleware', []), $middleware + ); + + return $this; + } + + /** + * Get the middleware for the route's controller. + * + * @return array + */ + public function controllerMiddleware() + { + if (! $this->isControllerAction()) { + return []; + } + + return ControllerDispatcher::getMiddleware( + $this->getController(), $this->getControllerMethod() + ); + } + + /** + * Get the route validators for the instance. + * + * @return array + */ + public static function getValidators() + { + if (isset(static::$validators)) { + return static::$validators; + } + + // To match the route, we will use a chain of responsibility pattern with the + // validator implementations. We will spin through each one making sure it + // passes and then we will know if the route as a whole matches request. + return static::$validators = [ + new UriValidator, new MethodValidator, + new SchemeValidator, new HostValidator, + ]; + } + + /** + * Get the compiled version of the route. + * + * @return \Symfony\Component\Routing\CompiledRoute + */ + public function getCompiled() + { + return $this->compiled; + } + + /** + * Set the router instance on the route. + * + * @param \Illuminate\Routing\Router $router + * @return $this + */ + public function setRouter(Router $router) + { + $this->router = $router; + + return $this; + } + + /** + * Set the container instance on the route. + * + * @param \Illuminate\Container\Container $container + * @return $this + */ + public function setContainer(Container $container) + { + $this->container = $container; + + return $this; + } + + /** + * Prepare the route instance for serialization. + * + * @return void + * + * @throws \LogicException + */ + public function prepareForSerialization() + { + if ($this->action['uses'] instanceof Closure) { + throw new LogicException("Unable to prepare route [{$this->uri}] for serialization. Uses Closure."); + } + + $this->compileRoute(); + + unset($this->router, $this->container); + } + + /** + * Dynamically access route parameters. + * + * @param string $key + * @return mixed + */ + public function __get($key) + { + return $this->parameter($key); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Routing/RouteAction.php b/vendor/laravel/framework/src/Illuminate/Routing/RouteAction.php new file mode 100644 index 0000000..678806b --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Routing/RouteAction.php @@ -0,0 +1,89 @@ + $action]; + } + + // If no "uses" property has been set, we will dig through the array to find a + // Closure instance within this list. We will set the first Closure we come + // across into the "uses" property that will get fired off by this route. + elseif (! isset($action['uses'])) { + $action['uses'] = static::findCallable($action); + } + + if (is_string($action['uses']) && ! Str::contains($action['uses'], '@')) { + $action['uses'] = static::makeInvokable($action['uses']); + } + + return $action; + } + + /** + * Get an action for a route that has no action. + * + * @param string $uri + * @return array + */ + protected static function missingAction($uri) + { + return ['uses' => function () use ($uri) { + throw new LogicException("Route for [{$uri}] has no action."); + }]; + } + + /** + * Find the callable in an action array. + * + * @param array $action + * @return callable + */ + protected static function findCallable(array $action) + { + return Arr::first($action, function ($value, $key) { + return is_callable($value) && is_numeric($key); + }); + } + + /** + * Make an action for an invokable controller. + * + * @param string $action + * @return string + */ + protected static function makeInvokable($action) + { + if (! method_exists($action, '__invoke')) { + throw new UnexpectedValueException("Invalid route action: [{$action}]."); + } + + return $action.'@__invoke'; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Routing/RouteBinding.php b/vendor/laravel/framework/src/Illuminate/Routing/RouteBinding.php new file mode 100644 index 0000000..2137534 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Routing/RouteBinding.php @@ -0,0 +1,82 @@ +make($class), $method]; + + return call_user_func($callable, $value, $route); + }; + } + + /** + * Create a Route model binding for a model. + * + * @param \Illuminate\Container\Container $container + * @param string $class + * @param \Closure|null $callback + * @return \Closure + */ + public static function forModel($container, $class, $callback = null) + { + return function ($value) use ($container, $class, $callback) { + if (is_null($value)) { + return; + } + + // For model binders, we will attempt to retrieve the models using the first + // method on the model instance. If we cannot retrieve the models we'll + // throw a not found exception otherwise we will return the instance. + $instance = $container->make($class); + + if ($model = $instance->where($instance->getRouteKeyName(), $value)->first()) { + return $model; + } + + // If a callback was supplied to the method we will call that to determine + // what we should do when the model is not found. This just gives these + // developer a little greater flexibility to decide what will happen. + if ($callback instanceof Closure) { + return call_user_func($callback, $value); + } + + throw (new ModelNotFoundException)->setModel($class); + }; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Routing/RouteCollection.php b/vendor/laravel/framework/src/Illuminate/Routing/RouteCollection.php new file mode 100644 index 0000000..59058de --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Routing/RouteCollection.php @@ -0,0 +1,337 @@ +addToCollections($route); + + $this->addLookups($route); + + return $route; + } + + /** + * Add the given route to the arrays of routes. + * + * @param \Illuminate\Routing\Route $route + * @return void + */ + protected function addToCollections($route) + { + $domainAndUri = $route->domain().$route->uri(); + + foreach ($route->methods() as $method) { + $this->routes[$method][$domainAndUri] = $route; + } + + $this->allRoutes[$method.$domainAndUri] = $route; + } + + /** + * Add the route to any look-up tables if necessary. + * + * @param \Illuminate\Routing\Route $route + * @return void + */ + protected function addLookups($route) + { + // If the route has a name, we will add it to the name look-up table so that we + // will quickly be able to find any route associate with a name and not have + // to iterate through every route every time we need to perform a look-up. + $action = $route->getAction(); + + if (isset($action['as'])) { + $this->nameList[$action['as']] = $route; + } + + // When the route is routing to a controller we will also store the action that + // is used by the route. This will let us reverse route to controllers while + // processing a request and easily generate URLs to the given controllers. + if (isset($action['controller'])) { + $this->addToActionList($action, $route); + } + } + + /** + * Add a route to the controller action dictionary. + * + * @param array $action + * @param \Illuminate\Routing\Route $route + * @return void + */ + protected function addToActionList($action, $route) + { + $this->actionList[trim($action['controller'], '\\')] = $route; + } + + /** + * Refresh the name look-up table. + * + * This is done in case any names are fluently defined or if routes are overwritten. + * + * @return void + */ + public function refreshNameLookups() + { + $this->nameList = []; + + foreach ($this->allRoutes as $route) { + if ($route->getName()) { + $this->nameList[$route->getName()] = $route; + } + } + } + + /** + * Refresh the action look-up table. + * + * This is done in case any actions are overwritten with new controllers. + * + * @return void + */ + public function refreshActionLookups() + { + $this->actionList = []; + + foreach ($this->allRoutes as $route) { + if (isset($route->getAction()['controller'])) { + $this->addToActionList($route->getAction(), $route); + } + } + } + + /** + * Find the first route matching a given request. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Routing\Route + * + * @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException + */ + public function match(Request $request) + { + $routes = $this->get($request->getMethod()); + + // First, we will see if we can find a matching route for this current request + // method. If we can, great, we can just return it so that it can be called + // by the consumer. Otherwise we will check for routes with another verb. + $route = $this->matchAgainstRoutes($routes, $request); + + if (! is_null($route)) { + return $route->bind($request); + } + + // If no route was found we will now check if a matching route is specified by + // another HTTP verb. If it is we will need to throw a MethodNotAllowed and + // inform the user agent of which HTTP verb it should use for this route. + $others = $this->checkForAlternateVerbs($request); + + if (count($others) > 0) { + return $this->getRouteForMethods($request, $others); + } + + throw new NotFoundHttpException; + } + + /** + * Determine if a route in the array matches the request. + * + * @param array $routes + * @param \Illuminate\http\Request $request + * @param bool $includingMethod + * @return \Illuminate\Routing\Route|null + */ + protected function matchAgainstRoutes(array $routes, $request, $includingMethod = true) + { + return Arr::first($routes, function ($value) use ($request, $includingMethod) { + return $value->matches($request, $includingMethod); + }); + } + + /** + * Determine if any routes match on another HTTP verb. + * + * @param \Illuminate\Http\Request $request + * @return array + */ + protected function checkForAlternateVerbs($request) + { + $methods = array_diff(Router::$verbs, [$request->getMethod()]); + + // Here we will spin through all verbs except for the current request verb and + // check to see if any routes respond to them. If they do, we will return a + // proper error response with the correct headers on the response string. + $others = []; + + foreach ($methods as $method) { + if (! is_null($this->matchAgainstRoutes($this->get($method), $request, false))) { + $others[] = $method; + } + } + + return $others; + } + + /** + * Get a route (if necessary) that responds when other available methods are present. + * + * @param \Illuminate\Http\Request $request + * @param array $methods + * @return \Illuminate\Routing\Route + * + * @throws \Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException + */ + protected function getRouteForMethods($request, array $methods) + { + if ($request->method() == 'OPTIONS') { + return (new Route('OPTIONS', $request->path(), function () use ($methods) { + return new Response('', 200, ['Allow' => implode(',', $methods)]); + }))->bind($request); + } + + $this->methodNotAllowed($methods); + } + + /** + * Throw a method not allowed HTTP exception. + * + * @param array $others + * @return void + * + * @throws \Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException + */ + protected function methodNotAllowed(array $others) + { + throw new MethodNotAllowedHttpException($others); + } + + /** + * Get routes from the collection by method. + * + * @param string|null $method + * @return array + */ + public function get($method = null) + { + return is_null($method) ? $this->getRoutes() : Arr::get($this->routes, $method, []); + } + + /** + * Determine if the route collection contains a given named route. + * + * @param string $name + * @return bool + */ + public function hasNamedRoute($name) + { + return ! is_null($this->getByName($name)); + } + + /** + * Get a route instance by its name. + * + * @param string $name + * @return \Illuminate\Routing\Route|null + */ + public function getByName($name) + { + return isset($this->nameList[$name]) ? $this->nameList[$name] : null; + } + + /** + * Get a route instance by its controller action. + * + * @param string $action + * @return \Illuminate\Routing\Route|null + */ + public function getByAction($action) + { + return isset($this->actionList[$action]) ? $this->actionList[$action] : null; + } + + /** + * Get all of the routes in the collection. + * + * @return array + */ + public function getRoutes() + { + return array_values($this->allRoutes); + } + + /** + * Get all of the routes keyed by their HTTP verb / method. + * + * @return array + */ + public function getRoutesByMethod() + { + return $this->routes; + } + + /** + * Get an iterator for the items. + * + * @return \ArrayIterator + */ + public function getIterator() + { + return new ArrayIterator($this->getRoutes()); + } + + /** + * Count the number of items in the collection. + * + * @return int + */ + public function count() + { + return count($this->getRoutes()); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Routing/RouteCompiler.php b/vendor/laravel/framework/src/Illuminate/Routing/RouteCompiler.php new file mode 100644 index 0000000..b4e213c --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Routing/RouteCompiler.php @@ -0,0 +1,54 @@ +route = $route; + } + + /** + * Compile the route. + * + * @return \Symfony\Component\Routing\CompiledRoute + */ + public function compile() + { + $optionals = $this->getOptionalParameters(); + + $uri = preg_replace('/\{(\w+?)\?\}/', '{$1}', $this->route->uri()); + + return ( + new SymfonyRoute($uri, $optionals, $this->route->wheres, [], $this->route->domain() ?: '') + )->compile(); + } + + /** + * Get the optional parameters for the route. + * + * @return array + */ + protected function getOptionalParameters() + { + preg_match_all('/\{(\w+?)\?\}/', $this->route->uri(), $matches); + + return isset($matches[1]) ? array_fill_keys($matches[1], null) : []; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Routing/RouteDependencyResolverTrait.php b/vendor/laravel/framework/src/Illuminate/Routing/RouteDependencyResolverTrait.php new file mode 100644 index 0000000..704585f --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Routing/RouteDependencyResolverTrait.php @@ -0,0 +1,109 @@ +resolveMethodDependencies( + $parameters, new ReflectionMethod($instance, $method) + ); + } + + /** + * Resolve the given method's type-hinted dependencies. + * + * @param array $parameters + * @param \ReflectionFunctionAbstract $reflector + * @return array + */ + public function resolveMethodDependencies(array $parameters, ReflectionFunctionAbstract $reflector) + { + $instanceCount = 0; + + $values = array_values($parameters); + + foreach ($reflector->getParameters() as $key => $parameter) { + $instance = $this->transformDependency( + $parameter, $parameters + ); + + if (! is_null($instance)) { + $instanceCount++; + + $this->spliceIntoParameters($parameters, $key, $instance); + } elseif (! isset($values[$key - $instanceCount]) && + $parameter->isDefaultValueAvailable()) { + $this->spliceIntoParameters($parameters, $key, $parameter->getDefaultValue()); + } + } + + return $parameters; + } + + /** + * Attempt to transform the given parameter into a class instance. + * + * @param \ReflectionParameter $parameter + * @param array $parameters + * @return mixed + */ + protected function transformDependency(ReflectionParameter $parameter, $parameters) + { + $class = $parameter->getClass(); + + // If the parameter has a type-hinted class, we will check to see if it is already in + // the list of parameters. If it is we will just skip it as it is probably a model + // binding and we do not want to mess with those; otherwise, we resolve it here. + if ($class && ! $this->alreadyInParameters($class->name, $parameters)) { + return $this->container->make($class->name); + } + } + + /** + * Determine if an object of the given class is in a list of parameters. + * + * @param string $class + * @param array $parameters + * @return bool + */ + protected function alreadyInParameters($class, array $parameters) + { + return ! is_null(Arr::first($parameters, function ($value) use ($class) { + return $value instanceof $class; + })); + } + + /** + * Splice the given value into the parameter list. + * + * @param array $parameters + * @param string $offset + * @param mixed $value + * @return void + */ + protected function spliceIntoParameters(array &$parameters, $offset, $value) + { + array_splice( + $parameters, $offset, 0, [$value] + ); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Routing/RouteGroup.php b/vendor/laravel/framework/src/Illuminate/Routing/RouteGroup.php new file mode 100644 index 0000000..7b5d4b5 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Routing/RouteGroup.php @@ -0,0 +1,95 @@ + static::formatNamespace($new, $old), + 'prefix' => static::formatPrefix($new, $old), + 'where' => static::formatWhere($new, $old), + ]); + + return array_merge_recursive(Arr::except( + $old, ['namespace', 'prefix', 'where', 'as'] + ), $new); + } + + /** + * Format the namespace for the new group attributes. + * + * @param array $new + * @param array $old + * @return string|null + */ + protected static function formatNamespace($new, $old) + { + if (isset($new['namespace'])) { + return isset($old['namespace']) + ? trim($old['namespace'], '\\').'\\'.trim($new['namespace'], '\\') + : trim($new['namespace'], '\\'); + } + + return isset($old['namespace']) ? $old['namespace'] : null; + } + + /** + * Format the prefix for the new group attributes. + * + * @param array $new + * @param array $old + * @return string|null + */ + protected static function formatPrefix($new, $old) + { + $old = Arr::get($old, 'prefix'); + + return isset($new['prefix']) ? trim($old, '/').'/'.trim($new['prefix'], '/') : $old; + } + + /** + * Format the "wheres" for the new group attributes. + * + * @param array $new + * @param array $old + * @return array + */ + protected static function formatWhere($new, $old) + { + return array_merge( + isset($old['where']) ? $old['where'] : [], + isset($new['where']) ? $new['where'] : [] + ); + } + + /** + * Format the "as" clause of the new group attributes. + * + * @param array $new + * @param array $old + * @return array + */ + protected static function formatAs($new, $old) + { + if (isset($old['as'])) { + $new['as'] = $old['as'].Arr::get($new, 'as', ''); + } + + return $new; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Routing/RouteParameterBinder.php b/vendor/laravel/framework/src/Illuminate/Routing/RouteParameterBinder.php new file mode 100644 index 0000000..f208002 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Routing/RouteParameterBinder.php @@ -0,0 +1,118 @@ +route = $route; + } + + /** + * Get the parameters for the route. + * + * @param \Illuminate\Http\Request $request + * @return array + */ + public function parameters($request) + { + // If the route has a regular expression for the host part of the URI, we will + // compile that and get the parameter matches for this domain. We will then + // merge them into this parameters array so that this array is completed. + $parameters = $this->bindPathParameters($request); + + // If the route has a regular expression for the host part of the URI, we will + // compile that and get the parameter matches for this domain. We will then + // merge them into this parameters array so that this array is completed. + if (! is_null($this->route->compiled->getHostRegex())) { + $parameters = $this->bindHostParameters( + $request, $parameters + ); + } + + return $this->replaceDefaults($parameters); + } + + /** + * Get the parameter matches for the path portion of the URI. + * + * @param \Illuminate\Http\Request $request + * @return array + */ + protected function bindPathParameters($request) + { + preg_match($this->route->compiled->getRegex(), '/'.$request->decodedPath(), $matches); + + return $this->matchToKeys(array_slice($matches, 1)); + } + + /** + * Extract the parameter list from the host part of the request. + * + * @param \Illuminate\Http\Request $request + * @param array $parameters + * @return array + */ + protected function bindHostParameters($request, $parameters) + { + preg_match($this->route->compiled->getHostRegex(), $request->getHost(), $matches); + + return array_merge($this->matchToKeys(array_slice($matches, 1)), $parameters); + } + + /** + * Combine a set of parameter matches with the route's keys. + * + * @param array $matches + * @return array + */ + protected function matchToKeys(array $matches) + { + if (empty($parameterNames = $this->route->parameterNames())) { + return []; + } + + $parameters = array_intersect_key($matches, array_flip($parameterNames)); + + return array_filter($parameters, function ($value) { + return is_string($value) && strlen($value) > 0; + }); + } + + /** + * Replace null parameters with their defaults. + * + * @param array $parameters + * @return array + */ + protected function replaceDefaults(array $parameters) + { + foreach ($parameters as $key => $value) { + $parameters[$key] = isset($value) ? $value : Arr::get($this->route->defaults, $key); + } + + foreach ($this->route->defaults as $key => $value) { + if (! isset($parameters[$key])) { + $parameters[$key] = $value; + } + } + + return $parameters; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Routing/RouteRegistrar.php b/vendor/laravel/framework/src/Illuminate/Routing/RouteRegistrar.php new file mode 100644 index 0000000..113045d --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Routing/RouteRegistrar.php @@ -0,0 +1,175 @@ + 'as', + ]; + + /** + * Create a new route registrar instance. + * + * @param \Illuminate\Routing\Router $router + * @return void + */ + public function __construct(Router $router) + { + $this->router = $router; + } + + /** + * Set the value for a given attribute. + * + * @param string $key + * @param mixed $value + * @return $this + * + * @throws \InvalidArgumentException + */ + public function attribute($key, $value) + { + if (! in_array($key, $this->allowedAttributes)) { + throw new InvalidArgumentException("Attribute [{$key}] does not exist."); + } + + $this->attributes[array_get($this->aliases, $key, $key)] = $value; + + return $this; + } + + /** + * Route a resource to a controller. + * + * @param string $name + * @param string $controller + * @param array $options + * @return void + */ + public function resource($name, $controller, array $options = []) + { + $this->router->resource($name, $controller, $this->attributes + $options); + } + + /** + * Create a route group with shared attributes. + * + * @param \Closure $callback + * @return void + */ + public function group($callback) + { + $this->router->group($this->attributes, $callback); + } + + /** + * Register a new route with the given verbs. + * + * @param array|string $methods + * @param string $uri + * @param \Closure|array|string|null $action + * @return \Illuminate\Routing\Route + */ + public function match($methods, $uri, $action = null) + { + return $this->router->match($methods, $uri, $this->compileAction($action)); + } + + /** + * Register a new route with the router. + * + * @param string $method + * @param string $uri + * @param \Closure|array|string|null $action + * @return \Illuminate\Routing\Route + */ + protected function registerRoute($method, $uri, $action = null) + { + if (! is_array($action)) { + $action = array_merge($this->attributes, $action ? ['uses' => $action] : []); + } + + return $this->router->{$method}($uri, $this->compileAction($action)); + } + + /** + * Compile the action into an array including the attributes. + * + * @param \Closure|array|string|null $action + * @return array + */ + protected function compileAction($action) + { + if (is_null($action)) { + return $this->attributes; + } + + if (is_string($action) || $action instanceof Closure) { + $action = ['uses' => $action]; + } + + return array_merge($this->attributes, $action); + } + + /** + * Dynamically handle calls into the route registrar. + * + * @param string $method + * @param array $parameters + * @return \Illuminate\Routing\Route|$this + */ + public function __call($method, $parameters) + { + if (in_array($method, $this->passthru)) { + return $this->registerRoute($method, ...$parameters); + } + + if (in_array($method, $this->allowedAttributes)) { + return $this->attribute($method, $parameters[0]); + } + + throw new BadMethodCallException("Method [{$method}] does not exist."); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Routing/RouteSignatureParameters.php b/vendor/laravel/framework/src/Illuminate/Routing/RouteSignatureParameters.php new file mode 100644 index 0000000..e3a79a4 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Routing/RouteSignatureParameters.php @@ -0,0 +1,41 @@ +getParameters(); + + return is_null($subClass) ? $parameters : array_filter($parameters, function ($p) use ($subClass) { + return $p->getClass() && $p->getClass()->isSubclassOf($subClass); + }); + } + + /** + * Get the parameters for the given class / method by string. + * + * @param string $uses + * @return array + */ + protected static function fromClassMethodString($uses) + { + list($class, $method) = Str::parseCallback($uses); + + return (new ReflectionMethod($class, $method))->getParameters(); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Routing/RouteUrlGenerator.php b/vendor/laravel/framework/src/Illuminate/Routing/RouteUrlGenerator.php new file mode 100644 index 0000000..a60dc68 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Routing/RouteUrlGenerator.php @@ -0,0 +1,307 @@ + '/', + '%40' => '@', + '%3A' => ':', + '%3B' => ';', + '%2C' => ',', + '%3D' => '=', + '%2B' => '+', + '%21' => '!', + '%2A' => '*', + '%7C' => '|', + '%3F' => '?', + '%26' => '&', + '%23' => '#', + '%25' => '%', + ]; + + /** + * Create a new Route URL generator. + * + * @param \Illuminate\Routing\UrlGenerator $url + * @param \Illuminate\Http\Request $request + * @return void + */ + public function __construct($url, $request) + { + $this->url = $url; + $this->request = $request; + } + + /** + * Generate a URL for the given route. + * + * @param \Illuminate\Routing\Route $route + * @param array $parameters + * @param bool $absolute + * @return string + * + * @throws \Illuminate\Routing\Exceptions\UrlGenerationException + */ + public function to($route, $parameters = [], $absolute = false) + { + $domain = $this->getRouteDomain($route, $parameters); + + // First we will construct the entire URI including the root and query string. Once it + // has been constructed, we'll make sure we don't have any missing parameters or we + // will need to throw the exception to let the developers know one was not given. + $uri = $this->addQueryString($this->url->format( + $root = $this->replaceRootParameters($route, $domain, $parameters), + $this->replaceRouteParameters($route->uri(), $parameters) + ), $parameters); + + if (preg_match('/\{.*?\}/', $uri)) { + throw UrlGenerationException::forMissingParameters($route); + } + + // Once we have ensured that there are no missing parameters in the URI we will encode + // the URI and prepare it for returning to the developer. If the URI is supposed to + // be absolute, we will return it as-is. Otherwise we will remove the URL's root. + $uri = strtr(rawurlencode($uri), $this->dontEncode); + + if (! $absolute) { + return '/'.ltrim(str_replace($root, '', $uri), '/'); + } + + return $uri; + } + + /** + * Get the formatted domain for a given route. + * + * @param \Illuminate\Routing\Route $route + * @param array $parameters + * @return string + */ + protected function getRouteDomain($route, &$parameters) + { + return $route->domain() ? $this->formatDomain($route, $parameters) : null; + } + + /** + * Format the domain and port for the route and request. + * + * @param \Illuminate\Routing\Route $route + * @param array $parameters + * @return string + */ + protected function formatDomain($route, &$parameters) + { + return $this->addPortToDomain( + $this->getRouteScheme($route).$route->domain() + ); + } + + /** + * Get the scheme for the given route. + * + * @param \Illuminate\Routing\Route $route + * @return string + */ + protected function getRouteScheme($route) + { + if ($route->httpOnly()) { + return 'http://'; + } elseif ($route->httpsOnly()) { + return 'https://'; + } else { + return $this->url->formatScheme(null); + } + } + + /** + * Add the port to the domain if necessary. + * + * @param string $domain + * @return string + */ + protected function addPortToDomain($domain) + { + $secure = $this->request->isSecure(); + + $port = (int) $this->request->getPort(); + + return ($secure && $port === 443) || (! $secure && $port === 80) + ? $domain : $domain.':'.$port; + } + + /** + * Replace the parameters on the root path. + * + * @param \Illuminate\Routing\Route $route + * @param string $domain + * @param array $parameters + * @return string + */ + protected function replaceRootParameters($route, $domain, &$parameters) + { + $scheme = $this->getRouteScheme($route); + + return $this->replaceRouteParameters( + $this->url->formatRoot($scheme, $domain), $parameters + ); + } + + /** + * Replace all of the wildcard parameters for a route path. + * + * @param string $path + * @param array $parameters + * @return string + */ + protected function replaceRouteParameters($path, array &$parameters) + { + $path = $this->replaceNamedParameters($path, $parameters); + + $path = preg_replace_callback('/\{.*?\}/', function ($match) use (&$parameters) { + return (empty($parameters) && ! Str::endsWith($match[0], '?}')) + ? $match[0] + : array_shift($parameters); + }, $path); + + return trim(preg_replace('/\{.*?\?\}/', '', $path), '/'); + } + + /** + * Replace all of the named parameters in the path. + * + * @param string $path + * @param array $parameters + * @return string + */ + protected function replaceNamedParameters($path, &$parameters) + { + return preg_replace_callback('/\{(.*?)\??\}/', function ($m) use (&$parameters) { + if (isset($parameters[$m[1]])) { + return Arr::pull($parameters, $m[1]); + } elseif (isset($this->defaultParameters[$m[1]])) { + return $this->defaultParameters[$m[1]]; + } else { + return $m[0]; + } + }, $path); + } + + /** + * Add a query string to the URI. + * + * @param string $uri + * @param array $parameters + * @return mixed|string + */ + protected function addQueryString($uri, array $parameters) + { + // If the URI has a fragment we will move it to the end of this URI since it will + // need to come after any query string that may be added to the URL else it is + // not going to be available. We will remove it then append it back on here. + if (! is_null($fragment = parse_url($uri, PHP_URL_FRAGMENT))) { + $uri = preg_replace('/#.*/', '', $uri); + } + + $uri .= $this->getRouteQueryString($parameters); + + return is_null($fragment) ? $uri : $uri."#{$fragment}"; + } + + /** + * Get the query string for a given route. + * + * @param array $parameters + * @return string + */ + protected function getRouteQueryString(array $parameters) + { + // First we will get all of the string parameters that are remaining after we + // have replaced the route wildcards. We'll then build a query string from + // these string parameters then use it as a starting point for the rest. + if (count($parameters) == 0) { + return ''; + } + + $query = http_build_query( + $keyed = $this->getStringParameters($parameters) + ); + + // Lastly, if there are still parameters remaining, we will fetch the numeric + // parameters that are in the array and add them to the query string or we + // will make the initial query string if it wasn't started with strings. + if (count($keyed) < count($parameters)) { + $query .= '&'.implode( + '&', $this->getNumericParameters($parameters) + ); + } + + return '?'.trim($query, '&'); + } + + /** + * Get the string parameters from a given list. + * + * @param array $parameters + * @return array + */ + protected function getStringParameters(array $parameters) + { + return array_filter($parameters, 'is_string', ARRAY_FILTER_USE_KEY); + } + + /** + * Get the numeric parameters from a given list. + * + * @param array $parameters + * @return array + */ + protected function getNumericParameters(array $parameters) + { + return array_filter($parameters, 'is_numeric', ARRAY_FILTER_USE_KEY); + } + + /** + * Set the default named parameters used by the URL generator. + * + * @param array $defaults + * @return void + */ + public function defaults(array $defaults) + { + $this->defaultParameters = array_merge( + $this->defaultParameters, $defaults + ); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Routing/Router.php b/vendor/laravel/framework/src/Illuminate/Routing/Router.php new file mode 100644 index 0000000..f70b361 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Routing/Router.php @@ -0,0 +1,1087 @@ +events = $events; + $this->routes = new RouteCollection; + $this->container = $container ?: new Container; + } + + /** + * Register a new GET route with the router. + * + * @param string $uri + * @param \Closure|array|string|null $action + * @return \Illuminate\Routing\Route + */ + public function get($uri, $action = null) + { + return $this->addRoute(['GET', 'HEAD'], $uri, $action); + } + + /** + * Register a new POST route with the router. + * + * @param string $uri + * @param \Closure|array|string|null $action + * @return \Illuminate\Routing\Route + */ + public function post($uri, $action = null) + { + return $this->addRoute('POST', $uri, $action); + } + + /** + * Register a new PUT route with the router. + * + * @param string $uri + * @param \Closure|array|string|null $action + * @return \Illuminate\Routing\Route + */ + public function put($uri, $action = null) + { + return $this->addRoute('PUT', $uri, $action); + } + + /** + * Register a new PATCH route with the router. + * + * @param string $uri + * @param \Closure|array|string|null $action + * @return \Illuminate\Routing\Route + */ + public function patch($uri, $action = null) + { + return $this->addRoute('PATCH', $uri, $action); + } + + /** + * Register a new DELETE route with the router. + * + * @param string $uri + * @param \Closure|array|string|null $action + * @return \Illuminate\Routing\Route + */ + public function delete($uri, $action = null) + { + return $this->addRoute('DELETE', $uri, $action); + } + + /** + * Register a new OPTIONS route with the router. + * + * @param string $uri + * @param \Closure|array|string|null $action + * @return \Illuminate\Routing\Route + */ + public function options($uri, $action = null) + { + return $this->addRoute('OPTIONS', $uri, $action); + } + + /** + * Register a new route responding to all verbs. + * + * @param string $uri + * @param \Closure|array|string|null $action + * @return \Illuminate\Routing\Route + */ + public function any($uri, $action = null) + { + $verbs = ['GET', 'HEAD', 'POST', 'PUT', 'PATCH', 'DELETE']; + + return $this->addRoute($verbs, $uri, $action); + } + + /** + * Register a new route with the given verbs. + * + * @param array|string $methods + * @param string $uri + * @param \Closure|array|string|null $action + * @return \Illuminate\Routing\Route + */ + public function match($methods, $uri, $action = null) + { + return $this->addRoute(array_map('strtoupper', (array) $methods), $uri, $action); + } + + /** + * Register an array of resource controllers. + * + * @param array $resources + * @return void + */ + public function resources(array $resources) + { + foreach ($resources as $name => $controller) { + $this->resource($name, $controller); + } + } + + /** + * Route a resource to a controller. + * + * @param string $name + * @param string $controller + * @param array $options + * @return void + */ + public function resource($name, $controller, array $options = []) + { + if ($this->container && $this->container->bound(ResourceRegistrar::class)) { + $registrar = $this->container->make(ResourceRegistrar::class); + } else { + $registrar = new ResourceRegistrar($this); + } + + $registrar->register($name, $controller, $options); + } + + /** + * Create a route group with shared attributes. + * + * @param array $attributes + * @param \Closure|string $routes + * @return void + */ + public function group(array $attributes, $routes) + { + $this->updateGroupStack($attributes); + + // Once we have updated the group stack, we'll load the provided routes and + // merge in the group's attributes when the routes are created. After we + // have created the routes, we will pop the attributes off the stack. + $this->loadRoutes($routes); + + array_pop($this->groupStack); + } + + /** + * Update the group stack with the given attributes. + * + * @param array $attributes + * @return void + */ + protected function updateGroupStack(array $attributes) + { + if (! empty($this->groupStack)) { + $attributes = RouteGroup::merge($attributes, end($this->groupStack)); + } + + $this->groupStack[] = $attributes; + } + + /** + * Merge the given array with the last group stack. + * + * @param array $new + * @return array + */ + public function mergeWithLastGroup($new) + { + return RouteGroup::merge($new, end($this->groupStack)); + } + + /** + * Load the provided routes. + * + * @param \Closure|string $routes + * @return void + */ + protected function loadRoutes($routes) + { + if ($routes instanceof Closure) { + $routes($this); + } else { + $router = $this; + + require $routes; + } + } + + /** + * Get the prefix from the last group on the stack. + * + * @return string + */ + public function getLastGroupPrefix() + { + if (! empty($this->groupStack)) { + $last = end($this->groupStack); + + return isset($last['prefix']) ? $last['prefix'] : ''; + } + + return ''; + } + + /** + * Add a route to the underlying route collection. + * + * @param array|string $methods + * @param string $uri + * @param \Closure|array|string|null $action + * @return \Illuminate\Routing\Route + */ + protected function addRoute($methods, $uri, $action) + { + return $this->routes->add($this->createRoute($methods, $uri, $action)); + } + + /** + * Create a new route instance. + * + * @param array|string $methods + * @param string $uri + * @param mixed $action + * @return \Illuminate\Routing\Route + */ + protected function createRoute($methods, $uri, $action) + { + // If the route is routing to a controller we will parse the route action into + // an acceptable array format before registering it and creating this route + // instance itself. We need to build the Closure that will call this out. + if ($this->actionReferencesController($action)) { + $action = $this->convertToControllerAction($action); + } + + $route = $this->newRoute( + $methods, $this->prefix($uri), $action + ); + + // If we have groups that need to be merged, we will merge them now after this + // route has already been created and is ready to go. After we're done with + // the merge we will be ready to return the route back out to the caller. + if ($this->hasGroupStack()) { + $this->mergeGroupAttributesIntoRoute($route); + } + + $this->addWhereClausesToRoute($route); + + return $route; + } + + /** + * Determine if the action is routing to a controller. + * + * @param array $action + * @return bool + */ + protected function actionReferencesController($action) + { + if (! $action instanceof Closure) { + return is_string($action) || (isset($action['uses']) && is_string($action['uses'])); + } + + return false; + } + + /** + * Add a controller based route action to the action array. + * + * @param array|string $action + * @return array + */ + protected function convertToControllerAction($action) + { + if (is_string($action)) { + $action = ['uses' => $action]; + } + + // Here we'll merge any group "uses" statement if necessary so that the action + // has the proper clause for this property. Then we can simply set the name + // of the controller on the action and return the action array for usage. + if (! empty($this->groupStack)) { + $action['uses'] = $this->prependGroupNamespace($action['uses']); + } + + // Here we will set this controller name on the action array just so we always + // have a copy of it for reference if we need it. This can be used while we + // search for a controller name or do some other type of fetch operation. + $action['controller'] = $action['uses']; + + return $action; + } + + /** + * Prepend the last group namespace onto the use clause. + * + * @param string $class + * @return string + */ + protected function prependGroupNamespace($class) + { + $group = end($this->groupStack); + + return isset($group['namespace']) && strpos($class, '\\') !== 0 + ? $group['namespace'].'\\'.$class : $class; + } + + /** + * Create a new Route object. + * + * @param array|string $methods + * @param string $uri + * @param mixed $action + * @return \Illuminate\Routing\Route + */ + protected function newRoute($methods, $uri, $action) + { + return (new Route($methods, $uri, $action)) + ->setRouter($this) + ->setContainer($this->container); + } + + /** + * Prefix the given URI with the last prefix. + * + * @param string $uri + * @return string + */ + protected function prefix($uri) + { + return trim(trim($this->getLastGroupPrefix(), '/').'/'.trim($uri, '/'), '/') ?: '/'; + } + + /** + * Add the necessary where clauses to the route based on its initial registration. + * + * @param \Illuminate\Routing\Route $route + * @return \Illuminate\Routing\Route + */ + protected function addWhereClausesToRoute($route) + { + $route->where(array_merge( + $this->patterns, isset($route->getAction()['where']) ? $route->getAction()['where'] : [] + )); + + return $route; + } + + /** + * Merge the group stack with the controller action. + * + * @param \Illuminate\Routing\Route $route + * @return void + */ + protected function mergeGroupAttributesIntoRoute($route) + { + $route->setAction($this->mergeWithLastGroup($route->getAction())); + } + + /** + * Dispatch the request to the application. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\Response + */ + public function dispatch(Request $request) + { + $this->currentRequest = $request; + + return $this->dispatchToRoute($request); + } + + /** + * Dispatch the request to a route and return the response. + * + * @param \Illuminate\Http\Request $request + * @return mixed + */ + public function dispatchToRoute(Request $request) + { + // First we will find a route that matches this request. We will also set the + // route resolver on the request so middlewares assigned to the route will + // receive access to this route instance for checking of the parameters. + $route = $this->findRoute($request); + + $request->setRouteResolver(function () use ($route) { + return $route; + }); + + $this->events->dispatch(new Events\RouteMatched($route, $request)); + + $response = $this->runRouteWithinStack($route, $request); + + return $this->prepareResponse($request, $response); + } + + /** + * Find the route matching a given request. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Routing\Route + */ + protected function findRoute($request) + { + $this->current = $route = $this->routes->match($request); + + $this->container->instance(Route::class, $route); + + return $route; + } + + /** + * Run the given route within a Stack "onion" instance. + * + * @param \Illuminate\Routing\Route $route + * @param \Illuminate\Http\Request $request + * @return mixed + */ + protected function runRouteWithinStack(Route $route, Request $request) + { + $shouldSkipMiddleware = $this->container->bound('middleware.disable') && + $this->container->make('middleware.disable') === true; + + $middleware = $shouldSkipMiddleware ? [] : $this->gatherRouteMiddleware($route); + + return (new Pipeline($this->container)) + ->send($request) + ->through($middleware) + ->then(function ($request) use ($route) { + return $this->prepareResponse( + $request, $route->run() + ); + }); + } + + /** + * Gather the middleware for the given route with resolved class names. + * + * @param \Illuminate\Routing\Route $route + * @return array + */ + public function gatherRouteMiddleware(Route $route) + { + $middleware = collect($route->gatherMiddleware())->map(function ($name) { + return (array) MiddlewareNameResolver::resolve($name, $this->middleware, $this->middlewareGroups); + })->flatten(); + + return $this->sortMiddleware($middleware); + } + + /** + * Sort the given middleware by priority. + * + * @param \Illuminate\Support\Collection $middlewares + * @return array + */ + protected function sortMiddleware(Collection $middlewares) + { + return (new SortedMiddleware($this->middlewarePriority, $middlewares))->all(); + } + + /** + * Create a response instance from the given value. + * + * @param \Symfony\Component\HttpFoundation\Request $request + * @param mixed $response + * @return \Illuminate\Http\Response + */ + public function prepareResponse($request, $response) + { + if ($response instanceof PsrResponseInterface) { + $response = (new HttpFoundationFactory)->createResponse($response); + } elseif (! $response instanceof SymfonyResponse) { + $response = new Response($response); + } + + return $response->prepare($request); + } + + /** + * Substitute the route bindings onto the route. + * + * @param \Illuminate\Routing\Route $route + * @return \Illuminate\Routing\Route + */ + public function substituteBindings($route) + { + foreach ($route->parameters() as $key => $value) { + if (isset($this->binders[$key])) { + $route->setParameter($key, $this->performBinding($key, $value, $route)); + } + } + + return $route; + } + + /** + * Substitute the implicit Eloquent model bindings for the route. + * + * @param \Illuminate\Routing\Route $route + * @return void + */ + public function substituteImplicitBindings($route) + { + ImplicitRouteBinding::resolveForRoute($this->container, $route); + } + + /** + * Call the binding callback for the given key. + * + * @param string $key + * @param string $value + * @param \Illuminate\Routing\Route $route + * @return mixed + */ + protected function performBinding($key, $value, $route) + { + return call_user_func($this->binders[$key], $value, $route); + } + + /** + * Register a route matched event listener. + * + * @param string|callable $callback + * @return void + */ + public function matched($callback) + { + $this->events->listen(Events\RouteMatched::class, $callback); + } + + /** + * Get all of the defined middleware short-hand names. + * + * @return array + */ + public function getMiddleware() + { + return $this->middleware; + } + + /** + * Register a short-hand name for a middleware. + * + * @param string $name + * @param string $class + * @return $this + */ + public function aliasMiddleware($name, $class) + { + $this->middleware[$name] = $class; + + return $this; + } + + /** + * Check if a middlewareGroup with the given name exists. + * + * @param string $name + * @return bool + */ + public function hasMiddlewareGroup($name) + { + return array_key_exists($name, $this->middlewareGroups); + } + + /** + * Get all of the defined middleware groups. + * + * @return array + */ + public function getMiddlewareGroups() + { + return $this->middlewareGroups; + } + + /** + * Register a group of middleware. + * + * @param string $name + * @param array $middleware + * @return $this + */ + public function middlewareGroup($name, array $middleware) + { + $this->middlewareGroups[$name] = $middleware; + + return $this; + } + + /** + * Add a middleware to the beginning of a middleware group. + * + * If the middleware is already in the group, it will not be added again. + * + * @param string $group + * @param string $middleware + * @return $this + */ + public function prependMiddlewareToGroup($group, $middleware) + { + if (isset($this->middlewareGroups[$group]) && ! in_array($middleware, $this->middlewareGroups[$group])) { + array_unshift($this->middlewareGroups[$group], $middleware); + } + + return $this; + } + + /** + * Add a middleware to the end of a middleware group. + * + * If the middleware is already in the group, it will not be added again. + * + * @param string $group + * @param string $middleware + * @return $this + */ + public function pushMiddlewareToGroup($group, $middleware) + { + if (! array_key_exists($group, $this->middlewareGroups)) { + $this->middlewareGroups[$group] = []; + } + + if (! in_array($middleware, $this->middlewareGroups[$group])) { + $this->middlewareGroups[$group][] = $middleware; + } + + return $this; + } + + /** + * Add a new route parameter binder. + * + * @param string $key + * @param string|callable $binder + * @return void + */ + public function bind($key, $binder) + { + $this->binders[str_replace('-', '_', $key)] = RouteBinding::forCallback( + $this->container, $binder + ); + } + + /** + * Register a model binder for a wildcard. + * + * @param string $key + * @param string $class + * @param \Closure|null $callback + * @return void + * + * @throws \Illuminate\Database\Eloquent\ModelNotFoundException + */ + public function model($key, $class, Closure $callback = null) + { + $this->bind($key, RouteBinding::forModel($this->container, $class, $callback)); + } + + /** + * Get the binding callback for a given binding. + * + * @param string $key + * @return \Closure|null + */ + public function getBindingCallback($key) + { + if (isset($this->binders[$key = str_replace('-', '_', $key)])) { + return $this->binders[$key]; + } + } + + /** + * Get the global "where" patterns. + * + * @return array + */ + public function getPatterns() + { + return $this->patterns; + } + + /** + * Set a global where pattern on all routes. + * + * @param string $key + * @param string $pattern + * @return void + */ + public function pattern($key, $pattern) + { + $this->patterns[$key] = $pattern; + } + + /** + * Set a group of global where patterns on all routes. + * + * @param array $patterns + * @return void + */ + public function patterns($patterns) + { + foreach ($patterns as $key => $pattern) { + $this->pattern($key, $pattern); + } + } + + /** + * Determine if the router currently has a group stack. + * + * @return bool + */ + public function hasGroupStack() + { + return ! empty($this->groupStack); + } + + /** + * Get the current group stack for the router. + * + * @return array + */ + public function getGroupStack() + { + return $this->groupStack; + } + + /** + * Get a route parameter for the current route. + * + * @param string $key + * @param string $default + * @return mixed + */ + public function input($key, $default = null) + { + return $this->current()->parameter($key, $default); + } + + /** + * Get the request currently being dispatched. + * + * @return \Illuminate\Http\Request + */ + public function getCurrentRequest() + { + return $this->currentRequest; + } + + /** + * Get the currently dispatched route instance. + * + * @return \Illuminate\Routing\Route + */ + public function getCurrentRoute() + { + return $this->current(); + } + + /** + * Get the currently dispatched route instance. + * + * @return \Illuminate\Routing\Route + */ + public function current() + { + return $this->current; + } + + /** + * Check if a route with the given name exists. + * + * @param string $name + * @return bool + */ + public function has($name) + { + return $this->routes->hasNamedRoute($name); + } + + /** + * Get the current route name. + * + * @return string|null + */ + public function currentRouteName() + { + return $this->current() ? $this->current()->getName() : null; + } + + /** + * Alias for the "currentRouteNamed" method. + * + * @return bool + */ + public function is() + { + foreach (func_get_args() as $pattern) { + if (Str::is($pattern, $this->currentRouteName())) { + return true; + } + } + + return false; + } + + /** + * Determine if the current route matches a given name. + * + * @param string $name + * @return bool + */ + public function currentRouteNamed($name) + { + return $this->current() ? $this->current()->getName() == $name : false; + } + + /** + * Get the current route action. + * + * @return string|null + */ + public function currentRouteAction() + { + if (! $this->current()) { + return; + } + + $action = $this->current()->getAction(); + + return isset($action['controller']) ? $action['controller'] : null; + } + + /** + * Alias for the "currentRouteUses" method. + * + * @return bool + */ + public function uses() + { + foreach (func_get_args() as $pattern) { + if (Str::is($pattern, $this->currentRouteAction())) { + return true; + } + } + + return false; + } + + /** + * Determine if the current route action matches a given action. + * + * @param string $action + * @return bool + */ + public function currentRouteUses($action) + { + return $this->currentRouteAction() == $action; + } + + /** + * Register the typical authentication routes for an application. + * + * @return void + */ + public function auth() + { + // Authentication Routes... + $this->get('login', 'Auth\LoginController@showLoginForm')->name('login'); + $this->post('login', 'Auth\LoginController@login'); + $this->post('logout', 'Auth\LoginController@logout')->name('logout'); + + // Registration Routes... + $this->get('register', 'Auth\RegisterController@showRegistrationForm')->name('register'); + $this->post('register', 'Auth\RegisterController@register'); + + // Password Reset Routes... + $this->get('password/reset', 'Auth\ForgotPasswordController@showLinkRequestForm')->name('password.request'); + $this->post('password/email', 'Auth\ForgotPasswordController@sendResetLinkEmail')->name('password.email'); + $this->get('password/reset/{token}', 'Auth\ResetPasswordController@showResetForm')->name('password.reset'); + $this->post('password/reset', 'Auth\ResetPasswordController@reset'); + } + + /** + * Set the unmapped global resource parameters to singular. + * + * @param bool $singular + * @return void + */ + public function singularResourceParameters($singular = true) + { + ResourceRegistrar::singularParameters($singular); + } + + /** + * Set the global resource parameter mapping. + * + * @param array $parameters + * @return void + */ + public function resourceParameters(array $parameters = []) + { + ResourceRegistrar::setParameters($parameters); + } + + /** + * Get or set the verbs used in the resource URIs. + * + * @param array $verbs + * @return array|null + */ + public function resourceVerbs(array $verbs = []) + { + return ResourceRegistrar::verbs($verbs); + } + + /** + * Get the underlying route collection. + * + * @return \Illuminate\Routing\RouteCollection + */ + public function getRoutes() + { + return $this->routes; + } + + /** + * Set the route collection instance. + * + * @param \Illuminate\Routing\RouteCollection $routes + * @return void + */ + public function setRoutes(RouteCollection $routes) + { + foreach ($routes as $route) { + $route->setRouter($this)->setContainer($this->container); + } + + $this->routes = $routes; + + $this->container->instance('routes', $this->routes); + } + + /** + * Dynamically handle calls into the router instance. + * + * @param string $method + * @param array $parameters + * @return mixed + */ + public function __call($method, $parameters) + { + if (static::hasMacro($method)) { + return $this->macroCall($method, $parameters); + } + + return (new RouteRegistrar($this))->attribute($method, $parameters[0]); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Routing/RoutingServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Routing/RoutingServiceProvider.php new file mode 100755 index 0000000..762971e --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Routing/RoutingServiceProvider.php @@ -0,0 +1,151 @@ +registerRouter(); + + $this->registerUrlGenerator(); + + $this->registerRedirector(); + + $this->registerPsrRequest(); + + $this->registerPsrResponse(); + + $this->registerResponseFactory(); + } + + /** + * Register the router instance. + * + * @return void + */ + protected function registerRouter() + { + $this->app->singleton('router', function ($app) { + return new Router($app['events'], $app); + }); + } + + /** + * Register the URL generator service. + * + * @return void + */ + protected function registerUrlGenerator() + { + $this->app->singleton('url', function ($app) { + $routes = $app['router']->getRoutes(); + + // The URL generator needs the route collection that exists on the router. + // Keep in mind this is an object, so we're passing by references here + // and all the registered routes will be available to the generator. + $app->instance('routes', $routes); + + $url = new UrlGenerator( + $routes, $app->rebinding( + 'request', $this->requestRebinder() + ) + ); + + $url->setSessionResolver(function () { + return $this->app['session']; + }); + + // If the route collection is "rebound", for example, when the routes stay + // cached for the application, we will need to rebind the routes on the + // URL generator instance so it has the latest version of the routes. + $app->rebinding('routes', function ($app, $routes) { + $app['url']->setRoutes($routes); + }); + + return $url; + }); + } + + /** + * Get the URL generator request rebinder. + * + * @return \Closure + */ + protected function requestRebinder() + { + return function ($app, $request) { + $app['url']->setRequest($request); + }; + } + + /** + * Register the Redirector service. + * + * @return void + */ + protected function registerRedirector() + { + $this->app->singleton('redirect', function ($app) { + $redirector = new Redirector($app['url']); + + // If the session is set on the application instance, we'll inject it into + // the redirector instance. This allows the redirect responses to allow + // for the quite convenient "with" methods that flash to the session. + if (isset($app['session.store'])) { + $redirector->setSession($app['session.store']); + } + + return $redirector; + }); + } + + /** + * Register a binding for the PSR-7 request implementation. + * + * @return void + */ + protected function registerPsrRequest() + { + $this->app->bind(ServerRequestInterface::class, function ($app) { + return (new DiactorosFactory)->createRequest($app->make('request')); + }); + } + + /** + * Register a binding for the PSR-7 response implementation. + * + * @return void + */ + protected function registerPsrResponse() + { + $this->app->bind(ResponseInterface::class, function ($app) { + return new PsrResponse(); + }); + } + + /** + * Register the response factory implementation. + * + * @return void + */ + protected function registerResponseFactory() + { + $this->app->singleton(ResponseFactoryContract::class, function ($app) { + return new ResponseFactory($app[ViewFactoryContract::class], $app['redirect']); + }); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Routing/SortedMiddleware.php b/vendor/laravel/framework/src/Illuminate/Routing/SortedMiddleware.php new file mode 100644 index 0000000..f205c17 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Routing/SortedMiddleware.php @@ -0,0 +1,87 @@ +all(); + } + + $this->items = $this->sortMiddleware($priorityMap, $middlewares); + } + + /** + * Sort the middlewares by the given priority map. + * + * Each call to this method makes one discrete middleware movement if necessary. + * + * @param array $priorityMap + * @param array $middlewares + * @return array + */ + protected function sortMiddleware($priorityMap, $middlewares) + { + $lastIndex = 0; + + foreach ($middlewares as $index => $middleware) { + if (! is_string($middleware)) { + continue; + } + + $stripped = head(explode(':', $middleware)); + + if (in_array($stripped, $priorityMap)) { + $priorityIndex = array_search($stripped, $priorityMap); + + // This middleware is in the priority map. If we have encountered another middleware + // that was also in the priority map and was at a lower priority than the current + // middleware, we will move this middleware to be above the previous encounter. + if (isset($lastPriorityIndex) && $priorityIndex < $lastPriorityIndex) { + return $this->sortMiddleware( + $priorityMap, array_values( + $this->moveMiddleware($middlewares, $index, $lastIndex) + ) + ); + + // This middleware is in the priority map; but, this is the first middleware we have + // encountered from the map thus far. We'll save its current index plus its index + // from the priority map so we can compare against them on the next iterations. + } else { + $lastIndex = $index; + $lastPriorityIndex = $priorityIndex; + } + } + } + + return array_values(array_unique($middlewares, SORT_REGULAR)); + } + + /** + * Splice a middleware into a new position and remove the old entry. + * + * @param array $middlewares + * @param int $from + * @param int $to + * @return array + */ + protected function moveMiddleware($middlewares, $from, $to) + { + array_splice($middlewares, $to, 0, $middlewares[$from]); + + unset($middlewares[$from + 1]); + + return $middlewares; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Routing/UrlGenerator.php b/vendor/laravel/framework/src/Illuminate/Routing/UrlGenerator.php new file mode 100755 index 0000000..0011297 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Routing/UrlGenerator.php @@ -0,0 +1,618 @@ +routes = $routes; + + $this->setRequest($request); + } + + /** + * Get the full URL for the current request. + * + * @return string + */ + public function full() + { + return $this->request->fullUrl(); + } + + /** + * Get the current URL for the request. + * + * @return string + */ + public function current() + { + return $this->to($this->request->getPathInfo()); + } + + /** + * Get the URL for the previous request. + * + * @param mixed $fallback + * @return string + */ + public function previous($fallback = false) + { + $referrer = $this->request->headers->get('referer'); + + $url = $referrer ? $this->to($referrer) : $this->getPreviousUrlFromSession(); + + if ($url) { + return $url; + } elseif ($fallback) { + return $this->to($fallback); + } else { + return $this->to('/'); + } + } + + /** + * Get the previous URL from the session if possible. + * + * @return string|null + */ + protected function getPreviousUrlFromSession() + { + $session = $this->getSession(); + + return $session ? $session->previousUrl() : null; + } + + /** + * Generate an absolute URL to the given path. + * + * @param string $path + * @param mixed $extra + * @param bool|null $secure + * @return string + */ + public function to($path, $extra = [], $secure = null) + { + // First we will check if the URL is already a valid URL. If it is we will not + // try to generate a new one but will simply return the URL as is, which is + // convenient since developers do not always have to check if it's valid. + if ($this->isValidUrl($path)) { + return $path; + } + + $tail = implode('/', array_map( + 'rawurlencode', (array) $this->formatParameters($extra)) + ); + + // Once we have the scheme we will compile the "tail" by collapsing the values + // into a single string delimited by slashes. This just makes it convenient + // for passing the array of parameters to this URL as a list of segments. + $root = $this->formatRoot($this->formatScheme($secure)); + + list($path, $query) = $this->extractQueryString($path); + + return $this->format( + $root, '/'.trim($path.'/'.$tail, '/') + ).$query; + } + + /** + * Generate a secure, absolute URL to the given path. + * + * @param string $path + * @param array $parameters + * @return string + */ + public function secure($path, $parameters = []) + { + return $this->to($path, $parameters, true); + } + + /** + * Generate the URL to an application asset. + * + * @param string $path + * @param bool|null $secure + * @return string + */ + public function asset($path, $secure = null) + { + if ($this->isValidUrl($path)) { + return $path; + } + + // Once we get the root URL, we will check to see if it contains an index.php + // file in the paths. If it does, we will remove it since it is not needed + // for asset paths, but only for routes to endpoints in the application. + $root = $this->formatRoot($this->formatScheme($secure)); + + return $this->removeIndex($root).'/'.trim($path, '/'); + } + + /** + * Generate the URL to a secure asset. + * + * @param string $path + * @return string + */ + public function secureAsset($path) + { + return $this->asset($path, true); + } + + /** + * Generate the URL to an asset from a custom root domain such as CDN, etc. + * + * @param string $root + * @param string $path + * @param bool|null $secure + * @return string + */ + public function assetFrom($root, $path, $secure = null) + { + // Once we get the root URL, we will check to see if it contains an index.php + // file in the paths. If it does, we will remove it since it is not needed + // for asset paths, but only for routes to endpoints in the application. + $root = $this->formatRoot($this->formatScheme($secure), $root); + + return $this->removeIndex($root).'/'.trim($path, '/'); + } + + /** + * Remove the index.php file from a path. + * + * @param string $root + * @return string + */ + protected function removeIndex($root) + { + $i = 'index.php'; + + return Str::contains($root, $i) ? str_replace('/'.$i, '', $root) : $root; + } + + /** + * Get the default scheme for a raw URL. + * + * @param bool|null $secure + * @return string + */ + public function formatScheme($secure) + { + if (! is_null($secure)) { + return $secure ? 'https://' : 'http://'; + } + + if (is_null($this->cachedSchema)) { + $this->cachedSchema = $this->forceScheme ?: $this->request->getScheme().'://'; + } + + return $this->cachedSchema; + } + + /** + * Get the URL to a named route. + * + * @param string $name + * @param mixed $parameters + * @param bool $absolute + * @return string + * + * @throws \InvalidArgumentException + */ + public function route($name, $parameters = [], $absolute = true) + { + if (! is_null($route = $this->routes->getByName($name))) { + return $this->toRoute($route, $parameters, $absolute); + } + + throw new InvalidArgumentException("Route [{$name}] not defined."); + } + + /** + * Get the URL for a given route instance. + * + * @param \Illuminate\Routing\Route $route + * @param mixed $parameters + * @param bool $absolute + * @return string + * + * @throws \Illuminate\Routing\Exceptions\UrlGenerationException + */ + protected function toRoute($route, $parameters, $absolute) + { + return $this->routeUrl()->to( + $route, $this->formatParameters($parameters), $absolute + ); + } + + /** + * Get the URL to a controller action. + * + * @param string $action + * @param mixed $parameters + * @param bool $absolute + * @return string + * + * @throws \InvalidArgumentException + */ + public function action($action, $parameters = [], $absolute = true) + { + if (is_null($route = $this->routes->getByAction($action = $this->formatAction($action)))) { + throw new InvalidArgumentException("Action {$action} not defined."); + } + + return $this->toRoute($route, $parameters, $absolute); + } + + /** + * Format the given controller action. + * + * @param string $action + * @return string + */ + protected function formatAction($action) + { + if ($this->rootNamespace && ! (strpos($action, '\\') === 0)) { + return $this->rootNamespace.'\\'.$action; + } else { + return trim($action, '\\'); + } + } + + /** + * Format the array of URL parameters. + * + * @param mixed|array $parameters + * @return array + */ + public function formatParameters($parameters) + { + $parameters = array_wrap($parameters); + + foreach ($parameters as $key => $parameter) { + if ($parameter instanceof UrlRoutable) { + $parameters[$key] = $parameter->getRouteKey(); + } + } + + return $parameters; + } + + /** + * Extract the query string from the given path. + * + * @param string $path + * @return array + */ + protected function extractQueryString($path) + { + if (($queryPosition = strpos($path, '?')) !== false) { + return [ + substr($path, 0, $queryPosition), + substr($path, $queryPosition), + ]; + } + + return [$path, '']; + } + + /** + * Get the base URL for the request. + * + * @param string $scheme + * @param string $root + * @return string + */ + public function formatRoot($scheme, $root = null) + { + if (is_null($root)) { + if (is_null($this->cachedRoot)) { + $this->cachedRoot = $this->forcedRoot ?: $this->request->root(); + } + + $root = $this->cachedRoot; + } + + $start = Str::startsWith($root, 'http://') ? 'http://' : 'https://'; + + return preg_replace('~'.$start.'~', $scheme, $root, 1); + } + + /** + * Format the given URL segments into a single URL. + * + * @param string $root + * @param string $path + * @return string + */ + public function format($root, $path) + { + $path = '/'.trim($path, '/'); + + if ($this->formatHostUsing) { + $root = call_user_func($this->formatHostUsing, $root); + } + + if ($this->formatPathUsing) { + $path = call_user_func($this->formatPathUsing, $path); + } + + return trim($root.$path, '/'); + } + + /** + * Determine if the given path is a valid URL. + * + * @param string $path + * @return bool + */ + public function isValidUrl($path) + { + if (! preg_match('~^(#|//|https?://|mailto:|tel:)~', $path)) { + return filter_var($path, FILTER_VALIDATE_URL) !== false; + } + + return true; + } + + /** + * Get the Route URL generator instance. + * + * @return \Illuminate\Routing\RouteUrlGenerator + */ + protected function routeUrl() + { + if (! $this->routeGenerator) { + $this->routeGenerator = new RouteUrlGenerator($this, $this->request); + } + + return $this->routeGenerator; + } + + /** + * Set the default named parameters used by the URL generator. + * + * @param array $defaults + * @return void + */ + public function defaults(array $defaults) + { + $this->routeUrl()->defaults($defaults); + } + + /** + * Force the scheme for URLs. + * + * @param string $schema + * @return void + */ + public function forceScheme($schema) + { + $this->cachedSchema = null; + + $this->forceScheme = $schema.'://'; + } + + /** + * Set the forced root URL. + * + * @param string $root + * @return void + */ + public function forceRootUrl($root) + { + $this->forcedRoot = rtrim($root, '/'); + + $this->cachedRoot = null; + } + + /** + * Set a callback to be used to format the host of generated URLs. + * + * @param \Closure $callback + * @return $this + */ + public function formatHostUsing(Closure $callback) + { + $this->formatHostUsing = $callback; + + return $this; + } + + /** + * Set a callback to be used to format the path of generated URLs. + * + * @param \Closure $callback + * @return $this + */ + public function formatPathUsing(Closure $callback) + { + $this->formatPathUsing = $callback; + + return $this; + } + + /** + * Get the path formatter being used by the URL generator. + * + * @return \Closure + */ + public function pathFormatter() + { + return $this->formatPathUsing ?: function ($path) { + return $path; + }; + } + + /** + * Get the request instance. + * + * @return \Illuminate\Http\Request + */ + public function getRequest() + { + return $this->request; + } + + /** + * Set the current request instance. + * + * @param \Illuminate\Http\Request $request + * @return void + */ + public function setRequest(Request $request) + { + $this->request = $request; + + $this->cachedRoot = null; + $this->cachedSchema = null; + $this->routeGenerator = null; + } + + /** + * Set the route collection. + * + * @param \Illuminate\Routing\RouteCollection $routes + * @return $this + */ + public function setRoutes(RouteCollection $routes) + { + $this->routes = $routes; + + return $this; + } + + /** + * Get the session implementation from the resolver. + * + * @return \Illuminate\Session\Store|null + */ + protected function getSession() + { + if ($this->sessionResolver) { + return call_user_func($this->sessionResolver); + } + } + + /** + * Set the session resolver for the generator. + * + * @param callable $sessionResolver + * @return $this + */ + public function setSessionResolver(callable $sessionResolver) + { + $this->sessionResolver = $sessionResolver; + + return $this; + } + + /** + * Set the root controller namespace. + * + * @param string $rootNamespace + * @return $this + */ + public function setRootControllerNamespace($rootNamespace) + { + $this->rootNamespace = $rootNamespace; + + return $this; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Routing/composer.json b/vendor/laravel/framework/src/Illuminate/Routing/composer.json new file mode 100644 index 0000000..39bfc2f --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Routing/composer.json @@ -0,0 +1,47 @@ +{ + "name": "illuminate/routing", + "description": "The Illuminate Routing package.", + "license": "MIT", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "require": { + "php": ">=5.6.4", + "illuminate/container": "5.4.*", + "illuminate/contracts": "5.4.*", + "illuminate/http": "5.4.*", + "illuminate/pipeline": "5.4.*", + "illuminate/session": "5.4.*", + "illuminate/support": "5.4.*", + "symfony/debug": "~3.2", + "symfony/http-foundation": "~3.2", + "symfony/http-kernel": "~3.2", + "symfony/routing": "~3.2" + }, + "autoload": { + "psr-4": { + "Illuminate\\Routing\\": "" + } + }, + "extra": { + "branch-alias": { + "dev-master": "5.4-dev" + } + }, + "suggest": { + "illuminate/console": "Required to use the make commands (5.4.*).", + "symfony/psr-http-message-bridge": "Required to psr7 bridging features (0.2.*)." + }, + "config": { + "sort-packages": true + }, + "minimum-stability": "dev" +} diff --git a/vendor/laravel/framework/src/Illuminate/Session/CacheBasedSessionHandler.php b/vendor/laravel/framework/src/Illuminate/Session/CacheBasedSessionHandler.php new file mode 100755 index 0000000..a2990bd --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Session/CacheBasedSessionHandler.php @@ -0,0 +1,94 @@ +cache = $cache; + $this->minutes = $minutes; + } + + /** + * {@inheritdoc} + */ + public function open($savePath, $sessionName) + { + return true; + } + + /** + * {@inheritdoc} + */ + public function close() + { + return true; + } + + /** + * {@inheritdoc} + */ + public function read($sessionId) + { + return $this->cache->get($sessionId, ''); + } + + /** + * {@inheritdoc} + */ + public function write($sessionId, $data) + { + return $this->cache->put($sessionId, $data, $this->minutes); + } + + /** + * {@inheritdoc} + */ + public function destroy($sessionId) + { + return $this->cache->forget($sessionId); + } + + /** + * {@inheritdoc} + */ + public function gc($lifetime) + { + return true; + } + + /** + * Get the underlying cache repository. + * + * @return \Illuminate\Contracts\Cache\Repository + */ + public function getCache() + { + return $this->cache; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Session/Console/SessionTableCommand.php b/vendor/laravel/framework/src/Illuminate/Session/Console/SessionTableCommand.php new file mode 100644 index 0000000..d8f2903 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Session/Console/SessionTableCommand.php @@ -0,0 +1,81 @@ +files = $files; + $this->composer = $composer; + } + + /** + * Execute the console command. + * + * @return void + */ + public function fire() + { + $fullPath = $this->createBaseMigration(); + + $this->files->put($fullPath, $this->files->get(__DIR__.'/stubs/database.stub')); + + $this->info('Migration created successfully!'); + + $this->composer->dumpAutoloads(); + } + + /** + * Create a base migration file for the session. + * + * @return string + */ + protected function createBaseMigration() + { + $name = 'create_sessions_table'; + + $path = $this->laravel->databasePath().'/migrations'; + + return $this->laravel['migration.creator']->create($name, $path); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Session/Console/stubs/database.stub b/vendor/laravel/framework/src/Illuminate/Session/Console/stubs/database.stub new file mode 100755 index 0000000..c213297 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Session/Console/stubs/database.stub @@ -0,0 +1,35 @@ +string('id')->unique(); + $table->unsignedInteger('user_id')->nullable(); + $table->string('ip_address', 45)->nullable(); + $table->text('user_agent')->nullable(); + $table->text('payload'); + $table->integer('last_activity'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('sessions'); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Session/CookieSessionHandler.php b/vendor/laravel/framework/src/Illuminate/Session/CookieSessionHandler.php new file mode 100755 index 0000000..95b7bcc --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Session/CookieSessionHandler.php @@ -0,0 +1,119 @@ +cookie = $cookie; + $this->minutes = $minutes; + } + + /** + * {@inheritdoc} + */ + public function open($savePath, $sessionName) + { + return true; + } + + /** + * {@inheritdoc} + */ + public function close() + { + return true; + } + + /** + * {@inheritdoc} + */ + public function read($sessionId) + { + $value = $this->request->cookies->get($sessionId) ?: ''; + + if (! is_null($decoded = json_decode($value, true)) && is_array($decoded)) { + if (isset($decoded['expires']) && Carbon::now()->getTimestamp() <= $decoded['expires']) { + return $decoded['data']; + } + } + + return ''; + } + + /** + * {@inheritdoc} + */ + public function write($sessionId, $data) + { + $this->cookie->queue($sessionId, json_encode([ + 'data' => $data, + 'expires' => Carbon::now()->addMinutes($this->minutes)->getTimestamp(), + ]), $this->minutes); + + return true; + } + + /** + * {@inheritdoc} + */ + public function destroy($sessionId) + { + $this->cookie->queue($this->cookie->forget($sessionId)); + + return true; + } + + /** + * {@inheritdoc} + */ + public function gc($lifetime) + { + return true; + } + + /** + * Set the request instance. + * + * @param \Symfony\Component\HttpFoundation\Request $request + * @return void + */ + public function setRequest(Request $request) + { + $this->request = $request; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Session/DatabaseSessionHandler.php b/vendor/laravel/framework/src/Illuminate/Session/DatabaseSessionHandler.php new file mode 100644 index 0000000..dd4bf22 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Session/DatabaseSessionHandler.php @@ -0,0 +1,289 @@ +table = $table; + $this->minutes = $minutes; + $this->container = $container; + $this->connection = $connection; + } + + /** + * {@inheritdoc} + */ + public function open($savePath, $sessionName) + { + return true; + } + + /** + * {@inheritdoc} + */ + public function close() + { + return true; + } + + /** + * {@inheritdoc} + */ + public function read($sessionId) + { + $session = (object) $this->getQuery()->find($sessionId); + + if ($this->expired($session)) { + $this->exists = true; + + return; + } + + if (isset($session->payload)) { + $this->exists = true; + + return base64_decode($session->payload); + } + } + + /** + * Determine if the session is expired. + * + * @param \stdClass $session + * @return bool + */ + protected function expired($session) + { + return isset($session->last_activity) && + $session->last_activity < Carbon::now()->subMinutes($this->minutes)->getTimestamp(); + } + + /** + * {@inheritdoc} + */ + public function write($sessionId, $data) + { + $payload = $this->getDefaultPayload($data); + + if (! $this->exists) { + $this->read($sessionId); + } + + if ($this->exists) { + $this->performUpdate($sessionId, $payload); + } else { + $this->performInsert($sessionId, $payload); + } + + return $this->exists = true; + } + + /** + * Perform an insert operation on the session ID. + * + * @param string $sessionId + * @param string $payload + * @return void + */ + protected function performInsert($sessionId, $payload) + { + try { + return $this->getQuery()->insert(Arr::set($payload, 'id', $sessionId)); + } catch (QueryException $e) { + $this->performUpdate($sessionId, $payload); + } + } + + /** + * Perform an update operation on the session ID. + * + * @param string $sessionId + * @param string $payload + * @return int + */ + protected function performUpdate($sessionId, $payload) + { + return $this->getQuery()->where('id', $sessionId)->update($payload); + } + + /** + * Get the default payload for the session. + * + * @param string $data + * @return array + */ + protected function getDefaultPayload($data) + { + $payload = [ + 'payload' => base64_encode($data), + 'last_activity' => Carbon::now()->getTimestamp(), + ]; + + if (! $this->container) { + return $payload; + } + + return tap($payload, function (&$payload) { + $this->addUserInformation($payload) + ->addRequestInformation($payload); + }); + } + + /** + * Add the user information to the session payload. + * + * @param array $payload + * @return $this + */ + protected function addUserInformation(&$payload) + { + if ($this->container->bound(Guard::class)) { + $payload['user_id'] = $this->userId(); + } + + return $this; + } + + /** + * Get the currently authenticated user's ID. + * + * @return mixed + */ + protected function userId() + { + return $this->container->make(Guard::class)->id(); + } + + /** + * Add the request information to the session payload. + * + * @param array $payload + * @return $this + */ + protected function addRequestInformation(&$payload) + { + if ($this->container->bound('request')) { + $payload = array_merge($payload, [ + 'ip_address' => $this->ipAddress(), + 'user_agent' => $this->userAgent(), + ]); + } + + return $this; + } + + /** + * Get the IP address for the current request. + * + * @return string + */ + protected function ipAddress() + { + return $this->container->make('request')->ip(); + } + + /** + * Get the user agent for the current request. + * + * @return string + */ + protected function userAgent() + { + return substr((string) $this->container->make('request')->header('User-Agent'), 0, 500); + } + + /** + * {@inheritdoc} + */ + public function destroy($sessionId) + { + $this->getQuery()->where('id', $sessionId)->delete(); + + return true; + } + + /** + * {@inheritdoc} + */ + public function gc($lifetime) + { + $this->getQuery()->where('last_activity', '<=', Carbon::now()->getTimestamp() - $lifetime)->delete(); + } + + /** + * Get a fresh query builder instance for the table. + * + * @return \Illuminate\Database\Query\Builder + */ + protected function getQuery() + { + return $this->connection->table($this->table); + } + + /** + * Set the existence state for the session. + * + * @param bool $value + * @return $this + */ + public function setExists($value) + { + $this->exists = $value; + + return $this; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Session/EncryptedStore.php b/vendor/laravel/framework/src/Illuminate/Session/EncryptedStore.php new file mode 100644 index 0000000..078d13f --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Session/EncryptedStore.php @@ -0,0 +1,69 @@ +encrypter = $encrypter; + + parent::__construct($name, $handler, $id); + } + + /** + * Prepare the raw string data from the session for unserialization. + * + * @param string $data + * @return string + */ + protected function prepareForUnserialize($data) + { + try { + return $this->encrypter->decrypt($data); + } catch (DecryptException $e) { + return serialize([]); + } + } + + /** + * Prepare the serialized session data for storage. + * + * @param string $data + * @return string + */ + protected function prepareForStorage($data) + { + return $this->encrypter->encrypt($data); + } + + /** + * Get the encrypter instance. + * + * @return \Illuminate\Contracts\Encryption\Encrypter + */ + public function getEncrypter() + { + return $this->encrypter; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Session/ExistenceAwareInterface.php b/vendor/laravel/framework/src/Illuminate/Session/ExistenceAwareInterface.php new file mode 100644 index 0000000..4a6bd98 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Session/ExistenceAwareInterface.php @@ -0,0 +1,14 @@ +path = $path; + $this->files = $files; + $this->minutes = $minutes; + } + + /** + * {@inheritdoc} + */ + public function open($savePath, $sessionName) + { + return true; + } + + /** + * {@inheritdoc} + */ + public function close() + { + return true; + } + + /** + * {@inheritdoc} + */ + public function read($sessionId) + { + if ($this->files->exists($path = $this->path.'/'.$sessionId)) { + if (filemtime($path) >= Carbon::now()->subMinutes($this->minutes)->getTimestamp()) { + return $this->files->get($path, true); + } + } + + return ''; + } + + /** + * {@inheritdoc} + */ + public function write($sessionId, $data) + { + $this->files->put($this->path.'/'.$sessionId, $data, true); + + return true; + } + + /** + * {@inheritdoc} + */ + public function destroy($sessionId) + { + $this->files->delete($this->path.'/'.$sessionId); + + return true; + } + + /** + * {@inheritdoc} + */ + public function gc($lifetime) + { + $files = Finder::create() + ->in($this->path) + ->files() + ->ignoreDotFiles(true) + ->date('<= now - '.$lifetime.' seconds'); + + foreach ($files as $file) { + $this->files->delete($file->getRealPath()); + } + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Session/Middleware/AuthenticateSession.php b/vendor/laravel/framework/src/Illuminate/Session/Middleware/AuthenticateSession.php new file mode 100644 index 0000000..d93c38c --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Session/Middleware/AuthenticateSession.php @@ -0,0 +1,92 @@ +auth = $auth; + } + + /** + * Handle an incoming request. + * + * @param \Illuminate\Http\Request $request + * @param \Closure $next + * @return mixed + */ + public function handle($request, Closure $next) + { + if (! $request->user() || ! $request->session()) { + return $next($request); + } + + if (! $request->session()->has('password_hash') && $this->auth->viaRemember()) { + $this->logout($request); + } + + if (! $request->session()->has('password_hash')) { + $this->storePasswordHashInSession($request); + } + + if ($request->session()->get('password_hash') !== $request->user()->getAuthPassword()) { + $this->logout($request); + } + + return tap($next($request), function () use ($request) { + $this->storePasswordHashInSession($request); + }); + } + + /** + * Store the user's current password hash in the session. + * + * @param \Illuminate\Http\Request $request + * @return void + */ + protected function storePasswordHashInSession($request) + { + if (! $request->user()) { + return; + } + + $request->session()->put([ + 'password_hash' => $request->user()->getAuthPassword(), + ]); + } + + /** + * Log the user out of the application. + * + * @param \Illuminate\Http\Request $request + * @return void + * + * @throws \Illuminate\Auth\AuthenticationException + */ + protected function logout($request) + { + $this->auth->logout(); + + $request->session()->flush(); + + throw new AuthenticationException; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php b/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php new file mode 100644 index 0000000..d501890 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php @@ -0,0 +1,243 @@ +manager = $manager; + } + + /** + * Handle an incoming request. + * + * @param \Illuminate\Http\Request $request + * @param \Closure $next + * @return mixed + */ + public function handle($request, Closure $next) + { + $this->sessionHandled = true; + + // If a session driver has been configured, we will need to start the session here + // so that the data is ready for an application. Note that the Laravel sessions + // do not make use of PHP "native" sessions in any way since they are crappy. + if ($this->sessionConfigured()) { + $request->setLaravelSession( + $session = $this->startSession($request) + ); + + $this->collectGarbage($session); + } + + $response = $next($request); + + // Again, if the session has been configured we will need to close out the session + // so that the attributes may be persisted to some storage medium. We will also + // add the session identifier cookie to the application response headers now. + if ($this->sessionConfigured()) { + $this->storeCurrentUrl($request, $session); + + $this->addCookieToResponse($response, $session); + } + + return $response; + } + + /** + * Perform any final actions for the request lifecycle. + * + * @param \Illuminate\Http\Request $request + * @param \Symfony\Component\HttpFoundation\Response $response + * @return void + */ + public function terminate($request, $response) + { + if ($this->sessionHandled && $this->sessionConfigured() && ! $this->usingCookieSessions()) { + $this->manager->driver()->save(); + } + } + + /** + * Start the session for the given request. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Contracts\Session\Session + */ + protected function startSession(Request $request) + { + return tap($this->getSession($request), function ($session) use ($request) { + $session->setRequestOnHandler($request); + + $session->start(); + }); + } + + /** + * Get the session implementation from the manager. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Contracts\Session\Session + */ + public function getSession(Request $request) + { + return tap($this->manager->driver(), function ($session) use ($request) { + $session->setId($request->cookies->get($session->getName())); + }); + } + + /** + * Remove the garbage from the session if necessary. + * + * @param \Illuminate\Contracts\Session\Session $session + * @return void + */ + protected function collectGarbage(Session $session) + { + $config = $this->manager->getSessionConfig(); + + // Here we will see if this request hits the garbage collection lottery by hitting + // the odds needed to perform garbage collection on any given request. If we do + // hit it, we'll call this handler to let it delete all the expired sessions. + if ($this->configHitsLottery($config)) { + $session->getHandler()->gc($this->getSessionLifetimeInSeconds()); + } + } + + /** + * Determine if the configuration odds hit the lottery. + * + * @param array $config + * @return bool + */ + protected function configHitsLottery(array $config) + { + return random_int(1, $config['lottery'][1]) <= $config['lottery'][0]; + } + + /** + * Store the current URL for the request if necessary. + * + * @param \Illuminate\Http\Request $request + * @param \Illuminate\Contracts\Session\Session $session + * @return void + */ + protected function storeCurrentUrl(Request $request, $session) + { + if ($request->method() === 'GET' && $request->route() && ! $request->ajax()) { + $session->setPreviousUrl($request->fullUrl()); + } + } + + /** + * Add the session cookie to the application response. + * + * @param \Symfony\Component\HttpFoundation\Response $response + * @param \Illuminate\Contracts\Session\Session $session + * @return void + */ + protected function addCookieToResponse(Response $response, Session $session) + { + if ($this->usingCookieSessions()) { + $this->manager->driver()->save(); + } + + if ($this->sessionIsPersistent($config = $this->manager->getSessionConfig())) { + $response->headers->setCookie(new Cookie( + $session->getName(), $session->getId(), $this->getCookieExpirationDate(), + $config['path'], $config['domain'], Arr::get($config, 'secure', false), + Arr::get($config, 'http_only', true) + )); + } + } + + /** + * Get the session lifetime in seconds. + * + * @return int + */ + protected function getSessionLifetimeInSeconds() + { + return Arr::get($this->manager->getSessionConfig(), 'lifetime') * 60; + } + + /** + * Get the cookie lifetime in seconds. + * + * @return \DateTimeInterface + */ + protected function getCookieExpirationDate() + { + $config = $this->manager->getSessionConfig(); + + return $config['expire_on_close'] ? 0 : Carbon::now()->addMinutes($config['lifetime']); + } + + /** + * Determine if a session driver has been configured. + * + * @return bool + */ + protected function sessionConfigured() + { + return ! is_null(Arr::get($this->manager->getSessionConfig(), 'driver')); + } + + /** + * Determine if the configured session driver is persistent. + * + * @param array|null $config + * @return bool + */ + protected function sessionIsPersistent(array $config = null) + { + $config = $config ?: $this->manager->getSessionConfig(); + + return ! in_array($config['driver'], [null, 'array']); + } + + /** + * Determine if the session is using cookie sessions. + * + * @return bool + */ + protected function usingCookieSessions() + { + if ($this->sessionConfigured()) { + return $this->manager->driver()->getHandler() instanceof CookieSessionHandler; + } + + return false; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Session/SessionManager.php b/vendor/laravel/framework/src/Illuminate/Session/SessionManager.php new file mode 100755 index 0000000..f8ad802 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Session/SessionManager.php @@ -0,0 +1,216 @@ +buildSession(parent::callCustomCreator($driver)); + } + + /** + * Create an instance of the "array" session driver. + * + * @return \Illuminate\Session\Store + */ + protected function createArrayDriver() + { + return $this->buildSession(new NullSessionHandler); + } + + /** + * Create an instance of the "cookie" session driver. + * + * @return \Illuminate\Session\Store + */ + protected function createCookieDriver() + { + return $this->buildSession(new CookieSessionHandler( + $this->app['cookie'], $this->app['config']['session.lifetime'] + )); + } + + /** + * Create an instance of the file session driver. + * + * @return \Illuminate\Session\Store + */ + protected function createFileDriver() + { + return $this->createNativeDriver(); + } + + /** + * Create an instance of the file session driver. + * + * @return \Illuminate\Session\Store + */ + protected function createNativeDriver() + { + $lifetime = $this->app['config']['session.lifetime']; + + return $this->buildSession(new FileSessionHandler( + $this->app['files'], $this->app['config']['session.files'], $lifetime + )); + } + + /** + * Create an instance of the database session driver. + * + * @return \Illuminate\Session\Store + */ + protected function createDatabaseDriver() + { + $table = $this->app['config']['session.table']; + + $lifetime = $this->app['config']['session.lifetime']; + + return $this->buildSession(new DatabaseSessionHandler( + $this->getDatabaseConnection(), $table, $lifetime, $this->app + )); + } + + /** + * Get the database connection for the database driver. + * + * @return \Illuminate\Database\Connection + */ + protected function getDatabaseConnection() + { + $connection = $this->app['config']['session.connection']; + + return $this->app['db']->connection($connection); + } + + /** + * Create an instance of the APC session driver. + * + * @return \Illuminate\Session\Store + */ + protected function createApcDriver() + { + return $this->createCacheBased('apc'); + } + + /** + * Create an instance of the Memcached session driver. + * + * @return \Illuminate\Session\Store + */ + protected function createMemcachedDriver() + { + return $this->createCacheBased('memcached'); + } + + /** + * Create an instance of the Redis session driver. + * + * @return \Illuminate\Session\Store + */ + protected function createRedisDriver() + { + $handler = $this->createCacheHandler('redis'); + + $handler->getCache()->getStore()->setConnection( + $this->app['config']['session.connection'] + ); + + return $this->buildSession($handler); + } + + /** + * Create an instance of a cache driven driver. + * + * @param string $driver + * @return \Illuminate\Session\Store + */ + protected function createCacheBased($driver) + { + return $this->buildSession($this->createCacheHandler($driver)); + } + + /** + * Create the cache based session handler instance. + * + * @param string $driver + * @return \Illuminate\Session\CacheBasedSessionHandler + */ + protected function createCacheHandler($driver) + { + $store = $this->app['config']->get('session.store') ?: $driver; + + return new CacheBasedSessionHandler( + clone $this->app['cache']->store($store), + $this->app['config']['session.lifetime'] + ); + } + + /** + * Build the session instance. + * + * @param \SessionHandlerInterface $handler + * @return \Illuminate\Session\Store + */ + protected function buildSession($handler) + { + if ($this->app['config']['session.encrypt']) { + return $this->buildEncryptedSession($handler); + } else { + return new Store($this->app['config']['session.cookie'], $handler); + } + } + + /** + * Build the encrypted session instance. + * + * @param \SessionHandlerInterface $handler + * @return \Illuminate\Session\EncryptedStore + */ + protected function buildEncryptedSession($handler) + { + return new EncryptedStore( + $this->app['config']['session.cookie'], $handler, $this->app['encrypter'] + ); + } + + /** + * Get the session configuration. + * + * @return array + */ + public function getSessionConfig() + { + return $this->app['config']['session']; + } + + /** + * Get the default session driver name. + * + * @return string + */ + public function getDefaultDriver() + { + return $this->app['config']['session.driver']; + } + + /** + * Set the default session driver name. + * + * @param string $name + * @return void + */ + public function setDefaultDriver($name) + { + $this->app['config']['session.driver'] = $name; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Session/SessionServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Session/SessionServiceProvider.php new file mode 100755 index 0000000..c858506 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Session/SessionServiceProvider.php @@ -0,0 +1,50 @@ +registerSessionManager(); + + $this->registerSessionDriver(); + + $this->app->singleton(StartSession::class); + } + + /** + * Register the session manager instance. + * + * @return void + */ + protected function registerSessionManager() + { + $this->app->singleton('session', function ($app) { + return new SessionManager($app); + }); + } + + /** + * Register the session driver instance. + * + * @return void + */ + protected function registerSessionDriver() + { + $this->app->singleton('session.store', function ($app) { + // First, we will create the session manager which is responsible for the + // creation of the various session drivers when they are needed by the + // application instance, and will resolve them on a lazy load basis. + return $app->make('session')->driver(); + }); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Session/Store.php b/vendor/laravel/framework/src/Illuminate/Session/Store.php new file mode 100755 index 0000000..bf00202 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Session/Store.php @@ -0,0 +1,656 @@ +setId($id); + $this->name = $name; + $this->handler = $handler; + } + + /** + * Start the session, reading the data from a handler. + * + * @return bool + */ + public function start() + { + $this->loadSession(); + + if (! $this->has('_token')) { + $this->regenerateToken(); + } + + return $this->started = true; + } + + /** + * Load the session data from the handler. + * + * @return void + */ + protected function loadSession() + { + $this->attributes = array_merge($this->attributes, $this->readFromHandler()); + } + + /** + * Read the session data from the handler. + * + * @return array + */ + protected function readFromHandler() + { + if ($data = $this->handler->read($this->getId())) { + $data = @unserialize($this->prepareForUnserialize($data)); + + if ($data !== false && ! is_null($data) && is_array($data)) { + return $data; + } + } + + return []; + } + + /** + * Prepare the raw string data from the session for unserialization. + * + * @param string $data + * @return string + */ + protected function prepareForUnserialize($data) + { + return $data; + } + + /** + * Save the session data to storage. + * + * @return bool + */ + public function save() + { + $this->ageFlashData(); + + $this->handler->write($this->getId(), $this->prepareForStorage( + serialize($this->attributes) + )); + + $this->started = false; + } + + /** + * Prepare the serialized session data for storage. + * + * @param string $data + * @return string + */ + protected function prepareForStorage($data) + { + return $data; + } + + /** + * Age the flash data for the session. + * + * @return void + */ + public function ageFlashData() + { + $this->forget($this->get('_flash.old', [])); + + $this->put('_flash.old', $this->get('_flash.new', [])); + + $this->put('_flash.new', []); + } + + /** + * Get all of the session data. + * + * @return array + */ + public function all() + { + return $this->attributes; + } + + /** + * Checks if a key exists. + * + * @param string|array $key + * @return bool + */ + public function exists($key) + { + return ! collect(is_array($key) ? $key : func_get_args())->contains(function ($key) { + return ! Arr::exists($this->attributes, $key); + }); + } + + /** + * Checks if a key is present and not null. + * + * @param string|array $key + * @return bool + */ + public function has($key) + { + return ! collect(is_array($key) ? $key : func_get_args())->contains(function ($key) { + return is_null($this->get($key)); + }); + } + + /** + * Get an item from the session. + * + * @param string $key + * @param mixed $default + * @return mixed + */ + public function get($key, $default = null) + { + return Arr::get($this->attributes, $key, $default); + } + + /** + * Get the value of a given key and then forget it. + * + * @param string $key + * @param string $default + * @return mixed + */ + public function pull($key, $default = null) + { + return Arr::pull($this->attributes, $key, $default); + } + + /** + * Determine if the session contains old input. + * + * @param string $key + * @return bool + */ + public function hasOldInput($key = null) + { + $old = $this->getOldInput($key); + + return is_null($key) ? count($old) > 0 : ! is_null($old); + } + + /** + * Get the requested item from the flashed input array. + * + * @param string $key + * @param mixed $default + * @return mixed + */ + public function getOldInput($key = null, $default = null) + { + return Arr::get($this->get('_old_input', []), $key, $default); + } + + /** + * Replace the given session attributes entirely. + * + * @param array $attributes + * @return void + */ + public function replace(array $attributes) + { + $this->put($attributes); + } + + /** + * Put a key / value pair or array of key / value pairs in the session. + * + * @param string|array $key + * @param mixed $value + * @return void + */ + public function put($key, $value = null) + { + if (! is_array($key)) { + $key = [$key => $value]; + } + + foreach ($key as $arrayKey => $arrayValue) { + Arr::set($this->attributes, $arrayKey, $arrayValue); + } + } + + /** + * Get an item from the session, or store the default value. + * + * @param string $key + * @param \Closure $callback + * @return mixed + */ + public function remember($key, Closure $callback) + { + if (! is_null($value = $this->get($key))) { + return $value; + } + + return tap($callback(), function ($value) use ($key) { + $this->put($key, $value); + }); + } + + /** + * Push a value onto a session array. + * + * @param string $key + * @param mixed $value + * @return void + */ + public function push($key, $value) + { + $array = $this->get($key, []); + + $array[] = $value; + + $this->put($key, $array); + } + + /** + * Increment the value of an item in the session. + * + * @param string $key + * @param int $amount + * @return mixed + */ + public function increment($key, $amount = 1) + { + $this->put($key, $value = $this->get($key, 0) + $amount); + + return $value; + } + + /** + * Decrement the value of an item in the session. + * + * @param string $key + * @param int $amount + * @return int + */ + public function decrement($key, $amount = 1) + { + return $this->increment($key, $amount * -1); + } + + /** + * Flash a key / value pair to the session. + * + * @param string $key + * @param mixed $value + * @return void + */ + public function flash($key, $value) + { + $this->put($key, $value); + + $this->push('_flash.new', $key); + + $this->removeFromOldFlashData([$key]); + } + + /** + * Flash a key / value pair to the session for immediate use. + * + * @param string $key + * @param mixed $value + * @return void + */ + public function now($key, $value) + { + $this->put($key, $value); + + $this->push('_flash.old', $key); + } + + /** + * Reflash all of the session flash data. + * + * @return void + */ + public function reflash() + { + $this->mergeNewFlashes($this->get('_flash.old', [])); + + $this->put('_flash.old', []); + } + + /** + * Reflash a subset of the current flash data. + * + * @param array|mixed $keys + * @return void + */ + public function keep($keys = null) + { + $this->mergeNewFlashes($keys = is_array($keys) ? $keys : func_get_args()); + + $this->removeFromOldFlashData($keys); + } + + /** + * Merge new flash keys into the new flash array. + * + * @param array $keys + * @return void + */ + protected function mergeNewFlashes(array $keys) + { + $values = array_unique(array_merge($this->get('_flash.new', []), $keys)); + + $this->put('_flash.new', $values); + } + + /** + * Remove the given keys from the old flash data. + * + * @param array $keys + * @return void + */ + protected function removeFromOldFlashData(array $keys) + { + $this->put('_flash.old', array_diff($this->get('_flash.old', []), $keys)); + } + + /** + * Flash an input array to the session. + * + * @param array $value + * @return void + */ + public function flashInput(array $value) + { + $this->flash('_old_input', $value); + } + + /** + * Remove an item from the session, returning its value. + * + * @param string $key + * @return mixed + */ + public function remove($key) + { + return Arr::pull($this->attributes, $key); + } + + /** + * Remove one or many items from the session. + * + * @param string|array $keys + * @return void + */ + public function forget($keys) + { + Arr::forget($this->attributes, $keys); + } + + /** + * Remove all of the items from the session. + * + * @return void + */ + public function flush() + { + $this->attributes = []; + } + + /** + * Flush the session data and regenerate the ID. + * + * @return bool + */ + public function invalidate() + { + $this->flush(); + + return $this->migrate(true); + } + + /** + * Generate a new session identifier. + * + * @param bool $destroy + * @return bool + */ + public function regenerate($destroy = false) + { + return $this->migrate($destroy); + } + + /** + * Generate a new session ID for the session. + * + * @param bool $destroy + * @return bool + */ + public function migrate($destroy = false) + { + if ($destroy) { + $this->handler->destroy($this->getId()); + } + + $this->setExists(false); + + $this->setId($this->generateSessionId()); + + return true; + } + + /** + * Determine if the session has been started. + * + * @return bool + */ + public function isStarted() + { + return $this->started; + } + + /** + * Get the name of the session. + * + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Set the name of the session. + * + * @param string $name + * @return void + */ + public function setName($name) + { + $this->name = $name; + } + + /** + * Get the current session ID. + * + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Set the session ID. + * + * @param string $id + * @return void + */ + public function setId($id) + { + $this->id = $this->isValidId($id) ? $id : $this->generateSessionId(); + } + + /** + * Determine if this is a valid session ID. + * + * @param string $id + * @return bool + */ + public function isValidId($id) + { + return is_string($id) && ctype_alnum($id) && strlen($id) === 40; + } + + /** + * Get a new, random session ID. + * + * @return string + */ + protected function generateSessionId() + { + return Str::random(40); + } + + /** + * Set the existence of the session on the handler if applicable. + * + * @param bool $value + * @return void + */ + public function setExists($value) + { + if ($this->handler instanceof ExistenceAwareInterface) { + $this->handler->setExists($value); + } + } + + /** + * Get the CSRF token value. + * + * @return string + */ + public function token() + { + return $this->get('_token'); + } + + /** + * Regenerate the CSRF token value. + * + * @return void + */ + public function regenerateToken() + { + $this->put('_token', Str::random(40)); + } + + /** + * Get the previous URL from the session. + * + * @return string|null + */ + public function previousUrl() + { + return $this->get('_previous.url'); + } + + /** + * Set the "previous" URL in the session. + * + * @param string $url + * @return void + */ + public function setPreviousUrl($url) + { + $this->put('_previous.url', $url); + } + + /** + * Get the underlying session handler implementation. + * + * @return \SessionHandlerInterface + */ + public function getHandler() + { + return $this->handler; + } + + /** + * Determine if the session handler needs a request. + * + * @return bool + */ + public function handlerNeedsRequest() + { + return $this->handler instanceof CookieSessionHandler; + } + + /** + * Set the request on the handler instance. + * + * @param \Illuminate\Http\Request $request + * @return void + */ + public function setRequestOnHandler($request) + { + if ($this->handlerNeedsRequest()) { + $this->handler->setRequest($request); + } + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Session/TokenMismatchException.php b/vendor/laravel/framework/src/Illuminate/Session/TokenMismatchException.php new file mode 100755 index 0000000..98d99a1 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Session/TokenMismatchException.php @@ -0,0 +1,10 @@ +=5.6.4", + "illuminate/contracts": "5.4.*", + "illuminate/filesystem": "5.4.*", + "illuminate/support": "5.4.*", + "nesbot/carbon": "~1.20", + "symfony/finder": "~3.2", + "symfony/http-foundation": "~3.2" + }, + "autoload": { + "psr-4": { + "Illuminate\\Session\\": "" + } + }, + "extra": { + "branch-alias": { + "dev-master": "5.4-dev" + } + }, + "suggest": { + "illuminate/console": "Required to use the session:table command (5.4.*)." + }, + "config": { + "sort-packages": true + }, + "minimum-stability": "dev" +} diff --git a/vendor/laravel/framework/src/Illuminate/Support/AggregateServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Support/AggregateServiceProvider.php new file mode 100644 index 0000000..d7425c5 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Support/AggregateServiceProvider.php @@ -0,0 +1,52 @@ +instances = []; + + foreach ($this->providers as $provider) { + $this->instances[] = $this->app->register($provider); + } + } + + /** + * Get the services provided by the provider. + * + * @return array + */ + public function provides() + { + $provides = []; + + foreach ($this->providers as $provider) { + $instance = $this->app->resolveProvider($provider); + + $provides = array_merge($provides, $instance->provides()); + } + + return $provides; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Support/Arr.php b/vendor/laravel/framework/src/Illuminate/Support/Arr.php new file mode 100755 index 0000000..5f5302d --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Support/Arr.php @@ -0,0 +1,530 @@ +all(); + } elseif (! is_array($values)) { + continue; + } + + $results = array_merge($results, $values); + } + + return $results; + } + + /** + * Divide an array into two arrays. One with keys and the other with values. + * + * @param array $array + * @return array + */ + public static function divide($array) + { + return [array_keys($array), array_values($array)]; + } + + /** + * Flatten a multi-dimensional associative array with dots. + * + * @param array $array + * @param string $prepend + * @return array + */ + public static function dot($array, $prepend = '') + { + $results = []; + + foreach ($array as $key => $value) { + if (is_array($value) && ! empty($value)) { + $results = array_merge($results, static::dot($value, $prepend.$key.'.')); + } else { + $results[$prepend.$key] = $value; + } + } + + return $results; + } + + /** + * Get all of the given array except for a specified array of items. + * + * @param array $array + * @param array|string $keys + * @return array + */ + public static function except($array, $keys) + { + static::forget($array, $keys); + + return $array; + } + + /** + * Determine if the given key exists in the provided array. + * + * @param \ArrayAccess|array $array + * @param string|int $key + * @return bool + */ + public static function exists($array, $key) + { + if ($array instanceof ArrayAccess) { + return $array->offsetExists($key); + } + + return array_key_exists($key, $array); + } + + /** + * Return the first element in an array passing a given truth test. + * + * @param array $array + * @param callable|null $callback + * @param mixed $default + * @return mixed + */ + public static function first($array, callable $callback = null, $default = null) + { + if (is_null($callback)) { + if (empty($array)) { + return value($default); + } + + foreach ($array as $item) { + return $item; + } + } + + foreach ($array as $key => $value) { + if (call_user_func($callback, $value, $key)) { + return $value; + } + } + + return value($default); + } + + /** + * Return the last element in an array passing a given truth test. + * + * @param array $array + * @param callable|null $callback + * @param mixed $default + * @return mixed + */ + public static function last($array, callable $callback = null, $default = null) + { + if (is_null($callback)) { + return empty($array) ? value($default) : end($array); + } + + return static::first(array_reverse($array, true), $callback, $default); + } + + /** + * Flatten a multi-dimensional array into a single level. + * + * @param array $array + * @param int $depth + * @return array + */ + public static function flatten($array, $depth = INF) + { + return array_reduce($array, function ($result, $item) use ($depth) { + $item = $item instanceof Collection ? $item->all() : $item; + + if (! is_array($item)) { + return array_merge($result, [$item]); + } elseif ($depth === 1) { + return array_merge($result, array_values($item)); + } else { + return array_merge($result, static::flatten($item, $depth - 1)); + } + }, []); + } + + /** + * Remove one or many array items from a given array using "dot" notation. + * + * @param array $array + * @param array|string $keys + * @return void + */ + public static function forget(&$array, $keys) + { + $original = &$array; + + $keys = (array) $keys; + + if (count($keys) === 0) { + return; + } + + foreach ($keys as $key) { + // if the exact key exists in the top-level, remove it + if (static::exists($array, $key)) { + unset($array[$key]); + + continue; + } + + $parts = explode('.', $key); + + // clean up before each pass + $array = &$original; + + while (count($parts) > 1) { + $part = array_shift($parts); + + if (isset($array[$part]) && is_array($array[$part])) { + $array = &$array[$part]; + } else { + continue 2; + } + } + + unset($array[array_shift($parts)]); + } + } + + /** + * Get an item from an array using "dot" notation. + * + * @param \ArrayAccess|array $array + * @param string $key + * @param mixed $default + * @return mixed + */ + public static function get($array, $key, $default = null) + { + if (! static::accessible($array)) { + return value($default); + } + + if (is_null($key)) { + return $array; + } + + if (static::exists($array, $key)) { + return $array[$key]; + } + + foreach (explode('.', $key) as $segment) { + if (static::accessible($array) && static::exists($array, $segment)) { + $array = $array[$segment]; + } else { + return value($default); + } + } + + return $array; + } + + /** + * Check if an item or items exist in an array using "dot" notation. + * + * @param \ArrayAccess|array $array + * @param string|array $keys + * @return bool + */ + public static function has($array, $keys) + { + if (is_null($keys)) { + return false; + } + + $keys = (array) $keys; + + if (! $array) { + return false; + } + + if ($keys === []) { + return false; + } + + foreach ($keys as $key) { + $subKeyArray = $array; + + if (static::exists($array, $key)) { + continue; + } + + foreach (explode('.', $key) as $segment) { + if (static::accessible($subKeyArray) && static::exists($subKeyArray, $segment)) { + $subKeyArray = $subKeyArray[$segment]; + } else { + return false; + } + } + } + + return true; + } + + /** + * Determines if an array is associative. + * + * An array is "associative" if it doesn't have sequential numerical keys beginning with zero. + * + * @param array $array + * @return bool + */ + public static function isAssoc(array $array) + { + $keys = array_keys($array); + + return array_keys($keys) !== $keys; + } + + /** + * Get a subset of the items from the given array. + * + * @param array $array + * @param array|string $keys + * @return array + */ + public static function only($array, $keys) + { + return array_intersect_key($array, array_flip((array) $keys)); + } + + /** + * Pluck an array of values from an array. + * + * @param array $array + * @param string|array $value + * @param string|array|null $key + * @return array + */ + public static function pluck($array, $value, $key = null) + { + $results = []; + + list($value, $key) = static::explodePluckParameters($value, $key); + + foreach ($array as $item) { + $itemValue = data_get($item, $value); + + // If the key is "null", we will just append the value to the array and keep + // looping. Otherwise we will key the array using the value of the key we + // received from the developer. Then we'll return the final array form. + if (is_null($key)) { + $results[] = $itemValue; + } else { + $itemKey = data_get($item, $key); + + $results[$itemKey] = $itemValue; + } + } + + return $results; + } + + /** + * Explode the "value" and "key" arguments passed to "pluck". + * + * @param string|array $value + * @param string|array|null $key + * @return array + */ + protected static function explodePluckParameters($value, $key) + { + $value = is_string($value) ? explode('.', $value) : $value; + + $key = is_null($key) || is_array($key) ? $key : explode('.', $key); + + return [$value, $key]; + } + + /** + * Push an item onto the beginning of an array. + * + * @param array $array + * @param mixed $value + * @param mixed $key + * @return array + */ + public static function prepend($array, $value, $key = null) + { + if (is_null($key)) { + array_unshift($array, $value); + } else { + $array = [$key => $value] + $array; + } + + return $array; + } + + /** + * Get a value from the array, and remove it. + * + * @param array $array + * @param string $key + * @param mixed $default + * @return mixed + */ + public static function pull(&$array, $key, $default = null) + { + $value = static::get($array, $key, $default); + + static::forget($array, $key); + + return $value; + } + + /** + * Set an array item to a given value using "dot" notation. + * + * If no key is given to the method, the entire array will be replaced. + * + * @param array $array + * @param string $key + * @param mixed $value + * @return array + */ + public static function set(&$array, $key, $value) + { + if (is_null($key)) { + return $array = $value; + } + + $keys = explode('.', $key); + + while (count($keys) > 1) { + $key = array_shift($keys); + + // If the key doesn't exist at this depth, we will just create an empty array + // to hold the next value, allowing us to create the arrays to hold final + // values at the correct depth. Then we'll keep digging into the array. + if (! isset($array[$key]) || ! is_array($array[$key])) { + $array[$key] = []; + } + + $array = &$array[$key]; + } + + $array[array_shift($keys)] = $value; + + return $array; + } + + /** + * Shuffle the given array and return the result. + * + * @param array $array + * @return array + */ + public static function shuffle($array) + { + shuffle($array); + + return $array; + } + + /** + * Sort the array using the given callback or "dot" notation. + * + * @param array $array + * @param callable|string $callback + * @return array + */ + public static function sort($array, $callback) + { + return Collection::make($array)->sortBy($callback)->all(); + } + + /** + * Recursively sort an array by keys and values. + * + * @param array $array + * @return array + */ + public static function sortRecursive($array) + { + foreach ($array as &$value) { + if (is_array($value)) { + $value = static::sortRecursive($value); + } + } + + if (static::isAssoc($array)) { + ksort($array); + } else { + sort($array); + } + + return $array; + } + + /** + * Filter the array using the given callback. + * + * @param array $array + * @param callable $callback + * @return array + */ + public static function where($array, callable $callback) + { + return array_filter($array, $callback, ARRAY_FILTER_USE_BOTH); + } + + /** + * If the given value is not an array, wrap it in one. + * + * @param mixed $value + * @return array + */ + public static function wrap($value) + { + return ! is_array($value) ? [$value] : $value; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Support/Collection.php b/vendor/laravel/framework/src/Illuminate/Support/Collection.php new file mode 100644 index 0000000..f978c52 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Support/Collection.php @@ -0,0 +1,1550 @@ +items = $this->getArrayableItems($items); + } + + /** + * Create a new collection instance if the value isn't one already. + * + * @param mixed $items + * @return static + */ + public static function make($items = []) + { + return new static($items); + } + + /** + * Create a new collection by invoking the callback a given amount of times. + * + * @param int $amount + * @param callable $callback + * @return static + */ + public static function times($amount, callable $callback) + { + if ($amount < 1) { + return new static; + } + + return (new static(range(1, $amount)))->map($callback); + } + + /** + * Get all of the items in the collection. + * + * @return array + */ + public function all() + { + return $this->items; + } + + /** + * Get the average value of a given key. + * + * @param callable|string|null $callback + * @return mixed + */ + public function avg($callback = null) + { + if ($count = $this->count()) { + return $this->sum($callback) / $count; + } + } + + /** + * Alias for the "avg" method. + * + * @param callable|string|null $callback + * @return mixed + */ + public function average($callback = null) + { + return $this->avg($callback); + } + + /** + * Get the median of a given key. + * + * @param null $key + * @return mixed + */ + public function median($key = null) + { + $count = $this->count(); + + if ($count == 0) { + return; + } + + $values = with(isset($key) ? $this->pluck($key) : $this) + ->sort()->values(); + + $middle = (int) ($count / 2); + + if ($count % 2) { + return $values->get($middle); + } + + return (new static([ + $values->get($middle - 1), $values->get($middle), + ]))->average(); + } + + /** + * Get the mode of a given key. + * + * @param mixed $key + * @return array|null + */ + public function mode($key = null) + { + $count = $this->count(); + + if ($count == 0) { + return; + } + + $collection = isset($key) ? $this->pluck($key) : $this; + + $counts = new self; + + $collection->each(function ($value) use ($counts) { + $counts[$value] = isset($counts[$value]) ? $counts[$value] + 1 : 1; + }); + + $sorted = $counts->sort(); + + $highestValue = $sorted->last(); + + return $sorted->filter(function ($value) use ($highestValue) { + return $value == $highestValue; + })->sort()->keys()->all(); + } + + /** + * Collapse the collection of items into a single array. + * + * @return static + */ + public function collapse() + { + return new static(Arr::collapse($this->items)); + } + + /** + * Determine if an item exists in the collection. + * + * @param mixed $key + * @param mixed $operator + * @param mixed $value + * @return bool + */ + public function contains($key, $operator = null, $value = null) + { + if (func_num_args() == 1) { + if ($this->useAsCallable($key)) { + return ! is_null($this->first($key)); + } + + return in_array($key, $this->items); + } + + if (func_num_args() == 2) { + $value = $operator; + + $operator = '='; + } + + return $this->contains($this->operatorForWhere($key, $operator, $value)); + } + + /** + * Determine if an item exists in the collection using strict comparison. + * + * @param mixed $key + * @param mixed $value + * @return bool + */ + public function containsStrict($key, $value = null) + { + if (func_num_args() == 2) { + return $this->contains(function ($item) use ($key, $value) { + return data_get($item, $key) === $value; + }); + } + + if ($this->useAsCallable($key)) { + return ! is_null($this->first($key)); + } + + return in_array($key, $this->items, true); + } + + /** + * Get the items in the collection that are not present in the given items. + * + * @param mixed $items + * @return static + */ + public function diff($items) + { + return new static(array_diff($this->items, $this->getArrayableItems($items))); + } + + /** + * Get the items in the collection whose keys are not present in the given items. + * + * @param mixed $items + * @return static + */ + public function diffKeys($items) + { + return new static(array_diff_key($this->items, $this->getArrayableItems($items))); + } + + /** + * Execute a callback over each item. + * + * @param callable $callback + * @return $this + */ + public function each(callable $callback) + { + foreach ($this->items as $key => $item) { + if ($callback($item, $key) === false) { + break; + } + } + + return $this; + } + + /** + * Determine if all items in the collection pass the given test. + * + * @param string|callable $key + * @param mixed $operator + * @param mixed $value + * @return bool + */ + public function every($key, $operator = null, $value = null) + { + if (func_num_args() == 1) { + $callback = $this->valueRetriever($key); + + foreach ($this->items as $k => $v) { + if (! $callback($v, $k)) { + return false; + } + } + + return true; + } + + if (func_num_args() == 2) { + $value = $operator; + + $operator = '='; + } + + return $this->every($this->operatorForWhere($key, $operator, $value)); + } + + /** + * Get all items except for those with the specified keys. + * + * @param mixed $keys + * @return static + */ + public function except($keys) + { + $keys = is_array($keys) ? $keys : func_get_args(); + + return new static(Arr::except($this->items, $keys)); + } + + /** + * Run a filter over each of the items. + * + * @param callable|null $callback + * @return static + */ + public function filter(callable $callback = null) + { + if ($callback) { + return new static(Arr::where($this->items, $callback)); + } + + return new static(array_filter($this->items)); + } + + /** + * Apply the callback if the value is truthy. + * + * @param bool $value + * @param callable $callback + * @param callable $default + * @return mixed + */ + public function when($value, callable $callback, callable $default = null) + { + if ($value) { + return $callback($this); + } elseif ($default) { + return $default($this); + } + + return $this; + } + + /** + * Filter items by the given key value pair. + * + * @param string $key + * @param mixed $operator + * @param mixed $value + * @return static + */ + public function where($key, $operator, $value = null) + { + if (func_num_args() == 2) { + $value = $operator; + + $operator = '='; + } + + return $this->filter($this->operatorForWhere($key, $operator, $value)); + } + + /** + * Get an operator checker callback. + * + * @param string $key + * @param string $operator + * @param mixed $value + * @return \Closure + */ + protected function operatorForWhere($key, $operator, $value) + { + return function ($item) use ($key, $operator, $value) { + $retrieved = data_get($item, $key); + + switch ($operator) { + default: + case '=': + case '==': return $retrieved == $value; + case '!=': + case '<>': return $retrieved != $value; + case '<': return $retrieved < $value; + case '>': return $retrieved > $value; + case '<=': return $retrieved <= $value; + case '>=': return $retrieved >= $value; + case '===': return $retrieved === $value; + case '!==': return $retrieved !== $value; + } + }; + } + + /** + * Filter items by the given key value pair using strict comparison. + * + * @param string $key + * @param mixed $value + * @return static + */ + public function whereStrict($key, $value) + { + return $this->where($key, '===', $value); + } + + /** + * Filter items by the given key value pair. + * + * @param string $key + * @param mixed $values + * @param bool $strict + * @return static + */ + public function whereIn($key, $values, $strict = false) + { + $values = $this->getArrayableItems($values); + + return $this->filter(function ($item) use ($key, $values, $strict) { + return in_array(data_get($item, $key), $values, $strict); + }); + } + + /** + * Filter items by the given key value pair using strict comparison. + * + * @param string $key + * @param mixed $values + * @return static + */ + public function whereInStrict($key, $values) + { + return $this->whereIn($key, $values, true); + } + + /** + * Filter items by the given key value pair. + * + * @param string $key + * @param mixed $values + * @param bool $strict + * @return static + */ + public function whereNotIn($key, $values, $strict = false) + { + $values = $this->getArrayableItems($values); + + return $this->reject(function ($item) use ($key, $values, $strict) { + return in_array(data_get($item, $key), $values, $strict); + }); + } + + /** + * Filter items by the given key value pair using strict comparison. + * + * @param string $key + * @param mixed $values + * @return static + */ + public function whereNotInStrict($key, $values) + { + return $this->whereNotIn($key, $values, true); + } + + /** + * Get the first item from the collection. + * + * @param callable|null $callback + * @param mixed $default + * @return mixed + */ + public function first(callable $callback = null, $default = null) + { + return Arr::first($this->items, $callback, $default); + } + + /** + * Get a flattened array of the items in the collection. + * + * @param int $depth + * @return static + */ + public function flatten($depth = INF) + { + return new static(Arr::flatten($this->items, $depth)); + } + + /** + * Flip the items in the collection. + * + * @return static + */ + public function flip() + { + return new static(array_flip($this->items)); + } + + /** + * Remove an item from the collection by key. + * + * @param string|array $keys + * @return $this + */ + public function forget($keys) + { + foreach ((array) $keys as $key) { + $this->offsetUnset($key); + } + + return $this; + } + + /** + * Get an item from the collection by key. + * + * @param mixed $key + * @param mixed $default + * @return mixed + */ + public function get($key, $default = null) + { + if ($this->offsetExists($key)) { + return $this->items[$key]; + } + + return value($default); + } + + /** + * Group an associative array by a field or using a callback. + * + * @param callable|string $groupBy + * @param bool $preserveKeys + * @return static + */ + public function groupBy($groupBy, $preserveKeys = false) + { + $groupBy = $this->valueRetriever($groupBy); + + $results = []; + + foreach ($this->items as $key => $value) { + $groupKeys = $groupBy($value, $key); + + if (! is_array($groupKeys)) { + $groupKeys = [$groupKeys]; + } + + foreach ($groupKeys as $groupKey) { + $groupKey = is_bool($groupKey) ? (int) $groupKey : $groupKey; + + if (! array_key_exists($groupKey, $results)) { + $results[$groupKey] = new static; + } + + $results[$groupKey]->offsetSet($preserveKeys ? $key : null, $value); + } + } + + return new static($results); + } + + /** + * Key an associative array by a field or using a callback. + * + * @param callable|string $keyBy + * @return static + */ + public function keyBy($keyBy) + { + $keyBy = $this->valueRetriever($keyBy); + + $results = []; + + foreach ($this->items as $key => $item) { + $resolvedKey = $keyBy($item, $key); + + if (is_object($resolvedKey)) { + $resolvedKey = (string) $resolvedKey; + } + + $results[$resolvedKey] = $item; + } + + return new static($results); + } + + /** + * Determine if an item exists in the collection by key. + * + * @param mixed $key + * @return bool + */ + public function has($key) + { + return $this->offsetExists($key); + } + + /** + * Concatenate values of a given key as a string. + * + * @param string $value + * @param string $glue + * @return string + */ + public function implode($value, $glue = null) + { + $first = $this->first(); + + if (is_array($first) || is_object($first)) { + return implode($glue, $this->pluck($value)->all()); + } + + return implode($value, $this->items); + } + + /** + * Intersect the collection with the given items. + * + * @param mixed $items + * @return static + */ + public function intersect($items) + { + return new static(array_intersect($this->items, $this->getArrayableItems($items))); + } + + /** + * Determine if the collection is empty or not. + * + * @return bool + */ + public function isEmpty() + { + return empty($this->items); + } + + /** + * Determine if the collection is not empty. + * + * @return bool + */ + public function isNotEmpty() + { + return ! $this->isEmpty(); + } + + /** + * Determine if the given value is callable, but not a string. + * + * @param mixed $value + * @return bool + */ + protected function useAsCallable($value) + { + return ! is_string($value) && is_callable($value); + } + + /** + * Get the keys of the collection items. + * + * @return static + */ + public function keys() + { + return new static(array_keys($this->items)); + } + + /** + * Get the last item from the collection. + * + * @param callable|null $callback + * @param mixed $default + * @return mixed + */ + public function last(callable $callback = null, $default = null) + { + return Arr::last($this->items, $callback, $default); + } + + /** + * Get the values of a given key. + * + * @param string|array $value + * @param string|null $key + * @return static + */ + public function pluck($value, $key = null) + { + return new static(Arr::pluck($this->items, $value, $key)); + } + + /** + * Run a map over each of the items. + * + * @param callable $callback + * @return static + */ + public function map(callable $callback) + { + $keys = array_keys($this->items); + + $items = array_map($callback, $this->items, $keys); + + return new static(array_combine($keys, $items)); + } + + /** + * Run an associative map over each of the items. + * + * The callback should return an associative array with a single key/value pair. + * + * @param callable $callback + * @return static + */ + public function mapWithKeys(callable $callback) + { + $result = []; + + foreach ($this->items as $key => $value) { + $assoc = $callback($value, $key); + + foreach ($assoc as $mapKey => $mapValue) { + $result[$mapKey] = $mapValue; + } + } + + return new static($result); + } + + /** + * Map a collection and flatten the result by a single level. + * + * @param callable $callback + * @return static + */ + public function flatMap(callable $callback) + { + return $this->map($callback)->collapse(); + } + + /** + * Get the max value of a given key. + * + * @param callable|string|null $callback + * @return mixed + */ + public function max($callback = null) + { + $callback = $this->valueRetriever($callback); + + return $this->filter(function ($value) { + return ! is_null($value); + })->reduce(function ($result, $item) use ($callback) { + $value = $callback($item); + + return is_null($result) || $value > $result ? $value : $result; + }); + } + + /** + * Merge the collection with the given items. + * + * @param mixed $items + * @return static + */ + public function merge($items) + { + return new static(array_merge($this->items, $this->getArrayableItems($items))); + } + + /** + * Create a collection by using this collection for keys and another for its values. + * + * @param mixed $values + * @return static + */ + public function combine($values) + { + return new static(array_combine($this->all(), $this->getArrayableItems($values))); + } + + /** + * Union the collection with the given items. + * + * @param mixed $items + * @return static + */ + public function union($items) + { + return new static($this->items + $this->getArrayableItems($items)); + } + + /** + * Get the min value of a given key. + * + * @param callable|string|null $callback + * @return mixed + */ + public function min($callback = null) + { + $callback = $this->valueRetriever($callback); + + return $this->filter(function ($value) { + return ! is_null($value); + })->reduce(function ($result, $item) use ($callback) { + $value = $callback($item); + + return is_null($result) || $value < $result ? $value : $result; + }); + } + + /** + * Create a new collection consisting of every n-th element. + * + * @param int $step + * @param int $offset + * @return static + */ + public function nth($step, $offset = 0) + { + $new = []; + + $position = 0; + + foreach ($this->items as $item) { + if ($position % $step === $offset) { + $new[] = $item; + } + + $position++; + } + + return new static($new); + } + + /** + * Get the items with the specified keys. + * + * @param mixed $keys + * @return static + */ + public function only($keys) + { + if (is_null($keys)) { + return new static($this->items); + } + + $keys = is_array($keys) ? $keys : func_get_args(); + + return new static(Arr::only($this->items, $keys)); + } + + /** + * "Paginate" the collection by slicing it into a smaller collection. + * + * @param int $page + * @param int $perPage + * @return static + */ + public function forPage($page, $perPage) + { + return $this->slice(($page - 1) * $perPage, $perPage); + } + + /** + * Partition the collection into two arrays using the given callback or key. + * + * @param callable|string $callback + * @return static + */ + public function partition($callback) + { + $partitions = [new static, new static]; + + $callback = $this->valueRetriever($callback); + + foreach ($this->items as $key => $item) { + $partitions[(int) ! $callback($item)][$key] = $item; + } + + return new static($partitions); + } + + /** + * Pass the collection to the given callback and return the result. + * + * @param callable $callback + * @return mixed + */ + public function pipe(callable $callback) + { + return $callback($this); + } + + /** + * Get and remove the last item from the collection. + * + * @return mixed + */ + public function pop() + { + return array_pop($this->items); + } + + /** + * Push an item onto the beginning of the collection. + * + * @param mixed $value + * @param mixed $key + * @return $this + */ + public function prepend($value, $key = null) + { + $this->items = Arr::prepend($this->items, $value, $key); + + return $this; + } + + /** + * Push an item onto the end of the collection. + * + * @param mixed $value + * @return $this + */ + public function push($value) + { + $this->offsetSet(null, $value); + + return $this; + } + + /** + * Get and remove an item from the collection. + * + * @param mixed $key + * @param mixed $default + * @return mixed + */ + public function pull($key, $default = null) + { + return Arr::pull($this->items, $key, $default); + } + + /** + * Put an item in the collection by key. + * + * @param mixed $key + * @param mixed $value + * @return $this + */ + public function put($key, $value) + { + $this->offsetSet($key, $value); + + return $this; + } + + /** + * Get one or more items randomly from the collection. + * + * @param int|null $amount + * @return mixed + * + * @throws \InvalidArgumentException + */ + public function random($amount = 1) + { + if ($amount > ($count = $this->count())) { + throw new InvalidArgumentException("You requested {$amount} items, but there are only {$count} items in the collection."); + } + + $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))); + } + + /** + * Reduce the collection to a single value. + * + * @param callable $callback + * @param mixed $initial + * @return mixed + */ + public function reduce(callable $callback, $initial = null) + { + return array_reduce($this->items, $callback, $initial); + } + + /** + * Create a collection of all elements that do not pass a given truth test. + * + * @param callable|mixed $callback + * @return static + */ + public function reject($callback) + { + if ($this->useAsCallable($callback)) { + return $this->filter(function ($value, $key) use ($callback) { + return ! $callback($value, $key); + }); + } + + return $this->filter(function ($item) use ($callback) { + return $item != $callback; + }); + } + + /** + * Reverse items order. + * + * @return static + */ + public function reverse() + { + return new static(array_reverse($this->items, true)); + } + + /** + * Search the collection for a given value and return the corresponding key if successful. + * + * @param mixed $value + * @param bool $strict + * @return mixed + */ + public function search($value, $strict = false) + { + if (! $this->useAsCallable($value)) { + return array_search($value, $this->items, $strict); + } + + foreach ($this->items as $key => $item) { + if (call_user_func($value, $item, $key)) { + return $key; + } + } + + return false; + } + + /** + * Get and remove the first item from the collection. + * + * @return mixed + */ + public function shift() + { + return array_shift($this->items); + } + + /** + * Shuffle the items in the collection. + * + * @param int $seed + * @return static + */ + public function shuffle($seed = null) + { + $items = $this->items; + + if (is_null($seed)) { + shuffle($items); + } else { + srand($seed); + + usort($items, function () { + return rand(-1, 1); + }); + } + + return new static($items); + } + + /** + * Slice the underlying collection array. + * + * @param int $offset + * @param int $length + * @return static + */ + public function slice($offset, $length = null) + { + return new static(array_slice($this->items, $offset, $length, true)); + } + + /** + * Split a collection into a certain number of groups. + * + * @param int $numberOfGroups + * @return static + */ + public function split($numberOfGroups) + { + if ($this->isEmpty()) { + return new static; + } + + $groupSize = ceil($this->count() / $numberOfGroups); + + return $this->chunk($groupSize); + } + + /** + * Chunk the underlying collection array. + * + * @param int $size + * @return static + */ + public function chunk($size) + { + if ($size <= 0) { + return new static; + } + + $chunks = []; + + foreach (array_chunk($this->items, $size, true) as $chunk) { + $chunks[] = new static($chunk); + } + + return new static($chunks); + } + + /** + * Sort through each item with a callback. + * + * @param callable|null $callback + * @return static + */ + public function sort(callable $callback = null) + { + $items = $this->items; + + $callback + ? uasort($items, $callback) + : asort($items); + + return new static($items); + } + + /** + * Sort the collection using the given callback. + * + * @param callable|string $callback + * @param int $options + * @param bool $descending + * @return static + */ + public function sortBy($callback, $options = SORT_REGULAR, $descending = false) + { + $results = []; + + $callback = $this->valueRetriever($callback); + + // First we will loop through the items and get the comparator from a callback + // function which we were given. Then, we will sort the returned values and + // and grab the corresponding values for the sorted keys from this array. + foreach ($this->items as $key => $value) { + $results[$key] = $callback($value, $key); + } + + $descending ? arsort($results, $options) + : asort($results, $options); + + // Once we have sorted all of the keys in the array, we will loop through them + // and grab the corresponding model so we can set the underlying items list + // to the sorted version. Then we'll just return the collection instance. + foreach (array_keys($results) as $key) { + $results[$key] = $this->items[$key]; + } + + return new static($results); + } + + /** + * Sort the collection in descending order using the given callback. + * + * @param callable|string $callback + * @param int $options + * @return static + */ + public function sortByDesc($callback, $options = SORT_REGULAR) + { + return $this->sortBy($callback, $options, true); + } + + /** + * Splice a portion of the underlying collection array. + * + * @param int $offset + * @param int|null $length + * @param mixed $replacement + * @return static + */ + public function splice($offset, $length = null, $replacement = []) + { + if (func_num_args() == 1) { + return new static(array_splice($this->items, $offset)); + } + + return new static(array_splice($this->items, $offset, $length, $replacement)); + } + + /** + * Get the sum of the given values. + * + * @param callable|string|null $callback + * @return mixed + */ + public function sum($callback = null) + { + if (is_null($callback)) { + return array_sum($this->items); + } + + $callback = $this->valueRetriever($callback); + + return $this->reduce(function ($result, $item) use ($callback) { + return $result + $callback($item); + }, 0); + } + + /** + * Take the first or last {$limit} items. + * + * @param int $limit + * @return static + */ + public function take($limit) + { + if ($limit < 0) { + return $this->slice($limit, abs($limit)); + } + + return $this->slice(0, $limit); + } + + /** + * Pass the collection to the given callback and then return it. + * + * @param callable $callback + * @return $this + */ + public function tap(callable $callback) + { + $callback(new static($this->items)); + + return $this; + } + + /** + * Transform each item in the collection using a callback. + * + * @param callable $callback + * @return $this + */ + public function transform(callable $callback) + { + $this->items = $this->map($callback)->all(); + + return $this; + } + + /** + * Return only unique items from the collection array. + * + * @param string|callable|null $key + * @param bool $strict + * @return static + */ + public function unique($key = null, $strict = false) + { + if (is_null($key)) { + return new static(array_unique($this->items, SORT_REGULAR)); + } + + $callback = $this->valueRetriever($key); + + $exists = []; + + return $this->reject(function ($item, $key) use ($callback, $strict, &$exists) { + if (in_array($id = $callback($item, $key), $exists, $strict)) { + return true; + } + + $exists[] = $id; + }); + } + + /** + * Return only unique items from the collection array using strict comparison. + * + * @param string|callable|null $key + * @return static + */ + public function uniqueStrict($key = null) + { + return $this->unique($key, true); + } + + /** + * Reset the keys on the underlying array. + * + * @return static + */ + public function values() + { + return new static(array_values($this->items)); + } + + /** + * Get a value retrieving callback. + * + * @param string $value + * @return callable + */ + protected function valueRetriever($value) + { + if ($this->useAsCallable($value)) { + return $value; + } + + return function ($item) use ($value) { + return data_get($item, $value); + }; + } + + /** + * Zip the collection together with one or more arrays. + * + * e.g. new Collection([1, 2, 3])->zip([4, 5, 6]); + * => [[1, 4], [2, 5], [3, 6]] + * + * @param mixed ...$items + * @return static + */ + public function zip($items) + { + $arrayableItems = array_map(function ($items) { + return $this->getArrayableItems($items); + }, func_get_args()); + + $params = array_merge([function () { + return new static(func_get_args()); + }, $this->items], $arrayableItems); + + return new static(call_user_func_array('array_map', $params)); + } + + /** + * Get the collection of items as a plain array. + * + * @return array + */ + public function toArray() + { + return array_map(function ($value) { + return $value instanceof Arrayable ? $value->toArray() : $value; + }, $this->items); + } + + /** + * Convert the object into something JSON serializable. + * + * @return array + */ + public function jsonSerialize() + { + return array_map(function ($value) { + if ($value instanceof JsonSerializable) { + return $value->jsonSerialize(); + } elseif ($value instanceof Jsonable) { + return json_decode($value->toJson(), true); + } elseif ($value instanceof Arrayable) { + return $value->toArray(); + } else { + return $value; + } + }, $this->items); + } + + /** + * Get the collection of items as JSON. + * + * @param int $options + * @return string + */ + public function toJson($options = 0) + { + return json_encode($this->jsonSerialize(), $options); + } + + /** + * Get an iterator for the items. + * + * @return \ArrayIterator + */ + public function getIterator() + { + return new ArrayIterator($this->items); + } + + /** + * Get a CachingIterator instance. + * + * @param int $flags + * @return \CachingIterator + */ + public function getCachingIterator($flags = CachingIterator::CALL_TOSTRING) + { + return new CachingIterator($this->getIterator(), $flags); + } + + /** + * Count the number of items in the collection. + * + * @return int + */ + public function count() + { + return count($this->items); + } + + /** + * Get a base Support collection instance from this collection. + * + * @return \Illuminate\Support\Collection + */ + public function toBase() + { + return new self($this); + } + + /** + * Determine if an item exists at an offset. + * + * @param mixed $key + * @return bool + */ + public function offsetExists($key) + { + return array_key_exists($key, $this->items); + } + + /** + * Get an item at a given offset. + * + * @param mixed $key + * @return mixed + */ + public function offsetGet($key) + { + return $this->items[$key]; + } + + /** + * Set the item at a given offset. + * + * @param mixed $key + * @param mixed $value + * @return void + */ + public function offsetSet($key, $value) + { + if (is_null($key)) { + $this->items[] = $value; + } else { + $this->items[$key] = $value; + } + } + + /** + * Unset the item at a given offset. + * + * @param string $key + * @return void + */ + public function offsetUnset($key) + { + unset($this->items[$key]); + } + + /** + * Convert the collection to its string representation. + * + * @return string + */ + public function __toString() + { + return $this->toJson(); + } + + /** + * Results array of items from Collection or Arrayable. + * + * @param mixed $items + * @return array + */ + protected function getArrayableItems($items) + { + if (is_array($items)) { + return $items; + } elseif ($items instanceof self) { + return $items->all(); + } elseif ($items instanceof Arrayable) { + return $items->toArray(); + } elseif ($items instanceof Jsonable) { + return json_decode($items->toJson(), true); + } elseif ($items instanceof JsonSerializable) { + return $items->jsonSerialize(); + } elseif ($items instanceof Traversable) { + return iterator_to_array($items); + } + + return (array) $items; + } + + /** + * Add a method to the list of proxied methods. + * + * @param string $method + * @return void + */ + public static function proxy($method) + { + static::$proxies[] = $method; + } + + /** + * Dynamically access collection proxies. + * + * @param string $key + * @return mixed + * + * @throws \Exception + */ + public function __get($key) + { + if (! in_array($key, static::$proxies)) { + throw new Exception("Property [{$key}] does not exist on this collection instance."); + } + + return new HigherOrderCollectionProxy($this, $key); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Support/Composer.php b/vendor/laravel/framework/src/Illuminate/Support/Composer.php new file mode 100644 index 0000000..b0eaa92 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Support/Composer.php @@ -0,0 +1,100 @@ +files = $files; + $this->workingPath = $workingPath; + } + + /** + * Regenerate the Composer autoloader files. + * + * @param string $extra + * @return void + */ + public function dumpAutoloads($extra = '') + { + $process = $this->getProcess(); + + $process->setCommandLine(trim($this->findComposer().' dump-autoload '.$extra)); + + $process->run(); + } + + /** + * Regenerate the optimized Composer autoloader files. + * + * @return void + */ + public function dumpOptimized() + { + $this->dumpAutoloads('--optimize'); + } + + /** + * Get the composer command for the environment. + * + * @return string + */ + protected function findComposer() + { + if ($this->files->exists($this->workingPath.'/composer.phar')) { + return ProcessUtils::escapeArgument((new PhpExecutableFinder)->find(false)).' composer.phar'; + } + + return 'composer'; + } + + /** + * Get a new Symfony process instance. + * + * @return \Symfony\Component\Process\Process + */ + protected function getProcess() + { + return (new Process('', $this->workingPath))->setTimeout(null); + } + + /** + * Set the working path used by the class. + * + * @param string $path + * @return $this + */ + public function setWorkingPath($path) + { + $this->workingPath = realpath($path); + + return $this; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Support/Debug/Dumper.php b/vendor/laravel/framework/src/Illuminate/Support/Debug/Dumper.php new file mode 100644 index 0000000..0c84a8b --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Support/Debug/Dumper.php @@ -0,0 +1,26 @@ +dump((new VarCloner)->cloneVar($value)); + } else { + var_dump($value); + } + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Support/Debug/HtmlDumper.php b/vendor/laravel/framework/src/Illuminate/Support/Debug/HtmlDumper.php new file mode 100644 index 0000000..5825ac8 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Support/Debug/HtmlDumper.php @@ -0,0 +1,29 @@ + 'background-color:#fff; color:#222; line-height:1.2em; font-weight:normal; font:12px Monaco, Consolas, monospace; word-wrap: break-word; white-space: pre-wrap; position:relative; z-index:100000', + 'num' => 'color:#a71d5d', + 'const' => 'color:#795da3', + 'str' => 'color:#df5000', + 'cchr' => 'color:#222', + 'note' => 'color:#a71d5d', + 'ref' => 'color:#a0a0a0', + 'public' => 'color:#795da3', + 'protected' => 'color:#795da3', + 'private' => 'color:#795da3', + 'meta' => 'color:#b729d9', + 'key' => 'color:#df5000', + 'index' => 'color:#a71d5d', + ]; +} diff --git a/vendor/laravel/framework/src/Illuminate/Support/Facades/App.php b/vendor/laravel/framework/src/Illuminate/Support/Facades/App.php new file mode 100755 index 0000000..0e9e637 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Support/Facades/App.php @@ -0,0 +1,31 @@ +make('router')->auth(); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Support/Facades/Blade.php b/vendor/laravel/framework/src/Illuminate/Support/Facades/Blade.php new file mode 100755 index 0000000..b016a46 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Support/Facades/Blade.php @@ -0,0 +1,19 @@ +getEngineResolver()->resolve('blade')->getCompiler(); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Support/Facades/Broadcast.php b/vendor/laravel/framework/src/Illuminate/Support/Facades/Broadcast.php new file mode 100644 index 0000000..81af932 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Support/Facades/Broadcast.php @@ -0,0 +1,21 @@ +cookie($key, null)); + } + + /** + * Retrieve a cookie from the request. + * + * @param string $key + * @param mixed $default + * @return string + */ + public static function get($key = null, $default = null) + { + return static::$app['request']->cookie($key, $default); + } + + /** + * Get the registered name of the component. + * + * @return string + */ + protected static function getFacadeAccessor() + { + return 'cookie'; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Support/Facades/Crypt.php b/vendor/laravel/framework/src/Illuminate/Support/Facades/Crypt.php new file mode 100755 index 0000000..0eef08d --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Support/Facades/Crypt.php @@ -0,0 +1,19 @@ +shouldReceive(...func_get_args()); + } + + /** + * Create a fresh mock instance for the given class. + * + * @return \Mockery\Expectation + */ + protected static function createFreshMockInstance() + { + return tap(static::createMock(), function ($mock) { + static::swap($mock); + + $mock->shouldAllowMockingProtectedMethods(); + }); + } + + /** + * Create a fresh mock instance for the given class. + * + * @return \Mockery\MockInterface + */ + protected static function createMock() + { + $class = static::getMockableClass(); + + return $class ? Mockery::mock($class) : Mockery::mock(); + } + + /** + * Determines whether a mock is set as the instance of the facade. + * + * @return bool + */ + protected static function isMock() + { + $name = static::getFacadeAccessor(); + + return isset(static::$resolvedInstance[$name]) && + static::$resolvedInstance[$name] instanceof MockInterface; + } + + /** + * Get the mockable class for the bound instance. + * + * @return string|null + */ + protected static function getMockableClass() + { + if ($root = static::getFacadeRoot()) { + return get_class($root); + } + } + + /** + * Hotswap the underlying instance behind the facade. + * + * @param mixed $instance + * @return void + */ + public static function swap($instance) + { + static::$resolvedInstance[static::getFacadeAccessor()] = $instance; + + if (isset(static::$app)) { + static::$app->instance(static::getFacadeAccessor(), $instance); + } + } + + /** + * Get the root object behind the facade. + * + * @return mixed + */ + public static function getFacadeRoot() + { + return static::resolveFacadeInstance(static::getFacadeAccessor()); + } + + /** + * Get the registered name of the component. + * + * @return string + * + * @throws \RuntimeException + */ + protected static function getFacadeAccessor() + { + throw new RuntimeException('Facade does not implement getFacadeAccessor method.'); + } + + /** + * Resolve the facade root instance from the container. + * + * @param string|object $name + * @return mixed + */ + protected static function resolveFacadeInstance($name) + { + if (is_object($name)) { + return $name; + } + + if (isset(static::$resolvedInstance[$name])) { + return static::$resolvedInstance[$name]; + } + + return static::$resolvedInstance[$name] = static::$app[$name]; + } + + /** + * Clear a resolved facade instance. + * + * @param string $name + * @return void + */ + public static function clearResolvedInstance($name) + { + unset(static::$resolvedInstance[$name]); + } + + /** + * Clear all of the resolved instances. + * + * @return void + */ + public static function clearResolvedInstances() + { + static::$resolvedInstance = []; + } + + /** + * Get the application instance behind the facade. + * + * @return \Illuminate\Contracts\Foundation\Application + */ + public static function getFacadeApplication() + { + return static::$app; + } + + /** + * Set the application instance. + * + * @param \Illuminate\Contracts\Foundation\Application $app + * @return void + */ + public static function setFacadeApplication($app) + { + static::$app = $app; + } + + /** + * Handle dynamic, static calls to the object. + * + * @param string $method + * @param array $args + * @return mixed + * + * @throws \RuntimeException + */ + public static function __callStatic($method, $args) + { + $instance = static::getFacadeRoot(); + + if (! $instance) { + throw new RuntimeException('A facade root has not been set.'); + } + + return $instance->$method(...$args); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Support/Facades/File.php b/vendor/laravel/framework/src/Illuminate/Support/Facades/File.php new file mode 100755 index 0000000..0f81bf6 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Support/Facades/File.php @@ -0,0 +1,19 @@ +input($key, $default); + } + + /** + * Get the registered name of the component. + * + * @return string + */ + protected static function getFacadeAccessor() + { + return 'request'; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Support/Facades/Lang.php b/vendor/laravel/framework/src/Illuminate/Support/Facades/Lang.php new file mode 100755 index 0000000..e5862b9 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Support/Facades/Lang.php @@ -0,0 +1,19 @@ +connection($name)->getSchemaBuilder(); + } + + /** + * Get a schema builder instance for the default connection. + * + * @return \Illuminate\Database\Schema\Builder + */ + protected static function getFacadeAccessor() + { + return static::$app['db']->connection()->getSchemaBuilder(); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Support/Facades/Session.php b/vendor/laravel/framework/src/Illuminate/Support/Facades/Session.php new file mode 100755 index 0000000..bc9b5fd --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Support/Facades/Session.php @@ -0,0 +1,20 @@ +cleanDirectory( + $root = storage_path('framework/testing/disks/'.$disk) + ); + + static::set($disk, self::createLocalDriver(['root' => $root])); + } + + /** + * Get the registered name of the component. + * + * @return string + */ + protected static function getFacadeAccessor() + { + return 'filesystem'; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Support/Facades/URL.php b/vendor/laravel/framework/src/Illuminate/Support/Facades/URL.php new file mode 100755 index 0000000..e17414b --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Support/Facades/URL.php @@ -0,0 +1,19 @@ + $value) { + $this->attributes[$key] = $value; + } + } + + /** + * Get an attribute from the container. + * + * @param string $key + * @param mixed $default + * @return mixed + */ + public function get($key, $default = null) + { + if (array_key_exists($key, $this->attributes)) { + return $this->attributes[$key]; + } + + return value($default); + } + + /** + * Get the attributes from the container. + * + * @return array + */ + public function getAttributes() + { + return $this->attributes; + } + + /** + * Convert the Fluent instance to an array. + * + * @return array + */ + public function toArray() + { + return $this->attributes; + } + + /** + * Convert the object into something JSON serializable. + * + * @return array + */ + public function jsonSerialize() + { + return $this->toArray(); + } + + /** + * Convert the Fluent instance to JSON. + * + * @param int $options + * @return string + */ + public function toJson($options = 0) + { + return json_encode($this->jsonSerialize(), $options); + } + + /** + * Determine if the given offset exists. + * + * @param string $offset + * @return bool + */ + public function offsetExists($offset) + { + return isset($this->{$offset}); + } + + /** + * Get the value for a given offset. + * + * @param string $offset + * @return mixed + */ + public function offsetGet($offset) + { + return $this->{$offset}; + } + + /** + * Set the value at the given offset. + * + * @param string $offset + * @param mixed $value + * @return void + */ + public function offsetSet($offset, $value) + { + $this->{$offset} = $value; + } + + /** + * Unset the value at the given offset. + * + * @param string $offset + * @return void + */ + public function offsetUnset($offset) + { + unset($this->{$offset}); + } + + /** + * Handle dynamic calls to the container to set attributes. + * + * @param string $method + * @param array $parameters + * @return $this + */ + public function __call($method, $parameters) + { + $this->attributes[$method] = count($parameters) > 0 ? $parameters[0] : true; + + return $this; + } + + /** + * Dynamically retrieve the value of an attribute. + * + * @param string $key + * @return mixed + */ + public function __get($key) + { + return $this->get($key); + } + + /** + * Dynamically set the value of an attribute. + * + * @param string $key + * @param mixed $value + * @return void + */ + public function __set($key, $value) + { + $this->attributes[$key] = $value; + } + + /** + * Dynamically check if an attribute is set. + * + * @param string $key + * @return bool + */ + public function __isset($key) + { + return isset($this->attributes[$key]); + } + + /** + * Dynamically unset an attribute. + * + * @param string $key + * @return void + */ + public function __unset($key) + { + unset($this->attributes[$key]); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Support/HigherOrderCollectionProxy.php b/vendor/laravel/framework/src/Illuminate/Support/HigherOrderCollectionProxy.php new file mode 100644 index 0000000..f902431 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Support/HigherOrderCollectionProxy.php @@ -0,0 +1,60 @@ +method = $method; + $this->collection = $collection; + } + + /** + * Proxy accessing an attribute onto the collection items. + * + * @param string $key + * @return mixed + */ + public function __get($key) + { + return $this->collection->{$this->method}(function ($value) use ($key) { + return is_array($value) ? $value[$key] : $value->{$key}; + }); + } + + /** + * Proxy a method call onto the collection items. + * + * @param string $method + * @param array $parameters + * @return mixed + */ + public function __call($method, $parameters) + { + return $this->collection->{$this->method}(function ($value) use ($method, $parameters) { + return $value->{$method}(...$parameters); + }); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Support/HtmlString.php b/vendor/laravel/framework/src/Illuminate/Support/HtmlString.php new file mode 100644 index 0000000..c13adfd --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Support/HtmlString.php @@ -0,0 +1,46 @@ +html = $html; + } + + /** + * Get the HTML string. + * + * @return string + */ + public function toHtml() + { + return $this->html; + } + + /** + * Get the HTML string. + * + * @return string + */ + public function __toString() + { + return $this->toHtml(); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Support/Manager.php b/vendor/laravel/framework/src/Illuminate/Support/Manager.php new file mode 100755 index 0000000..592776c --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Support/Manager.php @@ -0,0 +1,140 @@ +app = $app; + } + + /** + * Get the default driver name. + * + * @return string + */ + abstract public function getDefaultDriver(); + + /** + * Get a driver instance. + * + * @param string $driver + * @return mixed + */ + public function driver($driver = null) + { + $driver = $driver ?: $this->getDefaultDriver(); + + // If the given driver has not been created before, we will create the instances + // here and cache it so we can return it next time very quickly. If there is + // already a driver created by this name, we'll just return that instance. + if (! isset($this->drivers[$driver])) { + $this->drivers[$driver] = $this->createDriver($driver); + } + + return $this->drivers[$driver]; + } + + /** + * Create a new driver instance. + * + * @param string $driver + * @return mixed + * + * @throws \InvalidArgumentException + */ + protected function createDriver($driver) + { + // We'll check to see if a creator method exists for the given driver. If not we + // will check for a custom driver creator, which allows developers to create + // drivers using their own customized driver creator Closure to create it. + if (isset($this->customCreators[$driver])) { + return $this->callCustomCreator($driver); + } else { + $method = 'create'.Str::studly($driver).'Driver'; + + if (method_exists($this, $method)) { + return $this->$method(); + } + } + throw new InvalidArgumentException("Driver [$driver] not supported."); + } + + /** + * Call a custom driver creator. + * + * @param string $driver + * @return mixed + */ + protected function callCustomCreator($driver) + { + return $this->customCreators[$driver]($this->app); + } + + /** + * Register a custom driver creator Closure. + * + * @param string $driver + * @param \Closure $callback + * @return $this + */ + public function extend($driver, Closure $callback) + { + $this->customCreators[$driver] = $callback; + + return $this; + } + + /** + * Get all of the created "drivers". + * + * @return array + */ + public function getDrivers() + { + return $this->drivers; + } + + /** + * Dynamically call the default driver instance. + * + * @param string $method + * @param array $parameters + * @return mixed + */ + public function __call($method, $parameters) + { + return $this->driver()->$method(...$parameters); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Support/MessageBag.php b/vendor/laravel/framework/src/Illuminate/Support/MessageBag.php new file mode 100755 index 0000000..6a49c56 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Support/MessageBag.php @@ -0,0 +1,382 @@ + $value) { + $this->messages[$key] = (array) $value; + } + } + + /** + * Get the keys present in the message bag. + * + * @return array + */ + public function keys() + { + return array_keys($this->messages); + } + + /** + * Add a message to the bag. + * + * @param string $key + * @param string $message + * @return $this + */ + public function add($key, $message) + { + if ($this->isUnique($key, $message)) { + $this->messages[$key][] = $message; + } + + return $this; + } + + /** + * Determine if a key and message combination already exists. + * + * @param string $key + * @param string $message + * @return bool + */ + protected function isUnique($key, $message) + { + $messages = (array) $this->messages; + + return ! isset($messages[$key]) || ! in_array($message, $messages[$key]); + } + + /** + * Merge a new array of messages into the bag. + * + * @param \Illuminate\Contracts\Support\MessageProvider|array $messages + * @return $this + */ + public function merge($messages) + { + if ($messages instanceof MessageProvider) { + $messages = $messages->getMessageBag()->getMessages(); + } + + $this->messages = array_merge_recursive($this->messages, $messages); + + return $this; + } + + /** + * Determine if messages exist for all of the given keys. + * + * @param array|string $key + * @return bool + */ + public function has($key) + { + if (is_null($key)) { + return $this->any(); + } + + $keys = is_array($key) ? $key : func_get_args(); + + foreach ($keys as $key) { + if ($this->first($key) === '') { + return false; + } + } + + return true; + } + + /** + * Determine if messages exist for any of the given keys. + * + * @param array $keys + * @return bool + */ + public function hasAny($keys = []) + { + foreach ($keys as $key) { + if ($this->has($key)) { + return true; + } + } + + return false; + } + + /** + * Get the first message from the bag for a given key. + * + * @param string $key + * @param string $format + * @return string + */ + public function first($key = null, $format = null) + { + $messages = is_null($key) ? $this->all($format) : $this->get($key, $format); + + $firstMessage = Arr::first($messages, null, ''); + + return is_array($firstMessage) ? Arr::first($firstMessage) : $firstMessage; + } + + /** + * Get all of the messages from the bag for a given key. + * + * @param string $key + * @param string $format + * @return array + */ + public function get($key, $format = null) + { + // If the message exists in the container, we will transform it and return + // the message. Otherwise, we'll check if the key is implicit & collect + // all the messages that match a given key and output it as an array. + if (array_key_exists($key, $this->messages)) { + return $this->transform( + $this->messages[$key], $this->checkFormat($format), $key + ); + } + + if (Str::contains($key, '*')) { + return $this->getMessagesForWildcardKey($key, $format); + } + + return []; + } + + /** + * Get the messages for a wildcard key. + * + * @param string $key + * @param string|null $format + * @return array + */ + protected function getMessagesForWildcardKey($key, $format) + { + return collect($this->messages) + ->filter(function ($messages, $messageKey) use ($key) { + return Str::is($key, $messageKey); + }) + ->map(function ($messages, $messageKey) use ($format) { + return $this->transform( + $messages, $this->checkFormat($format), $messageKey + ); + })->all(); + } + + /** + * Get all of the messages for every key in the bag. + * + * @param string $format + * @return array + */ + public function all($format = null) + { + $format = $this->checkFormat($format); + + $all = []; + + foreach ($this->messages as $key => $messages) { + $all = array_merge($all, $this->transform($messages, $format, $key)); + } + + return $all; + } + + /** + * Get all of the unique messages for every key in the bag. + * + * @param string $format + * @return array + */ + public function unique($format = null) + { + return array_unique($this->all($format)); + } + + /** + * Format an array of messages. + * + * @param array $messages + * @param string $format + * @param string $messageKey + * @return array + */ + protected function transform($messages, $format, $messageKey) + { + return collect((array) $messages) + ->map(function ($message) use ($format, $messageKey) { + // We will simply spin through the given messages and transform each one + // replacing the :message place holder with the real message allowing + // the messages to be easily formatted to each developer's desires. + return str_replace([':message', ':key'], [$message, $messageKey], $format); + })->all(); + } + + /** + * Get the appropriate format based on the given format. + * + * @param string $format + * @return string + */ + protected function checkFormat($format) + { + return $format ?: $this->format; + } + + /** + * Get the raw messages in the container. + * + * @return array + */ + public function messages() + { + return $this->messages; + } + + /** + * Get the raw messages in the container. + * + * @return array + */ + public function getMessages() + { + return $this->messages(); + } + + /** + * Get the messages for the instance. + * + * @return \Illuminate\Support\MessageBag + */ + public function getMessageBag() + { + return $this; + } + + /** + * Get the default message format. + * + * @return string + */ + public function getFormat() + { + return $this->format; + } + + /** + * Set the default message format. + * + * @param string $format + * @return \Illuminate\Support\MessageBag + */ + public function setFormat($format = ':message') + { + $this->format = $format; + + return $this; + } + + /** + * Determine if the message bag has any messages. + * + * @return bool + */ + public function isEmpty() + { + return ! $this->any(); + } + + /** + * Determine if the message bag has any messages. + * + * @return bool + */ + public function any() + { + return $this->count() > 0; + } + + /** + * Get the number of messages in the container. + * + * @return int + */ + public function count() + { + return count($this->messages, COUNT_RECURSIVE) - count($this->messages); + } + + /** + * Get the instance as an array. + * + * @return array + */ + public function toArray() + { + return $this->getMessages(); + } + + /** + * Convert the object into something JSON serializable. + * + * @return array + */ + public function jsonSerialize() + { + return $this->toArray(); + } + + /** + * Convert the object to its JSON representation. + * + * @param int $options + * @return string + */ + public function toJson($options = 0) + { + return json_encode($this->jsonSerialize(), $options); + } + + /** + * Convert the message bag to its string representation. + * + * @return string + */ + public function __toString() + { + return $this->toJson(); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Support/NamespacedItemResolver.php b/vendor/laravel/framework/src/Illuminate/Support/NamespacedItemResolver.php new file mode 100755 index 0000000..cdf6cf9 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Support/NamespacedItemResolver.php @@ -0,0 +1,106 @@ +parsed[$key])) { + return $this->parsed[$key]; + } + + // If the key does not contain a double colon, it means the key is not in a + // namespace, and is just a regular configuration item. Namespaces are a + // tool for organizing configuration items for things such as modules. + if (strpos($key, '::') === false) { + $segments = explode('.', $key); + + $parsed = $this->parseBasicSegments($segments); + } else { + $parsed = $this->parseNamespacedSegments($key); + } + + // Once we have the parsed array of this key's elements, such as its groups + // and namespace, we will cache each array inside a simple list that has + // the key and the parsed array for quick look-ups for later requests. + return $this->parsed[$key] = $parsed; + } + + /** + * Parse an array of basic segments. + * + * @param array $segments + * @return array + */ + protected function parseBasicSegments(array $segments) + { + // The first segment in a basic array will always be the group, so we can go + // ahead and grab that segment. If there is only one total segment we are + // just pulling an entire group out of the array and not a single item. + $group = $segments[0]; + + if (count($segments) == 1) { + return [null, $group, null]; + } + + // If there is more than one segment in this group, it means we are pulling + // a specific item out of a group and will need to return this item name + // as well as the group so we know which item to pull from the arrays. + else { + $item = implode('.', array_slice($segments, 1)); + + return [null, $group, $item]; + } + } + + /** + * Parse an array of namespaced segments. + * + * @param string $key + * @return array + */ + protected function parseNamespacedSegments($key) + { + list($namespace, $item) = explode('::', $key); + + // First we'll just explode the first segment to get the namespace and group + // since the item should be in the remaining segments. Once we have these + // two pieces of data we can proceed with parsing out the item's value. + $itemSegments = explode('.', $item); + + $groupAndItem = array_slice( + $this->parseBasicSegments($itemSegments), 1 + ); + + return array_merge([$namespace], $groupAndItem); + } + + /** + * Set the parsed value of a key. + * + * @param string $key + * @param array $parsed + * @return void + */ + public function setParsedKey($key, $parsed) + { + $this->parsed[$key] = $parsed; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Support/Pluralizer.php b/vendor/laravel/framework/src/Illuminate/Support/Pluralizer.php new file mode 100755 index 0000000..fc580c9 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Support/Pluralizer.php @@ -0,0 +1,113 @@ +app = $app; + } + + /** + * Merge the given configuration with the existing configuration. + * + * @param string $path + * @param string $key + * @return void + */ + protected function mergeConfigFrom($path, $key) + { + $config = $this->app['config']->get($key, []); + + $this->app['config']->set($key, array_merge(require $path, $config)); + } + + /** + * Load the given routes file if routes are not already cached. + * + * @param string $path + * @return void + */ + protected function loadRoutesFrom($path) + { + if (! $this->app->routesAreCached()) { + require $path; + } + } + + /** + * Register a view file namespace. + * + * @param string $path + * @param string $namespace + * @return void + */ + protected function loadViewsFrom($path, $namespace) + { + if (is_dir($appPath = $this->app->resourcePath().'/views/vendor/'.$namespace)) { + $this->app['view']->addNamespace($namespace, $appPath); + } + + $this->app['view']->addNamespace($namespace, $path); + } + + /** + * Register a translation file namespace. + * + * @param string $path + * @param string $namespace + * @return void + */ + protected function loadTranslationsFrom($path, $namespace) + { + $this->app['translator']->addNamespace($namespace, $path); + } + + /** + * Register a database migration path. + * + * @param array|string $paths + * @return void + */ + protected function loadMigrationsFrom($paths) + { + $this->app->afterResolving('migrator', function ($migrator) use ($paths) { + foreach ((array) $paths as $path) { + $migrator->path($path); + } + }); + } + + /** + * Register paths to be published by the publish command. + * + * @param array $paths + * @param string $group + * @return void + */ + protected function publishes(array $paths, $group = null) + { + $this->ensurePublishArrayInitialized($class = static::class); + + static::$publishes[$class] = array_merge(static::$publishes[$class], $paths); + + if ($group) { + $this->addPublishGroup($group, $paths); + } + } + + /** + * Ensure the publish array for the service provider is initialized. + * + * @param string $class + * @return void + */ + protected function ensurePublishArrayInitialized($class) + { + if (! array_key_exists($class, static::$publishes)) { + static::$publishes[$class] = []; + } + } + + /** + * Add a publish group / tag to the service provider. + * + * @param string $group + * @param array $paths + * @return void + */ + protected function addPublishGroup($group, $paths) + { + if (! array_key_exists($group, static::$publishGroups)) { + static::$publishGroups[$group] = []; + } + + static::$publishGroups[$group] = array_merge( + static::$publishGroups[$group], $paths + ); + } + + /** + * Get the paths to publish. + * + * @param string $provider + * @param string $group + * @return array + */ + public static function pathsToPublish($provider = null, $group = null) + { + if (! is_null($paths = static::pathsForProviderOrGroup($provider, $group))) { + return $paths; + } + + return collect(static::$publishes)->reduce(function ($paths, $p) { + return array_merge($paths, $p); + }, []); + } + + /** + * Get the paths for the provider or group (or both). + * + * @param string|null $provider + * @param string|null $group + * @return array + */ + protected static function pathsForProviderOrGroup($provider, $group) + { + if ($provider && $group) { + return static::pathsForProviderAndGroup($provider, $group); + } elseif ($group && array_key_exists($group, static::$publishGroups)) { + return static::$publishGroups[$group]; + } elseif ($provider && array_key_exists($provider, static::$publishes)) { + return static::$publishes[$provider]; + } elseif ($group || $provider) { + return []; + } + } + + /** + * Get the paths for the provdider and group. + * + * @param string $provider + * @param string $group + * @return array + */ + protected static function pathsForProviderAndGroup($provider, $group) + { + if (! empty(static::$publishes[$provider]) && ! empty(static::$publishGroups[$group])) { + return array_intersect_key(static::$publishes[$provider], static::$publishGroups[$group]); + } + + return []; + } + + /** + * Register the package's custom Artisan commands. + * + * @param array|mixed $commands + * @return void + */ + public function commands($commands) + { + $commands = is_array($commands) ? $commands : func_get_args(); + + Artisan::starting(function ($artisan) use ($commands) { + $artisan->resolveCommands($commands); + }); + } + + /** + * Get the services provided by the provider. + * + * @return array + */ + public function provides() + { + return []; + } + + /** + * Get the events that trigger this service provider to register. + * + * @return array + */ + public function when() + { + return []; + } + + /** + * Determine if the provider is deferred. + * + * @return bool + */ + public function isDeferred() + { + return $this->defer; + } + + /** + * Get a list of files that should be compiled for the package. + * + * @deprecated + * + * @return array + */ + public static function compiles() + { + return []; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Support/Str.php b/vendor/laravel/framework/src/Illuminate/Support/Str.php new file mode 100644 index 0000000..41a8d60 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Support/Str.php @@ -0,0 +1,601 @@ + $val) { + $value = str_replace($val, $key, $value); + } + + return preg_replace('/[^\x20-\x7E]/u', '', $value); + } + + /** + * Convert a value to camel case. + * + * @param string $value + * @return string + */ + public static function camel($value) + { + if (isset(static::$camelCache[$value])) { + return static::$camelCache[$value]; + } + + return static::$camelCache[$value] = lcfirst(static::studly($value)); + } + + /** + * Determine if a given string contains a given substring. + * + * @param string $haystack + * @param string|array $needles + * @return bool + */ + public static function contains($haystack, $needles) + { + foreach ((array) $needles as $needle) { + if ($needle != '' && mb_strpos($haystack, $needle) !== false) { + return true; + } + } + + return false; + } + + /** + * Determine if a given string ends with a given substring. + * + * @param string $haystack + * @param string|array $needles + * @return bool + */ + public static function endsWith($haystack, $needles) + { + foreach ((array) $needles as $needle) { + if (substr($haystack, -strlen($needle)) === (string) $needle) { + return true; + } + } + + return false; + } + + /** + * Cap a string with a single instance of a given value. + * + * @param string $value + * @param string $cap + * @return string + */ + public static function finish($value, $cap) + { + $quoted = preg_quote($cap, '/'); + + return preg_replace('/(?:'.$quoted.')+$/u', '', $value).$cap; + } + + /** + * Determine if a given string matches a given pattern. + * + * @param string $pattern + * @param string $value + * @return bool + */ + public static function is($pattern, $value) + { + if ($pattern == $value) { + return true; + } + + $pattern = preg_quote($pattern, '#'); + + // Asterisks are translated into zero-or-more regular expression wildcards + // to make it convenient to check if the strings starts with the given + // pattern such as "library/*", making any string check convenient. + $pattern = str_replace('\*', '.*', $pattern); + + return (bool) preg_match('#^'.$pattern.'\z#u', $value); + } + + /** + * Convert a string to kebab case. + * + * @param string $value + * @return string + */ + public static function kebab($value) + { + return static::snake($value, '-'); + } + + /** + * Return the length of the given string. + * + * @param string $value + * @return int + */ + public static function length($value) + { + return mb_strlen($value); + } + + /** + * Limit the number of characters in a string. + * + * @param string $value + * @param int $limit + * @param string $end + * @return string + */ + public static function limit($value, $limit = 100, $end = '...') + { + if (mb_strwidth($value, 'UTF-8') <= $limit) { + return $value; + } + + return rtrim(mb_strimwidth($value, 0, $limit, '', 'UTF-8')).$end; + } + + /** + * Convert the given string to lower-case. + * + * @param string $value + * @return string + */ + public static function lower($value) + { + return mb_strtolower($value, 'UTF-8'); + } + + /** + * Limit the number of words in a string. + * + * @param string $value + * @param int $words + * @param string $end + * @return string + */ + public static function words($value, $words = 100, $end = '...') + { + preg_match('/^\s*+(?:\S++\s*+){1,'.$words.'}/u', $value, $matches); + + if (! isset($matches[0]) || static::length($value) === static::length($matches[0])) { + return $value; + } + + return rtrim($matches[0]).$end; + } + + /** + * Parse a Class@method style callback into class and method. + * + * @param string $callback + * @param string|null $default + * @return array + */ + public static function parseCallback($callback, $default = null) + { + return static::contains($callback, '@') ? explode('@', $callback, 2) : [$callback, $default]; + } + + /** + * Get the plural form of an English word. + * + * @param string $value + * @param int $count + * @return string + */ + public static function plural($value, $count = 2) + { + return Pluralizer::plural($value, $count); + } + + /** + * Generate a more truly "random" alpha-numeric string. + * + * @param int $length + * @return string + */ + public static function random($length = 16) + { + $string = ''; + + while (($len = strlen($string)) < $length) { + $size = $length - $len; + + $bytes = random_bytes($size); + + $string .= substr(str_replace(['/', '+', '='], '', base64_encode($bytes)), 0, $size); + } + + return $string; + } + + /** + * Generate a "random" alpha-numeric string. + * + * Should not be considered sufficient for cryptography, etc. + * + * @deprecated since version 5.3. Use the "random" method directly. + * + * @param int $length + * @return string + */ + public static function quickRandom($length = 16) + { + if (PHP_MAJOR_VERSION > 5) { + return static::random($length); + } + + $pool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; + + return substr(str_shuffle(str_repeat($pool, $length)), 0, $length); + } + + /** + * Replace a given value in the string sequentially with an array. + * + * @param string $search + * @param array $replace + * @param string $subject + * @return string + */ + public static function replaceArray($search, array $replace, $subject) + { + foreach ($replace as $value) { + $subject = static::replaceFirst($search, $value, $subject); + } + + return $subject; + } + + /** + * Replace the first occurrence of a given value in the string. + * + * @param string $search + * @param string $replace + * @param string $subject + * @return string + */ + public static function replaceFirst($search, $replace, $subject) + { + $position = strpos($subject, $search); + + if ($position !== false) { + return substr_replace($subject, $replace, $position, strlen($search)); + } + + return $subject; + } + + /** + * Replace the last occurrence of a given value in the string. + * + * @param string $search + * @param string $replace + * @param string $subject + * @return string + */ + public static function replaceLast($search, $replace, $subject) + { + $position = strrpos($subject, $search); + + if ($position !== false) { + return substr_replace($subject, $replace, $position, strlen($search)); + } + + return $subject; + } + + /** + * Convert the given string to upper-case. + * + * @param string $value + * @return string + */ + public static function upper($value) + { + return mb_strtoupper($value, 'UTF-8'); + } + + /** + * Convert the given string to title case. + * + * @param string $value + * @return string + */ + public static function title($value) + { + return mb_convert_case($value, MB_CASE_TITLE, 'UTF-8'); + } + + /** + * Get the singular form of an English word. + * + * @param string $value + * @return string + */ + public static function singular($value) + { + return Pluralizer::singular($value); + } + + /** + * Generate a URL friendly "slug" from a given string. + * + * @param string $title + * @param string $separator + * @return string + */ + public static function slug($title, $separator = '-') + { + $title = static::ascii($title); + + // Convert all dashes/underscores into separator + $flip = $separator == '-' ? '_' : '-'; + + $title = preg_replace('!['.preg_quote($flip).']+!u', $separator, $title); + + // Remove all characters that are not the separator, letters, numbers, or whitespace. + $title = preg_replace('![^'.preg_quote($separator).'\pL\pN\s]+!u', '', mb_strtolower($title)); + + // Replace all separator characters and whitespace by a single separator + $title = preg_replace('!['.preg_quote($separator).'\s]+!u', $separator, $title); + + return trim($title, $separator); + } + + /** + * Convert a string to snake case. + * + * @param string $value + * @param string $delimiter + * @return string + */ + public static function snake($value, $delimiter = '_') + { + $key = $value; + + if (isset(static::$snakeCache[$key][$delimiter])) { + return static::$snakeCache[$key][$delimiter]; + } + + if (! ctype_lower($value)) { + $value = preg_replace('/\s+/u', '', $value); + + $value = static::lower(preg_replace('/(.)(?=[A-Z])/u', '$1'.$delimiter, $value)); + } + + return static::$snakeCache[$key][$delimiter] = $value; + } + + /** + * Determine if a given string starts with a given substring. + * + * @param string $haystack + * @param string|array $needles + * @return bool + */ + public static function startsWith($haystack, $needles) + { + foreach ((array) $needles as $needle) { + if ($needle != '' && substr($haystack, 0, strlen($needle)) === (string) $needle) { + return true; + } + } + + return false; + } + + /** + * Convert a value to studly caps case. + * + * @param string $value + * @return string + */ + public static function studly($value) + { + $key = $value; + + if (isset(static::$studlyCache[$key])) { + return static::$studlyCache[$key]; + } + + $value = ucwords(str_replace(['-', '_'], ' ', $value)); + + return static::$studlyCache[$key] = str_replace(' ', '', $value); + } + + /** + * Returns the portion of string specified by the start and length parameters. + * + * @param string $string + * @param int $start + * @param int|null $length + * @return string + */ + public static function substr($string, $start, $length = null) + { + return mb_substr($string, $start, $length, 'UTF-8'); + } + + /** + * Make a string's first character uppercase. + * + * @param string $string + * @return string + */ + public static function ucfirst($string) + { + return static::upper(static::substr($string, 0, 1)).static::substr($string, 1); + } + + /** + * Returns the replacements for the ascii method. + * + * Note: Adapted from Stringy\Stringy. + * + * @see https://github.com/danielstjules/Stringy/blob/2.3.1/LICENSE.txt + * + * @return array + */ + protected static function charsArray() + { + static $charsArray; + + if (isset($charsArray)) { + return $charsArray; + } + + return $charsArray = [ + '0' => ['°', 'â‚€', 'Û°'], + '1' => ['¹', 'â‚', 'Û±'], + '2' => ['²', 'â‚‚', 'Û²'], + '3' => ['³', '₃', 'Û³'], + '4' => ['â´', 'â‚„', 'Û´', 'Ù¤'], + '5' => ['âµ', 'â‚…', 'Ûµ', 'Ù¥'], + '6' => ['â¶', '₆', 'Û¶', 'Ù¦'], + '7' => ['â·', '₇', 'Û·'], + '8' => ['â¸', '₈', 'Û¸'], + '9' => ['â¹', '₉', 'Û¹'], + 'a' => ['à', 'á', 'ả', 'ã', 'ạ', 'ă', 'ắ', 'ằ', 'ẳ', 'ẵ', 'ặ', 'â', 'ấ', 'ầ', 'ẩ', 'ẫ', 'ậ', 'Ä', 'Ä…', 'Ã¥', 'α', 'ά', 'á¼€', 'á¼', 'ἂ', 'ἃ', 'ἄ', 'á¼…', 'ἆ', 'ἇ', 'á¾€', 'á¾', 'ᾂ', 'ᾃ', 'ᾄ', 'á¾…', 'ᾆ', 'ᾇ', 'á½°', 'ά', 'á¾°', 'á¾±', 'á¾²', 'á¾³', 'á¾´', 'ᾶ', 'á¾·', 'а', 'Ø£', 'အ', 'ာ', 'ါ', 'Ç»', 'ÇŽ', 'ª', 'áƒ', 'अ', 'ا'], + 'b' => ['б', 'β', 'Ъ', 'Ь', 'ب', 'ဗ', 'ბ'], + 'c' => ['ç', 'ć', 'Ä', 'ĉ', 'Ä‹'], + 'd' => ['Ä', 'ð', 'Ä‘', 'ÆŒ', 'È¡', 'É–', 'É—', 'áµ­', 'á¶', 'ᶑ', 'д', 'δ', 'د', 'ض', 'á€', 'ဒ', 'დ'], + 'e' => ['é', 'è', 'ẻ', 'ẽ', 'ẹ', 'ê', 'ế', 'á»', 'ể', 'á»…', 'ệ', 'ë', 'Ä“', 'Ä™', 'Ä›', 'Ä•', 'Ä—', 'ε', 'έ', 'á¼', 'ἑ', 'á¼’', 'ἓ', 'á¼”', 'ἕ', 'á½²', 'έ', 'е', 'Ñ‘', 'Ñ', 'Ñ”', 'É™', 'ဧ', 'ေ', 'ဲ', 'ე', 'à¤', 'Ø¥', 'ئ'], + 'f' => ['Ñ„', 'φ', 'Ù', 'Æ’', 'ფ'], + 'g' => ['Ä', 'ÄŸ', 'Ä¡', 'Ä£', 'г', 'Ò‘', 'γ', 'ဂ', 'გ', 'Ú¯'], + 'h' => ['Ä¥', 'ħ', 'η', 'ή', 'Ø­', 'Ù‡', 'ဟ', 'ှ', 'ჰ'], + 'i' => ['í', 'ì', 'ỉ', 'Ä©', 'ị', 'î', 'ï', 'Ä«', 'Ä­', 'į', 'ı', 'ι', 'ί', 'ÏŠ', 'Î', 'á¼°', 'á¼±', 'á¼²', 'á¼³', 'á¼´', 'á¼µ', 'ἶ', 'á¼·', 'ὶ', 'ί', 'á¿', 'á¿‘', 'á¿’', 'Î', 'á¿–', 'á¿—', 'Ñ–', 'Ñ—', 'и', 'ဣ', 'ိ', 'ီ', 'ည်', 'Ç', 'ი', 'इ'], + 'j' => ['ĵ', 'ј', 'Ј', 'ჯ', 'ج'], + 'k' => ['Ä·', 'ĸ', 'к', 'κ', 'Ķ', 'Ù‚', 'Ùƒ', 'က', 'კ', 'ქ', 'Ú©'], + 'l' => ['Å‚', 'ľ', 'ĺ', 'ļ', 'Å€', 'л', 'λ', 'Ù„', 'လ', 'ლ'], + 'm' => ['м', 'μ', 'Ù…', 'မ', 'მ'], + 'n' => ['ñ', 'Å„', 'ň', 'ņ', 'ʼn', 'Å‹', 'ν', 'н', 'Ù†', 'န', 'ნ'], + 'o' => ['ó', 'ò', 'á»', 'õ', 'á»', 'ô', 'ố', 'ồ', 'ổ', 'á»—', 'á»™', 'Æ¡', 'á»›', 'á»', 'ở', 'ỡ', 'ợ', 'ø', 'Å', 'Å‘', 'Å', 'ο', 'á½€', 'á½', 'ὂ', 'ὃ', 'ὄ', 'á½…', 'ὸ', 'ÏŒ', 'о', 'Ùˆ', 'θ', 'ို', 'Ç’', 'Ç¿', 'º', 'áƒ', 'ओ'], + 'p' => ['п', 'Ï€', 'ပ', 'პ', 'Ù¾'], + 'q' => ['ყ'], + 'r' => ['Å•', 'Å™', 'Å—', 'Ñ€', 'Ï', 'ر', 'რ'], + 's' => ['Å›', 'Å¡', 'ÅŸ', 'Ñ', 'σ', 'È™', 'Ï‚', 'س', 'ص', 'စ', 'Å¿', 'ს'], + 't' => ['Å¥', 'Å£', 'Ñ‚', 'Ï„', 'È›', 'ت', 'Ø·', 'ဋ', 'á€', 'ŧ', 'თ', 'ტ'], + 'u' => ['ú', 'ù', 'ủ', 'Å©', 'ụ', 'Æ°', 'ứ', 'ừ', 'á»­', 'ữ', 'á»±', 'û', 'Å«', 'ů', 'ű', 'Å­', 'ų', 'µ', 'у', 'ဉ', 'ု', 'ူ', 'Ç”', 'Ç–', 'ǘ', 'Çš', 'Çœ', 'უ', 'उ'], + 'v' => ['в', 'ვ', 'Ï'], + 'w' => ['ŵ', 'ω', 'ÏŽ', 'á€', 'ွ'], + 'x' => ['χ', 'ξ'], + 'y' => ['ý', 'ỳ', 'á»·', 'ỹ', 'ỵ', 'ÿ', 'Å·', 'й', 'Ñ‹', 'Ï…', 'Ï‹', 'Ï', 'ΰ', 'ÙŠ', 'ယ'], + 'z' => ['ź', 'ž', 'ż', 'з', 'ζ', 'ز', 'ဇ', 'ზ'], + 'aa' => ['ع', 'आ', 'Ø¢'], + 'ae' => ['ä', 'æ', 'ǽ'], + 'ai' => ['à¤'], + 'at' => ['@'], + 'ch' => ['ч', 'ჩ', 'ჭ', 'Ú†'], + 'dj' => ['Ñ’', 'Ä‘'], + 'dz' => ['ÑŸ', 'ძ'], + 'ei' => ['à¤'], + 'gh' => ['غ', 'ღ'], + 'ii' => ['ई'], + 'ij' => ['ij'], + 'kh' => ['Ñ…', 'Ø®', 'ხ'], + 'lj' => ['Ñ™'], + 'nj' => ['Ñš'], + 'oe' => ['ö', 'Å“', 'ؤ'], + 'oi' => ['ऑ'], + 'oii' => ['ऒ'], + 'ps' => ['ψ'], + 'sh' => ['ш', 'შ', 'Ø´'], + 'shch' => ['щ'], + 'ss' => ['ß'], + 'sx' => ['Å'], + 'th' => ['þ', 'Ï‘', 'Ø«', 'Ø°', 'ظ'], + 'ts' => ['ц', 'ც', 'წ'], + 'ue' => ['ü'], + 'uu' => ['ऊ'], + 'ya' => ['Ñ'], + 'yu' => ['ÑŽ'], + 'zh' => ['ж', 'ჟ', 'Ú˜'], + '(c)' => ['©'], + 'A' => ['Ã', 'À', 'Ả', 'Ã', 'Ạ', 'Ä‚', 'Ắ', 'Ằ', 'Ẳ', 'Ẵ', 'Ặ', 'Â', 'Ấ', 'Ầ', 'Ẩ', 'Ẫ', 'Ậ', 'Ã…', 'Ä€', 'Ä„', 'Α', 'Ά', 'Ἀ', 'Ἁ', 'Ἂ', 'Ἃ', 'Ἄ', 'á¼', 'Ἆ', 'á¼', 'ᾈ', 'ᾉ', 'ᾊ', 'ᾋ', 'ᾌ', 'á¾', 'ᾎ', 'á¾', 'Ᾰ', 'á¾¹', 'Ὰ', 'Ά', 'á¾¼', 'Ð', 'Ǻ', 'Ç'], + 'B' => ['Б', 'Î’', 'ब'], + 'C' => ['Ç', 'Ć', 'ÄŒ', 'Ĉ', 'ÄŠ'], + 'D' => ['ÄŽ', 'Ã', 'Ä', 'Ɖ', 'ÆŠ', 'Æ‹', 'á´…', 'á´†', 'Д', 'Δ'], + 'E' => ['É', 'È', 'Ẻ', 'Ẽ', 'Ẹ', 'Ê', 'Ế', 'Ề', 'Ể', 'Ễ', 'Ệ', 'Ë', 'Ä’', 'Ę', 'Äš', 'Ä”', 'Ä–', 'Ε', 'Έ', 'Ἐ', 'á¼™', 'Ἒ', 'á¼›', 'Ἔ', 'á¼', 'Έ', 'Ὲ', 'Е', 'Ð', 'Э', 'Є', 'Æ'], + 'F' => ['Ф', 'Φ'], + 'G' => ['Äž', 'Ä ', 'Ä¢', 'Г', 'Ò', 'Γ'], + 'H' => ['Η', 'Ή', 'Ħ'], + 'I' => ['Ã', 'ÃŒ', 'Ỉ', 'Ĩ', 'Ị', 'ÃŽ', 'Ã', 'Ī', 'Ĭ', 'Ä®', 'Ä°', 'Ι', 'Ί', 'Ϊ', 'Ἰ', 'á¼¹', 'á¼»', 'á¼¼', 'á¼½', 'á¼¾', 'Ἷ', 'Ῐ', 'á¿™', 'á¿š', 'Ί', 'И', 'І', 'Ї', 'Ç', 'Ï’'], + 'K' => ['К', 'Κ'], + 'L' => ['Ĺ', 'Å', 'Л', 'Λ', 'Ä»', 'Ľ', 'Ä¿', 'ल'], + 'M' => ['Ðœ', 'Îœ'], + 'N' => ['Ń', 'Ñ', 'Ň', 'Å…', 'ÅŠ', 'Ð', 'Î'], + 'O' => ['Ó', 'Ã’', 'Ỏ', 'Õ', 'Ọ', 'Ô', 'á»', 'á»’', 'á»”', 'á»–', 'Ộ', 'Æ ', 'Ớ', 'Ờ', 'Ở', 'á» ', 'Ợ', 'Ø', 'ÅŒ', 'Å', 'ÅŽ', 'Ο', 'ÎŒ', 'Ὀ', 'Ὁ', 'Ὂ', 'Ὃ', 'Ὄ', 'á½', 'Ὸ', 'ÎŒ', 'О', 'Θ', 'Ó¨', 'Ç‘', 'Ǿ'], + 'P' => ['П', 'Π'], + 'R' => ['Ř', 'Å”', 'Р', 'Ρ', 'Å–'], + 'S' => ['Åž', 'Åœ', 'Ș', 'Å ', 'Åš', 'С', 'Σ'], + 'T' => ['Ť', 'Å¢', 'Ŧ', 'Èš', 'Т', 'Τ'], + 'U' => ['Ú', 'Ù', 'Ủ', 'Ũ', 'Ụ', 'Ư', 'Ứ', 'Ừ', 'Ử', 'á»®', 'á»°', 'Û', 'Ū', 'Å®', 'Å°', 'Ŭ', 'Ų', 'У', 'Ç“', 'Ç•', 'Ç—', 'Ç™', 'Ç›'], + 'V' => ['Ð’'], + 'W' => ['Ω', 'Î', 'Å´'], + 'X' => ['Χ', 'Ξ'], + 'Y' => ['Ã', 'Ỳ', 'Ỷ', 'Ỹ', 'á»´', 'Ÿ', 'Ῠ', 'á¿©', 'Ὺ', 'ÎŽ', 'Ы', 'Й', 'Î¥', 'Ϋ', 'Ŷ'], + 'Z' => ['Ź', 'Ž', 'Å»', 'З', 'Ζ'], + 'AE' => ['Ä', 'Æ', 'Ǽ'], + 'CH' => ['Ч'], + 'DJ' => ['Ђ'], + 'DZ' => ['Ð'], + 'GX' => ['Äœ'], + 'HX' => ['Ĥ'], + 'IJ' => ['IJ'], + 'JX' => ['Ä´'], + 'KH' => ['Ð¥'], + 'LJ' => ['Љ'], + 'NJ' => ['Њ'], + 'OE' => ['Ö', 'Å’'], + 'PS' => ['Ψ'], + 'SH' => ['Ш'], + 'SHCH' => ['Щ'], + 'SS' => ['ẞ'], + 'TH' => ['Þ'], + 'TS' => ['Ц'], + 'UE' => ['Ãœ'], + 'YA' => ['Я'], + 'YU' => ['Ю'], + 'ZH' => ['Ж'], + ' ' => ["\xC2\xA0", "\xE2\x80\x80", "\xE2\x80\x81", "\xE2\x80\x82", "\xE2\x80\x83", "\xE2\x80\x84", "\xE2\x80\x85", "\xE2\x80\x86", "\xE2\x80\x87", "\xE2\x80\x88", "\xE2\x80\x89", "\xE2\x80\x8A", "\xE2\x80\xAF", "\xE2\x81\x9F", "\xE3\x80\x80"], + ]; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Support/Testing/Fakes/BusFake.php b/vendor/laravel/framework/src/Illuminate/Support/Testing/Fakes/BusFake.php new file mode 100644 index 0000000..305e894 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Support/Testing/Fakes/BusFake.php @@ -0,0 +1,113 @@ +dispatched($command, $callback)->count() > 0, + "The expected [{$command}] job was not dispatched." + ); + } + + /** + * Determine if a job was dispatched based on a truth-test callback. + * + * @param string $command + * @param callable|null $callback + * @return void + */ + public function assertNotDispatched($command, $callback = null) + { + PHPUnit::assertTrue( + $this->dispatched($command, $callback)->count() === 0, + "The unexpected [{$command}] job was dispatched." + ); + } + + /** + * Get all of the jobs matching a truth-test callback. + * + * @param string $command + * @param callable|null $callback + * @return \Illuminate\Support\Collection + */ + public function dispatched($command, $callback = null) + { + if (! $this->hasDispatched($command)) { + return collect(); + } + + $callback = $callback ?: function () { + return true; + }; + + return collect($this->commands[$command])->filter(function ($command) use ($callback) { + return $callback($command); + }); + } + + /** + * Determine if there are any stored commands for a given class. + * + * @param string $command + * @return bool + */ + public function hasDispatched($command) + { + return isset($this->commands[$command]) && ! empty($this->commands[$command]); + } + + /** + * Dispatch a command to its appropriate handler. + * + * @param mixed $command + * @return mixed + */ + public function dispatch($command) + { + return $this->dispatchNow($command); + } + + /** + * Dispatch a command to its appropriate handler in the current process. + * + * @param mixed $command + * @param mixed $handler + * @return mixed + */ + public function dispatchNow($command, $handler = null) + { + $this->commands[get_class($command)][] = $command; + } + + /** + * Set the pipes commands should be piped through before dispatching. + * + * @param array $pipes + * @return $this + */ + public function pipeThrough(array $pipes) + { + // + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Support/Testing/Fakes/EventFake.php b/vendor/laravel/framework/src/Illuminate/Support/Testing/Fakes/EventFake.php new file mode 100644 index 0000000..700b251 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Support/Testing/Fakes/EventFake.php @@ -0,0 +1,197 @@ +dispatched($event, $callback)->count() > 0, + "The expected [{$event}] event was not dispatched." + ); + } + + /** + * Determine if an event was dispatched based on a truth-test callback. + * + * @param string $event + * @param callable|null $callback + * @return void + */ + public function assertNotDispatched($event, $callback = null) + { + PHPUnit::assertTrue( + $this->dispatched($event, $callback)->count() === 0, + "The unexpected [{$event}] event was dispatched." + ); + } + + /** + * Get all of the events matching a truth-test callback. + * + * @param string $event + * @param callable|null $callback + * @return \Illuminate\Support\Collection + */ + public function dispatched($event, $callback = null) + { + if (! $this->hasDispatched($event)) { + return collect(); + } + + $callback = $callback ?: function () { + return true; + }; + + return collect($this->events[$event])->filter(function ($arguments) use ($callback) { + return $callback(...$arguments); + }); + } + + /** + * Determine if the given event has been dispatched. + * + * @param string $event + * @return bool + */ + public function hasDispatched($event) + { + return isset($this->events[$event]) && ! empty($this->events[$event]); + } + + /** + * Register an event listener with the dispatcher. + * + * @param string|array $events + * @param mixed $listener + * @return void + */ + public function listen($events, $listener) + { + // + } + + /** + * Determine if a given event has listeners. + * + * @param string $eventName + * @return bool + */ + public function hasListeners($eventName) + { + // + } + + /** + * Register an event and payload to be dispatched later. + * + * @param string $event + * @param array $payload + * @return void + */ + public function push($event, $payload = []) + { + // + } + + /** + * Register an event subscriber with the dispatcher. + * + * @param object|string $subscriber + * @return void + */ + public function subscribe($subscriber) + { + // + } + + /** + * Flush a set of pushed events. + * + * @param string $event + * @return void + */ + public function flush($event) + { + // + } + + /** + * Fire an event and call the listeners. + * + * @param string|object $event + * @param mixed $payload + * @param bool $halt + * @return array|null + */ + public function fire($event, $payload = [], $halt = false) + { + return $this->dispatch($event, $payload, $halt); + } + + /** + * Fire an event and call the listeners. + * + * @param string|object $event + * @param mixed $payload + * @param bool $halt + * @return array|null + */ + public function dispatch($event, $payload = [], $halt = false) + { + $name = is_object($event) ? get_class($event) : (string) $event; + + $this->events[$name][] = func_get_args(); + } + + /** + * Remove a set of listeners from the dispatcher. + * + * @param string $event + * @return void + */ + public function forget($event) + { + // + } + + /** + * Forget all of the queued listeners. + * + * @return void + */ + public function forgetPushed() + { + // + } + + /** + * Dispatch an event and call the listeners. + * + * @param string|object $event + * @param mixed $payload + * @return void + */ + public function until($event, $payload = []) + { + // + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Support/Testing/Fakes/MailFake.php b/vendor/laravel/framework/src/Illuminate/Support/Testing/Fakes/MailFake.php new file mode 100644 index 0000000..b024781 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Support/Testing/Fakes/MailFake.php @@ -0,0 +1,178 @@ +sent($mailable, $callback)->count() > 0, + "The expected [{$mailable}] mailable was not sent." + ); + } + + /** + * Determine if a mailable was not sent based on a truth-test callback. + * + * @param string $mailable + * @param callable|null $callback + * @return void + */ + public function assertNotSent($mailable, $callback = null) + { + PHPUnit::assertTrue( + $this->sent($mailable, $callback)->count() === 0, + "The unexpected [{$mailable}] mailable was sent." + ); + } + + /** + * Assert that no mailables were sent. + * + * @return void + */ + public function assertNothingSent() + { + PHPUnit::assertEmpty($this->mailables, 'Mailables were sent unexpectedly.'); + } + + /** + * Get all of the mailables matching a truth-test callback. + * + * @param string $mailable + * @param callable|null $callback + * @return \Illuminate\Support\Collection + */ + public function sent($mailable, $callback = null) + { + if (! $this->hasSent($mailable)) { + return collect(); + } + + $callback = $callback ?: function () { + return true; + }; + + return $this->mailablesOf($mailable)->filter(function ($mailable) use ($callback) { + return $callback($mailable); + }); + } + + /** + * Determine if the given mailable has been sent. + * + * @param string $mailable + * @return bool + */ + public function hasSent($mailable) + { + return $this->mailablesOf($mailable)->count() > 0; + } + + /** + * Get all of the mailed mailables for a given type. + * + * @param string $type + * @return \Illuminate\Support\Collection + */ + protected function mailablesOf($type) + { + return collect($this->mailables)->filter(function ($mailable) use ($type) { + return $mailable instanceof $type; + }); + } + + /** + * Begin the process of mailing a mailable class instance. + * + * @param mixed $users + * @return \Illuminate\Mail\PendingMail + */ + public function to($users) + { + return (new PendingMailFake($this))->to($users); + } + + /** + * Begin the process of mailing a mailable class instance. + * + * @param mixed $users + * @return \Illuminate\Mail\PendingMail + */ + public function bcc($users) + { + return (new PendingMailFake($this))->bcc($users); + } + + /** + * Send a new message when only a raw text part. + * + * @param string $text + * @param \Closure|string $callback + * @return int + */ + public function raw($text, $callback) + { + // + } + + /** + * Send a new message using a view. + * + * @param string|array $view + * @param array $data + * @param \Closure|string $callback + * @return void + */ + public function send($view, array $data = [], $callback = null) + { + if (! $view instanceof Mailable) { + return; + } + + $this->mailables[] = $view; + } + + /** + * Queue a new e-mail message for sending. + * + * @param string|array $view + * @param array $data + * @param \Closure|string $callback + * @param string|null $queue + * @return mixed + */ + public function queue($view, array $data = [], $callback = null, $queue = null) + { + $this->send($view); + } + + /** + * Get the array of failed recipients. + * + * @return array + */ + public function failures() + { + // + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Support/Testing/Fakes/NotificationFake.php b/vendor/laravel/framework/src/Illuminate/Support/Testing/Fakes/NotificationFake.php new file mode 100644 index 0000000..97afe00 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Support/Testing/Fakes/NotificationFake.php @@ -0,0 +1,165 @@ +assertSentTo($singleNotifiable, $notification, $callback); + } + + return; + } + + PHPUnit::assertTrue( + $this->sent($notifiable, $notification, $callback)->count() > 0, + "The expected [{$notification}] notification was not sent." + ); + } + + /** + * Determine if a notification was sent based on a truth-test callback. + * + * @param mixed $notifiable + * @param string $notification + * @param callable|null $callback + * @return void + */ + public function assertNotSentTo($notifiable, $notification, $callback = null) + { + if (is_array($notifiable) || $notifiable instanceof Collection) { + foreach ($notifiable as $singleNotifiable) { + $this->assertNotSentTo($singleNotifiable, $notification, $callback); + } + + return; + } + + PHPUnit::assertTrue( + $this->sent($notifiable, $notification, $callback)->count() === 0, + "The unexpected [{$notification}] notification was sent." + ); + } + + /** + * Get all of the notifications matching a truth-test callback. + * + * @param mixed $notifiable + * @param string $notification + * @param callable|null $callback + * @return \Illuminate\Support\Collection + */ + public function sent($notifiable, $notification, $callback = null) + { + if (! $this->hasSent($notifiable, $notification)) { + return collect(); + } + + $callback = $callback ?: function () { + return true; + }; + + $notifications = collect($this->notificationsFor($notifiable, $notification)); + + return $notifications->filter(function ($arguments) use ($callback) { + return $callback(...array_values($arguments)); + })->pluck('notification'); + } + + /** + * Determine if there are more notifications left to inspect. + * + * @param mixed $notifiable + * @param string $notification + * @return bool + */ + public function hasSent($notifiable, $notification) + { + return ! empty($this->notificationsFor($notifiable, $notification)); + } + + /** + * Get all of the notifications for a notifiable entity by type. + * + * @param mixed $notifiable + * @param string $notification + * @return array + */ + protected function notificationsFor($notifiable, $notification) + { + if (isset($this->notifications[get_class($notifiable)][$notifiable->getKey()][$notification])) { + return $this->notifications[get_class($notifiable)][$notifiable->getKey()][$notification]; + } + + return []; + } + + /** + * Send the given notification to the given notifiable entities. + * + * @param \Illuminate\Support\Collection|array|mixed $notifiables + * @param mixed $notification + * @return void + */ + public function send($notifiables, $notification) + { + return $this->sendNow($notifiables, $notification); + } + + /** + * Send the given notification immediately. + * + * @param \Illuminate\Support\Collection|array|mixed $notifiables + * @param mixed $notification + * @return void + */ + public function sendNow($notifiables, $notification) + { + if (! $notifiables instanceof Collection && ! is_array($notifiables)) { + $notifiables = [$notifiables]; + } + + foreach ($notifiables as $notifiable) { + $notification->id = Uuid::uuid4()->toString(); + + $this->notifications[get_class($notifiable)][$notifiable->getKey()][get_class($notification)][] = [ + 'notification' => $notification, + 'channels' => $notification->via($notifiable), + ]; + } + } + + /** + * Get a channel instance by name. + * + * @param string|null $name + * @return mixed + */ + public function channel($name = null) + { + // + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Support/Testing/Fakes/PendingMailFake.php b/vendor/laravel/framework/src/Illuminate/Support/Testing/Fakes/PendingMailFake.php new file mode 100644 index 0000000..0baa9d2 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Support/Testing/Fakes/PendingMailFake.php @@ -0,0 +1,53 @@ +mailer = $mailer; + } + + /** + * Send a new mailable message instance. + * + * @param Mailable $mailable + * @return mixed + */ + public function send(Mailable $mailable) + { + return $this->sendNow($mailable); + } + + /** + * Send a mailable message immediately. + * + * @param Mailable $mailable + * @return mixed + */ + public function sendNow(Mailable $mailable) + { + $this->mailer->send($this->fill($mailable)); + } + + /** + * Push the given mailable onto the queue. + * + * @param Mailable $mailable + * @return mixed + */ + public function queue(Mailable $mailable) + { + return $this->sendNow($mailable); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Support/Testing/Fakes/QueueFake.php b/vendor/laravel/framework/src/Illuminate/Support/Testing/Fakes/QueueFake.php new file mode 100644 index 0000000..45e60f0 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Support/Testing/Fakes/QueueFake.php @@ -0,0 +1,237 @@ +pushed($job, $callback)->count() > 0, + "The expected [{$job}] job was not pushed." + ); + } + + /** + * Assert if a job was pushed based on a truth-test callback. + * + * @param string $queue + * @param string $job + * @param callable|null $callback + * @return void + */ + public function assertPushedOn($queue, $job, $callback = null) + { + return $this->assertPushed($job, function ($job, $pushedQueue) use ($callback, $queue) { + if ($pushedQueue !== $queue) { + return false; + } + + return $callback ? $callback(...func_get_args()) : true; + }); + } + + /** + * Determine if a job was pushed based on a truth-test callback. + * + * @param string $job + * @param callable|null $callback + * @return void + */ + public function assertNotPushed($job, $callback = null) + { + PHPUnit::assertTrue( + $this->pushed($job, $callback)->count() === 0, + "The unexpected [{$job}] job was pushed." + ); + } + + /** + * Get all of the jobs matching a truth-test callback. + * + * @param string $job + * @param callable|null $callback + * @return \Illuminate\Support\Collection + */ + public function pushed($job, $callback = null) + { + if (! $this->hasPushed($job)) { + return collect(); + } + + $callback = $callback ?: function () { + return true; + }; + + return collect($this->jobs[$job])->filter(function ($data) use ($callback) { + return $callback($data['job'], $data['queue']); + })->pluck('job'); + } + + /** + * Determine if there are any stored jobs for a given class. + * + * @param string $job + * @return bool + */ + public function hasPushed($job) + { + return isset($this->jobs[$job]) && ! empty($this->jobs[$job]); + } + + /** + * Resolve a queue connection instance. + * + * @param mixed $value + * @return \Illuminate\Contracts\Queue\Queue + */ + public function connection($value = null) + { + return $this; + } + + /** + * Get the size of the queue. + * + * @param string $queue + * @return int + */ + public function size($queue = null) + { + return 0; + } + + /** + * Push a new job onto the queue. + * + * @param string $job + * @param mixed $data + * @param string $queue + * @return mixed + */ + public function push($job, $data = '', $queue = null) + { + $this->jobs[get_class($job)][] = [ + 'job' => $job, + 'queue' => $queue, + ]; + } + + /** + * Push a raw payload onto the queue. + * + * @param string $payload + * @param string $queue + * @param array $options + * @return mixed + */ + public function pushRaw($payload, $queue = null, array $options = []) + { + // + } + + /** + * Push a new job onto the queue after a delay. + * + * @param \DateTime|int $delay + * @param string $job + * @param mixed $data + * @param string $queue + * @return mixed + */ + public function later($delay, $job, $data = '', $queue = null) + { + return $this->push($job, $data, $queue); + } + + /** + * Push a new job onto the queue. + * + * @param string $queue + * @param string $job + * @param mixed $data + * @return mixed + */ + public function pushOn($queue, $job, $data = '') + { + return $this->push($job, $data, $queue); + } + + /** + * Push a new job onto the queue after a delay. + * + * @param string $queue + * @param \DateTime|int $delay + * @param string $job + * @param mixed $data + * @return mixed + */ + public function laterOn($queue, $delay, $job, $data = '') + { + return $this->push($job, $data, $queue); + } + + /** + * Pop the next job off of the queue. + * + * @param string $queue + * @return \Illuminate\Contracts\Queue\Job|null + */ + public function pop($queue = null) + { + // + } + + /** + * Push an array of jobs onto the queue. + * + * @param array $jobs + * @param mixed $data + * @param string $queue + * @return mixed + */ + public function bulk($jobs, $data = '', $queue = null) + { + foreach ($this->jobs as $job) { + $this->push($job); + } + } + + /** + * Get the connection name for the queue. + * + * @return string + */ + public function getConnectionName() + { + // + } + + /** + * Set the connection name for the queue. + * + * @param string $name + * @return $this + */ + public function setConnectionName($name) + { + return $this; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Support/Traits/CapsuleManagerTrait.php b/vendor/laravel/framework/src/Illuminate/Support/Traits/CapsuleManagerTrait.php new file mode 100644 index 0000000..08089ef --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Support/Traits/CapsuleManagerTrait.php @@ -0,0 +1,69 @@ +container = $container; + + if (! $this->container->bound('config')) { + $this->container->instance('config', new Fluent); + } + } + + /** + * Make this capsule instance available globally. + * + * @return void + */ + public function setAsGlobal() + { + static::$instance = $this; + } + + /** + * Get the IoC container instance. + * + * @return \Illuminate\Contracts\Container\Container + */ + public function getContainer() + { + return $this->container; + } + + /** + * Set the IoC container instance. + * + * @param \Illuminate\Contracts\Container\Container $container + * @return void + */ + public function setContainer(Container $container) + { + $this->container = $container; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Support/Traits/Macroable.php b/vendor/laravel/framework/src/Illuminate/Support/Traits/Macroable.php new file mode 100644 index 0000000..2c103d4 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Support/Traits/Macroable.php @@ -0,0 +1,83 @@ +bindTo($this, static::class), $parameters); + } + + return call_user_func_array(static::$macros[$method], $parameters); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Support/ViewErrorBag.php b/vendor/laravel/framework/src/Illuminate/Support/ViewErrorBag.php new file mode 100644 index 0000000..d5e9c7e --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Support/ViewErrorBag.php @@ -0,0 +1,117 @@ +bags[$key]); + } + + /** + * Get a MessageBag instance from the bags. + * + * @param string $key + * @return \Illuminate\Contracts\Support\MessageBag + */ + public function getBag($key) + { + return Arr::get($this->bags, $key) ?: new MessageBag; + } + + /** + * Get all the bags. + * + * @return array + */ + public function getBags() + { + return $this->bags; + } + + /** + * Add a new MessageBag instance to the bags. + * + * @param string $key + * @param \Illuminate\Contracts\Support\MessageBag $bag + * @return $this + */ + public function put($key, MessageBagContract $bag) + { + $this->bags[$key] = $bag; + + return $this; + } + + /** + * Determine if the default message bag has any messages. + * + * @return bool + */ + public function any() + { + return $this->count() > 0; + } + + /** + * Get the number of messages in the default bag. + * + * @return int + */ + public function count() + { + return $this->getBag('default')->count(); + } + + /** + * Dynamically call methods on the default bag. + * + * @param string $method + * @param array $parameters + * @return mixed + */ + public function __call($method, $parameters) + { + return $this->getBag('default')->$method(...$parameters); + } + + /** + * Dynamically access a view error bag. + * + * @param string $key + * @return \Illuminate\Contracts\Support\MessageBag + */ + public function __get($key) + { + return $this->getBag($key); + } + + /** + * Dynamically set a view error bag. + * + * @param string $key + * @param \Illuminate\Contracts\Support\MessageBag $value + * @return void + */ + public function __set($key, $value) + { + $this->put($key, $value); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Support/composer.json b/vendor/laravel/framework/src/Illuminate/Support/composer.json new file mode 100644 index 0000000..56d92d4 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Support/composer.json @@ -0,0 +1,48 @@ +{ + "name": "illuminate/support", + "description": "The Illuminate Support package.", + "license": "MIT", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "require": { + "php": ">=5.6.4", + "ext-mbstring": "*", + "doctrine/inflector": "~1.0", + "illuminate/contracts": "5.4.*", + "paragonie/random_compat": "~1.4|~2.0" + }, + "replace": { + "tightenco/collect": "self.version" + }, + "autoload": { + "psr-4": { + "Illuminate\\Support\\": "" + }, + "files": [ + "helpers.php" + ] + }, + "extra": { + "branch-alias": { + "dev-master": "5.4-dev" + } + }, + "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)." + }, + "config": { + "sort-packages": true + }, + "minimum-stability": "dev" +} diff --git a/vendor/laravel/framework/src/Illuminate/Support/helpers.php b/vendor/laravel/framework/src/Illuminate/Support/helpers.php new file mode 100755 index 0000000..f70f8f0 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Support/helpers.php @@ -0,0 +1,952 @@ + $value) { + if (is_numeric($key)) { + $start++; + + $array[$start] = Arr::pull($array, $key); + } + } + + return $array; + } +} + +if (! function_exists('array_add')) { + /** + * Add an element to an array using "dot" notation if it doesn't exist. + * + * @param array $array + * @param string $key + * @param mixed $value + * @return array + */ + function array_add($array, $key, $value) + { + return Arr::add($array, $key, $value); + } +} + +if (! function_exists('array_collapse')) { + /** + * Collapse an array of arrays into a single array. + * + * @param array $array + * @return array + */ + function array_collapse($array) + { + return Arr::collapse($array); + } +} + +if (! function_exists('array_divide')) { + /** + * Divide an array into two arrays. One with keys and the other with values. + * + * @param array $array + * @return array + */ + function array_divide($array) + { + return Arr::divide($array); + } +} + +if (! function_exists('array_dot')) { + /** + * Flatten a multi-dimensional associative array with dots. + * + * @param array $array + * @param string $prepend + * @return array + */ + function array_dot($array, $prepend = '') + { + return Arr::dot($array, $prepend); + } +} + +if (! function_exists('array_except')) { + /** + * Get all of the given array except for a specified array of items. + * + * @param array $array + * @param array|string $keys + * @return array + */ + function array_except($array, $keys) + { + return Arr::except($array, $keys); + } +} + +if (! function_exists('array_first')) { + /** + * Return the first element in an array passing a given truth test. + * + * @param array $array + * @param callable|null $callback + * @param mixed $default + * @return mixed + */ + function array_first($array, callable $callback = null, $default = null) + { + return Arr::first($array, $callback, $default); + } +} + +if (! function_exists('array_flatten')) { + /** + * Flatten a multi-dimensional array into a single level. + * + * @param array $array + * @param int $depth + * @return array + */ + function array_flatten($array, $depth = INF) + { + return Arr::flatten($array, $depth); + } +} + +if (! function_exists('array_forget')) { + /** + * Remove one or many array items from a given array using "dot" notation. + * + * @param array $array + * @param array|string $keys + * @return void + */ + function array_forget(&$array, $keys) + { + return Arr::forget($array, $keys); + } +} + +if (! function_exists('array_get')) { + /** + * Get an item from an array using "dot" notation. + * + * @param \ArrayAccess|array $array + * @param string $key + * @param mixed $default + * @return mixed + */ + function array_get($array, $key, $default = null) + { + return Arr::get($array, $key, $default); + } +} + +if (! function_exists('array_has')) { + /** + * Check if an item or items exist in an array using "dot" notation. + * + * @param \ArrayAccess|array $array + * @param string|array $keys + * @return bool + */ + function array_has($array, $keys) + { + return Arr::has($array, $keys); + } +} + +if (! function_exists('array_last')) { + /** + * Return the last element in an array passing a given truth test. + * + * @param array $array + * @param callable|null $callback + * @param mixed $default + * @return mixed + */ + function array_last($array, callable $callback = null, $default = null) + { + return Arr::last($array, $callback, $default); + } +} + +if (! function_exists('array_only')) { + /** + * Get a subset of the items from the given array. + * + * @param array $array + * @param array|string $keys + * @return array + */ + function array_only($array, $keys) + { + return Arr::only($array, $keys); + } +} + +if (! function_exists('array_pluck')) { + /** + * Pluck an array of values from an array. + * + * @param array $array + * @param string|array $value + * @param string|array|null $key + * @return array + */ + function array_pluck($array, $value, $key = null) + { + return Arr::pluck($array, $value, $key); + } +} + +if (! function_exists('array_prepend')) { + /** + * Push an item onto the beginning of an array. + * + * @param array $array + * @param mixed $value + * @param mixed $key + * @return array + */ + function array_prepend($array, $value, $key = null) + { + return Arr::prepend($array, $value, $key); + } +} + +if (! function_exists('array_pull')) { + /** + * Get a value from the array, and remove it. + * + * @param array $array + * @param string $key + * @param mixed $default + * @return mixed + */ + function array_pull(&$array, $key, $default = null) + { + return Arr::pull($array, $key, $default); + } +} + +if (! function_exists('array_set')) { + /** + * Set an array item to a given value using "dot" notation. + * + * If no key is given to the method, the entire array will be replaced. + * + * @param array $array + * @param string $key + * @param mixed $value + * @return array + */ + function array_set(&$array, $key, $value) + { + return Arr::set($array, $key, $value); + } +} + +if (! function_exists('array_sort')) { + /** + * Sort the array using the given callback. + * + * @param array $array + * @param callable $callback + * @return array + */ + function array_sort($array, callable $callback) + { + return Arr::sort($array, $callback); + } +} + +if (! function_exists('array_sort_recursive')) { + /** + * Recursively sort an array by keys and values. + * + * @param array $array + * @return array + */ + function array_sort_recursive($array) + { + return Arr::sortRecursive($array); + } +} + +if (! function_exists('array_where')) { + /** + * Filter the array using the given callback. + * + * @param array $array + * @param callable $callback + * @return array + */ + function array_where($array, callable $callback) + { + return Arr::where($array, $callback); + } +} + +if (! function_exists('array_wrap')) { + /** + * If the given value is not an array, wrap it in one. + * + * @param mixed $value + * @return array + */ + function array_wrap($value) + { + return Arr::wrap($value); + } +} + +if (! function_exists('camel_case')) { + /** + * Convert a value to camel case. + * + * @param string $value + * @return string + */ + function camel_case($value) + { + return Str::camel($value); + } +} + +if (! function_exists('class_basename')) { + /** + * Get the class "basename" of the given object / class. + * + * @param string|object $class + * @return string + */ + function class_basename($class) + { + $class = is_object($class) ? get_class($class) : $class; + + return basename(str_replace('\\', '/', $class)); + } +} + +if (! function_exists('class_uses_recursive')) { + /** + * Returns all traits used by a class, its subclasses and trait of their traits. + * + * @param object|string $class + * @return array + */ + function class_uses_recursive($class) + { + if (is_object($class)) { + $class = get_class($class); + } + + $results = []; + + foreach (array_merge([$class => $class], class_parents($class)) as $class) { + $results += trait_uses_recursive($class); + } + + return array_unique($results); + } +} + +if (! function_exists('collect')) { + /** + * Create a collection from the given value. + * + * @param mixed $value + * @return \Illuminate\Support\Collection + */ + function collect($value = null) + { + return new Collection($value); + } +} + +if (! function_exists('data_fill')) { + /** + * Fill in data where it's missing. + * + * @param mixed $target + * @param string|array $key + * @param mixed $value + * @return mixed + */ + function data_fill(&$target, $key, $value) + { + return data_set($target, $key, $value, false); + } +} + +if (! function_exists('data_get')) { + /** + * Get an item from an array or object using "dot" notation. + * + * @param mixed $target + * @param string|array $key + * @param mixed $default + * @return mixed + */ + function data_get($target, $key, $default = null) + { + if (is_null($key)) { + return $target; + } + + $key = is_array($key) ? $key : explode('.', $key); + + while (! is_null($segment = array_shift($key))) { + if ($segment === '*') { + if ($target instanceof Collection) { + $target = $target->all(); + } elseif (! is_array($target)) { + return value($default); + } + + $result = Arr::pluck($target, $key); + + return in_array('*', $key) ? Arr::collapse($result) : $result; + } + + if (Arr::accessible($target) && Arr::exists($target, $segment)) { + $target = $target[$segment]; + } elseif (is_object($target) && isset($target->{$segment})) { + $target = $target->{$segment}; + } else { + return value($default); + } + } + + return $target; + } +} + +if (! function_exists('data_set')) { + /** + * Set an item on an array or object using dot notation. + * + * @param mixed $target + * @param string|array $key + * @param mixed $value + * @param bool $overwrite + * @return mixed + */ + function data_set(&$target, $key, $value, $overwrite = true) + { + $segments = is_array($key) ? $key : explode('.', $key); + + if (($segment = array_shift($segments)) === '*') { + if (! Arr::accessible($target)) { + $target = []; + } + + if ($segments) { + foreach ($target as &$inner) { + data_set($inner, $segments, $value, $overwrite); + } + } elseif ($overwrite) { + foreach ($target as &$inner) { + $inner = $value; + } + } + } elseif (Arr::accessible($target)) { + if ($segments) { + if (! Arr::exists($target, $segment)) { + $target[$segment] = []; + } + + data_set($target[$segment], $segments, $value, $overwrite); + } elseif ($overwrite || ! Arr::exists($target, $segment)) { + $target[$segment] = $value; + } + } elseif (is_object($target)) { + if ($segments) { + if (! isset($target->{$segment})) { + $target->{$segment} = []; + } + + data_set($target->{$segment}, $segments, $value, $overwrite); + } elseif ($overwrite || ! isset($target->{$segment})) { + $target->{$segment} = $value; + } + } else { + $target = []; + + if ($segments) { + data_set($target[$segment], $segments, $value, $overwrite); + } elseif ($overwrite) { + $target[$segment] = $value; + } + } + + return $target; + } +} + +if (! function_exists('dd')) { + /** + * Dump the passed variables and end the script. + * + * @param mixed + * @return void + */ + function dd(...$args) + { + foreach ($args as $x) { + (new Dumper)->dump($x); + } + + die(1); + } +} + +if (! function_exists('e')) { + /** + * Escape HTML special characters in a string. + * + * @param \Illuminate\Contracts\Support\Htmlable|string $value + * @return string + */ + function e($value) + { + if ($value instanceof Htmlable) { + return $value->toHtml(); + } + + return htmlspecialchars($value, ENT_QUOTES, 'UTF-8', false); + } +} + +if (! function_exists('ends_with')) { + /** + * Determine if a given string ends with a given substring. + * + * @param string $haystack + * @param string|array $needles + * @return bool + */ + function ends_with($haystack, $needles) + { + return Str::endsWith($haystack, $needles); + } +} + +if (! function_exists('head')) { + /** + * Get the first element of an array. Useful for method chaining. + * + * @param array $array + * @return mixed + */ + function head($array) + { + return reset($array); + } +} + +if (! function_exists('kebab_case')) { + /** + * Convert a string to kebab case. + * + * @param string $value + * @return string + */ + function kebab_case($value) + { + return Str::kebab($value); + } +} + +if (! function_exists('last')) { + /** + * Get the last element from an array. + * + * @param array $array + * @return mixed + */ + function last($array) + { + return end($array); + } +} + +if (! function_exists('object_get')) { + /** + * Get an item from an object using "dot" notation. + * + * @param object $object + * @param string $key + * @param mixed $default + * @return mixed + */ + function object_get($object, $key, $default = null) + { + if (is_null($key) || trim($key) == '') { + return $object; + } + + foreach (explode('.', $key) as $segment) { + if (! is_object($object) || ! isset($object->{$segment})) { + return value($default); + } + + $object = $object->{$segment}; + } + + return $object; + } +} + +if (! function_exists('preg_replace_array')) { + /** + * Replace a given pattern with each value in the array in sequentially. + * + * @param string $pattern + * @param array $replacements + * @param string $subject + * @return string + */ + function preg_replace_array($pattern, array $replacements, $subject) + { + return preg_replace_callback($pattern, function () use (&$replacements) { + foreach ($replacements as $key => $value) { + return array_shift($replacements); + } + }, $subject); + } +} + +if (! function_exists('retry')) { + /** + * Retry an operation a given number of times. + * + * @param int $times + * @param callable $callback + * @param int $sleep + * @return mixed + * + * @throws \Exception + */ + function retry($times, callable $callback, $sleep = 0) + { + $times--; + + beginning: + try { + return $callback(); + } catch (Exception $e) { + if (! $times) { + throw $e; + } + + $times--; + + if ($sleep) { + usleep($sleep * 1000); + } + + goto beginning; + } + } +} + +if (! function_exists('snake_case')) { + /** + * Convert a string to snake case. + * + * @param string $value + * @param string $delimiter + * @return string + */ + function snake_case($value, $delimiter = '_') + { + return Str::snake($value, $delimiter); + } +} + +if (! function_exists('starts_with')) { + /** + * Determine if a given string starts with a given substring. + * + * @param string $haystack + * @param string|array $needles + * @return bool + */ + function starts_with($haystack, $needles) + { + return Str::startsWith($haystack, $needles); + } +} + +if (! function_exists('str_contains')) { + /** + * Determine if a given string contains a given substring. + * + * @param string $haystack + * @param string|array $needles + * @return bool + */ + function str_contains($haystack, $needles) + { + return Str::contains($haystack, $needles); + } +} + +if (! function_exists('str_finish')) { + /** + * Cap a string with a single instance of a given value. + * + * @param string $value + * @param string $cap + * @return string + */ + function str_finish($value, $cap) + { + return Str::finish($value, $cap); + } +} + +if (! function_exists('str_is')) { + /** + * Determine if a given string matches a given pattern. + * + * @param string $pattern + * @param string $value + * @return bool + */ + function str_is($pattern, $value) + { + return Str::is($pattern, $value); + } +} + +if (! function_exists('str_limit')) { + /** + * Limit the number of characters in a string. + * + * @param string $value + * @param int $limit + * @param string $end + * @return string + */ + function str_limit($value, $limit = 100, $end = '...') + { + return Str::limit($value, $limit, $end); + } +} + +if (! function_exists('str_plural')) { + /** + * Get the plural form of an English word. + * + * @param string $value + * @param int $count + * @return string + */ + function str_plural($value, $count = 2) + { + return Str::plural($value, $count); + } +} + +if (! function_exists('str_random')) { + /** + * Generate a more truly "random" alpha-numeric string. + * + * @param int $length + * @return string + * + * @throws \RuntimeException + */ + function str_random($length = 16) + { + return Str::random($length); + } +} + +if (! function_exists('str_replace_array')) { + /** + * Replace a given value in the string sequentially with an array. + * + * @param string $search + * @param array $replace + * @param string $subject + * @return string + */ + function str_replace_array($search, array $replace, $subject) + { + return Str::replaceArray($search, $replace, $subject); + } +} + +if (! function_exists('str_replace_first')) { + /** + * Replace the first occurrence of a given value in the string. + * + * @param string $search + * @param string $replace + * @param string $subject + * @return string + */ + function str_replace_first($search, $replace, $subject) + { + return Str::replaceFirst($search, $replace, $subject); + } +} + +if (! function_exists('str_replace_last')) { + /** + * Replace the last occurrence of a given value in the string. + * + * @param string $search + * @param string $replace + * @param string $subject + * @return string + */ + function str_replace_last($search, $replace, $subject) + { + return Str::replaceLast($search, $replace, $subject); + } +} + +if (! function_exists('str_singular')) { + /** + * Get the singular form of an English word. + * + * @param string $value + * @return string + */ + function str_singular($value) + { + return Str::singular($value); + } +} + +if (! function_exists('str_slug')) { + /** + * Generate a URL friendly "slug" from a given string. + * + * @param string $title + * @param string $separator + * @return string + */ + function str_slug($title, $separator = '-') + { + return Str::slug($title, $separator); + } +} + +if (! function_exists('studly_case')) { + /** + * Convert a value to studly caps case. + * + * @param string $value + * @return string + */ + function studly_case($value) + { + return Str::studly($value); + } +} + +if (! function_exists('tap')) { + /** + * Call the given Closure with the given value then return the value. + * + * @param mixed $value + * @param callable $callback + * @return mixed + */ + function tap($value, $callback) + { + $callback($value); + + return $value; + } +} + +if (! function_exists('title_case')) { + /** + * Convert a value to title case. + * + * @param string $value + * @return string + */ + function title_case($value) + { + return Str::title($value); + } +} + +if (! function_exists('trait_uses_recursive')) { + /** + * Returns all traits used by a trait and its traits. + * + * @param string $trait + * @return array + */ + function trait_uses_recursive($trait) + { + $traits = class_uses($trait); + + foreach ($traits as $trait) { + $traits += trait_uses_recursive($trait); + } + + return $traits; + } +} + +if (! function_exists('value')) { + /** + * Return the default value of the given value. + * + * @param mixed $value + * @return mixed + */ + function value($value) + { + return $value instanceof Closure ? $value() : $value; + } +} + +if (! function_exists('windows_os')) { + /** + * Determine whether the current environment is Windows based. + * + * @return bool + */ + function windows_os() + { + return strtolower(substr(PHP_OS, 0, 3)) === 'win'; + } +} + +if (! function_exists('with')) { + /** + * Return the given object. Useful for chaining. + * + * @param mixed $object + * @return mixed + */ + function with($object) + { + return $object; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Translation/ArrayLoader.php b/vendor/laravel/framework/src/Illuminate/Translation/ArrayLoader.php new file mode 100644 index 0000000..5e0b2d0 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Translation/ArrayLoader.php @@ -0,0 +1,72 @@ +messages[$namespace][$locale][$group])) { + return $this->messages[$namespace][$locale][$group]; + } + + return []; + } + + /** + * Add a new namespace to the loader. + * + * @param string $namespace + * @param string $hint + * @return void + */ + public function addNamespace($namespace, $hint) + { + // + } + + /** + * Add messages to the loader. + * + * @param string $locale + * @param string $group + * @param array $messages + * @param string|null $namespace + * @return $this + */ + public function addMessages($locale, $group, array $messages, $namespace = null) + { + $namespace = $namespace ?: '*'; + + $this->messages[$namespace][$locale][$group] = $messages; + + return $this; + } + + /** + * Get an array of all the registered namespaces. + * + * @return array + */ + public function namespaces() + { + return []; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Translation/FileLoader.php b/vendor/laravel/framework/src/Illuminate/Translation/FileLoader.php new file mode 100755 index 0000000..9d45c06 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Translation/FileLoader.php @@ -0,0 +1,157 @@ +path = $path; + $this->files = $files; + } + + /** + * Load the messages for the given locale. + * + * @param string $locale + * @param string $group + * @param string $namespace + * @return array + */ + public function load($locale, $group, $namespace = null) + { + if ($group == '*' && $namespace == '*') { + return $this->loadJsonPath($this->path, $locale); + } + + if (is_null($namespace) || $namespace == '*') { + return $this->loadPath($this->path, $locale, $group); + } + + return $this->loadNamespaced($locale, $group, $namespace); + } + + /** + * Load a namespaced translation group. + * + * @param string $locale + * @param string $group + * @param string $namespace + * @return array + */ + protected function loadNamespaced($locale, $group, $namespace) + { + if (isset($this->hints[$namespace])) { + $lines = $this->loadPath($this->hints[$namespace], $locale, $group); + + return $this->loadNamespaceOverrides($lines, $locale, $group, $namespace); + } + + return []; + } + + /** + * Load a local namespaced translation group for overrides. + * + * @param array $lines + * @param string $locale + * @param string $group + * @param string $namespace + * @return array + */ + protected function loadNamespaceOverrides(array $lines, $locale, $group, $namespace) + { + $file = "{$this->path}/vendor/{$namespace}/{$locale}/{$group}.php"; + + if ($this->files->exists($file)) { + return array_replace_recursive($lines, $this->files->getRequire($file)); + } + + return $lines; + } + + /** + * Load a locale from a given path. + * + * @param string $path + * @param string $locale + * @param string $group + * @return array + */ + protected function loadPath($path, $locale, $group) + { + if ($this->files->exists($full = "{$path}/{$locale}/{$group}.php")) { + return $this->files->getRequire($full); + } + + return []; + } + + /** + * Load a locale from the given JSON file path. + * + * @param string $path + * @param string $locale + * @return array + */ + protected function loadJsonPath($path, $locale) + { + if ($this->files->exists($full = "{$path}/{$locale}.json")) { + return json_decode($this->files->get($full), true); + } + + return []; + } + + /** + * Add a new namespace to the loader. + * + * @param string $namespace + * @param string $hint + * @return void + */ + public function addNamespace($namespace, $hint) + { + $this->hints[$namespace] = $hint; + } + + /** + * Get an array of all the registered namespaces. + * + * @return array + */ + public function namespaces() + { + return $this->hints; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Translation/LoaderInterface.php b/vendor/laravel/framework/src/Illuminate/Translation/LoaderInterface.php new file mode 100755 index 0000000..cbebebf --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Translation/LoaderInterface.php @@ -0,0 +1,32 @@ +extract($segments, $number)) !== null) { + return trim($value); + } + + $segments = $this->stripConditions($segments); + + $pluralIndex = $this->getPluralIndex($locale, $number); + + if (count($segments) == 1 || ! isset($segments[$pluralIndex])) { + return $segments[0]; + } + + return $segments[$pluralIndex]; + } + + /** + * Extract a translation string using inline conditions. + * + * @param array $segments + * @param int $number + * @return mixed + */ + private function extract($segments, $number) + { + foreach ($segments as $part) { + if (! is_null($line = $this->extractFromString($part, $number))) { + return $line; + } + } + } + + /** + * Get the translation string if the condition matches. + * + * @param string $part + * @param int $number + * @return mixed + */ + private function extractFromString($part, $number) + { + preg_match('/^[\{\[]([^\[\]\{\}]*)[\}\]](.*)/s', $part, $matches); + + if (count($matches) != 3) { + return; + } + + $condition = $matches[1]; + + $value = $matches[2]; + + if (Str::contains($condition, ',')) { + list($from, $to) = explode(',', $condition, 2); + + if ($to == '*' && $number >= $from) { + return $value; + } elseif ($from == '*' && $number <= $to) { + return $value; + } elseif ($number >= $from && $number <= $to) { + return $value; + } + } + + return $condition == $number ? $value : null; + } + + /** + * Strip the inline conditions from each segment, just leaving the text. + * + * @param array $segments + * @return array + */ + private function stripConditions($segments) + { + return collect($segments)->map(function ($part) { + return preg_replace('/^[\{\[]([^\[\]\{\}]*)[\}\]]/', '', $part); + })->all(); + } + + /** + * Get the index to use for pluralization. + * + * The plural rules are derived from code of the Zend Framework (2010-09-25), which + * is subject to the new BSD license (http://framework.zend.com/license/new-bsd) + * Copyright (c) 2005-2010 - Zend Technologies USA Inc. (http://www.zend.com) + * + * @param string $locale + * @param int $number + * @return int + */ + public function getPluralIndex($locale, $number) + { + switch ($locale) { + case 'az': + case 'bo': + case 'dz': + case 'id': + case 'ja': + case 'jv': + case 'ka': + case 'km': + case 'kn': + case 'ko': + case 'ms': + case 'th': + case 'tr': + case 'vi': + case 'zh': + return 0; + break; + case 'af': + case 'bn': + case 'bg': + case 'ca': + case 'da': + case 'de': + case 'el': + case 'en': + case 'eo': + case 'es': + case 'et': + case 'eu': + case 'fa': + case 'fi': + case 'fo': + case 'fur': + case 'fy': + case 'gl': + case 'gu': + case 'ha': + case 'he': + case 'hu': + case 'is': + case 'it': + case 'ku': + case 'lb': + case 'ml': + case 'mn': + case 'mr': + case 'nah': + case 'nb': + case 'ne': + case 'nl': + case 'nn': + case 'no': + case 'om': + case 'or': + case 'pa': + case 'pap': + case 'ps': + case 'pt': + case 'so': + case 'sq': + case 'sv': + case 'sw': + case 'ta': + case 'te': + case 'tk': + case 'ur': + case 'zu': + return ($number == 1) ? 0 : 1; + case 'am': + case 'bh': + case 'fil': + case 'fr': + case 'gun': + case 'hi': + case 'hy': + case 'ln': + case 'mg': + case 'nso': + case 'xbr': + case 'ti': + case 'wa': + return (($number == 0) || ($number == 1)) ? 0 : 1; + case 'be': + case 'bs': + case 'hr': + case 'ru': + case 'sr': + case 'uk': + 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 'sk': + return ($number == 1) ? 0 : ((($number >= 2) && ($number <= 4)) ? 1 : 2); + case 'ga': + return ($number == 1) ? 0 : (($number == 2) ? 1 : 2); + case 'lt': + return (($number % 10 == 1) && ($number % 100 != 11)) ? 0 : ((($number % 10 >= 2) && (($number % 100 < 10) || ($number % 100 >= 20))) ? 1 : 2); + case 'sl': + return ($number % 100 == 1) ? 0 : (($number % 100 == 2) ? 1 : ((($number % 100 == 3) || ($number % 100 == 4)) ? 2 : 3)); + case 'mk': + return ($number % 10 == 1) ? 0 : 1; + case 'mt': + return ($number == 1) ? 0 : ((($number == 0) || (($number % 100 > 1) && ($number % 100 < 11))) ? 1 : ((($number % 100 > 10) && ($number % 100 < 20)) ? 2 : 3)); + case 'lv': + return ($number == 0) ? 0 : ((($number % 10 == 1) && ($number % 100 != 11)) ? 1 : 2); + case 'pl': + return ($number == 1) ? 0 : ((($number % 10 >= 2) && ($number % 10 <= 4) && (($number % 100 < 12) || ($number % 100 > 14))) ? 1 : 2); + case 'cy': + return ($number == 1) ? 0 : (($number == 2) ? 1 : ((($number == 8) || ($number == 11)) ? 2 : 3)); + case 'ro': + return ($number == 1) ? 0 : ((($number == 0) || (($number % 100 > 0) && ($number % 100 < 20))) ? 1 : 2); + case 'ar': + 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/vendor/laravel/framework/src/Illuminate/Translation/TranslationServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Translation/TranslationServiceProvider.php new file mode 100755 index 0000000..f0dd3fe --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Translation/TranslationServiceProvider.php @@ -0,0 +1,62 @@ +registerLoader(); + + $this->app->singleton('translator', function ($app) { + $loader = $app['translation.loader']; + + // When registering the translator component, we'll need to set the default + // locale as well as the fallback locale. So, we'll grab the application + // configuration so we can easily get both of these values from there. + $locale = $app['config']['app.locale']; + + $trans = new Translator($loader, $locale); + + $trans->setFallback($app['config']['app.fallback_locale']); + + return $trans; + }); + } + + /** + * Register the translation line loader. + * + * @return void + */ + protected function registerLoader() + { + $this->app->singleton('translation.loader', function ($app) { + return new FileLoader($app['files'], $app['path.lang']); + }); + } + + /** + * Get the services provided by the provider. + * + * @return array + */ + public function provides() + { + return ['translator', 'translation.loader']; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Translation/Translator.php b/vendor/laravel/framework/src/Illuminate/Translation/Translator.php new file mode 100755 index 0000000..fc8980e --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Translation/Translator.php @@ -0,0 +1,468 @@ +loader = $loader; + $this->locale = $locale; + } + + /** + * Determine if a translation exists for a given locale. + * + * @param string $key + * @param string|null $locale + * @return bool + */ + public function hasForLocale($key, $locale = null) + { + return $this->has($key, $locale, false); + } + + /** + * Determine if a translation exists. + * + * @param string $key + * @param string|null $locale + * @param bool $fallback + * @return bool + */ + public function has($key, $locale = null, $fallback = true) + { + return $this->get($key, [], $locale, $fallback) !== $key; + } + + /** + * Get the translation for a given key. + * + * @param string $key + * @param array $replace + * @param string $locale + * @return string|array|null + */ + public function trans($key, array $replace = [], $locale = null) + { + return $this->get($key, $replace, $locale); + } + + /** + * Get the translation for the given key. + * + * @param string $key + * @param array $replace + * @param string|null $locale + * @param bool $fallback + * @return string|array|null + */ + public function get($key, array $replace = [], $locale = null, $fallback = true) + { + list($namespace, $group, $item) = $this->parseKey($key); + + // Here we will get the locale that should be used for the language line. If one + // was not passed, we will use the default locales which was given to us when + // the translator was instantiated. Then, we can load the lines and return. + $locales = $fallback ? $this->localeArray($locale) + : [$locale ?: $this->locale]; + + foreach ($locales as $locale) { + if (! is_null($line = $this->getLine( + $namespace, $group, $locale, $item, $replace + ))) { + break; + } + } + + // If the line doesn't exist, we will return back the key which was requested as + // that will be quick to spot in the UI if language keys are wrong or missing + // from the application's language files. Otherwise we can return the line. + if (isset($line)) { + return $line; + } + + return $key; + } + + /** + * Get the translation for a given key from the JSON translation files. + * + * @param string $key + * @param array $replace + * @param string $locale + * @return string + */ + public function getFromJson($key, array $replace = [], $locale = null) + { + $locale = $locale ?: $this->locale; + + // For JSON translations, there is only one file per locale, so we will simply load + // that file and then we will be ready to check the array for the key. These are + // only one level deep so we do not need to do any fancy searching through it. + $this->load('*', '*', $locale); + + $line = isset($this->loaded['*']['*'][$locale][$key]) + ? $this->loaded['*']['*'][$locale][$key] : null; + + // If we can't find a translation for the JSON key, we will attempt to translate it + // using the typical translation file. This way developers can always just use a + // helper such as __ instead of having to pick between trans or __ with views. + if (! isset($line)) { + $fallback = $this->get($key, $replace, $locale); + + if ($fallback !== $key) { + return $fallback; + } + } + + return $this->makeReplacements($line ?: $key, $replace); + } + + /** + * Get a translation according to an integer value. + * + * @param string $key + * @param int|array|\Countable $number + * @param array $replace + * @param string $locale + * @return string + */ + public function transChoice($key, $number, array $replace = [], $locale = null) + { + return $this->choice($key, $number, $replace, $locale); + } + + /** + * Get a translation according to an integer value. + * + * @param string $key + * @param int|array|\Countable $number + * @param array $replace + * @param string $locale + * @return string + */ + public function choice($key, $number, array $replace = [], $locale = null) + { + $line = $this->get( + $key, $replace, $locale = $this->localeForChoice($locale) + ); + + // If the given "number" is actually an array or countable we will simply count the + // number of elements in an instance. This allows developers to pass an array of + // items without having to count it on their end first which gives bad syntax. + if (is_array($number) || $number instanceof Countable) { + $number = count($number); + } + + $replace['count'] = $number; + + return $this->makeReplacements( + $this->getSelector()->choose($line, $number, $locale), $replace + ); + } + + /** + * Get the proper locale for a choice operation. + * + * @param string|null $locale + * @return string + */ + protected function localeForChoice($locale) + { + return $locale ?: $this->locale ?: $this->fallback; + } + + /** + * Retrieve a language line out the loaded array. + * + * @param string $namespace + * @param string $group + * @param string $locale + * @param string $item + * @param array $replace + * @return string|array|null + */ + protected function getLine($namespace, $group, $locale, $item, array $replace) + { + $this->load($namespace, $group, $locale); + + $line = Arr::get($this->loaded[$namespace][$group][$locale], $item); + + if (is_string($line)) { + return $this->makeReplacements($line, $replace); + } elseif (is_array($line) && count($line) > 0) { + return $line; + } + } + + /** + * Make the place-holder replacements on a line. + * + * @param string $line + * @param array $replace + * @return string + */ + protected function makeReplacements($line, array $replace) + { + if (empty($replace)) { + return $line; + } + + $replace = $this->sortReplacements($replace); + + foreach ($replace as $key => $value) { + $line = str_replace( + [':'.$key, ':'.Str::upper($key), ':'.Str::ucfirst($key)], + [$value, Str::upper($value), Str::ucfirst($value)], + $line + ); + } + + return $line; + } + + /** + * Sort the replacements array. + * + * @param array $replace + * @return array + */ + protected function sortReplacements(array $replace) + { + return (new Collection($replace))->sortBy(function ($value, $key) { + return mb_strlen($key) * -1; + })->all(); + } + + /** + * Add translation lines to the given locale. + * + * @param array $lines + * @param string $locale + * @param string $namespace + * @return void + */ + public function addLines(array $lines, $locale, $namespace = '*') + { + foreach ($lines as $key => $value) { + list($group, $item) = explode('.', $key, 2); + + Arr::set($this->loaded, "$namespace.$group.$locale.$item", $value); + } + } + + /** + * Load the specified language group. + * + * @param string $namespace + * @param string $group + * @param string $locale + * @return void + */ + public function load($namespace, $group, $locale) + { + if ($this->isLoaded($namespace, $group, $locale)) { + return; + } + + // The loader is responsible for returning the array of language lines for the + // given namespace, group, and locale. We'll set the lines in this array of + // lines that have already been loaded so that we can easily access them. + $lines = $this->loader->load($locale, $group, $namespace); + + $this->loaded[$namespace][$group][$locale] = $lines; + } + + /** + * Determine if the given group has been loaded. + * + * @param string $namespace + * @param string $group + * @param string $locale + * @return bool + */ + protected function isLoaded($namespace, $group, $locale) + { + return isset($this->loaded[$namespace][$group][$locale]); + } + + /** + * Add a new namespace to the loader. + * + * @param string $namespace + * @param string $hint + * @return void + */ + public function addNamespace($namespace, $hint) + { + $this->loader->addNamespace($namespace, $hint); + } + + /** + * Parse a key into namespace, group, and item. + * + * @param string $key + * @return array + */ + public function parseKey($key) + { + $segments = parent::parseKey($key); + + if (is_null($segments[0])) { + $segments[0] = '*'; + } + + return $segments; + } + + /** + * Get the array of locales to be checked. + * + * @param string|null $locale + * @return array + */ + protected function localeArray($locale) + { + return array_filter([$locale ?: $this->locale, $this->fallback]); + } + + /** + * Get the message selector instance. + * + * @return \Illuminate\Translation\MessageSelector + */ + public function getSelector() + { + if (! isset($this->selector)) { + $this->selector = new MessageSelector; + } + + return $this->selector; + } + + /** + * Set the message selector instance. + * + * @param \Illuminate\Translation\MessageSelector $selector + * @return void + */ + public function setSelector(MessageSelector $selector) + { + $this->selector = $selector; + } + + /** + * Get the language line loader implementation. + * + * @return \Illuminate\Translation\LoaderInterface + */ + public function getLoader() + { + return $this->loader; + } + + /** + * Get the default locale being used. + * + * @return string + */ + public function locale() + { + return $this->getLocale(); + } + + /** + * Get the default locale being used. + * + * @return string + */ + public function getLocale() + { + return $this->locale; + } + + /** + * Set the default locale. + * + * @param string $locale + * @return void + */ + public function setLocale($locale) + { + $this->locale = $locale; + } + + /** + * Get the fallback locale being used. + * + * @return string + */ + public function getFallback() + { + return $this->fallback; + } + + /** + * Set the fallback locale being used. + * + * @param string $fallback + * @return void + */ + public function setFallback($fallback) + { + $this->fallback = $fallback; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Translation/composer.json b/vendor/laravel/framework/src/Illuminate/Translation/composer.json new file mode 100755 index 0000000..e1d990d --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Translation/composer.json @@ -0,0 +1,36 @@ +{ + "name": "illuminate/translation", + "description": "The Illuminate Translation package.", + "license": "MIT", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "require": { + "php": ">=5.6.4", + "illuminate/contracts": "5.4.*", + "illuminate/filesystem": "5.4.*", + "illuminate/support": "5.4.*" + }, + "autoload": { + "psr-4": { + "Illuminate\\Translation\\": "" + } + }, + "extra": { + "branch-alias": { + "dev-master": "5.4-dev" + } + }, + "config": { + "sort-packages": true + }, + "minimum-stability": "dev" +} diff --git a/vendor/laravel/framework/src/Illuminate/Validation/Concerns/FormatsMessages.php b/vendor/laravel/framework/src/Illuminate/Validation/Concerns/FormatsMessages.php new file mode 100644 index 0000000..ea5b608 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Validation/Concerns/FormatsMessages.php @@ -0,0 +1,360 @@ +getFromLocalArray( + $attribute, $lowerRule = Str::snake($rule) + ); + + // First we will retrieve the custom message for the validation rule if one + // exists. If a custom validation message is being used we'll return the + // custom message, otherwise we'll keep searching for a valid message. + if (! is_null($inlineMessage)) { + return $inlineMessage; + } + + $customMessage = $this->getCustomMessageFromTranslator( + $customKey = "validation.custom.{$attribute}.{$lowerRule}" + ); + + // First we check for a custom defined validation message for the attribute + // and rule. This allows the developer to specify specific messages for + // only some attributes and rules that need to get specially formed. + if ($customMessage !== $customKey) { + return $customMessage; + } + + // If the rule being validated is a "size" rule, we will need to gather the + // specific error message for the type of attribute being validated such + // as a number, file or string which all have different message types. + elseif (in_array($rule, $this->sizeRules)) { + return $this->getSizeMessage($attribute, $rule); + } + + // Finally, if no developer specified messages have been set, and no other + // special messages apply for this rule, we will just pull the default + // messages out of the translator service for this validation rule. + $key = "validation.{$lowerRule}"; + + if ($key != ($value = $this->translator->trans($key))) { + return $value; + } + + return $this->getFromLocalArray( + $attribute, $lowerRule, $this->fallbackMessages + ) ?: $key; + } + + /** + * Get the inline message for a rule if it exists. + * + * @param string $attribute + * @param string $lowerRule + * @param array $source + * @return string|null + */ + protected function getFromLocalArray($attribute, $lowerRule, $source = null) + { + $source = $source ?: $this->customMessages; + + $keys = ["{$attribute}.{$lowerRule}", $lowerRule]; + + // First we will check for a custom message for an attribute specific rule + // message for the fields, then we will check for a general custom line + // that is not attribute specific. If we find either we'll return it. + foreach ($keys as $key) { + foreach (array_keys($source) as $sourceKey) { + if (Str::is($sourceKey, $key)) { + return $source[$sourceKey]; + } + } + } + } + + /** + * Get the custom error message from translator. + * + * @param string $key + * @return string + */ + protected function getCustomMessageFromTranslator($key) + { + if (($message = $this->translator->trans($key)) !== $key) { + return $message; + } + + // If an exact match was not found for the key, we will collapse all of these + // messages and loop through them and try to find a wildcard match for the + // given key. Otherwise, we will simply return the key's value back out. + $shortKey = preg_replace( + '/^validation\.custom\./', '', $key + ); + + return $this->getWildcardCustomMessages(Arr::dot( + (array) $this->translator->trans('validation.custom') + ), $shortKey, $key); + } + + /** + * Check the given messages for a wildcard key. + * + * @param array $messages + * @param string $search + * @param string $default + * @return string + */ + protected function getWildcardCustomMessages($messages, $search, $default) + { + foreach ($messages as $key => $message) { + if ($search === $key || (Str::contains($key, ['*']) && Str::is($key, $search))) { + return $message; + } + } + + return $default; + } + + /** + * Get the proper error message for an attribute and size rule. + * + * @param string $attribute + * @param string $rule + * @return string + */ + protected function getSizeMessage($attribute, $rule) + { + $lowerRule = Str::snake($rule); + + // There are three different types of size validations. The attribute may be + // either a number, file, or string so we will check a few things to know + // which type of value it is and return the correct line for that type. + $type = $this->getAttributeType($attribute); + + $key = "validation.{$lowerRule}.{$type}"; + + return $this->translator->trans($key); + } + + /** + * Get the data type of the given attribute. + * + * @param string $attribute + * @return string + */ + protected function getAttributeType($attribute) + { + // We assume that the attributes present in the file array are files so that + // means that if the attribute does not have a numeric rule and the files + // list doesn't have it we'll just consider it a string by elimination. + if ($this->hasRule($attribute, $this->numericRules)) { + return 'numeric'; + } elseif ($this->hasRule($attribute, ['Array'])) { + return 'array'; + } elseif ($this->getValue($attribute) instanceof UploadedFile) { + return 'file'; + } + + return 'string'; + } + + /** + * Replace all error message place-holders with actual values. + * + * @param string $message + * @param string $attribute + * @param string $rule + * @param array $parameters + * @return string + */ + public function makeReplacements($message, $attribute, $rule, $parameters) + { + $message = $this->replaceAttributePlaceholder( + $message, $this->getDisplayableAttribute($attribute) + ); + + if (isset($this->replacers[Str::snake($rule)])) { + return $this->callReplacer($message, $attribute, Str::snake($rule), $parameters); + } elseif (method_exists($this, $replacer = "replace{$rule}")) { + return $this->$replacer($message, $attribute, $rule, $parameters); + } + + return $message; + } + + /** + * Get the displayable name of the attribute. + * + * @param string $attribute + * @return string + */ + protected function getDisplayableAttribute($attribute) + { + $primaryAttribute = $this->getPrimaryAttribute($attribute); + + $expectedAttributes = $attribute != $primaryAttribute + ? [$attribute, $primaryAttribute] : [$attribute]; + + foreach ($expectedAttributes as $name) { + // The developer may dynamically specify the array of custom attributes on this + // validator instance. If the attribute exists in this array it is used over + // the other ways of pulling the attribute name for this given attributes. + if (isset($this->customAttributes[$name])) { + return $this->customAttributes[$name]; + } + + // We allow for a developer to specify language lines for any attribute in this + // application, which allows flexibility for displaying a unique displayable + // version of the attribute name instead of the name used in an HTTP POST. + if ($line = $this->getAttributeFromTranslations($name)) { + return $line; + } + } + + // When no language line has been specified for the attribute and it is also + // an implicit attribute we will display the raw attribute's name and not + // modify it with any of these replacements before we display the name. + if (isset($this->implicitAttributes[$primaryAttribute])) { + return $attribute; + } + + return str_replace('_', ' ', Str::snake($attribute)); + } + + /** + * Get the given attribute from the attribute translations. + * + * @param string $name + * @return string + */ + protected function getAttributeFromTranslations($name) + { + return Arr::get($this->translator->trans('validation.attributes'), $name); + } + + /** + * Replace the :attribute placeholder in the given message. + * + * @param string $message + * @param string $value + * @return string + */ + protected function replaceAttributePlaceholder($message, $value) + { + return str_replace( + [':attribute', ':ATTRIBUTE', ':Attribute'], + [$value, Str::upper($value), Str::ucfirst($value)], + $message + ); + } + + /** + * Get the displayable name of the value. + * + * @param string $attribute + * @param mixed $value + * @return string + */ + public function getDisplayableValue($attribute, $value) + { + if (isset($this->customValues[$attribute][$value])) { + return $this->customValues[$attribute][$value]; + } + + $key = "validation.values.{$attribute}.{$value}"; + + if (($line = $this->translator->trans($key)) !== $key) { + return $line; + } + + return $value; + } + + /** + * Transform an array of attributes to their displayable form. + * + * @param array $values + * @return array + */ + protected function getAttributeList(array $values) + { + $attributes = []; + + // For each attribute in the list we will simply get its displayable form as + // this is convenient when replacing lists of parameters like some of the + // replacement functions do when formatting out the validation message. + foreach ($values as $key => $value) { + $attributes[$key] = $this->getDisplayableAttribute($value); + } + + return $attributes; + } + + /** + * Call a custom validator message replacer. + * + * @param string $message + * @param string $attribute + * @param string $rule + * @param array $parameters + * @return string|null + */ + protected function callReplacer($message, $attribute, $rule, $parameters) + { + $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); + } + } + + /** + * Call a class based validator message replacer. + * + * @param string $callback + * @param string $message + * @param string $attribute + * @param string $rule + * @param array $parameters + * @return string + */ + protected function callClassBasedReplacer($callback, $message, $attribute, $rule, $parameters) + { + list($class, $method) = Str::parseCallback($callback, 'replace'); + + return call_user_func_array([$this->container->make($class), $method], array_slice(func_get_args(), 1)); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Validation/Concerns/ReplacesAttributes.php b/vendor/laravel/framework/src/Illuminate/Validation/Concerns/ReplacesAttributes.php new file mode 100644 index 0000000..ed10876 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Validation/Concerns/ReplacesAttributes.php @@ -0,0 +1,380 @@ +replaceSame($message, $attribute, $rule, $parameters); + } + + /** + * Replace all place-holders for the digits rule. + * + * @param string $message + * @param string $attribute + * @param string $rule + * @param array $parameters + * @return string + */ + protected function replaceDigits($message, $attribute, $rule, $parameters) + { + return str_replace(':digits', $parameters[0], $message); + } + + /** + * Replace all place-holders for the digits (between) rule. + * + * @param string $message + * @param string $attribute + * @param string $rule + * @param array $parameters + * @return string + */ + protected function replaceDigitsBetween($message, $attribute, $rule, $parameters) + { + return $this->replaceBetween($message, $attribute, $rule, $parameters); + } + + /** + * Replace all place-holders for the min rule. + * + * @param string $message + * @param string $attribute + * @param string $rule + * @param array $parameters + * @return string + */ + protected function replaceMin($message, $attribute, $rule, $parameters) + { + return str_replace(':min', $parameters[0], $message); + } + + /** + * Replace all place-holders for the max rule. + * + * @param string $message + * @param string $attribute + * @param string $rule + * @param array $parameters + * @return string + */ + protected function replaceMax($message, $attribute, $rule, $parameters) + { + return str_replace(':max', $parameters[0], $message); + } + + /** + * Replace all place-holders for the in rule. + * + * @param string $message + * @param string $attribute + * @param string $rule + * @param array $parameters + * @return string + */ + protected function replaceIn($message, $attribute, $rule, $parameters) + { + foreach ($parameters as &$parameter) { + $parameter = $this->getDisplayableValue($attribute, $parameter); + } + + return str_replace(':values', implode(', ', $parameters), $message); + } + + /** + * Replace all place-holders for the not_in rule. + * + * @param string $message + * @param string $attribute + * @param string $rule + * @param array $parameters + * @return string + */ + protected function replaceNotIn($message, $attribute, $rule, $parameters) + { + return $this->replaceIn($message, $attribute, $rule, $parameters); + } + + /** + * Replace all place-holders for the in_array rule. + * + * @param string $message + * @param string $attribute + * @param string $rule + * @param array $parameters + * @return string + */ + protected function replaceInArray($message, $attribute, $rule, $parameters) + { + return str_replace(':other', $this->getDisplayableAttribute($parameters[0]), $message); + } + + /** + * Replace all place-holders for the mimetypes rule. + * + * @param string $message + * @param string $attribute + * @param string $rule + * @param array $parameters + * @return string + */ + protected function replaceMimetypes($message, $attribute, $rule, $parameters) + { + return str_replace(':values', implode(', ', $parameters), $message); + } + + /** + * Replace all place-holders for the mimes rule. + * + * @param string $message + * @param string $attribute + * @param string $rule + * @param array $parameters + * @return string + */ + protected function replaceMimes($message, $attribute, $rule, $parameters) + { + return str_replace(':values', implode(', ', $parameters), $message); + } + + /** + * Replace all place-holders for the required_with rule. + * + * @param string $message + * @param string $attribute + * @param string $rule + * @param array $parameters + * @return string + */ + protected function replaceRequiredWith($message, $attribute, $rule, $parameters) + { + return str_replace(':values', implode(' / ', $this->getAttributeList($parameters)), $message); + } + + /** + * Replace all place-holders for the required_with_all rule. + * + * @param string $message + * @param string $attribute + * @param string $rule + * @param array $parameters + * @return string + */ + protected function replaceRequiredWithAll($message, $attribute, $rule, $parameters) + { + return $this->replaceRequiredWith($message, $attribute, $rule, $parameters); + } + + /** + * Replace all place-holders for the required_without rule. + * + * @param string $message + * @param string $attribute + * @param string $rule + * @param array $parameters + * @return string + */ + protected function replaceRequiredWithout($message, $attribute, $rule, $parameters) + { + return $this->replaceRequiredWith($message, $attribute, $rule, $parameters); + } + + /** + * Replace all place-holders for the required_without_all rule. + * + * @param string $message + * @param string $attribute + * @param string $rule + * @param array $parameters + * @return string + */ + protected function replaceRequiredWithoutAll($message, $attribute, $rule, $parameters) + { + return $this->replaceRequiredWith($message, $attribute, $rule, $parameters); + } + + /** + * Replace all place-holders for the size rule. + * + * @param string $message + * @param string $attribute + * @param string $rule + * @param array $parameters + * @return string + */ + protected function replaceSize($message, $attribute, $rule, $parameters) + { + return str_replace(':size', $parameters[0], $message); + } + + /** + * Replace all place-holders for the required_if rule. + * + * @param string $message + * @param string $attribute + * @param string $rule + * @param array $parameters + * @return string + */ + protected function replaceRequiredIf($message, $attribute, $rule, $parameters) + { + $parameters[1] = $this->getDisplayableValue($parameters[0], Arr::get($this->data, $parameters[0])); + + $parameters[0] = $this->getDisplayableAttribute($parameters[0]); + + return str_replace([':other', ':value'], $parameters, $message); + } + + /** + * Replace all place-holders for the required_unless rule. + * + * @param string $message + * @param string $attribute + * @param string $rule + * @param array $parameters + * @return string + */ + protected function replaceRequiredUnless($message, $attribute, $rule, $parameters) + { + $other = $this->getDisplayableAttribute(array_shift($parameters)); + + return str_replace([':other', ':values'], [$other, implode(', ', $parameters)], $message); + } + + /** + * Replace all place-holders for the same rule. + * + * @param string $message + * @param string $attribute + * @param string $rule + * @param array $parameters + * @return string + */ + protected function replaceSame($message, $attribute, $rule, $parameters) + { + return str_replace(':other', $this->getDisplayableAttribute($parameters[0]), $message); + } + + /** + * Replace all place-holders for the before rule. + * + * @param string $message + * @param string $attribute + * @param string $rule + * @param array $parameters + * @return string + */ + protected function replaceBefore($message, $attribute, $rule, $parameters) + { + if (! (strtotime($parameters[0]))) { + return str_replace(':date', $this->getDisplayableAttribute($parameters[0]), $message); + } + + return str_replace(':date', $parameters[0], $message); + } + + /** + * Replace all place-holders for the before_or_equal rule. + * + * @param string $message + * @param string $attribute + * @param string $rule + * @param array $parameters + * @return string + */ + protected function replaceBeforeOrEqual($message, $attribute, $rule, $parameters) + { + return $this->replaceBefore($message, $attribute, $rule, $parameters); + } + + /** + * Replace all place-holders for the after rule. + * + * @param string $message + * @param string $attribute + * @param string $rule + * @param array $parameters + * @return string + */ + protected function replaceAfter($message, $attribute, $rule, $parameters) + { + return $this->replaceBefore($message, $attribute, $rule, $parameters); + } + + /** + * Replace all place-holders for the after_or_equal rule. + * + * @param string $message + * @param string $attribute + * @param string $rule + * @param array $parameters + * @return string + */ + protected function replaceAfterOrEqual($message, $attribute, $rule, $parameters) + { + return $this->replaceBefore($message, $attribute, $rule, $parameters); + } + + /** + * Replace all place-holders for the dimensions rule. + * + * @param string $message + * @param string $attribute + * @param string $rule + * @param array $parameters + * @return string + */ + protected function replaceDimensions($message, $attribute, $rule, $parameters) + { + $parameters = $this->parseNamedParameters($parameters); + + if (is_array($parameters)) { + foreach ($parameters as $key => $value) { + $message = str_replace(':'.$key, $value, $message); + } + } + + return $message; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Validation/Concerns/ValidatesAttributes.php b/vendor/laravel/framework/src/Illuminate/Validation/Concerns/ValidatesAttributes.php new file mode 100644 index 0000000..4de6c38 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Validation/Concerns/ValidatesAttributes.php @@ -0,0 +1,1421 @@ +validateRequired($attribute, $value) && in_array($value, $acceptable, true); + } + + /** + * Validate that an attribute is an active URL. + * + * @param string $attribute + * @param mixed $value + * @return bool + */ + protected function validateActiveUrl($attribute, $value) + { + if (! is_string($value)) { + return false; + } + + if ($url = parse_url($value, PHP_URL_HOST)) { + try { + return count(dns_get_record($url, DNS_A | DNS_AAAA)) > 0; + } catch (Exception $e) { + return false; + } + } + + return false; + } + + /** + * "Break" on first validation fail. + * + * Always returns true, just lets us put "bail" in rules. + * + * @return bool + */ + protected function validateBail() + { + return true; + } + + /** + * Validate the date is before a given date. + * + * @param string $attribute + * @param mixed $value + * @param array $parameters + * @return bool + */ + protected function validateBefore($attribute, $value, $parameters) + { + $this->requireParameterCount(1, $parameters, 'before'); + + return $this->compareDates($attribute, $value, $parameters, '<'); + } + + /** + * Validate the date is before or equal a given date. + * + * @param string $attribute + * @param mixed $value + * @param array $parameters + * @return bool + */ + protected function validateBeforeOrEqual($attribute, $value, $parameters) + { + $this->requireParameterCount(1, $parameters, 'before_or_equal'); + + return $this->compareDates($attribute, $value, $parameters, '<='); + } + + /** + * Validate the date is after a given date. + * + * @param string $attribute + * @param mixed $value + * @param array $parameters + * @return bool + */ + protected function validateAfter($attribute, $value, $parameters) + { + $this->requireParameterCount(1, $parameters, 'after'); + + return $this->compareDates($attribute, $value, $parameters, '>'); + } + + /** + * Validate the date is equal or after a given date. + * + * @param string $attribute + * @param mixed $value + * @param array $parameters + * @return bool + */ + protected function validateAfterOrEqual($attribute, $value, $parameters) + { + $this->requireParameterCount(1, $parameters, 'after_or_equal'); + + return $this->compareDates($attribute, $value, $parameters, '>='); + } + + /** + * Compare a given date against another using an operator. + * + * @param string $attribute + * @param mixed $value + * @param array $parameters + * @param string $operator + * @return bool + */ + protected function compareDates($attribute, $value, $parameters, $operator) + { + if (! is_string($value) && ! is_numeric($value) && ! $value instanceof DateTimeInterface) { + return false; + } + + if ($format = $this->getDateFormat($attribute)) { + return $this->checkDateTimeOrder( + $format, $value, $this->getValue($parameters[0]) ?: $parameters[0], $operator + ); + } + + if (! $date = $this->getDateTimestamp($parameters[0])) { + $date = $this->getDateTimestamp($this->getValue($parameters[0])); + } + + return $this->compare($this->getDateTimestamp($value), $date, $operator); + } + + /** + * Get the date format for an attribute if it has one. + * + * @param string $attribute + * @return string|null + */ + protected function getDateFormat($attribute) + { + if ($result = $this->getRule($attribute, 'DateFormat')) { + return $result[1][0]; + } + } + + /** + * Get the date timestamp. + * + * @param mixed $value + * @return int + */ + protected function getDateTimestamp($value) + { + return $value instanceof DateTimeInterface ? $value->getTimestamp() : strtotime($value); + } + + /** + * Given two date/time strings, check that one is after the other. + * + * @param string $format + * @param string $first + * @param string $second + * @param string $operator + * @return bool + */ + protected function checkDateTimeOrder($format, $first, $second, $operator) + { + $first = $this->getDateTimeWithOptionalFormat($format, $first); + + $second = $this->getDateTimeWithOptionalFormat($format, $second); + + return ($first && $second) && ($this->compare($first, $second, $operator)); + } + + /** + * Get a DateTime instance from a string. + * + * @param string $format + * @param string $value + * @return \DateTime|null + */ + protected function getDateTimeWithOptionalFormat($format, $value) + { + if ($date = DateTime::createFromFormat($format, $value)) { + return $date; + } + + try { + return new DateTime($value); + } catch (Exception $e) { + // + } + } + + /** + * Validate that an attribute contains only alphabetic characters. + * + * @param string $attribute + * @param mixed $value + * @return bool + */ + protected function validateAlpha($attribute, $value) + { + return is_string($value) && preg_match('/^[\pL\pM]+$/u', $value); + } + + /** + * Validate that an attribute contains only alpha-numeric characters, dashes, and underscores. + * + * @param string $attribute + * @param mixed $value + * @return bool + */ + protected function validateAlphaDash($attribute, $value) + { + if (! is_string($value) && ! is_numeric($value)) { + return false; + } + + return preg_match('/^[\pL\pM\pN_-]+$/u', $value) > 0; + } + + /** + * Validate that an attribute contains only alpha-numeric characters. + * + * @param string $attribute + * @param mixed $value + * @return bool + */ + protected function validateAlphaNum($attribute, $value) + { + if (! is_string($value) && ! is_numeric($value)) { + return false; + } + + return preg_match('/^[\pL\pM\pN]+$/u', $value) > 0; + } + + /** + * Validate that an attribute is an array. + * + * @param string $attribute + * @param mixed $value + * @return bool + */ + protected function validateArray($attribute, $value) + { + return is_array($value); + } + + /** + * Validate the size of an attribute is between a set of values. + * + * @param string $attribute + * @param mixed $value + * @param array $parameters + * @return bool + */ + protected function validateBetween($attribute, $value, $parameters) + { + $this->requireParameterCount(2, $parameters, 'between'); + + $size = $this->getSize($attribute, $value); + + return $size >= $parameters[0] && $size <= $parameters[1]; + } + + /** + * Validate that an attribute is a boolean. + * + * @param string $attribute + * @param mixed $value + * @return bool + */ + protected function validateBoolean($attribute, $value) + { + $acceptable = [true, false, 0, 1, '0', '1']; + + return in_array($value, $acceptable, true); + } + + /** + * Validate that an attribute has a matching confirmation. + * + * @param string $attribute + * @param mixed $value + * @return bool + */ + protected function validateConfirmed($attribute, $value) + { + return $this->validateSame($attribute, $value, [$attribute.'_confirmation']); + } + + /** + * Validate that an attribute is a valid date. + * + * @param string $attribute + * @param mixed $value + * @return bool + */ + protected function validateDate($attribute, $value) + { + if ($value instanceof DateTime) { + return true; + } + + if ((! is_string($value) && ! is_numeric($value)) || strtotime($value) === false) { + return false; + } + + $date = date_parse($value); + + return checkdate($date['month'], $date['day'], $date['year']); + } + + /** + * Validate that an attribute matches a date format. + * + * @param string $attribute + * @param mixed $value + * @param array $parameters + * @return bool + */ + protected function validateDateFormat($attribute, $value, $parameters) + { + $this->requireParameterCount(1, $parameters, 'date_format'); + + if (! is_string($value) && ! is_numeric($value)) { + return false; + } + + $date = DateTime::createFromFormat($parameters[0], $value); + + return $date && $date->format($parameters[0]) == $value; + } + + /** + * Validate that an attribute is different from another attribute. + * + * @param string $attribute + * @param mixed $value + * @param array $parameters + * @return bool + */ + protected function validateDifferent($attribute, $value, $parameters) + { + $this->requireParameterCount(1, $parameters, 'different'); + + $other = Arr::get($this->data, $parameters[0]); + + return isset($other) && $value !== $other; + } + + /** + * Validate that an attribute has a given number of digits. + * + * @param string $attribute + * @param mixed $value + * @param array $parameters + * @return bool + */ + protected function validateDigits($attribute, $value, $parameters) + { + $this->requireParameterCount(1, $parameters, 'digits'); + + return ! preg_match('/[^0-9]/', $value) + && strlen((string) $value) == $parameters[0]; + } + + /** + * Validate that an attribute is between a given number of digits. + * + * @param string $attribute + * @param mixed $value + * @param array $parameters + * @return bool + */ + protected function validateDigitsBetween($attribute, $value, $parameters) + { + $this->requireParameterCount(2, $parameters, 'digits_between'); + + $length = strlen((string) $value); + + return ! preg_match('/[^0-9]/', $value) + && $length >= $parameters[0] && $length <= $parameters[1]; + } + + /** + * Validate the dimensions of an image matches the given values. + * + * @param string $attribute + * @param mixed $value + * @param array $parameters + * @return bool + */ + protected function validateDimensions($attribute, $value, $parameters) + { + if (! $this->isValidFileInstance($value) || ! $sizeDetails = @getimagesize($value->getRealPath())) { + return false; + } + + $this->requireParameterCount(1, $parameters, 'dimensions'); + + list($width, $height) = $sizeDetails; + + $parameters = $this->parseNamedParameters($parameters); + + if ($this->failsBasicDimensionChecks($parameters, $width, $height) || + $this->failsRatioCheck($parameters, $width, $height)) { + return false; + } + + return true; + } + + /** + * Test if the given width and height fail any conditions. + * + * @param array $parameters + * @param int $width + * @param int $height + * @return bool + */ + protected function failsBasicDimensionChecks($parameters, $width, $height) + { + return (isset($parameters['width']) && $parameters['width'] != $width) || + (isset($parameters['min_width']) && $parameters['min_width'] > $width) || + (isset($parameters['max_width']) && $parameters['max_width'] < $width) || + (isset($parameters['height']) && $parameters['height'] != $height) || + (isset($parameters['min_height']) && $parameters['min_height'] > $height) || + (isset($parameters['max_height']) && $parameters['max_height'] < $height); + } + + /** + * Determine if the given parameters fail a dimension ratio check. + * + * @param array $parameters + * @param int $width + * @param int $height + * @return bool + */ + protected function failsRatioCheck($parameters, $width, $height) + { + if (! isset($parameters['ratio'])) { + return false; + } + + list($numerator, $denominator) = array_replace( + [1, 1], array_filter(sscanf($parameters['ratio'], '%f/%d')) + ); + + return abs($numerator / $denominator - $width / $height) > 0.000001; + } + + /** + * Validate an attribute is unique among other values. + * + * @param string $attribute + * @param mixed $value + * @param array $parameters + * @return bool + */ + protected function validateDistinct($attribute, $value, $parameters) + { + $attributeName = $this->getPrimaryAttribute($attribute); + + $attributeData = ValidationData::extractDataFromPath( + ValidationData::getLeadingExplicitAttributePath($attributeName), $this->data + ); + + $pattern = str_replace('\*', '[^.]+', preg_quote($attributeName, '#')); + + $data = Arr::where(Arr::dot($attributeData), function ($value, $key) use ($attribute, $pattern) { + return $key != $attribute && (bool) preg_match('#^'.$pattern.'\z#u', $key); + }); + + return ! in_array($value, array_values($data)); + } + + /** + * Validate that an attribute is a valid e-mail address. + * + * @param string $attribute + * @param mixed $value + * @return bool + */ + protected function validateEmail($attribute, $value) + { + return filter_var($value, FILTER_VALIDATE_EMAIL) !== false; + } + + /** + * Validate the existence of an attribute value in a database table. + * + * @param string $attribute + * @param mixed $value + * @param array $parameters + * @return bool + */ + protected function validateExists($attribute, $value, $parameters) + { + $this->requireParameterCount(1, $parameters, 'exists'); + + list($connection, $table) = $this->parseTable($parameters[0]); + + // The second parameter position holds the name of the column that should be + // verified as existing. If this parameter is not specified we will guess + // that the columns being "verified" shares the given attribute's name. + $column = $this->getQueryColumn($parameters, $attribute); + + $expected = (is_array($value)) ? count($value) : 1; + + return $this->getExistCount( + $connection, $table, $column, $value, $parameters + ) >= $expected; + } + + /** + * Get the number of records that exist in storage. + * + * @param mixed $connection + * @param string $table + * @param string $column + * @param mixed $value + * @param array $parameters + * @return int + */ + protected function getExistCount($connection, $table, $column, $value, $parameters) + { + $verifier = $this->getPresenceVerifierFor($connection); + + $extra = $this->getExtraConditions( + array_values(array_slice($parameters, 2)) + ); + + if ($this->currentRule instanceof Exists) { + $extra = array_merge($extra, $this->currentRule->queryCallbacks()); + } + + return is_array($value) + ? $verifier->getMultiCount($table, $column, $value, $extra) + : $verifier->getCount($table, $column, $value, null, null, $extra); + } + + /** + * Validate the uniqueness of an attribute value on a given database table. + * + * If a database column is not specified, the attribute will be used. + * + * @param string $attribute + * @param mixed $value + * @param array $parameters + * @return bool + */ + protected function validateUnique($attribute, $value, $parameters) + { + $this->requireParameterCount(1, $parameters, 'unique'); + + list($connection, $table) = $this->parseTable($parameters[0]); + + // The second parameter position holds the name of the column that needs to + // be verified as unique. If this parameter isn't specified we will just + // assume that this column to be verified shares the attribute's name. + $column = $this->getQueryColumn($parameters, $attribute); + + list($idColumn, $id) = [null, null]; + + if (isset($parameters[2])) { + list($idColumn, $id) = $this->getUniqueIds($parameters); + } + + // The presence verifier is responsible for counting rows within this store + // mechanism which might be a relational database or any other permanent + // data store like Redis, etc. We will use it to determine uniqueness. + $verifier = $this->getPresenceVerifierFor($connection); + + $extra = $this->getUniqueExtra($parameters); + + if ($this->currentRule instanceof Unique) { + $extra = array_merge($extra, $this->currentRule->queryCallbacks()); + } + + return $verifier->getCount( + $table, $column, $value, $id, $idColumn, $extra + ) == 0; + } + + /** + * Get the excluded ID column and value for the unique rule. + * + * @param array $parameters + * @return array + */ + protected function getUniqueIds($parameters) + { + $idColumn = isset($parameters[3]) ? $parameters[3] : 'id'; + + return [$idColumn, $this->prepareUniqueId($parameters[2])]; + } + + /** + * Prepare the given ID for querying. + * + * @param mixed $id + * @return int + */ + protected function prepareUniqueId($id) + { + if (preg_match('/\[(.*)\]/', $id, $matches)) { + $id = $this->getValue($matches[1]); + } + + if (strtolower($id) == 'null') { + $id = null; + } + + if (filter_var($id, FILTER_VALIDATE_INT) !== false) { + $id = intval($id); + } + + return $id; + } + + /** + * Get the extra conditions for a unique rule. + * + * @param array $parameters + * @return array + */ + protected function getUniqueExtra($parameters) + { + if (isset($parameters[4])) { + return $this->getExtraConditions(array_slice($parameters, 4)); + } + + return []; + } + + /** + * Parse the connection / table for the unique / exists rules. + * + * @param string $table + * @return array + */ + protected function parseTable($table) + { + return Str::contains($table, '.') ? explode('.', $table, 2) : [null, $table]; + } + + /** + * Get the column name for an exists / unique query. + * + * @param array $parameters + * @param string $attribute + * @return bool + */ + protected function getQueryColumn($parameters, $attribute) + { + return isset($parameters[1]) && $parameters[1] !== 'NULL' + ? $parameters[1] : $this->guessColumnForQuery($attribute); + } + + /** + * Guess the database column from the given attribute name. + * + * @param string $attribute + * @return string + */ + public function guessColumnForQuery($attribute) + { + if (in_array($attribute, array_collapse($this->implicitAttributes)) + && ! is_numeric($last = last(explode('.', $attribute)))) { + return $last; + } + + return $attribute; + } + + /** + * Get the extra conditions for a unique / exists rule. + * + * @param array $segments + * @return array + */ + protected function getExtraConditions(array $segments) + { + $extra = []; + + $count = count($segments); + + for ($i = 0; $i < $count; $i += 2) { + $extra[$segments[$i]] = $segments[$i + 1]; + } + + return $extra; + } + + /** + * Validate the given value is a valid file. + * + * @param string $attribute + * @param mixed $value + * @return bool + */ + protected function validateFile($attribute, $value) + { + return $this->isValidFileInstance($value); + } + + /** + * Validate the given attribute is filled if it is present. + * + * @param string $attribute + * @param mixed $value + * @return bool + */ + protected function validateFilled($attribute, $value) + { + if (Arr::has($this->data, $attribute)) { + return $this->validateRequired($attribute, $value); + } + + return true; + } + + /** + * Validate the MIME type of a file is an image MIME type. + * + * @param string $attribute + * @param mixed $value + * @return bool + */ + protected function validateImage($attribute, $value) + { + return $this->validateMimes($attribute, $value, ['jpeg', 'png', 'gif', 'bmp', 'svg']); + } + + /** + * Validate an attribute is contained within a list of values. + * + * @param string $attribute + * @param mixed $value + * @param array $parameters + * @return bool + */ + protected function validateIn($attribute, $value, $parameters) + { + if (is_array($value) && $this->hasRule($attribute, 'Array')) { + foreach ($value as $element) { + if (is_array($element)) { + return false; + } + } + + return count(array_diff($value, $parameters)) == 0; + } + + return ! is_array($value) && in_array((string) $value, $parameters); + } + + /** + * Validate that the values of an attribute is in another attribute. + * + * @param string $attribute + * @param mixed $value + * @param array $parameters + * @return bool + */ + protected function validateInArray($attribute, $value, $parameters) + { + $this->requireParameterCount(1, $parameters, 'in_array'); + + $explicitPath = ValidationData::getLeadingExplicitAttributePath($parameters[0]); + + $attributeData = ValidationData::extractDataFromPath($explicitPath, $this->data); + + $otherValues = Arr::where(Arr::dot($attributeData), function ($value, $key) use ($parameters) { + return Str::is($parameters[0], $key); + }); + + return in_array($value, $otherValues); + } + + /** + * Validate that an attribute is an integer. + * + * @param string $attribute + * @param mixed $value + * @return bool + */ + protected function validateInteger($attribute, $value) + { + return filter_var($value, FILTER_VALIDATE_INT) !== false; + } + + /** + * Validate that an attribute is a valid IP. + * + * @param string $attribute + * @param mixed $value + * @return bool + */ + protected function validateIp($attribute, $value) + { + return filter_var($value, FILTER_VALIDATE_IP) !== false; + } + + /** + * Validate that an attribute is a valid IPv4. + * + * @param string $attribute + * @param mixed $value + * @return bool + */ + protected function validateIpv4($attribute, $value) + { + return filter_var($value, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4) !== false; + } + + /** + * Validate that an attribute is a valid IPv6. + * + * @param string $attribute + * @param mixed $value + * @return bool + */ + protected function validateIpv6($attribute, $value) + { + return filter_var($value, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6) !== false; + } + + /** + * Validate the attribute is a valid JSON string. + * + * @param string $attribute + * @param mixed $value + * @return bool + */ + protected function validateJson($attribute, $value) + { + if (! is_scalar($value) && ! method_exists($value, '__toString')) { + return false; + } + + json_decode($value); + + return json_last_error() === JSON_ERROR_NONE; + } + + /** + * Validate the size of an attribute is less than a maximum value. + * + * @param string $attribute + * @param mixed $value + * @param array $parameters + * @return bool + */ + protected function validateMax($attribute, $value, $parameters) + { + $this->requireParameterCount(1, $parameters, 'max'); + + if ($value instanceof UploadedFile && ! $value->isValid()) { + return false; + } + + return $this->getSize($attribute, $value) <= $parameters[0]; + } + + /** + * Validate the guessed extension of a file upload is in a set of file extensions. + * + * @param string $attribute + * @param mixed $value + * @param array $parameters + * @return bool + */ + protected function validateMimes($attribute, $value, $parameters) + { + if (! $this->isValidFileInstance($value)) { + return false; + } + + return $value->getPath() != '' && in_array($value->guessExtension(), $parameters); + } + + /** + * Validate the MIME type of a file upload attribute is in a set of MIME types. + * + * @param string $attribute + * @param mixed $value + * @param array $parameters + * @return bool + */ + protected function validateMimetypes($attribute, $value, $parameters) + { + if (! $this->isValidFileInstance($value)) { + return false; + } + + return $value->getPath() != '' && + (in_array($value->getMimeType(), $parameters) || + in_array(explode('/', $value->getMimeType())[0].'/*', $parameters)); + } + + /** + * Validate the size of an attribute is greater than a minimum value. + * + * @param string $attribute + * @param mixed $value + * @param array $parameters + * @return bool + */ + protected function validateMin($attribute, $value, $parameters) + { + $this->requireParameterCount(1, $parameters, 'min'); + + return $this->getSize($attribute, $value) >= $parameters[0]; + } + + /** + * "Indicate" validation should pass if value is null. + * + * Always returns true, just lets us put "nullable" in rules. + * + * @return bool + */ + protected function validateNullable() + { + return true; + } + + /** + * Validate an attribute is not contained within a list of values. + * + * @param string $attribute + * @param mixed $value + * @param array $parameters + * @return bool + */ + protected function validateNotIn($attribute, $value, $parameters) + { + return ! $this->validateIn($attribute, $value, $parameters); + } + + /** + * Validate that an attribute is numeric. + * + * @param string $attribute + * @param mixed $value + * @return bool + */ + protected function validateNumeric($attribute, $value) + { + return is_numeric($value); + } + + /** + * Validate that an attribute exists even if not filled. + * + * @param string $attribute + * @param mixed $value + * @return bool + */ + protected function validatePresent($attribute, $value) + { + return Arr::has($this->data, $attribute); + } + + /** + * Validate that an attribute passes a regular expression check. + * + * @param string $attribute + * @param mixed $value + * @param array $parameters + * @return bool + */ + protected function validateRegex($attribute, $value, $parameters) + { + if (! is_string($value) && ! is_numeric($value)) { + return false; + } + + $this->requireParameterCount(1, $parameters, 'regex'); + + return preg_match($parameters[0], $value) > 0; + } + + /** + * Validate that a required attribute exists. + * + * @param string $attribute + * @param mixed $value + * @return bool + */ + protected function validateRequired($attribute, $value) + { + if (is_null($value)) { + return false; + } elseif (is_string($value) && trim($value) === '') { + return false; + } elseif ((is_array($value) || $value instanceof Countable) && count($value) < 1) { + return false; + } elseif ($value instanceof File) { + return (string) $value->getPath() != ''; + } + + return true; + } + + /** + * Validate that an attribute exists when another attribute has a given value. + * + * @param string $attribute + * @param mixed $value + * @param mixed $parameters + * @return bool + */ + protected function validateRequiredIf($attribute, $value, $parameters) + { + $this->requireParameterCount(2, $parameters, 'required_if'); + + $other = Arr::get($this->data, $parameters[0]); + + $values = array_slice($parameters, 1); + + if (is_bool($other)) { + $values = $this->convertValuesToBoolean($values); + } + + if (in_array($other, $values)) { + return $this->validateRequired($attribute, $value); + } + + return true; + } + + /** + * Convert the given values to boolean if they are string "true" / "false". + * + * @param array $values + * @return array + */ + protected function convertValuesToBoolean($values) + { + return array_map(function ($value) { + if ($value === 'true') { + return true; + } elseif ($value === 'false') { + return false; + } + + return $value; + }, $values); + } + + /** + * Validate that an attribute exists when another attribute does not have a given value. + * + * @param string $attribute + * @param mixed $value + * @param mixed $parameters + * @return bool + */ + protected function validateRequiredUnless($attribute, $value, $parameters) + { + $this->requireParameterCount(2, $parameters, 'required_unless'); + + $data = Arr::get($this->data, $parameters[0]); + + $values = array_slice($parameters, 1); + + if (! in_array($data, $values)) { + return $this->validateRequired($attribute, $value); + } + + return true; + } + + /** + * Validate that an attribute exists when any other attribute exists. + * + * @param string $attribute + * @param mixed $value + * @param mixed $parameters + * @return bool + */ + protected function validateRequiredWith($attribute, $value, $parameters) + { + if (! $this->allFailingRequired($parameters)) { + return $this->validateRequired($attribute, $value); + } + + return true; + } + + /** + * Validate that an attribute exists when all other attributes exists. + * + * @param string $attribute + * @param mixed $value + * @param mixed $parameters + * @return bool + */ + protected function validateRequiredWithAll($attribute, $value, $parameters) + { + if (! $this->anyFailingRequired($parameters)) { + return $this->validateRequired($attribute, $value); + } + + return true; + } + + /** + * Validate that an attribute exists when another attribute does not. + * + * @param string $attribute + * @param mixed $value + * @param mixed $parameters + * @return bool + */ + protected function validateRequiredWithout($attribute, $value, $parameters) + { + if ($this->anyFailingRequired($parameters)) { + return $this->validateRequired($attribute, $value); + } + + return true; + } + + /** + * Validate that an attribute exists when all other attributes do not. + * + * @param string $attribute + * @param mixed $value + * @param mixed $parameters + * @return bool + */ + protected function validateRequiredWithoutAll($attribute, $value, $parameters) + { + if ($this->allFailingRequired($parameters)) { + return $this->validateRequired($attribute, $value); + } + + return true; + } + + /** + * Determine if any of the given attributes fail the required test. + * + * @param array $attributes + * @return bool + */ + protected function anyFailingRequired(array $attributes) + { + foreach ($attributes as $key) { + if (! $this->validateRequired($key, $this->getValue($key))) { + return true; + } + } + + return false; + } + + /** + * Determine if all of the given attributes fail the required test. + * + * @param array $attributes + * @return bool + */ + protected function allFailingRequired(array $attributes) + { + foreach ($attributes as $key) { + if ($this->validateRequired($key, $this->getValue($key))) { + return false; + } + } + + return true; + } + + /** + * Validate that two attributes match. + * + * @param string $attribute + * @param mixed $value + * @param array $parameters + * @return bool + */ + protected function validateSame($attribute, $value, $parameters) + { + $this->requireParameterCount(1, $parameters, 'same'); + + $other = Arr::get($this->data, $parameters[0]); + + return $value === $other; + } + + /** + * Validate the size of an attribute. + * + * @param string $attribute + * @param mixed $value + * @param array $parameters + * @return bool + */ + protected function validateSize($attribute, $value, $parameters) + { + $this->requireParameterCount(1, $parameters, 'size'); + + return $this->getSize($attribute, $value) == $parameters[0]; + } + + /** + * "Validate" optional attributes. + * + * Always returns true, just lets us put sometimes in rules. + * + * @return bool + */ + protected function validateSometimes() + { + return true; + } + + /** + * Validate that an attribute is a string. + * + * @param string $attribute + * @param mixed $value + * @return bool + */ + protected function validateString($attribute, $value) + { + return is_string($value); + } + + /** + * Validate that an attribute is a valid timezone. + * + * @param string $attribute + * @param mixed $value + * @return bool + */ + protected function validateTimezone($attribute, $value) + { + try { + new DateTimeZone($value); + } catch (Exception $e) { + return false; + } catch (Throwable $e) { + return false; + } + + return true; + } + + /** + * Validate that an attribute is a valid URL. + * + * @param string $attribute + * @param mixed $value + * @return bool + */ + protected function validateUrl($attribute, $value) + { + if (! is_string($value)) { + return false; + } + + /* + * This pattern is derived from Symfony\Component\Validator\Constraints\UrlValidator (2.7.4). + * + * (c) Fabien Potencier http://symfony.com + */ + $pattern = '~^ + ((aaa|aaas|about|acap|acct|acr|adiumxtra|afp|afs|aim|apt|attachment|aw|barion|beshare|bitcoin|blob|bolo|callto|cap|chrome|chrome-extension|cid|coap|coaps|com-eventbrite-attendee|content|crid|cvs|data|dav|dict|dlna-playcontainer|dlna-playsingle|dns|dntp|dtn|dvb|ed2k|example|facetime|fax|feed|feedready|file|filesystem|finger|fish|ftp|geo|gg|git|gizmoproject|go|gopher|gtalk|h323|ham|hcp|http|https|iax|icap|icon|im|imap|info|iotdisco|ipn|ipp|ipps|irc|irc6|ircs|iris|iris.beep|iris.lwz|iris.xpc|iris.xpcs|itms|jabber|jar|jms|keyparc|lastfm|ldap|ldaps|magnet|mailserver|mailto|maps|market|message|mid|mms|modem|ms-help|ms-settings|ms-settings-airplanemode|ms-settings-bluetooth|ms-settings-camera|ms-settings-cellular|ms-settings-cloudstorage|ms-settings-emailandaccounts|ms-settings-language|ms-settings-location|ms-settings-lock|ms-settings-nfctransactions|ms-settings-notifications|ms-settings-power|ms-settings-privacy|ms-settings-proximity|ms-settings-screenrotation|ms-settings-wifi|ms-settings-workplace|msnim|msrp|msrps|mtqp|mumble|mupdate|mvn|news|nfs|ni|nih|nntp|notes|oid|opaquelocktoken|pack|palm|paparazzi|pkcs11|platform|pop|pres|prospero|proxy|psyc|query|redis|rediss|reload|res|resource|rmi|rsync|rtmfp|rtmp|rtsp|rtsps|rtspu|secondlife|service|session|sftp|sgn|shttp|sieve|sip|sips|skype|smb|sms|smtp|snews|snmp|soap.beep|soap.beeps|soldat|spotify|ssh|steam|stun|stuns|submit|svn|tag|teamspeak|tel|teliaeid|telnet|tftp|things|thismessage|tip|tn3270|turn|turns|tv|udp|unreal|urn|ut2004|vemmi|ventrilo|videotex|view-source|wais|webcal|ws|wss|wtai|wyciwyg|xcon|xcon-userid|xfire|xmlrpc\.beep|xmlrpc.beeps|xmpp|xri|ymsgr|z39\.50|z39\.50r|z39\.50s)):// # protocol + (([\pL\pN-]+:)?([\pL\pN-]+)@)? # basic auth + ( + ([\pL\pN\pS-\.])+(\.?([\pL]|xn\-\-[\pL\pN-]+)+\.?) # a domain name + | # or + \d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3} # an IP address + | # or + \[ + (?:(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-f]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-f]{1,4})))?::(?:(?:(?:[0-9a-f]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,1}(?:(?:[0-9a-f]{1,4})))?::(?:(?:(?:[0-9a-f]{1,4})):){3})(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,2}(?:(?:[0-9a-f]{1,4})))?::(?:(?:(?:[0-9a-f]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,3}(?:(?:[0-9a-f]{1,4})))?::(?:(?:[0-9a-f]{1,4})):)(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,4}(?:(?:[0-9a-f]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,5}(?:(?:[0-9a-f]{1,4})))?::)(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,6}(?:(?:[0-9a-f]{1,4})))?::)))) + \] # an IPv6 address + ) + (:[0-9]+)? # a port (optional) + (/?|/\S+|\?\S*|\#\S*) # a /, nothing, a / with something, a query or a fragment + $~ixu'; + + return preg_match($pattern, $value) > 0; + } + + /** + * Get the size of an attribute. + * + * @param string $attribute + * @param mixed $value + * @return mixed + */ + protected function getSize($attribute, $value) + { + $hasNumeric = $this->hasRule($attribute, $this->numericRules); + + // This method will determine if the attribute is a number, string, or file and + // return the proper size accordingly. If it is a number, then number itself + // is the size. If it is a file, we take kilobytes, and for a string the + // entire length of the string will be considered the attribute size. + if (is_numeric($value) && $hasNumeric) { + return $value; + } elseif (is_array($value)) { + return count($value); + } elseif ($value instanceof File) { + return $value->getSize() / 1024; + } + + return mb_strlen($value); + } + + /** + * Check that the given value is a valid file instance. + * + * @param mixed $value + * @return bool + */ + public function isValidFileInstance($value) + { + if ($value instanceof UploadedFile && ! $value->isValid()) { + return false; + } + + return $value instanceof File; + } + + /** + * Determine if a comparison passes between the given values. + * + * @param mixed $first + * @param mixed $second + * @param string $operator + * @return bool + */ + protected function compare($first, $second, $operator) + { + switch ($operator) { + case '<': + return $first < $second; + case '>': + return $first > $second; + case '<=': + return $first <= $second; + case '>=': + return $first >= $second; + default: + throw new InvalidArgumentException; + } + } + + /** + * Parse named parameters to $key => $value items. + * + * @param array $parameters + * @return array + */ + protected function parseNamedParameters($parameters) + { + return array_reduce($parameters, function ($result, $item) { + list($key, $value) = array_pad(explode('=', $item, 2), 2, null); + + $result[$key] = $value; + + return $result; + }); + } + + /** + * Require a certain number of parameters to be present. + * + * @param int $count + * @param array $parameters + * @param string $rule + * @return void + * + * @throws \InvalidArgumentException + */ + protected function requireParameterCount($count, $parameters, $rule) + { + if (count($parameters) < $count) { + throw new InvalidArgumentException("Validation rule $rule requires at least $count parameters."); + } + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Validation/DatabasePresenceVerifier.php b/vendor/laravel/framework/src/Illuminate/Validation/DatabasePresenceVerifier.php new file mode 100755 index 0000000..b8cd7c2 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Validation/DatabasePresenceVerifier.php @@ -0,0 +1,138 @@ +db = $db; + } + + /** + * Count the number of objects in a collection having the given value. + * + * @param string $collection + * @param string $column + * @param string $value + * @param int $excludeId + * @param string $idColumn + * @param array $extra + * @return int + */ + public function getCount($collection, $column, $value, $excludeId = null, $idColumn = null, array $extra = []) + { + $query = $this->table($collection)->where($column, '=', $value); + + if (! is_null($excludeId) && $excludeId != 'NULL') { + $query->where($idColumn ?: 'id', '<>', $excludeId); + } + + return $this->addConditions($query, $extra)->count(); + } + + /** + * Count the number of objects in a collection with the given values. + * + * @param string $collection + * @param string $column + * @param array $values + * @param array $extra + * @return int + */ + public function getMultiCount($collection, $column, array $values, array $extra = []) + { + $query = $this->table($collection)->whereIn($column, $values); + + return $this->addConditions($query, $extra)->count(); + } + + /** + * Add the given conditions to the query. + * + * @param \Illuminate\Database\Query\Builder $query + * @param array $conditions + * @return \Illuminate\Database\Query\Builder + */ + protected function addConditions($query, $conditions) + { + foreach ($conditions as $key => $value) { + if ($value instanceof Closure) { + $query->where(function ($query) use ($value) { + $value($query); + }); + } else { + $this->addWhere($query, $key, $value); + } + } + + return $query; + } + + /** + * Add a "where" clause to the given query. + * + * @param \Illuminate\Database\Query\Builder $query + * @param string $key + * @param string $extraValue + * @return void + */ + protected function addWhere($query, $key, $extraValue) + { + if ($extraValue === 'NULL') { + $query->whereNull($key); + } elseif ($extraValue === 'NOT_NULL') { + $query->whereNotNull($key); + } elseif (Str::startsWith($extraValue, '!')) { + $query->where($key, '!=', mb_substr($extraValue, 1)); + } else { + $query->where($key, $extraValue); + } + } + + /** + * Get a query builder for the given table. + * + * @param string $table + * @return \Illuminate\Database\Query\Builder + */ + protected function table($table) + { + return $this->db->connection($this->connection)->table($table)->useWritePdo(); + } + + /** + * Set the connection to be used. + * + * @param string $connection + * @return void + */ + public function setConnection($connection) + { + $this->connection = $connection; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Validation/Factory.php b/vendor/laravel/framework/src/Illuminate/Validation/Factory.php new file mode 100755 index 0000000..d11fa99 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Validation/Factory.php @@ -0,0 +1,283 @@ +container = $container; + $this->translator = $translator; + } + + /** + * Create a new Validator instance. + * + * @param array $data + * @param array $rules + * @param array $messages + * @param array $customAttributes + * @return \Illuminate\Validation\Validator + */ + public function make(array $data, array $rules, array $messages = [], array $customAttributes = []) + { + // The presence verifier is responsible for checking the unique and exists data + // for the validator. It is behind an interface so that multiple versions of + // it may be written besides database. We'll inject it into the validator. + $validator = $this->resolve( + $data, $rules, $messages, $customAttributes + ); + + if (! is_null($this->verifier)) { + $validator->setPresenceVerifier($this->verifier); + } + + // Next we'll set the IoC container instance of the validator, which is used to + // resolve out class based validator extensions. If it is not set then these + // types of extensions will not be possible on these validation instances. + if (! is_null($this->container)) { + $validator->setContainer($this->container); + } + + $this->addExtensions($validator); + + return $validator; + } + + /** + * Validate the given data against the provided rules. + * + * @param array $data + * @param array $rules + * @param array $messages + * @param array $customAttributes + * @return void + * + * @throws \Illuminate\Validation\ValidationException + */ + public function validate(array $data, array $rules, array $messages = [], array $customAttributes = []) + { + $this->make($data, $rules, $messages, $customAttributes)->validate(); + } + + /** + * Resolve a new Validator instance. + * + * @param array $data + * @param array $rules + * @param array $messages + * @param array $customAttributes + * @return \Illuminate\Validation\Validator + */ + protected function resolve(array $data, array $rules, array $messages, array $customAttributes) + { + if (is_null($this->resolver)) { + return new Validator($this->translator, $data, $rules, $messages, $customAttributes); + } + + return call_user_func($this->resolver, $this->translator, $data, $rules, $messages, $customAttributes); + } + + /** + * Add the extensions to a validator instance. + * + * @param \Illuminate\Validation\Validator $validator + * @return void + */ + protected function addExtensions(Validator $validator) + { + $validator->addExtensions($this->extensions); + + // Next, we will add the implicit extensions, which are similar to the required + // and accepted rule in that they are run even if the attributes is not in a + // array of data that is given to a validator instances via instantiation. + $validator->addImplicitExtensions($this->implicitExtensions); + + $validator->addDependentExtensions($this->dependentExtensions); + + $validator->addReplacers($this->replacers); + + $validator->setFallbackMessages($this->fallbackMessages); + } + + /** + * Register a custom validator extension. + * + * @param string $rule + * @param \Closure|string $extension + * @param string $message + * @return void + */ + public function extend($rule, $extension, $message = null) + { + $this->extensions[$rule] = $extension; + + if ($message) { + $this->fallbackMessages[Str::snake($rule)] = $message; + } + } + + /** + * Register a custom implicit validator extension. + * + * @param string $rule + * @param \Closure|string $extension + * @param string $message + * @return void + */ + public function extendImplicit($rule, $extension, $message = null) + { + $this->implicitExtensions[$rule] = $extension; + + if ($message) { + $this->fallbackMessages[Str::snake($rule)] = $message; + } + } + + /** + * Register a custom implicit validator extension. + * + * @param string $rule + * @param \Closure|string $extension + * @param string $message + * @return void + */ + public function extendDependent($rule, $extension, $message = null) + { + $this->dependentExtensions[$rule] = $extension; + + if ($message) { + $this->fallbackMessages[Str::snake($rule)] = $message; + } + } + + /** + * Register a custom implicit validator message replacer. + * + * @param string $rule + * @param \Closure|string $replacer + * @return void + */ + public function replacer($rule, $replacer) + { + $this->replacers[$rule] = $replacer; + } + + /** + * Set the Validator instance resolver. + * + * @param \Closure $resolver + * @return void + */ + public function resolver(Closure $resolver) + { + $this->resolver = $resolver; + } + + /** + * Get the Translator implementation. + * + * @return \Illuminate\Contracts\Translation\Translator + */ + public function getTranslator() + { + return $this->translator; + } + + /** + * Get the Presence Verifier implementation. + * + * @return \Illuminate\Validation\PresenceVerifierInterface + */ + public function getPresenceVerifier() + { + return $this->verifier; + } + + /** + * Set the Presence Verifier implementation. + * + * @param \Illuminate\Validation\PresenceVerifierInterface $presenceVerifier + * @return void + */ + public function setPresenceVerifier(PresenceVerifierInterface $presenceVerifier) + { + $this->verifier = $presenceVerifier; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Validation/PresenceVerifierInterface.php b/vendor/laravel/framework/src/Illuminate/Validation/PresenceVerifierInterface.php new file mode 100755 index 0000000..7449629 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Validation/PresenceVerifierInterface.php @@ -0,0 +1,30 @@ +constraints = $constraints; + } + + /** + * Set the "width" constraint. + * + * @param int $value + * @return $this + */ + public function width($value) + { + $this->constraints['width'] = $value; + + return $this; + } + + /** + * Set the "height" constraint. + * + * @param int $value + * @return $this + */ + public function height($value) + { + $this->constraints['height'] = $value; + + return $this; + } + + /** + * Set the "min width" constraint. + * + * @param int $value + * @return $this + */ + public function minWidth($value) + { + $this->constraints['min_width'] = $value; + + return $this; + } + + /** + * Set the "min height" constraint. + * + * @param int $value + * @return $this + */ + public function minHeight($value) + { + $this->constraints['min_height'] = $value; + + return $this; + } + + /** + * Set the "max width" constraint. + * + * @param int $value + * @return $this + */ + public function maxWidth($value) + { + $this->constraints['max_width'] = $value; + + return $this; + } + + /** + * Set the "max height" constraint. + * + * @param int $value + * @return $this + */ + public function maxHeight($value) + { + $this->constraints['max_height'] = $value; + + return $this; + } + + /** + * Set the "ratio" constraint. + * + * @param float $value + * @return $this + */ + public function ratio($value) + { + $this->constraints['ratio'] = $value; + + return $this; + } + + /** + * Convert the rule to a validation string. + * + * @return string + */ + public function __toString() + { + $result = ''; + + foreach ($this->constraints as $key => $value) { + $result .= "$key=$value,"; + } + + return 'dimensions:'.substr($result, 0, -1); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Validation/Rules/Exists.php b/vendor/laravel/framework/src/Illuminate/Validation/Rules/Exists.php new file mode 100644 index 0000000..017043d --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Validation/Rules/Exists.php @@ -0,0 +1,150 @@ +table = $table; + $this->column = $column; + } + + /** + * Set a "where" constraint on the query. + * + * @param string $column + * @param string $value + * @return $this + */ + public function where($column, $value = null) + { + if ($column instanceof Closure) { + return $this->using($column); + } + + $this->wheres[] = compact('column', 'value'); + + return $this; + } + + /** + * Set a "where not" constraint on the query. + * + * @param string $column + * @param string $value + * @return $this + */ + public function whereNot($column, $value) + { + return $this->where($column, '!'.$value); + } + + /** + * Set a "where null" constraint on the query. + * + * @param string $column + * @return $this + */ + public function whereNull($column) + { + return $this->where($column, 'NULL'); + } + + /** + * Set a "where not null" constraint on the query. + * + * @param string $column + * @return $this + */ + public function whereNotNull($column) + { + return $this->where($column, 'NOT_NULL'); + } + + /** + * Register a custom query callback. + * + * @param \Closure $callback + * @return $this + */ + public function using(Closure $callback) + { + $this->using = $callback; + + return $this; + } + + /** + * Format the where clauses. + * + * @return string + */ + protected function formatWheres() + { + return collect($this->wheres)->map(function ($where) { + return $where['column'].','.$where['value']; + })->implode(','); + } + + /** + * Get the custom query callbacks for the rule. + * + * @return array + */ + public function queryCallbacks() + { + return $this->using ? [$this->using] : []; + } + + /** + * Convert the rule to a validation string. + * + * @return string + */ + public function __toString() + { + return rtrim(sprintf('exists:%s,%s,%s', + $this->table, + $this->column, + $this->formatWheres() + ), ','); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Validation/Rules/In.php b/vendor/laravel/framework/src/Illuminate/Validation/Rules/In.php new file mode 100644 index 0000000..374dd84 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Validation/Rules/In.php @@ -0,0 +1,39 @@ +values = $values; + } + + /** + * Convert the rule to a validation string. + * + * @return string + */ + public function __toString() + { + return $this->rule.':'.implode(',', $this->values); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Validation/Rules/NotIn.php b/vendor/laravel/framework/src/Illuminate/Validation/Rules/NotIn.php new file mode 100644 index 0000000..ed93bc8 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Validation/Rules/NotIn.php @@ -0,0 +1,39 @@ +values = $values; + } + + /** + * Convert the rule to a validation string. + * + * @return string + */ + public function __toString() + { + return $this->rule.':'.implode(',', $this->values); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Validation/Rules/Unique.php b/vendor/laravel/framework/src/Illuminate/Validation/Rules/Unique.php new file mode 100644 index 0000000..957966a --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Validation/Rules/Unique.php @@ -0,0 +1,181 @@ +table = $table; + $this->column = $column; + } + + /** + * Set a "where" constraint on the query. + * + * @param string $column + * @param string $value + * @return $this + */ + public function where($column, $value = null) + { + if ($column instanceof Closure) { + return $this->using($column); + } + + $this->wheres[] = compact('column', 'value'); + + return $this; + } + + /** + * Set a "where not" constraint on the query. + * + * @param string $column + * @param string $value + * @return $this + */ + public function whereNot($column, $value) + { + return $this->where($column, '!'.$value); + } + + /** + * Set a "where null" constraint on the query. + * + * @param string $column + * @return $this + */ + public function whereNull($column) + { + return $this->where($column, 'NULL'); + } + + /** + * Set a "where not null" constraint on the query. + * + * @param string $column + * @return $this + */ + public function whereNotNull($column) + { + return $this->where($column, 'NOT_NULL'); + } + + /** + * Ignore the given ID during the unique check. + * + * @param mixed $id + * @param string $idColumn + * @return $this + */ + public function ignore($id, $idColumn = 'id') + { + $this->ignore = $id; + $this->idColumn = $idColumn; + + return $this; + } + + /** + * Register a custom query callback. + * + * @param \Closure $callback + * @return $this + */ + public function using(Closure $callback) + { + $this->using = $callback; + + return $this; + } + + /** + * Format the where clauses. + * + * @return string + */ + protected function formatWheres() + { + return collect($this->wheres)->map(function ($where) { + return $where['column'].','.$where['value']; + })->implode(','); + } + + /** + * Get the custom query callbacks for the rule. + * + * @return array + */ + public function queryCallbacks() + { + return $this->using ? [$this->using] : []; + } + + /** + * Convert the rule to a validation string. + * + * @return string + */ + public function __toString() + { + return rtrim(sprintf('unique:%s,%s,%s,%s,%s', + $this->table, + $this->column, + $this->ignore ? '"'.$this->ignore.'"' : 'NULL', + $this->idColumn, + $this->formatWheres() + ), ','); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Validation/UnauthorizedException.php b/vendor/laravel/framework/src/Illuminate/Validation/UnauthorizedException.php new file mode 100644 index 0000000..ea8a6ec --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Validation/UnauthorizedException.php @@ -0,0 +1,10 @@ +prepareForValidation(); + + $instance = $this->getValidatorInstance(); + + if (! $this->passesAuthorization()) { + $this->failedAuthorization(); + } elseif (! $instance->passes()) { + $this->failedValidation($instance); + } + } + + /** + * Prepare the data for validation. + * + * @return void + */ + protected function prepareForValidation() + { + // no default action + } + + /** + * Get the validator instance for the request. + * + * @return \Illuminate\Validation\Validator + */ + protected function getValidatorInstance() + { + return $this->validator(); + } + + /** + * Handle a failed validation attempt. + * + * @param \Illuminate\Validation\Validator $validator + * @return void + * + * @throws \Illuminate\Validation\ValidationException + */ + protected function failedValidation(Validator $validator) + { + throw new ValidationException($validator); + } + + /** + * Determine if the request passes the authorization check. + * + * @return bool + */ + protected function passesAuthorization() + { + if (method_exists($this, 'authorize')) { + return $this->authorize(); + } + + return true; + } + + /** + * Handle a failed authorization attempt. + * + * @return void + * + * @throws \Illuminate\Validation\UnauthorizedException + */ + protected function failedAuthorization() + { + throw new UnauthorizedException; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Validation/ValidationData.php b/vendor/laravel/framework/src/Illuminate/Validation/ValidationData.php new file mode 100644 index 0000000..438858a --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Validation/ValidationData.php @@ -0,0 +1,106 @@ + $value) { + if ((bool) preg_match('/^'.$pattern.'/', $key, $matches)) { + $keys[] = $matches[0]; + } + } + + $keys = array_unique($keys); + + $data = []; + + foreach ($keys as $key) { + $data[$key] = array_get($masterData, $key); + } + + return $data; + } + + /** + * Extract data based on the given dot-notated path. + * + * Used to extract a sub-section of the data for faster iteration. + * + * @param string $attribute + * @param array $masterData + * @return array + */ + public static function extractDataFromPath($attribute, $masterData) + { + $results = []; + + $value = Arr::get($masterData, $attribute, '__missing__'); + + if ($value != '__missing__') { + Arr::set($results, $attribute, $value); + } + + return $results; + } + + /** + * Get the explicit part of the attribute name. + * + * E.g. 'foo.bar.*.baz' -> 'foo.bar' + * + * Allows us to not spin through all of the flattened data for some operations. + * + * @param string $attribute + * @return string + */ + public static function getLeadingExplicitAttributePath($attribute) + { + return rtrim(explode('*', $attribute)[0], '.') ?: null; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Validation/ValidationException.php b/vendor/laravel/framework/src/Illuminate/Validation/ValidationException.php new file mode 100644 index 0000000..03b6226 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Validation/ValidationException.php @@ -0,0 +1,47 @@ +response = $response; + $this->validator = $validator; + } + + /** + * Get the underlying response instance. + * + * @return \Symfony\Component\HttpFoundation\Response|null + */ + public function getResponse() + { + return $this->response; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Validation/ValidationRuleParser.php b/vendor/laravel/framework/src/Illuminate/Validation/ValidationRuleParser.php new file mode 100644 index 0000000..73e1a51 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Validation/ValidationRuleParser.php @@ -0,0 +1,264 @@ +data = $data; + } + + /** + * Parse the human-friendly rules into a full rules array for the validator. + * + * @param array $rules + * @return \stdClass + */ + public function explode($rules) + { + $this->implicitAttributes = []; + + $rules = $this->explodeRules($rules); + + return (object) [ + 'rules' => $rules, + 'implicitAttributes' => $this->implicitAttributes, + ]; + } + + /** + * Explode the rules into an array of explicit rules. + * + * @param array $rules + * @return array + */ + protected function explodeRules($rules) + { + foreach ($rules as $key => $rule) { + if (Str::contains($key, '*')) { + $rules = $this->explodeWildcardRules($rules, $key, [$rule]); + + unset($rules[$key]); + } else { + $rules[$key] = $this->explodeExplicitRule($rule); + } + } + + return $rules; + } + + /** + * Explode the explicit rule into an array if necessary. + * + * @param mixed $rule + * @return array + */ + protected function explodeExplicitRule($rule) + { + if (is_string($rule)) { + return explode('|', $rule); + } elseif (is_object($rule)) { + return [$this->prepareRule($rule)]; + } else { + return array_map([$this, 'prepareRule'], $rule); + } + } + + /** + * Prepare the given rule for the Validator. + * + * @param mixed $rule + * @return mixed + */ + protected function prepareRule($rule) + { + if (! is_object($rule) || + ($rule instanceof Exists && $rule->queryCallbacks()) || + ($rule instanceof Unique && $rule->queryCallbacks())) { + return $rule; + } + + return strval($rule); + } + + /** + * Define a set of rules that apply to each element in an array attribute. + * + * @param array $results + * @param string $attribute + * @param string|array $rules + * @return array + */ + protected function explodeWildcardRules($results, $attribute, $rules) + { + $pattern = str_replace('\*', '[^\.]*', preg_quote($attribute)); + + $data = ValidationData::initializeAndGatherData($attribute, $this->data); + + foreach ($data as $key => $value) { + if (Str::startsWith($key, $attribute) || (bool) preg_match('/^'.$pattern.'\z/', $key)) { + foreach ((array) $rules as $rule) { + $this->implicitAttributes[$attribute][] = $key; + + $results = $this->mergeRules($results, $key, $rule); + } + } + } + + return $results; + } + + /** + * Merge additional rules into a given attribute(s). + * + * @param array $results + * @param string|array $attribute + * @param string|array $rules + * @return array + */ + public function mergeRules($results, $attribute, $rules = []) + { + if (is_array($attribute)) { + foreach ((array) $attribute as $innerAttribute => $innerRules) { + $results = $this->mergeRulesForAttribute($results, $innerAttribute, $innerRules); + } + + return $results; + } + + return $this->mergeRulesForAttribute( + $results, $attribute, $rules + ); + } + + /** + * Merge additional rules into a given attribute. + * + * @param array $results + * @param string $attribute + * @param string|array $rules + * @return array + */ + protected function mergeRulesForAttribute($results, $attribute, $rules) + { + $merge = head($this->explodeRules([$rules])); + + $results[$attribute] = array_merge( + isset($results[$attribute]) ? $this->explodeExplicitRule($results[$attribute]) : [], $merge + ); + + return $results; + } + + /** + * Extract the rule name and parameters from a rule. + * + * @param array|string $rules + * @return array + */ + public static function parse($rules) + { + if (is_array($rules)) { + $rules = static::parseArrayRule($rules); + } else { + $rules = static::parseStringRule($rules); + } + + $rules[0] = static::normalizeRule($rules[0]); + + return $rules; + } + + /** + * Parse an array based rule. + * + * @param array $rules + * @return array + */ + protected static function parseArrayRule(array $rules) + { + return [Str::studly(trim(Arr::get($rules, 0))), array_slice($rules, 1)]; + } + + /** + * Parse a string based rule. + * + * @param string $rules + * @return array + */ + protected static function parseStringRule($rules) + { + $parameters = []; + + // The format for specifying validation rules and parameters follows an + // easy {rule}:{parameters} formatting convention. For instance the + // rule "Max:3" states that the value may only be three letters. + if (strpos($rules, ':') !== false) { + list($rules, $parameter) = explode(':', $rules, 2); + + $parameters = static::parseParameters($rules, $parameter); + } + + return [Str::studly(trim($rules)), $parameters]; + } + + /** + * Parse a parameter list. + * + * @param string $rule + * @param string $parameter + * @return array + */ + protected static function parseParameters($rule, $parameter) + { + if (strtolower($rule) == 'regex') { + return [$parameter]; + } + + return str_getcsv($parameter); + } + + /** + * Normalizes a rule so that we can accept short types. + * + * @param string $rule + * @return string + */ + protected static function normalizeRule($rule) + { + switch ($rule) { + case 'Int': + return 'Integer'; + case 'Bool': + return 'Boolean'; + default: + return $rule; + } + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Validation/ValidationServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Validation/ValidationServiceProvider.php new file mode 100755 index 0000000..a3c593f --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Validation/ValidationServiceProvider.php @@ -0,0 +1,72 @@ +registerPresenceVerifier(); + + $this->registerValidationFactory(); + } + + /** + * Register the validation factory. + * + * @return void + */ + protected function registerValidationFactory() + { + $this->app->singleton('validator', function ($app) { + $validator = new Factory($app['translator'], $app); + + // The validation presence verifier is responsible for determining the existence of + // values in a given data collection which is typically a relational database or + // other persistent data stores. It is used to check for "uniqueness" as well. + if (isset($app['db'], $app['validation.presence'])) { + $validator->setPresenceVerifier($app['validation.presence']); + } + + return $validator; + }); + } + + /** + * Register the database presence verifier. + * + * @return void + */ + protected function registerPresenceVerifier() + { + $this->app->singleton('validation.presence', function ($app) { + return new DatabasePresenceVerifier($app['db']); + }); + } + + /** + * Get the services provided by the provider. + * + * @return array + */ + public function provides() + { + return [ + 'validator', 'validation.presence', + ]; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Validation/Validator.php b/vendor/laravel/framework/src/Illuminate/Validation/Validator.php new file mode 100755 index 0000000..9a95c5d --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Validation/Validator.php @@ -0,0 +1,1098 @@ +initialRules = $rules; + $this->translator = $translator; + $this->customMessages = $messages; + $this->data = $this->parseData($data); + $this->customAttributes = $customAttributes; + + $this->setRules($rules); + } + + /** + * Parse the data array, converting dots to ->. + * + * @param array $data + * @return array + */ + public function parseData(array $data) + { + $newData = []; + + foreach ($data as $key => $value) { + if (is_array($value)) { + $value = $this->parseData($value); + } + + // If the data key contains a dot, we will replace it with another character + // sequence so it doesn't interfere with dot processing when working with + // array based validation rules and array_dot later in the validations. + if (Str::contains($key, '.')) { + $newData[str_replace('.', '->', $key)] = $value; + } else { + $newData[$key] = $value; + } + } + + return $newData; + } + + /** + * Add an after validation callback. + * + * @param callable|string $callback + * @return $this + */ + public function after($callback) + { + $this->after[] = function () use ($callback) { + return call_user_func_array($callback, [$this]); + }; + + return $this; + } + + /** + * Determine if the data passes the validation rules. + * + * @return bool + */ + public function passes() + { + $this->messages = new MessageBag; + + // We'll spin through each rule, validating the attributes attached to that + // rule. Any error messages will be added to the containers with each of + // the other error messages, returning true if we don't have messages. + foreach ($this->rules as $attribute => $rules) { + $attribute = str_replace('\.', '->', $attribute); + + foreach ($rules as $rule) { + $this->validateAttribute($attribute, $rule); + + if ($this->shouldStopValidating($attribute)) { + break; + } + } + } + + // Here we will spin through all of the "after" hooks on this validator and + // fire them off. This gives the callbacks a chance to perform all kinds + // of other validation that needs to get wrapped up in this operation. + foreach ($this->after as $after) { + call_user_func($after); + } + + return $this->messages->isEmpty(); + } + + /** + * Determine if the data fails the validation rules. + * + * @return bool + */ + public function fails() + { + return ! $this->passes(); + } + + /** + * Run the validator's rules against its data. + * + * @return void + * + * @throws \Illuminate\Validation\ValidationException + */ + public function validate() + { + if ($this->fails()) { + throw new ValidationException($this); + } + } + + /** + * Validate a given attribute against a rule. + * + * @param string $attribute + * @param string $rule + * @return void + */ + protected function validateAttribute($attribute, $rule) + { + $this->currentRule = $rule; + + list($rule, $parameters) = ValidationRuleParser::parse($rule); + + if ($rule == '') { + return; + } + + // First we will get the correct keys for the given attribute in case the field is nested in + // an array. Then we determine if the given rule accepts other field names as parameters. + // If so, we will replace any asterisks found in the parameters with the correct keys. + if (($keys = $this->getExplicitKeys($attribute)) && + $this->dependsOnOtherFields($rule)) { + $parameters = $this->replaceAsterisksInParameters($parameters, $keys); + } + + $value = $this->getValue($attribute); + + // If the attribute is a file, we will verify that the file upload was actually successful + // and if it wasn't we will add a failure for the attribute. Files may not successfully + // upload if they are too large based on PHP's settings so we will bail in this case. + if ($value instanceof UploadedFile && ! $value->isValid() && + $this->hasRule($attribute, array_merge($this->fileRules, $this->implicitRules)) + ) { + return $this->addFailure($attribute, 'uploaded', []); + } + + // If we have made it this far we will make sure the attribute is validatable and if it is + // we will call the validation method with the attribute. If a method returns false the + // attribute is invalid and we will add a failure message for this failing attribute. + $validatable = $this->isValidatable($rule, $attribute, $value); + + $method = "validate{$rule}"; + + if ($validatable && ! $this->$method($attribute, $value, $parameters, $this)) { + $this->addFailure($attribute, $rule, $parameters); + } + } + + /** + * Determine if the given rule depends on other fields. + * + * @param string $rule + * @return bool + */ + protected function dependsOnOtherFields($rule) + { + return in_array($rule, $this->dependentRules); + } + + /** + * Get the explicit keys from an attribute flattened with dot notation. + * + * E.g. 'foo.1.bar.spark.baz' -> [1, 'spark'] for 'foo.*.bar.*.baz' + * + * @param string $attribute + * @return array + */ + protected function getExplicitKeys($attribute) + { + $pattern = str_replace('\*', '([^\.]+)', preg_quote($this->getPrimaryAttribute($attribute), '/')); + + if (preg_match('/^'.$pattern.'/', $attribute, $keys)) { + array_shift($keys); + + return $keys; + } + + return []; + } + + /** + * Get the primary attribute name. + * + * For example, if "name.0" is given, "name.*" will be returned. + * + * @param string $attribute + * @return string + */ + protected function getPrimaryAttribute($attribute) + { + foreach ($this->implicitAttributes as $unparsed => $parsed) { + if (in_array($attribute, $parsed)) { + return $unparsed; + } + } + + return $attribute; + } + + /** + * Replace each field parameter which has asterisks with the given keys. + * + * @param array $parameters + * @param array $keys + * @return array + */ + protected function replaceAsterisksInParameters(array $parameters, array $keys) + { + return array_map(function ($field) use ($keys) { + return vsprintf(str_replace('*', '%s', $field), $keys); + }, $parameters); + } + + /** + * Determine if the attribute is validatable. + * + * @param string $rule + * @param string $attribute + * @param mixed $value + * @return bool + */ + protected function isValidatable($rule, $attribute, $value) + { + return $this->presentOrRuleIsImplicit($rule, $attribute, $value) && + $this->passesOptionalCheck($attribute) && + $this->isNotNullIfMarkedAsNullable($rule, $attribute) && + $this->hasNotFailedPreviousRuleIfPresenceRule($rule, $attribute); + } + + /** + * Determine if the field is present, or the rule implies required. + * + * @param string $rule + * @param string $attribute + * @param mixed $value + * @return bool + */ + protected function presentOrRuleIsImplicit($rule, $attribute, $value) + { + if (is_string($value) && trim($value) === '') { + return $this->isImplicit($rule); + } + + return $this->validatePresent($attribute, $value) || $this->isImplicit($rule); + } + + /** + * Determine if a given rule implies the attribute is required. + * + * @param string $rule + * @return bool + */ + protected function isImplicit($rule) + { + return in_array($rule, $this->implicitRules); + } + + /** + * Determine if the attribute passes any optional check. + * + * @param string $attribute + * @return bool + */ + protected function passesOptionalCheck($attribute) + { + if (! $this->hasRule($attribute, ['Sometimes'])) { + return true; + } + + $data = ValidationData::initializeAndGatherData($attribute, $this->data); + + return array_key_exists($attribute, $data) + || in_array($attribute, array_keys($this->data)); + } + + /** + * Determine if the attribute fails the nullable check. + * + * @param string $rule + * @param string $attribute + * @return bool + */ + protected function isNotNullIfMarkedAsNullable($rule, $attribute) + { + if (in_array($rule, $this->implicitRules) || ! $this->hasRule($attribute, ['Nullable'])) { + return true; + } + + return ! is_null(Arr::get($this->data, $attribute, 0)); + } + + /** + * Determine if it's a necessary presence validation. + * + * This is to avoid possible database type comparison errors. + * + * @param string $rule + * @param string $attribute + * @return bool + */ + protected function hasNotFailedPreviousRuleIfPresenceRule($rule, $attribute) + { + return in_array($rule, ['Unique', 'Exists']) ? ! $this->messages->has($attribute) : true; + } + + /** + * Check if we should stop further validations on a given attribute. + * + * @param string $attribute + * @return bool + */ + protected function shouldStopValidating($attribute) + { + if ($this->hasRule($attribute, ['Bail'])) { + return $this->messages->has($attribute); + } + + if (isset($this->failedRules[$attribute]) && + in_array('uploaded', array_keys($this->failedRules[$attribute]))) { + return true; + } + + // In case the attribute has any rule that indicates that the field is required + // and that rule already failed then we should stop validation at this point + // as now there is no point in calling other rules with this field empty. + return $this->hasRule($attribute, $this->implicitRules) && + isset($this->failedRules[$attribute]) && + array_intersect(array_keys($this->failedRules[$attribute]), $this->implicitRules); + } + + /** + * Add a failed rule and error message to the collection. + * + * @param string $attribute + * @param string $rule + * @param array $parameters + * @return void + */ + protected function addFailure($attribute, $rule, $parameters) + { + $this->messages->add($attribute, $this->makeReplacements( + $this->getMessage($attribute, $rule), $attribute, $rule, $parameters + )); + + $this->failedRules[$attribute][$rule] = $parameters; + } + + /** + * Returns the data which was valid. + * + * @return array + */ + public function valid() + { + if (! $this->messages) { + $this->passes(); + } + + return array_diff_key( + $this->data, $this->attributesThatHaveMessages() + ); + } + + /** + * Returns the data which was invalid. + * + * @return array + */ + public function invalid() + { + if (! $this->messages) { + $this->passes(); + } + + return array_intersect_key( + $this->data, $this->attributesThatHaveMessages() + ); + } + + /** + * Generate an array of all attributes that have messages. + * + * @return array + */ + protected function attributesThatHaveMessages() + { + return collect($this->messages()->toArray())->map(function ($message, $key) { + return explode('.', $key)[0]; + })->unique()->flip()->all(); + } + + /** + * Get the failed validation rules. + * + * @return array + */ + public function failed() + { + return $this->failedRules; + } + + /** + * Get the message container for the validator. + * + * @return \Illuminate\Support\MessageBag + */ + public function messages() + { + if (! $this->messages) { + $this->passes(); + } + + return $this->messages; + } + + /** + * An alternative more semantic shortcut to the message container. + * + * @return \Illuminate\Support\MessageBag + */ + public function errors() + { + return $this->messages(); + } + + /** + * Get the messages for the instance. + * + * @return \Illuminate\Support\MessageBag + */ + public function getMessageBag() + { + return $this->messages(); + } + + /** + * Determine if the given attribute has a rule in the given set. + * + * @param string $attribute + * @param string|array $rules + * @return bool + */ + public function hasRule($attribute, $rules) + { + return ! is_null($this->getRule($attribute, $rules)); + } + + /** + * Get a rule and its parameters for a given attribute. + * + * @param string $attribute + * @param string|array $rules + * @return array|null + */ + protected function getRule($attribute, $rules) + { + if (! array_key_exists($attribute, $this->rules)) { + return; + } + + $rules = (array) $rules; + + foreach ($this->rules[$attribute] as $rule) { + list($rule, $parameters) = ValidationRuleParser::parse($rule); + + if (in_array($rule, $rules)) { + return [$rule, $parameters]; + } + } + } + + /** + * Get the data under validation. + * + * @return array + */ + public function attributes() + { + return $this->getData(); + } + + /** + * Get the data under validation. + * + * @return array + */ + public function getData() + { + return $this->data; + } + + /** + * Set the data under validation. + * + * @param array $data + * @return $this + */ + public function setData(array $data) + { + $this->data = $this->parseData($data); + + $this->setRules($this->initialRules); + + return $this; + } + + /** + * Get the value of a given attribute. + * + * @param string $attribute + * @return mixed + */ + protected function getValue($attribute) + { + return Arr::get($this->data, $attribute); + } + + /** + * Get the validation rules. + * + * @return array + */ + public function getRules() + { + return $this->rules; + } + + /** + * Set the validation rules. + * + * @param array $rules + * @return $this + */ + public function setRules(array $rules) + { + $this->initialRules = $rules; + + $this->rules = []; + + $this->addRules($rules); + + return $this; + } + + /** + * Parse the given rules and merge them into current rules. + * + * @param array $rules + * @return void + */ + public function addRules($rules) + { + // The primary purpose of this parser is to expand any "*" rules to the all + // of the explicit rules needed for the given data. For example the rule + // names.* would get expanded to names.0, names.1, etc. for this data. + $response = (new ValidationRuleParser($this->data)) + ->explode($rules); + + $this->rules = array_merge_recursive( + $this->rules, $response->rules + ); + + $this->implicitAttributes = array_merge( + $this->implicitAttributes, $response->implicitAttributes + ); + } + + /** + * Add conditions to a given field based on a Closure. + * + * @param string|array $attribute + * @param string|array $rules + * @param callable $callback + * @return $this + */ + public function sometimes($attribute, $rules, callable $callback) + { + $payload = new Fluent($this->getData()); + + if (call_user_func($callback, $payload)) { + foreach ((array) $attribute as $key) { + $this->addRules([$key => $rules]); + } + } + + return $this; + } + + /** + * Register an array of custom validator extensions. + * + * @param array $extensions + * @return void + */ + public function addExtensions(array $extensions) + { + if ($extensions) { + $keys = array_map('\Illuminate\Support\Str::snake', array_keys($extensions)); + + $extensions = array_combine($keys, array_values($extensions)); + } + + $this->extensions = array_merge($this->extensions, $extensions); + } + + /** + * Register an array of custom implicit validator extensions. + * + * @param array $extensions + * @return void + */ + public function addImplicitExtensions(array $extensions) + { + $this->addExtensions($extensions); + + foreach ($extensions as $rule => $extension) { + $this->implicitRules[] = Str::studly($rule); + } + } + + /** + * Register an array of custom implicit validator extensions. + * + * @param array $extensions + * @return void + */ + public function addDependentExtensions(array $extensions) + { + $this->addExtensions($extensions); + + foreach ($extensions as $rule => $extension) { + $this->dependentRules[] = Str::studly($rule); + } + } + + /** + * Register a custom validator extension. + * + * @param string $rule + * @param \Closure|string $extension + * @return void + */ + public function addExtension($rule, $extension) + { + $this->extensions[Str::snake($rule)] = $extension; + } + + /** + * Register a custom implicit validator extension. + * + * @param string $rule + * @param \Closure|string $extension + * @return void + */ + public function addImplicitExtension($rule, $extension) + { + $this->addExtension($rule, $extension); + + $this->implicitRules[] = Str::studly($rule); + } + + /** + * Register a custom dependent validator extension. + * + * @param string $rule + * @param \Closure|string $extension + * @return void + */ + public function addDependentExtension($rule, $extension) + { + $this->addExtension($rule, $extension); + + $this->dependentRules[] = Str::studly($rule); + } + + /** + * Register an array of custom validator message replacers. + * + * @param array $replacers + * @return void + */ + public function addReplacers(array $replacers) + { + if ($replacers) { + $keys = array_map('\Illuminate\Support\Str::snake', array_keys($replacers)); + + $replacers = array_combine($keys, array_values($replacers)); + } + + $this->replacers = array_merge($this->replacers, $replacers); + } + + /** + * Register a custom validator message replacer. + * + * @param string $rule + * @param \Closure|string $replacer + * @return void + */ + public function addReplacer($rule, $replacer) + { + $this->replacers[Str::snake($rule)] = $replacer; + } + + /** + * Set the custom messages for the validator. + * + * @param array $messages + * @return void + */ + public function setCustomMessages(array $messages) + { + $this->customMessages = array_merge($this->customMessages, $messages); + } + + /** + * Set the custom attributes on the validator. + * + * @param array $attributes + * @return $this + */ + public function setAttributeNames(array $attributes) + { + $this->customAttributes = $attributes; + + return $this; + } + + /** + * Add custom attributes to the validator. + * + * @param array $customAttributes + * @return $this + */ + public function addCustomAttributes(array $customAttributes) + { + $this->customAttributes = array_merge($this->customAttributes, $customAttributes); + + return $this; + } + + /** + * Set the custom values on the validator. + * + * @param array $values + * @return $this + */ + public function setValueNames(array $values) + { + $this->customValues = $values; + + return $this; + } + + /** + * Add the custom values for the validator. + * + * @param array $customValues + * @return $this + */ + public function addCustomValues(array $customValues) + { + $this->customValues = array_merge($this->customValues, $customValues); + + return $this; + } + + /** + * Set the fallback messages for the validator. + * + * @param array $messages + * @return void + */ + public function setFallbackMessages(array $messages) + { + $this->fallbackMessages = $messages; + } + + /** + * Get the Presence Verifier implementation. + * + * @return \Illuminate\Validation\PresenceVerifierInterface + * + * @throws \RuntimeException + */ + public function getPresenceVerifier() + { + if (! isset($this->presenceVerifier)) { + throw new RuntimeException('Presence verifier has not been set.'); + } + + return $this->presenceVerifier; + } + + /** + * Get the Presence Verifier implementation. + * + * @param string $connection + * @return \Illuminate\Validation\PresenceVerifierInterface + * + * @throws \RuntimeException + */ + protected function getPresenceVerifierFor($connection) + { + return tap($this->getPresenceVerifier(), function ($verifier) use ($connection) { + $verifier->setConnection($connection); + }); + } + + /** + * Set the Presence Verifier implementation. + * + * @param \Illuminate\Validation\PresenceVerifierInterface $presenceVerifier + * @return void + */ + public function setPresenceVerifier(PresenceVerifierInterface $presenceVerifier) + { + $this->presenceVerifier = $presenceVerifier; + } + + /** + * Get the Translator implementation. + * + * @return \Illuminate\Contracts\Translation\Translator + */ + public function getTranslator() + { + return $this->translator; + } + + /** + * Set the Translator implementation. + * + * @param \Illuminate\Contracts\Translation\Translator $translator + * @return void + */ + public function setTranslator(Translator $translator) + { + $this->translator = $translator; + } + + /** + * Set the IoC container instance. + * + * @param \Illuminate\Contracts\Container\Container $container + * @return void + */ + public function setContainer(Container $container) + { + $this->container = $container; + } + + /** + * Call a custom validator extension. + * + * @param string $rule + * @param array $parameters + * @return bool|null + */ + protected function callExtension($rule, $parameters) + { + $callback = $this->extensions[$rule]; + + if (is_callable($callback)) { + return call_user_func_array($callback, $parameters); + } elseif (is_string($callback)) { + return $this->callClassBasedExtension($callback, $parameters); + } + } + + /** + * Call a class based validator extension. + * + * @param string $callback + * @param array $parameters + * @return bool + */ + protected function callClassBasedExtension($callback, $parameters) + { + list($class, $method) = Str::parseCallback($callback, 'validate'); + + return call_user_func_array([$this->container->make($class), $method], $parameters); + } + + /** + * Handle dynamic calls to class methods. + * + * @param string $method + * @param array $parameters + * @return mixed + * + * @throws \BadMethodCallException + */ + public function __call($method, $parameters) + { + $rule = Str::snake(substr($method, 8)); + + if (isset($this->extensions[$rule])) { + return $this->callExtension($rule, $parameters); + } + + throw new BadMethodCallException("Method [$method] does not exist."); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Validation/composer.json b/vendor/laravel/framework/src/Illuminate/Validation/composer.json new file mode 100755 index 0000000..497a1db --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Validation/composer.json @@ -0,0 +1,41 @@ +{ + "name": "illuminate/validation", + "description": "The Illuminate Validation package.", + "license": "MIT", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "require": { + "php": ">=5.6.4", + "illuminate/container": "5.4.*", + "illuminate/contracts": "5.4.*", + "illuminate/support": "5.4.*", + "illuminate/translation": "5.4.*", + "symfony/http-foundation": "~3.2" + }, + "autoload": { + "psr-4": { + "Illuminate\\Validation\\": "" + } + }, + "extra": { + "branch-alias": { + "dev-master": "5.4-dev" + } + }, + "suggest": { + "illuminate/database": "Required to use the database presence verifier (5.4.*)." + }, + "config": { + "sort-packages": true + }, + "minimum-stability": "dev" +} diff --git a/vendor/laravel/framework/src/Illuminate/View/Compilers/BladeCompiler.php b/vendor/laravel/framework/src/Illuminate/View/Compilers/BladeCompiler.php new file mode 100644 index 0000000..e11731e --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/View/Compilers/BladeCompiler.php @@ -0,0 +1,380 @@ +setPath($path); + } + + if (! is_null($this->cachePath)) { + $contents = $this->compileString($this->files->get($this->getPath())); + + $this->files->put($this->getCompiledPath($this->getPath()), $contents); + } + } + + /** + * Get the path currently being compiled. + * + * @return string + */ + public function getPath() + { + return $this->path; + } + + /** + * Set the path currently being compiled. + * + * @param string $path + * @return void + */ + public function setPath($path) + { + $this->path = $path; + } + + /** + * Compile the given Blade template contents. + * + * @param string $value + * @return string + */ + public function compileString($value) + { + $result = ''; + + if (strpos($value, '@verbatim') !== false) { + $value = $this->storeVerbatimBlocks($value); + } + + $this->footer = []; + + // Here we will loop through all of the tokens returned by the Zend lexer and + // parse each one into the corresponding valid PHP. We will then have this + // template as the correctly rendered PHP that can be rendered natively. + foreach (token_get_all($value) as $token) { + $result .= is_array($token) ? $this->parseToken($token) : $token; + } + + if (! empty($this->verbatimBlocks)) { + $result = $this->restoreVerbatimBlocks($result); + } + + // If there are any footer lines that need to get added to a template we will + // add them here at the end of the template. This gets used mainly for the + // template inheritance via the extends keyword that should be appended. + if (count($this->footer) > 0) { + $result = $this->addFooters($result); + } + + return $result; + } + + /** + * Store the verbatim blocks and replace them with a temporary placeholder. + * + * @param string $value + * @return string + */ + protected function storeVerbatimBlocks($value) + { + return preg_replace_callback('/(?verbatimBlocks[] = $matches[1]; + + return $this->verbatimPlaceholder; + }, $value); + } + + /** + * Replace the raw placeholders with the original code stored in the raw blocks. + * + * @param string $result + * @return string + */ + protected function restoreVerbatimBlocks($result) + { + $result = preg_replace_callback('/'.preg_quote($this->verbatimPlaceholder).'/', function () { + return array_shift($this->verbatimBlocks); + }, $result); + + $this->verbatimBlocks = []; + + return $result; + } + + /** + * Add the stored footers onto the given content. + * + * @param string $result + * @return string + */ + protected function addFooters($result) + { + return ltrim($result, PHP_EOL) + .PHP_EOL.implode(PHP_EOL, array_reverse($this->footer)); + } + + /** + * Parse the tokens from the template. + * + * @param array $token + * @return string + */ + protected function parseToken($token) + { + list($id, $content) = $token; + + if ($id == T_INLINE_HTML) { + foreach ($this->compilers as $type) { + $content = $this->{"compile{$type}"}($content); + } + } + + return $content; + } + + /** + * Execute the user defined extensions. + * + * @param string $value + * @return string + */ + protected function compileExtensions($value) + { + foreach ($this->extensions as $compiler) { + $value = call_user_func($compiler, $value, $this); + } + + return $value; + } + + /** + * Compile Blade statements that start with "@". + * + * @param string $value + * @return string + */ + protected function compileStatements($value) + { + return preg_replace_callback( + '/\B@(@?\w+(?:::\w+)?)([ \t]*)(\( ( (?>[^()]+) | (?3) )* \))?/x', function ($match) { + return $this->compileStatement($match); + }, $value + ); + } + + /** + * Compile a single Blade @ statement. + * + * @param array $match + * @return string + */ + protected function compileStatement($match) + { + if (Str::contains($match[1], '@')) { + $match[0] = isset($match[3]) ? $match[1].$match[3] : $match[1]; + } elseif (isset($this->customDirectives[$match[1]])) { + $match[0] = $this->callCustomDirective($match[1], Arr::get($match, 3)); + } elseif (method_exists($this, $method = 'compile'.ucfirst($match[1]))) { + $match[0] = $this->$method(Arr::get($match, 3)); + } + + return isset($match[3]) ? $match[0] : $match[0].$match[2]; + } + + /** + * Call the given directive with the given value. + * + * @param string $name + * @param string|null $value + * @return string + */ + protected function callCustomDirective($name, $value) + { + if (Str::startsWith($value, '(') && Str::endsWith($value, ')')) { + $value = Str::substr($value, 1, -1); + } + + return call_user_func($this->customDirectives[$name], trim($value)); + } + + /** + * Strip the parentheses from the given expression. + * + * @param string $expression + * @return string + */ + public function stripParentheses($expression) + { + if (Str::startsWith($expression, '(')) { + $expression = substr($expression, 1, -1); + } + + return $expression; + } + + /** + * Register a custom Blade compiler. + * + * @param callable $compiler + * @return void + */ + public function extend(callable $compiler) + { + $this->extensions[] = $compiler; + } + + /** + * Get the extensions used by the compiler. + * + * @return array + */ + public function getExtensions() + { + return $this->extensions; + } + + /** + * Register a handler for custom directives. + * + * @param string $name + * @param callable $handler + * @return void + */ + public function directive($name, callable $handler) + { + $this->customDirectives[$name] = $handler; + } + + /** + * Get the list of custom directives. + * + * @return array + */ + public function getCustomDirectives() + { + return $this->customDirectives; + } + + /** + * Set the echo format to be used by the compiler. + * + * @param string $format + * @return void + */ + public function setEchoFormat($format) + { + $this->echoFormat = $format; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/View/Compilers/Compiler.php b/vendor/laravel/framework/src/Illuminate/View/Compilers/Compiler.php new file mode 100755 index 0000000..9407419 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/View/Compilers/Compiler.php @@ -0,0 +1,74 @@ +files = $files; + $this->cachePath = $cachePath; + } + + /** + * Get the path to the compiled version of a view. + * + * @param string $path + * @return string + */ + public function getCompiledPath($path) + { + return $this->cachePath.'/'.sha1($path).'.php'; + } + + /** + * Determine if the view at the given path is expired. + * + * @param string $path + * @return bool + */ + public function isExpired($path) + { + $compiled = $this->getCompiledPath($path); + + // If the compiled file doesn't exist we will indicate that the view is expired + // so that it can be re-compiled. Else, we will verify the last modification + // of the views is less than the modification times of the compiled views. + if (! $this->files->exists($compiled)) { + return true; + } + + return $this->files->lastModified($path) >= + $this->files->lastModified($compiled); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/View/Compilers/CompilerInterface.php b/vendor/laravel/framework/src/Illuminate/View/Compilers/CompilerInterface.php new file mode 100755 index 0000000..dfcb023 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/View/Compilers/CompilerInterface.php @@ -0,0 +1,30 @@ +check{$expression}): ?>"; + } + + /** + * Compile the cannot statements into valid PHP. + * + * @param string $expression + * @return string + */ + protected function compileCannot($expression) + { + return "denies{$expression}): ?>"; + } + + /** + * Compile the else-can statements into valid PHP. + * + * @param string $expression + * @return string + */ + protected function compileElsecan($expression) + { + return "check{$expression}): ?>"; + } + + /** + * Compile the else-cannot statements into valid PHP. + * + * @param string $expression + * @return string + */ + protected function compileElsecannot($expression) + { + return "denies{$expression}): ?>"; + } + + /** + * Compile the end-can statements into valid PHP. + * + * @return string + */ + protected function compileEndcan() + { + return ''; + } + + /** + * Compile the end-cannot statements into valid PHP. + * + * @return string + */ + protected function compileEndcannot() + { + return ''; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesComments.php b/vendor/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesComments.php new file mode 100644 index 0000000..104a9c8 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesComments.php @@ -0,0 +1,19 @@ +contentTags[0], $this->contentTags[1]); + + return preg_replace($pattern, '', $value); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesComponents.php b/vendor/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesComponents.php new file mode 100644 index 0000000..af0eee7 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesComponents.php @@ -0,0 +1,48 @@ +startComponent{$expression}; ?>"; + } + + /** + * Compile the end-component statements into valid PHP. + * + * @return string + */ + protected function compileEndComponent() + { + return 'renderComponent(); ?>'; + } + + /** + * Compile the slot statements into valid PHP. + * + * @param string $expression + * @return string + */ + protected function compileSlot($expression) + { + return "slot{$expression}; ?>"; + } + + /** + * Compile the end-slot statements into valid PHP. + * + * @return string + */ + protected function compileEndSlot() + { + return 'endSlot(); ?>'; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesConditionals.php b/vendor/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesConditionals.php new file mode 100644 index 0000000..22977a0 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesConditionals.php @@ -0,0 +1,101 @@ +yieldContent{$expression}))): ?>"; + } + + /** + * Compile the if statements into valid PHP. + * + * @param string $expression + * @return string + */ + protected function compileIf($expression) + { + return ""; + } + + /** + * Compile the unless statements into valid PHP. + * + * @param string $expression + * @return string + */ + protected function compileUnless($expression) + { + return ""; + } + + /** + * Compile the else-if statements into valid PHP. + * + * @param string $expression + * @return string + */ + protected function compileElseif($expression) + { + return ""; + } + + /** + * Compile the else statements into valid PHP. + * + * @return string + */ + protected function compileElse() + { + return ''; + } + + /** + * Compile the end-if statements into valid PHP. + * + * @return string + */ + protected function compileEndif() + { + return ''; + } + + /** + * Compile the end-unless statements into valid PHP. + * + * @return string + */ + protected function compileEndunless() + { + return ''; + } + + /** + * Compile the if-isset statements into valid PHP. + * + * @param string $expression + * @return string + */ + protected function compileIsset($expression) + { + return ""; + } + + /** + * Compile the end-isset statements into valid PHP. + * + * @return string + */ + protected function compileEndIsset() + { + return ''; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesEchos.php b/vendor/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesEchos.php new file mode 100644 index 0000000..a7b4887 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesEchos.php @@ -0,0 +1,105 @@ +getEchoMethods() as $method) { + $value = $this->$method($value); + } + + return $value; + } + + /** + * Get the echo methods in the proper order for compilation. + * + * @return array + */ + protected function getEchoMethods() + { + return [ + 'compileRawEchos', + 'compileEscapedEchos', + 'compileRegularEchos', + ]; + } + + /** + * Compile the "raw" echo statements. + * + * @param string $value + * @return string + */ + protected function compileRawEchos($value) + { + $pattern = sprintf('/(@)?%s\s*(.+?)\s*%s(\r?\n)?/s', $this->rawTags[0], $this->rawTags[1]); + + $callback = function ($matches) { + $whitespace = empty($matches[3]) ? '' : $matches[3].$matches[3]; + + return $matches[1] ? substr($matches[0], 1) : "compileEchoDefaults($matches[2])}; ?>{$whitespace}"; + }; + + return preg_replace_callback($pattern, $callback, $value); + } + + /** + * Compile the "regular" echo statements. + * + * @param string $value + * @return string + */ + protected function compileRegularEchos($value) + { + $pattern = sprintf('/(@)?%s\s*(.+?)\s*%s(\r?\n)?/s', $this->contentTags[0], $this->contentTags[1]); + + $callback = function ($matches) { + $whitespace = empty($matches[3]) ? '' : $matches[3].$matches[3]; + + $wrapped = sprintf($this->echoFormat, $this->compileEchoDefaults($matches[2])); + + return $matches[1] ? substr($matches[0], 1) : "{$whitespace}"; + }; + + return preg_replace_callback($pattern, $callback, $value); + } + + /** + * Compile the escaped echo statements. + * + * @param string $value + * @return string + */ + protected function compileEscapedEchos($value) + { + $pattern = sprintf('/(@)?%s\s*(.+?)\s*%s(\r?\n)?/s', $this->escapedTags[0], $this->escapedTags[1]); + + $callback = function ($matches) { + $whitespace = empty($matches[3]) ? '' : $matches[3].$matches[3]; + + return $matches[1] ? $matches[0] : "compileEchoDefaults($matches[2])}); ?>{$whitespace}"; + }; + + return preg_replace_callback($pattern, $callback, $value); + } + + /** + * Compile the default values for the echo statement. + * + * @param string $value + * @return string + */ + public function compileEchoDefaults($value) + { + return preg_replace('/^(?=\$)(.+?)(?:\s+or\s+)(.+?)$/s', 'isset($1) ? $1 : $2', $value); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesIncludes.php b/vendor/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesIncludes.php new file mode 100644 index 0000000..595f70c --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesIncludes.php @@ -0,0 +1,56 @@ +renderEach{$expression}; ?>"; + } + + /** + * Compile the include statements into valid PHP. + * + * @param string $expression + * @return string + */ + protected function compileInclude($expression) + { + $expression = $this->stripParentheses($expression); + + return "make({$expression}, array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>"; + } + + /** + * Compile the include-if statements into valid PHP. + * + * @param string $expression + * @return string + */ + protected function compileIncludeIf($expression) + { + $expression = $this->stripParentheses($expression); + + return "exists({$expression})) echo \$__env->make({$expression}, array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>"; + } + + /** + * Compile the include-when statements into valid PHP. + * + * @param string $expression + * @return string + */ + protected function compileIncludeWhen($expression) + { + $expression = $this->stripParentheses($expression); + + return "renderWhen($expression, array_except(get_defined_vars(), array('__data', '__path'))); ?>"; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesInjections.php b/vendor/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesInjections.php new file mode 100644 index 0000000..c295bcd --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesInjections.php @@ -0,0 +1,23 @@ +"; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesLayouts.php b/vendor/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesLayouts.php new file mode 100644 index 0000000..329a705 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesLayouts.php @@ -0,0 +1,116 @@ +stripParentheses($expression); + + $echo = "make({$expression}, array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>"; + + $this->footer[] = $echo; + + return ''; + } + + /** + * Compile the section statements into valid PHP. + * + * @param string $expression + * @return string + */ + protected function compileSection($expression) + { + $this->lastSection = trim($expression, "()'\" "); + + return "startSection{$expression}; ?>"; + } + + /** + * Replace the @parent directive to a placeholder. + * + * @return string + */ + protected function compileParent() + { + return ViewFactory::parentPlaceholder($this->lastSection ?: ''); + } + + /** + * Compile the yield statements into valid PHP. + * + * @param string $expression + * @return string + */ + protected function compileYield($expression) + { + return "yieldContent{$expression}; ?>"; + } + + /** + * Compile the show statements into valid PHP. + * + * @return string + */ + protected function compileShow() + { + return 'yieldSection(); ?>'; + } + + /** + * Compile the append statements into valid PHP. + * + * @return string + */ + protected function compileAppend() + { + return 'appendSection(); ?>'; + } + + /** + * Compile the overwrite statements into valid PHP. + * + * @return string + */ + protected function compileOverwrite() + { + return 'stopSection(true); ?>'; + } + + /** + * Compile the stop statements into valid PHP. + * + * @return string + */ + protected function compileStop() + { + return 'stopSection(); ?>'; + } + + /** + * Compile the end-section statements into valid PHP. + * + * @return string + */ + protected function compileEndsection() + { + return 'stopSection(); ?>'; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesLoops.php b/vendor/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesLoops.php new file mode 100644 index 0000000..9f64c4f --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesLoops.php @@ -0,0 +1,180 @@ +forElseCounter; + + preg_match('/\( *(.*) +as *(.*)\)$/is', $expression, $matches); + + $iteratee = trim($matches[1]); + + $iteration = trim($matches[2]); + + $initLoop = "\$__currentLoopData = {$iteratee}; \$__env->addLoop(\$__currentLoopData);"; + + $iterateLoop = '$__env->incrementLoopIndices(); $loop = $__env->getLastLoop();'; + + return ""; + } + + /** + * Compile the for-else-empty and empty statements into valid PHP. + * + * @param string $expression + * @return string + */ + protected function compileEmpty($expression) + { + if ($expression) { + return ""; + } + + $empty = '$__empty_'.$this->forElseCounter--; + + return "popLoop(); \$loop = \$__env->getLastLoop(); if ({$empty}): ?>"; + } + + /** + * Compile the end-for-else statements into valid PHP. + * + * @return string + */ + protected function compileEndforelse() + { + return ''; + } + + /** + * Compile the end-empty statements into valid PHP. + * + * @return string + */ + protected function compileEndEmpty() + { + return ''; + } + + /** + * Compile the for statements into valid PHP. + * + * @param string $expression + * @return string + */ + protected function compileFor($expression) + { + return ""; + } + + /** + * Compile the for-each statements into valid PHP. + * + * @param string $expression + * @return string + */ + protected function compileForeach($expression) + { + preg_match('/\( *(.*) +as *(.*)\)$/is', $expression, $matches); + + $iteratee = trim($matches[1]); + + $iteration = trim($matches[2]); + + $initLoop = "\$__currentLoopData = {$iteratee}; \$__env->addLoop(\$__currentLoopData);"; + + $iterateLoop = '$__env->incrementLoopIndices(); $loop = $__env->getLastLoop();'; + + return ""; + } + + /** + * Compile the break statements into valid PHP. + * + * @param string $expression + * @return string + */ + protected function compileBreak($expression) + { + if ($expression) { + preg_match('/\(\s*(-?\d+)\s*\)$/', $expression, $matches); + + return $matches ? '' : ""; + } + + return ''; + } + + /** + * Compile the continue statements into valid PHP. + * + * @param string $expression + * @return string + */ + protected function compileContinue($expression) + { + if ($expression) { + preg_match('/\(\s*(-?\d+)\s*\)$/', $expression, $matches); + + return $matches ? '' : ""; + } + + return ''; + } + + /** + * Compile the end-for statements into valid PHP. + * + * @return string + */ + protected function compileEndfor() + { + return ''; + } + + /** + * Compile the end-for-each statements into valid PHP. + * + * @return string + */ + protected function compileEndforeach() + { + return 'popLoop(); $loop = $__env->getLastLoop(); ?>'; + } + + /** + * Compile the while statements into valid PHP. + * + * @param string $expression + * @return string + */ + protected function compileWhile($expression) + { + return ""; + } + + /** + * Compile the end-while statements into valid PHP. + * + * @return string + */ + protected function compileEndwhile() + { + return ''; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesRawPhp.php b/vendor/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesRawPhp.php new file mode 100644 index 0000000..b49a386 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesRawPhp.php @@ -0,0 +1,38 @@ +" : ''; + } + + /** + * Compile the unset statements into valid PHP. + * + * @param string $expression + * @return string + */ + protected function compileUnset($expression) + { + return ""; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesStacks.php b/vendor/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesStacks.php new file mode 100644 index 0000000..79a380e --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesStacks.php @@ -0,0 +1,59 @@ +yieldPushContent{$expression}; ?>"; + } + + /** + * Compile the push statements into valid PHP. + * + * @param string $expression + * @return string + */ + protected function compilePush($expression) + { + return "startPush{$expression}; ?>"; + } + + /** + * Compile the end-push statements into valid PHP. + * + * @return string + */ + protected function compileEndpush() + { + return 'stopPush(); ?>'; + } + + /** + * Compile the prepend statements into valid PHP. + * + * @param string $expression + * @return string + */ + protected function compilePrepend($expression) + { + return "startPrepend{$expression}; ?>"; + } + + /** + * Compile the end-prepend statements into valid PHP. + * + * @return string + */ + protected function compileEndprepend() + { + return 'stopPrepend(); ?>'; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesTranslations.php b/vendor/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesTranslations.php new file mode 100644 index 0000000..37c61e8 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesTranslations.php @@ -0,0 +1,44 @@ +startTranslation(); ?>'; + } elseif ($expression[1] === '[') { + return "startTranslation{$expression}; ?>"; + } else { + return "getFromJson{$expression}; ?>"; + } + } + + /** + * Compile the end-lang statements into valid PHP. + * + * @return string + */ + protected function compileEndlang() + { + return 'renderTranslation(); ?>'; + } + + /** + * Compile the choice statements into valid PHP. + * + * @param string $expression + * @return string + */ + protected function compileChoice($expression) + { + return "choice{$expression}; ?>"; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/View/Concerns/ManagesComponents.php b/vendor/laravel/framework/src/Illuminate/View/Concerns/ManagesComponents.php new file mode 100644 index 0000000..d523f7e --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/View/Concerns/ManagesComponents.php @@ -0,0 +1,128 @@ +componentStack[] = $name; + + $this->componentData[$this->currentComponent()] = $data; + + $this->slots[$this->currentComponent()] = []; + } + } + + /** + * Render the current component. + * + * @return string + */ + public function renderComponent() + { + $name = array_pop($this->componentStack); + + return $this->make($name, $this->componentData($name))->render(); + } + + /** + * Get the data for the given component. + * + * @param string $name + * @return array + */ + protected function componentData($name) + { + return array_merge( + $this->componentData[count($this->componentStack)], + ['slot' => new HtmlString(trim(ob_get_clean()))], + $this->slots[count($this->componentStack)] + ); + } + + /** + * Start the slot rendering process. + * + * @param string $name + * @param string|null $content + * @return void + */ + public function slot($name, $content = null) + { + if (count(func_get_args()) == 2) { + $this->slots[$this->currentComponent()][$name] = $content; + } else { + if (ob_start()) { + $this->slots[$this->currentComponent()][$name] = ''; + + $this->slotStack[$this->currentComponent()][] = $name; + } + } + } + + /** + * Save the slot content for rendering. + * + * @return void + */ + public function endSlot() + { + last($this->componentStack); + + $currentSlot = array_pop( + $this->slotStack[$this->currentComponent()] + ); + + $this->slots[$this->currentComponent()] + [$currentSlot] = new HtmlString(trim(ob_get_clean())); + } + + /** + * Get the index for the current component. + * + * @return int + */ + protected function currentComponent() + { + return count($this->componentStack) - 1; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/View/Concerns/ManagesEvents.php b/vendor/laravel/framework/src/Illuminate/View/Concerns/ManagesEvents.php new file mode 100644 index 0000000..427609e --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/View/Concerns/ManagesEvents.php @@ -0,0 +1,192 @@ +addViewEvent($view, $callback, 'creating: '); + } + + return $creators; + } + + /** + * Register multiple view composers via an array. + * + * @param array $composers + * @return array + */ + public function composers(array $composers) + { + $registered = []; + + foreach ($composers as $callback => $views) { + $registered = array_merge($registered, $this->composer($views, $callback)); + } + + return $registered; + } + + /** + * Register a view composer event. + * + * @param array|string $views + * @param \Closure|string $callback + * @return array + */ + public function composer($views, $callback) + { + $composers = []; + + foreach ((array) $views as $view) { + $composers[] = $this->addViewEvent($view, $callback, 'composing: '); + } + + return $composers; + } + + /** + * Add an event for a given view. + * + * @param string $view + * @param \Closure|string $callback + * @param string $prefix + * @return \Closure|null + */ + protected function addViewEvent($view, $callback, $prefix = 'composing: ') + { + $view = $this->normalizeName($view); + + if ($callback instanceof Closure) { + $this->addEventListener($prefix.$view, $callback); + + return $callback; + } elseif (is_string($callback)) { + return $this->addClassEvent($view, $callback, $prefix); + } + } + + /** + * Register a class based view composer. + * + * @param string $view + * @param string $class + * @param string $prefix + * @return \Closure + */ + protected function addClassEvent($view, $class, $prefix) + { + $name = $prefix.$view; + + // When registering a class based view "composer", we will simply resolve the + // classes from the application IoC container then call the compose method + // on the instance. This allows for convenient, testable view composers. + $callback = $this->buildClassEventCallback( + $class, $prefix + ); + + $this->addEventListener($name, $callback); + + return $callback; + } + + /** + * Build a class based container callback Closure. + * + * @param string $class + * @param string $prefix + * @return \Closure + */ + protected function buildClassEventCallback($class, $prefix) + { + list($class, $method) = $this->parseClassEvent($class, $prefix); + + // Once we have the class and method name, we can build the Closure to resolve + // the instance out of the IoC container and call the method on it with the + // given arguments that are passed to the Closure as the composer's data. + return function () use ($class, $method) { + return call_user_func_array( + [$this->container->make($class), $method], func_get_args() + ); + }; + } + + /** + * Parse a class based composer name. + * + * @param string $class + * @param string $prefix + * @return array + */ + protected function parseClassEvent($class, $prefix) + { + return Str::parseCallback($class, $this->classEventMethodForPrefix($prefix)); + } + + /** + * Determine the class event method based on the given prefix. + * + * @param string $prefix + * @return string + */ + protected function classEventMethodForPrefix($prefix) + { + return Str::contains($prefix, 'composing') ? 'compose' : 'create'; + } + + /** + * Add a listener to the event dispatcher. + * + * @param string $name + * @param \Closure $callback + * @return void + */ + protected function addEventListener($name, $callback) + { + if (Str::contains($name, '*')) { + $callback = function ($name, array $data) use ($callback) { + return $callback($data[0]); + }; + } + + $this->events->listen($name, $callback); + } + + /** + * Call the composer for a given view. + * + * @param \Illuminate\Contracts\View\View $view + * @return void + */ + public function callComposer(ViewContract $view) + { + $this->events->fire('composing: '.$view->name(), [$view]); + } + + /** + * Call the creator for a given view. + * + * @param \Illuminate\Contracts\View\View $view + * @return void + */ + public function callCreator(ViewContract $view) + { + $this->events->fire('creating: '.$view->name(), [$view]); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/View/Concerns/ManagesLayouts.php b/vendor/laravel/framework/src/Illuminate/View/Concerns/ManagesLayouts.php new file mode 100644 index 0000000..cd494f8 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/View/Concerns/ManagesLayouts.php @@ -0,0 +1,205 @@ +sectionStack[] = $section; + } + } else { + $this->extendSection($section, e($content)); + } + } + + /** + * Inject inline content into a section. + * + * @param string $section + * @param string $content + * @return void + */ + public function inject($section, $content) + { + return $this->startSection($section, $content); + } + + /** + * Stop injecting content into a section and return its contents. + * + * @return string + */ + public function yieldSection() + { + if (empty($this->sectionStack)) { + return ''; + } + + return $this->yieldContent($this->stopSection()); + } + + /** + * Stop injecting content into a section. + * + * @param bool $overwrite + * @return string + * @throws \InvalidArgumentException + */ + public function stopSection($overwrite = false) + { + if (empty($this->sectionStack)) { + throw new InvalidArgumentException('Cannot end a section without first starting one.'); + } + + $last = array_pop($this->sectionStack); + + if ($overwrite) { + $this->sections[$last] = ob_get_clean(); + } else { + $this->extendSection($last, ob_get_clean()); + } + + return $last; + } + + /** + * Stop injecting content into a section and append it. + * + * @return string + * @throws \InvalidArgumentException + */ + public function appendSection() + { + if (empty($this->sectionStack)) { + throw new InvalidArgumentException('Cannot end a section without first starting one.'); + } + + $last = array_pop($this->sectionStack); + + if (isset($this->sections[$last])) { + $this->sections[$last] .= ob_get_clean(); + } else { + $this->sections[$last] = ob_get_clean(); + } + + return $last; + } + + /** + * Append content to a given section. + * + * @param string $section + * @param string $content + * @return void + */ + protected function extendSection($section, $content) + { + if (isset($this->sections[$section])) { + $content = str_replace(static::parentPlaceholder($section), $content, $this->sections[$section]); + } + + $this->sections[$section] = $content; + } + + /** + * Get the string contents of a section. + * + * @param string $section + * @param string $default + * @return string + */ + public function yieldContent($section, $default = '') + { + $sectionContent = $default; + + if (isset($this->sections[$section])) { + $sectionContent = $this->sections[$section]; + } + + $sectionContent = str_replace('@@parent', '--parent--holder--', $sectionContent); + + return str_replace( + '--parent--holder--', '@parent', str_replace(static::parentPlaceholder($section), '', $sectionContent) + ); + } + + /** + * Get the parent placeholder for the current request. + * + * @param string $section + * @return string + */ + public static function parentPlaceholder($section = '') + { + if (! isset(static::$parentPlaceholder[$section])) { + static::$parentPlaceholder[$section] = '##parent-placeholder-'.sha1($section).'##'; + } + + return static::$parentPlaceholder[$section]; + } + + /** + * Check if section exists. + * + * @param string $name + * @return bool + */ + public function hasSection($name) + { + return array_key_exists($name, $this->sections); + } + + /** + * Get the entire array of sections. + * + * @return array + */ + public function getSections() + { + return $this->sections; + } + + /** + * Flush all of the sections. + * + * @return void + */ + public function flushSections() + { + $this->sections = []; + $this->sectionStack = []; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/View/Concerns/ManagesLoops.php b/vendor/laravel/framework/src/Illuminate/View/Concerns/ManagesLoops.php new file mode 100644 index 0000000..305a1cc --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/View/Concerns/ManagesLoops.php @@ -0,0 +1,90 @@ +loopsStack); + + $this->loopsStack[] = [ + 'iteration' => 0, + 'index' => 0, + 'remaining' => isset($length) ? $length : null, + 'count' => $length, + 'first' => true, + 'last' => isset($length) ? $length == 1 : null, + 'depth' => count($this->loopsStack) + 1, + 'parent' => $parent ? (object) $parent : null, + ]; + } + + /** + * Increment the top loop's indices. + * + * @return void + */ + public function incrementLoopIndices() + { + $loop = $this->loopsStack[$index = count($this->loopsStack) - 1]; + + $this->loopsStack[$index] = array_merge($this->loopsStack[$index], [ + 'iteration' => $loop['iteration'] + 1, + 'index' => $loop['iteration'], + 'first' => $loop['iteration'] == 0, + 'remaining' => isset($loop['count']) ? $loop['remaining'] - 1 : null, + 'last' => isset($loop['count']) ? $loop['iteration'] == $loop['count'] - 1 : null, + ]); + } + + /** + * Pop a loop from the top of the loop stack. + * + * @return void + */ + public function popLoop() + { + array_pop($this->loopsStack); + } + + /** + * Get an instance of the last loop in the stack. + * + * @return \stdClass|null + */ + public function getLastLoop() + { + if ($last = Arr::last($this->loopsStack)) { + return (object) $last; + } + } + + /** + * Get the entire loop stack. + * + * @return array + */ + public function getLoopStack() + { + return $this->loopsStack; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/View/Concerns/ManagesStacks.php b/vendor/laravel/framework/src/Illuminate/View/Concerns/ManagesStacks.php new file mode 100644 index 0000000..53af024 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/View/Concerns/ManagesStacks.php @@ -0,0 +1,177 @@ +pushStack[] = $section; + } + } else { + $this->extendPush($section, $content); + } + } + + /** + * Stop injecting content into a push section. + * + * @return string + * @throws \InvalidArgumentException + */ + public function stopPush() + { + if (empty($this->pushStack)) { + throw new InvalidArgumentException('Cannot end a push stack without first starting one.'); + } + + return tap(array_pop($this->pushStack), function ($last) { + $this->extendPush($last, ob_get_clean()); + }); + } + + /** + * Append content to a given push section. + * + * @param string $section + * @param string $content + * @return void + */ + protected function extendPush($section, $content) + { + if (! isset($this->pushes[$section])) { + $this->pushes[$section] = []; + } + + if (! isset($this->pushes[$section][$this->renderCount])) { + $this->pushes[$section][$this->renderCount] = $content; + } else { + $this->pushes[$section][$this->renderCount] .= $content; + } + } + + /** + * Start prepending content into a push section. + * + * @param string $section + * @param string $content + * @return void + */ + public function startPrepend($section, $content = '') + { + if ($content === '') { + if (ob_start()) { + $this->pushStack[] = $section; + } + } else { + $this->extendPrepend($section, $content); + } + } + + /** + * Stop prepending content into a push section. + * + * @return string + * @throws \InvalidArgumentException + */ + public function stopPrepend() + { + if (empty($this->pushStack)) { + throw new InvalidArgumentException('Cannot end a prepend operation without first starting one.'); + } + + return tap(array_pop($this->pushStack), function ($last) { + $this->extendPrepend($last, ob_get_clean()); + }); + } + + /** + * Prepend content to a given stack. + * + * @param string $section + * @param string $content + * @return void + */ + protected function extendPrepend($section, $content) + { + if (! isset($this->prepends[$section])) { + $this->prepends[$section] = []; + } + + if (! isset($this->prepends[$section][$this->renderCount])) { + $this->prepends[$section][$this->renderCount] = $content; + } else { + $this->prepends[$section][$this->renderCount] = $content.$this->prepends[$section][$this->renderCount]; + } + } + + /** + * Get the string contents of a push section. + * + * @param string $section + * @param string $default + * @return string + */ + public function yieldPushContent($section, $default = '') + { + if (! isset($this->pushes[$section]) && ! isset($this->prepends[$section])) { + return $default; + } + + $output = ''; + + if (isset($this->prepends[$section])) { + $output .= implode(array_reverse($this->prepends[$section])); + } + + if (isset($this->pushes[$section])) { + $output .= implode($this->pushes[$section]); + } + + return $output; + } + + /** + * Flush all of the stacks. + * + * @return void + */ + public function flushStacks() + { + $this->pushes = []; + $this->prepends = []; + $this->pushStack = []; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/View/Concerns/ManagesTranslations.php b/vendor/laravel/framework/src/Illuminate/View/Concerns/ManagesTranslations.php new file mode 100644 index 0000000..841c3fe --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/View/Concerns/ManagesTranslations.php @@ -0,0 +1,38 @@ +translationReplacements = $replacements; + } + + /** + * Render the current translation. + * + * @return string + */ + public function renderTranslation() + { + return $this->container->make('translator')->getFromJson( + trim(ob_get_clean()), $this->translationReplacements + ); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php b/vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php new file mode 100755 index 0000000..c71cdab --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php @@ -0,0 +1,102 @@ +compiler = $compiler; + } + + /** + * Get the evaluated contents of the view. + * + * @param string $path + * @param array $data + * @return string + */ + public function get($path, array $data = []) + { + $this->lastCompiled[] = $path; + + // If this given view has expired, which means it has simply been edited since + // it was last compiled, we will re-compile the views so we can evaluate a + // fresh copy of the view. We'll pass the compiler the path of the view. + if ($this->compiler->isExpired($path)) { + $this->compiler->compile($path); + } + + $compiled = $this->compiler->getCompiledPath($path); + + // Once we have the path to the compiled file, we will evaluate the paths with + // typical PHP just like any other templates. We also keep a stack of views + // which have been rendered for right exception messages to be generated. + $results = $this->evaluatePath($compiled, $data); + + array_pop($this->lastCompiled); + + return $results; + } + + /** + * Handle a view exception. + * + * @param \Exception $e + * @param int $obLevel + * @return void + * + * @throws $e + */ + protected function handleViewException(Exception $e, $obLevel) + { + $e = new ErrorException($this->getMessage($e), 0, 1, $e->getFile(), $e->getLine(), $e); + + parent::handleViewException($e, $obLevel); + } + + /** + * Get the exception message for an exception. + * + * @param \Exception $e + * @return string + */ + protected function getMessage(Exception $e) + { + return $e->getMessage().' (View: '.realpath(last($this->lastCompiled)).')'; + } + + /** + * Get the compiler implementation. + * + * @return \Illuminate\View\Compilers\CompilerInterface + */ + public function getCompiler() + { + return $this->compiler; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/View/Engines/Engine.php b/vendor/laravel/framework/src/Illuminate/View/Engines/Engine.php new file mode 100755 index 0000000..bf5c748 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/View/Engines/Engine.php @@ -0,0 +1,23 @@ +lastRendered; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/View/Engines/EngineInterface.php b/vendor/laravel/framework/src/Illuminate/View/Engines/EngineInterface.php new file mode 100755 index 0000000..a6f71d2 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/View/Engines/EngineInterface.php @@ -0,0 +1,15 @@ +resolved[$engine]); + + $this->resolvers[$engine] = $resolver; + } + + /** + * Resolver an engine instance by name. + * + * @param string $engine + * @return \Illuminate\View\Engines\EngineInterface + * @throws \InvalidArgumentException + */ + public function resolve($engine) + { + if (isset($this->resolved[$engine])) { + return $this->resolved[$engine]; + } + + if (isset($this->resolvers[$engine])) { + return $this->resolved[$engine] = call_user_func($this->resolvers[$engine]); + } + + throw new InvalidArgumentException("Engine $engine not found."); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/View/Engines/FileEngine.php b/vendor/laravel/framework/src/Illuminate/View/Engines/FileEngine.php new file mode 100644 index 0000000..e9ec85d --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/View/Engines/FileEngine.php @@ -0,0 +1,18 @@ +evaluatePath($path, $data); + } + + /** + * Get the evaluated contents of the view at the given path. + * + * @param string $__path + * @param array $__data + * @return string + */ + protected function evaluatePath($__path, $__data) + { + $obLevel = ob_get_level(); + + ob_start(); + + extract($__data, EXTR_SKIP); + + // We'll evaluate the contents of the view inside a try/catch block so we can + // flush out any stray output that might get out before an error occurs or + // an exception is thrown. This prevents any partial views from leaking. + try { + include $__path; + } catch (Exception $e) { + $this->handleViewException($e, $obLevel); + } catch (Throwable $e) { + $this->handleViewException(new FatalThrowableError($e), $obLevel); + } + + return ltrim(ob_get_clean()); + } + + /** + * Handle a view exception. + * + * @param \Exception $e + * @param int $obLevel + * @return void + * + * @throws $e + */ + protected function handleViewException(Exception $e, $obLevel) + { + while (ob_get_level() > $obLevel) { + ob_end_clean(); + } + + throw $e; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/View/Factory.php b/vendor/laravel/framework/src/Illuminate/View/Factory.php new file mode 100755 index 0000000..238e0c6 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/View/Factory.php @@ -0,0 +1,542 @@ + 'blade', + 'php' => 'php', + 'css' => 'file', + ]; + + /** + * The view composer events. + * + * @var array + */ + protected $composers = []; + + /** + * The number of active rendering operations. + * + * @var int + */ + protected $renderCount = 0; + + /** + * Create a new view factory instance. + * + * @param \Illuminate\View\Engines\EngineResolver $engines + * @param \Illuminate\View\ViewFinderInterface $finder + * @param \Illuminate\Contracts\Events\Dispatcher $events + * @return void + */ + public function __construct(EngineResolver $engines, ViewFinderInterface $finder, Dispatcher $events) + { + $this->finder = $finder; + $this->events = $events; + $this->engines = $engines; + + $this->share('__env', $this); + } + + /** + * Get the evaluated view contents for the given view. + * + * @param string $path + * @param array $data + * @param array $mergeData + * @return \Illuminate\Contracts\View\View + */ + public function file($path, $data = [], $mergeData = []) + { + $data = array_merge($mergeData, $this->parseData($data)); + + return tap($this->viewInstance($path, $path, $data), function ($view) { + $this->callCreator($view); + }); + } + + /** + * Get the evaluated view contents for the given view. + * + * @param string $view + * @param array $data + * @param array $mergeData + * @return \Illuminate\Contracts\View\View + */ + public function make($view, $data = [], $mergeData = []) + { + $path = $this->finder->find( + $view = $this->normalizeName($view) + ); + + // Next, we will create the view instance and call the view creator for the view + // which can set any data, etc. Then we will return the view instance back to + // the caller for rendering or performing other view manipulations on this. + $data = array_merge($mergeData, $this->parseData($data)); + + return tap($this->viewInstance($view, $path, $data), function ($view) { + $this->callCreator($view); + }); + } + + /** + * Get the rendered content of the view based on a given condition. + * + * @param bool $condition + * @param string $view + * @param array $data + * @param array $mergeData + * @return string + */ + public function renderWhen($condition, $view, $data = [], $mergeData = []) + { + if (! $condition) { + return ''; + } + + return $this->make($view, $this->parseData($data), $mergeData)->render(); + } + + /** + * Get the rendered contents of a partial from a loop. + * + * @param string $view + * @param array $data + * @param string $iterator + * @param string $empty + * @return string + */ + public function renderEach($view, $data, $iterator, $empty = 'raw|') + { + $result = ''; + + // If is actually data in the array, we will loop through the data and append + // an instance of the partial view to the final result HTML passing in the + // iterated value of this data array, allowing the views to access them. + if (count($data) > 0) { + foreach ($data as $key => $value) { + $result .= $this->make( + $view, ['key' => $key, $iterator => $value] + )->render(); + } + } + + // If there is no data in the array, we will render the contents of the empty + // view. Alternatively, the "empty view" could be a raw string that begins + // with "raw|" for convenience and to let this know that it is a string. + else { + $result = Str::startsWith($empty, 'raw|') + ? substr($empty, 4) + : $this->make($empty)->render(); + } + + return $result; + } + + /** + * Normalize a view name. + * + * @param string $name + * @return string + */ + protected function normalizeName($name) + { + return ViewName::normalize($name); + } + + /** + * Parse the given data into a raw array. + * + * @param mixed $data + * @return array + */ + protected function parseData($data) + { + return $data instanceof Arrayable ? $data->toArray() : $data; + } + + /** + * Create a new view instance from the given arguments. + * + * @param string $view + * @param string $path + * @param array $data + * @return \Illuminate\Contracts\View\View + */ + protected function viewInstance($view, $path, $data) + { + return new View($this, $this->getEngineFromPath($path), $view, $path, $data); + } + + /** + * Determine if a given view exists. + * + * @param string $view + * @return bool + */ + public function exists($view) + { + try { + $this->finder->find($view); + } catch (InvalidArgumentException $e) { + return false; + } + + return true; + } + + /** + * Get the appropriate view engine for the given path. + * + * @param string $path + * @return \Illuminate\View\Engines\EngineInterface + * + * @throws \InvalidArgumentException + */ + public function getEngineFromPath($path) + { + if (! $extension = $this->getExtension($path)) { + throw new InvalidArgumentException("Unrecognized extension in file: $path"); + } + + $engine = $this->extensions[$extension]; + + return $this->engines->resolve($engine); + } + + /** + * Get the extension used by the view file. + * + * @param string $path + * @return string + */ + protected function getExtension($path) + { + $extensions = array_keys($this->extensions); + + return Arr::first($extensions, function ($value) use ($path) { + return Str::endsWith($path, '.'.$value); + }); + } + + /** + * Add a piece of shared data to the environment. + * + * @param array|string $key + * @param mixed $value + * @return mixed + */ + public function share($key, $value = null) + { + $keys = is_array($key) ? $key : [$key => $value]; + + foreach ($keys as $key => $value) { + $this->shared[$key] = $value; + } + + return $value; + } + + /** + * Increment the rendering counter. + * + * @return void + */ + public function incrementRender() + { + $this->renderCount++; + } + + /** + * Decrement the rendering counter. + * + * @return void + */ + public function decrementRender() + { + $this->renderCount--; + } + + /** + * Check if there are no active render operations. + * + * @return bool + */ + public function doneRendering() + { + return $this->renderCount == 0; + } + + /** + * Add a location to the array of view locations. + * + * @param string $location + * @return void + */ + public function addLocation($location) + { + $this->finder->addLocation($location); + } + + /** + * Add a new namespace to the loader. + * + * @param string $namespace + * @param string|array $hints + * @return $this + */ + public function addNamespace($namespace, $hints) + { + $this->finder->addNamespace($namespace, $hints); + + return $this; + } + + /** + * Prepend a new namespace to the loader. + * + * @param string $namespace + * @param string|array $hints + * @return $this + */ + public function prependNamespace($namespace, $hints) + { + $this->finder->prependNamespace($namespace, $hints); + + return $this; + } + + /** + * Replace the namespace hints for the given namespace. + * + * @param string $namespace + * @param string|array $hints + * @return $this + */ + public function replaceNamespace($namespace, $hints) + { + $this->finder->replaceNamespace($namespace, $hints); + + return $this; + } + + /** + * Register a valid view extension and its engine. + * + * @param string $extension + * @param string $engine + * @param \Closure $resolver + * @return void + */ + public function addExtension($extension, $engine, $resolver = null) + { + $this->finder->addExtension($extension); + + if (isset($resolver)) { + $this->engines->register($engine, $resolver); + } + + unset($this->extensions[$extension]); + + $this->extensions = array_merge([$extension => $engine], $this->extensions); + } + + /** + * Flush all of the factory state like sections and stacks. + * + * @return void + */ + public function flushState() + { + $this->renderCount = 0; + + $this->flushSections(); + $this->flushStacks(); + } + + /** + * Flush all of the section contents if done rendering. + * + * @return void + */ + public function flushStateIfDoneRendering() + { + if ($this->doneRendering()) { + $this->flushState(); + } + } + + /** + * Get the extension to engine bindings. + * + * @return array + */ + public function getExtensions() + { + return $this->extensions; + } + + /** + * Get the engine resolver instance. + * + * @return \Illuminate\View\Engines\EngineResolver + */ + public function getEngineResolver() + { + return $this->engines; + } + + /** + * Get the view finder instance. + * + * @return \Illuminate\View\ViewFinderInterface + */ + public function getFinder() + { + return $this->finder; + } + + /** + * Set the view finder instance. + * + * @param \Illuminate\View\ViewFinderInterface $finder + * @return void + */ + public function setFinder(ViewFinderInterface $finder) + { + $this->finder = $finder; + } + + /** + * Flush the cache of views located by the finder. + * + * @return void + */ + public function flushFinderCache() + { + $this->getFinder()->flush(); + } + + /** + * Get the event dispatcher instance. + * + * @return \Illuminate\Contracts\Events\Dispatcher + */ + public function getDispatcher() + { + return $this->events; + } + + /** + * Set the event dispatcher instance. + * + * @param \Illuminate\Contracts\Events\Dispatcher $events + * @return void + */ + public function setDispatcher(Dispatcher $events) + { + $this->events = $events; + } + + /** + * Get the IoC container instance. + * + * @return \Illuminate\Contracts\Container\Container + */ + public function getContainer() + { + return $this->container; + } + + /** + * Set the IoC container instance. + * + * @param \Illuminate\Contracts\Container\Container $container + * @return void + */ + public function setContainer(Container $container) + { + $this->container = $container; + } + + /** + * Get an item from the shared data. + * + * @param string $key + * @param mixed $default + * @return mixed + */ + public function shared($key, $default = null) + { + return Arr::get($this->shared, $key, $default); + } + + /** + * Get all of the shared data for the environment. + * + * @return array + */ + public function getShared() + { + return $this->shared; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/View/FileViewFinder.php b/vendor/laravel/framework/src/Illuminate/View/FileViewFinder.php new file mode 100755 index 0000000..cf6bb8e --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/View/FileViewFinder.php @@ -0,0 +1,298 @@ +files = $files; + $this->paths = $paths; + + if (isset($extensions)) { + $this->extensions = $extensions; + } + } + + /** + * Get the fully qualified location of the view. + * + * @param string $name + * @return string + */ + public function find($name) + { + if (isset($this->views[$name])) { + return $this->views[$name]; + } + + if ($this->hasHintInformation($name = trim($name))) { + return $this->views[$name] = $this->findNamespacedView($name); + } + + return $this->views[$name] = $this->findInPaths($name, $this->paths); + } + + /** + * Get the path to a template with a named path. + * + * @param string $name + * @return string + */ + protected function findNamespacedView($name) + { + list($namespace, $view) = $this->parseNamespaceSegments($name); + + return $this->findInPaths($view, $this->hints[$namespace]); + } + + /** + * Get the segments of a template with a named path. + * + * @param string $name + * @return array + * + * @throws \InvalidArgumentException + */ + protected function parseNamespaceSegments($name) + { + $segments = explode(static::HINT_PATH_DELIMITER, $name); + + if (count($segments) != 2) { + throw new InvalidArgumentException("View [$name] has an invalid name."); + } + + if (! isset($this->hints[$segments[0]])) { + throw new InvalidArgumentException("No hint path defined for [{$segments[0]}]."); + } + + return $segments; + } + + /** + * Find the given view in the list of paths. + * + * @param string $name + * @param array $paths + * @return string + * + * @throws \InvalidArgumentException + */ + protected function findInPaths($name, $paths) + { + foreach ((array) $paths as $path) { + foreach ($this->getPossibleViewFiles($name) as $file) { + if ($this->files->exists($viewPath = $path.'/'.$file)) { + return $viewPath; + } + } + } + + throw new InvalidArgumentException("View [$name] not found."); + } + + /** + * Get an array of possible view files. + * + * @param string $name + * @return array + */ + protected function getPossibleViewFiles($name) + { + return array_map(function ($extension) use ($name) { + return str_replace('.', '/', $name).'.'.$extension; + }, $this->extensions); + } + + /** + * Add a location to the finder. + * + * @param string $location + * @return void + */ + public function addLocation($location) + { + $this->paths[] = $location; + } + + /** + * Prepend a location to the finder. + * + * @param string $location + * @return void + */ + public function prependLocation($location) + { + array_unshift($this->paths, $location); + } + + /** + * Add a namespace hint to the finder. + * + * @param string $namespace + * @param string|array $hints + * @return void + */ + public function addNamespace($namespace, $hints) + { + $hints = (array) $hints; + + if (isset($this->hints[$namespace])) { + $hints = array_merge($this->hints[$namespace], $hints); + } + + $this->hints[$namespace] = $hints; + } + + /** + * Prepend a namespace hint to the finder. + * + * @param string $namespace + * @param string|array $hints + * @return void + */ + public function prependNamespace($namespace, $hints) + { + $hints = (array) $hints; + + if (isset($this->hints[$namespace])) { + $hints = array_merge($hints, $this->hints[$namespace]); + } + + $this->hints[$namespace] = $hints; + } + + /** + * Replace the namespace hints for the given namespace. + * + * @param string $namespace + * @param string|array $hints + * @return void + */ + public function replaceNamespace($namespace, $hints) + { + $this->hints[$namespace] = (array) $hints; + } + + /** + * Register an extension with the view finder. + * + * @param string $extension + * @return void + */ + public function addExtension($extension) + { + if (($index = array_search($extension, $this->extensions)) !== false) { + unset($this->extensions[$index]); + } + + array_unshift($this->extensions, $extension); + } + + /** + * Returns whether or not the view name has any hint information. + * + * @param string $name + * @return bool + */ + public function hasHintInformation($name) + { + return strpos($name, static::HINT_PATH_DELIMITER) > 0; + } + + /** + * Flush the cache of located views. + * + * @return void + */ + public function flush() + { + $this->views = []; + } + + /** + * Get the filesystem instance. + * + * @return \Illuminate\Filesystem\Filesystem + */ + public function getFilesystem() + { + return $this->files; + } + + /** + * Get the active view paths. + * + * @return array + */ + public function getPaths() + { + return $this->paths; + } + + /** + * Get the namespace to file path hints. + * + * @return array + */ + public function getHints() + { + return $this->hints; + } + + /** + * Get registered extensions. + * + * @return array + */ + public function getExtensions() + { + return $this->extensions; + } +} diff --git a/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php b/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php new file mode 100644 index 0000000..618b7dd --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php @@ -0,0 +1,51 @@ +view = $view; + } + + /** + * Handle an incoming request. + * + * @param \Illuminate\Http\Request $request + * @param \Closure $next + * @return mixed + */ + public function handle($request, Closure $next) + { + // If the current session has an "errors" variable bound to it, we will share + // its value with all view instances so the views can easily access errors + // without having to bind. An empty bag is set when there aren't errors. + $this->view->share( + 'errors', $request->session()->get('errors') ?: new ViewErrorBag + ); + + // Putting the errors in the view for every view allows the developer to just + // assume that some errors are always available, which is convenient since + // they don't have to continually run checks for the presence of errors. + + return $next($request); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/View/View.php b/vendor/laravel/framework/src/Illuminate/View/View.php new file mode 100755 index 0000000..a439006 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/View/View.php @@ -0,0 +1,414 @@ +view = $view; + $this->path = $path; + $this->engine = $engine; + $this->factory = $factory; + + $this->data = $data instanceof Arrayable ? $data->toArray() : (array) $data; + } + + /** + * Get the string contents of the view. + * + * @param callable|null $callback + * @return string + * + * @throws \Throwable + */ + public function render(callable $callback = null) + { + try { + $contents = $this->renderContents(); + + $response = isset($callback) ? call_user_func($callback, $this, $contents) : null; + + // Once we have the contents of the view, we will flush the sections if we are + // done rendering all views so that there is nothing left hanging over when + // another view gets rendered in the future by the application developer. + $this->factory->flushStateIfDoneRendering(); + + return ! is_null($response) ? $response : $contents; + } catch (Exception $e) { + $this->factory->flushState(); + + throw $e; + } catch (Throwable $e) { + $this->factory->flushState(); + + throw $e; + } + } + + /** + * Get the contents of the view instance. + * + * @return string + */ + protected function renderContents() + { + // We will keep track of the amount of views being rendered so we can flush + // the section after the complete rendering operation is done. This will + // clear out the sections for any separate views that may be rendered. + $this->factory->incrementRender(); + + $this->factory->callComposer($this); + + $contents = $this->getContents(); + + // Once we've finished rendering the view, we'll decrement the render count + // so that each sections get flushed out next time a view is created and + // no old sections are staying around in the memory of an environment. + $this->factory->decrementRender(); + + return $contents; + } + + /** + * Get the evaluated contents of the view. + * + * @return string + */ + protected function getContents() + { + return $this->engine->get($this->path, $this->gatherData()); + } + + /** + * Get the data bound to the view instance. + * + * @return array + */ + protected function gatherData() + { + $data = array_merge($this->factory->getShared(), $this->data); + + foreach ($data as $key => $value) { + if ($value instanceof Renderable) { + $data[$key] = $value->render(); + } + } + + return $data; + } + + /** + * Get the sections of the rendered view. + * + * @return array + */ + public function renderSections() + { + return $this->render(function () { + return $this->factory->getSections(); + }); + } + + /** + * Add a piece of data to the view. + * + * @param string|array $key + * @param mixed $value + * @return $this + */ + public function with($key, $value = null) + { + if (is_array($key)) { + $this->data = array_merge($this->data, $key); + } else { + $this->data[$key] = $value; + } + + return $this; + } + + /** + * Add a view instance to the view data. + * + * @param string $key + * @param string $view + * @param array $data + * @return $this + */ + public function nest($key, $view, array $data = []) + { + return $this->with($key, $this->factory->make($view, $data)); + } + + /** + * Add validation errors to the view. + * + * @param \Illuminate\Contracts\Support\MessageProvider|array $provider + * @return $this + */ + public function withErrors($provider) + { + $this->with('errors', $this->formatErrors($provider)); + + return $this; + } + + /** + * Format the given message provider into a MessageBag. + * + * @param \Illuminate\Contracts\Support\MessageProvider|array $provider + * @return \Illuminate\Support\MessageBag + */ + protected function formatErrors($provider) + { + return $provider instanceof MessageProvider + ? $provider->getMessageBag() : new MessageBag((array) $provider); + } + + /** + * Get the name of the view. + * + * @return string + */ + public function name() + { + return $this->getName(); + } + + /** + * Get the name of the view. + * + * @return string + */ + public function getName() + { + return $this->view; + } + + /** + * Get the array of view data. + * + * @return array + */ + public function getData() + { + return $this->data; + } + + /** + * Get the path to the view file. + * + * @return string + */ + public function getPath() + { + return $this->path; + } + + /** + * Set the path to the view. + * + * @param string $path + * @return void + */ + public function setPath($path) + { + $this->path = $path; + } + + /** + * Get the view factory instance. + * + * @return \Illuminate\View\Factory + */ + public function getFactory() + { + return $this->factory; + } + + /** + * Get the view's rendering engine. + * + * @return \Illuminate\View\Engines\EngineInterface + */ + public function getEngine() + { + return $this->engine; + } + + /** + * Determine if a piece of data is bound. + * + * @param string $key + * @return bool + */ + public function offsetExists($key) + { + return array_key_exists($key, $this->data); + } + + /** + * Get a piece of bound data to the view. + * + * @param string $key + * @return mixed + */ + public function offsetGet($key) + { + return $this->data[$key]; + } + + /** + * Set a piece of data on the view. + * + * @param string $key + * @param mixed $value + * @return void + */ + public function offsetSet($key, $value) + { + $this->with($key, $value); + } + + /** + * Unset a piece of data from the view. + * + * @param string $key + * @return void + */ + public function offsetUnset($key) + { + unset($this->data[$key]); + } + + /** + * Get a piece of data from the view. + * + * @param string $key + * @return mixed + */ + public function &__get($key) + { + return $this->data[$key]; + } + + /** + * Set a piece of data on the view. + * + * @param string $key + * @param mixed $value + * @return void + */ + public function __set($key, $value) + { + $this->with($key, $value); + } + + /** + * Check if a piece of data is bound to the view. + * + * @param string $key + * @return bool + */ + public function __isset($key) + { + return isset($this->data[$key]); + } + + /** + * Remove a piece of bound data from the view. + * + * @param string $key + * @return bool + */ + public function __unset($key) + { + unset($this->data[$key]); + } + + /** + * Dynamically bind parameters to the view. + * + * @param string $method + * @param array $parameters + * @return \Illuminate\View\View + * + * @throws \BadMethodCallException + */ + public function __call($method, $parameters) + { + if (! Str::startsWith($method, 'with')) { + throw new BadMethodCallException("Method [$method] does not exist on view."); + } + + return $this->with(Str::snake(substr($method, 4)), $parameters[0]); + } + + /** + * Get the string contents of the view. + * + * @return string + */ + public function __toString() + { + return $this->render(); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/View/ViewFinderInterface.php b/vendor/laravel/framework/src/Illuminate/View/ViewFinderInterface.php new file mode 100755 index 0000000..49d609e --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/View/ViewFinderInterface.php @@ -0,0 +1,71 @@ +registerFactory(); + + $this->registerViewFinder(); + + $this->registerEngineResolver(); + } + + /** + * Register the view environment. + * + * @return void + */ + public function registerFactory() + { + $this->app->singleton('view', function ($app) { + // Next we need to grab the engine resolver instance that will be used by the + // environment. The resolver will be used by an environment to get each of + // the various engine implementations such as plain PHP or Blade engine. + $resolver = $app['view.engine.resolver']; + + $finder = $app['view.finder']; + + $env = new Factory($resolver, $finder, $app['events']); + + // We will also set the container instance on this view environment since the + // view composers may be classes registered in the container, which allows + // for great testable, flexible composers for the application developer. + $env->setContainer($app); + + $env->share('app', $app); + + return $env; + }); + } + + /** + * Register the view finder implementation. + * + * @return void + */ + public function registerViewFinder() + { + $this->app->bind('view.finder', function ($app) { + return new FileViewFinder($app['files'], $app['config']['view.paths']); + }); + } + + /** + * Register the engine resolver instance. + * + * @return void + */ + public function registerEngineResolver() + { + $this->app->singleton('view.engine.resolver', function () { + $resolver = new EngineResolver; + + // Next, we will register the various view engines with the resolver so that the + // environment will resolve the engines needed for various views based on the + // extension of view file. We call a method for each of the view's engines. + foreach (['file', 'php', 'blade'] as $engine) { + $this->{'register'.ucfirst($engine).'Engine'}($resolver); + } + + return $resolver; + }); + } + + /** + * Register the file engine implementation. + * + * @param \Illuminate\View\Engines\EngineResolver $resolver + * @return void + */ + public function registerFileEngine($resolver) + { + $resolver->register('file', function () { + return new FileEngine; + }); + } + + /** + * Register the PHP engine implementation. + * + * @param \Illuminate\View\Engines\EngineResolver $resolver + * @return void + */ + public function registerPhpEngine($resolver) + { + $resolver->register('php', function () { + return new PhpEngine; + }); + } + + /** + * Register the Blade engine implementation. + * + * @param \Illuminate\View\Engines\EngineResolver $resolver + * @return void + */ + public function registerBladeEngine($resolver) + { + // The Compiler engine requires an instance of the CompilerInterface, which in + // this case will be the Blade compiler, so we'll first create the compiler + // instance to pass into the engine so it can compile the views properly. + $this->app->singleton('blade.compiler', function () { + return new BladeCompiler( + $this->app['files'], $this->app['config']['view.compiled'] + ); + }); + + $resolver->register('blade', function () { + return new CompilerEngine($this->app['blade.compiler']); + }); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/View/composer.json b/vendor/laravel/framework/src/Illuminate/View/composer.json new file mode 100644 index 0000000..8450fcd --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/View/composer.json @@ -0,0 +1,39 @@ +{ + "name": "illuminate/view", + "description": "The Illuminate View package.", + "license": "MIT", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "require": { + "php": ">=5.6.4", + "illuminate/container": "5.4.*", + "illuminate/contracts": "5.4.*", + "illuminate/events": "5.4.*", + "illuminate/filesystem": "5.4.*", + "illuminate/support": "5.4.*", + "symfony/debug": "~3.2" + }, + "autoload": { + "psr-4": { + "Illuminate\\View\\": "" + } + }, + "extra": { + "branch-alias": { + "dev-master": "5.4-dev" + } + }, + "config": { + "sort-packages": true + }, + "minimum-stability": "dev" +} diff --git a/vendor/laravel/tinker/LICENSE.txt b/vendor/laravel/tinker/LICENSE.txt new file mode 100644 index 0000000..1ce5963 --- /dev/null +++ b/vendor/laravel/tinker/LICENSE.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) + +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/vendor/laravel/tinker/README.md b/vendor/laravel/tinker/README.md new file mode 100644 index 0000000..b9b407b --- /dev/null +++ b/vendor/laravel/tinker/README.md @@ -0,0 +1,36 @@ +

+ +

+Build Status +Total Downloads +Latest Stable Version +License +

+ +## Introduction + +Laravel Tinker is a powerful REPL for the Laravel framework. + +## Installation + +To get started with Laravel Tinker, simply run: + + composer require laravel/tinker + +Next, register the `Laravel\Tinker\TinkerServiceProvider` in your `config/app.php` file: + +```php +'providers' => [ + // Other service providers... + + Laravel\Tinker\TinkerServiceProvider::class, +], +``` + +## Basic Usage + +From your console, execute the `php artisan tinker` command. + +## License + +Laravel Tinker is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT) diff --git a/vendor/laravel/tinker/composer.json b/vendor/laravel/tinker/composer.json new file mode 100644 index 0000000..b77bdbf --- /dev/null +++ b/vendor/laravel/tinker/composer.json @@ -0,0 +1,44 @@ +{ + "name": "laravel/tinker", + "description": "Powerful REPL for the Laravel framework.", + "keywords": ["tinker", "repl", "psysh", "laravel"], + "license": "MIT", + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "require": { + "php": ">=5.5.9", + "illuminate/console": "~5.1", + "illuminate/contracts": "~5.1", + "illuminate/support": "~5.1", + "psy/psysh": "0.7.*|0.8.*", + "symfony/var-dumper": "~3.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.0|~5.0" + }, + "autoload": { + "psr-4": { + "Laravel\\Tinker\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "Tests\\": "tests/" + } + }, + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "config": { + "sort-packages": true + }, + "suggest": { + "illuminate/database": "The Illuminate Database package (~5.1)." + } +} diff --git a/vendor/laravel/tinker/src/Console/TinkerCommand.php b/vendor/laravel/tinker/src/Console/TinkerCommand.php new file mode 100644 index 0000000..6d535e3 --- /dev/null +++ b/vendor/laravel/tinker/src/Console/TinkerCommand.php @@ -0,0 +1,108 @@ +getApplication()->setCatchExceptions(false); + + $config = new Configuration; + + $config->getPresenter()->addCasters( + $this->getCasters() + ); + + $shell = new Shell($config); + $shell->addCommands($this->getCommands()); + $shell->setIncludes($this->argument('include')); + + $shell->run(); + } + + /** + * Get artisan commands to pass through to PsySH. + * + * @return array + */ + protected function getCommands() + { + $commands = []; + + foreach ($this->getApplication()->all() as $name => $command) { + if (in_array($name, $this->commandWhitelist)) { + $commands[] = $command; + } + } + + return $commands; + } + + /** + * Get an array of Laravel tailored casters. + * + * @return array + */ + protected function getCasters() + { + $casters = [ + 'Illuminate\Support\Collection' => 'Laravel\Tinker\TinkerCaster::castCollection', + ]; + + if (class_exists('Illuminate\Database\Eloquent\Model')) { + $casters['Illuminate\Database\Eloquent\Model'] = 'Laravel\Tinker\TinkerCaster::castModel'; + } + + if (class_exists('Illuminate\Foundation\Application')) { + $casters['Illuminate\Foundation\Application'] = 'Laravel\Tinker\TinkerCaster::castApplication'; + } + + return $casters; + } + + /** + * Get the console command arguments. + * + * @return array + */ + protected function getArguments() + { + return [ + ['include', InputArgument::IS_ARRAY, 'Include file(s) before starting tinker'], + ]; + } +} diff --git a/vendor/laravel/tinker/src/TinkerCaster.php b/vendor/laravel/tinker/src/TinkerCaster.php new file mode 100644 index 0000000..42862e3 --- /dev/null +++ b/vendor/laravel/tinker/src/TinkerCaster.php @@ -0,0 +1,95 @@ +$property(); + + if (! is_null($val)) { + $results[Caster::PREFIX_VIRTUAL.$property] = $val; + } + } catch (Exception $e) { + // + } + } + + return $results; + } + + /** + * Get an array representing the properties of a collection. + * + * @param \Illuminate\Support\Collection $collection + * @return array + */ + public static function castCollection($collection) + { + return [ + Caster::PREFIX_VIRTUAL.'all' => $collection->all(), + ]; + } + + /** + * Get an array representing the properties of a model. + * + * @param \Illuminate\Database\Eloquent\Model $model + * @return array + */ + public static function castModel($model) + { + $attributes = array_merge( + $model->getAttributes(), $model->getRelations() + ); + + $visible = array_flip( + $model->getVisible() ?: array_diff(array_keys($attributes), $model->getHidden()) + ); + + $results = []; + + foreach (array_intersect_key($attributes, $visible) as $key => $value) { + $results[(isset($visible[$key]) ? Caster::PREFIX_VIRTUAL : Caster::PREFIX_PROTECTED).$key] = $value; + } + + return $results; + } +} diff --git a/vendor/laravel/tinker/src/TinkerServiceProvider.php b/vendor/laravel/tinker/src/TinkerServiceProvider.php new file mode 100644 index 0000000..c4101b9 --- /dev/null +++ b/vendor/laravel/tinker/src/TinkerServiceProvider.php @@ -0,0 +1,40 @@ +app->singleton('command.tinker', function () { + return new TinkerCommand; + }); + + $this->commands(['command.tinker']); + } + + /** + * Get the services provided by the provider. + * + * @return array + */ + public function provides() + { + return ['command.tinker']; + } +} diff --git a/vendor/league/flysystem/LICENSE b/vendor/league/flysystem/LICENSE new file mode 100644 index 0000000..16ba26e --- /dev/null +++ b/vendor/league/flysystem/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2013-2017 Frank de Jonge + +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/vendor/league/flysystem/composer.json b/vendor/league/flysystem/composer.json new file mode 100644 index 0000000..8f8758c --- /dev/null +++ b/vendor/league/flysystem/composer.json @@ -0,0 +1,60 @@ +{ + "name": "league/flysystem", + "description": "Filesystem abstraction: Many filesystems, one API.", + "keywords": [ + "filesystem", "filesystems", "files", "storage", "dropbox", "aws", + "abstraction", "s3", "ftp", "sftp", "remote", "webdav", + "file systems", "cloud", "cloud files", "rackspace", "copy.com" + ], + "license": "MIT", + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frenky.net" + } + ], + "require": { + "php": ">=5.5.9" + }, + "require-dev": { + "ext-fileinfo": "*", + "phpunit/phpunit": "~4.8", + "mockery/mockery": "~0.9", + "phpspec/phpspec": "^2.2" + }, + "autoload": { + "psr-4": { + "League\\Flysystem\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "League\\Flysystem\\Stub\\": "stub/" + } + }, + "suggest": { + "ext-fileinfo": "Required for MimeType", + "league/flysystem-eventable-filesystem": "Allows you to use EventableFilesystem", + "league/flysystem-rackspace": "Allows you to use Rackspace Cloud Files", + "league/flysystem-copy": "Allows you to use Copy.com storage", + "league/flysystem-azure": "Allows you to use Windows Azure Blob storage", + "league/flysystem-webdav": "Allows you to use WebDAV storage", + "league/flysystem-aws-s3-v2": "Allows you to use S3 storage with AWS SDK v2", + "league/flysystem-aws-s3-v3": "Allows you to use S3 storage with AWS SDK v3", + "spatie/flysystem-dropbox": "Allows you to use Dropbox storage", + "league/flysystem-cached-adapter": "Flysystem adapter decorator for metadata caching", + "league/flysystem-sftp": "Allows you to use SFTP server storage via phpseclib", + "league/flysystem-ziparchive": "Allows you to use ZipArchive adapter" + }, + "conflict": { + "league/flysystem-sftp": "<1.0.6" + }, + "config": { + "bin-dir": "bin" + }, + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + } +} diff --git a/vendor/league/flysystem/src/Adapter/AbstractAdapter.php b/vendor/league/flysystem/src/Adapter/AbstractAdapter.php new file mode 100644 index 0000000..05d19e9 --- /dev/null +++ b/vendor/league/flysystem/src/Adapter/AbstractAdapter.php @@ -0,0 +1,71 @@ +pathPrefix = null; + return; + } + + $this->pathPrefix = rtrim($prefix, '\\/') . $this->pathSeparator; + } + + /** + * Get the path prefix. + * + * @return string path prefix + */ + public function getPathPrefix() + { + return $this->pathPrefix; + } + + /** + * Prefix a path. + * + * @param string $path + * + * @return string prefixed path + */ + public function applyPathPrefix($path) + { + return $this->getPathPrefix() . ltrim($path, '\\/'); + } + + /** + * Remove a path prefix. + * + * @param string $path + * + * @return string path without the prefix + */ + public function removePathPrefix($path) + { + return substr($path, strlen($this->getPathPrefix())); + } +} diff --git a/vendor/league/flysystem/src/Adapter/AbstractFtpAdapter.php b/vendor/league/flysystem/src/Adapter/AbstractFtpAdapter.php new file mode 100644 index 0000000..66286de --- /dev/null +++ b/vendor/league/flysystem/src/Adapter/AbstractFtpAdapter.php @@ -0,0 +1,630 @@ +safeStorage = new SafeStorage(); + $this->setConfig($config); + } + + /** + * Set the config. + * + * @param array $config + * + * @return $this + */ + public function setConfig(array $config) + { + foreach ($this->configurable as $setting) { + if ( ! isset($config[$setting])) { + continue; + } + + $method = 'set' . ucfirst($setting); + + if (method_exists($this, $method)) { + $this->$method($config[$setting]); + } + } + + return $this; + } + + /** + * Returns the host. + * + * @return string + */ + public function getHost() + { + return $this->host; + } + + /** + * Set the host. + * + * @param string $host + * + * @return $this + */ + public function setHost($host) + { + $this->host = $host; + + return $this; + } + + /** + * Set the public permission value. + * + * @param int $permPublic + * + * @return $this + */ + public function setPermPublic($permPublic) + { + $this->permPublic = $permPublic; + + return $this; + } + + /** + * Set the private permission value. + * + * @param int $permPrivate + * + * @return $this + */ + public function setPermPrivate($permPrivate) + { + $this->permPrivate = $permPrivate; + + return $this; + } + + /** + * Returns the ftp port. + * + * @return int + */ + public function getPort() + { + return $this->port; + } + + /** + * Returns the root folder to work from. + * + * @return string + */ + public function getRoot() + { + return $this->root; + } + + /** + * Set the ftp port. + * + * @param int|string $port + * + * @return $this + */ + public function setPort($port) + { + $this->port = (int) $port; + + return $this; + } + + /** + * Set the root folder to work from. + * + * @param string $root + * + * @return $this + */ + public function setRoot($root) + { + $this->root = rtrim($root, '\\/') . $this->separator; + + return $this; + } + + /** + * Returns the ftp username. + * + * @return string username + */ + public function getUsername() + { + $username = $this->safeStorage->retrieveSafely('username'); + + return $username !== null ? $username : 'anonymous'; + } + + /** + * Set ftp username. + * + * @param string $username + * + * @return $this + */ + public function setUsername($username) + { + $this->safeStorage->storeSafely('username', $username); + + return $this; + } + + /** + * Returns the password. + * + * @return string password + */ + public function getPassword() + { + return $this->safeStorage->retrieveSafely('password'); + } + + /** + * Set the ftp password. + * + * @param string $password + * + * @return $this + */ + public function setPassword($password) + { + $this->safeStorage->storeSafely('password', $password); + + return $this; + } + + /** + * Returns the amount of seconds before the connection will timeout. + * + * @return int + */ + public function getTimeout() + { + return $this->timeout; + } + + /** + * Set the amount of seconds before the connection should timeout. + * + * @param int $timeout + * + * @return $this + */ + public function setTimeout($timeout) + { + $this->timeout = (int) $timeout; + + return $this; + } + + /** + * Return the FTP system type. + * + * @return string + */ + public function getSystemType() + { + return $this->systemType; + } + + /** + * Set the FTP system type (windows or unix). + * + * @param string $systemType + * + * @return $this + */ + public function setSystemType($systemType) + { + $this->systemType = strtolower($systemType); + + return $this; + } + + /** + * @inheritdoc + */ + public function listContents($directory = '', $recursive = false) + { + return $this->listDirectoryContents($directory, $recursive); + } + + abstract protected function listDirectoryContents($directory, $recursive = false); + + /** + * Normalize a directory listing. + * + * @param array $listing + * @param string $prefix + * + * @return array directory listing + */ + protected function normalizeListing(array $listing, $prefix = '') + { + $base = $prefix; + $result = []; + $listing = $this->removeDotDirectories($listing); + + while ($item = array_shift($listing)) { + if (preg_match('#^.*:$#', $item)) { + $base = trim($item, ':'); + continue; + } + + $result[] = $this->normalizeObject($item, $base); + } + + return $this->sortListing($result); + } + + /** + * Sort a directory listing. + * + * @param array $result + * + * @return array sorted listing + */ + protected function sortListing(array $result) + { + $compare = function ($one, $two) { + return strnatcmp($one['path'], $two['path']); + }; + + usort($result, $compare); + + return $result; + } + + /** + * Normalize a file entry. + * + * @param string $item + * @param string $base + * + * @return array normalized file array + * + * @throws NotSupportedException + */ + protected function normalizeObject($item, $base) + { + $systemType = $this->systemType ?: $this->detectSystemType($item); + + if ($systemType === 'unix') { + return $this->normalizeUnixObject($item, $base); + } elseif ($systemType === 'windows') { + return $this->normalizeWindowsObject($item, $base); + } + + throw NotSupportedException::forFtpSystemType($systemType); + } + + /** + * Normalize a Unix file entry. + * + * @param string $item + * @param string $base + * + * @return array normalized file array + */ + protected function normalizeUnixObject($item, $base) + { + $item = preg_replace('#\s+#', ' ', trim($item), 7); + + if (count(explode(' ', $item, 9)) !== 9) { + throw new RuntimeException("Metadata can't be parsed from item '$item' , not enough parts."); + } + + list($permissions, /* $number */, /* $owner */, /* $group */, $size, /* $month */, /* $day */, /* $time*/, $name) = explode(' ', $item, 9); + $type = $this->detectType($permissions); + $path = empty($base) ? $name : $base . $this->separator . $name; + + if ($type === 'dir') { + return compact('type', 'path'); + } + + $permissions = $this->normalizePermissions($permissions); + $visibility = $permissions & 0044 ? AdapterInterface::VISIBILITY_PUBLIC : AdapterInterface::VISIBILITY_PRIVATE; + $size = (int) $size; + + return compact('type', 'path', 'visibility', 'size'); + } + + /** + * Normalize a Windows/DOS file entry. + * + * @param string $item + * @param string $base + * + * @return array normalized file array + */ + protected function normalizeWindowsObject($item, $base) + { + $item = preg_replace('#\s+#', ' ', trim($item), 3); + + if (count(explode(' ', $item, 4)) !== 4) { + throw new RuntimeException("Metadata can't be parsed from item '$item' , not enough parts."); + } + + list($date, $time, $size, $name) = explode(' ', $item, 4); + $path = empty($base) ? $name : $base . $this->separator . $name; + + // Check for the correct date/time format + $format = strlen($date) === 8 ? 'm-d-yH:iA' : 'Y-m-dH:i'; + $dt = DateTime::createFromFormat($format, $date . $time); + $timestamp = $dt ? $dt->getTimestamp() : (int) strtotime("$date $time"); + + if ($size === '') { + $type = 'dir'; + + return compact('type', 'path', 'timestamp'); + } + + $type = 'file'; + $visibility = AdapterInterface::VISIBILITY_PUBLIC; + $size = (int) $size; + + return compact('type', 'path', 'visibility', 'size', 'timestamp'); + } + + /** + * Get the system type from a listing item. + * + * @param string $item + * + * @return string the system type + */ + protected function detectSystemType($item) + { + return preg_match('/^[0-9]{2,4}-[0-9]{2}-[0-9]{2}/', $item) ? 'windows' : 'unix'; + } + + /** + * Get the file type from the permissions. + * + * @param string $permissions + * + * @return string file type + */ + protected function detectType($permissions) + { + return substr($permissions, 0, 1) === 'd' ? 'dir' : 'file'; + } + + /** + * Normalize a permissions string. + * + * @param string $permissions + * + * @return int + */ + protected function normalizePermissions($permissions) + { + // remove the type identifier + $permissions = substr($permissions, 1); + + // map the string rights to the numeric counterparts + $map = ['-' => '0', 'r' => '4', 'w' => '2', 'x' => '1']; + $permissions = strtr($permissions, $map); + + // split up the permission groups + $parts = str_split($permissions, 3); + + // convert the groups + $mapper = function ($part) { + return array_sum(str_split($part)); + }; + + // get the sum of the groups + return array_sum(array_map($mapper, $parts)); + } + + /** + * Filter out dot-directories. + * + * @param array $list + * + * @return array + */ + public function removeDotDirectories(array $list) + { + $filter = function ($line) { + if ( ! empty($line) && ! preg_match('#.* \.(\.)?$|^total#', $line)) { + return true; + } + + return false; + }; + + return array_filter($list, $filter); + } + + /** + * @inheritdoc + */ + public function has($path) + { + return $this->getMetadata($path); + } + + /** + * @inheritdoc + */ + public function getSize($path) + { + return $this->getMetadata($path); + } + + /** + * @inheritdoc + */ + public function getVisibility($path) + { + return $this->getMetadata($path); + } + + /** + * Ensure a directory exists. + * + * @param string $dirname + */ + public function ensureDirectory($dirname) + { + if ( ! empty($dirname) && ! $this->has($dirname)) { + $this->createDir($dirname, new Config()); + } + } + + /** + * @return mixed + */ + public function getConnection() + { + $tries = 0; + + while ( ! $this->isConnected() && $tries < 3) { + $tries++; + $this->disconnect(); + $this->connect(); + } + + return $this->connection; + } + + /** + * Get the public permission value. + * + * @return int + */ + public function getPermPublic() + { + return $this->permPublic; + } + + /** + * Get the private permission value. + * + * @return int + */ + public function getPermPrivate() + { + return $this->permPrivate; + } + + /** + * Disconnect on destruction. + */ + public function __destruct() + { + $this->disconnect(); + } + + /** + * Establish a connection. + */ + abstract public function connect(); + + /** + * Close the connection. + */ + abstract public function disconnect(); + + /** + * Check if a connection is active. + * + * @return bool + */ + abstract public function isConnected(); +} diff --git a/vendor/league/flysystem/src/Adapter/Ftp.php b/vendor/league/flysystem/src/Adapter/Ftp.php new file mode 100644 index 0000000..a3bcdd0 --- /dev/null +++ b/vendor/league/flysystem/src/Adapter/Ftp.php @@ -0,0 +1,569 @@ +transferMode = $mode; + + return $this; + } + + /** + * Set if Ssl is enabled. + * + * @param bool $ssl + * + * @return $this + */ + public function setSsl($ssl) + { + $this->ssl = (bool) $ssl; + + return $this; + } + + /** + * Set if passive mode should be used. + * + * @param bool $passive + */ + public function setPassive($passive = true) + { + $this->passive = $passive; + } + + /** + * @param bool $ignorePassiveAddress + */ + public function setIgnorePassiveAddress($ignorePassiveAddress) + { + $this->ignorePassiveAddress = $ignorePassiveAddress; + } + + /** + * @param bool $recurseManually + */ + public function setRecurseManually($recurseManually) + { + $this->recurseManually = $recurseManually; + } + + /** + * @param bool $utf8 + */ + public function setUtf8($utf8) + { + $this->utf8 = (bool) $utf8; + } + + /** + * Connect to the FTP server. + */ + public function connect() + { + if ($this->ssl) { + $this->connection = ftp_ssl_connect($this->getHost(), $this->getPort(), $this->getTimeout()); + } else { + $this->connection = ftp_connect($this->getHost(), $this->getPort(), $this->getTimeout()); + } + + if ( ! $this->connection) { + throw new RuntimeException('Could not connect to host: ' . $this->getHost() . ', port:' . $this->getPort()); + } + + $this->login(); + $this->setUtf8Mode(); + $this->setConnectionPassiveMode(); + $this->setConnectionRoot(); + $this->isPureFtpd = $this->isPureFtpdServer(); + } + + /** + * Set the connection to UTF-8 mode. + */ + protected function setUtf8Mode() + { + if ($this->utf8) { + $response = ftp_raw($this->connection, "OPTS UTF8 ON"); + if (substr($response[0], 0, 3) !== '200') { + throw new RuntimeException( + 'Could not set UTF-8 mode for connection: ' . $this->getHost() . '::' . $this->getPort() + ); + } + } + } + + /** + * Set the connections to passive mode. + * + * @throws RuntimeException + */ + protected function setConnectionPassiveMode() + { + if (is_bool($this->ignorePassiveAddress) && defined('FTP_USEPASVADDRESS')) { + ftp_set_option($this->connection, FTP_USEPASVADDRESS, ! $this->ignorePassiveAddress); + } + + if ( ! ftp_pasv($this->connection, $this->passive)) { + throw new RuntimeException( + 'Could not set passive mode for connection: ' . $this->getHost() . '::' . $this->getPort() + ); + } + } + + /** + * Set the connection root. + */ + protected function setConnectionRoot() + { + $root = $this->getRoot(); + $connection = $this->connection; + + if (empty($root) === false && ! ftp_chdir($connection, $root)) { + throw new RuntimeException('Root is invalid or does not exist: ' . $this->getRoot()); + } + + // Store absolute path for further reference. + // This is needed when creating directories and + // initial root was a relative path, else the root + // would be relative to the chdir'd path. + $this->root = ftp_pwd($connection); + } + + /** + * Login. + * + * @throws RuntimeException + */ + protected function login() + { + set_error_handler(function () {}); + $isLoggedIn = ftp_login( + $this->connection, + $this->getUsername(), + $this->getPassword() + ); + restore_error_handler(); + + if ( ! $isLoggedIn) { + $this->disconnect(); + throw new RuntimeException( + 'Could not login with connection: ' . $this->getHost() . '::' . $this->getPort( + ) . ', username: ' . $this->getUsername() + ); + } + } + + /** + * Disconnect from the FTP server. + */ + public function disconnect() + { + if (is_resource($this->connection)) { + ftp_close($this->connection); + } + + $this->connection = null; + } + + /** + * @inheritdoc + */ + public function write($path, $contents, Config $config) + { + $stream = fopen('php://temp', 'w+b'); + fwrite($stream, $contents); + rewind($stream); + $result = $this->writeStream($path, $stream, $config); + fclose($stream); + + if ($result === false) { + return false; + } + + $result['contents'] = $contents; + $result['mimetype'] = Util::guessMimeType($path, $contents); + + return $result; + } + + /** + * @inheritdoc + */ + public function writeStream($path, $resource, Config $config) + { + $this->ensureDirectory(Util::dirname($path)); + + if ( ! ftp_fput($this->getConnection(), $path, $resource, $this->transferMode)) { + return false; + } + + if ($visibility = $config->get('visibility')) { + $this->setVisibility($path, $visibility); + } + + $type = 'file'; + + return compact('type', 'path', 'visibility'); + } + + /** + * @inheritdoc + */ + public function update($path, $contents, Config $config) + { + return $this->write($path, $contents, $config); + } + + /** + * @inheritdoc + */ + public function updateStream($path, $resource, Config $config) + { + return $this->writeStream($path, $resource, $config); + } + + /** + * @inheritdoc + */ + public function rename($path, $newpath) + { + return ftp_rename($this->getConnection(), $path, $newpath); + } + + /** + * @inheritdoc + */ + public function delete($path) + { + return ftp_delete($this->getConnection(), $path); + } + + /** + * @inheritdoc + */ + public function deleteDir($dirname) + { + $connection = $this->getConnection(); + $contents = array_reverse($this->listDirectoryContents($dirname)); + + foreach ($contents as $object) { + if ($object['type'] === 'file') { + if ( ! ftp_delete($connection, $object['path'])) { + return false; + } + } elseif ( ! ftp_rmdir($connection, $object['path'])) { + return false; + } + } + + return ftp_rmdir($connection, $dirname); + } + + /** + * @inheritdoc + */ + public function createDir($dirname, Config $config) + { + $connection = $this->getConnection(); + $directories = explode('/', $dirname); + + foreach ($directories as $directory) { + if (false === $this->createActualDirectory($directory, $connection)) { + $this->setConnectionRoot(); + + return false; + } + + ftp_chdir($connection, $directory); + } + + $this->setConnectionRoot(); + + return ['type' => 'dir', 'path' => $dirname]; + } + + /** + * Create a directory. + * + * @param string $directory + * @param resource $connection + * + * @return bool + */ + protected function createActualDirectory($directory, $connection) + { + // List the current directory + $listing = ftp_nlist($connection, '.') ?: []; + + foreach ($listing as $key => $item) { + if (preg_match('~^\./.*~', $item)) { + $listing[$key] = substr($item, 2); + } + } + + if (in_array($directory, $listing, true)) { + return true; + } + + return (boolean) ftp_mkdir($connection, $directory); + } + + /** + * @inheritdoc + */ + public function getMetadata($path) + { + $connection = $this->getConnection(); + + if ($path === '') { + return ['type' => 'dir', 'path' => '']; + } + + if (@ftp_chdir($connection, $path) === true) { + $this->setConnectionRoot(); + + return ['type' => 'dir', 'path' => $path]; + } + + $listing = $this->ftpRawlist('-A', str_replace('*', '\\*', $path)); + + if (empty($listing)) { + return false; + } + + if (preg_match('/.* not found/', $listing[0])) { + return false; + } + + if (preg_match('/^total [0-9]*$/', $listing[0])) { + array_shift($listing); + } + + return $this->normalizeObject($listing[0], ''); + } + + /** + * @inheritdoc + */ + public function getMimetype($path) + { + if ( ! $metadata = $this->getMetadata($path)) { + return false; + } + + $metadata['mimetype'] = MimeType::detectByFilename($path); + + return $metadata; + } + + /** + * @inheritdoc + */ + public function getTimestamp($path) + { + $timestamp = ftp_mdtm($this->getConnection(), $path); + + return ($timestamp !== -1) ? ['path' => $path, 'timestamp' => $timestamp] : false; + } + + /** + * @inheritdoc + */ + public function read($path) + { + if ( ! $object = $this->readStream($path)) { + return false; + } + + $object['contents'] = stream_get_contents($object['stream']); + fclose($object['stream']); + unset($object['stream']); + + return $object; + } + + /** + * @inheritdoc + */ + public function readStream($path) + { + $stream = fopen('php://temp', 'w+b'); + $result = ftp_fget($this->getConnection(), $stream, $path, $this->transferMode); + rewind($stream); + + if ( ! $result) { + fclose($stream); + + return false; + } + + return ['type' => 'file', 'path' => $path, 'stream' => $stream]; + } + + /** + * @inheritdoc + */ + public function setVisibility($path, $visibility) + { + $mode = $visibility === AdapterInterface::VISIBILITY_PUBLIC ? $this->getPermPublic() : $this->getPermPrivate(); + + if ( ! ftp_chmod($this->getConnection(), $mode, $path)) { + return false; + } + + return compact('path', 'visibility'); + } + + /** + * @inheritdoc + * + * @param string $directory + */ + protected function listDirectoryContents($directory, $recursive = true) + { + $directory = str_replace('*', '\\*', $directory); + + if ($recursive && $this->recurseManually) { + return $this->listDirectoryContentsRecursive($directory); + } + + $options = $recursive ? '-alnR' : '-aln'; + $listing = $this->ftpRawlist($options, $directory); + + return $listing ? $this->normalizeListing($listing, $directory) : []; + } + + /** + * @inheritdoc + * + * @param string $directory + */ + protected function listDirectoryContentsRecursive($directory) + { + $listing = $this->normalizeListing($this->ftpRawlist('-aln', $directory) ?: []); + $output = []; + + foreach ($listing as $directory) { + $output[] = $directory; + if ($directory['type'] !== 'dir') continue; + + $output = array_merge($output, $this->listDirectoryContentsRecursive($directory['path'])); + } + + return $output; + } + + /** + * Check if the connection is open. + * + * @return bool + * @throws ErrorException + */ + public function isConnected() + { + try { + return is_resource($this->connection) && ftp_rawlist($this->connection, '/') !== false; + } catch (ErrorException $e) { + if (strpos($e->getMessage(), 'ftp_rawlist') === false) { + throw $e; + } + + return false; + } + } + + /** + * @return null|string + */ + protected function isPureFtpdServer() + { + $response = ftp_raw($this->connection, 'HELP'); + + return stripos(implode(' ', $response), 'Pure-FTPd') !== false; + } + + /** + * The ftp_rawlist function with optional escaping. + * + * @param string $options + * @param string $path + * + * @return array + */ + protected function ftpRawlist($options, $path) + { + $connection = $this->getConnection(); + + if ($this->isPureFtpd) { + $path = str_replace(' ', '\ ', $path); + } + return ftp_rawlist($connection, $options . ' ' . $path); + } +} diff --git a/vendor/league/flysystem/src/Adapter/Ftpd.php b/vendor/league/flysystem/src/Adapter/Ftpd.php new file mode 100644 index 0000000..91d0cd8 --- /dev/null +++ b/vendor/league/flysystem/src/Adapter/Ftpd.php @@ -0,0 +1,36 @@ +getConnection(), 'STAT ' . $path)) || count($object) < 3) { + return false; + } + + if (substr($object[1], 0, 5) === "ftpd:") { + return false; + } + + return $this->normalizeObject($object[1], ''); + } + + /** + * @inheritdoc + */ + protected function listDirectoryContents($directory, $recursive = true) + { + $listing = ftp_rawlist($this->getConnection(), $directory, $recursive); + + if ($listing === false || ( ! empty($listing) && substr($listing[0], 0, 5) === "ftpd:")) { + return []; + } + + return $this->normalizeListing($listing, $directory); + } +} diff --git a/vendor/league/flysystem/src/Adapter/Local.php b/vendor/league/flysystem/src/Adapter/Local.php new file mode 100644 index 0000000..07adb66 --- /dev/null +++ b/vendor/league/flysystem/src/Adapter/Local.php @@ -0,0 +1,510 @@ + [ + 'public' => 0644, + 'private' => 0600, + ], + 'dir' => [ + 'public' => 0755, + 'private' => 0700, + ] + ]; + + /** + * @var string + */ + protected $pathSeparator = DIRECTORY_SEPARATOR; + + /** + * @var array + */ + protected $permissionMap; + + /** + * @var int + */ + protected $writeFlags; + /** + * @var int + */ + private $linkHandling; + + /** + * Constructor. + * + * @param string $root + * @param int $writeFlags + * @param int $linkHandling + * @param array $permissions + * + * @throws LogicException + */ + public function __construct($root, $writeFlags = LOCK_EX, $linkHandling = self::DISALLOW_LINKS, array $permissions = []) + { + $root = is_link($root) ? realpath($root) : $root; + $this->permissionMap = array_replace_recursive(static::$permissions, $permissions); + $this->ensureDirectory($root); + + if ( ! is_dir($root) || ! is_readable($root)) { + throw new LogicException('The root path ' . $root . ' is not readable.'); + } + + $this->setPathPrefix($root); + $this->writeFlags = $writeFlags; + $this->linkHandling = $linkHandling; + } + + /** + * Ensure the root directory exists. + * + * @param string $root root directory path + * + * @return void + * + * @throws Exception in case the root directory can not be created + */ + protected function ensureDirectory($root) + { + if ( ! is_dir($root)) { + $umask = umask(0); + @mkdir($root, $this->permissionMap['dir']['public'], true); + umask($umask); + + if ( ! is_dir($root)) { + throw new Exception(sprintf('Impossible to create the root directory "%s".', $root)); + } + } + } + + /** + * @inheritdoc + */ + public function has($path) + { + $location = $this->applyPathPrefix($path); + + return file_exists($location); + } + + /** + * @inheritdoc + */ + public function write($path, $contents, Config $config) + { + $location = $this->applyPathPrefix($path); + $this->ensureDirectory(dirname($location)); + + if (($size = file_put_contents($location, $contents, $this->writeFlags)) === false) { + return false; + } + + $type = 'file'; + $result = compact('contents', 'type', 'size', 'path'); + + if ($visibility = $config->get('visibility')) { + $result['visibility'] = $visibility; + $this->setVisibility($path, $visibility); + } + + return $result; + } + + /** + * @inheritdoc + */ + public function writeStream($path, $resource, Config $config) + { + $location = $this->applyPathPrefix($path); + $this->ensureDirectory(dirname($location)); + $stream = fopen($location, 'w+b'); + + if ( ! $stream) { + return false; + } + + stream_copy_to_stream($resource, $stream); + + if ( ! fclose($stream)) { + return false; + } + + if ($visibility = $config->get('visibility')) { + $this->setVisibility($path, $visibility); + } + + $type = 'file'; + + return compact('type', 'path', 'visibility'); + } + + /** + * @inheritdoc + */ + public function readStream($path) + { + $location = $this->applyPathPrefix($path); + $stream = fopen($location, 'rb'); + + return ['type' => 'file', 'path' => $path, 'stream' => $stream]; + } + + /** + * @inheritdoc + */ + public function updateStream($path, $resource, Config $config) + { + return $this->writeStream($path, $resource, $config); + } + + /** + * @inheritdoc + */ + public function update($path, $contents, Config $config) + { + $location = $this->applyPathPrefix($path); + $mimetype = Util::guessMimeType($path, $contents); + $size = file_put_contents($location, $contents, $this->writeFlags); + + if ($size === false) { + return false; + } + + $type = 'file'; + + return compact('type', 'path', 'size', 'contents', 'mimetype'); + } + + /** + * @inheritdoc + */ + public function read($path) + { + $location = $this->applyPathPrefix($path); + $contents = file_get_contents($location); + + if ($contents === false) { + return false; + } + + return ['type' => 'file', 'path' => $path, 'contents' => $contents]; + } + + /** + * @inheritdoc + */ + public function rename($path, $newpath) + { + $location = $this->applyPathPrefix($path); + $destination = $this->applyPathPrefix($newpath); + $parentDirectory = $this->applyPathPrefix(Util::dirname($newpath)); + $this->ensureDirectory($parentDirectory); + + return rename($location, $destination); + } + + /** + * @inheritdoc + */ + public function copy($path, $newpath) + { + $location = $this->applyPathPrefix($path); + $destination = $this->applyPathPrefix($newpath); + $this->ensureDirectory(dirname($destination)); + + return copy($location, $destination); + } + + /** + * @inheritdoc + */ + public function delete($path) + { + $location = $this->applyPathPrefix($path); + + return unlink($location); + } + + /** + * @inheritdoc + */ + public function listContents($directory = '', $recursive = false) + { + $result = []; + $location = $this->applyPathPrefix($directory); + + if ( ! is_dir($location)) { + return []; + } + + $iterator = $recursive ? $this->getRecursiveDirectoryIterator($location) : $this->getDirectoryIterator($location); + + foreach ($iterator as $file) { + $path = $this->getFilePath($file); + + if (preg_match('#(^|/|\\\\)\.{1,2}$#', $path)) { + continue; + } + + $result[] = $this->normalizeFileInfo($file); + } + + return array_filter($result); + } + + /** + * @inheritdoc + */ + public function getMetadata($path) + { + $location = $this->applyPathPrefix($path); + $info = new SplFileInfo($location); + + return $this->normalizeFileInfo($info); + } + + /** + * @inheritdoc + */ + public function getSize($path) + { + return $this->getMetadata($path); + } + + /** + * @inheritdoc + */ + public function getMimetype($path) + { + $location = $this->applyPathPrefix($path); + $finfo = new Finfo(FILEINFO_MIME_TYPE); + $mimetype = $finfo->file($location); + + if (in_array($mimetype, ['application/octet-stream', 'inode/x-empty'])) { + $mimetype = Util\MimeType::detectByFilename($location); + } + + return ['path' => $path, 'type' => 'file', 'mimetype' => $mimetype]; + } + + /** + * @inheritdoc + */ + public function getTimestamp($path) + { + return $this->getMetadata($path); + } + + /** + * @inheritdoc + */ + public function getVisibility($path) + { + $location = $this->applyPathPrefix($path); + clearstatcache(false, $location); + $permissions = octdec(substr(sprintf('%o', fileperms($location)), -4)); + $visibility = $permissions & 0044 ? AdapterInterface::VISIBILITY_PUBLIC : AdapterInterface::VISIBILITY_PRIVATE; + + return compact('path', 'visibility'); + } + + /** + * @inheritdoc + */ + public function setVisibility($path, $visibility) + { + $location = $this->applyPathPrefix($path); + $type = is_dir($location) ? 'dir' : 'file'; + $success = chmod($location, $this->permissionMap[$type][$visibility]); + + if ($success === false) { + return false; + } + + return compact('path', 'visibility'); + } + + /** + * @inheritdoc + */ + public function createDir($dirname, Config $config) + { + $location = $this->applyPathPrefix($dirname); + $umask = umask(0); + $visibility = $config->get('visibility', 'public'); + + if ( ! is_dir($location) && ! mkdir($location, $this->permissionMap['dir'][$visibility], true)) { + $return = false; + } else { + $return = ['path' => $dirname, 'type' => 'dir']; + } + + umask($umask); + + return $return; + } + + /** + * @inheritdoc + */ + public function deleteDir($dirname) + { + $location = $this->applyPathPrefix($dirname); + + if ( ! is_dir($location)) { + return false; + } + + $contents = $this->getRecursiveDirectoryIterator($location, RecursiveIteratorIterator::CHILD_FIRST); + + /** @var SplFileInfo $file */ + foreach ($contents as $file) { + $this->guardAgainstUnreadableFileInfo($file); + $this->deleteFileInfoObject($file); + } + + return rmdir($location); + } + + /** + * @param SplFileInfo $file + */ + protected function deleteFileInfoObject(SplFileInfo $file) + { + switch ($file->getType()) { + case 'dir': + rmdir($file->getRealPath()); + break; + case 'link': + unlink($file->getPathname()); + break; + default: + unlink($file->getRealPath()); + } + } + + /** + * Normalize the file info. + * + * @param SplFileInfo $file + * + * @return array|void + * + * @throws NotSupportedException + */ + protected function normalizeFileInfo(SplFileInfo $file) + { + if ( ! $file->isLink()) { + return $this->mapFileInfo($file); + } + + if ($this->linkHandling & self::DISALLOW_LINKS) { + throw NotSupportedException::forLink($file); + } + } + + /** + * Get the normalized path from a SplFileInfo object. + * + * @param SplFileInfo $file + * + * @return string + */ + protected function getFilePath(SplFileInfo $file) + { + $location = $file->getPathname(); + $path = $this->removePathPrefix($location); + + return trim(str_replace('\\', '/', $path), '/'); + } + + /** + * @param string $path + * @param int $mode + * + * @return RecursiveIteratorIterator + */ + protected function getRecursiveDirectoryIterator($path, $mode = RecursiveIteratorIterator::SELF_FIRST) + { + return new RecursiveIteratorIterator( + new RecursiveDirectoryIterator($path, FilesystemIterator::SKIP_DOTS), + $mode + ); + } + + /** + * @param string $path + * + * @return DirectoryIterator + */ + protected function getDirectoryIterator($path) + { + $iterator = new DirectoryIterator($path); + + return $iterator; + } + + /** + * @param SplFileInfo $file + * + * @return array + */ + protected function mapFileInfo(SplFileInfo $file) + { + $normalized = [ + 'type' => $file->getType(), + 'path' => $this->getFilePath($file), + ]; + + $normalized['timestamp'] = $file->getMTime(); + + if ($normalized['type'] === 'file') { + $normalized['size'] = $file->getSize(); + } + + return $normalized; + } + + /** + * @param SplFileInfo $file + * + * @throws UnreadableFileException + */ + protected function guardAgainstUnreadableFileInfo(SplFileInfo $file) + { + if ( ! $file->isReadable()) { + throw UnreadableFileException::forFileInfo($file); + } + } +} diff --git a/vendor/league/flysystem/src/Adapter/NullAdapter.php b/vendor/league/flysystem/src/Adapter/NullAdapter.php new file mode 100644 index 0000000..2527087 --- /dev/null +++ b/vendor/league/flysystem/src/Adapter/NullAdapter.php @@ -0,0 +1,144 @@ +get('visibility')) { + $result['visibility'] = $visibility; + } + + return $result; + } + + /** + * @inheritdoc + */ + public function update($path, $contents, Config $config) + { + return false; + } + + /** + * @inheritdoc + */ + public function read($path) + { + return false; + } + + /** + * @inheritdoc + */ + public function rename($path, $newpath) + { + return false; + } + + /** + * @inheritdoc + */ + public function delete($path) + { + return false; + } + + /** + * @inheritdoc + */ + public function listContents($directory = '', $recursive = false) + { + return []; + } + + /** + * @inheritdoc + */ + public function getMetadata($path) + { + return false; + } + + /** + * @inheritdoc + */ + public function getSize($path) + { + return false; + } + + /** + * @inheritdoc + */ + public function getMimetype($path) + { + return false; + } + + /** + * @inheritdoc + */ + public function getTimestamp($path) + { + return false; + } + + /** + * @inheritdoc + */ + public function getVisibility($path) + { + return false; + } + + /** + * @inheritdoc + */ + public function setVisibility($path, $visibility) + { + return compact('visibility'); + } + + /** + * @inheritdoc + */ + public function createDir($dirname, Config $config) + { + return ['path' => $dirname, 'type' => 'dir']; + } + + /** + * @inheritdoc + */ + public function deleteDir($dirname) + { + return false; + } +} diff --git a/vendor/league/flysystem/src/Adapter/Polyfill/NotSupportingVisibilityTrait.php b/vendor/league/flysystem/src/Adapter/Polyfill/NotSupportingVisibilityTrait.php new file mode 100644 index 0000000..fc0a747 --- /dev/null +++ b/vendor/league/flysystem/src/Adapter/Polyfill/NotSupportingVisibilityTrait.php @@ -0,0 +1,33 @@ +readStream($path); + + if ($response === false || ! is_resource($response['stream'])) { + return false; + } + + $result = $this->writeStream($newpath, $response['stream'], new Config()); + + if ($result !== false && is_resource($response['stream'])) { + fclose($response['stream']); + } + + return $result !== false; + } + + // Required abstract method + + /** + * @param string $path + * @return resource + */ + abstract public function readStream($path); + + /** + * @param string $path + * @param resource $resource + * @param Config $config + * @return resource + */ + abstract public function writeStream($path, $resource, Config $config); +} diff --git a/vendor/league/flysystem/src/Adapter/Polyfill/StreamedReadingTrait.php b/vendor/league/flysystem/src/Adapter/Polyfill/StreamedReadingTrait.php new file mode 100644 index 0000000..2b31c01 --- /dev/null +++ b/vendor/league/flysystem/src/Adapter/Polyfill/StreamedReadingTrait.php @@ -0,0 +1,44 @@ +read($path)) { + return false; + } + + $stream = fopen('php://temp', 'w+b'); + fwrite($stream, $data['contents']); + rewind($stream); + $data['stream'] = $stream; + unset($data['contents']); + + return $data; + } + + /** + * Reads a file. + * + * @param string $path + * + * @return array|false + * + * @see League\Flysystem\ReadInterface::read() + */ + abstract public function read($path); +} diff --git a/vendor/league/flysystem/src/Adapter/Polyfill/StreamedTrait.php b/vendor/league/flysystem/src/Adapter/Polyfill/StreamedTrait.php new file mode 100644 index 0000000..8042496 --- /dev/null +++ b/vendor/league/flysystem/src/Adapter/Polyfill/StreamedTrait.php @@ -0,0 +1,9 @@ +stream($path, $resource, $config, 'write'); + } + + /** + * Update a file using a stream. + * + * @param string $path + * @param resource $resource + * @param Config $config Config object or visibility setting + * + * @return mixed false of file metadata + */ + public function updateStream($path, $resource, Config $config) + { + return $this->stream($path, $resource, $config, 'update'); + } + + // Required abstract methods + abstract public function write($pash, $contents, Config $config); + abstract public function update($pash, $contents, Config $config); +} diff --git a/vendor/league/flysystem/src/Adapter/SynologyFtp.php b/vendor/league/flysystem/src/Adapter/SynologyFtp.php new file mode 100644 index 0000000..fe0d344 --- /dev/null +++ b/vendor/league/flysystem/src/Adapter/SynologyFtp.php @@ -0,0 +1,8 @@ +settings = $settings; + } + + /** + * Get a setting. + * + * @param string $key + * @param mixed $default + * + * @return mixed config setting or default when not found + */ + public function get($key, $default = null) + { + if ( ! array_key_exists($key, $this->settings)) { + return $this->getDefault($key, $default); + } + + return $this->settings[$key]; + } + + /** + * Check if an item exists by key. + * + * @param string $key + * + * @return bool + */ + public function has($key) + { + if (array_key_exists($key, $this->settings)) { + return true; + } + + return $this->fallback instanceof Config + ? $this->fallback->has($key) + : false; + } + + /** + * Try to retrieve a default setting from a config fallback. + * + * @param string $key + * @param mixed $default + * + * @return mixed config setting or default when not found + */ + protected function getDefault($key, $default) + { + if ( ! $this->fallback) { + return $default; + } + + return $this->fallback->get($key, $default); + } + + /** + * Set a setting. + * + * @param string $key + * @param mixed $value + * + * @return $this + */ + public function set($key, $value) + { + $this->settings[$key] = $value; + + return $this; + } + + /** + * Set the fallback. + * + * @param Config $fallback + * + * @return $this + */ + public function setFallback(Config $fallback) + { + $this->fallback = $fallback; + + return $this; + } +} diff --git a/vendor/league/flysystem/src/ConfigAwareTrait.php b/vendor/league/flysystem/src/ConfigAwareTrait.php new file mode 100644 index 0000000..202d605 --- /dev/null +++ b/vendor/league/flysystem/src/ConfigAwareTrait.php @@ -0,0 +1,49 @@ +config = $config ? Util::ensureConfig($config) : new Config; + } + + /** + * Get the Config. + * + * @return Config config object + */ + public function getConfig() + { + return $this->config; + } + + /** + * Convert a config array to a Config object with the correct fallback. + * + * @param array $config + * + * @return Config + */ + protected function prepareConfig(array $config) + { + $config = new Config($config); + $config->setFallback($this->getConfig()); + + return $config; + } +} diff --git a/vendor/league/flysystem/src/Directory.php b/vendor/league/flysystem/src/Directory.php new file mode 100644 index 0000000..6ba744b --- /dev/null +++ b/vendor/league/flysystem/src/Directory.php @@ -0,0 +1,28 @@ +filesystem->deleteDir($this->path); + } + + /** + * List the directory contents. + * + * @param bool $recursive + * + * @return array|bool directory contents or false + */ + public function getContents($recursive = false) + { + return $this->filesystem->listContents($this->path, $recursive); + } +} diff --git a/vendor/league/flysystem/src/Exception.php b/vendor/league/flysystem/src/Exception.php new file mode 100644 index 0000000..d4a9907 --- /dev/null +++ b/vendor/league/flysystem/src/Exception.php @@ -0,0 +1,8 @@ +filesystem->has($this->path); + } + + /** + * Read the file. + * + * @return string file contents + */ + public function read() + { + return $this->filesystem->read($this->path); + } + + /** + * Read the file as a stream. + * + * @return resource file stream + */ + public function readStream() + { + return $this->filesystem->readStream($this->path); + } + + /** + * Write the new file. + * + * @param string $content + * + * @return bool success boolean + */ + public function write($content) + { + return $this->filesystem->write($this->path, $content); + } + + /** + * Write the new file using a stream. + * + * @param resource $resource + * + * @return bool success boolean + */ + public function writeStream($resource) + { + return $this->filesystem->writeStream($this->path, $resource); + } + + /** + * Update the file contents. + * + * @param string $content + * + * @return bool success boolean + */ + public function update($content) + { + return $this->filesystem->update($this->path, $content); + } + + /** + * Update the file contents with a stream. + * + * @param resource $resource + * + * @return bool success boolean + */ + public function updateStream($resource) + { + return $this->filesystem->updateStream($this->path, $resource); + } + + /** + * Create the file or update if exists. + * + * @param string $content + * + * @return bool success boolean + */ + public function put($content) + { + return $this->filesystem->put($this->path, $content); + } + + /** + * Create the file or update if exists using a stream. + * + * @param resource $resource + * + * @return bool success boolean + */ + public function putStream($resource) + { + return $this->filesystem->putStream($this->path, $resource); + } + + /** + * Rename the file. + * + * @param string $newpath + * + * @return bool success boolean + */ + public function rename($newpath) + { + if ($this->filesystem->rename($this->path, $newpath)) { + $this->path = $newpath; + + return true; + } + + return false; + } + + /** + * Copy the file. + * + * @param string $newpath + * + * @return File|false new file or false + */ + public function copy($newpath) + { + if ($this->filesystem->copy($this->path, $newpath)) { + return new File($this->filesystem, $newpath); + } + + return false; + } + + /** + * Get the file's timestamp. + * + * @return int unix timestamp + */ + public function getTimestamp() + { + return $this->filesystem->getTimestamp($this->path); + } + + /** + * Get the file's mimetype. + * + * @return string mimetime + */ + public function getMimetype() + { + return $this->filesystem->getMimetype($this->path); + } + + /** + * Get the file's visibility. + * + * @return string visibility + */ + public function getVisibility() + { + return $this->filesystem->getVisibility($this->path); + } + + /** + * Get the file's metadata. + * + * @return array + */ + public function getMetadata() + { + return $this->filesystem->getMetadata($this->path); + } + + /** + * Get the file size. + * + * @return int file size + */ + public function getSize() + { + return $this->filesystem->getSize($this->path); + } + + /** + * Delete the file. + * + * @return bool success boolean + */ + public function delete() + { + return $this->filesystem->delete($this->path); + } +} diff --git a/vendor/league/flysystem/src/FileExistsException.php b/vendor/league/flysystem/src/FileExistsException.php new file mode 100644 index 0000000..c82e20c --- /dev/null +++ b/vendor/league/flysystem/src/FileExistsException.php @@ -0,0 +1,37 @@ +path = $path; + + parent::__construct('File already exists at path: ' . $this->getPath(), $code, $previous); + } + + /** + * Get the path which was found. + * + * @return string + */ + public function getPath() + { + return $this->path; + } +} diff --git a/vendor/league/flysystem/src/FileNotFoundException.php b/vendor/league/flysystem/src/FileNotFoundException.php new file mode 100644 index 0000000..989df69 --- /dev/null +++ b/vendor/league/flysystem/src/FileNotFoundException.php @@ -0,0 +1,37 @@ +path = $path; + + parent::__construct('File not found at path: ' . $this->getPath(), $code, $previous); + } + + /** + * Get the path which was not found. + * + * @return string + */ + public function getPath() + { + return $this->path; + } +} diff --git a/vendor/league/flysystem/src/Filesystem.php b/vendor/league/flysystem/src/Filesystem.php new file mode 100644 index 0000000..7a85fde --- /dev/null +++ b/vendor/league/flysystem/src/Filesystem.php @@ -0,0 +1,404 @@ +adapter = $adapter; + $this->setConfig($config); + } + + /** + * Get the Adapter. + * + * @return AdapterInterface adapter + */ + public function getAdapter() + { + return $this->adapter; + } + + /** + * @inheritdoc + */ + public function has($path) + { + $path = Util::normalizePath($path); + + return strlen($path) === 0 ? false : (bool) $this->getAdapter()->has($path); + } + + /** + * @inheritdoc + */ + public function write($path, $contents, array $config = []) + { + $path = Util::normalizePath($path); + $this->assertAbsent($path); + $config = $this->prepareConfig($config); + + return (bool) $this->getAdapter()->write($path, $contents, $config); + } + + /** + * @inheritdoc + */ + public function writeStream($path, $resource, array $config = []) + { + if ( ! is_resource($resource)) { + throw new InvalidArgumentException(__METHOD__ . ' expects argument #2 to be a valid resource.'); + } + + $path = Util::normalizePath($path); + $this->assertAbsent($path); + $config = $this->prepareConfig($config); + + Util::rewindStream($resource); + + return (bool) $this->getAdapter()->writeStream($path, $resource, $config); + } + + /** + * @inheritdoc + */ + public function put($path, $contents, array $config = []) + { + $path = Util::normalizePath($path); + $config = $this->prepareConfig($config); + + if ($this->has($path)) { + return (bool) $this->getAdapter()->update($path, $contents, $config); + } + + return (bool) $this->getAdapter()->write($path, $contents, $config); + } + + /** + * @inheritdoc + */ + public function putStream($path, $resource, array $config = []) + { + if ( ! is_resource($resource)) { + throw new InvalidArgumentException(__METHOD__ . ' expects argument #2 to be a valid resource.'); + } + + $path = Util::normalizePath($path); + $config = $this->prepareConfig($config); + Util::rewindStream($resource); + + if ($this->has($path)) { + return (bool) $this->getAdapter()->updateStream($path, $resource, $config); + } + + return (bool) $this->getAdapter()->writeStream($path, $resource, $config); + } + + /** + * @inheritdoc + */ + public function readAndDelete($path) + { + $path = Util::normalizePath($path); + $this->assertPresent($path); + $contents = $this->read($path); + + if ($contents === false) { + return false; + } + + $this->delete($path); + + return $contents; + } + + /** + * @inheritdoc + */ + public function update($path, $contents, array $config = []) + { + $path = Util::normalizePath($path); + $config = $this->prepareConfig($config); + + $this->assertPresent($path); + + return (bool) $this->getAdapter()->update($path, $contents, $config); + } + + /** + * @inheritdoc + */ + public function updateStream($path, $resource, array $config = []) + { + if ( ! is_resource($resource)) { + throw new InvalidArgumentException(__METHOD__ . ' expects argument #2 to be a valid resource.'); + } + + $path = Util::normalizePath($path); + $config = $this->prepareConfig($config); + $this->assertPresent($path); + Util::rewindStream($resource); + + return (bool) $this->getAdapter()->updateStream($path, $resource, $config); + } + + /** + * @inheritdoc + */ + public function read($path) + { + $path = Util::normalizePath($path); + $this->assertPresent($path); + + if ( ! ($object = $this->getAdapter()->read($path))) { + return false; + } + + return $object['contents']; + } + + /** + * @inheritdoc + */ + public function readStream($path) + { + $path = Util::normalizePath($path); + $this->assertPresent($path); + + if ( ! $object = $this->getAdapter()->readStream($path)) { + return false; + } + + return $object['stream']; + } + + /** + * @inheritdoc + */ + public function rename($path, $newpath) + { + $path = Util::normalizePath($path); + $newpath = Util::normalizePath($newpath); + $this->assertPresent($path); + $this->assertAbsent($newpath); + + return (bool) $this->getAdapter()->rename($path, $newpath); + } + + /** + * @inheritdoc + */ + public function copy($path, $newpath) + { + $path = Util::normalizePath($path); + $newpath = Util::normalizePath($newpath); + $this->assertPresent($path); + $this->assertAbsent($newpath); + + return $this->getAdapter()->copy($path, $newpath); + } + + /** + * @inheritdoc + */ + public function delete($path) + { + $path = Util::normalizePath($path); + $this->assertPresent($path); + + return $this->getAdapter()->delete($path); + } + + /** + * @inheritdoc + */ + public function deleteDir($dirname) + { + $dirname = Util::normalizePath($dirname); + + if ($dirname === '') { + throw new RootViolationException('Root directories can not be deleted.'); + } + + return (bool) $this->getAdapter()->deleteDir($dirname); + } + + /** + * @inheritdoc + */ + public function createDir($dirname, array $config = []) + { + $dirname = Util::normalizePath($dirname); + $config = $this->prepareConfig($config); + + return (bool) $this->getAdapter()->createDir($dirname, $config); + } + + /** + * @inheritdoc + */ + public function listContents($directory = '', $recursive = false) + { + $directory = Util::normalizePath($directory); + $contents = $this->getAdapter()->listContents($directory, $recursive); + + return (new ContentListingFormatter($directory, $recursive))->formatListing($contents); + } + + /** + * @inheritdoc + */ + public function getMimetype($path) + { + $path = Util::normalizePath($path); + $this->assertPresent($path); + + if ( ! $object = $this->getAdapter()->getMimetype($path)) { + return false; + } + + return $object['mimetype']; + } + + /** + * @inheritdoc + */ + public function getTimestamp($path) + { + $path = Util::normalizePath($path); + $this->assertPresent($path); + + if ( ! $object = $this->getAdapter()->getTimestamp($path)) { + return false; + } + + return $object['timestamp']; + } + + /** + * @inheritdoc + */ + public function getVisibility($path) + { + $path = Util::normalizePath($path); + $this->assertPresent($path); + + if (($object = $this->getAdapter()->getVisibility($path)) === false) { + return false; + } + + return $object['visibility']; + } + + /** + * @inheritdoc + */ + public function getSize($path) + { + $path = Util::normalizePath($path); + + if (($object = $this->getAdapter()->getSize($path)) === false || ! isset($object['size'])) { + return false; + } + + return (int) $object['size']; + } + + /** + * @inheritdoc + */ + public function setVisibility($path, $visibility) + { + $path = Util::normalizePath($path); + + return (bool) $this->getAdapter()->setVisibility($path, $visibility); + } + + /** + * @inheritdoc + */ + public function getMetadata($path) + { + $path = Util::normalizePath($path); + $this->assertPresent($path); + + return $this->getAdapter()->getMetadata($path); + } + + /** + * @inheritdoc + */ + public function get($path, Handler $handler = null) + { + $path = Util::normalizePath($path); + + if ( ! $handler) { + $metadata = $this->getMetadata($path); + $handler = $metadata['type'] === 'file' ? new File($this, $path) : new Directory($this, $path); + } + + $handler->setPath($path); + $handler->setFilesystem($this); + + return $handler; + } + + /** + * Assert a file is present. + * + * @param string $path path to file + * + * @throws FileNotFoundException + * + * @return void + */ + public function assertPresent($path) + { + if ($this->config->get('disable_asserts', false) === false && ! $this->has($path)) { + throw new FileNotFoundException($path); + } + } + + /** + * Assert a file is absent. + * + * @param string $path path to file + * + * @throws FileExistsException + * + * @return void + */ + public function assertAbsent($path) + { + if ($this->config->get('disable_asserts', false) === false && $this->has($path)) { + throw new FileExistsException($path); + } + } +} diff --git a/vendor/league/flysystem/src/FilesystemInterface.php b/vendor/league/flysystem/src/FilesystemInterface.php new file mode 100644 index 0000000..4baec7c --- /dev/null +++ b/vendor/league/flysystem/src/FilesystemInterface.php @@ -0,0 +1,276 @@ +path = $path; + $this->filesystem = $filesystem; + } + + /** + * Check whether the entree is a directory. + * + * @return bool + */ + public function isDir() + { + return $this->getType() === 'dir'; + } + + /** + * Check whether the entree is a file. + * + * @return bool + */ + public function isFile() + { + return $this->getType() === 'file'; + } + + /** + * Retrieve the entree type (file|dir). + * + * @return string file or dir + */ + public function getType() + { + $metadata = $this->filesystem->getMetadata($this->path); + + return $metadata['type']; + } + + /** + * Set the Filesystem object. + * + * @param FilesystemInterface $filesystem + * + * @return $this + */ + public function setFilesystem(FilesystemInterface $filesystem) + { + $this->filesystem = $filesystem; + + return $this; + } + + /** + * Retrieve the Filesystem object. + * + * @return FilesystemInterface + */ + public function getFilesystem() + { + return $this->filesystem; + } + + /** + * Set the entree path. + * + * @param string $path + * + * @return $this + */ + public function setPath($path) + { + $this->path = $path; + + return $this; + } + + /** + * Retrieve the entree path. + * + * @return string path + */ + public function getPath() + { + return $this->path; + } + + /** + * Plugins pass-through. + * + * @param string $method + * @param array $arguments + * + * @return mixed + */ + public function __call($method, array $arguments) + { + array_unshift($arguments, $this->path); + $callback = [$this->filesystem, $method]; + + try { + return call_user_func_array($callback, $arguments); + } catch (BadMethodCallException $e) { + throw new BadMethodCallException( + 'Call to undefined method ' + . get_called_class() + . '::' . $method + ); + } + } +} diff --git a/vendor/league/flysystem/src/MountManager.php b/vendor/league/flysystem/src/MountManager.php new file mode 100644 index 0000000..bd38594 --- /dev/null +++ b/vendor/league/flysystem/src/MountManager.php @@ -0,0 +1,306 @@ + Filesystem,] + * + * @throws InvalidArgumentException + */ + public function __construct(array $filesystems = []) + { + $this->mountFilesystems($filesystems); + } + + /** + * Mount filesystems. + * + * @param FilesystemInterface[] $filesystems [:prefix => Filesystem,] + * + * @throws InvalidArgumentException + * + * @return $this + */ + public function mountFilesystems(array $filesystems) + { + foreach ($filesystems as $prefix => $filesystem) { + $this->mountFilesystem($prefix, $filesystem); + } + + return $this; + } + + /** + * Mount filesystems. + * + * @param string $prefix + * @param FilesystemInterface $filesystem + * + * @throws InvalidArgumentException + * + * @return $this + */ + public function mountFilesystem($prefix, FilesystemInterface $filesystem) + { + if ( ! is_string($prefix)) { + throw new InvalidArgumentException(__METHOD__ . ' expects argument #1 to be a string.'); + } + + $this->filesystems[$prefix] = $filesystem; + + return $this; + } + + /** + * Get the filesystem with the corresponding prefix. + * + * @param string $prefix + * + * @throws FilesystemNotFoundException + * + * @return FilesystemInterface + */ + public function getFilesystem($prefix) + { + if ( ! isset($this->filesystems[$prefix])) { + throw new FilesystemNotFoundException('No filesystem mounted with prefix ' . $prefix); + } + + return $this->filesystems[$prefix]; + } + + /** + * Retrieve the prefix from an arguments array. + * + * @param array $arguments + * + * @throws InvalidArgumentException + * + * @return array [:prefix, :arguments] + */ + public function filterPrefix(array $arguments) + { + if (empty($arguments)) { + throw new InvalidArgumentException('At least one argument needed'); + } + + $path = array_shift($arguments); + + if ( ! is_string($path)) { + throw new InvalidArgumentException('First argument should be a string'); + } + + list($prefix, $path) = $this->getPrefixAndPath($path); + array_unshift($arguments, $path); + + return [$prefix, $arguments]; + } + + /** + * @param string $directory + * @param bool $recursive + * + * @throws InvalidArgumentException + * @throws FilesystemNotFoundException + * + * @return array + */ + public function listContents($directory = '', $recursive = false) + { + list($prefix, $directory) = $this->getPrefixAndPath($directory); + $filesystem = $this->getFilesystem($prefix); + $result = $filesystem->listContents($directory, $recursive); + + foreach ($result as &$file) { + $file['filesystem'] = $prefix; + } + + return $result; + } + + /** + * Call forwarder. + * + * @param string $method + * @param array $arguments + * + * @throws InvalidArgumentException + * @throws FilesystemNotFoundException + * + * @return mixed + */ + public function __call($method, $arguments) + { + list($prefix, $arguments) = $this->filterPrefix($arguments); + + return $this->invokePluginOnFilesystem($method, $arguments, $prefix); + } + + /** + * @param string $from + * @param string $to + * @param array $config + * + * @throws InvalidArgumentException + * @throws FilesystemNotFoundException + * + * @return bool + */ + public function copy($from, $to, array $config = []) + { + list($prefixFrom, $from) = $this->getPrefixAndPath($from); + + $buffer = $this->getFilesystem($prefixFrom)->readStream($from); + + if ($buffer === false) { + return false; + } + + list($prefixTo, $to) = $this->getPrefixAndPath($to); + + $result = $this->getFilesystem($prefixTo)->writeStream($to, $buffer, $config); + + if (is_resource($buffer)) { + fclose($buffer); + } + + return $result; + } + + /** + * List with plugin adapter. + * + * @param array $keys + * @param string $directory + * @param bool $recursive + * + * @throws InvalidArgumentException + * @throws FilesystemNotFoundException + * + * @return array + */ + public function listWith(array $keys = [], $directory = '', $recursive = false) + { + list($prefix, $directory) = $this->getPrefixAndPath($directory); + $arguments = [$keys, $directory, $recursive]; + + return $this->invokePluginOnFilesystem('listWith', $arguments, $prefix); + } + + /** + * Move a file. + * + * @param string $from + * @param string $to + * @param array $config + * + * @throws InvalidArgumentException + * @throws FilesystemNotFoundException + * + * @return bool + */ + public function move($from, $to, array $config = []) + { + $copied = $this->copy($from, $to, $config); + + if ($copied) { + return $this->delete($from); + } + + return false; + } + + /** + * Invoke a plugin on a filesystem mounted on a given prefix. + * + * @param string $method + * @param array $arguments + * @param string $prefix + * + * @throws FilesystemNotFoundException + * + * @return mixed + */ + public function invokePluginOnFilesystem($method, $arguments, $prefix) + { + $filesystem = $this->getFilesystem($prefix); + + try { + return $this->invokePlugin($method, $arguments, $filesystem); + } catch (PluginNotFoundException $e) { + // Let it pass, it's ok, don't panic. + } + + $callback = [$filesystem, $method]; + + return call_user_func_array($callback, $arguments); + } + + /** + * @param string $path + * + * @throws InvalidArgumentException + * + * @return string[] [:prefix, :path] + */ + protected function getPrefixAndPath($path) + { + if (strpos($path, '://') < 1) { + throw new InvalidArgumentException('No prefix detected in path: ' . $path); + } + + return explode('://', $path, 2); + } +} diff --git a/vendor/league/flysystem/src/NotSupportedException.php b/vendor/league/flysystem/src/NotSupportedException.php new file mode 100644 index 0000000..08f47f7 --- /dev/null +++ b/vendor/league/flysystem/src/NotSupportedException.php @@ -0,0 +1,37 @@ +getPathname()); + } + + /** + * Create a new exception for a link. + * + * @param string $systemType + * + * @return static + */ + public static function forFtpSystemType($systemType) + { + $message = "The FTP system type '$systemType' is currently not supported."; + + return new static($message); + } +} diff --git a/vendor/league/flysystem/src/Plugin/AbstractPlugin.php b/vendor/league/flysystem/src/Plugin/AbstractPlugin.php new file mode 100644 index 0000000..0d56789 --- /dev/null +++ b/vendor/league/flysystem/src/Plugin/AbstractPlugin.php @@ -0,0 +1,24 @@ +filesystem = $filesystem; + } +} diff --git a/vendor/league/flysystem/src/Plugin/EmptyDir.php b/vendor/league/flysystem/src/Plugin/EmptyDir.php new file mode 100644 index 0000000..9502333 --- /dev/null +++ b/vendor/league/flysystem/src/Plugin/EmptyDir.php @@ -0,0 +1,34 @@ +filesystem->listContents($dirname, false); + + foreach ($listing as $item) { + if ($item['type'] === 'dir') { + $this->filesystem->deleteDir($item['path']); + } else { + $this->filesystem->delete($item['path']); + } + } + } +} diff --git a/vendor/league/flysystem/src/Plugin/ForcedCopy.php b/vendor/league/flysystem/src/Plugin/ForcedCopy.php new file mode 100644 index 0000000..d2fc379 --- /dev/null +++ b/vendor/league/flysystem/src/Plugin/ForcedCopy.php @@ -0,0 +1,42 @@ +filesystem->delete($newpath); + } catch (FileNotFoundException $e) { + // The destination path does not exist. That's ok. + $deleted = true; + } + + if ($deleted) { + return $this->filesystem->copy($path, $newpath); + } + + return false; + } +} diff --git a/vendor/league/flysystem/src/Plugin/ForcedRename.php b/vendor/league/flysystem/src/Plugin/ForcedRename.php new file mode 100644 index 0000000..7c081b6 --- /dev/null +++ b/vendor/league/flysystem/src/Plugin/ForcedRename.php @@ -0,0 +1,42 @@ +filesystem->delete($newpath); + } catch (FileNotFoundException $e) { + // The destination path does not exist. That's ok. + $deleted = true; + } + + if ($deleted) { + return $this->filesystem->rename($path, $newpath); + } + + return false; + } +} diff --git a/vendor/league/flysystem/src/Plugin/GetWithMetadata.php b/vendor/league/flysystem/src/Plugin/GetWithMetadata.php new file mode 100644 index 0000000..bc39ef8 --- /dev/null +++ b/vendor/league/flysystem/src/Plugin/GetWithMetadata.php @@ -0,0 +1,49 @@ +filesystem->getMetadata($path); + + if ( ! $object) { + return false; + } + + $keys = array_diff($metadata, array_keys($object)); + + foreach ($keys as $key) { + if ( ! method_exists($this->filesystem, $method = 'get' . ucfirst($key))) { + throw new InvalidArgumentException('Could not fetch metadata: ' . $key); + } + + $object[$key] = $this->filesystem->{$method}($path); + } + + return $object; + } +} diff --git a/vendor/league/flysystem/src/Plugin/ListFiles.php b/vendor/league/flysystem/src/Plugin/ListFiles.php new file mode 100644 index 0000000..9669fe7 --- /dev/null +++ b/vendor/league/flysystem/src/Plugin/ListFiles.php @@ -0,0 +1,35 @@ +filesystem->listContents($directory, $recursive); + + $filter = function ($object) { + return $object['type'] === 'file'; + }; + + return array_values(array_filter($contents, $filter)); + } +} diff --git a/vendor/league/flysystem/src/Plugin/ListPaths.php b/vendor/league/flysystem/src/Plugin/ListPaths.php new file mode 100644 index 0000000..514bdf0 --- /dev/null +++ b/vendor/league/flysystem/src/Plugin/ListPaths.php @@ -0,0 +1,36 @@ +filesystem->listContents($directory, $recursive); + + foreach ($contents as $object) { + $result[] = $object['path']; + } + + return $result; + } +} diff --git a/vendor/league/flysystem/src/Plugin/ListWith.php b/vendor/league/flysystem/src/Plugin/ListWith.php new file mode 100644 index 0000000..7d773e6 --- /dev/null +++ b/vendor/league/flysystem/src/Plugin/ListWith.php @@ -0,0 +1,60 @@ +filesystem->listContents($directory, $recursive); + + foreach ($contents as $index => $object) { + if ($object['type'] === 'file') { + $missingKeys = array_diff($keys, array_keys($object)); + $contents[$index] = array_reduce($missingKeys, [$this, 'getMetadataByName'], $object); + } + } + + return $contents; + } + + /** + * Get a meta-data value by key name. + * + * @param array $object + * @param $key + * + * @return array + */ + protected function getMetadataByName(array $object, $key) + { + $method = 'get' . ucfirst($key); + + if ( ! method_exists($this->filesystem, $method)) { + throw new \InvalidArgumentException('Could not get meta-data for key: ' . $key); + } + + $object[$key] = $this->filesystem->{$method}($object['path']); + + return $object; + } +} diff --git a/vendor/league/flysystem/src/Plugin/PluggableTrait.php b/vendor/league/flysystem/src/Plugin/PluggableTrait.php new file mode 100644 index 0000000..922edfe --- /dev/null +++ b/vendor/league/flysystem/src/Plugin/PluggableTrait.php @@ -0,0 +1,97 @@ +plugins[$plugin->getMethod()] = $plugin; + + return $this; + } + + /** + * Find a specific plugin. + * + * @param string $method + * + * @throws PluginNotFoundException + * + * @return PluginInterface + */ + protected function findPlugin($method) + { + if ( ! isset($this->plugins[$method])) { + throw new PluginNotFoundException('Plugin not found for method: ' . $method); + } + + return $this->plugins[$method]; + } + + /** + * Invoke a plugin by method name. + * + * @param string $method + * @param array $arguments + * @param FilesystemInterface $filesystem + * + * @throws PluginNotFoundException + * + * @return mixed + */ + protected function invokePlugin($method, array $arguments, FilesystemInterface $filesystem) + { + $plugin = $this->findPlugin($method); + $plugin->setFilesystem($filesystem); + $callback = [$plugin, 'handle']; + + return call_user_func_array($callback, $arguments); + } + + /** + * Plugins pass-through. + * + * @param string $method + * @param array $arguments + * + * @throws BadMethodCallException + * + * @return mixed + */ + public function __call($method, array $arguments) + { + try { + return $this->invokePlugin($method, $arguments, $this); + } catch (PluginNotFoundException $e) { + throw new BadMethodCallException( + 'Call to undefined method ' + . get_class($this) + . '::' . $method + ); + } + } +} diff --git a/vendor/league/flysystem/src/Plugin/PluginNotFoundException.php b/vendor/league/flysystem/src/Plugin/PluginNotFoundException.php new file mode 100644 index 0000000..fd1d7e7 --- /dev/null +++ b/vendor/league/flysystem/src/Plugin/PluginNotFoundException.php @@ -0,0 +1,10 @@ +hash = spl_object_hash($this); + static::$safeStorage[$this->hash] = []; + } + + public function storeSafely($key, $value) + { + static::$safeStorage[$this->hash][$key] = $value; + } + + public function retrieveSafely($key) + { + if (array_key_exists($key, static::$safeStorage[$this->hash])) { + return static::$safeStorage[$this->hash][$key]; + } + } + + public function __destruct() + { + unset(static::$safeStorage[$this->hash]); + } +} diff --git a/vendor/league/flysystem/src/UnreadableFileException.php b/vendor/league/flysystem/src/UnreadableFileException.php new file mode 100644 index 0000000..e668033 --- /dev/null +++ b/vendor/league/flysystem/src/UnreadableFileException.php @@ -0,0 +1,18 @@ +getRealPath() + ) + ); + } +} diff --git a/vendor/league/flysystem/src/Util.php b/vendor/league/flysystem/src/Util.php new file mode 100644 index 0000000..d743e81 --- /dev/null +++ b/vendor/league/flysystem/src/Util.php @@ -0,0 +1,310 @@ + $to) { + if ( ! isset($object[$from])) { + continue; + } + + $result[$to] = $object[$from]; + } + + return $result; + } + + /** + * Normalize path. + * + * @param string $path + * + * @throws LogicException + * + * @return string + */ + public static function normalizePath($path) + { + return static::normalizeRelativePath($path); + } + + /** + * Normalize relative directories in a path. + * + * @param string $path + * + * @throws LogicException + * + * @return string + */ + public static function normalizeRelativePath($path) + { + $path = str_replace('\\', '/', $path); + $path = static::removeFunkyWhiteSpace($path); + + $parts = []; + + foreach (explode('/', $path) as $part) { + switch ($part) { + case '': + case '.': + break; + + case '..': + if (empty($parts)) { + throw new LogicException( + 'Path is outside of the defined root, path: [' . $path . ']' + ); + } + array_pop($parts); + break; + + default: + $parts[] = $part; + break; + } + } + + return implode('/', $parts); + } + + /** + * Removes unprintable characters and invalid unicode characters. + * + * @param string $path + * + * @return string $path + */ + protected static function removeFunkyWhiteSpace($path) { + // We do this check in a loop, since removing invalid unicode characters + // can lead to new characters being created. + while (preg_match('#\p{C}+|^\./#u', $path)) { + $path = preg_replace('#\p{C}+|^\./#u', '', $path); + } + + return $path; + } + + /** + * Normalize prefix. + * + * @param string $prefix + * @param string $separator + * + * @return string normalized path + */ + public static function normalizePrefix($prefix, $separator) + { + return rtrim($prefix, $separator) . $separator; + } + + /** + * Get content size. + * + * @param string $contents + * + * @return int content size + */ + public static function contentSize($contents) + { + return defined('MB_OVERLOAD_STRING') ? mb_strlen($contents, '8bit') : strlen($contents); + } + + /** + * Guess MIME Type based on the path of the file and it's content. + * + * @param string $path + * @param string|resource $content + * + * @return string|null MIME Type or NULL if no extension detected + */ + public static function guessMimeType($path, $content) + { + $mimeType = MimeType::detectByContent($content); + + if ( ! (empty($mimeType) || in_array($mimeType, ['application/x-empty', 'text/plain', 'text/x-asm']))) { + return $mimeType; + } + + return MimeType::detectByFilename($path); + } + + /** + * Emulate directories. + * + * @param array $listing + * + * @return array listing with emulated directories + */ + public static function emulateDirectories(array $listing) + { + $directories = []; + $listedDirectories = []; + + foreach ($listing as $object) { + list($directories, $listedDirectories) = static::emulateObjectDirectories( + $object, + $directories, + $listedDirectories + ); + } + + $directories = array_diff(array_unique($directories), array_unique($listedDirectories)); + + foreach ($directories as $directory) { + $listing[] = static::pathinfo($directory) + ['type' => 'dir']; + } + + return $listing; + } + + /** + * Ensure a Config instance. + * + * @param null|array|Config $config + * + * @return Config config instance + * + * @throw LogicException + */ + public static function ensureConfig($config) + { + if ($config === null) { + return new Config(); + } + + if ($config instanceof Config) { + return $config; + } + + if (is_array($config)) { + return new Config($config); + } + + throw new LogicException('A config should either be an array or a Flysystem\Config object.'); + } + + /** + * Rewind a stream. + * + * @param resource $resource + */ + public static function rewindStream($resource) + { + if (ftell($resource) !== 0 && static::isSeekableStream($resource)) { + rewind($resource); + } + } + + public static function isSeekableStream($resource) + { + $metadata = stream_get_meta_data($resource); + + return $metadata['seekable']; + } + + /** + * Get the size of a stream. + * + * @param resource $resource + * + * @return int stream size + */ + public static function getStreamSize($resource) + { + $stat = fstat($resource); + + return $stat['size']; + } + + /** + * Emulate the directories of a single object. + * + * @param array $object + * @param array $directories + * @param array $listedDirectories + * + * @return array + */ + protected static function emulateObjectDirectories(array $object, array $directories, array $listedDirectories) + { + if ($object['type'] === 'dir') { + $listedDirectories[] = $object['path']; + } + + if (empty($object['dirname'])) { + return [$directories, $listedDirectories]; + } + + $parent = $object['dirname']; + + while ( ! empty($parent) && ! in_array($parent, $directories)) { + $directories[] = $parent; + $parent = static::dirname($parent); + } + + if (isset($object['type']) && $object['type'] === 'dir') { + $listedDirectories[] = $object['path']; + + return [$directories, $listedDirectories]; + } + + return [$directories, $listedDirectories]; + } +} diff --git a/vendor/league/flysystem/src/Util/ContentListingFormatter.php b/vendor/league/flysystem/src/Util/ContentListingFormatter.php new file mode 100644 index 0000000..db453c4 --- /dev/null +++ b/vendor/league/flysystem/src/Util/ContentListingFormatter.php @@ -0,0 +1,119 @@ +directory = $directory; + $this->recursive = $recursive; + } + + /** + * Format contents listing. + * + * @param array $listing + * + * @return array + */ + public function formatListing(array $listing) + { + $listing = array_values( + array_map( + [$this, 'addPathInfo'], + array_filter($listing, [$this, 'isEntryOutOfScope']) + ) + ); + + return $this->sortListing($listing); + } + + private function addPathInfo(array $entry) + { + return $entry + Util::pathinfo($entry['path']); + } + + /** + * Determine if the entry is out of scope. + * + * @param array $entry + * + * @return bool + */ + private function isEntryOutOfScope(array $entry) + { + if (empty($entry['path']) && $entry['path'] !== '0') { + return false; + } + + if ($this->recursive) { + return $this->residesInDirectory($entry); + } + + return $this->isDirectChild($entry); + } + + /** + * Check if the entry resides within the parent directory. + * + * @param $entry + * + * @return bool + */ + private function residesInDirectory(array $entry) + { + if ($this->directory === '') { + return true; + } + + return strpos($entry['path'], $this->directory . '/') === 0; + } + + /** + * Check if the entry is a direct child of the directory. + * + * @param $entry + * + * @return bool + */ + private function isDirectChild(array $entry) + { + return Util::dirname($entry['path']) === $this->directory; + } + + /** + * @param array $listing + * + * @return array + */ + private function sortListing(array $listing) + { + usort( + $listing, + function ($a, $b) { + return strcasecmp($a['path'], $b['path']); + } + ); + + return $listing; + } +} diff --git a/vendor/league/flysystem/src/Util/MimeType.php b/vendor/league/flysystem/src/Util/MimeType.php new file mode 100644 index 0000000..1ccf9dc --- /dev/null +++ b/vendor/league/flysystem/src/Util/MimeType.php @@ -0,0 +1,216 @@ +buffer($content) ?: null; + } catch( ErrorException $e ) { + // This is caused by an array to string conversion error. + } + } + + /** + * Detects MIME Type based on file extension. + * + * @param string $extension + * + * @return string|null MIME Type or NULL if no extension detected + */ + public static function detectByFileExtension($extension) + { + static $extensionToMimeTypeMap; + + if (! $extensionToMimeTypeMap) { + $extensionToMimeTypeMap = static::getExtensionToMimeTypeMap(); + } + + if (isset($extensionToMimeTypeMap[$extension])) { + return $extensionToMimeTypeMap[$extension]; + } + + return 'text/plain'; + } + + /** + * @param string $filename + * + * @return string + */ + public static function detectByFilename($filename) + { + $extension = strtolower(pathinfo($filename, PATHINFO_EXTENSION)); + + return empty($extension) ? 'text/plain' : static::detectByFileExtension($extension); + } + + /** + * @return array Map of file extension to MIME Type + */ + public static function getExtensionToMimeTypeMap() + { + return [ + 'hqx' => 'application/mac-binhex40', + 'cpt' => 'application/mac-compactpro', + 'csv' => 'text/x-comma-separated-values', + 'bin' => 'application/octet-stream', + 'dms' => 'application/octet-stream', + 'lha' => 'application/octet-stream', + 'lzh' => 'application/octet-stream', + 'exe' => 'application/octet-stream', + 'class' => 'application/octet-stream', + 'psd' => 'application/x-photoshop', + 'so' => 'application/octet-stream', + 'sea' => 'application/octet-stream', + 'dll' => 'application/octet-stream', + 'oda' => 'application/oda', + 'pdf' => 'application/pdf', + 'ai' => 'application/pdf', + 'eps' => 'application/postscript', + 'ps' => 'application/postscript', + 'smi' => 'application/smil', + 'smil' => 'application/smil', + 'mif' => 'application/vnd.mif', + 'xls' => 'application/vnd.ms-excel', + 'ppt' => 'application/powerpoint', + 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation', + 'wbxml' => 'application/wbxml', + 'wmlc' => 'application/wmlc', + 'dcr' => 'application/x-director', + 'dir' => 'application/x-director', + 'dxr' => 'application/x-director', + 'dvi' => 'application/x-dvi', + 'gtar' => 'application/x-gtar', + 'gz' => 'application/x-gzip', + 'gzip' => 'application/x-gzip', + 'php' => 'application/x-httpd-php', + 'php4' => 'application/x-httpd-php', + 'php3' => 'application/x-httpd-php', + 'phtml' => 'application/x-httpd-php', + 'phps' => 'application/x-httpd-php-source', + 'js' => 'application/javascript', + 'swf' => 'application/x-shockwave-flash', + 'sit' => 'application/x-stuffit', + 'tar' => 'application/x-tar', + 'tgz' => 'application/x-tar', + 'z' => 'application/x-compress', + 'xhtml' => 'application/xhtml+xml', + 'xht' => 'application/xhtml+xml', + 'zip' => 'application/x-zip', + 'rar' => 'application/x-rar', + 'mid' => 'audio/midi', + 'midi' => 'audio/midi', + 'mpga' => 'audio/mpeg', + 'mp2' => 'audio/mpeg', + 'mp3' => 'audio/mpeg', + 'aif' => 'audio/x-aiff', + 'aiff' => 'audio/x-aiff', + 'aifc' => 'audio/x-aiff', + 'ram' => 'audio/x-pn-realaudio', + 'rm' => 'audio/x-pn-realaudio', + 'rpm' => 'audio/x-pn-realaudio-plugin', + 'ra' => 'audio/x-realaudio', + 'rv' => 'video/vnd.rn-realvideo', + 'wav' => 'audio/x-wav', + 'jpg' => 'image/jpeg', + 'jpeg' => 'image/jpeg', + 'jpe' => 'image/jpeg', + 'png' => 'image/png', + 'gif' => 'image/gif', + 'bmp' => 'image/bmp', + 'tiff' => 'image/tiff', + 'tif' => 'image/tiff', + 'svg' => 'image/svg+xml', + 'css' => 'text/css', + 'html' => 'text/html', + 'htm' => 'text/html', + 'shtml' => 'text/html', + 'txt' => 'text/plain', + 'text' => 'text/plain', + 'log' => 'text/plain', + 'rtx' => 'text/richtext', + 'rtf' => 'text/rtf', + 'xml' => 'application/xml', + 'xsl' => 'application/xml', + 'mpeg' => 'video/mpeg', + 'mpg' => 'video/mpeg', + 'mpe' => 'video/mpeg', + 'qt' => 'video/quicktime', + 'mov' => 'video/quicktime', + 'avi' => 'video/x-msvideo', + 'movie' => 'video/x-sgi-movie', + 'doc' => 'application/msword', + 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', + 'dot' => 'application/msword', + 'dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', + 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', + 'word' => 'application/msword', + 'xl' => 'application/excel', + 'eml' => 'message/rfc822', + 'json' => 'application/json', + 'pem' => 'application/x-x509-user-cert', + 'p10' => 'application/x-pkcs10', + 'p12' => 'application/x-pkcs12', + 'p7a' => 'application/x-pkcs7-signature', + 'p7c' => 'application/pkcs7-mime', + 'p7m' => 'application/pkcs7-mime', + 'p7r' => 'application/x-pkcs7-certreqresp', + 'p7s' => 'application/pkcs7-signature', + 'crt' => 'application/x-x509-ca-cert', + 'crl' => 'application/pkix-crl', + 'der' => 'application/x-x509-ca-cert', + 'kdb' => 'application/octet-stream', + 'pgp' => 'application/pgp', + 'gpg' => 'application/gpg-keys', + 'sst' => 'application/octet-stream', + 'csr' => 'application/octet-stream', + 'rsa' => 'application/x-pkcs7', + 'cer' => 'application/pkix-cert', + '3g2' => 'video/3gpp2', + '3gp' => 'video/3gp', + 'mp4' => 'video/mp4', + 'm4a' => 'audio/x-m4a', + 'f4v' => 'video/mp4', + 'webm' => 'video/webm', + 'aac' => 'audio/x-acc', + 'm4u' => 'application/vnd.mpegurl', + 'm3u' => 'text/plain', + 'xspf' => 'application/xspf+xml', + 'vlc' => 'application/videolan', + 'wmv' => 'video/x-ms-wmv', + 'au' => 'audio/x-au', + 'ac3' => 'audio/ac3', + 'flac' => 'audio/x-flac', + 'ogg' => 'audio/ogg', + 'kmz' => 'application/vnd.google-earth.kmz', + 'kml' => 'application/vnd.google-earth.kml+xml', + 'ics' => 'text/calendar', + 'zsh' => 'text/x-scriptzsh', + '7zip' => 'application/x-7z-compressed', + 'cdr' => 'application/cdr', + 'wma' => 'audio/x-ms-wma', + 'jar' => 'application/java-archive', + ]; + } +} diff --git a/vendor/league/flysystem/src/Util/StreamHasher.php b/vendor/league/flysystem/src/Util/StreamHasher.php new file mode 100644 index 0000000..8dc96ca --- /dev/null +++ b/vendor/league/flysystem/src/Util/StreamHasher.php @@ -0,0 +1,36 @@ +algo = $algo; + } + + /** + * @param $resource + * + * @return string + */ + public function hash($resource) + { + rewind($resource); + $context = hash_init($this->algo); + hash_update_stream($context, $resource); + fclose($resource); + + return hash_final($context); + } +} diff --git a/vendor/mockery/mockery/.gitignore b/vendor/mockery/mockery/.gitignore new file mode 100644 index 0000000..3b5e189 --- /dev/null +++ b/vendor/mockery/mockery/.gitignore @@ -0,0 +1,12 @@ +*~ +pearfarm.spec +*.sublime-project +library/Hamcrest/* +composer.lock +vendor/ +composer.phar +test.php +build/ +phpunit.xml +*.DS_store +.idea/* diff --git a/vendor/mockery/mockery/.php_cs b/vendor/mockery/mockery/.php_cs new file mode 100644 index 0000000..74df8bf --- /dev/null +++ b/vendor/mockery/mockery/.php_cs @@ -0,0 +1,14 @@ +exclude('examples') + ->exclude('docs') + ->exclude('travis') + ->exclude('vendor') + ->exclude('tests/Mockery/_files') + ->exclude('tests/Mockery/_files') + ->in(__DIR__); + +return Symfony\CS\Config\Config::create() + ->level('psr2') + ->finder($finder); \ No newline at end of file diff --git a/vendor/mockery/mockery/.scrutinizer.yml b/vendor/mockery/mockery/.scrutinizer.yml new file mode 100644 index 0000000..3b633cc --- /dev/null +++ b/vendor/mockery/mockery/.scrutinizer.yml @@ -0,0 +1,24 @@ +filter: + paths: [library/*] + excluded_paths: [vendor/*, tests/*, examples/*] +before_commands: + - 'composer install --dev --prefer-source' +tools: + external_code_coverage: + timeout: 300 + php_code_sniffer: true + php_cpd: + enabled: true + excluded_dirs: [vendor, tests, examples] + php_pdepend: + enabled: true + excluded_dirs: [vendor, tests, examples] + php_loc: + enabled: true + excluded_dirs: [vendor, tests, examples] + php_hhvm: false + php_mess_detector: true + php_analyzer: true +changetracking: + bug_patterns: ["\bfix(?:es|ed)?\b"] + feature_patterns: ["\badd(?:s|ed)?\b", "\bimplement(?:s|ed)?\b"] diff --git a/vendor/mockery/mockery/.styleci.yml b/vendor/mockery/mockery/.styleci.yml new file mode 100644 index 0000000..f6c002f --- /dev/null +++ b/vendor/mockery/mockery/.styleci.yml @@ -0,0 +1 @@ +preset: psr2 diff --git a/vendor/mockery/mockery/.travis.yml b/vendor/mockery/mockery/.travis.yml new file mode 100644 index 0000000..637b4d0 --- /dev/null +++ b/vendor/mockery/mockery/.travis.yml @@ -0,0 +1,42 @@ +language: php + +php: + - 5.3 + - 5.4 + - 5.5 + - 5.6 + - 7.0 + - hhvm + - hhvm-nightly + +matrix: + allow_failures: + - php: hhvm + - php: hhvm-nightly + +sudo: false + +cache: + directories: + - $HOME/.composer/cache + +before_install: + - composer self-update + +install: + - travis_retry ./travis/install.sh + +before_script: + - ./travis/before_script.sh + +script: + - ./travis/script.sh + +after_success: + - ./travis/after_success.sh + +notifications: + email: + - padraic.brady@gmail.com + - dave@atstsolutions.co.uk + irc: "irc.freenode.org#mockery" diff --git a/vendor/mockery/mockery/CHANGELOG.md b/vendor/mockery/mockery/CHANGELOG.md new file mode 100644 index 0000000..2a216dc --- /dev/null +++ b/vendor/mockery/mockery/CHANGELOG.md @@ -0,0 +1,44 @@ +# Change Log + +## 0.9.4 (XXXX-XX-XX) + +* `shouldIgnoreMissing` will respect global `allowMockingNonExistentMethods` + config +* Some support for variadic parameters +* Hamcrest is now a required dependency +* Instance mocks now respect `shouldIgnoreMissing` call on control instance +* This will be the *last version to support PHP 5.3* +* Added `Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration` trait +* Added `makePartial` to `Mockery\MockInterface` as it was missing + +## 0.9.3 (2014-12-22) + +* Added a basic spy implementation +* Added `Mockery\Adapter\Phpunit\MockeryTestCase` for more reliable PHPUnit + integration + +## 0.9.2 (2014-09-03) + +* Some workarounds for the serilisation problems created by changes to PHP in 5.5.13, 5.4.29, + 5.6. +* Demeter chains attempt to reuse doubles as they see fit, so for foo->bar and + foo->baz, we'll attempt to use the same foo + +## 0.9.1 (2014-05-02) + +* Allow specifying consecutive exceptions to be thrown with `andThrowExceptions` +* Allow specifying methods which can be mocked when using + `Mockery\Configuration::allowMockingNonExistentMethods(false)` with + `Mockery\MockInterface::shouldAllowMockingMethod($methodName)` +* Added andReturnSelf method: `$mock->shouldReceive("foo")->andReturnSelf()` +* `shouldIgnoreMissing` now takes an optional value that will be return instead + of null, e.g. `$mock->shouldIgnoreMissing($mock)` + +## 0.9.0 (2014-02-05) + +* Allow mocking classes with final __wakeup() method +* Quick definitions are now always `byDefault` +* Allow mocking of protected methods with `shouldAllowMockingProtectedMethods` +* Support official Hamcrest package +* Generator completely rewritten +* Easily create named mocks with namedMock diff --git a/vendor/mockery/mockery/CONTRIBUTING.md b/vendor/mockery/mockery/CONTRIBUTING.md new file mode 100644 index 0000000..9ceb665 --- /dev/null +++ b/vendor/mockery/mockery/CONTRIBUTING.md @@ -0,0 +1,89 @@ +# Contributing + + +We'd love you to help out with mockery and no contribution is too small. + + +## Reporting Bugs + +Issues can be reported on the [issue +tracker](https://github.com/padraic/mockery/issues). Please try and report any +bugs with a minimal reproducible example, it will make things easier for other +contributors and your problems will hopefully be resolved quickly. + + +## Requesting Features + +We're always interested to hear about your ideas and you can request features by +creating a ticket in the [issue +tracker](https://github.com/padraic/mockery/issues). We can't always guarantee +someone will jump on it straight away, but putting it out there to see if anyone +else is interested is a good idea. + +Likewise, if a feature you would like is already listed in +the issue tracker, add a :+1: so that other contributors know it's a feature +that would help others. + + +## Contributing code and documentation + +We loosely follow the +[PSR-1](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-1-basic-coding-standard.md) +and +[PSR-2](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md) coding standards, +but we'll probably merge any code that looks close enough. + +* Fork the [repository](https://github.com/padraic/mockery) on GitHub +* Add the code for your feature or bug +* Add some tests for your feature or bug +* Optionally, but preferably, write some documentation +* Optionally, update the CHANGELOG.md file with your feature or + [BC](http://en.wikipedia.org/wiki/Backward_compatibility) break +* If you have created new library files, add them to the root package.xml file for PEAR install support. +* Send a [Pull + Request](https://help.github.com/articles/creating-a-pull-request) to the + correct target branch (see below) + +If you have a big change or would like to discuss something, create an issue in +the [issue tracker](https://github.com/padraic/mockery/issues) or jump in to +\#mockery on freenode + + +Any code you contribute must be licensed under the [BSD 3-Clause +License](http://opensource.org/licenses/BSD-3-Clause). + + +## Target Branch + +Mockery may have several active branches at any one time and roughly follows a +[Git Branching Model](https://igor.io/2013/10/21/git-branching-model.html). +Generally, if you're developing a new feature, you want to be targeting the +master branch, if it's a bug fix, you want to be targeting a release branch, +e.g. 0.8. + + +## Testing Mockery + +To run the unit tests for Mockery, clone the git repository, download Composer using +the instructions at [http://getcomposer.org/download/](http://getcomposer.org/download/), +then install the dependencies with `php /path/to/composer.phar install --dev`. + +This will install the required PHPUnit and Hamcrest dev dependencies and create the +autoload files required by the unit tests. You may run the `vendor/bin/phpunit` command +to run the unit tests. If everything goes to plan, there will be no failed tests! + + +## Debugging Mockery + +Mockery and it's code generation can be difficult to debug. A good start is to +use the `RequireLoader`, which will dump the code generated by mockery to a file +before requiring it, rather than using eval. This will help with stack traces, +and you will be able to open the mock class in your editor. + +``` php + +// tests/bootstrap.php + +Mockery::setLoader(new Mockery\Loader\RequireLoader(sys_get_temp_dir())); + +``` diff --git a/vendor/mockery/mockery/LICENSE b/vendor/mockery/mockery/LICENSE new file mode 100644 index 0000000..2ca3b06 --- /dev/null +++ b/vendor/mockery/mockery/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2010-2014, Pádraic Brady +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * The name of Pádraic Brady may not be used to endorse or promote + products derived from this software without specific prior written + permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/mockery/mockery/README.md b/vendor/mockery/mockery/README.md new file mode 100644 index 0000000..9483ff1 --- /dev/null +++ b/vendor/mockery/mockery/README.md @@ -0,0 +1,68 @@ +Mockery +======= + +[![Build Status](https://travis-ci.org/padraic/mockery.png?branch=master)](http://travis-ci.org/padraic/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) + + +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. + +Mockery is released under a New BSD License. + +The current released version on Packagist is 0.9.3. +The current released version for PEAR is 0.9.0. Composer users may instead opt to use +the current master branch aliased to 0.9.x-dev. + +## Installation + +To install Mockery, run the command below and you will get the latest +version + +```sh +composer require mockery/mockery +``` + +If you want to run the tests: + +```sh +vendor/bin/phpunit +``` + +####Note + +The future Mockery 0.9.4 release will be the final version to have PHP 5.3 +as a minimum requirement. The minimum PHP requirement will thereafter move to +PHP 5.4. Also, the PEAR channel will go offline permanently no earlier than 30 +June 2015. + +## Mock Objects + +In unit tests, mock objects simulate the behaviour of real objects. They are +commonly utilised to offer test isolation, to stand in for objects which do not +yet exist, or to allow for the exploratory design of class APIs without +requiring actual implementation up front. + +The benefits of a mock object framework are to allow for the flexible generation +of such mock objects (and stubs). They allow the setting of expected method calls +and return values using a flexible API which is capable of capturing every +possible real object behaviour in way that is stated as close as possible to a +natural language description. + + +## Prerequisites + +Mockery requires PHP 5.3.2 or greater. In addition, it is recommended to install +the Hamcrest library (see below for instructions) which contains additional +matchers used when defining expected method arguments. + + +## Documentation + +The current version can be seen at [docs.mockery.io](http://docs.mockery.io). diff --git a/vendor/mockery/mockery/composer.json b/vendor/mockery/mockery/composer.json new file mode 100644 index 0000000..d538f0d --- /dev/null +++ b/vendor/mockery/mockery/composer.json @@ -0,0 +1,35 @@ +{ + "name": "mockery/mockery", + "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.", + "keywords": ["library", "testing", "test", "stub", "mock", "mockery", "test double", "tdd", "bdd", "mock objects"], + "homepage": "http://github.com/padraic/mockery", + "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" + } + ], + "require": { + "php": ">=5.3.2", + "lib-pcre": ">=7.0", + "hamcrest/hamcrest-php": "~1.1" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "autoload": { + "psr-0": { "Mockery": "library/" } + }, + "extra": { + "branch-alias": { + "dev-master": "0.9.x-dev" + } + } +} diff --git a/vendor/mockery/mockery/docs/.gitignore b/vendor/mockery/mockery/docs/.gitignore new file mode 100644 index 0000000..e35d885 --- /dev/null +++ b/vendor/mockery/mockery/docs/.gitignore @@ -0,0 +1 @@ +_build diff --git a/vendor/mockery/mockery/docs/Makefile b/vendor/mockery/mockery/docs/Makefile new file mode 100644 index 0000000..9a8c940 --- /dev/null +++ b/vendor/mockery/mockery/docs/Makefile @@ -0,0 +1,177 @@ +# Makefile for Sphinx documentation +# + +# You can set these variables from the command line. +SPHINXOPTS = +SPHINXBUILD = sphinx-build +PAPER = +BUILDDIR = _build + +# User-friendly check for sphinx-build +ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) +$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/) +endif + +# Internal variables. +PAPEROPT_a4 = -D latex_paper_size=a4 +PAPEROPT_letter = -D latex_paper_size=letter +ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . +# the i18n builder cannot share the environment and doctrees with the others +I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . + +.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext + +help: + @echo "Please use \`make ' where is one of" + @echo " html to make standalone HTML files" + @echo " dirhtml to make HTML files named index.html in directories" + @echo " singlehtml to make a single large HTML file" + @echo " pickle to make pickle files" + @echo " json to make JSON files" + @echo " htmlhelp to make HTML files and a HTML help project" + @echo " qthelp to make HTML files and a qthelp project" + @echo " devhelp to make HTML files and a Devhelp project" + @echo " epub to make an epub" + @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" + @echo " latexpdf to make LaTeX files and run them through pdflatex" + @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" + @echo " text to make text files" + @echo " man to make manual pages" + @echo " texinfo to make Texinfo files" + @echo " info to make Texinfo files and run them through makeinfo" + @echo " gettext to make PO message catalogs" + @echo " changes to make an overview of all changed/added/deprecated items" + @echo " xml to make Docutils-native XML files" + @echo " pseudoxml to make pseudoxml-XML files for display purposes" + @echo " linkcheck to check all external links for integrity" + @echo " doctest to run all doctests embedded in the documentation (if enabled)" + +clean: + rm -rf $(BUILDDIR)/* + +html: + $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." + +dirhtml: + $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." + +singlehtml: + $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml + @echo + @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." + +pickle: + $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle + @echo + @echo "Build finished; now you can process the pickle files." + +json: + $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json + @echo + @echo "Build finished; now you can process the JSON files." + +htmlhelp: + $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp + @echo + @echo "Build finished; now you can run HTML Help Workshop with the" \ + ".hhp project file in $(BUILDDIR)/htmlhelp." + +qthelp: + $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp + @echo + @echo "Build finished; now you can run "qcollectiongenerator" with the" \ + ".qhcp project file in $(BUILDDIR)/qthelp, like this:" + @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/MockeryDocs.qhcp" + @echo "To view the help file:" + @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/MockeryDocs.qhc" + +devhelp: + $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp + @echo + @echo "Build finished." + @echo "To view the help file:" + @echo "# mkdir -p $$HOME/.local/share/devhelp/MockeryDocs" + @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/MockeryDocs" + @echo "# devhelp" + +epub: + $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub + @echo + @echo "Build finished. The epub file is in $(BUILDDIR)/epub." + +latex: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo + @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." + @echo "Run \`make' in that directory to run these through (pdf)latex" \ + "(use \`make latexpdf' here to do that automatically)." + +latexpdf: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo "Running LaTeX files through pdflatex..." + $(MAKE) -C $(BUILDDIR)/latex all-pdf + @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + +latexpdfja: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo "Running LaTeX files through platex and dvipdfmx..." + $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja + @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + +text: + $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text + @echo + @echo "Build finished. The text files are in $(BUILDDIR)/text." + +man: + $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man + @echo + @echo "Build finished. The manual pages are in $(BUILDDIR)/man." + +texinfo: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo + @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." + @echo "Run \`make' in that directory to run these through makeinfo" \ + "(use \`make info' here to do that automatically)." + +info: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo "Running Texinfo files through makeinfo..." + make -C $(BUILDDIR)/texinfo info + @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." + +gettext: + $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale + @echo + @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." + +changes: + $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes + @echo + @echo "The overview file is in $(BUILDDIR)/changes." + +linkcheck: + $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck + @echo + @echo "Link check complete; look for any errors in the above output " \ + "or in $(BUILDDIR)/linkcheck/output.txt." + +doctest: + $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest + @echo "Testing of doctests in the sources finished, look at the " \ + "results in $(BUILDDIR)/doctest/output.txt." + +xml: + $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml + @echo + @echo "Build finished. The XML files are in $(BUILDDIR)/xml." + +pseudoxml: + $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml + @echo + @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." diff --git a/vendor/mockery/mockery/docs/README.md b/vendor/mockery/mockery/docs/README.md new file mode 100644 index 0000000..63ca69d --- /dev/null +++ b/vendor/mockery/mockery/docs/README.md @@ -0,0 +1,4 @@ +mockery-docs +============ + +Document for the PHP Mockery framework on readthedocs.org \ No newline at end of file diff --git a/vendor/mockery/mockery/docs/conf.py b/vendor/mockery/mockery/docs/conf.py new file mode 100644 index 0000000..088cdcc --- /dev/null +++ b/vendor/mockery/mockery/docs/conf.py @@ -0,0 +1,259 @@ +# -*- coding: utf-8 -*- +# +# Mockery Docs documentation build configuration file, created by +# sphinx-quickstart on Mon Mar 3 14:04:26 2014. +# +# This file is execfile()d with the current directory set to its +# containing dir. +# +# Note that not all possible configuration values are present in this +# autogenerated file. +# +# All configuration values have a default; values that are commented out +# serve to show the default. + +import sys +import os + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +#sys.path.insert(0, os.path.abspath('.')) + +# -- General configuration ------------------------------------------------ + +# If your documentation needs a minimal Sphinx version, state it here. +#needs_sphinx = '1.0' + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = [ + 'sphinx.ext.todo', +] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The suffix of source filenames. +source_suffix = '.rst' + +# The encoding of source files. +#source_encoding = 'utf-8-sig' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = u'Mockery Docs' +copyright = u'2014, Pádraic Brady, Dave Marshall, Wouter, Graham Campbell' + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +# +# The short X.Y version. +version = '0.9' +# The full version, including alpha/beta/rc tags. +release = '0.9' + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +#language = None + +# There are two options for replacing |today|: either, you set today to some +# non-false value, then it is used: +#today = '' +# Else, today_fmt is used as the format for a strftime call. +#today_fmt = '%B %d, %Y' + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +exclude_patterns = ['_build'] + +# The reST default role (used for this markup: `text`) to use for all +# documents. +#default_role = None + +# If true, '()' will be appended to :func: etc. cross-reference text. +#add_function_parentheses = True + +# If true, the current module name will be prepended to all description +# unit titles (such as .. function::). +#add_module_names = True + +# If true, sectionauthor and moduleauthor directives will be shown in the +# output. They are ignored by default. +#show_authors = False + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + +# A list of ignored prefixes for module index sorting. +#modindex_common_prefix = [] + +# If true, keep warnings as "system message" paragraphs in the built documents. +#keep_warnings = False + + +# -- Options for HTML output ---------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +html_theme = 'default' + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +#html_theme_options = {} + +# Add any paths that contain custom themes here, relative to this directory. +#html_theme_path = [] + +# The name of an image file (within the static path) to use as favicon of the +# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 +# pixels large. +#html_favicon = None + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] + +# Add any extra paths that contain custom files (such as robots.txt or +# .htaccess) here, relative to this directory. These files are copied +# directly to the root of the documentation. +#html_extra_path = [] + +# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, +# using the given strftime format. +#html_last_updated_fmt = '%b %d, %Y' + +# If true, SmartyPants will be used to convert quotes and dashes to +# typographically correct entities. +#html_use_smartypants = True + +# Custom sidebar templates, maps document names to template names. +#html_sidebars = {} + +# Additional templates that should be rendered to pages, maps page names to +# template names. +#html_additional_pages = {} + +# If false, no module index is generated. +#html_domain_indices = True + +# If false, no index is generated. +#html_use_index = True + +# If true, the index is split into individual pages for each letter. +#html_split_index = False + +# If true, links to the reST sources are added to the pages. +#html_show_sourcelink = True + +# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. +#html_show_sphinx = True + +# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. +#html_show_copyright = True + +# If true, an OpenSearch description file will be output, and all pages will +# contain a tag referring to it. The value of this option must be the +# base URL from which the finished HTML is served. +#html_use_opensearch = '' + +# This is the file name suffix for HTML files (e.g. ".xhtml"). +#html_file_suffix = None + +# Output file base name for HTML help builder. +htmlhelp_basename = 'MockeryDocsdoc' + + +# -- Options for LaTeX output --------------------------------------------- + +latex_elements = { +# The paper size ('letterpaper' or 'a4paper'). +#'papersize': 'letterpaper', + +# The font size ('10pt', '11pt' or '12pt'). +#'pointsize': '10pt', + +# Additional stuff for the LaTeX preamble. +#'preamble': '', +} + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, +# author, documentclass [howto, manual, or own class]). +latex_documents = [ + ('index2', 'MockeryDocs.tex', u'Mockery Docs Documentation', + u'Pádraic Brady, Dave Marshall, Wouter, Graham Campbell', 'manual'), +] + +# The name of an image file (relative to this directory) to place at the top of +# the title page. +#latex_logo = None + +# For "manual" documents, if this is true, then toplevel headings are parts, +# not chapters. +#latex_use_parts = False + +# If true, show page references after internal links. +#latex_show_pagerefs = False + +# If true, show URL addresses after external links. +#latex_show_urls = False + +# Documents to append as an appendix to all manuals. +#latex_appendices = [] + +# If false, no module index is generated. +#latex_domain_indices = True + + +# -- Options for manual page output --------------------------------------- + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [ + ('index2', 'mockerydocs', u'Mockery Docs Documentation', + [u'Pádraic Brady, Dave Marshall, Wouter, Graham Campbell'], 1) +] + +# If true, show URL addresses after external links. +#man_show_urls = False + + +# -- Options for Texinfo output ------------------------------------------- + +# Grouping the document tree into Texinfo files. List of tuples +# (source start file, target name, title, author, +# dir menu entry, description, category) +texinfo_documents = [ + ('index2', 'MockeryDocs', u'Mockery Docs Documentation', + u'Pádraic Brady, Dave Marshall, Wouter, Graham Campbell', 'MockeryDocs', 'One line description of project.', + 'Miscellaneous'), +] + +# Documents to append as an appendix to all manuals. +#texinfo_appendices = [] + +# If false, no module index is generated. +#texinfo_domain_indices = True + +# How to display URL addresses: 'footnote', 'no', or 'inline'. +#texinfo_show_urls = 'footnote' + +# If true, do not generate a @detailmenu in the "Top" node's menu. +#texinfo_no_detailmenu = False + + +#on_rtd is whether we are on readthedocs.org, this line of code grabbed from docs.readthedocs.org +on_rtd = os.environ.get('READTHEDOCS', None) == 'True' + +if not on_rtd: # only import and set the theme if we're building docs locally + import sphinx_rtd_theme + html_theme = 'sphinx_rtd_theme' + html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] + print sphinx_rtd_theme.get_html_theme_path() diff --git a/vendor/mockery/mockery/docs/cookbook/default_expectations.rst b/vendor/mockery/mockery/docs/cookbook/default_expectations.rst new file mode 100644 index 0000000..2c6fcae --- /dev/null +++ b/vendor/mockery/mockery/docs/cookbook/default_expectations.rst @@ -0,0 +1,17 @@ +.. index:: + single: Cookbook; Default Mock Expectations + +Default Mock Expectations +========================= + +Often in unit testing, we end up with sets of tests which use the same object +dependency over and over again. Rather than mocking this class/object within +every single unit test (requiring a mountain of duplicate code), we can +instead define reusable default mocks within the test case's ``setup()`` +method. This even works where unit tests use varying expectations on the same +or similar mock object. + +How this works, is that you can define mocks with default expectations. Then, +in a later unit test, you can add or fine-tune expectations for that specific +test. Any expectation can be set as a default using the ``byDefault()`` +declaration. diff --git a/vendor/mockery/mockery/docs/cookbook/detecting_mock_objects.rst b/vendor/mockery/mockery/docs/cookbook/detecting_mock_objects.rst new file mode 100644 index 0000000..0210c69 --- /dev/null +++ b/vendor/mockery/mockery/docs/cookbook/detecting_mock_objects.rst @@ -0,0 +1,13 @@ +.. index:: + single: Cookbook; Detecting Mock Objects + +Detecting Mock Objects +====================== + +Users may find it useful to check whether a given object is a real object or a +simulated Mock Object. All Mockery mocks implement the +``\Mockery\MockInterface`` interface which can be used in a type check. + +.. code-block:: php + + assert($mightBeMocked instanceof \Mockery\MockInterface); diff --git a/vendor/mockery/mockery/docs/cookbook/index.rst b/vendor/mockery/mockery/docs/cookbook/index.rst new file mode 100644 index 0000000..a1fc36f --- /dev/null +++ b/vendor/mockery/mockery/docs/cookbook/index.rst @@ -0,0 +1,11 @@ +Cookbook +======== + +.. toctree:: + :hidden: + + default_expectations + detecting_mock_objects + mocking_hard_dependencies + +.. include:: map.rst.inc diff --git a/vendor/mockery/mockery/docs/cookbook/map.rst.inc b/vendor/mockery/mockery/docs/cookbook/map.rst.inc new file mode 100644 index 0000000..e128f80 --- /dev/null +++ b/vendor/mockery/mockery/docs/cookbook/map.rst.inc @@ -0,0 +1,3 @@ +* :doc:`/cookbook/default_expectations` +* :doc:`/cookbook/detecting_mock_objects` +* :doc:`/cookbook/mocking_hard_dependencies` diff --git a/vendor/mockery/mockery/docs/cookbook/mocking_hard_dependencies.rst b/vendor/mockery/mockery/docs/cookbook/mocking_hard_dependencies.rst new file mode 100644 index 0000000..6d62719 --- /dev/null +++ b/vendor/mockery/mockery/docs/cookbook/mocking_hard_dependencies.rst @@ -0,0 +1,93 @@ +.. index:: + single: Cookbook; Mocking Hard Dependencies + +Mocking Hard Dependencies (new Keyword) +======================================= + +One prerequisite to mock hard dependencies is that the code we are trying to test uses autoloading. + +Let's take the following code for an example: + +.. code-block:: php + + sendSomething($param); + return $externalService->getSomething(); + } + } + +The way we can test this without doing any changes to the code itself is by creating :doc:`instance mocks ` by using the ``overload`` prefix. + +.. code-block:: php + + shouldReceive('sendSomething') + ->once() + ->with($param); + $externalMock->shouldReceive('getSomething') + ->once() + ->andReturn('Tested!'); + + $service = new \App\Service(); + + $result = $service->callExternalService($param); + + $this->assertSame('Tested!', $result); + } + } + +If we run this test now, it should pass. Mockery does its job and our ``App\Service`` will use the mocked external service instead of the real one. + +The problem with this is when we want to, for example, test the ``App\Service\External`` itself, or if we use that class somewhere else in our tests. + +When Mockery overloads a class, because of how PHP works with files, that overloaded class file must not be included otherwise Mockery will throw a "class already exists" exception. This is where autoloading kicks in and makes our job a lot easier. + +To make this possible, we'll tell PHPUnit to run the tests that have overloaded classes in separate processes and to not preserve global state. That way we'll avoid having the overloaded class included more than once. Of course this has its downsides as these tests will run slower. + +Our test example from above now becomes: + +.. code-block:: php + + shouldReceive('sendSomething') + ->once() + ->with($param); + $externalMock->shouldReceive('getSomething') + ->once() + ->andReturn('Tested!'); + + $service = new \App\Service(); + + $result = $service->callExternalService($param); + + $this->assertSame('Tested!', $result); + } + } diff --git a/vendor/mockery/mockery/docs/getting_started/index.rst b/vendor/mockery/mockery/docs/getting_started/index.rst new file mode 100644 index 0000000..df30ee2 --- /dev/null +++ b/vendor/mockery/mockery/docs/getting_started/index.rst @@ -0,0 +1,11 @@ +Getting Started +=============== + +.. toctree:: + :hidden: + + installation + upgrading + simple_example + +.. include:: map.rst.inc diff --git a/vendor/mockery/mockery/docs/getting_started/installation.rst b/vendor/mockery/mockery/docs/getting_started/installation.rst new file mode 100644 index 0000000..46a2783 --- /dev/null +++ b/vendor/mockery/mockery/docs/getting_started/installation.rst @@ -0,0 +1,68 @@ +.. index:: + single: Installation + +Installation +============ + +Mockery can be installed using Composer, PEAR or by cloning it from its GitHub +repository. These three options are outlined below. + +Composer +-------- + +You can read more about Composer on `getcomposer.org `_. +To install Mockery using Composer, first install Composer for your project +using the instructions on the `Composer download page `_. +You can then define your development dependency on Mockery using the suggested +parameters below. While every effort is made to keep the master branch stable, +you may prefer to use the current stable version tag instead (use the +``@stable`` tag). + +.. code-block:: json + + { + "require-dev": { + "mockery/mockery": "dev-master" + } + } + +To install, you then may call: + +.. code-block:: bash + + php composer.phar update + +This will install Mockery as a development dependency, meaning it won't be +installed when using ``php composer.phar update --no-dev`` in production. + +PEAR +---- + +Mockery is hosted on the `survivethedeepend.com `_ +PEAR channel and can be installed using the following commands: + +.. code-block:: bash + + sudo pear channel-discover pear.survivethedeepend.com + sudo pear channel-discover hamcrest.googlecode.com/svn/pear + sudo pear install --alldeps deepend/Mockery + +Git +--- + +The Git repository hosts the development version in its master branch. You can +install this using Composer by referencing ``dev-master`` as your preferred +version in your project's ``composer.json`` file as the earlier example shows. + +You may also install this development version using PEAR: + +.. code-block:: bash + + git clone git://github.com/padraic/mockery.git + cd mockery + sudo pear channel-discover hamcrest.googlecode.com/svn/pear + sudo pear install --alldeps package.xml + +The above processes will install both Mockery and Hamcrest. While omitting +Hamcrest will not break Mockery, Hamcrest is recommended as it adds a wider +variety of functionality for argument matching. diff --git a/vendor/mockery/mockery/docs/getting_started/map.rst.inc b/vendor/mockery/mockery/docs/getting_started/map.rst.inc new file mode 100644 index 0000000..9a1dbc8 --- /dev/null +++ b/vendor/mockery/mockery/docs/getting_started/map.rst.inc @@ -0,0 +1,3 @@ +* :doc:`/getting_started/installation` +* :doc:`/getting_started/upgrading` +* :doc:`/getting_started/simple_example` diff --git a/vendor/mockery/mockery/docs/getting_started/simple_example.rst b/vendor/mockery/mockery/docs/getting_started/simple_example.rst new file mode 100644 index 0000000..d150dd8 --- /dev/null +++ b/vendor/mockery/mockery/docs/getting_started/simple_example.rst @@ -0,0 +1,66 @@ +.. index:: + single: Getting Started; Simple Example + +Simple Example +============== + +Imagine we have a ``Temperature`` class which samples the temperature of a +locale before reporting an average temperature. The data could come from a web +service or any other data source, but we do not have such a class at present. +We can, however, assume some basic interactions with such a class based on its +interaction with the ``Temperature`` class: + +.. code-block:: php + + class Temperature + { + + public function __construct($service) + { + $this->_service = $service; + } + + public function average() + { + $total = 0; + for ($i=0;$i<3;$i++) { + $total += $this->_service->readTemp(); + } + return $total/3; + } + + } + +Even without an actual service class, we can see how we expect it to operate. +When writing a test for the ``Temperature`` class, we can now substitute a +mock object for the real service which allows us to test the behaviour of the +``Temperature`` class without actually needing a concrete service instance. + +.. code-block:: php + + use \Mockery as m; + + class TemperatureTest extends PHPUnit_Framework_TestCase + { + + public function tearDown() + { + m::close(); + } + + public function testGetsAverageTemperatureFromThreeServiceReadings() + { + $service = m::mock('service'); + $service->shouldReceive('readTemp')->times(3)->andReturn(10, 12, 14); + + $temperature = new Temperature($service); + + $this->assertEquals(12, $temperature->average()); + } + + } + +.. note:: + + PHPUnit integration can remove the need for a ``tearDown()`` method. See + ":doc:`/reference/phpunit_integration`" for more information. diff --git a/vendor/mockery/mockery/docs/getting_started/upgrading.rst b/vendor/mockery/mockery/docs/getting_started/upgrading.rst new file mode 100644 index 0000000..d8cd291 --- /dev/null +++ b/vendor/mockery/mockery/docs/getting_started/upgrading.rst @@ -0,0 +1,26 @@ +.. index:: + single: Upgrading + +Upgrading +========= + +Upgrading to 0.9 +---------------- + +The generator was completely rewritten, so any code with a deep integration to +mockery will need evaluating + +Upgrading to 0.8 +---------------- + +Since the release of 0.8.0 the following behaviours were altered: + +1. The ``shouldIgnoreMissing()`` behaviour optionally applied to mock objects + returned an instance of ``\Mockery\Undefined`` when methods called did not + match a known expectation. Since 0.8.0, this behaviour was switched to + returning ``null`` instead. You can restore the 0.7.2 behavour by using the + following: + + .. code-block:: php + + $mock = \Mockery::mock('stdClass')->shouldIgnoreMissing()->asUndefined(); diff --git a/vendor/mockery/mockery/docs/index.rst b/vendor/mockery/mockery/docs/index.rst new file mode 100644 index 0000000..8f09b6c --- /dev/null +++ b/vendor/mockery/mockery/docs/index.rst @@ -0,0 +1,64 @@ +Mockery +======= + +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. + +Mock Objects +------------ + +In unit tests, mock objects simulate the behaviour of real objects. They are +commonly utilised to offer test isolation, to stand in for objects which do +not yet exist, or to allow for the exploratory design of class APIs without +requiring actual implementation up front. + +The benefits of a mock object framework are to allow for the flexible +generation of such mock objects (and stubs). They allow the setting of +expected method calls and return values using a flexible API which is capable +of capturing every possible real object behaviour in way that is stated as +close as possible to a natural language description. + +Getting Started +--------------- + +Ready to dive into the Mockery framework? Then you can get started by reading +the "Getting Started" section! + +.. toctree:: + :hidden: + + getting_started/index + +.. include:: getting_started/map.rst.inc + +Reference +--------- + +The reference contains a complete overview of all features of the Mockery +framework. + +.. toctree:: + :hidden: + + reference/index + +.. include:: reference/map.rst.inc + +Cookbook +-------- + +Want to learn some easy tips and tricks? Take a look at the cookbook articles! + +.. toctree:: + :hidden: + + cookbook/index + +.. include:: cookbook/map.rst.inc + diff --git a/vendor/mockery/mockery/docs/reference/argument_validation.rst b/vendor/mockery/mockery/docs/reference/argument_validation.rst new file mode 100644 index 0000000..2696fc8 --- /dev/null +++ b/vendor/mockery/mockery/docs/reference/argument_validation.rst @@ -0,0 +1,168 @@ +.. index:: + single: Argument Validation + +Argument Validation +=================== + +The arguments passed to the ``with()`` declaration when setting up an +expectation determine the criteria for matching method calls to expectations. +Thus, you can setup up many expectations for a single method, each +differentiated by the expected arguments. Such argument matching is done on a +"best fit" basis. This ensures explicit matches take precedence over +generalised matches. + +An explicit match is merely where the expected argument and the actual +argument are easily equated (i.e. using ``===`` or ``==``). More generalised +matches are possible using regular expressions, class hinting and the +available generic matchers. The purpose of generalised matchers is to allow +arguments be defined in non-explicit terms, e.g. ``Mockery::any()`` passed to +``with()`` will match **any** argument in that position. + +Mockery's generic matchers do not cover all possibilities but offers optional +support for the Hamcrest library of matchers. Hamcrest is a PHP port of the +similarly named Java library (which has been ported also to Python, Erlang, +etc). I strongly recommend using Hamcrest since Mockery simply does not need +to duplicate Hamcrest's already impressive utility which itself promotes a +natural English DSL. + +The example below show Mockery matchers and their Hamcrest equivalent. +Hamcrest uses functions (no namespacing). + +Here's a sample of the possibilities. + +.. code-block:: php + + with(1) + +Matches the integer ``1``. This passes the ``===`` test (identical). It does +facilitate a less strict ``==`` check (equals) where the string ``'1'`` would +also match the +argument. + +.. code-block:: php + + with(\Mockery::any()) OR with(anything()) + +Matches any argument. Basically, anything and everything passed in this +argument slot is passed unconstrained. + +.. code-block:: php + + with(\Mockery::type('resource')) OR with(resourceValue()) OR with(typeOf('resource')) + +Matches any resource, i.e. returns true from an ``is_resource()`` call. The +Type matcher accepts any string which can be attached to ``is_`` to form a +valid type check. For example, ``\Mockery::type('float')`` or Hamcrest's +``floatValue()`` and ``typeOf('float')`` checks using ``is_float()``, and +``\Mockery::type('callable')`` or Hamcrest's ``callable()`` uses +``is_callable()``. + +The Type matcher also accepts a class or interface name to be used in an +``instanceof`` evaluation of the actual argument (similarly Hamcrest uses +``anInstanceOf()``). + +You may find a full list of the available type checkers at +`php.net `_ or browse Hamcrest's function +list in +`the Hamcrest code `_. + +.. code-block:: php + + with(\Mockery::on(closure)) + +The On matcher accepts a closure (anonymous function) to which the actual +argument will be passed. If the closure evaluates to (i.e. returns) boolean +``true`` then the argument is assumed to have matched the expectation. This is +invaluable where your argument expectation is a bit too complex for or simply +not implemented in the current default matchers. + +There is no Hamcrest version of this functionality. + +.. code-block:: php + + with('/^foo/') OR with(matchesPattern('/^foo/')) + +The argument declarator also assumes any given string may be a regular +expression to be used against actual arguments when matching. The regex option +is only used when a) there is no ``===`` or ``==`` match and b) when the regex +is verified to be a valid regex (i.e. does not return false from +``preg_match()``). If the regex detection doesn't suit your tastes, Hamcrest +offers the more explicit ``matchesPattern()`` function. + +.. code-block:: php + + with(\Mockery::ducktype('foo', 'bar')) + +The Ducktype matcher is an alternative to matching by class type. It simply +matches any argument which is an object containing the provided list of +methods to call. + +There is no Hamcrest version of this functionality. + +.. code-block:: php + + with(\Mockery::mustBe(2)) OR with(identicalTo(2)) + +The MustBe matcher is more strict than the default argument matcher. The +default matcher allows for PHP type casting, but the MustBe matcher also +verifies that the argument must be of the same type as the expected value. +Thus by default, the argument `'2'` matches the actual argument 2 (integer) +but the MustBe matcher would fail in the same situation since the expected +argument was a string and instead we got an integer. + +Note: Objects are not subject to an identical comparison using this matcher +since PHP would fail the comparison if both objects were not the exact same +instance. This is a hindrance when objects are generated prior to being +returned, since an identical match just would never be possible. + +.. code-block:: php + + with(\Mockery::not(2)) OR with(not(2)) + +The Not matcher matches any argument which is not equal or identical to the +matcher's parameter. + +.. code-block:: php + + with(\Mockery::anyOf(1, 2)) OR with(anyOf(1,2)) + +Matches any argument which equals any one of the given parameters. + +.. code-block:: php + + with(\Mockery::notAnyOf(1, 2)) + +Matches any argument which is not equal or identical to any of the given +parameters. + +There is no Hamcrest version of this functionality. + +.. code-block:: php + + with(\Mockery::subset(array(0 => 'foo'))) + +Matches any argument which is any array containing the given array subset. +This enforces both key naming and values, i.e. both the key and value of each +actual element is compared. + +There is no Hamcrest version of this functionality, though Hamcrest can check +a single entry using ``hasEntry()`` or ``hasKeyValuePair()``. + +.. code-block:: php + + with(\Mockery::contains(value1, value2)) + +Matches any argument which is an array containing the listed values. The +naming of keys is ignored. + +.. code-block:: php + + with(\Mockery::hasKey(key)); + +Matches any argument which is an array containing the given key name. + +.. code-block:: php + + with(\Mockery::hasValue(value)); + +Matches any argument which is an array containing the given value. diff --git a/vendor/mockery/mockery/docs/reference/demeter_chains.rst b/vendor/mockery/mockery/docs/reference/demeter_chains.rst new file mode 100644 index 0000000..531d017 --- /dev/null +++ b/vendor/mockery/mockery/docs/reference/demeter_chains.rst @@ -0,0 +1,38 @@ +.. index:: + single: Mocking; Demeter Chains + +Mocking Demeter Chains And Fluent Interfaces +============================================ + +Both of these terms refer to the growing practice of invoking statements +similar to: + +.. code-block:: php + + $object->foo()->bar()->zebra()->alpha()->selfDestruct(); + +The long chain of method calls isn't necessarily a bad thing, assuming they +each link back to a local object the calling class knows. Just as a fun +example, Mockery's long chains (after the first ``shouldReceive()`` method) +all call to the same instance of ``\Mockery\Expectation``. However, sometimes +this is not the case and the chain is constantly crossing object boundaries. + +In either case, mocking such a chain can be a horrible task. To make it easier +Mockery support demeter chain mocking. Essentially, we shortcut through the +chain and return a defined value from the final call. For example, let's +assume ``selfDestruct()`` returns the string "Ten!" to $object (an instance of +``CaptainsConsole``). Here's how we could mock it. + +.. code-block:: php + + $mock = \Mockery::mock('CaptainsConsole'); + $mock->shouldReceive('foo->bar->zebra->alpha->selfDestruct')->andReturn('Ten!'); + +The above expectation can follow any previously seen format or expectation, +except that the method name is simply the string of all expected chain calls +separated by ``->``. Mockery will automatically setup the chain of expected +calls with its final return values, regardless of whatever intermediary object +might be used in the real implementation. + +Arguments to all members of the chain (except the final call) are ignored in +this process. diff --git a/vendor/mockery/mockery/docs/reference/expectations.rst b/vendor/mockery/mockery/docs/reference/expectations.rst new file mode 100644 index 0000000..e917509 --- /dev/null +++ b/vendor/mockery/mockery/docs/reference/expectations.rst @@ -0,0 +1,260 @@ +.. index:: + single: Expectations + +Expectation Declarations +======================== + +Once you have created a mock object, you'll often want to start defining how +exactly it should behave (and how it should be called). This is where the +Mockery expectation declarations take over. + +.. code-block:: php + + shouldReceive(method_name) + +Declares that the mock expects a call to the given method name. This is the +starting expectation upon which all other expectations and constraints are +appended. + +.. code-block:: php + + shouldReceive(method1, method2, ...) + +Declares a number of expected method calls, all of which will adopt any +chained expectations or constraints. + +.. code-block:: php + + shouldReceive(array('method1'=>1, 'method2'=>2, ...)) + +Declares a number of expected calls but also their return values. All will +adopt any additional chained expectations or constraints. + +.. code-block:: php + + shouldReceive(closure) + +Creates a mock object (only from a partial mock) which is used to create a +mock object recorder. The recorder is a simple proxy to the original object +passed in for mocking. This is passed to the closure, which may run it through +a set of operations which are recorded as expectations on the partial mock. A +simple use case is automatically recording expectations based on an existing +usage (e.g. during refactoring). See examples in a later section. + +.. code-block:: php + + shouldNotReceive(method_name) + +Declares that the mock should not expect a call to the given method name. This +method is a convenience method for calling ``shouldReceive()->never()``. + +.. code-block:: php + + with(arg1, arg2, ...) / withArgs(array(arg1, arg2, ...)) + +Adds a constraint that this expectation only applies to method calls which +match the expected argument list. You can add a lot more flexibility to +argument matching using the built in matcher classes (see later). For example, +``\Mockery::any()`` matches any argument passed to that position in the +``with()`` parameter list. Mockery also allows Hamcrest library matchers - for +example, the Hamcrest function ``anything()`` is equivalent to +``\Mockery::any()``. + +It's important to note that this means all expectations attached only apply to +the given method when it is called with these exact arguments. This allows for +setting up differing expectations based on the arguments provided to expected +calls. + +.. code-block:: php + + withAnyArgs() + +Declares that this expectation matches a method call regardless of what +arguments are passed. This is set by default unless otherwise specified. + +.. code-block:: php + + withNoArgs() + +Declares this expectation matches method calls with zero arguments. + +.. code-block:: php + + andReturn(value) + +Sets a value to be returned from the expected method call. + +.. code-block:: php + + andReturn(value1, value2, ...) + +Sets up a sequence of return values or closures. For example, the first call +will return value1 and the second value2. Note that all subsequent calls to a +mocked method will always return the final value (or the only value) given to +this declaration. + +.. code-block:: php + + andReturnNull() / andReturn([NULL]) + +Both of the above options are primarily for communication to test readers. +They mark the mock object method call as returning ``null`` or nothing. + +.. code-block:: php + + andReturnValues(array) + +Alternative syntax for ``andReturn()`` that accepts a simple array instead of +a list of parameters. The order of return is determined by the numerical +index of the given array with the last array member being return on all calls +once previous return values are exhausted. + +.. code-block:: php + + andReturnUsing(closure, ...) + +Sets a closure (anonymous function) to be called with the arguments passed to +the method. The return value from the closure is then returned. Useful for +some dynamic processing of arguments into related concrete results. Closures +can queued by passing them as extra parameters as for ``andReturn()``. + +.. note:: + + You cannot currently mix ``andReturnUsing()`` with ``andReturn()``. + +.. code-block:: php + + andThrow(Exception) + +Declares that this method will throw the given ``Exception`` object when +called. + +.. code-block:: php + + andThrow(exception_name, message) + +Rather than an object, you can pass in the ``Exception`` class and message to +use when throwing an ``Exception`` from the mocked method. + +.. code-block:: php + + andSet(name, value1) / set(name, value1) + +Used with an expectation so that when a matching method is called, one can +also cause a mock object's public property to be set to a specified value. + +.. code-block:: php + + passthru() + +Tells the expectation to bypass a return queue and instead call the real +method of the class that was mocked and return the result. Basically, it +allows expectation matching and call count validation to be applied against +real methods while still calling the real class method with the expected +arguments. + +.. code-block:: php + + zeroOrMoreTimes() + +Declares that the expected method may be called zero or more times. This is +the default for all methods unless otherwise set. + +.. code-block:: php + + once() + +Declares that the expected method may only be called once. Like all other call +count constraints, it will throw a ``\Mockery\CountValidator\Exception`` if +breached and can be modified by the ``atLeast()`` and ``atMost()`` +constraints. + +.. code-block:: php + + twice() + +Declares that the expected method may only be called twice. + +.. code-block:: php + + times(n) + +Declares that the expected method may only be called n times. + +.. code-block:: php + + never() + +Declares that the expected method may never be called. Ever! + +.. code-block:: php + + atLeast() + +Adds a minimum modifier to the next call count expectation. Thus +``atLeast()->times(3)`` means the call must be called at least three times +(given matching method args) but never less than three times. + +.. code-block:: php + + atMost() + +Adds a maximum modifier to the next call count expectation. Thus +``atMost()->times(3)`` means the call must be called no more than three times. +This also means no calls are acceptable. + +.. code-block:: php + + between(min, max) + +Sets an expected range of call counts. This is actually identical to using +``atLeast()->times(min)->atMost()->times(max)`` but is provided as a +shorthand. It may be followed by a ``times()`` call with no parameter to +preserve the APIs natural language readability. + +.. code-block:: php + + ordered() + +Declares that this method is expected to be called in a specific order in +relation to similarly marked methods. The order is dictated by the order in +which this modifier is actually used when setting up mocks. + +.. code-block:: php + + ordered(group) + +Declares the method as belonging to an order group (which can be named or +numbered). Methods within a group can be called in any order, but the ordered +calls from outside the group are ordered in relation to the group, i.e. you +can set up so that method1 is called before group1 which is in turn called +before method 2. + +.. code-block:: php + + globally() + +When called prior to ``ordered()`` or ``ordered(group)``, it declares this +ordering to apply across all mock objects (not just the current mock). This +allows for dictating order expectations across multiple mocks. + +.. code-block:: php + + byDefault() + +Marks an expectation as a default. Default expectations are applied unless a +non-default expectation is created. These later expectations immediately +replace the previously defined default. This is useful so you can setup +default mocks in your unit test ``setup()`` and later tweak them in specific +tests as needed. + +.. code-block:: php + + getMock() + +Returns the current mock object from an expectation chain. Useful where you +prefer to keep mock setups as a single statement, e.g. + +.. code-block:: php + + $mock = \Mockery::mock('foo')->shouldReceive('foo')->andReturn(1)->getMock(); diff --git a/vendor/mockery/mockery/docs/reference/final_methods_classes.rst b/vendor/mockery/mockery/docs/reference/final_methods_classes.rst new file mode 100644 index 0000000..4f8783a --- /dev/null +++ b/vendor/mockery/mockery/docs/reference/final_methods_classes.rst @@ -0,0 +1,23 @@ +.. index:: + single: Mocking; Final Classes/Methods + +Dealing with Final Classes/Methods +================================== + +One of the primary restrictions of mock objects in PHP, is that mocking +classes or methods marked final is hard. The final keyword prevents methods so +marked from being replaced in subclasses (subclassing is how mock objects can +inherit the type of the class or object being mocked. + +The simplest solution is not to mark classes or methods as final! + +However, in a compromise between mocking functionality and type safety, +Mockery does allow creating "proxy mocks" from classes marked final, or from +classes with methods marked final. This offers all the usual mock object +goodness but the resulting mock will not inherit the class type of the object +being mocked, i.e. it will not pass any instanceof comparison. + +You can create a proxy mock by passing the instantiated object you wish to +mock into ``\Mockery::mock()``, i.e. Mockery will then generate a Proxy to the +real object and selectively intercept method calls for the purposes of setting +and meeting expectations. diff --git a/vendor/mockery/mockery/docs/reference/index.rst b/vendor/mockery/mockery/docs/reference/index.rst new file mode 100644 index 0000000..fe693c6 --- /dev/null +++ b/vendor/mockery/mockery/docs/reference/index.rst @@ -0,0 +1,20 @@ +Reference +========= + +.. toctree:: + :hidden: + + startup_methods + expectations + argument_validation + partial_mocks + public_properties + public_static_properties + pass_by_reference_behaviours + demeter_chains + object_recording + final_methods_classes + magic_methods + mockery/index + +.. include:: map.rst.inc diff --git a/vendor/mockery/mockery/docs/reference/instance_mocking.rst b/vendor/mockery/mockery/docs/reference/instance_mocking.rst new file mode 100644 index 0000000..9d1aa28 --- /dev/null +++ b/vendor/mockery/mockery/docs/reference/instance_mocking.rst @@ -0,0 +1,22 @@ +.. index:: + single: Mocking; Instance + +Instance Mocking +================ + +Instance mocking means that a statement like: + +.. code-block:: php + + $obj = new \MyNamespace\Foo; + +...will actually generate a mock object. This is done by replacing the real +class with an instance mock (similar to an alias mock), as with mocking public +methods. The alias will import its expectations from the original mock of +that type (note that the original is never verified and should be ignored +after its expectations are setup). This lets you intercept instantiation where +you can't simply inject a replacement object. + +As before, this does not prevent a require statement from including the real +class and triggering a fatal PHP error. It's intended for use where +autoloading is the primary class loading mechanism. diff --git a/vendor/mockery/mockery/docs/reference/magic_methods.rst b/vendor/mockery/mockery/docs/reference/magic_methods.rst new file mode 100644 index 0000000..da5cee4 --- /dev/null +++ b/vendor/mockery/mockery/docs/reference/magic_methods.rst @@ -0,0 +1,16 @@ +.. index:: + single: Mocking; Magic Methods + +PHP Magic Methods +================= + +PHP magic methods which are prefixed with a double underscore, e.g. +``__set()``, pose a particular problem in mocking and unit testing in general. +It is strongly recommended that unit tests and mock objects do not directly +refer to magic methods. Instead, refer only to the virtual methods and +properties these magic methods simulate. + +Following this piece of advice will ensure you are testing the real API of +classes and also ensures there is no conflict should Mockery override these +magic methods, which it will inevitably do in order to support its role in +intercepting method calls and properties. diff --git a/vendor/mockery/mockery/docs/reference/map.rst.inc b/vendor/mockery/mockery/docs/reference/map.rst.inc new file mode 100644 index 0000000..88ea36b --- /dev/null +++ b/vendor/mockery/mockery/docs/reference/map.rst.inc @@ -0,0 +1,19 @@ +* :doc:`/reference/startup_methods` +* :doc:`/reference/expectations` +* :doc:`/reference/argument_validation` +* :doc:`/reference/partial_mocks` +* :doc:`/reference/public_properties` +* :doc:`/reference/public_static_properties` +* :doc:`/reference/pass_by_reference_behaviours` +* :doc:`/reference/demeter_chains` +* :doc:`/reference/object_recording` +* :doc:`/reference/final_methods_classes` +* :doc:`/reference/magic_methods` + +Mockery Reference +----------------- + +* :doc:`/reference/mockery/configuration` +* :doc:`/reference/mockery/exceptions` +* :doc:`/reference/mockery/reserved_method_names` +* :doc:`/reference/mockery/gotchas` diff --git a/vendor/mockery/mockery/docs/reference/mockery/configuration.rst b/vendor/mockery/mockery/docs/reference/mockery/configuration.rst new file mode 100644 index 0000000..9f8db74 --- /dev/null +++ b/vendor/mockery/mockery/docs/reference/mockery/configuration.rst @@ -0,0 +1,52 @@ +.. index:: + single: Mockery; Configuration + +Mockery Global Configuration +============================ + +To allow for a degree of fine-tuning, Mockery utilises a singleton +configuration object to store a small subset of core behaviours. The three +currently present include: + +* Option to allow/disallow the mocking of methods which do not actually exist +* Option to allow/disallow the existence of expectations which are never + fulfilled (i.e. unused) +* Setter/Getter for added a parameter map for internal PHP class methods + (``Reflection`` cannot detect these automatically) + +By default, the first two behaviours are enabled. Of course, there are +situations where this can lead to unintended consequences. The mocking of +non-existent methods may allow mocks based on real classes/objects to fall out +of sync with the actual implementations, especially when some degree of +integration testing (testing of object wiring) is not being performed. +Allowing unfulfilled expectations means unnecessary mock expectations go +unnoticed, cluttering up test code, and potentially confusing test readers. + +You may allow or disallow these behaviours (whether for whole test suites or +just select tests) by using one or both of the following two calls: + +.. code-block:: php + + \Mockery::getConfiguration()->allowMockingNonExistentMethods(bool); + \Mockery::getConfiguration()->allowMockingMethodsUnnecessarily(bool); + +Passing a true allows the behaviour, false disallows it. Both take effect +immediately until switched back. In both cases, if either behaviour is +detected when not allowed, it will result in an Exception being thrown at that +point. Note that disallowing these behaviours should be carefully considered +since they necessarily remove at least some of Mockery's flexibility. + +The other two methods are: + +.. code-block:: php + + \Mockery::getConfiguration()->setInternalClassMethodParamMap($class, $method, array $paramMap) + \Mockery::getConfiguration()->getInternalClassMethodParamMap($class, $method) + +These are used to define parameters (i.e. the signature string of each) for the +methods of internal PHP classes (e.g. SPL, or PECL extension classes like +ext/mongo's MongoCollection. Reflection cannot analyse the parameters of internal +classes. Most of the time, you never need to do this. It's mainly needed where an +internal class method uses pass-by-reference for a parameter - you MUST in such +cases ensure the parameter signature includes the ``&`` symbol correctly as Mockery +won't correctly add it automatically for internal classes. diff --git a/vendor/mockery/mockery/docs/reference/mockery/exceptions.rst b/vendor/mockery/mockery/docs/reference/mockery/exceptions.rst new file mode 100644 index 0000000..623b158 --- /dev/null +++ b/vendor/mockery/mockery/docs/reference/mockery/exceptions.rst @@ -0,0 +1,65 @@ +.. index:: + single: Mockery; Exceptions + +Mockery Exceptions +================== + +Mockery throws three types of exceptions when it cannot verify a mock object. + +#. ``\Mockery\Exception\InvalidCountException`` +#. ``\Mockery\Exception\InvalidOrderException`` +#. ``\Mockery\Exception\NoMatchingExpectationException`` + +You can capture any of these exceptions in a try...catch block to query them +for specific information which is also passed along in the exception message +but is provided separately from getters should they be useful when logging or +reformatting output. + +\Mockery\Exception\InvalidCountException +---------------------------------------- + +The exception class is used when a method is called too many (or too few) +times and offers the following methods: + +* ``getMock()`` - return actual mock object +* ``getMockName()`` - return the name of the mock object +* ``getMethodName()`` - return the name of the method the failing expectation + is attached to +* ``getExpectedCount()`` - return expected calls +* ``getExpectedCountComparative()`` - returns a string, e.g. ``<=`` used to + compare to actual count +* ``getActualCount()`` - return actual calls made with given argument + constraints + +\Mockery\Exception\InvalidOrderException +---------------------------------------- + +The exception class is used when a method is called outside the expected order +set using the ``ordered()`` and ``globally()`` expectation modifiers. It +offers the following methods: + +* ``getMock()`` - return actual mock object +* ``getMockName()`` - return the name of the mock object +* ``getMethodName()`` - return the name of the method the failing expectation + is attached to +* ``getExpectedOrder()`` - returns an integer represented the expected index + for which this call was expected +* ``getActualOrder()`` - return the actual index at which this method call + occurred. + +\Mockery\Exception\NoMatchingExpectationException +------------------------------------------------- + +The exception class is used when a method call does not match any known +expectation. All expectations are uniquely identified in a mock object by the +method name and the list of expected arguments. You can disable this exception +and opt for returning NULL from all unexpected method calls by using the +earlier mentioned shouldIgnoreMissing() behaviour modifier. This exception +class offers the following methods: + +* ``getMock()`` - return actual mock object +* ``getMockName()`` - return the name of the mock object +* ``getMethodName()`` - return the name of the method the failing expectation + is attached to +* ``getActualArguments()`` - return actual arguments used to search for a + matching expectation diff --git a/vendor/mockery/mockery/docs/reference/mockery/gotchas.rst b/vendor/mockery/mockery/docs/reference/mockery/gotchas.rst new file mode 100644 index 0000000..2d3ff6c --- /dev/null +++ b/vendor/mockery/mockery/docs/reference/mockery/gotchas.rst @@ -0,0 +1,42 @@ +.. index:: + single: Mockery; Gotchas + +Gotchas! +======== + +Mocking objects in PHP has its limitations and gotchas. Some functionality +can't be mocked or can't be mocked YET! If you locate such a circumstance, +please please (pretty please with sugar on top) create a new issue on GitHub +so it can be documented and resolved where possible. Here is a list to note: + +1. Classes containing public ``__wakeup()`` methods can be mocked but the + mocked ``__wakeup()`` method will perform no actions and cannot have + expectations set for it. This is necessary since Mockery must serialize and + unserialize objects to avoid some ``__construct()`` insanity and attempting + to mock a ``__wakeup()`` method as normal leads to a + ``BadMethodCallException`` been thrown. + +2. Classes using non-real methods, i.e. where a method call triggers a + ``__call()`` method, will throw an exception that the non-real method does + not exist unless you first define at least one expectation (a simple + ``shouldReceive()`` call would suffice). This is necessary since there is + no other way for Mockery to be aware of the method name. + +3. Mockery has two scenarios where real classes are replaced: Instance mocks + and alias mocks. Both will generate PHP fatal errors if the real class is + loaded, usually via a require or include statement. Only use these two mock + types where autoloading is in place and where classes are not explicitly + loaded on a per-file basis using ``require()``, ``require_once()``, etc. + +4. Internal PHP classes are not entirely capable of being fully analysed using + ``Reflection``. For example, ``Reflection`` cannot reveal details of + expected parameters to the methods of such internal classes. As a result, + there will be problems where a method parameter is defined to accept a + value by reference (Mockery cannot detect this condition and will assume a + pass by value on scalars and arrays). If references as internal class + method parameters are needed, you should use the + ``\Mockery\Configuration::setInternalClassMethodParamMap()`` method. + +The gotchas noted above are largely down to PHP's architecture and are assumed +to be unavoidable. But - if you figure out a solution (or a better one than +what may exist), let us know! diff --git a/vendor/mockery/mockery/docs/reference/mockery/index.rst b/vendor/mockery/mockery/docs/reference/mockery/index.rst new file mode 100644 index 0000000..6951b0a --- /dev/null +++ b/vendor/mockery/mockery/docs/reference/mockery/index.rst @@ -0,0 +1,10 @@ +Mockery +======= + +.. toctree:: + :maxdepth: 2 + + configuration + exceptions + reserved_method_names + gotchas diff --git a/vendor/mockery/mockery/docs/reference/mockery/reserved_method_names.rst b/vendor/mockery/mockery/docs/reference/mockery/reserved_method_names.rst new file mode 100644 index 0000000..112d6f0 --- /dev/null +++ b/vendor/mockery/mockery/docs/reference/mockery/reserved_method_names.rst @@ -0,0 +1,20 @@ +.. index:: + single: Reserved Method Names + +Reserved Method Names +===================== + +As you may have noticed, Mockery uses a number of methods called directly on +all mock objects, for example ``shouldReceive()``. Such methods are necessary +in order to setup expectations on the given mock, and so they cannot be +implemented on the classes or objects being mocked without creating a method +name collision (reported as a PHP fatal error). The methods reserved by +Mockery are: + +* ``shouldReceive()`` +* ``shouldBeStrict()`` + +In addition, all mocks utilise a set of added methods and protected properties +which cannot exist on the class or object being mocked. These are far less +likely to cause collisions. All properties are prefixed with ``_mockery`` and +all method names with ``mockery_``. diff --git a/vendor/mockery/mockery/docs/reference/object_recording.rst b/vendor/mockery/mockery/docs/reference/object_recording.rst new file mode 100644 index 0000000..9578e81 --- /dev/null +++ b/vendor/mockery/mockery/docs/reference/object_recording.rst @@ -0,0 +1,93 @@ +.. index:: + single: Mocking; Object Recording + +Mock Object Recording +===================== + +In certain cases, you may find that you are testing against an already +established pattern of behaviour, perhaps during refactoring. Rather then hand +crafting mock object expectations for this behaviour, you could instead use +the existing source code to record the interactions a real object undergoes +onto a mock object as expectations - expectations you can then verify against +an alternative or refactored version of the source code. + +To record expectations, you need a concrete instance of the class to be +mocked. This can then be used to create a partial mock to which is given the +necessary code to execute the object interactions to be recorded. A simple +example is outline below (we use a closure for passing instructions to the +mock). + +Here we have a very simple setup, a class (``SubjectUser``) which uses another +class (``Subject``) to retrieve some value. We want to record as expectations +on our mock (which will replace ``Subject`` later) all the calls and return +values of a Subject instance when interacting with ``SubjectUser``. + +.. code-block:: php + + class Subject + { + + public function execute() { + return 'executed!'; + } + + } + + class SubjectUser + { + + public function use(Subject $subject) { + return $subject->execute(); + } + + } + +Here's the test case showing the recording: + +.. code-block:: php + + class SubjectUserTest extends PHPUnit_Framework_TestCase + { + + public function tearDown() + { + \Mockery::close(); + } + + public function testSomething() + { + $mock = \Mockery::mock(new Subject); + $mock->shouldExpect(function ($subject) { + $user = new SubjectUser; + $user->use($subject); + }); + + /** + * Assume we have a replacement SubjectUser called NewSubjectUser. + * We want to verify it behaves identically to SubjectUser, i.e. + * it uses Subject in the exact same way + */ + $newSubject = new NewSubjectUser; + $newSubject->use($mock); + } + + } + +After the ``\Mockery::close()`` call in ``tearDown()`` validates the mock +object, we should have zero exceptions if ``NewSubjectUser`` acted on +`Subject` in a similar way to ``SubjectUser``. By default the order of calls +are not enforced, and loose argument matching is enabled, i.e. arguments may +be equal (``==``) but not necessarily identical (``===``). + +If you wished to be more strict, for example ensuring the order of calls and +the final call counts were identical, or ensuring arguments are completely +identical, you can invoke the recorder's strict mode from the closure block, +e.g. + +.. code-block:: php + + $mock->shouldExpect(function ($subject) { + $subject->shouldBeStrict(); + $user = new SubjectUser; + $user->use($subject); + }); diff --git a/vendor/mockery/mockery/docs/reference/partial_mocks.rst b/vendor/mockery/mockery/docs/reference/partial_mocks.rst new file mode 100644 index 0000000..1e46c5a --- /dev/null +++ b/vendor/mockery/mockery/docs/reference/partial_mocks.rst @@ -0,0 +1,94 @@ +.. index:: + single: Mocking; Partial Mocks + +Creating Partial Mocks +====================== + +Partial mocks are useful when you only need to mock several methods of an +object leaving the remainder free to respond to calls normally (i.e. as +implemented). Mockery implements three distinct strategies for creating +partials. Each has specific advantages and disadvantages so which strategy you +use will depend on your own preferences and the source code in need of +mocking. + +#. Traditional Partial Mock +#. Passive Partial Mock +#. Proxied Partial Mock + +Traditional Partial Mock +------------------------ + +A traditional partial mock, defines ahead of time which methods of a class are +to be mocked and which are to be left unmocked (i.e. callable as normal). The +syntax for creating traditional mocks is: + +.. code-block:: php + + $mock = \Mockery::mock('MyClass[foo,bar]'); + +In the above example, the ``foo()`` and ``bar()`` methods of MyClass will be +mocked but no other MyClass methods are touched. You will need to define +expectations for the ``foo()`` and ``bar()`` methods to dictate their mocked +behaviour. + +Don't forget that you can pass in constructor arguments since unmocked methods +may rely on those! + +.. code-block:: php + + $mock = \Mockery::mock('MyNamespace\MyClass[foo]', array($arg1, $arg2)); + +Passive Partial Mock +-------------------- + +A passive partial mock is more of a default state of being. + +.. code-block:: php + + $mock = \Mockery::mock('MyClass')->makePartial(); + +In a passive partial, we assume that all methods will simply defer to the +parent class (``MyClass``) original methods unless a method call matches a +known expectation. If you have no matching expectation for a specific method +call, that call is deferred to the class being mocked. Since the division +between mocked and unmocked calls depends entirely on the expectations you +define, there is no need to define which methods to mock in advance. The +``makePartial()`` method is identical to the original ``shouldDeferMissing()`` +method which first introduced this Partial Mock type. + +Proxied Partial Mock +-------------------- + +A proxied partial mock is a partial of last resort. You may encounter a class +which is simply not capable of being mocked because it has been marked as +final. Similarly, you may find a class with methods marked as final. In such a +scenario, we cannot simply extend the class and override methods to mock - we +need to get creative. + +.. code-block:: php + + $mock = \Mockery::mock(new MyClass); + +Yes, the new mock is a Proxy. It intercepts calls and reroutes them to the +proxied object (which you construct and pass in) for methods which are not +subject to any expectations. Indirectly, this allows you to mock methods +marked final since the Proxy is not subject to those limitations. The tradeoff +should be obvious - a proxied partial will fail any typehint checks for the +class being mocked since it cannot extend that class. + +Special Internal Cases +---------------------- + +All mock objects, with the exception of Proxied Partials, allow you to make +any expectation call the underlying real class method using the ``passthru()`` +expectation call. This will return values from the real call and bypass any +mocked return queue (which can simply be omitted obviously). + +There is a fourth kind of partial mock reserved for internal use. This is +automatically generated when you attempt to mock a class containing methods +marked final. Since we cannot override such methods, they are simply left +unmocked. Typically, you don't need to worry about this but if you really +really must mock a final method, the only possible means is through a Proxied +Partial Mock. SplFileInfo, for example, is a common class subject to this form +of automatic internal partial since it contains public final methods used +internally. diff --git a/vendor/mockery/mockery/docs/reference/pass_by_reference_behaviours.rst b/vendor/mockery/mockery/docs/reference/pass_by_reference_behaviours.rst new file mode 100644 index 0000000..ac4cdba --- /dev/null +++ b/vendor/mockery/mockery/docs/reference/pass_by_reference_behaviours.rst @@ -0,0 +1,83 @@ +.. index:: + single: Pass-By-Reference Method Parameter Behaviour + +Preserving Pass-By-Reference Method Parameter Behaviour +======================================================= + +PHP Class method may accept parameters by reference. In this case, changes +made to the parameter (a reference to the original variable passed to the +method) are reflected in the original variable. A simple example: + +.. code-block:: php + + class Foo + { + + public function bar(&$a) + { + $a++; + } + + } + + $baz = 1; + $foo = new Foo; + $foo->bar($baz); + + echo $baz; // will echo the integer 2 + +In the example above, the variable $baz is passed by reference to +``Foo::bar()`` (notice the ``&`` symbol in front of the parameter?). Any +change ``bar()`` makes to the parameter reference is reflected in the original +variable, ``$baz``. + +Mockery 0.7+ handles references correctly for all methods where it can analyse +the parameter (using ``Reflection``) to see if it is passed by reference. To +mock how a reference is manipulated by the class method, you can use a closure +argument matcher to manipulate it, i.e. ``\Mockery::on()`` - see the +":doc:`argument_validation`" chapter. + +There is an exception for internal PHP classes where Mockery cannot analyse +method parameters using ``Reflection`` (a limitation in PHP). To work around +this, you can explicitly declare method parameters for an internal class using +``/Mockery/Configuration::setInternalClassMethodParamMap()``. + +Here's an example using ``MongoCollection::insert()``. ``MongoCollection`` is +an internal class offered by the mongo extension from PECL. Its ``insert()`` +method accepts an array of data as the first parameter, and an optional +options array as the second parameter. The original data array is updated +(i.e. when a ``insert()`` pass-by-reference parameter) to include a new +``_id`` field. We can mock this behaviour using a configured parameter map (to +tell Mockery to expect a pass by reference parameter) and a ``Closure`` +attached to the expected method parameter to be updated. + +Here's a PHPUnit unit test verifying that this pass-by-reference behaviour is +preserved: + +.. code-block:: php + + public function testCanOverrideExpectedParametersOfInternalPHPClassesToPreserveRefs() + { + \Mockery::getConfiguration()->setInternalClassMethodParamMap( + 'MongoCollection', + 'insert', + array('&$data', '$options = array()') + ); + $m = \Mockery::mock('MongoCollection'); + $m->shouldReceive('insert')->with( + \Mockery::on(function(&$data) { + if (!is_array($data)) return false; + $data['_id'] = 123; + return true; + }), + \Mockery::any() + ); + + $data = array('a'=>1,'b'=>2); + $m->insert($data); + + $this->assertTrue(isset($data['_id'])); + $this->assertEquals(123, $data['_id']); + + \Mockery::resetContainer(); + } diff --git a/vendor/mockery/mockery/docs/reference/phpunit_integration.rst b/vendor/mockery/mockery/docs/reference/phpunit_integration.rst new file mode 100644 index 0000000..ea8eb46 --- /dev/null +++ b/vendor/mockery/mockery/docs/reference/phpunit_integration.rst @@ -0,0 +1,110 @@ +.. index:: + single: PHPUnit Integration + +PHPUnit Integration +=================== + +Mockery was designed as a simple-to-use *standalone* mock object framework, so +its need for integration with any testing framework is entirely optional. To +integrate Mockery, you just need to define a ``tearDown()`` method for your +tests containing the following (you may use a shorter ``\Mockery`` namespace +alias): + +.. code-block:: php + + public function tearDown() { + \Mockery::close(); + } + +This static call cleans up the Mockery container used by the current test, and +run any verification tasks needed for your expectations. + +For some added brevity when it comes to using Mockery, you can also explicitly +use the Mockery namespace with a shorter alias. For example: + +.. code-block:: php + + use \Mockery as m; + + class SimpleTest extends PHPUnit_Framework_TestCase + { + public function testSimpleMock() { + $mock = m::mock('simplemock'); + $mock->shouldReceive('foo')->with(5, m::any())->once()->andReturn(10); + + $this->assertEquals(10, $mock->foo(5)); + } + + public function tearDown() { + m::close(); + } + } + +Mockery ships with an autoloader so you don't need to litter your tests with +``require_once()`` calls. To use it, ensure Mockery is on your +``include_path`` and add the following to your test suite's ``Bootstrap.php`` +or ``TestHelper.php`` file: + +.. code-block:: php + + require_once 'Mockery/Loader.php'; + require_once 'Hamcrest/Hamcrest.php'; + + $loader = new \Mockery\Loader; + $loader->register(); + +If you are using Composer, you can simplify this to just including the +Composer generated autoloader file: + +.. code-block:: php + + require __DIR__ . '/../vendor/autoload.php'; // assuming vendor is one directory up + +.. caution:: + + Prior to Hamcrest 1.0.0, the ``Hamcrest.php`` file name had a small "h" + (i.e. ``hamcrest.php``). If upgrading Hamcrest to 1.0.0 remember to check + the file name is updated for all your projects.) + +To integrate Mockery into PHPUnit and avoid having to call the close method +and have Mockery remove itself from code coverage reports, use this in you +suite: + +.. code-block:: php + + // Create Suite + $suite = new PHPUnit_Framework_TestSuite(); + + // Create a result listener or add it + $result = new PHPUnit_Framework_TestResult(); + $result->addListener(new \Mockery\Adapter\Phpunit\TestListener()); + + // Run the tests. + $suite->run($result); + +If you are using PHPUnit's XML configuration approach, you can include the +following to load the ``TestListener``: + +.. code-block:: xml + + + + + +Make sure Composer's or Mockery's autoloader is present in the bootstrap file +or you will need to also define a "file" attribute pointing to the file of the +above ``TestListener`` class. + +.. caution:: + + PHPUnit provides a functionality that allows + `tests to run in a separated process `_, + to ensure better isolation. Mockery verifies the mocks expectations using the + ``Mockery::close()`` method, and provides a PHPUnit listener, that automatically + calls this method for you after every test. + + However, this listener is not called in the right process when using PHPUnit's process + isolation, resulting in expectations that might not be respected, but without raising + any ``Mockery\Exception``. To avoid this, you cannot rely on the supplied Mockery PHPUnit + ``TestListener``, and you need to explicitly calls ``Mockery::close``. The easiest solution + to include this call in the ``tearDown()`` method, as explained previously. diff --git a/vendor/mockery/mockery/docs/reference/public_properties.rst b/vendor/mockery/mockery/docs/reference/public_properties.rst new file mode 100644 index 0000000..209f1bf --- /dev/null +++ b/vendor/mockery/mockery/docs/reference/public_properties.rst @@ -0,0 +1,16 @@ +.. index:: + single: Mocking; Public Properties + +Mocking Public Properties +========================= + +Mockery allows you to mock properties in several ways. The simplest is that +you can simply set a public property and value on any mock object. The second +is that you can use the expectation methods ``set()`` and ``andSet()`` to set +property values if that expectation is ever met. + +You should note that, in general, Mockery does not support mocking any magic +methods since these are generally not considered a public API (and besides +they are a PITA to differentiate when you badly need them for mocking!). So +please mock virtual properties (those relying on ``__get()`` and ``__set()``) +as if they were actually declared on the class. diff --git a/vendor/mockery/mockery/docs/reference/public_static_properties.rst b/vendor/mockery/mockery/docs/reference/public_static_properties.rst new file mode 100644 index 0000000..3079c8b --- /dev/null +++ b/vendor/mockery/mockery/docs/reference/public_static_properties.rst @@ -0,0 +1,12 @@ +.. index:: + single: Mocking; Public Static Methods + +Mocking Public Static Methods +============================= + +Static methods are not called on real objects, so normal mock objects can't +mock them. Mockery supports class aliased mocks, mocks representing a class +name which would normally be loaded (via autoloading or a require statement) +in the system under test. These aliases block that loading (unless via a +require statement - so please use autoloading!) and allow Mockery to intercept +static method calls and add expectations for them. diff --git a/vendor/mockery/mockery/docs/reference/quick_examples.rst b/vendor/mockery/mockery/docs/reference/quick_examples.rst new file mode 100644 index 0000000..f68736b --- /dev/null +++ b/vendor/mockery/mockery/docs/reference/quick_examples.rst @@ -0,0 +1,130 @@ +.. index:: + single: Reference; Examples + +Quick Examples +============== + +Create a mock object to return a sequence of values from a set of method +calls. + +.. code-block:: php + + class SimpleTest extends PHPUnit_Framework_TestCase + { + + public function tearDown() + { + \Mockery::close(); + } + + public function testSimpleMock() + { + $mock = \Mockery::mock(array('pi' => 3.1416, 'e' => 2.71)); + $this->assertEquals(3.1416, $mock->pi()); + $this->assertEquals(2.71, $mock->e()); + } + + } + +Create a mock object which returns a self-chaining Undefined object for a +method call. + +.. code-block:: php + + use \Mockery as m; + + class UndefinedTest extends PHPUnit_Framework_TestCase + { + + public function tearDown() + { + m::close(); + } + + public function testUndefinedValues() + { + $mock = m::mock('mymock'); + $mock->shouldReceive('divideBy')->with(0)->andReturnUndefined(); + $this->assertTrue($mock->divideBy(0) instanceof \Mockery\Undefined); + } + + } + +Creates a mock object which multiple query calls and a single update call. + +.. code-block:: php + + use \Mockery as m; + + class DbTest extends PHPUnit_Framework_TestCase + { + + public function tearDown() + { + m::close(); + } + + public function testDbAdapter() + { + $mock = m::mock('db'); + $mock->shouldReceive('query')->andReturn(1, 2, 3); + $mock->shouldReceive('update')->with(5)->andReturn(NULL)->once(); + + // ... test code here using the mock + } + + } + +Expect all queries to be executed before any updates. + +.. code-block:: php + + use \Mockery as m; + + class DbTest extends PHPUnit_Framework_TestCase + { + + public function tearDown() + { + m::close(); + } + + public function testQueryAndUpdateOrder() + { + $mock = m::mock('db'); + $mock->shouldReceive('query')->andReturn(1, 2, 3)->ordered(); + $mock->shouldReceive('update')->andReturn(NULL)->once()->ordered(); + + // ... test code here using the mock + } + + } + +Create a mock object where all queries occur after startup, but before finish, +and where queries are expected with several different params. + +.. code-block:: php + + use \Mockery as m; + + class DbTest extends PHPUnit_Framework_TestCase + { + + public function tearDown() + { + m::close(); + } + + public function testOrderedQueries() + { + $db = m::mock('db'); + $db->shouldReceive('startup')->once()->ordered(); + $db->shouldReceive('query')->with('CPWR')->andReturn(12.3)->once()->ordered('queries'); + $db->shouldReceive('query')->with('MSFT')->andReturn(10.0)->once()->ordered('queries'); + $db->shouldReceive('query')->with("/^....$/")->andReturn(3.3)->atLeast()->once()->ordered('queries'); + $db->shouldReceive('finish')->once()->ordered(); + + // ... test code here using the mock + } + + } diff --git a/vendor/mockery/mockery/docs/reference/startup_methods.rst b/vendor/mockery/mockery/docs/reference/startup_methods.rst new file mode 100644 index 0000000..334a98a --- /dev/null +++ b/vendor/mockery/mockery/docs/reference/startup_methods.rst @@ -0,0 +1,230 @@ +.. index:: + single: Reference; Quick Reference + +Quick Reference +=============== + +Mockery implements a shorthand API when creating a mock. Here's a sampling of +the possible startup methods. + +.. code-block:: php + + $mock = \Mockery::mock('foo'); + +Creates a mock object named "foo". In this case, "foo" is a name (not +necessarily a class name) used as a simple identifier when raising exceptions. +This creates a mock object of type ``\Mockery\Mock`` and is the loosest form +of mock possible. + +.. code-block:: php + + $mock = \Mockery::mock(array('foo'=>1,'bar'=>2)); + +Creates an mock object named unknown since we passed no name. However we did +pass an expectation array, a quick method of setting up methods to expect with +their return values. + +.. code-block:: php + + $mock = \Mockery::mock('foo', array('foo'=>1,'bar'=>2)); + +Similar to the previous examples and all examples going forward, expectation +arrays can be passed for all mock objects as the second parameter to +``mock()``. + +.. code-block:: php + + $mock = \Mockery::mock('foo', function($mock) { + $mock->shouldReceive(method_name); + }); + +In addition to expectation arrays, you can also pass in a closure which +contains reusable expectations. This can be passed as the second parameter, or +as the third parameter if partnered with an expectation array. This is one +method for creating reusable mock expectations. + +.. code-block:: php + + $mock = \Mockery::mock('stdClass'); + +Creates a mock identical to a named mock, except the name is an actual class +name. Creates a simple mock as previous examples show, except the mock object +will inherit the class type (via inheritance), i.e. it will pass type hints or +instanceof evaluations for stdClass. Useful where a mock object must be of a +specific type. + +.. code-block:: php + + $mock = \Mockery::mock('FooInterface'); + +You can create mock objects based on any concrete class, abstract class or +even an interface. Again, the primary purpose is to ensure the mock object +inherits a specific type for type hinting. There is an exception in that +classes marked final, or with methods marked final, cannot be mocked fully. In +these cases a partial mock (explained later) must be utilised. + +.. code-block:: php + + $mock = \Mockery::mock('alias:MyNamespace\MyClass'); + +Prefixing the valid name of a class (which is NOT currently loaded) with +"alias:" will generate an "alias mock". Alias mocks create a class alias with +the given classname to stdClass and are generally used to enable the mocking +of public static methods. Expectations set on the new mock object which refer +to static methods will be used by all static calls to this class. + +.. code-block:: php + + $mock = \Mockery::mock('overload:MyNamespace\MyClass'); + +Prefixing the valid name of a class (which is NOT currently loaded) with +"overload:" will generate an alias mock (as with "alias:") except that created +new instances of that class will import any expectations set on the origin +mock (``$mock``). The origin mock is never verified since it's used an +expectation store for new instances. For this purpose we use the term +"instance mock" to differentiate it from the simpler "alias mock". + +.. note:: + + Using alias/instance mocks across more than one test will generate a fatal + error since you can't have two classes of the same name. To avoid this, + run each test of this kind in a separate PHP process (which is supported + out of the box by both PHPUnit and PHPT). + +.. code-block:: php + + $mock = \Mockery::mock('stdClass, MyInterface1, MyInterface2'); + +The first argument can also accept a list of interfaces that the mock object +must implement, optionally including no more than one existing class to be +based on. The class name doesn't need to be the first member of the list but +it's a friendly convention to use for readability. All subsequent arguments +remain unchanged from previous examples. + +If the given class does not exist, you must define and include it beforehand +or a ``\Mockery\Exception`` will be thrown. + +.. code-block:: php + + $mock = \Mockery::mock('MyNamespace\MyClass[foo,bar]'); + +The syntax above tells Mockery to partially mock the ``MyNamespace\MyClass`` +class, by mocking the ``foo()`` and ``bar()`` methods only. Any other method +will be not be overridden by Mockery. This traditional form of "partial mock" +can be applied to any class or abstract class (e.g. mocking abstract methods +where a concrete implementation does not exist yet). If you attempt to partial +mock a method marked final, it will actually be ignored in that instance +leaving the final method untouched. This is necessary since mocking of final +methods is, by definition in PHP, impossible. + +Please refer to ":doc:`partial_mocks`" for a detailed explanation on how to +create Partial Mocks in Mockery. + +.. code-block:: php + + $mock = \Mockery::mock("MyNamespace\MyClass[foo]", array($arg1, $arg2)); + +If Mockery encounters an indexed array as the second or third argument, it +will assume they are constructor parameters and pass them when constructing +the mock object. The syntax above will create a new partial mock, particularly +useful if method ``bar`` calls method ``foo`` internally with +``$this->foo()``. + +.. code-block:: php + + $mock = \Mockery::mock(new Foo); + +Passing any real object into Mockery will create a Proxied Partial Mock. This +can be useful if real partials are impossible, e.g. a final class or class +where you absolutely must override a method marked final. Since you can +already create a concrete object, so all we need to do is selectively override +a subset of existing methods (or add non-existing methods!) for our +expectations. + +A little revision: All mock methods accept the class, object or alias name to +be mocked as the first parameter. The second parameter can be an expectation +array of methods and their return values, or an expectation closure (which can +be the third param if used in conjunction with an expectation array). + +.. code-block:: php + + \Mockery::self() + +At times, you will discover that expectations on a mock include methods which +need to return the same mock object (e.g. a common case when designing a +Domain Specific Language (DSL) such as the one Mockery itself uses!). To +facilitate this, calling ``\Mockery::self()`` will always return the last Mock +Object created by calling ``\Mockery::mock()``. For example: + +.. code-block:: php + + $mock = \Mockery::mock('BazIterator') + ->shouldReceive('next') + ->andReturn(\Mockery::self()) + ->mock(); + +The above class being mocked, as the ``next()`` method suggests, is an +iterator. In many cases, you can replace all the iterated elements (since they +are the same type many times) with just the one mock object which is +programmed to act as discrete iterated elements. + +.. code-block:: php + + $mock = \Mockery::namedMock('MyClassName', 'DateTime'); + +The ``namedMock`` method will generate a class called by the first argument, +so in this example ``MyClassName``. The rest of the arguments are treat in the +same way as the ``mock`` method, so again, this example would create a class +called ``MyClassName`` that extends ``DateTime``. + +Named mocks are quite an edge case, but they can be useful when code depends +on the ``__CLASS__`` magic constant, or when you need two derivatives of an +abstract type, that are actually different classes. + +.. caution:: + + You can only create a named mock once, any subsequent calls to + ``namedMock``, with different arguments are likely to cause exceptions. + +Behaviour Modifiers +------------------- + +When creating a mock object, you may wish to use some commonly preferred +behaviours that are not the default in Mockery. + +.. code-block:: php + + \Mockery::mock('MyClass')->shouldIgnoreMissing() + +The use of the ``shouldIgnoreMissing()`` behaviour modifier will label this +mock object as a Passive Mock. In such a mock object, calls to methods which +are not covered by expectations will return ``null`` instead of the usual +complaining about there being no expectation matching the call. + +You can optionally prefer to return an object of type ``\Mockery\Undefined`` +(i.e. a ``null`` object) (which was the 0.7.2 behaviour) by using an +additional modifier: + +.. code-block:: php + + \Mockery::mock('MyClass')->shouldIgnoreMissing()->asUndefined() + +The returned object is nothing more than a placeholder so if, by some act of +fate, it's erroneously used somewhere it shouldn't it will likely not pass a +logic check. + +.. code-block:: php + + \Mockery::mock('MyClass')->makePartial() + +also + +.. code-block:: php + + \Mockery::mock('MyClass')->shouldDeferMissing() + +Known as a Passive Partial Mock (not to be confused with real partial mock +objects discussed later), this form of mock object will defer all methods not +subject to an expectation to the parent class of the mock, i.e. ``MyClass``. +Whereas the previous ``shouldIgnoreMissing()`` returned ``null``, this +behaviour simply calls the parent's matching method. diff --git a/vendor/mockery/mockery/examples/starship/Bootstrap.php b/vendor/mockery/mockery/examples/starship/Bootstrap.php new file mode 100644 index 0000000..93b0af9 --- /dev/null +++ b/vendor/mockery/mockery/examples/starship/Bootstrap.php @@ -0,0 +1,11 @@ +register(); diff --git a/vendor/mockery/mockery/examples/starship/Starship.php b/vendor/mockery/mockery/examples/starship/Starship.php new file mode 100644 index 0000000..ca26ef1 --- /dev/null +++ b/vendor/mockery/mockery/examples/starship/Starship.php @@ -0,0 +1,24 @@ +_engineering = $engineering; + } + + public function enterOrbit() + { + $this->_engineering->disengageWarp(); + $this->_engineering->runDiagnosticLevel(5); + $this->_engineering->divertPower(0.40, 'sensors'); + $this->_engineering->divertPower(0.30, 'auxengines'); + $this->_engineering->runDiagnosticLevel(1); + + // We can add more runDiagnosticLevel() calls without failing the test + // anywhere above since they are unordered. + } +} diff --git a/vendor/mockery/mockery/examples/starship/StarshipTest.php b/vendor/mockery/mockery/examples/starship/StarshipTest.php new file mode 100644 index 0000000..a85def5 --- /dev/null +++ b/vendor/mockery/mockery/examples/starship/StarshipTest.php @@ -0,0 +1,21 @@ +shouldReceive('disengageWarp')->once()->ordered(); + $mock->shouldReceive('divertPower')->with(0.40, 'sensors')->once()->ordered(); + $mock->shouldReceive('divertPower')->with(0.30, 'auxengines')->once()->ordered(); + $mock->shouldReceive('runDiagnosticLevel')->with(1)->once()->ordered(); + $mock->shouldReceive('runDiagnosticLevel')->with(M::type('int'))->zeroOrMoreTimes(); + + $starship = new Starship($mock); + $starship->enterOrbit(); + } +} diff --git a/vendor/mockery/mockery/library/Mockery.php b/vendor/mockery/mockery/library/Mockery.php new file mode 100644 index 0000000..f2c6b56 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery.php @@ -0,0 +1,759 @@ +shouldIgnoreMissing(); + } + + /** + * @return \Mockery\MockInterface + */ + public static function instanceMock() + { + $args = func_get_args(); + + return call_user_func_array(array(self::getContainer(), 'mock'), $args); + } + + /** + * Static shortcut to \Mockery\Container::mock(), first argument names the mock. + * + * @return \Mockery\MockInterface + */ + public static function namedMock() + { + $args = func_get_args(); + $name = array_shift($args); + + $builder = new MockConfigurationBuilder(); + $builder->setName($name); + + array_unshift($args, $builder); + + return call_user_func_array(array(self::getContainer(), 'mock'), $args); + } + + /** + * Static shortcut to \Mockery\Container::self(). + * + * @throws LogicException + * + * @return \Mockery\MockInterface + */ + public static function self() + { + if (is_null(self::$_container)) { + throw new \LogicException('You have not declared any mocks yet'); + } + + return self::$_container->self(); + } + + /** + * Static shortcut to closing up and verifying all mocks in the global + * container, and resetting the container static variable to null. + * + * @return void + */ + public static function close() + { + foreach (self::$_filesToCleanUp as $fileName) { + @unlink($fileName); + } + self::$_filesToCleanUp = array(); + + if (is_null(self::$_container)) { + return; + } + + self::$_container->mockery_teardown(); + self::$_container->mockery_close(); + self::$_container = null; + } + + /** + * Static fetching of a mock associated with a name or explicit class poser. + * + * @param $name + * + * @return \Mockery\Mock + */ + public static function fetchMock($name) + { + return self::$_container->fetchMock($name); + } + + /** + * Get the container. + */ + public static function getContainer() + { + if (is_null(self::$_container)) { + self::$_container = new Mockery\Container(self::getGenerator(), self::getLoader()); + } + + return self::$_container; + } + + /** + * @param \Mockery\Generator\Generator $generator + */ + public static function setGenerator(Generator $generator) + { + self::$_generator = $generator; + } + + public static function getGenerator() + { + if (is_null(self::$_generator)) { + self::$_generator = self::getDefaultGenerator(); + } + + return self::$_generator; + } + + public static function getDefaultGenerator() + { + $generator = new StringManipulationGenerator(array( + new CallTypeHintPass(), + new ClassPass(), + new ClassNamePass(), + new InstanceMockPass(), + new InterfacePass(), + new MethodDefinitionPass(), + new RemoveUnserializeForInternalSerializableClassesPass(), + new RemoveBuiltinMethodsThatAreFinalPass(), + )); + + return new CachingGenerator($generator); + } + + /** + * @param Loader $loader + */ + public static function setLoader(Loader $loader) + { + self::$_loader = $loader; + } + + /** + * @return Loader + */ + public static function getLoader() + { + if (is_null(self::$_loader)) { + self::$_loader = self::getDefaultLoader(); + } + + return self::$_loader; + } + + /** + * @return EvalLoader + */ + public static function getDefaultLoader() + { + return new EvalLoader(); + } + + /** + * Set the container. + * + * @param \Mockery\Container $container + * + * @return \Mockery\Container + */ + public static function setContainer(Mockery\Container $container) + { + return self::$_container = $container; + } + + /** + * Reset the container to null. + */ + public static function resetContainer() + { + self::$_container = null; + } + + /** + * Return instance of ANY matcher. + * + * @return \Mockery\Matcher\Any + */ + public static function any() + { + return new \Mockery\Matcher\Any(); + } + + /** + * Return instance of TYPE matcher. + * + * @param $expected + * + * @return \Mockery\Matcher\Type + */ + public static function type($expected) + { + return new \Mockery\Matcher\Type($expected); + } + + /** + * Return instance of DUCKTYPE matcher. + * + * @return \Mockery\Matcher\Ducktype + */ + public static function ducktype() + { + return new \Mockery\Matcher\Ducktype(func_get_args()); + } + + /** + * Return instance of SUBSET matcher. + * + * @param array $part + * + * @return \Mockery\Matcher\Subset + */ + public static function subset(array $part) + { + return new \Mockery\Matcher\Subset($part); + } + + /** + * Return instance of CONTAINS matcher. + * + * @return \Mockery\Matcher\Contains + */ + public static function contains() + { + return new \Mockery\Matcher\Contains(func_get_args()); + } + + /** + * Return instance of HASKEY matcher. + * + * @param $key + * + * @return \Mockery\Matcher\HasKey + */ + public static function hasKey($key) + { + return new \Mockery\Matcher\HasKey($key); + } + + /** + * Return instance of HASVALUE matcher. + * + * @param $val + * + * @return \Mockery\Matcher\HasValue + */ + public static function hasValue($val) + { + return new \Mockery\Matcher\HasValue($val); + } + + /** + * Return instance of CLOSURE matcher. + * + * @param $closure + * + * @return \Mockery\Matcher\Closure + */ + public static function on($closure) + { + return new \Mockery\Matcher\Closure($closure); + } + + /** + * Return instance of MUSTBE matcher. + * + * @param $expected + * + * @return \Mockery\Matcher\MustBe + */ + public static function mustBe($expected) + { + return new \Mockery\Matcher\MustBe($expected); + } + + /** + * Return instance of NOT matcher. + * + * @param $expected + * + * @return \Mockery\Matcher\Not + */ + public static function not($expected) + { + return new \Mockery\Matcher\Not($expected); + } + + /** + * Return instance of ANYOF matcher. + * + * @return \Mockery\Matcher\AnyOf + */ + public static function anyOf() + { + return new \Mockery\Matcher\AnyOf(func_get_args()); + } + + /** + * Return instance of NOTANYOF matcher. + * + * @return \Mockery\Matcher\NotAnyOf + */ + public static function notAnyOf() + { + return new \Mockery\Matcher\NotAnyOf(func_get_args()); + } + + /** + * Get the global configuration container. + */ + public static function getConfiguration() + { + if (is_null(self::$_config)) { + self::$_config = new \Mockery\Configuration(); + } + + return self::$_config; + } + + /** + * Utility method to format method name and arguments into a string. + * + * @param string $method + * @param array $arguments + * + * @return string + */ + public static function formatArgs($method, array $arguments = null) + { + if (is_null($arguments)) { + return $method . '()'; + } + + $formattedArguments = array(); + foreach ($arguments as $argument) { + $formattedArguments[] = self::formatArgument($argument); + } + + return $method . '(' . implode(', ', $formattedArguments) . ')'; + } + + private static function formatArgument($argument, $depth = 0) + { + if (is_object($argument)) { + return 'object(' . get_class($argument) . ')'; + } + + if (is_int($argument) || is_float($argument)) { + return $argument; + } + + if (is_array($argument)) { + if ($depth === 1) { + $argument = 'array(...)'; + } else { + $sample = array(); + foreach ($argument as $key => $value) { + $sample[$key] = self::formatArgument($value, $depth + 1); + } + $argument = preg_replace("{\s}", '', var_export($sample, true)); + } + + return ((strlen($argument) > 1000) ? substr($argument, 0, 1000).'...)' : $argument); + } + + if (is_bool($argument)) { + return $argument ? 'true' : 'false'; + } + + if (is_resource($argument)) { + return 'resource(...)'; + } + + if (is_null($argument)) { + return 'NULL'; + } + + $argument = (string) $argument; + + return $depth === 0 ? '"' . $argument . '"' : $argument; + } + + /** + * Utility function to format objects to printable arrays. + * + * @param array $objects + * + * @return string + */ + public static function formatObjects(array $objects = null) + { + static $formatting; + + if ($formatting) { + return '[Recursion]'; + } + + if (is_null($objects)) { + return ''; + } + + $objects = array_filter($objects, 'is_object'); + if (empty($objects)) { + return ''; + } + + $formatting = true; + $parts = array(); + + foreach ($objects as $object) { + $parts[get_class($object)] = self::objectToArray($object); + } + + $formatting = false; + + return 'Objects: ( ' . var_export($parts, true) . ')'; + } + + /** + * Utility function to turn public properties and public get* and is* method values into an array. + * + * @param $object + * @param int $nesting + * + * @return array + */ + private static function objectToArray($object, $nesting = 3) + { + if ($nesting == 0) { + return array('...'); + } + + return array( + 'class' => get_class($object), + 'properties' => self::extractInstancePublicProperties($object, $nesting), + 'getters' => self::extractGetters($object, $nesting) + ); + } + + /** + * Returns all public instance properties. + * + * @param $object + * @param $nesting + * + * @return array + */ + private static function extractInstancePublicProperties($object, $nesting) + { + $reflection = new \ReflectionClass(get_class($object)); + $properties = $reflection->getProperties(\ReflectionProperty::IS_PUBLIC); + $cleanedProperties = array(); + + foreach ($properties as $publicProperty) { + if (!$publicProperty->isStatic()) { + $name = $publicProperty->getName(); + $cleanedProperties[$name] = self::cleanupNesting($object->$name, $nesting); + } + } + + return $cleanedProperties; + } + + /** + * Returns all object getters. + * + * @param $object + * @param $nesting + * + * @return array + */ + private static function extractGetters($object, $nesting) + { + $reflection = new \ReflectionClass(get_class($object)); + $publicMethods = $reflection->getMethods(\ReflectionMethod::IS_PUBLIC); + $getters = array(); + + foreach ($publicMethods as $publicMethod) { + $name = $publicMethod->getName(); + $irrelevantName = (substr($name, 0, 3) !== 'get' && substr($name, 0, 2) !== 'is'); + $isStatic = $publicMethod->isStatic(); + $numberOfParameters = $publicMethod->getNumberOfParameters(); + + if ($irrelevantName || $numberOfParameters != 0 || $isStatic) { + continue; + } + + try { + $getters[$name] = self::cleanupNesting($object->$name(), $nesting); + } catch (\Exception $e) { + $getters[$name] = '!! ' . get_class($e) . ': ' . $e->getMessage() . ' !!'; + } + } + + return $getters; + } + + private static function cleanupNesting($argument, $nesting) + { + if (is_object($argument)) { + $object = self::objectToArray($argument, $nesting - 1); + $object['class'] = get_class($argument); + + return $object; + } + + if (is_array($argument)) { + return self::cleanupArray($argument, $nesting - 1); + } + + return $argument; + } + + private static function cleanupArray($argument, $nesting = 3) + { + if ($nesting == 0) { + return '...'; + } + + foreach ($argument as $key => $value) { + if (is_array($value)) { + $argument[$key] = self::cleanupArray($value, $nesting - 1); + } elseif (is_object($value)) { + $argument[$key] = self::objectToArray($value, $nesting - 1); + } + } + + return $argument; + } + + /** + * Utility function to parse shouldReceive() arguments and generate + * expectations from such as needed. + * + * @param Mockery\MockInterface $mock + * @param array $args + * @param callable $add + * @return \Mockery\CompositeExpectation + */ + public static function parseShouldReturnArgs(\Mockery\MockInterface $mock, $args, $add) + { + $composite = new \Mockery\CompositeExpectation(); + + foreach ($args as $arg) { + if (is_array($arg)) { + foreach ($arg as $k => $v) { + $expectation = self::buildDemeterChain($mock, $k, $add)->andReturn($v); + $composite->add($expectation); + } + } elseif (is_string($arg)) { + $expectation = self::buildDemeterChain($mock, $arg, $add); + $composite->add($expectation); + } + } + + return $composite; + } + + /** + * Sets up expectations on the members of the CompositeExpectation and + * builds up any demeter chain that was passed to shouldReceive. + * + * @param \Mockery\MockInterface $mock + * @param string $arg + * @param callable $add + * @throws Mockery\Exception + * @return \Mockery\ExpectationDirector + */ + protected static function buildDemeterChain(\Mockery\MockInterface $mock, $arg, $add) + { + /** @var Mockery\Container $container */ + $container = $mock->mockery_getContainer(); + $methodNames = explode('->', $arg); + reset($methodNames); + + if (!\Mockery::getConfiguration()->mockingNonExistentMethodsAllowed() + && !$mock->mockery_isAnonymous() + && !in_array(current($methodNames), $mock->mockery_getMockableMethods()) + ) { + throw new \Mockery\Exception( + 'Mockery\'s configuration currently forbids mocking the method ' + . current($methodNames) . ' as it does not exist on the class or object ' + . 'being mocked' + ); + } + + /** @var ExpectationInterface|null $expectations */ + $expectations = null; + + /** @var Callable $nextExp */ + $nextExp = function ($method) use ($add) { + return $add($method); + }; + + while (true) { + $method = array_shift($methodNames); + $expectations = $mock->mockery_getExpectationsFor($method); + + if (is_null($expectations) || self::noMoreElementsInChain($methodNames)) { + $expectations = $nextExp($method); + if (self::noMoreElementsInChain($methodNames)) { + break; + } + + $mock = self::getNewDemeterMock($container, $method, $expectations); + } else { + $demeterMockKey = $container->getKeyOfDemeterMockFor($method); + if ($demeterMockKey) { + $mock = self::getExistingDemeterMock($container, $demeterMockKey); + } + } + + $nextExp = function ($n) use ($mock) { + return $mock->shouldReceive($n); + }; + } + + return $expectations; + } + + /** + * @param \Mockery\Container $container + * @param string $method + * @param Mockery\ExpectationInterface $exp + * + * @return \Mockery\Mock + */ + private static function getNewDemeterMock(Mockery\Container $container, + $method, + Mockery\ExpectationInterface $exp + ) { + $mock = $container->mock('demeter_' . $method); + $exp->andReturn($mock); + + return $mock; + } + + /** + * @param \Mockery\Container $container + * @param string $demeterMockKey + * + * @return mixed + */ + private static function getExistingDemeterMock(Mockery\Container $container, $demeterMockKey) + { + $mocks = $container->getMocks(); + $mock = $mocks[$demeterMockKey]; + + return $mock; + } + + /** + * @param array $methodNames + * + * @return bool + */ + private static function noMoreElementsInChain(array $methodNames) + { + return empty($methodNames); + } + + /** + * Register a file to be deleted on tearDown. + * + * @param string $fileName + */ + public static function registerFileForCleanUp($fileName) + { + self::$_filesToCleanUp[] = $fileName; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryPHPUnitIntegration.php b/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryPHPUnitIntegration.php new file mode 100644 index 0000000..aefc6d3 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryPHPUnitIntegration.php @@ -0,0 +1,26 @@ +addToAssertionCount($container->mockery_getExpectationCount()); + } + + // Verify Mockery expectations. + \Mockery::close(); + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryTestCase.php b/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryTestCase.php new file mode 100644 index 0000000..acbba30 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryTestCase.php @@ -0,0 +1,30 @@ +addMockeryExpectationsToAssertionCount(); + $this->closeMockery(); + + parent::assertPostConditions(); + } + + protected function addMockeryExpectationsToAssertionCount() + { + $container = Mockery::getContainer(); + if ($container != null) { + $count = $container->mockery_getExpectationCount(); + $this->addToAssertionCount($count); + } + } + + protected function closeMockery() + { + Mockery::close(); + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/TestListener.php b/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/TestListener.php new file mode 100644 index 0000000..578d326 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/TestListener.php @@ -0,0 +1,93 @@ +mockery_getExpectationCount(); + $test->addToAssertionCount($expectation_count); + } + \Mockery::close(); + } catch (\Exception $e) { + $result = $test->getTestResultObject(); + $result->addError($test, $e, $time); + } + } + + /** + * Add Mockery files to PHPUnit's blacklist so they don't showup on coverage reports + */ + public function startTestSuite(\PHPUnit_Framework_TestSuite $suite) + { + if (class_exists('\\PHP_CodeCoverage_Filter') + && method_exists('\\PHP_CodeCoverage_Filter', 'getInstance')) { + \PHP_CodeCoverage_Filter::getInstance()->addDirectoryToBlacklist( + __DIR__.'/../../../Mockery/', '.php', '', 'PHPUNIT' + ); + + \PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(__DIR__.'/../../../Mockery.php', 'PHPUNIT'); + } + } + /** + * The Listening methods below are not required for Mockery + */ + public function addError(\PHPUnit_Framework_Test $test, \Exception $e, $time) + { + } + + public function addFailure(\PHPUnit_Framework_Test $test, \PHPUnit_Framework_AssertionFailedError $e, $time) + { + } + + public function addIncompleteTest(\PHPUnit_Framework_Test $test, \Exception $e, $time) + { + } + + public function addSkippedTest(\PHPUnit_Framework_Test $test, \Exception $e, $time) + { + } + + public function addRiskyTest(\PHPUnit_Framework_Test $test, \Exception $e, $time) + { + } + + public function endTestSuite(\PHPUnit_Framework_TestSuite $suite) + { + } + + public function startTest(\PHPUnit_Framework_Test $test) + { + } +} diff --git a/vendor/mockery/mockery/library/Mockery/CompositeExpectation.php b/vendor/mockery/mockery/library/Mockery/CompositeExpectation.php new file mode 100644 index 0000000..242d73b --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/CompositeExpectation.php @@ -0,0 +1,131 @@ +_expectations[] = $expectation; + } + + /** + * @param mixed ... + */ + public function andReturn() + { + return $this->__call(__FUNCTION__, func_get_args()); + } + + /** + * Intercept any expectation calls and direct against all expectations + * + * @param string $method + * @param array $args + * @return self + */ + public function __call($method, array $args) + { + foreach ($this->_expectations as $expectation) { + call_user_func_array(array($expectation, $method), $args); + } + return $this; + } + + /** + * Return order number of the first expectation + * + * @return int + */ + public function getOrderNumber() + { + reset($this->_expectations); + $first = current($this->_expectations); + return $first->getOrderNumber(); + } + + /** + * Return the parent mock of the first expectation + * + * @return \Mockery\MockInterface + */ + public function getMock() + { + reset($this->_expectations); + $first = current($this->_expectations); + return $first->getMock(); + } + + /** + * Mockery API alias to getMock + * + * @return \Mockery\MockInterface + */ + public function mock() + { + return $this->getMock(); + } + + /** + * Starts a new expectation addition on the first mock which is the primary + * target outside of a demeter chain + * + * @param mixed ... + * @return \Mockery\Expectation + */ + public function shouldReceive() + { + $args = func_get_args(); + reset($this->_expectations); + $first = current($this->_expectations); + return call_user_func_array(array($first->getMock(), 'shouldReceive'), $args); + } + + /** + * Return the string summary of this composite expectation + * + * @return string + */ + public function __toString() + { + $return = '['; + $parts = array(); + foreach ($this->_expectations as $exp) { + $parts[] = (string) $exp; + } + $return .= implode(', ', $parts) . ']'; + return $return; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Configuration.php b/vendor/mockery/mockery/library/Mockery/Configuration.php new file mode 100644 index 0000000..a6366b8 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Configuration.php @@ -0,0 +1,131 @@ +_allowMockingNonExistentMethod = (bool) $flag; + } + + /** + * Return flag indicating whether mocking non-existent methods allowed + * + * @return bool + */ + public function mockingNonExistentMethodsAllowed() + { + return $this->_allowMockingNonExistentMethod; + } + + /** + * Set boolean to allow/prevent unnecessary mocking of methods + * + * @param bool + */ + public function allowMockingMethodsUnnecessarily($flag = true) + { + $this->_allowMockingMethodsUnnecessarily = (bool) $flag; + } + + /** + * Return flag indicating whether mocking non-existent methods allowed + * + * @return bool + */ + public function mockingMethodsUnnecessarilyAllowed() + { + return $this->_allowMockingMethodsUnnecessarily; + } + + /** + * Set a parameter map (array of param signature strings) for the method + * of an internal PHP class. + * + * @param string $class + * @param string $method + * @param array $map + */ + public function setInternalClassMethodParamMap($class, $method, array $map) + { + if (!isset($this->_internalClassParamMap[strtolower($class)])) { + $this->_internalClassParamMap[strtolower($class)] = array(); + } + $this->_internalClassParamMap[strtolower($class)][strtolower($method)] = $map; + } + + /** + * Remove all overriden parameter maps from internal PHP classes. + */ + public function resetInternalClassMethodParamMaps() + { + $this->_internalClassParamMap = array(); + } + + /** + * Get the parameter map of an internal PHP class method + * + * @return array + */ + public function getInternalClassMethodParamMap($class, $method) + { + if (isset($this->_internalClassParamMap[strtolower($class)][strtolower($method)])) { + return $this->_internalClassParamMap[strtolower($class)][strtolower($method)]; + } + } + + public function getInternalClassMethodParamMaps() + { + return $this->_internalClassParamMap; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Container.php b/vendor/mockery/mockery/library/Mockery/Container.php new file mode 100644 index 0000000..d112266 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Container.php @@ -0,0 +1,524 @@ +_generator = $generator ?: \Mockery::getDefaultGenerator(); + $this->_loader = $loader ?: \Mockery::getDefaultLoader(); + } + + /** + * Generates a new mock object for this container + * + * I apologies in advance for this. A God Method just fits the API which + * doesn't require differentiating between classes, interfaces, abstracts, + * names or partials - just so long as it's something that can be mocked. + * I'll refactor it one day so it's easier to follow. + * + * @throws Exception\RuntimeException + * @throws Exception + * @return \Mockery\Mock + */ + public function mock() + { + $expectationClosure = null; + $quickdefs = array(); + $constructorArgs = null; + $blocks = array(); + $args = func_get_args(); + + if (count($args) > 1) { + $finalArg = end($args); + reset($args); + if (is_callable($finalArg) && is_object($finalArg)) { + $expectationClosure = array_pop($args); + } + } + + $builder = new MockConfigurationBuilder(); + + foreach ($args as $k => $arg) { + if ($arg instanceof MockConfigurationBuilder) { + $builder = $arg; + unset($args[$k]); + } + } + reset($args); + + $builder->setParameterOverrides(\Mockery::getConfiguration()->getInternalClassMethodParamMaps()); + + while (count($args) > 0) { + $arg = current($args); + // check for multiple interfaces + if (is_string($arg) && strpos($arg, ',') && !strpos($arg, ']')) { + $interfaces = explode(',', str_replace(' ', '', $arg)); + foreach ($interfaces as $i) { + if (!interface_exists($i, true) && !class_exists($i, true)) { + throw new \Mockery\Exception( + 'Class name follows the format for defining multiple' + . ' interfaces, however one or more of the interfaces' + . ' do not exist or are not included, or the base class' + . ' (which you may omit from the mock definition) does not exist' + ); + } + } + $builder->addTargets($interfaces); + array_shift($args); + + continue; + } elseif (is_string($arg) && substr($arg, 0, 6) == 'alias:') { + $name = array_shift($args); + $name = str_replace('alias:', '', $name); + $builder->addTarget('stdClass'); + $builder->setName($name); + continue; + } elseif (is_string($arg) && substr($arg, 0, 9) == 'overload:') { + $name = array_shift($args); + $name = str_replace('overload:', '', $name); + $builder->setInstanceMock(true); + $builder->addTarget('stdClass'); + $builder->setName($name); + continue; + } elseif (is_string($arg) && substr($arg, strlen($arg)-1, 1) == ']') { + $parts = explode('[', $arg); + if (!class_exists($parts[0], true) && !interface_exists($parts[0], true)) { + throw new \Mockery\Exception('Can only create a partial mock from' + . ' an existing class or interface'); + } + $class = $parts[0]; + $parts[1] = str_replace(' ', '', $parts[1]); + $partialMethods = explode(',', strtolower(rtrim($parts[1], ']'))); + $builder->addTarget($class); + $builder->setWhiteListedMethods($partialMethods); + array_shift($args); + continue; + } elseif (is_string($arg) && (class_exists($arg, true) || interface_exists($arg, true))) { + $class = array_shift($args); + $builder->addTarget($class); + continue; + } elseif (is_string($arg)) { + $class = array_shift($args); + $builder->addTarget($class); + continue; + } elseif (is_object($arg)) { + $partial = array_shift($args); + $builder->addTarget($partial); + continue; + } elseif (is_array($arg) && !empty($arg) && array_keys($arg) !== range(0, count($arg) - 1)) { + // if associative array + if (array_key_exists(self::BLOCKS, $arg)) { + $blocks = $arg[self::BLOCKS]; + } + unset($arg[self::BLOCKS]); + $quickdefs = array_shift($args); + continue; + } elseif (is_array($arg)) { + $constructorArgs = array_shift($args); + continue; + } + + throw new \Mockery\Exception( + 'Unable to parse arguments sent to ' + . get_class($this) . '::mock()' + ); + } + + $builder->addBlackListedMethods($blocks); + + if (!is_null($constructorArgs)) { + $builder->addBlackListedMethod("__construct"); // we need to pass through + } + + if (!empty($partialMethods) && $constructorArgs === null) { + $constructorArgs = array(); + } + + $config = $builder->getMockConfiguration(); + + $this->checkForNamedMockClashes($config); + + $def = $this->getGenerator()->generate($config); + + if (class_exists($def->getClassName(), $attemptAutoload = false)) { + $rfc = new \ReflectionClass($def->getClassName()); + if (!$rfc->implementsInterface("Mockery\MockInterface")) { + throw new \Mockery\Exception\RuntimeException("Could not load mock {$def->getClassName()}, class already exists"); + } + } + + $this->getLoader()->load($def); + + $mock = $this->_getInstance($def->getClassName(), $constructorArgs); + $mock->mockery_init($this, $config->getTargetObject()); + + if (!empty($quickdefs)) { + $mock->shouldReceive($quickdefs)->byDefault(); + } + if (!empty($expectationClosure)) { + $expectationClosure($mock); + } + $this->rememberMock($mock); + return $mock; + } + + public function instanceMock() + { + } + + public function getLoader() + { + return $this->_loader; + } + + public function getGenerator() + { + return $this->_generator; + } + + /** + * @param string $method + * @return string|null + */ + public function getKeyOfDemeterMockFor($method) + { + $keys = array_keys($this->_mocks); + $match = preg_grep("/__demeter_{$method}$/", $keys); + if (count($match) == 1) { + $res = array_values($match); + if (count($res) > 0) { + return $res[0]; + } + } + return null; + } + + /** + * @return array + */ + public function getMocks() + { + return $this->_mocks; + } + + /** + * Tear down tasks for this container + * + * @throws \Exception + * @return void + */ + public function mockery_teardown() + { + try { + $this->mockery_verify(); + } catch (\Exception $e) { + $this->mockery_close(); + throw $e; + } + } + + /** + * Verify the container mocks + * + * @return void + */ + public function mockery_verify() + { + foreach ($this->_mocks as $mock) { + $mock->mockery_verify(); + } + } + + /** + * Reset the container to its original state + * + * @return void + */ + public function mockery_close() + { + foreach ($this->_mocks as $mock) { + $mock->mockery_teardown(); + } + $this->_mocks = array(); + } + + /** + * Fetch the next available allocation order number + * + * @return int + */ + public function mockery_allocateOrder() + { + $this->_allocatedOrder += 1; + return $this->_allocatedOrder; + } + + /** + * Set ordering for a group + * + * @param mixed $group + * @param int $order + */ + public function mockery_setGroup($group, $order) + { + $this->_groups[$group] = $order; + } + + /** + * Fetch array of ordered groups + * + * @return array + */ + public function mockery_getGroups() + { + return $this->_groups; + } + + /** + * Set current ordered number + * + * @param int $order + * @return int The current order number that was set + */ + public function mockery_setCurrentOrder($order) + { + $this->_currentOrder = $order; + return $this->_currentOrder; + } + + /** + * Get current ordered number + * + * @return int + */ + public function mockery_getCurrentOrder() + { + return $this->_currentOrder; + } + + /** + * Validate the current mock's ordering + * + * @param string $method + * @param int $order + * @throws \Mockery\Exception + * @return void + */ + public function mockery_validateOrder($method, $order, \Mockery\MockInterface $mock) + { + if ($order < $this->_currentOrder) { + $exception = new \Mockery\Exception\InvalidOrderException( + 'Method ' . $method . ' called out of order: expected order ' + . $order . ', was ' . $this->_currentOrder + ); + $exception->setMock($mock) + ->setMethodName($method) + ->setExpectedOrder($order) + ->setActualOrder($this->_currentOrder); + throw $exception; + } + $this->mockery_setCurrentOrder($order); + } + + /** + * Gets the count of expectations on the mocks + * + * @return int + */ + public function mockery_getExpectationCount() + { + $count = 0; + foreach ($this->_mocks as $mock) { + $count += $mock->mockery_getExpectationCount(); + } + return $count; + } + + /** + * Store a mock and set its container reference + * + * @param \Mockery\Mock + * @return \Mockery\Mock + */ + public function rememberMock(\Mockery\MockInterface $mock) + { + if (!isset($this->_mocks[get_class($mock)])) { + $this->_mocks[get_class($mock)] = $mock; + } else { + /** + * This condition triggers for an instance mock where origin mock + * is already remembered + */ + $this->_mocks[] = $mock; + } + return $mock; + } + + /** + * Retrieve the last remembered mock object, which is the same as saying + * retrieve the current mock being programmed where you have yet to call + * mock() to change it - thus why the method name is "self" since it will be + * be used during the programming of the same mock. + * + * @return \Mockery\Mock + */ + public function self() + { + $mocks = array_values($this->_mocks); + $index = count($mocks) - 1; + return $mocks[$index]; + } + + /** + * Return a specific remembered mock according to the array index it + * was stored to in this container instance + * + * @return \Mockery\Mock + */ + public function fetchMock($reference) + { + if (isset($this->_mocks[$reference])) { + return $this->_mocks[$reference]; + } + } + + protected function _getInstance($mockName, $constructorArgs = null) + { + if ($constructorArgs !== null) { + $r = new \ReflectionClass($mockName); + return $r->newInstanceArgs($constructorArgs); + } + + try { + $instantiator = new Instantiator; + $instance = $instantiator->instantiate($mockName); + } catch (\Exception $ex) { + $internalMockName = $mockName . '_Internal'; + + if (!class_exists($internalMockName)) { + eval("class $internalMockName extends $mockName {" . + 'public function __construct() {}' . + '}'); + } + + $instance = new $internalMockName(); + } + + return $instance; + } + + /** + * Takes a class name and declares it + * + * @param string $fqcn + */ + public function declareClass($fqcn) + { + if (false !== strpos($fqcn, '/')) { + throw new \Mockery\Exception( + 'Class name contains a forward slash instead of backslash needed ' + . 'when employing namespaces' + ); + } + if (false !== strpos($fqcn, "\\")) { + $parts = array_filter(explode("\\", $fqcn), function ($part) { + return $part !== ""; + }); + $cl = array_pop($parts); + $ns = implode("\\", $parts); + eval(" namespace $ns { class $cl {} }"); + } else { + eval(" class $fqcn {} "); + } + } + + protected function checkForNamedMockClashes($config) + { + $name = $config->getName(); + + if (!$name) { + return; + } + + $hash = $config->getHash(); + + if (isset($this->_namedMocks[$name])) { + if ($hash !== $this->_namedMocks[$name]) { + throw new \Mockery\Exception( + "The mock named '$name' has been already defined with a different mock configuration" + ); + } + } + + $this->_namedMocks[$name] = $hash; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/CountValidator/AtLeast.php b/vendor/mockery/mockery/library/Mockery/CountValidator/AtLeast.php new file mode 100644 index 0000000..ca097ce --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/CountValidator/AtLeast.php @@ -0,0 +1,63 @@ +_limit > $n) { + $exception = new Mockery\Exception\InvalidCountException( + 'Method ' . (string) $this->_expectation + . ' from ' . $this->_expectation->getMock()->mockery_getName() + . ' should be called' . PHP_EOL + . ' at least ' . $this->_limit . ' times but called ' . $n + . ' times.' + ); + $exception->setMock($this->_expectation->getMock()) + ->setMethodName((string) $this->_expectation) + ->setExpectedCountComparative('>=') + ->setExpectedCount($this->_limit) + ->setActualCount($n); + throw $exception; + } + } +} diff --git a/vendor/mockery/mockery/library/Mockery/CountValidator/AtMost.php b/vendor/mockery/mockery/library/Mockery/CountValidator/AtMost.php new file mode 100644 index 0000000..83349d6 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/CountValidator/AtMost.php @@ -0,0 +1,52 @@ +_limit < $n) { + $exception = new Mockery\Exception\InvalidCountException( + 'Method ' . (string) $this->_expectation + . ' from ' . $this->_expectation->getMock()->mockery_getName() + . ' should be called' . PHP_EOL + . ' at most ' . $this->_limit . ' times but called ' . $n + . ' times.' + ); + $exception->setMock($this->_expectation->getMock()) + ->setMethodName((string) $this->_expectation) + ->setExpectedCountComparative('<=') + ->setExpectedCount($this->_limit) + ->setActualCount($n); + throw $exception; + } + } +} diff --git a/vendor/mockery/mockery/library/Mockery/CountValidator/CountValidatorAbstract.php b/vendor/mockery/mockery/library/Mockery/CountValidator/CountValidatorAbstract.php new file mode 100644 index 0000000..b35a7ce --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/CountValidator/CountValidatorAbstract.php @@ -0,0 +1,70 @@ +_expectation = $expectation; + $this->_limit = $limit; + } + + /** + * Checks if the validator can accept an additional nth call + * + * @param int $n + * @return bool + */ + public function isEligible($n) + { + return ($n < $this->_limit); + } + + /** + * Validate the call count against this validator + * + * @param int $n + * @return bool + */ + abstract public function validate($n); +} diff --git a/vendor/mockery/mockery/library/Mockery/CountValidator/Exact.php b/vendor/mockery/mockery/library/Mockery/CountValidator/Exact.php new file mode 100644 index 0000000..7e3948c --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/CountValidator/Exact.php @@ -0,0 +1,52 @@ +_limit !== $n) { + $exception = new Mockery\Exception\InvalidCountException( + 'Method ' . (string) $this->_expectation + . ' from ' . $this->_expectation->getMock()->mockery_getName() + . ' should be called' . PHP_EOL + . ' exactly ' . $this->_limit . ' times but called ' . $n + . ' times.' + ); + $exception->setMock($this->_expectation->getMock()) + ->setMethodName((string) $this->_expectation) + ->setExpectedCountComparative('=') + ->setExpectedCount($this->_limit) + ->setActualCount($n); + throw $exception; + } + } +} diff --git a/vendor/mockery/mockery/library/Mockery/CountValidator/Exception.php b/vendor/mockery/mockery/library/Mockery/CountValidator/Exception.php new file mode 100644 index 0000000..65126dd --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/CountValidator/Exception.php @@ -0,0 +1,25 @@ +mockObject = $mock; + return $this; + } + + public function setMethodName($name) + { + $this->method = $name; + return $this; + } + + public function setActualCount($count) + { + $this->actual = $count; + return $this; + } + + public function setExpectedCount($count) + { + $this->expected = $count; + return $this; + } + + public function setExpectedCountComparative($comp) + { + if (!in_array($comp, array('=', '>', '<', '>=', '<='))) { + throw new RuntimeException( + 'Illegal comparative for expected call counts set: ' . $comp + ); + } + $this->expectedComparative = $comp; + return $this; + } + + public function getMock() + { + return $this->mockObject; + } + + public function getMethodName() + { + return $this->method; + } + + public function getActualCount() + { + return $this->actual; + } + + public function getExpectedCount() + { + return $this->expected; + } + + public function getMockName() + { + return $this->getMock()->mockery_getName(); + } + + public function getExpectedCountComparative() + { + return $this->expectedComparative; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Exception/InvalidOrderException.php b/vendor/mockery/mockery/library/Mockery/Exception/InvalidOrderException.php new file mode 100644 index 0000000..418372c --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Exception/InvalidOrderException.php @@ -0,0 +1,84 @@ +mockObject = $mock; + return $this; + } + + public function setMethodName($name) + { + $this->method = $name; + return $this; + } + + public function setActualOrder($count) + { + $this->actual = $count; + return $this; + } + + public function setExpectedOrder($count) + { + $this->expected = $count; + return $this; + } + + public function getMock() + { + return $this->mockObject; + } + + public function getMethodName() + { + return $this->method; + } + + public function getActualOrder() + { + return $this->actual; + } + + public function getExpectedOrder() + { + return $this->expected; + } + + public function getMockName() + { + return $this->getMock()->mockery_getName(); + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Exception/NoMatchingExpectationException.php b/vendor/mockery/mockery/library/Mockery/Exception/NoMatchingExpectationException.php new file mode 100644 index 0000000..8476b59 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Exception/NoMatchingExpectationException.php @@ -0,0 +1,71 @@ +mockObject = $mock; + return $this; + } + + public function setMethodName($name) + { + $this->method = $name; + return $this; + } + + public function setActualArguments($count) + { + $this->actual = $count; + return $this; + } + + public function getMock() + { + return $this->mockObject; + } + + public function getMethodName() + { + return $this->method; + } + + public function getActualArguments() + { + return $this->actual; + } + + public function getMockName() + { + return $this->getMock()->mockery_getName(); + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Exception/RuntimeException.php b/vendor/mockery/mockery/library/Mockery/Exception/RuntimeException.php new file mode 100644 index 0000000..323b33d --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Exception/RuntimeException.php @@ -0,0 +1,25 @@ +_mock = $mock; + $this->_name = $name; + } + + /** + * Return a string with the method name and arguments formatted + * + * @param string $name Name of the expected method + * @param array $args List of arguments to the method + * @return string + */ + public function __toString() + { + return \Mockery::formatArgs($this->_name, $this->_expectedArgs); + } + + /** + * Verify the current call, i.e. that the given arguments match those + * of this expectation + * + * @param array $args + * @return mixed + */ + public function verifyCall(array $args) + { + $this->validateOrder(); + $this->_actualCount++; + if (true === $this->_passthru) { + return $this->_mock->mockery_callSubjectMethod($this->_name, $args); + } + $return = $this->_getReturnValue($args); + if ($return instanceof \Exception && $this->_throw === true) { + throw $return; + } + $this->_setValues(); + return $return; + } + + /** + * Sets public properties with queued values to the mock object + * + * @param array $args + * @return mixed + */ + protected function _setValues() + { + foreach ($this->_setQueue as $name => &$values) { + if (count($values) > 0) { + $value = array_shift($values); + $this->_mock->{$name} = $value; + } + } + } + + /** + * Fetch the return value for the matching args + * + * @param array $args + * @return mixed + */ + protected function _getReturnValue(array $args) + { + if (count($this->_closureQueue) > 1) { + return call_user_func_array(array_shift($this->_closureQueue), $args); + } elseif (count($this->_closureQueue) > 0) { + return call_user_func_array(current($this->_closureQueue), $args); + } elseif (count($this->_returnQueue) > 1) { + return array_shift($this->_returnQueue); + } elseif (count($this->_returnQueue) > 0) { + return current($this->_returnQueue); + } + + $rm = $this->_mock->mockery_getMethod($this->_name); + if ($rm && version_compare(PHP_VERSION, '7.0.0-dev') >= 0 && $rm->hasReturnType()) { + $type = (string) $rm->getReturnType(); + switch ($type) { + case '': return; + case 'void': return; + case 'string': return ''; + case 'int': return 0; + case 'float': return 0.0; + case 'bool': return false; + case 'array': return array(); + + case 'callable': + case 'Closure': + return function () {}; + + case 'Traversable': + case 'Generator': + // Remove eval() when minimum version >=5.5 + $generator = eval('return function () { yield; };'); + return $generator(); + + default: + return \Mockery::mock($type); + } + } + } + + /** + * Checks if this expectation is eligible for additional calls + * + * @return bool + */ + public function isEligible() + { + foreach ($this->_countValidators as $validator) { + if (!$validator->isEligible($this->_actualCount)) { + return false; + } + } + return true; + } + + /** + * Check if there is a constraint on call count + * + * @return bool + */ + public function isCallCountConstrained() + { + return (count($this->_countValidators) > 0); + } + + /** + * Verify call order + * + * @return void + */ + public function validateOrder() + { + if ($this->_orderNumber) { + $this->_mock->mockery_validateOrder((string) $this, $this->_orderNumber, $this->_mock); + } + if ($this->_globalOrderNumber) { + $this->_mock->mockery_getContainer() + ->mockery_validateOrder((string) $this, $this->_globalOrderNumber, $this->_mock); + } + } + + /** + * Verify this expectation + * + * @return bool + */ + public function verify() + { + foreach ($this->_countValidators as $validator) { + $validator->validate($this->_actualCount); + } + } + + /** + * Check if passed arguments match an argument expectation + * + * @param array $args + * @return bool + */ + public function matchArgs(array $args) + { + if (empty($this->_expectedArgs) && !$this->_noArgsExpectation) { + return true; + } + if (count($args) !== count($this->_expectedArgs)) { + return false; + } + $argCount = count($args); + for ($i=0; $i<$argCount; $i++) { + $param =& $args[$i]; + if (!$this->_matchArg($this->_expectedArgs[$i], $param)) { + return false; + } + } + + return true; + } + + /** + * Check if passed argument matches an argument expectation + * + * @param array $args + * @return bool + */ + protected function _matchArg($expected, &$actual) + { + if ($expected === $actual) { + return true; + } + if (!is_object($expected) && !is_object($actual) && $expected == $actual) { + return true; + } + 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 () {}); + $result = preg_match($expected, (string) $actual); + restore_error_handler(); + + if ($result) { + return true; + } + } + if (is_string($expected) && is_object($actual)) { + $result = $actual instanceof $expected; + if ($result) { + return true; + } + } + if ($expected instanceof \Mockery\Matcher\MatcherAbstract) { + return $expected->match($actual); + } + if (is_a($expected, '\Hamcrest\Matcher') || is_a($expected, '\Hamcrest_Matcher')) { + return $expected->matches($actual); + } + return false; + } + + /** + * Expected argument setter for the expectation + * + * @param mixed ... + * @return self + */ + public function with() + { + return $this->withArgs(func_get_args()); + } + + /** + * Expected arguments for the expectation passed as an array + * + * @param array $args + * @return self + */ + public function withArgs(array $args) + { + if (empty($args)) { + return $this->withNoArgs(); + } + $this->_expectedArgs = $args; + $this->_noArgsExpectation = false; + return $this; + } + + /** + * Set with() as no arguments expected + * + * @return self + */ + public function withNoArgs() + { + $this->_noArgsExpectation = true; + $this->_expectedArgs = null; + return $this; + } + + /** + * Set expectation that any arguments are acceptable + * + * @return self + */ + public function withAnyArgs() + { + $this->_expectedArgs = array(); + return $this; + } + + /** + * Set a return value, or sequential queue of return values + * + * @param mixed ... + * @return self + */ + public function andReturn() + { + $this->_returnQueue = func_get_args(); + return $this; + } + + /** + * Return this mock, like a fluent interface + * + * @return self + */ + public function andReturnSelf() + { + return $this->andReturn($this->_mock); + } + + /** + * Set a sequential queue of return values with an array + * + * @param array $values + * @return self + */ + public function andReturnValues(array $values) + { + call_user_func_array(array($this, 'andReturn'), $values); + return $this; + } + + /** + * Set a closure or sequence of closures with which to generate return + * values. The arguments passed to the expected method are passed to the + * closures as parameters. + * + * @param callable ... + * @return self + */ + public function andReturnUsing() + { + $this->_closureQueue = func_get_args(); + return $this; + } + + /** + * Return a self-returning black hole object. + * + * @return self + */ + public function andReturnUndefined() + { + $this->andReturn(new \Mockery\Undefined); + return $this; + } + + /** + * Return null. This is merely a language construct for Mock describing. + * + * @return self + */ + public function andReturnNull() + { + return $this; + } + + /** + * Set Exception class and arguments to that class to be thrown + * + * @param string $exception + * @param string $message + * @param int $code + * @param Exception $previous + * @return self + */ + public function andThrow($exception, $message = '', $code = 0, \Exception $previous = null) + { + $this->_throw = true; + if (is_object($exception)) { + $this->andReturn($exception); + } else { + $this->andReturn(new $exception($message, $code, $previous)); + } + return $this; + } + + /** + * Set Exception classes to be thrown + * + * @param array $exceptions + * @return self + */ + public function andThrowExceptions(array $exceptions) + { + $this->_throw = true; + foreach ($exceptions as $exception) { + if (!is_object($exception)) { + throw new Exception('You must pass an array of exception objects to andThrowExceptions'); + } + } + return $this->andReturnValues($exceptions); + } + + /** + * Register values to be set to a public property each time this expectation occurs + * + * @param string $name + * @param mixed $value + * @return self + */ + public function andSet($name, $value) + { + $values = func_get_args(); + array_shift($values); + $this->_setQueue[$name] = $values; + return $this; + } + + /** + * Alias to andSet(). Allows the natural English construct + * - set('foo', 'bar')->andReturn('bar') + * + * @param string $name + * @param mixed $value + * @return self + */ + public function set($name, $value) + { + return call_user_func_array(array($this, 'andSet'), func_get_args()); + } + + /** + * Indicates this expectation should occur zero or more times + * + * @return self + */ + public function zeroOrMoreTimes() + { + $this->atLeast()->never(); + } + + /** + * Indicates the number of times this expectation should occur + * + * @param int $limit + * @return self + */ + public function times($limit = null) + { + if (is_null($limit)) { + return $this; + } + $this->_countValidators[] = new $this->_countValidatorClass($this, $limit); + $this->_countValidatorClass = 'Mockery\CountValidator\Exact'; + return $this; + } + + /** + * Indicates that this expectation is never expected to be called + * + * @return self + */ + public function never() + { + return $this->times(0); + } + + /** + * Indicates that this expectation is expected exactly once + * + * @return self + */ + public function once() + { + return $this->times(1); + } + + /** + * Indicates that this expectation is expected exactly twice + * + * @return self + */ + public function twice() + { + return $this->times(2); + } + + /** + * Sets next count validator to the AtLeast instance + * + * @return self + */ + public function atLeast() + { + $this->_countValidatorClass = 'Mockery\CountValidator\AtLeast'; + return $this; + } + + /** + * Sets next count validator to the AtMost instance + * + * @return self + */ + public function atMost() + { + $this->_countValidatorClass = 'Mockery\CountValidator\AtMost'; + return $this; + } + + /** + * Shorthand for setting minimum and maximum constraints on call counts + * + * @param int $minimum + * @param int $maximum + */ + public function between($minimum, $maximum) + { + return $this->atLeast()->times($minimum)->atMost()->times($maximum); + } + + /** + * Indicates that this expectation must be called in a specific given order + * + * @param string $group Name of the ordered group + * @return self + */ + public function ordered($group = null) + { + if ($this->_globally) { + $this->_globalOrderNumber = $this->_defineOrdered($group, $this->_mock->mockery_getContainer()); + } else { + $this->_orderNumber = $this->_defineOrdered($group, $this->_mock); + } + $this->_globally = false; + return $this; + } + + /** + * Indicates call order should apply globally + * + * @return self + */ + public function globally() + { + $this->_globally = true; + return $this; + } + + /** + * Setup the ordering tracking on the mock or mock container + * + * @param string $group + * @param object $ordering + * @return int + */ + protected function _defineOrdered($group, $ordering) + { + $groups = $ordering->mockery_getGroups(); + if (is_null($group)) { + $result = $ordering->mockery_allocateOrder(); + } elseif (isset($groups[$group])) { + $result = $groups[$group]; + } else { + $result = $ordering->mockery_allocateOrder(); + $ordering->mockery_setGroup($group, $result); + } + return $result; + } + + /** + * Return order number + * + * @return int + */ + public function getOrderNumber() + { + return $this->_orderNumber; + } + + /** + * Mark this expectation as being a default + * + * @return self + */ + public function byDefault() + { + $director = $this->_mock->mockery_getExpectationsFor($this->_name); + if (!empty($director)) { + $director->makeExpectationDefault($this); + } + return $this; + } + + /** + * Return the parent mock of the expectation + * + * @return \Mockery\MockInterface + */ + public function getMock() + { + return $this->_mock; + } + + /** + * Flag this expectation as calling the original class method with the + * any provided arguments instead of using a return value queue. + * + * @return self + */ + public function passthru() + { + if ($this->_mock instanceof Mock) { + throw new Exception( + 'Mock Objects not created from a loaded/existing class are ' + . 'incapable of passing method calls through to a parent class' + ); + } + $this->_passthru = true; + return $this; + } + + /** + * Cloning logic + * + */ + public function __clone() + { + $newValidators = array(); + $countValidators = $this->_countValidators; + foreach ($countValidators as $validator) { + $newValidators[] = clone $validator; + } + $this->_countValidators = $newValidators; + } + + public function getName() + { + return $this->_name; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/ExpectationDirector.php b/vendor/mockery/mockery/library/Mockery/ExpectationDirector.php new file mode 100644 index 0000000..b5c894d --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/ExpectationDirector.php @@ -0,0 +1,203 @@ +_name = $name; + $this->_mock = $mock; + } + + /** + * Add a new expectation to the director + * + * @param Mutateme\Expectation $expectation + */ + public function addExpectation(\Mockery\Expectation $expectation) + { + $this->_expectations[] = $expectation; + } + + /** + * Handle a method call being directed by this instance + * + * @param array $args + * @return mixed + */ + public function call(array $args) + { + $expectation = $this->findExpectation($args); + if (is_null($expectation)) { + $exception = new \Mockery\Exception\NoMatchingExpectationException( + 'No matching handler found for ' + . $this->_mock->mockery_getName() . '::' + . \Mockery::formatArgs($this->_name, $args) + . '. Either the method was unexpected or its arguments matched' + . ' no expected argument list for this method' + . PHP_EOL . PHP_EOL + . \Mockery::formatObjects($args) + ); + $exception->setMock($this->_mock) + ->setMethodName($this->_name) + ->setActualArguments($args); + throw $exception; + } + return $expectation->verifyCall($args); + } + + /** + * Verify all expectations of the director + * + * @throws \Mockery\CountValidator\Exception + * @return void + */ + public function verify() + { + if (!empty($this->_expectations)) { + foreach ($this->_expectations as $exp) { + $exp->verify(); + } + } else { + foreach ($this->_defaults as $exp) { + $exp->verify(); + } + } + } + + /** + * Attempt to locate an expectation matching the provided args + * + * @param array $args + * @return mixed + */ + public function findExpectation(array $args) + { + if (!empty($this->_expectations)) { + return $this->_findExpectationIn($this->_expectations, $args); + } else { + return $this->_findExpectationIn($this->_defaults, $args); + } + } + + /** + * Make the given expectation a default for all others assuming it was + * correctly created last + * + * @param \Mockery\Expectation + */ + public function makeExpectationDefault(\Mockery\Expectation $expectation) + { + $last = end($this->_expectations); + if ($last === $expectation) { + array_pop($this->_expectations); + array_unshift($this->_defaults, $expectation); + } else { + throw new \Mockery\Exception( + 'Cannot turn a previously defined expectation into a default' + ); + } + } + + /** + * Search current array of expectations for a match + * + * @param array $expectations + * @param array $args + * @return mixed + */ + protected function _findExpectationIn(array $expectations, array $args) + { + foreach ($expectations as $exp) { + if ($exp->matchArgs($args) && $exp->isEligible()) { + return $exp; + } + } + foreach ($expectations as $exp) { + if ($exp->matchArgs($args)) { + return $exp; + } + } + } + + /** + * Return all expectations assigned to this director + * + * @return array + */ + public function getExpectations() + { + return $this->_expectations; + } + + /** + * Return the number of expectations assigned to this director. + * + * @return int + */ + public function getExpectationCount() + { + return count($this->getExpectations()); + } +} diff --git a/vendor/mockery/mockery/library/Mockery/ExpectationInterface.php b/vendor/mockery/mockery/library/Mockery/ExpectationInterface.php new file mode 100644 index 0000000..a5b4660 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/ExpectationInterface.php @@ -0,0 +1,39 @@ +generator = $generator; + } + + public function generate(MockConfiguration $config) + { + $hash = $config->getHash(); + if (isset($this->cache[$hash])) { + return $this->cache[$hash]; + } + + $definition = $this->generator->generate($config); + $this->cache[$hash] = $definition; + + return $definition; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Generator/DefinedTargetClass.php b/vendor/mockery/mockery/library/Mockery/Generator/DefinedTargetClass.php new file mode 100644 index 0000000..2c0ab96 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Generator/DefinedTargetClass.php @@ -0,0 +1,90 @@ +rfc = $rfc; + } + + public static function factory($name) + { + return new self(new \ReflectionClass($name)); + } + + public function getName() + { + return $this->rfc->getName(); + } + + public function isAbstract() + { + return $this->rfc->isAbstract(); + } + + public function isFinal() + { + return $this->rfc->isFinal(); + } + + public function getMethods() + { + return array_map(function ($method) { + return new Method($method); + }, $this->rfc->getMethods()); + } + + public function getInterfaces() + { + $class = __CLASS__; + return array_map(function ($interface) use ($class) { + return new $class($interface); + }, $this->rfc->getInterfaces()); + } + + public function __toString() + { + return $this->getName(); + } + + public function getNamespaceName() + { + return $this->rfc->getNamespaceName(); + } + + public function inNamespace() + { + return $this->rfc->inNamespace(); + } + + public function getShortName() + { + return $this->rfc->getShortName(); + } + + public function implementsInterface($interface) + { + return $this->rfc->implementsInterface($interface); + } + + public function hasInternalAncestor() + { + if ($this->rfc->isInternal()) { + return true; + } + + $child = $this->rfc; + while ($parent = $child->getParentClass()) { + if ($parent->isInternal()) { + return true; + } + $child = $parent; + } + + return false; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Generator/Generator.php b/vendor/mockery/mockery/library/Mockery/Generator/Generator.php new file mode 100644 index 0000000..5c5d0d3 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Generator/Generator.php @@ -0,0 +1,9 @@ +method = $method; + } + + public function __call($method, $args) + { + return call_user_func_array(array($this->method, $method), $args); + } + + public function getParameters() + { + return array_map(function ($parameter) { + return new Parameter($parameter); + }, $this->method->getParameters()); + } + + public function getReturnType() + { + if (version_compare(PHP_VERSION, '7.0.0-dev') >= 0 && $this->method->hasReturnType()) { + $returnType = (string) $this->method->getReturnType(); + + if ('self' === $returnType) { + $returnType = "\\".$this->method->getDeclaringClass()->getName(); + } + + if (version_compare(PHP_VERSION, '7.1.0-dev') >= 0 && $this->method->getReturnType()->allowsNull()) { + $returnType = '?'.$returnType; + } + + return $returnType; + } + return ''; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Generator/MockConfiguration.php b/vendor/mockery/mockery/library/Mockery/Generator/MockConfiguration.php new file mode 100644 index 0000000..27aa5bd --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Generator/MockConfiguration.php @@ -0,0 +1,460 @@ +addTargets($targets); + $this->blackListedMethods = $blackListedMethods; + $this->whiteListedMethods = $whiteListedMethods; + $this->name = $name; + $this->instanceMock = $instanceMock; + $this->parameterOverrides = $parameterOverrides; + } + + /** + * Attempt to create a hash of the configuration, in order to allow caching + * + * @TODO workout if this will work + * + * @return string + */ + public function getHash() + { + $vars = array( + 'targetClassName' => $this->targetClassName, + 'targetInterfaceNames' => $this->targetInterfaceNames, + 'name' => $this->name, + 'blackListedMethods' => $this->blackListedMethods, + 'whiteListedMethod' => $this->whiteListedMethods, + 'instanceMock' => $this->instanceMock, + 'parameterOverrides' => $this->parameterOverrides, + ); + + return md5(serialize($vars)); + } + + /** + * Gets a list of methods from the classes, interfaces and objects and + * filters them appropriately. Lot's of filtering going on, perhaps we could + * have filter classes to iterate through + */ + public function getMethodsToMock() + { + $methods = $this->getAllMethods(); + + foreach ($methods as $key => $method) { + if ($method->isFinal()) { + unset($methods[$key]); + } + } + + /** + * Whitelist trumps everything else + */ + if (count($this->getWhiteListedMethods())) { + $whitelist = array_map('strtolower', $this->getWhiteListedMethods()); + $methods = array_filter($methods, function ($method) use ($whitelist) { + return $method->isAbstract() || in_array(strtolower($method->getName()), $whitelist); + }); + + return $methods; + } + + /** + * Remove blacklisted methods + */ + if (count($this->getBlackListedMethods())) { + $blacklist = array_map('strtolower', $this->getBlackListedMethods()); + $methods = array_filter($methods, function ($method) use ($blacklist) { + return !in_array(strtolower($method->getName()), $blacklist); + }); + } + + /** + * Internal objects can not be instantiated with newInstanceArgs and if + * they implement Serializable, unserialize will have to be called. As + * such, we can't mock it and will need a pass to add a dummy + * implementation + */ + if ($this->getTargetClass() + && $this->getTargetClass()->implementsInterface("Serializable") + && $this->getTargetClass()->hasInternalAncestor()) { + $methods = array_filter($methods, function ($method) { + return $method->getName() !== "unserialize"; + }); + } + + return array_values($methods); + } + + /** + * We declare the __call method to handle undefined stuff, if the class + * we're mocking has also defined it, we need to comply with their interface + */ + public function requiresCallTypeHintRemoval() + { + foreach ($this->getAllMethods() as $method) { + if ("__call" === $method->getName()) { + $params = $method->getParameters(); + return !$params[1]->isArray(); + } + } + + return false; + } + + /** + * We declare the __callStatic method to handle undefined stuff, if the class + * we're mocking has also defined it, we need to comply with their interface + */ + public function requiresCallStaticTypeHintRemoval() + { + foreach ($this->getAllMethods() as $method) { + if ("__callStatic" === $method->getName()) { + $params = $method->getParameters(); + return !$params[1]->isArray(); + } + } + + return false; + } + + public function rename($className) + { + $targets = array(); + + if ($this->targetClassName) { + $targets[] = $this->targetClassName; + } + + if ($this->targetInterfaceNames) { + $targets = array_merge($targets, $this->targetInterfaceNames); + } + + if ($this->targetObject) { + $targets[] = $this->targetObject; + } + + return new self( + $targets, + $this->blackListedMethods, + $this->whiteListedMethods, + $className, + $this->instanceMock, + $this->parameterOverrides + ); + } + + protected function addTarget($target) + { + if (is_object($target)) { + $this->setTargetObject($target); + $this->setTargetClassName(get_class($target)); + return $this; + } + + if ($target[0] !== "\\") { + $target = "\\" . $target; + } + + if (class_exists($target)) { + $this->setTargetClassName($target); + return $this; + } + + if (interface_exists($target)) { + $this->addTargetInterfaceName($target); + return $this; + } + + /** + * Default is to set as class, or interface if class already set + * + * Don't like this condition, can't remember what the default + * targetClass is for + */ + if ($this->getTargetClassName()) { + $this->addTargetInterfaceName($target); + return $this; + } + + $this->setTargetClassName($target); + } + + protected function addTargets($interfaces) + { + foreach ($interfaces as $interface) { + $this->addTarget($interface); + } + } + + public function getTargetClassName() + { + return $this->targetClassName; + } + + public function getTargetClass() + { + if ($this->targetClass) { + return $this->targetClass; + } + + if (!$this->targetClassName) { + return null; + } + + if (class_exists($this->targetClassName)) { + $dtc = DefinedTargetClass::factory($this->targetClassName); + + if ($this->getTargetObject() == false && $dtc->isFinal()) { + throw new \Mockery\Exception( + 'The class ' . $this->targetClassName . ' is marked final and its methods' + . ' cannot be replaced. Classes marked final can be passed in' + . ' to \Mockery::mock() as instantiated objects to create a' + . ' partial mock, but only if the mock is not subject to type' + . ' hinting checks.' + ); + } + + $this->targetClass = $dtc; + } else { + $this->targetClass = new UndefinedTargetClass($this->targetClassName); + } + + return $this->targetClass; + } + + public function getTargetInterfaces() + { + if (!empty($this->targetInterfaces)) { + return $this->targetInterfaces; + } + + foreach ($this->targetInterfaceNames as $targetInterface) { + if (!interface_exists($targetInterface)) { + $this->targetInterfaces[] = new UndefinedTargetClass($targetInterface); + return; + } + + $dtc = DefinedTargetClass::factory($targetInterface); + $extendedInterfaces = array_keys($dtc->getInterfaces()); + $extendedInterfaces[] = $targetInterface; + + $traversableFound = false; + $iteratorShiftedToFront = false; + foreach ($extendedInterfaces as $interface) { + if (!$traversableFound && preg_match("/^\\?Iterator(|Aggregate)$/i", $interface)) { + break; + } + + if (preg_match("/^\\\\?IteratorAggregate$/i", $interface)) { + $this->targetInterfaces[] = DefinedTargetClass::factory("\\IteratorAggregate"); + $iteratorShiftedToFront = true; + } elseif (preg_match("/^\\\\?Iterator$/i", $interface)) { + $this->targetInterfaces[] = DefinedTargetClass::factory("\\Iterator"); + $iteratorShiftedToFront = true; + } elseif (preg_match("/^\\\\?Traversable$/i", $interface)) { + $traversableFound = true; + } + } + + if ($traversableFound && !$iteratorShiftedToFront) { + $this->targetInterfaces[] = DefinedTargetClass::factory("\\IteratorAggregate"); + } + + /** + * We never straight up implement Traversable + */ + if (!preg_match("/^\\\\?Traversable$/i", $targetInterface)) { + $this->targetInterfaces[] = $dtc; + } + } + $this->targetInterfaces = array_unique($this->targetInterfaces); // just in case + return $this->targetInterfaces; + } + + public function getTargetObject() + { + return $this->targetObject; + } + + public function getName() + { + return $this->name; + } + + /** + * Generate a suitable name based on the config + */ + public function generateName() + { + $name = 'Mockery_' . static::$mockCounter++; + + if ($this->getTargetObject()) { + $name .= "_" . str_replace("\\", "_", get_class($this->getTargetObject())); + } + + if ($this->getTargetClass()) { + $name .= "_" . str_replace("\\", "_", $this->getTargetClass()->getName()); + } + + if ($this->getTargetInterfaces()) { + $name .= array_reduce($this->getTargetInterfaces(), function ($tmpname, $i) { + $tmpname .= '_' . str_replace("\\", "_", $i->getName()); + return $tmpname; + }, ''); + } + + return $name; + } + + public function getShortName() + { + $parts = explode("\\", $this->getName()); + return array_pop($parts); + } + + public function getNamespaceName() + { + $parts = explode("\\", $this->getName()); + array_pop($parts); + + if (count($parts)) { + return implode("\\", $parts); + } + + return ""; + } + + public function getBlackListedMethods() + { + return $this->blackListedMethods; + } + + public function getWhiteListedMethods() + { + return $this->whiteListedMethods; + } + + public function isInstanceMock() + { + return $this->instanceMock; + } + + public function getParameterOverrides() + { + return $this->parameterOverrides; + } + + protected function setTargetClassName($targetClassName) + { + $this->targetClassName = $targetClassName; + } + + protected function getAllMethods() + { + if ($this->allMethods) { + return $this->allMethods; + } + + $classes = $this->getTargetInterfaces(); + + if ($this->getTargetClass()) { + $classes[] = $this->getTargetClass(); + } + + $methods = array(); + foreach ($classes as $class) { + $methods = array_merge($methods, $class->getMethods()); + } + + $names = array(); + $methods = array_filter($methods, function ($method) use (&$names) { + if (in_array($method->getName(), $names)) { + return false; + } + + $names[] = $method->getName(); + return true; + }); + + return $this->allMethods = $methods; + } + + /** + * If we attempt to implement Traversable, we must ensure we are also + * implementing either Iterator or IteratorAggregate, and that whichever one + * it is comes before Traversable in the list of implements. + */ + protected function addTargetInterfaceName($targetInterface) + { + $this->targetInterfaceNames[] = $targetInterface; + } + + + protected function setTargetObject($object) + { + $this->targetObject = $object; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Generator/MockConfigurationBuilder.php b/vendor/mockery/mockery/library/Mockery/Generator/MockConfigurationBuilder.php new file mode 100644 index 0000000..1a7512e --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Generator/MockConfigurationBuilder.php @@ -0,0 +1,124 @@ +targets[] = $target; + + return $this; + } + + public function addTargets($targets) + { + foreach ($targets as $target) { + $this->addTarget($target); + } + + return $this; + } + + public function setName($name) + { + $this->name = $name; + return $this; + } + + public function addBlackListedMethod($blackListedMethod) + { + $this->blackListedMethods[] = $blackListedMethod; + return $this; + } + + public function addBlackListedMethods(array $blackListedMethods) + { + foreach ($blackListedMethods as $method) { + $this->addBlackListedMethod($method); + } + return $this; + } + + public function setBlackListedMethods(array $blackListedMethods) + { + $this->blackListedMethods = $blackListedMethods; + return $this; + } + + public function addWhiteListedMethod($whiteListedMethod) + { + $this->whiteListedMethods[] = $whiteListedMethod; + return $this; + } + + public function addWhiteListedMethods(array $whiteListedMethods) + { + foreach ($whiteListedMethods as $method) { + $this->addWhiteListedMethod($method); + } + return $this; + } + + public function setWhiteListedMethods(array $whiteListedMethods) + { + $this->whiteListedMethods = $whiteListedMethods; + return $this; + } + + public function setInstanceMock($instanceMock) + { + $this->instanceMock = (bool) $instanceMock; + } + + public function setParameterOverrides(array $overrides) + { + $this->parameterOverrides = $overrides; + } + + public function getMockConfiguration() + { + return new MockConfiguration( + $this->targets, + $this->blackListedMethods, + $this->whiteListedMethods, + $this->name, + $this->instanceMock, + $this->parameterOverrides + ); + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Generator/MockDefinition.php b/vendor/mockery/mockery/library/Mockery/Generator/MockDefinition.php new file mode 100644 index 0000000..29c8e20 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Generator/MockDefinition.php @@ -0,0 +1,33 @@ +getName()) { + throw new \InvalidArgumentException("MockConfiguration must contain a name"); + } + $this->config = $config; + $this->code = $code; + } + + public function getConfig() + { + return $this->config; + } + + public function getClassName() + { + return $this->config->getName(); + } + + public function getCode() + { + return $this->code; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Generator/Parameter.php b/vendor/mockery/mockery/library/Mockery/Generator/Parameter.php new file mode 100644 index 0000000..4e08710 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Generator/Parameter.php @@ -0,0 +1,101 @@ +rfp = $rfp; + } + + public function __call($method, array $args) + { + return call_user_func_array(array($this->rfp, $method), $args); + } + + public function getClass() + { + return new DefinedTargetClass($this->rfp->getClass()); + } + + public function getTypeHintAsString() + { + if (method_exists($this->rfp, 'getTypehintText')) { + // Available in HHVM + $typehint = $this->rfp->getTypehintText(); + + // not exhaustive, but will do for now + if (in_array($typehint, array('int', 'integer', 'float', 'string', 'bool', 'boolean'))) { + return ''; + } + + return $typehint; + } + + if ($this->rfp->isArray()) { + return 'array'; + } + + /* + * PHP < 5.4.1 has some strange behaviour with a typehint of self and + * subclass signatures, so we risk the regexp instead + */ + if ((version_compare(PHP_VERSION, '5.4.1') >= 0)) { + try { + if ($this->rfp->getClass()) { + return $this->getOptionalSign() . $this->rfp->getClass()->getName(); + } + } catch (\ReflectionException $re) { + // noop + } + } + + if (version_compare(PHP_VERSION, '7.0.0-dev') >= 0 && $this->rfp->hasType()) { + return $this->getOptionalSign() . $this->rfp->getType(); + } + + if (preg_match('/^Parameter #[0-9]+ \[ \<(required|optional)\> (?\S+ )?.*\$' . $this->rfp->getName() . ' .*\]$/', $this->rfp->__toString(), $typehintMatch)) { + if (!empty($typehintMatch['typehint'])) { + return $typehintMatch['typehint']; + } + } + + return ''; + } + + private function getOptionalSign() + { + if (version_compare(PHP_VERSION, '7.1.0-dev', '>=') && $this->rfp->allowsNull() && !$this->rfp->isVariadic()) { + return '?'; + } + + return ''; + } + + /** + * Some internal classes have funny looking definitions... + */ + public function getName() + { + $name = $this->rfp->getName(); + if (!$name || $name == '...') { + $name = 'arg' . static::$parameterCounter++; + } + + return $name; + } + + + /** + * Variadics only introduced in 5.6 + */ + public function isVariadic() + { + return version_compare(PHP_VERSION, '5.6.0') >= 0 && $this->rfp->isVariadic(); + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/CallTypeHintPass.php b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/CallTypeHintPass.php new file mode 100644 index 0000000..4341486 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/CallTypeHintPass.php @@ -0,0 +1,29 @@ +requiresCallTypeHintRemoval()) { + $code = str_replace( + 'public function __call($method, array $args)', + 'public function __call($method, $args)', + $code + ); + } + + if ($config->requiresCallStaticTypeHintRemoval()) { + $code = str_replace( + 'public static function __callStatic($method, array $args)', + 'public static function __callStatic($method, $args)', + $code + ); + } + + return $code; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/ClassNamePass.php b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/ClassNamePass.php new file mode 100644 index 0000000..d8ec67f --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/ClassNamePass.php @@ -0,0 +1,31 @@ +getNamespaceName(); + + $namespace = ltrim($namespace, "\\"); + + $className = $config->getShortName(); + + $code = str_replace( + 'namespace Mockery;', + $namespace ? 'namespace ' . $namespace . ';' : '', + $code + ); + + $code = str_replace( + 'class Mock', + 'class ' . $className, + $code + ); + + return $code; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/ClassPass.php b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/ClassPass.php new file mode 100644 index 0000000..b1a9750 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/ClassPass.php @@ -0,0 +1,50 @@ +getTargetClass(); + + if (!$target) { + return $code; + } + + if ($target->isFinal()) { + return $code; + } + + $className = ltrim($target->getName(), "\\"); + if (!class_exists($className)) { + $targetCode = 'inNamespace()) { + $targetCode.= 'namespace ' . $target->getNamespaceName(). '; '; + } + + $targetCode.= 'class ' . $target->getShortName() . ' {} '; + + /* + * We could eval here, but it doesn't play well with the way + * PHPUnit tries to backup global state and the require definition + * loader + */ + $tmpfname = tempnam(sys_get_temp_dir(), "Mockery"); + file_put_contents($tmpfname, $targetCode); + require $tmpfname; + \Mockery::registerFileForCleanUp($tmpfname); + } + + $code = str_replace( + "implements MockInterface", + "extends \\" . $className . " implements MockInterface", + $code + ); + + return $code; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/InstanceMockPass.php b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/InstanceMockPass.php new file mode 100644 index 0000000..e3bbf7d --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/InstanceMockPass.php @@ -0,0 +1,57 @@ +_mockery_ignoreVerification = false; + \$associatedRealObject = \Mockery::fetchMock(__CLASS__); + + foreach (get_object_vars(\$this) as \$attr => \$val) { + if (\$attr !== "_mockery_ignoreVerification" && \$attr !== "_mockery_expectations") { + \$this->\$attr = \$associatedRealObject->\$attr; + } + } + + \$directors = \$associatedRealObject->mockery_getExpectations(); + foreach (\$directors as \$method=>\$director) { + \$expectations = \$director->getExpectations(); + // get the director method needed + \$existingDirector = \$this->mockery_getExpectationsFor(\$method); + if (!\$existingDirector) { + \$existingDirector = new \Mockery\ExpectationDirector(\$method, \$this); + \$this->mockery_setExpectationsFor(\$method, \$existingDirector); + } + foreach (\$expectations as \$expectation) { + \$clonedExpectation = clone \$expectation; + \$existingDirector->addExpectation(\$clonedExpectation); + } + } + \Mockery::getContainer()->rememberMock(\$this); + } +MOCK; + + public function apply($code, MockConfiguration $config) + { + if ($config->isInstanceMock()) { + $code = $this->appendToClass($code, static::INSTANCE_MOCK_CODE); + } + + return $code; + } + + protected function appendToClass($class, $code) + { + $lastBrace = strrpos($class, "}"); + $class = substr($class, 0, $lastBrace) . $code . "\n }\n"; + return $class; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/InterfacePass.php b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/InterfacePass.php new file mode 100644 index 0000000..152c736 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/InterfacePass.php @@ -0,0 +1,23 @@ +getTargetInterfaces(), function ($code, $i) { + return $code . ", \\" . $i->getName(); + }, ""); + + $code = str_replace( + "implements MockInterface", + "implements MockInterface" . $interfaces, + $code + ); + + return $code; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/MethodDefinitionPass.php b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/MethodDefinitionPass.php new file mode 100644 index 0000000..8a4139a --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/MethodDefinitionPass.php @@ -0,0 +1,150 @@ +getMethodsToMock() as $method) { + if ($method->isPublic()) { + $methodDef = 'public'; + } elseif ($method->isProtected()) { + $methodDef = 'protected'; + } else { + $methodDef = 'private'; + } + + if ($method->isStatic()) { + $methodDef .= ' static'; + } + + $methodDef .= ' function '; + $methodDef .= $method->returnsReference() ? ' & ' : ''; + $methodDef .= $method->getName(); + $methodDef .= $this->renderParams($method, $config); + $methodDef .= $this->renderReturnType($method); + $methodDef .= $this->renderMethodBody($method, $config); + + $code = $this->appendToClass($code, $methodDef); + } + + return $code; + } + + protected function renderParams(Method $method, $config) + { + $class = $method->getDeclaringClass(); + if ($class->isInternal()) { + $overrides = $config->getParameterOverrides(); + + if (isset($overrides[strtolower($class->getName())][$method->getName()])) { + return '(' . implode(',', $overrides[strtolower($class->getName())][$method->getName()]) . ')'; + } + } + + $methodParams = array(); + $params = $method->getParameters(); + foreach ($params as $param) { + $paramDef = $param->getTypeHintAsString(); + $paramDef .= $param->isPassedByReference() ? '&' : ''; + $paramDef .= $param->isVariadic() ? '...' : ''; + $paramDef .= '$' . $param->getName(); + + if (!$param->isVariadic()) { + if (false !== $param->isDefaultValueAvailable()) { + $paramDef .= ' = ' . var_export($param->getDefaultValue(), true); + } elseif ($param->isOptional()) { + $paramDef .= ' = null'; + } + } + + $methodParams[] = $paramDef; + } + return '(' . implode(', ', $methodParams) . ')'; + } + + protected function renderReturnType(Method $method) + { + $type = $method->getReturnType(); + return $type ? sprintf(': %s', $type) : ''; + } + + protected function appendToClass($class, $code) + { + $lastBrace = strrpos($class, "}"); + $class = substr($class, 0, $lastBrace) . $code . "\n }\n"; + return $class; + } + + private function renderMethodBody($method, $config) + { + $invoke = $method->isStatic() ? 'static::_mockery_handleStaticMethodCall' : '$this->_mockery_handleMethodCall'; + $body = <<getDeclaringClass(); + $class_name = strtolower($class->getName()); + $overrides = $config->getParameterOverrides(); + if (isset($overrides[$class_name][$method->getName()])) { + $params = array_values($overrides[$class_name][$method->getName()]); + $paramCount = count($params); + for ($i = 0; $i < $paramCount; ++$i) { + $param = $params[$i]; + if (strpos($param, '&') !== false) { + $body .= << $i) { + \$argv[$i] = {$param}; +} + +BODY; + } + } + } else { + $params = array_values($method->getParameters()); + $paramCount = count($params); + for ($i = 0; $i < $paramCount; ++$i) { + $param = $params[$i]; + if (!$param->isPassedByReference()) { + continue; + } + $body .= << $i) { + \$argv[$i] =& \${$param->getName()}; +} + +BODY; + } + } + + $body .= $this->getReturnStatement($method, $invoke); + + return $body; + } + + private function getReturnStatement($method, $invoke) + { + if ($method->getReturnType() === 'void') { + return << '/public function __wakeup\(\)\s+\{.*?\}/sm', + ); + + public function apply($code, MockConfiguration $config) + { + $target = $config->getTargetClass(); + + if (!$target) { + return $code; + } + + foreach ($target->getMethods() as $method) { + if ($method->isFinal() && isset($this->methods[$method->getName()])) { + $code = preg_replace($this->methods[$method->getName()], '', $code); + } + } + + return $code; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/RemoveUnserializeForInternalSerializableClassesPass.php b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/RemoveUnserializeForInternalSerializableClassesPass.php new file mode 100644 index 0000000..ea73180 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/RemoveUnserializeForInternalSerializableClassesPass.php @@ -0,0 +1,40 @@ +getTargetClass(); + + if (!$target) { + return $code; + } + + if (!$target->hasInternalAncestor() || !$target->implementsInterface("Serializable")) { + return $code; + } + + $code = $this->appendToClass($code, self::DUMMY_METHOD_DEFINITION); + + return $code; + } + + protected function appendToClass($class, $code) + { + $lastBrace = strrpos($class, "}"); + $class = substr($class, 0, $lastBrace) . $code . "\n }\n"; + return $class; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulationGenerator.php b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulationGenerator.php new file mode 100644 index 0000000..cbed922 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulationGenerator.php @@ -0,0 +1,34 @@ +passes = $passes; + } + + public function generate(MockConfiguration $config) + { + $code = file_get_contents(__DIR__ . '/../Mock.php'); + $className = $config->getName() ?: $config->generateName(); + + $namedConfig = $config->rename($className); + + foreach ($this->passes as $pass) { + $code = $pass->apply($code, $namedConfig); + } + + return new MockDefinition($namedConfig, $code); + } + + public function addPass(Pass $pass) + { + $this->passes[] = $pass; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Generator/TargetClass.php b/vendor/mockery/mockery/library/Mockery/Generator/TargetClass.php new file mode 100644 index 0000000..46dc198 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Generator/TargetClass.php @@ -0,0 +1,33 @@ +name = $name; + } + + public function getName() + { + return $this->name; + } + + public function isAbstract() + { + return false; + } + + public function isFinal() + { + return false; + } + + public function getMethods() + { + return array(); + } + + public function getNamespaceName() + { + $parts = explode("\\", ltrim($this->getName(), "\\")); + array_pop($parts); + return implode("\\", $parts); + } + + public function inNamespace() + { + return $this->getNamespaceName() !== ''; + } + + public function getShortName() + { + $parts = explode("\\", $this->getName()); + return array_pop($parts); + } + + public function implementsInterface($interface) + { + return false; + } + + public function hasInternalAncestor() + { + return false; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Instantiator.php b/vendor/mockery/mockery/library/Mockery/Instantiator.php new file mode 100644 index 0000000..f396fd8 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Instantiator.php @@ -0,0 +1,214 @@ +. + */ + +namespace Mockery; + +use Closure; +use ReflectionClass; +use UnexpectedValueException; +use InvalidArgumentException; + +/** + * This is a trimmed down version of https://github.com/doctrine/instantiator, + * basically without the caching + * + * @author Marco Pivetta + */ +final class Instantiator +{ + /** + * 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. + */ + const SERIALIZATION_FORMAT_USE_UNSERIALIZER = 'C'; + const SERIALIZATION_FORMAT_AVOID_UNSERIALIZER = 'O'; + + /** + * {@inheritDoc} + */ + public function instantiate($className) + { + $factory = $this->buildFactory($className); + $instance = $factory(); + $reflection = new ReflectionClass($instance); + + return $instance; + } + + /** + * @internal + * @private + * + * Builds a {@see \Closure} capable of instantiating the given $className without + * invoking its constructor. + * This method is only exposed as public because of PHP 5.3 compatibility. Do not + * use this method in your own code + * + * @param string $className + * + * @return Closure + */ + public function buildFactory($className) + { + $reflectionClass = $this->getReflectionClass($className); + + if ($this->isInstantiableViaReflection($reflectionClass)) { + return function () use ($reflectionClass) { + return $reflectionClass->newInstanceWithoutConstructor(); + }; + } + + $serializedString = sprintf( + '%s:%d:"%s":0:{}', + $this->getSerializationFormat($reflectionClass), + strlen($className), + $className + ); + + $this->attemptInstantiationViaUnSerialization($reflectionClass, $serializedString); + + return function () use ($serializedString) { + return unserialize($serializedString); + }; + } + + /** + * @param string $className + * + * @return ReflectionClass + * + * @throws InvalidArgumentException + */ + private function getReflectionClass($className) + { + if (! class_exists($className)) { + throw new InvalidArgumentException("Class:$className does not exist"); + } + + $reflection = new ReflectionClass($className); + + if ($reflection->isAbstract()) { + throw new InvalidArgumentException("Class:$className is an abstract class"); + } + + return $reflection; + } + + /** + * @param ReflectionClass $reflectionClass + * @param string $serializedString + * + * @throws UnexpectedValueException + * + * @return void + */ + private function attemptInstantiationViaUnSerialization(ReflectionClass $reflectionClass, $serializedString) + { + set_error_handler(function ($code, $message, $file, $line) use ($reflectionClass, & $error) { + $msg = sprintf( + 'Could not produce an instance of "%s" via un-serialization, since an error was triggered in file "%s" at line "%d"', + $reflectionClass->getName(), + $file, + $line + ); + + $error = new UnexpectedValueException($msg, 0, new \Exception($message, $code)); + }); + + try { + unserialize($serializedString); + } catch (\Exception $exception) { + restore_error_handler(); + + throw new UnexpectedValueException("An exception was raised while trying to instantiate an instance of \"{$reflectionClass->getName()}\" via un-serialization", 0, $exception); + } + + restore_error_handler(); + + if ($error) { + throw $error; + } + } + + /** + * @param ReflectionClass $reflectionClass + * + * @return bool + */ + private function isInstantiableViaReflection(ReflectionClass $reflectionClass) + { + if (\PHP_VERSION_ID >= 50600) { + return ! ($reflectionClass->isInternal() && $reflectionClass->isFinal()); + } + + return \PHP_VERSION_ID >= 50400 && ! $this->hasInternalAncestors($reflectionClass); + } + + /** + * Verifies whether the given class is to be considered internal + * + * @param ReflectionClass $reflectionClass + * + * @return bool + */ + private function hasInternalAncestors(ReflectionClass $reflectionClass) + { + do { + if ($reflectionClass->isInternal()) { + return true; + } + } while ($reflectionClass = $reflectionClass->getParentClass()); + + 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; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Loader.php b/vendor/mockery/mockery/library/Mockery/Loader.php new file mode 100644 index 0000000..1afa860 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Loader.php @@ -0,0 +1,155 @@ +register(); + * + * @author Jonathan H. Wage + * @author Roman S. Borschel + * @author Matthew Weier O'Phinney + * @author Kris Wallsmith + * @author Fabien Potencier + */ + +namespace Mockery; + +class Loader +{ + private $_fileExtension = '.php'; + private $_namespace; + private $_includePath; + private $_namespaceSeparator = '\\'; + + /** + * Creates a new Loader that loads classes of the + * specified namespace. + * + * @param string $ns The namespace to use. + */ + public function __construct($ns = 'Mockery', $includePath = null) + { + $this->_namespace = $ns; + $this->_includePath = $includePath; + } + + /** + * Sets the namespace separator used by classes in the namespace of this class loader. + * + * @param string $sep The separator to use. + */ + public function setNamespaceSeparator($sep) + { + $this->_namespaceSeparator = $sep; + } + + /** + * Gets the namespace seperator used by classes in the namespace of this class loader. + * + * @return void + */ + public function getNamespaceSeparator() + { + return $this->_namespaceSeparator; + } + + /** + * Sets the base include path for all class files in the namespace of this class loader. + * + * @param string $includePath + */ + public function setIncludePath($includePath) + { + $this->_includePath = $includePath; + } + + /** + * Gets the base include path for all class files in the namespace of this class loader. + * + * @return string $includePath + */ + public function getIncludePath() + { + return $this->_includePath; + } + + /** + * Sets the file extension of class files in the namespace of this class loader. + * + * @param string $fileExtension + */ + public function setFileExtension($fileExtension) + { + $this->_fileExtension = $fileExtension; + } + + /** + * Gets the file extension of class files in the namespace of this class loader. + * + * @return string $fileExtension + */ + public function getFileExtension() + { + return $this->_fileExtension; + } + + /** + * Installs this class loader on the SPL autoload stack. + * + * @param bool $prepend If true, prepend autoloader on the autoload stack + */ + public function register($prepend = false) + { + spl_autoload_register(array($this, 'loadClass'), true, $prepend); + } + + /** + * Uninstalls this class loader from the SPL autoloader stack. + */ + public function unregister() + { + spl_autoload_unregister(array($this, 'loadClass')); + } + + /** + * Loads the given class or interface. + * + * @param string $className The name of the class to load. + * @return void + */ + public function loadClass($className) + { + if ($className === 'Mockery') { + require $this->getFullPath('Mockery.php'); + return; + } + if (null === $this->_namespace + || $this->_namespace.$this->_namespaceSeparator === substr($className, 0, strlen($this->_namespace.$this->_namespaceSeparator))) { + $fileName = ''; + $namespace = ''; + if (false !== ($lastNsPos = strripos($className, $this->_namespaceSeparator))) { + $namespace = substr($className, 0, $lastNsPos); + $className = substr($className, $lastNsPos + 1); + $fileName = str_replace($this->_namespaceSeparator, DIRECTORY_SEPARATOR, $namespace) . DIRECTORY_SEPARATOR; + } + $fileName .= str_replace('_', DIRECTORY_SEPARATOR, $className) . $this->_fileExtension; + require $this->getFullPath($fileName); + } + } + + /** + * Returns full path for $fileName if _includePath is set, or leaves as-is for PHP's internal search in 'require'. + * + * @param string $fileName relative to include path. + * @return string + */ + private function getFullPath($fileName) + { + return ($this->_includePath !== null ? $this->_includePath . DIRECTORY_SEPARATOR : '') . $fileName; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Loader/EvalLoader.php b/vendor/mockery/mockery/library/Mockery/Loader/EvalLoader.php new file mode 100644 index 0000000..b9d172a --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Loader/EvalLoader.php @@ -0,0 +1,18 @@ +getClassName(), false)) { + return; + } + + eval("?>" . $definition->getCode()); + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Loader/Loader.php b/vendor/mockery/mockery/library/Mockery/Loader/Loader.php new file mode 100644 index 0000000..d740181 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Loader/Loader.php @@ -0,0 +1,10 @@ +path = $path; + } + + public function load(MockDefinition $definition) + { + if (class_exists($definition->getClassName(), false)) { + return; + } + + $tmpfname = tempnam($this->path, "Mockery"); + file_put_contents($tmpfname, $definition->getCode()); + + require $tmpfname; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/Any.php b/vendor/mockery/mockery/library/Mockery/Matcher/Any.php new file mode 100644 index 0000000..7b14545 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Matcher/Any.php @@ -0,0 +1,46 @@ +'; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/AnyOf.php b/vendor/mockery/mockery/library/Mockery/Matcher/AnyOf.php new file mode 100644 index 0000000..e95daaf --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Matcher/AnyOf.php @@ -0,0 +1,51 @@ +_expected as $exp) { + if ($actual === $exp || $actual == $exp) { + return true; + } + } + return false; + } + + /** + * Return a string representation of this Matcher + * + * @return string + */ + public function __toString() + { + return ''; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/Closure.php b/vendor/mockery/mockery/library/Mockery/Matcher/Closure.php new file mode 100644 index 0000000..145f44b --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Matcher/Closure.php @@ -0,0 +1,48 @@ +_expected; + $result = $closure($actual); + return $result === true; + } + + /** + * Return a string representation of this Matcher + * + * @return string + */ + public function __toString() + { + return ''; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/Contains.php b/vendor/mockery/mockery/library/Mockery/Matcher/Contains.php new file mode 100644 index 0000000..649987d --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Matcher/Contains.php @@ -0,0 +1,65 @@ +_expected as $exp) { + $match = false; + foreach ($values as $val) { + if ($exp === $val || $exp == $val) { + $match = true; + break; + } + } + if ($match === false) { + return false; + } + } + return true; + } + + /** + * Return a string representation of this Matcher + * + * @return string + */ + public function __toString() + { + $return = '_expected as $v) { + $elements[] = (string) $v; + } + $return .= implode(', ', $elements) . ']>'; + return $return; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/Ducktype.php b/vendor/mockery/mockery/library/Mockery/Matcher/Ducktype.php new file mode 100644 index 0000000..93d8ab1 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Matcher/Ducktype.php @@ -0,0 +1,54 @@ +_expected as $method) { + if (!method_exists($actual, $method)) { + return false; + } + } + return true; + } + + /** + * Return a string representation of this Matcher + * + * @return string + */ + public function __toString() + { + return '_expected) . ']>'; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/HasKey.php b/vendor/mockery/mockery/library/Mockery/Matcher/HasKey.php new file mode 100644 index 0000000..ecad4e5 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Matcher/HasKey.php @@ -0,0 +1,47 @@ +_expected, array_keys($actual)); + } + + /** + * Return a string representation of this Matcher + * + * @return string + */ + public function __toString() + { + $return = '_expected . ']>'; + return $return; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/HasValue.php b/vendor/mockery/mockery/library/Mockery/Matcher/HasValue.php new file mode 100644 index 0000000..2d7edff --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Matcher/HasValue.php @@ -0,0 +1,47 @@ +_expected, $actual); + } + + /** + * Return a string representation of this Matcher + * + * @return string + */ + public function __toString() + { + $return = '_expected . ']>'; + return $return; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/MatcherAbstract.php b/vendor/mockery/mockery/library/Mockery/Matcher/MatcherAbstract.php new file mode 100644 index 0000000..14903b6 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Matcher/MatcherAbstract.php @@ -0,0 +1,59 @@ +_expected = $expected; + } + + /** + * Check if the actual value matches the expected. + * Actual passed by reference to preserve reference trail (where applicable) + * back to the original method parameter. + * + * @param mixed $actual + * @return bool + */ + abstract public function match(&$actual); + + /** + * Return a string representation of this Matcher + * + * @return string + */ + abstract public function __toString(); +} diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/MustBe.php b/vendor/mockery/mockery/library/Mockery/Matcher/MustBe.php new file mode 100644 index 0000000..f5b3aee --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Matcher/MustBe.php @@ -0,0 +1,50 @@ +_expected === $actual; + } else { + return $this->_expected == $actual; + } + } + + /** + * Return a string representation of this Matcher + * + * @return string + */ + public function __toString() + { + return ''; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/Not.php b/vendor/mockery/mockery/library/Mockery/Matcher/Not.php new file mode 100644 index 0000000..375d1ba --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Matcher/Not.php @@ -0,0 +1,47 @@ +_expected; + } + + /** + * Return a string representation of this Matcher + * + * @return string + */ + public function __toString() + { + return ''; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/NotAnyOf.php b/vendor/mockery/mockery/library/Mockery/Matcher/NotAnyOf.php new file mode 100644 index 0000000..cbc2c42 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Matcher/NotAnyOf.php @@ -0,0 +1,51 @@ +_expected as $exp) { + if ($actual === $exp || $actual == $exp) { + return false; + } + } + return true; + } + + /** + * Return a string representation of this Matcher + * + * @return string + */ + public function __toString() + { + return ''; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/Subset.php b/vendor/mockery/mockery/library/Mockery/Matcher/Subset.php new file mode 100644 index 0000000..3b8ae30 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Matcher/Subset.php @@ -0,0 +1,60 @@ +_expected as $k=>$v) { + if (!array_key_exists($k, $actual)) { + return false; + } + if ($actual[$k] !== $v) { + return false; + } + } + return true; + } + + /** + * Return a string representation of this Matcher + * + * @return string + */ + public function __toString() + { + $return = '_expected as $k=>$v) { + $elements[] = $k . '=' . (string) $v; + } + $return .= implode(', ', $elements) . ']>'; + return $return; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/Type.php b/vendor/mockery/mockery/library/Mockery/Matcher/Type.php new file mode 100644 index 0000000..cc3bf9a --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Matcher/Type.php @@ -0,0 +1,53 @@ +_expected); + if (function_exists($function)) { + return $function($actual); + } elseif (is_string($this->_expected) + && (class_exists($this->_expected) || interface_exists($this->_expected))) { + return $actual instanceof $this->_expected; + } + return false; + } + + /** + * Return a string representation of this Matcher + * + * @return string + */ + public function __toString() + { + return '<' . ucfirst($this->_expected) . '>'; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/MethodCall.php b/vendor/mockery/mockery/library/Mockery/MethodCall.php new file mode 100644 index 0000000..bc79b5f --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/MethodCall.php @@ -0,0 +1,25 @@ +method = $method; + $this->args = $args; + } + + public function getMethod() + { + return $this->method; + } + + public function getArgs() + { + return $this->args; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Mock.php b/vendor/mockery/mockery/library/Mockery/Mock.php new file mode 100644 index 0000000..c187521 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Mock.php @@ -0,0 +1,758 @@ +_mockery_container = $container; + if (!is_null($partialObject)) { + $this->_mockery_partial = $partialObject; + } + + if (!\Mockery::getConfiguration()->mockingNonExistentMethodsAllowed()) { + foreach ($this->mockery_getMethods() as $method) { + if ($method->isPublic() && !$method->isStatic()) { + $this->_mockery_mockableMethods[] = $method->getName(); + } + } + } + } + + /** + * Set expected method calls + * + * @param mixed + * @return \Mockery\Expectation + */ + public function shouldReceive() + { + /** @var array $nonPublicMethods */ + $nonPublicMethods = $this->getNonPublicMethods(); + + $self = $this; + $allowMockingProtectedMethods = $this->_mockery_allowMockingProtectedMethods; + + $lastExpectation = \Mockery::parseShouldReturnArgs( + $this, func_get_args(), function ($method) use ($self, $nonPublicMethods, $allowMockingProtectedMethods) { + $rm = $self->mockery_getMethod($method); + if ($rm) { + if ($rm->isPrivate()) { + throw new \InvalidArgumentException("$method() cannot be mocked as it is a private method"); + } + if (!$allowMockingProtectedMethods && $rm->isProtected()) { + throw new \InvalidArgumentException("$method() cannot be mocked as it a protected method and mocking protected methods is not allowed for this mock"); + } + } + + $director = $self->mockery_getExpectationsFor($method); + if (!$director) { + $director = new \Mockery\ExpectationDirector($method, $self); + $self->mockery_setExpectationsFor($method, $director); + } + $expectation = new \Mockery\Expectation($self, $method); + $director->addExpectation($expectation); + return $expectation; + } + ); + return $lastExpectation; + } + + /** + * Shortcut method for setting an expectation that a method should not be called. + * + * @param mixed + * @return \Mockery\Expectation + */ + public function shouldNotReceive() + { + $expectation = call_user_func_array(array($this, 'shouldReceive'), func_get_args()); + $expectation->never(); + return $expectation; + } + + /** + * Allows additional methods to be mocked that do not explicitly exist on mocked class + * @param String $method name of the method to be mocked + * @return Mock + */ + public function shouldAllowMockingMethod($method) + { + $this->_mockery_mockableMethods[] = $method; + return $this; + } + + /** + * Set mock to ignore unexpected methods and return Undefined class + * @param mixed $returnValue the default return value for calls to missing functions on this mock + * @return Mock + */ + public function shouldIgnoreMissing($returnValue = null) + { + $this->_mockery_ignoreMissing = true; + $this->_mockery_defaultReturnValue = $returnValue; + return $this; + } + + public function asUndefined() + { + $this->_mockery_ignoreMissing = true; + $this->_mockery_defaultReturnValue = new \Mockery\Undefined; + return $this; + } + + /** + * @return Mock + */ + public function shouldAllowMockingProtectedMethods() + { + $this->_mockery_allowMockingProtectedMethods = true; + return $this; + } + + + /** + * Set mock to defer unexpected methods to it's parent + * + * This is particularly useless for this class, as it doesn't have a parent, + * but included for completeness + * + * @return Mock + */ + public function shouldDeferMissing() + { + $this->_mockery_deferMissing = true; + return $this; + } + + /** + * Create an obviously worded alias to shouldDeferMissing() + * + * @return Mock + */ + public function makePartial() + { + return $this->shouldDeferMissing(); + } + + /** + * Accepts a closure which is executed with an object recorder which proxies + * to the partial source object. The intent being to record the + * interactions of a concrete object as a set of expectations on the + * current mock object. The partial may then be passed to a second process + * to see if it fulfils the same (or exact same) contract as the original. + * + * @param Closure $closure + */ + public function shouldExpect(\Closure $closure) + { + $recorder = new \Mockery\Recorder($this, $this->_mockery_partial); + $this->_mockery_disableExpectationMatching = true; + $closure($recorder); + $this->_mockery_disableExpectationMatching = false; + return $this; + } + + /** + * In the event shouldReceive() accepting one or more methods/returns, + * this method will switch them from normal expectations to default + * expectations + * + * @return self + */ + public function byDefault() + { + foreach ($this->_mockery_expectations as $director) { + $exps = $director->getExpectations(); + foreach ($exps as $exp) { + $exp->byDefault(); + } + } + return $this; + } + + /** + * Capture calls to this mock + */ + public function __call($method, array $args) + { + return $this->_mockery_handleMethodCall($method, $args); + } + + public static function __callStatic($method, array $args) + { + return self::_mockery_handleStaticMethodCall($method, $args); + } + + /** + * Forward calls to this magic method to the __call method + */ + public function __toString() + { + return $this->__call('__toString', array()); + } + + /**public function __set($name, $value) + { + $this->_mockery_mockableProperties[$name] = $value; + return $this; + } + + public function __get($name) + { + if (isset($this->_mockery_mockableProperties[$name])) { + return $this->_mockery_mockableProperties[$name]; + } elseif(isset($this->{$name})) { + return $this->{$name}; + } + throw new \InvalidArgumentException ( + 'Property ' . __CLASS__ . '::' . $name . ' does not exist on this mock object' + ); + }**/ + + /** + * Iterate across all expectation directors and validate each + * + * @throws \Mockery\CountValidator\Exception + * @return void + */ + public function mockery_verify() + { + if ($this->_mockery_verified) { + return true; + } + if (isset($this->_mockery_ignoreVerification) + && $this->_mockery_ignoreVerification == true) { + return true; + } + $this->_mockery_verified = true; + foreach ($this->_mockery_expectations as $director) { + $director->verify(); + } + } + + /** + * Tear down tasks for this mock + * + * @return void + */ + public function mockery_teardown() + { + } + + /** + * Fetch the next available allocation order number + * + * @return int + */ + public function mockery_allocateOrder() + { + $this->_mockery_allocatedOrder += 1; + return $this->_mockery_allocatedOrder; + } + + /** + * Set ordering for a group + * + * @param mixed $group + * @param int $order + */ + public function mockery_setGroup($group, $order) + { + $this->_mockery_groups[$group] = $order; + } + + /** + * Fetch array of ordered groups + * + * @return array + */ + public function mockery_getGroups() + { + return $this->_mockery_groups; + } + + /** + * Set current ordered number + * + * @param int $order + */ + public function mockery_setCurrentOrder($order) + { + $this->_mockery_currentOrder = $order; + return $this->_mockery_currentOrder; + } + + /** + * Get current ordered number + * + * @return int + */ + public function mockery_getCurrentOrder() + { + return $this->_mockery_currentOrder; + } + + /** + * Validate the current mock's ordering + * + * @param string $method + * @param int $order + * @throws \Mockery\Exception + * @return void + */ + public function mockery_validateOrder($method, $order) + { + if ($order < $this->_mockery_currentOrder) { + $exception = new \Mockery\Exception\InvalidOrderException( + 'Method ' . __CLASS__ . '::' . $method . '()' + . ' called out of order: expected order ' + . $order . ', was ' . $this->_mockery_currentOrder + ); + $exception->setMock($this) + ->setMethodName($method) + ->setExpectedOrder($order) + ->setActualOrder($this->_mockery_currentOrder); + throw $exception; + } + $this->mockery_setCurrentOrder($order); + } + + /** + * Gets the count of expectations for this mock + * + * @return int + */ + public function mockery_getExpectationCount() + { + $count = 0; + foreach ($this->_mockery_expectations as $director) { + $count += $director->getExpectationCount(); + } + return $count; + } + + /** + * Return the expectations director for the given method + * + * @var string $method + * @return \Mockery\ExpectationDirector|null + */ + public function mockery_setExpectationsFor($method, \Mockery\ExpectationDirector $director) + { + $this->_mockery_expectations[$method] = $director; + } + + /** + * Return the expectations director for the given method + * + * @var string $method + * @return \Mockery\ExpectationDirector|null + */ + public function mockery_getExpectationsFor($method) + { + if (isset($this->_mockery_expectations[$method])) { + return $this->_mockery_expectations[$method]; + } + } + + /** + * Find an expectation matching the given method and arguments + * + * @var string $method + * @var array $args + * @return \Mockery\Expectation|null + */ + public function mockery_findExpectation($method, array $args) + { + if (!isset($this->_mockery_expectations[$method])) { + return null; + } + $director = $this->_mockery_expectations[$method]; + + return $director->findExpectation($args); + } + + /** + * Return the container for this mock + * + * @return \Mockery\Container + */ + public function mockery_getContainer() + { + return $this->_mockery_container; + } + + /** + * Return the name for this mock + * + * @return string + */ + public function mockery_getName() + { + return __CLASS__; + } + + /** + * @return array + */ + public function mockery_getMockableProperties() + { + return $this->_mockery_mockableProperties; + } + + public function __isset($name) + { + if (false === stripos($name, '_mockery_') && method_exists(get_parent_class($this), '__isset')) { + return parent::__isset($name); + } + } + + public function mockery_getExpectations() + { + return $this->_mockery_expectations; + } + + /** + * Calls a parent class method and returns the result. Used in a passthru + * expectation where a real return value is required while still taking + * advantage of expectation matching and call count verification. + * + * @param string $name + * @param array $args + * @return mixed + */ + public function mockery_callSubjectMethod($name, array $args) + { + return call_user_func_array('parent::' . $name, $args); + } + + /** + * @return string[] + */ + public function mockery_getMockableMethods() + { + return $this->_mockery_mockableMethods; + } + + /** + * @return bool + */ + public function mockery_isAnonymous() + { + $rfc = new \ReflectionClass($this); + return false === $rfc->getParentClass(); + } + + public function __wakeup() + { + /** + * This does not add __wakeup method support. It's a blind method and any + * expected __wakeup work will NOT be performed. It merely cuts off + * annoying errors where a __wakeup exists but is not essential when + * mocking + */ + } + + public function mockery_getMethod($name) + { + foreach ($this->mockery_getMethods() as $method) { + if ($method->getName() == $name) { + return $method; + } + } + + return null; + } + + public function shouldHaveReceived($method, $args = null) + { + $expectation = new \Mockery\VerificationExpectation($this, $method); + if (null !== $args) { + $expectation->withArgs($args); + } + $expectation->atLeast()->once(); + $director = new \Mockery\VerificationDirector($this->_mockery_getReceivedMethodCalls(), $expectation); + $director->verify(); + return $director; + } + + public function shouldNotHaveReceived($method, $args = null) + { + $expectation = new \Mockery\VerificationExpectation($this, $method); + if (null !== $args) { + $expectation->withArgs($args); + } + $expectation->never(); + $director = new \Mockery\VerificationDirector($this->_mockery_getReceivedMethodCalls(), $expectation); + $director->verify(); + return null; + } + + protected static function _mockery_handleStaticMethodCall($method, array $args) + { + try { + $associatedRealObject = \Mockery::fetchMock(__CLASS__); + return $associatedRealObject->__call($method, $args); + } catch (\BadMethodCallException $e) { + throw new \BadMethodCallException( + 'Static method ' . $associatedRealObject->mockery_getName() . '::' . $method + . '() does not exist on this mock object' + ); + } + } + + protected function _mockery_getReceivedMethodCalls() + { + return $this->_mockery_receivedMethodCalls ?: $this->_mockery_receivedMethodCalls = new \Mockery\ReceivedMethodCalls(); + } + + protected function _mockery_handleMethodCall($method, array $args) + { + $this->_mockery_getReceivedMethodCalls()->push(new \Mockery\MethodCall($method, $args)); + + $rm = $this->mockery_getMethod($method); + if ($rm && $rm->isProtected() && !$this->_mockery_allowMockingProtectedMethods) { + if ($rm->isAbstract()) { + return; + } + + try { + $prototype = $rm->getPrototype(); + if ($prototype->isAbstract()) { + return; + } + } catch (\ReflectionException $re) { + // noop - there is no hasPrototype method + } + + return call_user_func_array("parent::$method", $args); + } + + if (isset($this->_mockery_expectations[$method]) + && !$this->_mockery_disableExpectationMatching) { + $handler = $this->_mockery_expectations[$method]; + + try { + return $handler->call($args); + } catch (\Mockery\Exception\NoMatchingExpectationException $e) { + if (!$this->_mockery_ignoreMissing && !$this->_mockery_deferMissing) { + throw $e; + } + } + } + + if (!is_null($this->_mockery_partial) && method_exists($this->_mockery_partial, $method)) { + return call_user_func_array(array($this->_mockery_partial, $method), $args); + } elseif ($this->_mockery_deferMissing && is_callable("parent::$method")) { + return call_user_func_array("parent::$method", $args); + } elseif ($method === '__toString') { + // __toString is special because we force its addition to the class API regardless of the + // original implementation. Thus, we should always return a string rather than honor + // _mockery_ignoreMissing and break the API with an error. + return sprintf("%s#%s", __CLASS__, spl_object_hash($this)); + } elseif ($this->_mockery_ignoreMissing) { + if (\Mockery::getConfiguration()->mockingNonExistentMethodsAllowed() || (method_exists($this->_mockery_partial, $method) || is_callable("parent::$method"))) { + if ($this->_mockery_defaultReturnValue instanceof \Mockery\Undefined) { + return call_user_func_array(array($this->_mockery_defaultReturnValue, $method), $args); + } else { + return $this->_mockery_defaultReturnValue; + } + } + } + throw new \BadMethodCallException( + 'Method ' . __CLASS__ . '::' . $method . '() does not exist on this mock object' + ); + } + + protected function mockery_getMethods() + { + if (static::$_mockery_methods) { + return static::$_mockery_methods; + } + + $methods = array(); + + if (isset($this->_mockery_partial)) { + $reflected = new \ReflectionObject($this->_mockery_partial); + $methods = $reflected->getMethods(); + } else { + $reflected = new \ReflectionClass($this); + foreach ($reflected->getMethods() as $method) { + try { + $methods[] = $method->getPrototype(); + } catch (\ReflectionException $re) { + /** + * For some reason, private methods don't have a prototype + */ + if ($method->isPrivate()) { + $methods[] = $method; + } + } + } + } + + return static::$_mockery_methods = $methods; + } + + /** + * @return array + */ + private function getNonPublicMethods() + { + return array_map( + function ($method) { + return $method->getName(); + }, + array_filter($this->mockery_getMethods(), function ($method) { + return !$method->isPublic(); + }) + ); + } +} diff --git a/vendor/mockery/mockery/library/Mockery/MockInterface.php b/vendor/mockery/mockery/library/Mockery/MockInterface.php new file mode 100644 index 0000000..a511292 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/MockInterface.php @@ -0,0 +1,242 @@ +methodCalls[] = $methodCall; + } + + public function verify(Expectation $expectation) + { + foreach ($this->methodCalls as $methodCall) { + if ($methodCall->getMethod() !== $expectation->getName()) { + continue; + } + + if (!$expectation->matchArgs($methodCall->getArgs())) { + continue; + } + + $expectation->verifyCall($methodCall->getArgs()); + } + + $expectation->verify(); + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Recorder.php b/vendor/mockery/mockery/library/Mockery/Recorder.php new file mode 100644 index 0000000..b9210f1 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Recorder.php @@ -0,0 +1,103 @@ +_mock = $mock; + $this->_subject = $subject; + } + + /** + * Sets the recorded into strict mode where method calls are more strictly + * matched against the argument and call count and ordering is also + * set as enforceable. + * + * @return void + */ + public function shouldBeStrict() + { + $this->_strict = true; + } + + /** + * Intercept all calls on the subject, and use the call details to create + * a new expectation. The actual return value is then returned after being + * recorded. + * + * @param string $method + * @param array $args + * @return mixed + */ + public function __call($method, array $args) + { + $return = call_user_func_array(array($this->_subject, $method), $args); + $expectation = $this->_mock->shouldReceive($method)->andReturn($return); + if ($this->_strict) { + $exactArgs = array(); + foreach ($args as $arg) { + $exactArgs[] = \Mockery::mustBe($arg); + } + $expectation->once()->ordered(); + call_user_func_array(array($expectation, 'with'), $exactArgs); + } else { + call_user_func_array(array($expectation, 'with'), $args); + } + return $return; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Undefined.php b/vendor/mockery/mockery/library/Mockery/Undefined.php new file mode 100644 index 0000000..e0fe424 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Undefined.php @@ -0,0 +1,47 @@ +receivedMethodCalls = $receivedMethodCalls; + $this->expectation = $expectation; + } + + public function verify() + { + return $this->receivedMethodCalls->verify($this->expectation); + } + + public function with() + { + return $this->cloneApplyAndVerify("with", func_get_args()); + } + + public function withArgs(array $args) + { + return $this->cloneApplyAndVerify("withArgs", array($args)); + } + + public function withNoArgs() + { + return $this->cloneApplyAndVerify("withNoArgs", array()); + } + + public function withAnyArgs() + { + return $this->cloneApplyAndVerify("withAnyArgs", array()); + } + + public function times($limit = null) + { + return $this->cloneWithoutCountValidatorsApplyAndVerify("times", array($limit)); + } + + public function once() + { + return $this->cloneWithoutCountValidatorsApplyAndVerify("once", array()); + } + + public function twice() + { + return $this->cloneWithoutCountValidatorsApplyAndVerify("twice", array()); + } + + public function atLeast() + { + return $this->cloneWithoutCountValidatorsApplyAndVerify("atLeast", array()); + } + + public function atMost() + { + return $this->cloneWithoutCountValidatorsApplyAndVerify("atMost", array()); + } + + public function between($minimum, $maximum) + { + return $this->cloneWithoutCountValidatorsApplyAndVerify("between", array($minimum, $maximum)); + } + + protected function cloneWithoutCountValidatorsApplyAndVerify($method, $args) + { + $expectation = clone $this->expectation; + $expectation->clearCountValidators(); + call_user_func_array(array($expectation, $method), $args); + $director = new VerificationDirector($this->receivedMethodCalls, $expectation); + $director->verify(); + return $director; + } + + protected function cloneApplyAndVerify($method, $args) + { + $expectation = clone $this->expectation; + call_user_func_array(array($expectation, $method), $args); + $director = new VerificationDirector($this->receivedMethodCalls, $expectation); + $director->verify(); + return $director; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/VerificationExpectation.php b/vendor/mockery/mockery/library/Mockery/VerificationExpectation.php new file mode 100644 index 0000000..660c31f --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/VerificationExpectation.php @@ -0,0 +1,17 @@ +_countValidators = array(); + } + + public function __clone() + { + parent::__clone(); + $this->_actualCount = 0; + } +} diff --git a/vendor/mockery/mockery/package.xml b/vendor/mockery/mockery/package.xml new file mode 100644 index 0000000..7216ad8 --- /dev/null +++ b/vendor/mockery/mockery/package.xml @@ -0,0 +1,191 @@ + + + Mockery + pear.survivethedeepend.com + Mockery is a simple yet flexible mock object framework for use in unit testing. + 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 succint 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. + + Pádraic Brady + padraic + padraic.brady@yahoo.com + yes + + + Dave Marshall + davedevelopment + dave.marshall@atstsolutions.co.uk + yes + + 2014-04-29 + + + 0.9.1 + 0.9.1 + + + stable + stable + + BSD + http://github.com/padraic/mockery#readme + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5.3.2 + + + 1.4.0 + + + + + Hamcrest + hamcrest.googlecode.com/svn/pear + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vendor/mockery/mockery/phpunit.xml.dist b/vendor/mockery/mockery/phpunit.xml.dist new file mode 100644 index 0000000..f1d0e09 --- /dev/null +++ b/vendor/mockery/mockery/phpunit.xml.dist @@ -0,0 +1,37 @@ + + +> + + + ./tests + ./tests/Mockery/MockingVariadicArgumentsTest.php + ./tests/Mockery/MockingParameterAndReturnTypesTest.php + ./tests/Mockery/MockingVariadicArgumentsTest.php + ./tests/Mockery/MockingParameterAndReturnTypesTest.php + + + + + ./library/ + + ./library/Mockery/Adapter/Phpunit/MockeryPHPUnitIntegration.php + + + + + + + diff --git a/vendor/mockery/mockery/tests/Bootstrap.php b/vendor/mockery/mockery/tests/Bootstrap.php new file mode 100644 index 0000000..f685167 --- /dev/null +++ b/vendor/mockery/mockery/tests/Bootstrap.php @@ -0,0 +1,85 @@ +=')) { + + /* + * Add Mutateme library/ directory to the PHPUnit code coverage + * whitelist. This has the effect that only production code source files + * appear in the code coverage report and that all production code source + * files, even those that are not covered by a test yet, are processed. + */ + PHPUnit_Util_Filter::addDirectoryToWhitelist($library); + + /* + * Omit from code coverage reports the contents of the tests directory + */ + foreach (array('.php', '.phtml', '.csv', '.inc') as $suffix) { + PHPUnit_Util_Filter::addDirectoryToFilter($tests, $suffix); + } + PHPUnit_Util_Filter::addDirectoryToFilter(PEAR_INSTALL_DIR); + PHPUnit_Util_Filter::addDirectoryToFilter(PHP_LIBDIR); +} + +require __DIR__.'/../vendor/autoload.php'; + +/* + * Unset global variables that are no longer needed. + */ +unset($root, $library, $tests, $path); diff --git a/vendor/mockery/mockery/tests/Mockery/AdhocTest.php b/vendor/mockery/mockery/tests/Mockery/AdhocTest.php new file mode 100644 index 0000000..79381eb --- /dev/null +++ b/vendor/mockery/mockery/tests/Mockery/AdhocTest.php @@ -0,0 +1,90 @@ +container = new \Mockery\Container(\Mockery::getDefaultGenerator(), \Mockery::getDefaultLoader()); + } + + public function teardown() + { + $this->container->mockery_close(); + } + + public function testSimplestMockCreation() + { + $m = $this->container->mock('MockeryTest_NameOfExistingClass'); + $this->assertTrue($m instanceof MockeryTest_NameOfExistingClass); + } + + public function testMockeryInterfaceForClass() + { + $m = $this->container->mock('SplFileInfo'); + $this->assertTrue($m instanceof \Mockery\MockInterface); + } + + public function testMockeryInterfaceForNonExistingClass() + { + $m = $this->container->mock('ABC_IDontExist'); + $this->assertTrue($m instanceof \Mockery\MockInterface); + } + + public function testMockeryInterfaceForInterface() + { + $m = $this->container->mock('MockeryTest_NameOfInterface'); + $this->assertTrue($m instanceof \Mockery\MockInterface); + } + + public function testMockeryInterfaceForAbstract() + { + $m = $this->container->mock('MockeryTest_NameOfAbstract'); + $this->assertTrue($m instanceof \Mockery\MockInterface); + } + + public function testInvalidCountExceptionThrowsRuntimeExceptionOnIllegalComparativeSymbol() + { + $this->setExpectedException('Mockery\Exception\RuntimeException'); + $e = new \Mockery\Exception\InvalidCountException; + $e->setExpectedCountComparative('X'); + } +} + +class MockeryTest_NameOfExistingClass +{ +} + +interface MockeryTest_NameOfInterface +{ + public function foo(); +} + +abstract class MockeryTest_NameOfAbstract +{ + abstract public function foo(); +} diff --git a/vendor/mockery/mockery/tests/Mockery/ContainerTest.php b/vendor/mockery/mockery/tests/Mockery/ContainerTest.php new file mode 100644 index 0000000..d661dce --- /dev/null +++ b/vendor/mockery/mockery/tests/Mockery/ContainerTest.php @@ -0,0 +1,1744 @@ +container = new Mockery\Container(Mockery::getDefaultGenerator(), new Mockery\Loader\EvalLoader()); + } + + public function teardown() + { + $this->container->mockery_close(); + } + + public function testSimplestMockCreation() + { + $m = $this->container->mock(); + $m->shouldReceive('foo')->andReturn('bar'); + $this->assertEquals('bar', $m->foo()); + } + + public function testGetKeyOfDemeterMockShouldReturnKeyWhenMatchingMock() + { + $m = $this->container->mock(); + $m->shouldReceive('foo->bar'); + $this->assertRegExp( + '/Mockery_(\d+)__demeter_foo/', + $this->container->getKeyOfDemeterMockFor('foo') + ); + } + public function testGetKeyOfDemeterMockShouldReturnNullWhenNoMatchingMock() + { + $method = 'unknownMethod'; + $this->assertNull($this->container->getKeyOfDemeterMockFor($method)); + + $m = $this->container->mock(); + $m->shouldReceive('method'); + $this->assertNull($this->container->getKeyOfDemeterMockFor($method)); + + $m->shouldReceive('foo->bar'); + $this->assertNull($this->container->getKeyOfDemeterMockFor($method)); + } + + + public function testNamedMocksAddNameToExceptions() + { + $m = $this->container->mock('Foo'); + $m->shouldReceive('foo')->with(1)->andReturn('bar'); + try { + $m->foo(); + } catch (\Mockery\Exception $e) { + $this->assertTrue((bool) preg_match("/Foo/", $e->getMessage())); + } + } + + public function testSimpleMockWithArrayDefs() + { + $m = $this->container->mock(array('foo'=>1, 'bar'=>2)); + $this->assertEquals(1, $m->foo()); + $this->assertEquals(2, $m->bar()); + } + + public function testSimpleMockWithArrayDefsCanBeOverridden() + { + // eg. In shared test setup + $m = $this->container->mock(array('foo' => 1, 'bar' => 2)); + + // and then overridden in one test + $m->shouldReceive('foo')->with('baz')->once()->andReturn(2); + $m->shouldReceive('bar')->with('baz')->once()->andReturn(42); + + $this->assertEquals(2, $m->foo('baz')); + $this->assertEquals(42, $m->bar('baz')); + } + + public function testNamedMockWithArrayDefs() + { + $m = $this->container->mock('Foo', array('foo'=>1, 'bar'=>2)); + $this->assertEquals(1, $m->foo()); + $this->assertEquals(2, $m->bar()); + try { + $m->f(); + } catch (BadMethodCallException $e) { + $this->assertTrue((bool) preg_match("/Foo/", $e->getMessage())); + } + } + + public function testNamedMockWithArrayDefsCanBeOverridden() + { + // eg. In shared test setup + $m = $this->container->mock('Foo', array('foo' => 1)); + + // and then overridden in one test + $m->shouldReceive('foo')->with('bar')->once()->andReturn(2); + + $this->assertEquals(2, $m->foo('bar')); + + try { + $m->f(); + } catch (BadMethodCallException $e) { + $this->assertTrue((bool) preg_match("/Foo/", $e->getMessage())); + } + } + + public function testNamedMockMultipleInterfaces() + { + $m = $this->container->mock('stdClass, ArrayAccess, Countable', array('foo'=>1, 'bar'=>2)); + $this->assertEquals(1, $m->foo()); + $this->assertEquals(2, $m->bar()); + try { + $m->f(); + } catch (BadMethodCallException $e) { + $this->assertTrue((bool) preg_match("/stdClass/", $e->getMessage())); + $this->assertTrue((bool) preg_match("/ArrayAccess/", $e->getMessage())); + $this->assertTrue((bool) preg_match("/Countable/", $e->getMessage())); + } + } + + public function testNamedMockWithConstructorArgs() + { + $m = $this->container->mock("MockeryTest_ClassConstructor2[foo]", array($param1 = new stdClass())); + $m->shouldReceive("foo")->andReturn(123); + $this->assertEquals(123, $m->foo()); + $this->assertEquals($param1, $m->getParam1()); + } + + public function testNamedMockWithConstructorArgsAndArrayDefs() + { + $m = $this->container->mock( + "MockeryTest_ClassConstructor2[foo]", + array($param1 = new stdClass()), + array("foo" => 123) + ); + $this->assertEquals(123, $m->foo()); + $this->assertEquals($param1, $m->getParam1()); + } + + public function testNamedMockWithConstructorArgsWithInternalCallToMockedMethod() + { + $m = $this->container->mock("MockeryTest_ClassConstructor2[foo]", array($param1 = new stdClass())); + $m->shouldReceive("foo")->andReturn(123); + $this->assertEquals(123, $m->bar()); + } + + public function testNamedMockWithConstructorArgsButNoQuickDefsShouldLeaveConstructorIntact() + { + $m = $this->container->mock("MockeryTest_ClassConstructor2", array($param1 = new stdClass())); + $m->shouldDeferMissing(); + $this->assertEquals($param1, $m->getParam1()); + } + + public function testNamedMockWithShouldDeferMissing() + { + $m = $this->container->mock("MockeryTest_ClassConstructor2", array($param1 = new stdClass())); + $m->shouldDeferMissing(); + $this->assertEquals('foo', $m->bar()); + $m->shouldReceive("bar")->andReturn(123); + $this->assertEquals(123, $m->bar()); + } + + /** + * @expectedException BadMethodCallException + */ + public function testNamedMockWithShouldDeferMissingThrowsIfNotAvailable() + { + $m = $this->container->mock("MockeryTest_ClassConstructor2", array($param1 = new stdClass())); + $m->shouldDeferMissing(); + $m->foorbar123(); + } + + public function testMockingAKnownConcreteClassSoMockInheritsClassType() + { + $m = $this->container->mock('stdClass'); + $m->shouldReceive('foo')->andReturn('bar'); + $this->assertEquals('bar', $m->foo()); + $this->assertTrue($m instanceof stdClass); + } + + public function testMockingAKnownUserClassSoMockInheritsClassType() + { + $m = $this->container->mock('MockeryTest_TestInheritedType'); + $this->assertTrue($m instanceof MockeryTest_TestInheritedType); + } + + public function testMockingAConcreteObjectCreatesAPartialWithoutError() + { + $m = $this->container->mock(new stdClass); + $m->shouldReceive('foo')->andReturn('bar'); + $this->assertEquals('bar', $m->foo()); + $this->assertTrue($m instanceof stdClass); + } + + public function testCreatingAPartialAllowsDynamicExpectationsAndPassesThroughUnexpectedMethods() + { + $m = $this->container->mock(new MockeryTestFoo); + $m->shouldReceive('bar')->andReturn('bar'); + $this->assertEquals('bar', $m->bar()); + $this->assertEquals('foo', $m->foo()); + $this->assertTrue($m instanceof MockeryTestFoo); + } + + public function testCreatingAPartialAllowsExpectationsToInterceptCallsToImplementedMethods() + { + $m = $this->container->mock(new MockeryTestFoo2); + $m->shouldReceive('bar')->andReturn('baz'); + $this->assertEquals('baz', $m->bar()); + $this->assertEquals('foo', $m->foo()); + $this->assertTrue($m instanceof MockeryTestFoo2); + } + + public function testBlockForwardingToPartialObject() + { + $m = $this->container->mock(new MockeryTestBar1, array('foo'=>1, Mockery\Container::BLOCKS => array('method1'))); + $this->assertSame($m, $m->method1()); + } + + public function testPartialWithArrayDefs() + { + $m = $this->container->mock(new MockeryTestBar1, array('foo'=>1, Mockery\Container::BLOCKS => array('method1'))); + $this->assertEquals(1, $m->foo()); + } + + public function testPassingClosureAsFinalParameterUsedToDefineExpectations() + { + $m = $this->container->mock('foo', function ($m) { + $m->shouldReceive('foo')->once()->andReturn('bar'); + }); + $this->assertEquals('bar', $m->foo()); + } + + /** + * @expectedException \Mockery\Exception + */ + public function testMockingAKnownConcreteFinalClassThrowsErrors_OnlyPartialMocksCanMockFinalElements() + { + $m = $this->container->mock('MockeryFoo3'); + } + + public function testMockingAKnownConcreteClassWithFinalMethodsThrowsNoException() + { + $m = $this->container->mock('MockeryFoo4'); + } + + /** + * @group finalclass + */ + public function testFinalClassesCanBePartialMocks() + { + $m = $this->container->mock(new MockeryFoo3); + $m->shouldReceive('foo')->andReturn('baz'); + $this->assertEquals('baz', $m->foo()); + $this->assertFalse($m instanceof MockeryFoo3); + } + + public function testSplClassWithFinalMethodsCanBeMocked() + { + $m = $this->container->mock('SplFileInfo'); + $m->shouldReceive('foo')->andReturn('baz'); + $this->assertEquals('baz', $m->foo()); + $this->assertTrue($m instanceof SplFileInfo); + } + + public function testSplClassWithFinalMethodsCanBeMockedMultipleTimes() + { + $this->container->mock('SplFileInfo'); + $m = $this->container->mock('SplFileInfo'); + $m->shouldReceive('foo')->andReturn('baz'); + $this->assertEquals('baz', $m->foo()); + $this->assertTrue($m instanceof SplFileInfo); + } + + public function testClassesWithFinalMethodsCanBeProxyPartialMocks() + { + $m = $this->container->mock(new MockeryFoo4); + $m->shouldReceive('foo')->andReturn('baz'); + $this->assertEquals('baz', $m->foo()); + $this->assertEquals('bar', $m->bar()); + $this->assertTrue($m instanceof MockeryFoo4); + } + + public function testClassesWithFinalMethodsCanBeProperPartialMocks() + { + $m = $this->container->mock('MockeryFoo4[bar]'); + $m->shouldReceive('bar')->andReturn('baz'); + $this->assertEquals('baz', $m->foo()); + $this->assertEquals('baz', $m->bar()); + $this->assertTrue($m instanceof MockeryFoo4); + } + + public function testClassesWithFinalMethodsCanBeProperPartialMocksButFinalMethodsNotPartialed() + { + $m = $this->container->mock('MockeryFoo4[foo]'); + $m->shouldReceive('foo')->andReturn('foo'); + $this->assertEquals('baz', $m->foo()); // partial expectation ignored - will fail callcount assertion + $this->assertTrue($m instanceof MockeryFoo4); + } + + public function testSplfileinfoClassMockPassesUserExpectations() + { + $file = $this->container->mock('SplFileInfo[getFilename,getPathname,getExtension,getMTime]', array(__FILE__)); + $file->shouldReceive('getFilename')->once()->andReturn('foo'); + $file->shouldReceive('getPathname')->once()->andReturn('path/to/foo'); + $file->shouldReceive('getExtension')->once()->andReturn('css'); + $file->shouldReceive('getMTime')->once()->andReturn(time()); + } + + public function testCanMockInterface() + { + $m = $this->container->mock('MockeryTest_Interface'); + $this->assertTrue($m instanceof MockeryTest_Interface); + } + + public function testCanMockSpl() + { + $m = $this->container->mock('\\SplFixedArray'); + $this->assertTrue($m instanceof SplFixedArray); + } + + public function testCanMockInterfaceWithAbstractMethod() + { + $m = $this->container->mock('MockeryTest_InterfaceWithAbstractMethod'); + $this->assertTrue($m instanceof MockeryTest_InterfaceWithAbstractMethod); + $m->shouldReceive('foo')->andReturn(1); + $this->assertEquals(1, $m->foo()); + } + + public function testCanMockAbstractWithAbstractProtectedMethod() + { + $m = $this->container->mock('MockeryTest_AbstractWithAbstractMethod'); + $this->assertTrue($m instanceof MockeryTest_AbstractWithAbstractMethod); + } + + public function testCanMockInterfaceWithPublicStaticMethod() + { + $m = $this->container->mock('MockeryTest_InterfaceWithPublicStaticMethod'); + $this->assertTrue($m instanceof MockeryTest_InterfaceWithPublicStaticMethod); + } + + public function testCanMockClassWithConstructor() + { + $m = $this->container->mock('MockeryTest_ClassConstructor'); + $this->assertTrue($m instanceof MockeryTest_ClassConstructor); + } + + public function testCanMockClassWithConstructorNeedingClassArgs() + { + $m = $this->container->mock('MockeryTest_ClassConstructor2'); + $this->assertTrue($m instanceof MockeryTest_ClassConstructor2); + } + + /** + * @group partial + */ + public function testCanPartiallyMockANormalClass() + { + $m = $this->container->mock('MockeryTest_PartialNormalClass[foo]'); + $this->assertTrue($m instanceof MockeryTest_PartialNormalClass); + $m->shouldReceive('foo')->andReturn('cba'); + $this->assertEquals('abc', $m->bar()); + $this->assertEquals('cba', $m->foo()); + } + + /** + * @group partial + */ + public function testCanPartiallyMockAnAbstractClass() + { + $m = $this->container->mock('MockeryTest_PartialAbstractClass[foo]'); + $this->assertTrue($m instanceof MockeryTest_PartialAbstractClass); + $m->shouldReceive('foo')->andReturn('cba'); + $this->assertEquals('abc', $m->bar()); + $this->assertEquals('cba', $m->foo()); + } + + /** + * @group partial + */ + public function testCanPartiallyMockANormalClassWith2Methods() + { + $m = $this->container->mock('MockeryTest_PartialNormalClass2[foo, baz]'); + $this->assertTrue($m instanceof MockeryTest_PartialNormalClass2); + $m->shouldReceive('foo')->andReturn('cba'); + $m->shouldReceive('baz')->andReturn('cba'); + $this->assertEquals('abc', $m->bar()); + $this->assertEquals('cba', $m->foo()); + $this->assertEquals('cba', $m->baz()); + } + + /** + * @group partial + */ + public function testCanPartiallyMockAnAbstractClassWith2Methods() + { + $m = $this->container->mock('MockeryTest_PartialAbstractClass2[foo,baz]'); + $this->assertTrue($m instanceof MockeryTest_PartialAbstractClass2); + $m->shouldReceive('foo')->andReturn('cba'); + $m->shouldReceive('baz')->andReturn('cba'); + $this->assertEquals('abc', $m->bar()); + $this->assertEquals('cba', $m->foo()); + $this->assertEquals('cba', $m->baz()); + } + + /** + * @expectedException \Mockery\Exception + * @group partial + */ + public function testThrowsExceptionIfSettingExpectationForNonMockedMethodOfPartialMock() + { + $this->markTestSkipped('For now...'); + $m = $this->container->mock('MockeryTest_PartialNormalClass[foo]'); + $this->assertTrue($m instanceof MockeryTest_PartialNormalClass); + $m->shouldReceive('bar')->andReturn('cba'); + } + + /** + * @expectedException \Mockery\Exception + * @group partial + */ + public function testThrowsExceptionIfClassOrInterfaceForPartialMockDoesNotExist() + { + $m = $this->container->mock('MockeryTest_PartialNormalClassXYZ[foo]'); + } + + /** + * @group issue/4 + */ + public function testCanMockClassContainingMagicCallMethod() + { + $m = $this->container->mock('MockeryTest_Call1'); + $this->assertTrue($m instanceof MockeryTest_Call1); + } + + /** + * @group issue/4 + */ + public function testCanMockClassContainingMagicCallMethodWithoutTypeHinting() + { + $m = $this->container->mock('MockeryTest_Call2'); + $this->assertTrue($m instanceof MockeryTest_Call2); + } + + /** + * @group issue/14 + */ + public function testCanMockClassContainingAPublicWakeupMethod() + { + $m = $this->container->mock('MockeryTest_Wakeup1'); + $this->assertTrue($m instanceof MockeryTest_Wakeup1); + } + + /** + * @group issue/18 + */ + public function testCanMockClassUsingMagicCallMethodsInPlaceOfNormalMethods() + { + $m = Mockery::mock('Gateway'); + $m->shouldReceive('iDoSomethingReallyCoolHere'); + $m->iDoSomethingReallyCoolHere(); + } + + /** + * @group issue/18 + */ + public function testCanPartialMockObjectUsingMagicCallMethodsInPlaceOfNormalMethods() + { + $m = Mockery::mock(new Gateway); + $m->shouldReceive('iDoSomethingReallyCoolHere'); + $m->iDoSomethingReallyCoolHere(); + } + + /** + * @group issue/13 + */ + public function testCanMockClassWhereMethodHasReferencedParameter() + { + $m = Mockery::mock(new MockeryTest_MethodParamRef); + } + + /** + * @group issue/13 + */ + public function testCanPartiallyMockObjectWhereMethodHasReferencedParameter() + { + $m = Mockery::mock(new MockeryTest_MethodParamRef2); + } + + /** + * @group issue/11 + */ + public function testMockingAKnownConcreteClassCanBeGrantedAnArbitraryClassType() + { + $m = $this->container->mock('alias:MyNamespace\MyClass'); + $m->shouldReceive('foo')->andReturn('bar'); + $this->assertEquals('bar', $m->foo()); + $this->assertTrue($m instanceof MyNamespace\MyClass); + } + + /** + * @group issue/15 + */ + public function testCanMockMultipleInterfaces() + { + $m = $this->container->mock('MockeryTest_Interface1, MockeryTest_Interface2'); + $this->assertTrue($m instanceof MockeryTest_Interface1); + $this->assertTrue($m instanceof MockeryTest_Interface2); + } + + /** + * @expectedException \Mockery\Exception + */ + public function testMockingMultipleInterfacesThrowsExceptionWhenGivenNonExistingClassOrInterface() + { + $m = $this->container->mock('DoesNotExist, MockeryTest_Interface2'); + $this->assertTrue($m instanceof MockeryTest_Interface1); + $this->assertTrue($m instanceof MockeryTest_Interface2); + } + + /** + * @group issue/15 + */ + public function testCanMockClassAndApplyMultipleInterfaces() + { + $m = $this->container->mock('MockeryTestFoo, MockeryTest_Interface1, MockeryTest_Interface2'); + $this->assertTrue($m instanceof MockeryTestFoo); + $this->assertTrue($m instanceof MockeryTest_Interface1); + $this->assertTrue($m instanceof MockeryTest_Interface2); + } + + /** + * @group issue/7 + * + * Noted: We could complicate internally, but a blind class is better built + * with a real class noted up front (stdClass is a perfect choice it is + * behaviourless). Fine, it's a muddle - but we need to draw a line somewhere. + */ + public function testCanMockStaticMethods() + { + Mockery::setContainer($this->container); + $m = $this->container->mock('alias:MyNamespace\MyClass2'); + $m->shouldReceive('staticFoo')->andReturn('bar'); + $this->assertEquals('bar', \MyNameSpace\MyClass2::staticFoo()); + Mockery::resetContainer(); + } + + /** + * @group issue/7 + * @expectedException \Mockery\CountValidator\Exception + */ + public function testMockedStaticMethodsObeyMethodCounting() + { + Mockery::setContainer($this->container); + $m = $this->container->mock('alias:MyNamespace\MyClass3'); + $m->shouldReceive('staticFoo')->once()->andReturn('bar'); + $this->container->mockery_verify(); + Mockery::resetContainer(); + } + + /** + * @expectedException BadMethodCallException + */ + public function testMockedStaticThrowsExceptionWhenMethodDoesNotExist() + { + Mockery::setContainer($this->container); + $m = $this->container->mock('alias:MyNamespace\StaticNoMethod'); + $this->assertEquals('bar', MyNameSpace\StaticNoMethod::staticFoo()); + Mockery::resetContainer(); + } + + /** + * @group issue/17 + */ + public function testMockingAllowsPublicPropertyStubbingOnRealClass() + { + $m = $this->container->mock('MockeryTestFoo'); + $m->foo = 'bar'; + $this->assertEquals('bar', $m->foo); + //$this->assertTrue(array_key_exists('foo', $m->mockery_getMockableProperties())); + } + + /** + * @group issue/17 + */ + public function testMockingAllowsPublicPropertyStubbingOnNamedMock() + { + $m = $this->container->mock('Foo'); + $m->foo = 'bar'; + $this->assertEquals('bar', $m->foo); + //$this->assertTrue(array_key_exists('foo', $m->mockery_getMockableProperties())); + } + + /** + * @group issue/17 + */ + public function testMockingAllowsPublicPropertyStubbingOnPartials() + { + $m = $this->container->mock(new stdClass); + $m->foo = 'bar'; + $this->assertEquals('bar', $m->foo); + //$this->assertTrue(array_key_exists('foo', $m->mockery_getMockableProperties())); + } + + /** + * @group issue/17 + */ + public function testMockingDoesNotStubNonStubbedPropertiesOnPartials() + { + $m = $this->container->mock(new MockeryTest_ExistingProperty); + $this->assertEquals('bar', $m->foo); + $this->assertFalse(array_key_exists('foo', $m->mockery_getMockableProperties())); + } + + public function testCreationOfInstanceMock() + { + $m = $this->container->mock('overload:MyNamespace\MyClass4'); + $this->assertTrue($m instanceof MyNamespace\MyClass4); + } + + public function testInstantiationOfInstanceMock() + { + Mockery::setContainer($this->container); + $m = $this->container->mock('overload:MyNamespace\MyClass5'); + $instance = new MyNamespace\MyClass5; + $this->assertTrue($instance instanceof MyNamespace\MyClass5); + Mockery::resetContainer(); + } + + public function testInstantiationOfInstanceMockImportsExpectations() + { + Mockery::setContainer($this->container); + $m = $this->container->mock('overload:MyNamespace\MyClass6'); + $m->shouldReceive('foo')->andReturn('bar'); + $instance = new MyNamespace\MyClass6; + $this->assertEquals('bar', $instance->foo()); + Mockery::resetContainer(); + } + + public function testInstantiationOfInstanceMocksIgnoresVerificationOfOriginMock() + { + Mockery::setContainer($this->container); + $m = $this->container->mock('overload:MyNamespace\MyClass7'); + $m->shouldReceive('foo')->once()->andReturn('bar'); + $this->container->mockery_verify(); + Mockery::resetContainer(); //should not throw an exception + } + + /** + * @expectedException \Mockery\CountValidator\Exception + */ + public function testInstantiationOfInstanceMocksAddsThemToContainerForVerification() + { + Mockery::setContainer($this->container); + $m = $this->container->mock('overload:MyNamespace\MyClass8'); + $m->shouldReceive('foo')->once(); + $instance = new MyNamespace\MyClass8; + $this->container->mockery_verify(); + Mockery::resetContainer(); + } + + public function testInstantiationOfInstanceMocksDoesNotHaveCountValidatorCrossover() + { + Mockery::setContainer($this->container); + $m = $this->container->mock('overload:MyNamespace\MyClass9'); + $m->shouldReceive('foo')->once(); + $instance1 = new MyNamespace\MyClass9; + $instance2 = new MyNamespace\MyClass9; + $instance1->foo(); + $instance2->foo(); + $this->container->mockery_verify(); + Mockery::resetContainer(); + } + + /** + * @expectedException \Mockery\CountValidator\Exception + */ + public function testInstantiationOfInstanceMocksDoesNotHaveCountValidatorCrossover2() + { + Mockery::setContainer($this->container); + $m = $this->container->mock('overload:MyNamespace\MyClass10'); + $m->shouldReceive('foo')->once(); + $instance1 = new MyNamespace\MyClass10; + $instance2 = new MyNamespace\MyClass10; + $instance1->foo(); + $this->container->mockery_verify(); + Mockery::resetContainer(); + } + + public function testCreationOfInstanceMockWithFullyQualifiedName() + { + $m = $this->container->mock('overload:\MyNamespace\MyClass11'); + $this->assertTrue($m instanceof MyNamespace\MyClass11); + } + + public function testInstanceMocksShouldIgnoreMissing() + { + Mockery::setContainer($this->container); + $m = $this->container->mock('overload:MyNamespace\MyClass12'); + $m->shouldIgnoreMissing(); + + $instance = new MyNamespace\MyClass12(); + $instance->foo(); + + Mockery::resetContainer(); + } + + public function testMethodParamsPassedByReferenceHaveReferencePreserved() + { + $m = $this->container->mock('MockeryTestRef1'); + $m->shouldReceive('foo')->with( + Mockery::on(function (&$a) {$a += 1;return true;}), + Mockery::any() + ); + $a = 1; + $b = 1; + $m->foo($a, $b); + $this->assertEquals(2, $a); + $this->assertEquals(1, $b); + } + + /** + * Meant to test the same logic as + * testCanOverrideExpectedParametersOfExtensionPHPClassesToPreserveRefs, + * but: + * - doesn't require an extension + * - isn't actually known to be used + */ + public function testCanOverrideExpectedParametersOfInternalPHPClassesToPreserveRefs() + { + Mockery::getConfiguration()->setInternalClassMethodParamMap( + 'DateTime', 'modify', array('&$string') + ); + // @ used to avoid E_STRICT for incompatible signature + @$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;}) + ); + $data ='bar'; + $m->modify($data); + $this->assertEquals('foo', $data); + $this->container->mockery_verify(); + Mockery::resetContainer(); + Mockery::getConfiguration()->resetInternalClassMethodParamMaps(); + } + + /** + * Real world version of + * testCanOverrideExpectedParametersOfInternalPHPClassesToPreserveRefs + */ + public function testCanOverrideExpectedParametersOfExtensionPHPClassesToPreserveRefs() + { + if (!class_exists('MongoCollection', false)) { + $this->markTestSkipped('ext/mongo not installed'); + } + Mockery::getConfiguration()->setInternalClassMethodParamMap( + 'MongoCollection', 'insert', array('&$data', '$options') + ); + // @ used to avoid E_STRICT for incompatible signature + @$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::type('array') + ); + $data = array('a'=>1,'b'=>2); + $m->insert($data, array()); + $this->assertTrue(isset($data['_id'])); + $this->assertEquals(123, $data['_id']); + $this->container->mockery_verify(); + Mockery::resetContainer(); + Mockery::getConfiguration()->resetInternalClassMethodParamMaps(); + } + + public function testCanCreateNonOverridenInstanceOfPreviouslyOverridenInternalClasses() + { + Mockery::getConfiguration()->setInternalClassMethodParamMap( + 'DateTime', 'modify', array('&$string') + ); + // @ used to avoid E_STRICT for incompatible signature + @$m = $this->container->mock('DateTime'); + $this->assertInstanceOf("Mockery\MockInterface", $m, "Mocking failed, remove @ error suppresion to debug"); + $rc = new ReflectionClass($m); + $rm = $rc->getMethod('modify'); + $params = $rm->getParameters(); + $this->assertTrue($params[0]->isPassedByReference()); + + Mockery::getConfiguration()->resetInternalClassMethodParamMaps(); + + $m = $this->container->mock('DateTime'); + $this->assertInstanceOf("Mockery\MockInterface", $m, "Mocking failed"); + $rc = new ReflectionClass($m); + $rm = $rc->getMethod('modify'); + $params = $rm->getParameters(); + $this->assertFalse($params[0]->isPassedByReference()); + + Mockery::resetContainer(); + Mockery::getConfiguration()->resetInternalClassMethodParamMaps(); + } + + /** + * @group abstract + */ + public function testCanMockAbstractClassWithAbstractPublicMethod() + { + $m = $this->container->mock('MockeryTest_AbstractWithAbstractPublicMethod'); + $this->assertTrue($m instanceof MockeryTest_AbstractWithAbstractPublicMethod); + } + + /** + * @issue issue/21 + */ + public function testClassDeclaringIssetDoesNotThrowException() + { + Mockery::setContainer($this->container); + $m = $this->container->mock('MockeryTest_IssetMethod'); + $this->container->mockery_verify(); + Mockery::resetContainer(); + } + + /** + * @issue issue/21 + */ + public function testClassDeclaringUnsetDoesNotThrowException() + { + Mockery::setContainer($this->container); + $m = $this->container->mock('MockeryTest_UnsetMethod'); + $this->container->mockery_verify(); + Mockery::resetContainer(); + } + + /** + * @issue issue/35 + */ + public function testCallingSelfOnlyReturnsLastMockCreatedOrCurrentMockBeingProgrammedSinceTheyAreOneAndTheSame() + { + Mockery::setContainer($this->container); + $m = $this->container->mock('MockeryTestFoo'); + $this->assertFalse($this->container->self() instanceof MockeryTestFoo2); + //$m = $this->container->mock('MockeryTestFoo2'); + //$this->assertTrue($this->container->self() instanceof MockeryTestFoo2); + //$m = $this->container->mock('MockeryTestFoo'); + //$this->assertFalse(Mockery::self() instanceof MockeryTestFoo2); + //$this->assertTrue(Mockery::self() instanceof MockeryTestFoo); + Mockery::resetContainer(); + } + + /** + * @issue issue/89 + */ + public function testCreatingMockOfClassWithExistingToStringMethodDoesntCreateClassWithTwoToStringMethods() + { + Mockery::setContainer($this->container); + $m = $this->container->mock('MockeryTest_WithToString'); // this would fatal + $m->shouldReceive("__toString")->andReturn('dave'); + $this->assertEquals("dave", "$m"); + } + + public function testGetExpectationCount_freshContainer() + { + $this->assertEquals(0, $this->container->mockery_getExpectationCount()); + } + + public function testGetExpectationCount_simplestMock() + { + $m = $this->container->mock(); + $m->shouldReceive('foo')->andReturn('bar'); + $this->assertEquals(1, $this->container->mockery_getExpectationCount()); + } + + public function testMethodsReturningParamsByReferenceDoesNotErrorOut() + { + $this->container->mock('MockeryTest_ReturnByRef'); + $mock = $this->container->mock('MockeryTest_ReturnByRef'); + $mock->shouldReceive("get")->andReturn($var = 123); + $this->assertSame($var, $mock->get()); + } + + public function testMockCallableTypeHint() + { + if (PHP_VERSION_ID >= 50400) { + $this->container->mock('MockeryTest_MockCallableTypeHint'); + } + } + + public function testCanMockClassWithReservedWordMethod() + { + if (!extension_loaded("redis")) { + $this->markTestSkipped("phpredis not installed"); + } + + $this->container->mock("Redis"); + } + + public function testUndeclaredClassIsDeclared() + { + $this->assertFalse(class_exists("BlahBlah")); + $mock = $this->container->mock("BlahBlah"); + $this->assertInstanceOf("BlahBlah", $mock); + } + + public function testUndeclaredClassWithNamespaceIsDeclared() + { + $this->assertFalse(class_exists("MyClasses\Blah\BlahBlah")); + $mock = $this->container->mock("MyClasses\Blah\BlahBlah"); + $this->assertInstanceOf("MyClasses\Blah\BlahBlah", $mock); + } + + public function testUndeclaredClassWithNamespaceIncludingLeadingOperatorIsDeclared() + { + $this->assertFalse(class_exists("\MyClasses\DaveBlah\BlahBlah")); + $mock = $this->container->mock("\MyClasses\DaveBlah\BlahBlah"); + $this->assertInstanceOf("\MyClasses\DaveBlah\BlahBlah", $mock); + } + + public function testMockingPhpredisExtensionClassWorks() + { + if (!class_exists('Redis')) { + $this->markTestSkipped('PHPRedis extension required for this test'); + } + $m = $this->container->mock('Redis'); + } + + public function testIssetMappingUsingProxiedPartials_CheckNoExceptionThrown() + { + $var = $this->container->mock(new MockeryTestIsset_Bar()); + $mock = $this->container->mock(new MockeryTestIsset_Foo($var)); + $mock->shouldReceive('bar')->once(); + $mock->bar(); + $this->container->mockery_teardown(); // closed by teardown() + } + + /** + * @group traversable1 + */ + public function testCanMockInterfacesExtendingTraversable() + { + $mock = $this->container->mock('MockeryTest_InterfaceWithTraversable'); + $this->assertInstanceOf('MockeryTest_InterfaceWithTraversable', $mock); + $this->assertInstanceOf('ArrayAccess', $mock); + $this->assertInstanceOf('Countable', $mock); + $this->assertInstanceOf('Traversable', $mock); + } + + /** + * @group traversable2 + */ + public function testCanMockInterfacesAlongsideTraversable() + { + $mock = $this->container->mock('stdClass, ArrayAccess, Countable, Traversable'); + $this->assertInstanceOf('stdClass', $mock); + $this->assertInstanceOf('ArrayAccess', $mock); + $this->assertInstanceOf('Countable', $mock); + $this->assertInstanceOf('Traversable', $mock); + } + + public function testInterfacesCanHaveAssertions() + { + Mockery::setContainer($this->container); + $m = $this->container->mock('stdClass, ArrayAccess, Countable, Traversable'); + $m->shouldReceive('foo')->once(); + $m->foo(); + $this->container->mockery_verify(); + Mockery::resetContainer(); + } + + public function testMockingIteratorAggregateDoesNotImplementIterator() + { + $mock = $this->container->mock('MockeryTest_ImplementsIteratorAggregate'); + $this->assertInstanceOf('IteratorAggregate', $mock); + $this->assertInstanceOf('Traversable', $mock); + $this->assertNotInstanceOf('Iterator', $mock); + } + + public function testMockingInterfaceThatExtendsIteratorDoesNotImplementIterator() + { + $mock = $this->container->mock('MockeryTest_InterfaceThatExtendsIterator'); + $this->assertInstanceOf('Iterator', $mock); + $this->assertInstanceOf('Traversable', $mock); + } + + public function testMockingInterfaceThatExtendsIteratorAggregateDoesNotImplementIterator() + { + $mock = $this->container->mock('MockeryTest_InterfaceThatExtendsIteratorAggregate'); + $this->assertInstanceOf('IteratorAggregate', $mock); + $this->assertInstanceOf('Traversable', $mock); + $this->assertNotInstanceOf('Iterator', $mock); + } + + public function testMockingIteratorAggregateDoesNotImplementIteratorAlongside() + { + $mock = $this->container->mock('IteratorAggregate'); + $this->assertInstanceOf('IteratorAggregate', $mock); + $this->assertInstanceOf('Traversable', $mock); + $this->assertNotInstanceOf('Iterator', $mock); + } + + public function testMockingIteratorDoesNotImplementIteratorAlongside() + { + $mock = $this->container->mock('Iterator'); + $this->assertInstanceOf('Iterator', $mock); + $this->assertInstanceOf('Traversable', $mock); + } + + public function testMockingIteratorDoesNotImplementIterator() + { + $mock = $this->container->mock('MockeryTest_ImplementsIterator'); + $this->assertInstanceOf('Iterator', $mock); + $this->assertInstanceOf('Traversable', $mock); + } + + public function testMockeryCloseForIllegalIssetFileInclude() + { + $m = Mockery::mock('StdClass') + ->shouldReceive('get') + ->andReturn(false) + ->getMock(); + $m->get(); + Mockery::close(); + } + + public function testMockeryShouldDistinguishBetweenConstructorParamsAndClosures() + { + $obj = new MockeryTestFoo(); + $mock = $this->container->mock('MockeryTest_ClassMultipleConstructorParams[dave]', + array( &$obj, 'foo' )); + } + + /** @group nette */ + public function testMockeryShouldNotMockCallstaticMagicMethod() + { + $mock = $this->container->mock('MockeryTest_CallStatic'); + } + + /** + * @issue issue/139 + */ + public function testCanMockClassWithOldStyleConstructorAndArguments() + { + $mock = $this->container->mock('MockeryTest_OldStyleConstructor'); + } + + /** @group issue/144 */ + public function testMockeryShouldInterpretEmptyArrayAsConstructorArgs() + { + $mock = $this->container->mock("EmptyConstructorTest", array()); + $this->assertSame(0, $mock->numberOfConstructorArgs); + } + + /** @group issue/144 */ + public function testMockeryShouldCallConstructorByDefaultWhenRequestingPartials() + { + $mock = $this->container->mock("EmptyConstructorTest[foo]"); + $this->assertSame(0, $mock->numberOfConstructorArgs); + } + + /** @group issue/158 */ + public function testMockeryShouldRespectInterfaceWithMethodParamSelf() + { + $this->container->mock('MockeryTest_InterfaceWithMethodParamSelf'); + } + + /** @group issue/162 */ + public function testMockeryDoesntTryAndMockLowercaseToString() + { + $this->container->mock('MockeryTest_Lowercase_ToString'); + } + + /** @group issue/175 */ + public function testExistingStaticMethodMocking() + { + Mockery::setContainer($this->container); + $mock = $this->container->mock('MockeryTest_PartialStatic[mockMe]'); + + $mock->shouldReceive('mockMe')->with(5)->andReturn(10); + + $this->assertEquals(10, $mock::mockMe(5)); + $this->assertEquals(3, $mock::keepMe(3)); + } + + /** + * @group issue/154 + * @expectedException InvalidArgumentException + * @expectedExceptionMessage protectedMethod() cannot be mocked as it a protected method and mocking protected methods is not allowed for this mock + */ + public function testShouldThrowIfAttemptingToStubProtectedMethod() + { + $mock = $this->container->mock('MockeryTest_WithProtectedAndPrivate'); + $mock->shouldReceive("protectedMethod"); + } + + /** + * @group issue/154 + * @expectedException InvalidArgumentException + * @expectedExceptionMessage privateMethod() cannot be mocked as it is a private method + */ + public function testShouldThrowIfAttemptingToStubPrivateMethod() + { + $mock = $this->container->mock('MockeryTest_WithProtectedAndPrivate'); + $mock->shouldReceive("privateMethod"); + } + + public function testWakeupMagicIsNotMockedToAllowSerialisationInstanceHack() + { + $mock = $this->container->mock('DateTime'); + } + + /** + * @group issue/154 + */ + public function testCanMockMethodsWithRequiredParamsThatHaveDefaultValues() + { + $mock = $this->container->mock('MockeryTest_MethodWithRequiredParamWithDefaultValue'); + $mock->shouldIgnoreMissing(); + $mock->foo(null, 123); + } + + /** + * @test + * @group issue/294 + * @expectedException Mockery\Exception\RuntimeException + * @expectedExceptionMessage Could not load mock DateTime, class already exists + */ + public function testThrowsWhenNamedMockClassExistsAndIsNotMockery() + { + $builder = new MockConfigurationBuilder(); + $builder->setName("DateTime"); + $mock = $this->container->mock($builder); + } + + /** + * @expectedException Mockery\Exception\NoMatchingExpectationException + * @expectedExceptionMessage MyTestClass::foo(resource(...)) + */ + public function testHandlesMethodWithArgumentExpectationWhenCalledWithResource() + { + $mock = $this->container->mock('MyTestClass'); + $mock->shouldReceive('foo')->with(array('yourself' => 21)); + + $mock->foo(fopen('php://memory', 'r')); + } + + /** + * @expectedException Mockery\Exception\NoMatchingExpectationException + * @expectedExceptionMessage MyTestClass::foo(array('myself'=>'array(...)',)) + */ + public function testHandlesMethodWithArgumentExpectationWhenCalledWithCircularArray() + { + $testArray = array(); + $testArray['myself'] =& $testArray; + + $mock = $this->container->mock('MyTestClass'); + $mock->shouldReceive('foo')->with(array('yourself' => 21)); + + $mock->foo($testArray); + } + + /** + * @expectedException Mockery\Exception\NoMatchingExpectationException + * @expectedExceptionMessage MyTestClass::foo(array('a_scalar'=>2,'an_array'=>'array(...)',)) + */ + public function testHandlesMethodWithArgumentExpectationWhenCalledWithNestedArray() + { + $testArray = array(); + $testArray['a_scalar'] = 2; + $testArray['an_array'] = array(1, 2, 3); + + $mock = $this->container->mock('MyTestClass'); + $mock->shouldReceive('foo')->with(array('yourself' => 21)); + + $mock->foo($testArray); + } + + /** + * @expectedException Mockery\Exception\NoMatchingExpectationException + * @expectedExceptionMessage MyTestClass::foo(array('a_scalar'=>2,'an_object'=>'object(stdClass)',)) + */ + public function testHandlesMethodWithArgumentExpectationWhenCalledWithNestedObject() + { + $testArray = array(); + $testArray['a_scalar'] = 2; + $testArray['an_object'] = new stdClass(); + + $mock = $this->container->mock('MyTestClass'); + $mock->shouldReceive('foo')->with(array('yourself' => 21)); + + $mock->foo($testArray); + } + + /** + * @expectedException Mockery\Exception\NoMatchingExpectationException + * @expectedExceptionMessage MyTestClass::foo(array('a_scalar'=>2,'a_closure'=>'object(Closure + */ + public function testHandlesMethodWithArgumentExpectationWhenCalledWithNestedClosure() + { + $testArray = array(); + $testArray['a_scalar'] = 2; + $testArray['a_closure'] = function () { + }; + + $mock = $this->container->mock('MyTestClass'); + $mock->shouldReceive('foo')->with(array('yourself' => 21)); + + $mock->foo($testArray); + } + + /** + * @expectedException Mockery\Exception\NoMatchingExpectationException + * @expectedExceptionMessage MyTestClass::foo(array('a_scalar'=>2,'a_resource'=>'resource(...)',)) + */ + public function testHandlesMethodWithArgumentExpectationWhenCalledWithNestedResource() + { + $testArray = array(); + $testArray['a_scalar'] = 2; + $testArray['a_resource'] = fopen('php://memory', 'r'); + + $mock = $this->container->mock('MyTestClass'); + $mock->shouldReceive('foo')->with(array('yourself' => 21)); + + $mock->foo($testArray); + } + + /** + * @test + * @group issue/339 + */ + public function canMockClassesThatDescendFromInternalClasses() + { + $mock = $this->container->mock("MockeryTest_ClassThatDescendsFromInternalClass"); + $this->assertInstanceOf("DateTime", $mock); + } + + /** + * @test + * @group issue/339 + */ + public function canMockClassesThatImplementSerializable() + { + $mock = $this->container->mock("MockeryTest_ClassThatImplementsSerializable"); + $this->assertInstanceOf("Serializable", $mock); + } + + /** + * @test + * @group issue/346 + */ + public function canMockInternalClassesThatImplementSerializable() + { + $mock = $this->container->mock("ArrayObject"); + $this->assertInstanceOf("Serializable", $mock); + } +} + +class MockeryTest_CallStatic +{ + public static function __callStatic($method, $args) + { + } +} + +class MockeryTest_ClassMultipleConstructorParams +{ + public function __construct($a, $b) + { + } + + public function dave() + { + } +} + +interface MockeryTest_InterfaceWithTraversable extends ArrayAccess, Traversable, Countable +{ + public function self(); +} + +class MockeryTestIsset_Bar +{ + public function doSomething() + { + } +} + +class MockeryTestIsset_Foo +{ + private $var; + + public function __construct($var) + { + $this->var = $var; + } + + public function __get($name) + { + $this->var->doSomething(); + } + + public function __isset($name) + { + return (bool) strlen($this->__get($name)); + } +} + +class MockeryTest_IssetMethod +{ + protected $_properties = array(); + + public function __construct() + { + } + + public function __isset($property) + { + return isset($this->_properties[$property]); + } +} + +class MockeryTest_UnsetMethod +{ + protected $_properties = array(); + + public function __construct() + { + } + + public function __unset($property) + { + unset($this->_properties[$property]); + } +} + +class MockeryTestFoo +{ + public function foo() + { + return 'foo'; + } +} + +class MockeryTestFoo2 +{ + public function foo() + { + return 'foo'; + } + + public function bar() + { + return 'bar'; + } +} + +final class MockeryFoo3 +{ + public function foo() + { + return 'baz'; + } +} + +class MockeryFoo4 +{ + final public function foo() + { + return 'baz'; + } + + public function bar() + { + return 'bar'; + } +} + +interface MockeryTest_Interface +{ +} +interface MockeryTest_Interface1 +{ +} +interface MockeryTest_Interface2 +{ +} + +interface MockeryTest_InterfaceWithAbstractMethod +{ + public function set(); +} + +interface MockeryTest_InterfaceWithPublicStaticMethod +{ + public static function self(); +} + +abstract class MockeryTest_AbstractWithAbstractMethod +{ + abstract protected function set(); +} + +class MockeryTest_WithProtectedAndPrivate +{ + protected function protectedMethod() + { + } + + private function privateMethod() + { + } +} + +class MockeryTest_ClassConstructor +{ + public function __construct($param1) + { + } +} + +class MockeryTest_ClassConstructor2 +{ + protected $param1; + + public function __construct(stdClass $param1) + { + $this->param1 = $param1; + } + + public function getParam1() + { + return $this->param1; + } + + public function foo() + { + return 'foo'; + } + + public function bar() + { + return $this->foo(); + } +} + +class MockeryTest_Call1 +{ + public function __call($method, array $params) + { + } +} + +class MockeryTest_Call2 +{ + public function __call($method, $params) + { + } +} + +class MockeryTest_Wakeup1 +{ + public function __construct() + { + } + + public function __wakeup() + { + } +} + +class MockeryTest_ExistingProperty +{ + public $foo = 'bar'; +} + +abstract class MockeryTest_AbstractWithAbstractPublicMethod +{ + abstract public function foo($a, $b); +} + +// issue/18 +class SoCool +{ + public function iDoSomethingReallyCoolHere() + { + return 3; + } +} + +class Gateway +{ + public function __call($method, $args) + { + $m = new SoCool(); + return call_user_func_array(array($m, $method), $args); + } +} + +class MockeryTestBar1 +{ + public function method1() + { + return $this; + } +} + +class MockeryTest_ReturnByRef +{ + public $i = 0; + + public function &get() + { + return $this->$i; + } +} + +class MockeryTest_MethodParamRef +{ + public function method1(&$foo) + { + return true; + } +} +class MockeryTest_MethodParamRef2 +{ + public function method1(&$foo) + { + return true; + } +} +class MockeryTestRef1 +{ + public function foo(&$a, $b) + { + } +} + +class MockeryTest_PartialNormalClass +{ + public function foo() + { + return 'abc'; + } + + public function bar() + { + return 'abc'; + } +} + +abstract class MockeryTest_PartialAbstractClass +{ + abstract public function foo(); + + public function bar() + { + return 'abc'; + } +} + +class MockeryTest_PartialNormalClass2 +{ + public function foo() + { + return 'abc'; + } + + public function bar() + { + return 'abc'; + } + + public function baz() + { + return 'abc'; + } +} + +abstract class MockeryTest_PartialAbstractClass2 +{ + abstract public function foo(); + + public function bar() + { + return 'abc'; + } + + abstract public function baz(); +} + +class MockeryTest_TestInheritedType +{ +} + +if (PHP_VERSION_ID >= 50400) { + class MockeryTest_MockCallableTypeHint + { + public function foo(callable $baz) + { + $baz(); + } + + public function bar(callable $callback = null) + { + $callback(); + } + } +} + +class MockeryTest_WithToString +{ + public function __toString() + { + } +} + +class MockeryTest_ImplementsIteratorAggregate implements IteratorAggregate +{ + public function getIterator() + { + return new ArrayIterator(array()); + } +} + +class MockeryTest_ImplementsIterator implements Iterator +{ + public function rewind() + { + } + + public function current() + { + } + + public function key() + { + } + + public function next() + { + } + + public function valid() + { + } +} + +class MockeryTest_OldStyleConstructor +{ + public function MockeryTest_OldStyleConstructor($arg) + { + } +} + +class EmptyConstructorTest +{ + public $numberOfConstructorArgs; + + public function __construct() + { + $this->numberOfConstructorArgs = count(func_get_args()); + } + + public function foo() + { + } +} + +interface MockeryTest_InterfaceWithMethodParamSelf +{ + public function foo(self $bar); +} + +class MockeryTest_Lowercase_ToString +{ + public function __tostring() + { + } +} + +class MockeryTest_PartialStatic +{ + public static function mockMe($a) + { + return $a; + } + + public static function keepMe($b) + { + return $b; + } +} + +class MockeryTest_MethodWithRequiredParamWithDefaultValue +{ + public function foo(DateTime $bar = null, $baz) + { + } +} + +interface MockeryTest_InterfaceThatExtendsIterator extends Iterator +{ + public function foo(); +} + +interface MockeryTest_InterfaceThatExtendsIteratorAggregate extends IteratorAggregate +{ + public function foo(); +} + +class MockeryTest_ClassThatDescendsFromInternalClass extends DateTime +{ +} + +class MockeryTest_ClassThatImplementsSerializable implements Serializable +{ + public function serialize() + { + } + + public function unserialize($serialized) + { + } +} diff --git a/vendor/mockery/mockery/tests/Mockery/DemeterChainTest.php b/vendor/mockery/mockery/tests/Mockery/DemeterChainTest.php new file mode 100644 index 0000000..9767f1e --- /dev/null +++ b/vendor/mockery/mockery/tests/Mockery/DemeterChainTest.php @@ -0,0 +1,170 @@ +mock */ + private $mock; + + public function setUp() + { + $this->mock = $this->mock = Mockery::mock('object')->shouldIgnoreMissing(); + } + + public function tearDown() + { + $this->mock->mockery_getContainer()->mockery_close(); + } + + public function testTwoChains() + { + $this->mock->shouldReceive('getElement->getFirst') + ->once() + ->andReturn('something'); + + $this->mock->shouldReceive('getElement->getSecond') + ->once() + ->andReturn('somethingElse'); + + $this->assertEquals( + 'something', + $this->mock->getElement()->getFirst() + ); + $this->assertEquals( + 'somethingElse', + $this->mock->getElement()->getSecond() + ); + $this->mock->mockery_getContainer()->mockery_close(); + } + + public function testTwoChainsWithExpectedParameters() + { + $this->mock->shouldReceive('getElement->getFirst') + ->once() + ->with('parameter') + ->andReturn('something'); + + $this->mock->shouldReceive('getElement->getSecond') + ->once() + ->with('secondParameter') + ->andReturn('somethingElse'); + + $this->assertEquals( + 'something', + $this->mock->getElement()->getFirst('parameter') + ); + $this->assertEquals( + 'somethingElse', + $this->mock->getElement()->getSecond('secondParameter') + ); + $this->mock->mockery_getContainer()->mockery_close(); + } + + public function testThreeChains() + { + $this->mock->shouldReceive('getElement->getFirst') + ->once() + ->andReturn('something'); + + $this->mock->shouldReceive('getElement->getSecond') + ->once() + ->andReturn('somethingElse'); + + $this->assertEquals( + 'something', + $this->mock->getElement()->getFirst() + ); + $this->assertEquals( + 'somethingElse', + $this->mock->getElement()->getSecond() + ); + $this->mock->shouldReceive('getElement->getFirst') + ->once() + ->andReturn('somethingNew'); + $this->assertEquals( + 'somethingNew', + $this->mock->getElement()->getFirst() + ); + } + + public function testManyChains() + { + $this->mock->shouldReceive('getElements->getFirst') + ->once() + ->andReturn('something'); + + $this->mock->shouldReceive('getElements->getSecond') + ->once() + ->andReturn('somethingElse'); + + $this->mock->getElements()->getFirst(); + $this->mock->getElements()->getSecond(); + } + + public function testTwoNotRelatedChains() + { + $this->mock->shouldReceive('getElement->getFirst') + ->once() + ->andReturn('something'); + + $this->mock->shouldReceive('getOtherElement->getSecond') + ->once() + ->andReturn('somethingElse'); + + $this->assertEquals( + 'somethingElse', + $this->mock->getOtherElement()->getSecond() + ); + $this->assertEquals( + 'something', + $this->mock->getElement()->getFirst() + ); + } + + public function testDemeterChain() + { + $this->mock->shouldReceive('getElement->getFirst') + ->once() + ->andReturn('somethingElse'); + + $this->assertEquals('somethingElse', $this->mock->getElement()->getFirst()); + } + + public function testMultiLevelDemeterChain() + { + $this->mock->shouldReceive('levelOne->levelTwo->getFirst') + ->andReturn('first'); + + $this->mock->shouldReceive('levelOne->levelTwo->getSecond') + ->andReturn('second'); + + $this->assertEquals( + 'second', + $this->mock->levelOne()->levelTwo()->getSecond() + ); + $this->assertEquals( + 'first', + $this->mock->levelOne()->levelTwo()->getFirst() + ); + } +} diff --git a/vendor/mockery/mockery/tests/Mockery/ExpectationTest.php b/vendor/mockery/mockery/tests/Mockery/ExpectationTest.php new file mode 100644 index 0000000..c3c3199 --- /dev/null +++ b/vendor/mockery/mockery/tests/Mockery/ExpectationTest.php @@ -0,0 +1,2040 @@ +container = new \Mockery\Container(\Mockery::getDefaultGenerator(), \Mockery::getDefaultLoader()); + $this->mock = $this->container->mock('foo'); + } + + public function teardown() + { + \Mockery::getConfiguration()->allowMockingNonExistentMethods(true); + $this->container->mockery_close(); + } + + public function testReturnsNullWhenNoArgs() + { + $this->mock->shouldReceive('foo'); + $this->assertNull($this->mock->foo()); + } + + public function testReturnsNullWhenSingleArg() + { + $this->mock->shouldReceive('foo'); + $this->assertNull($this->mock->foo(1)); + } + + public function testReturnsNullWhenManyArgs() + { + $this->mock->shouldReceive('foo'); + $this->assertNull($this->mock->foo('foo', array(), new stdClass)); + } + + public function testReturnsNullIfNullIsReturnValue() + { + $this->mock->shouldReceive('foo')->andReturn(null); + $this->assertNull($this->mock->foo()); + } + + public function testReturnsNullForMockedExistingClassIfAndreturnnullCalled() + { + $mock = $this->container->mock('MockeryTest_Foo'); + $mock->shouldReceive('foo')->andReturn(null); + $this->assertNull($mock->foo()); + } + + public function testReturnsNullForMockedExistingClassIfNullIsReturnValue() + { + $mock = $this->container->mock('MockeryTest_Foo'); + $mock->shouldReceive('foo')->andReturnNull(); + $this->assertNull($mock->foo()); + } + + public function testReturnsSameValueForAllIfNoArgsExpectationAndNoneGiven() + { + $this->mock->shouldReceive('foo')->andReturn(1); + $this->assertEquals(1, $this->mock->foo()); + } + + public function testSetsPublicPropertyWhenRequested() + { + $this->mock->bar = null; + $this->mock->shouldReceive('foo')->andSet('bar', 'baz'); + $this->assertNull($this->mock->bar); + $this->mock->foo(); + $this->assertEquals('baz', $this->mock->bar); + } + + public function testSetsPublicPropertyWhenRequestedUsingAlias() + { + $this->mock->bar = null; + $this->mock->shouldReceive('foo')->set('bar', 'baz'); + $this->assertNull($this->mock->bar); + $this->mock->foo(); + $this->assertEquals('baz', $this->mock->bar); + } + + public function testSetsPublicPropertiesWhenRequested() + { + $this->mock->bar = null; + $this->mock->shouldReceive('foo')->andSet('bar', 'baz', 'bazz', 'bazzz'); + $this->assertNull($this->mock->bar); + $this->mock->foo(); + $this->assertEquals('baz', $this->mock->bar); + $this->mock->foo(); + $this->assertEquals('bazz', $this->mock->bar); + $this->mock->foo(); + $this->assertEquals('bazzz', $this->mock->bar); + } + + public function testSetsPublicPropertiesWhenRequestedUsingAlias() + { + $this->mock->bar = null; + $this->mock->shouldReceive('foo')->set('bar', 'baz', 'bazz', 'bazzz'); + $this->assertAttributeEmpty('bar', $this->mock); + $this->mock->foo(); + $this->assertEquals('baz', $this->mock->bar); + $this->mock->foo(); + $this->assertEquals('bazz', $this->mock->bar); + $this->mock->foo(); + $this->assertEquals('bazzz', $this->mock->bar); + } + + public function testSetsPublicPropertiesWhenRequestedMoreTimesThanSetValues() + { + $this->mock->bar = null; + $this->mock->shouldReceive('foo')->andSet('bar', 'baz', 'bazz'); + $this->assertNull($this->mock->bar); + $this->mock->foo(); + $this->assertEquals('baz', $this->mock->bar); + $this->mock->foo(); + $this->assertEquals('bazz', $this->mock->bar); + $this->mock->foo(); + $this->assertEquals('bazz', $this->mock->bar); + } + + public function testSetsPublicPropertiesWhenRequestedMoreTimesThanSetValuesUsingAlias() + { + $this->mock->bar = null; + $this->mock->shouldReceive('foo')->andSet('bar', 'baz', 'bazz'); + $this->assertNull($this->mock->bar); + $this->mock->foo(); + $this->assertEquals('baz', $this->mock->bar); + $this->mock->foo(); + $this->assertEquals('bazz', $this->mock->bar); + $this->mock->foo(); + $this->assertEquals('bazz', $this->mock->bar); + } + + public function testSetsPublicPropertiesWhenRequestedMoreTimesThanSetValuesWithDirectSet() + { + $this->mock->bar = null; + $this->mock->shouldReceive('foo')->andSet('bar', 'baz', 'bazz'); + $this->assertNull($this->mock->bar); + $this->mock->foo(); + $this->assertEquals('baz', $this->mock->bar); + $this->mock->foo(); + $this->assertEquals('bazz', $this->mock->bar); + $this->mock->bar = null; + $this->mock->foo(); + $this->assertNull($this->mock->bar); + } + + public function testSetsPublicPropertiesWhenRequestedMoreTimesThanSetValuesWithDirectSetUsingAlias() + { + $this->mock->bar = null; + $this->mock->shouldReceive('foo')->set('bar', 'baz', 'bazz'); + $this->assertNull($this->mock->bar); + $this->mock->foo(); + $this->assertEquals('baz', $this->mock->bar); + $this->mock->foo(); + $this->assertEquals('bazz', $this->mock->bar); + $this->mock->bar = null; + $this->mock->foo(); + $this->assertNull($this->mock->bar); + } + + public function testReturnsSameValueForAllIfNoArgsExpectationAndSomeGiven() + { + $this->mock->shouldReceive('foo')->andReturn(1); + $this->assertEquals(1, $this->mock->foo('foo')); + } + + public function testReturnsValueFromSequenceSequentially() + { + $this->mock->shouldReceive('foo')->andReturn(1, 2, 3); + $this->mock->foo('foo'); + $this->assertEquals(2, $this->mock->foo('foo')); + } + + public function testReturnsValueFromSequenceSequentiallyAndRepeatedlyReturnsFinalValueOnExtraCalls() + { + $this->mock->shouldReceive('foo')->andReturn(1, 2, 3); + $this->mock->foo('foo'); + $this->mock->foo('foo'); + $this->assertEquals(3, $this->mock->foo('foo')); + $this->assertEquals(3, $this->mock->foo('foo')); + } + + public function testReturnsValueFromSequenceSequentiallyAndRepeatedlyReturnsFinalValueOnExtraCallsWithManyAndReturnCalls() + { + $this->mock->shouldReceive('foo')->andReturn(1)->andReturn(2, 3); + $this->mock->foo('foo'); + $this->mock->foo('foo'); + $this->assertEquals(3, $this->mock->foo('foo')); + $this->assertEquals(3, $this->mock->foo('foo')); + } + + public function testReturnsValueOfClosure() + { + $this->mock->shouldReceive('foo')->with(5)->andReturnUsing(function ($v) {return $v+1;}); + $this->assertEquals(6, $this->mock->foo(5)); + } + + public function testReturnsUndefined() + { + $this->mock->shouldReceive('foo')->andReturnUndefined(); + $this->assertTrue($this->mock->foo() instanceof \Mockery\Undefined); + } + + public function testReturnsValuesSetAsArray() + { + $this->mock->shouldReceive('foo')->andReturnValues(array(1, 2, 3)); + $this->assertEquals(1, $this->mock->foo()); + $this->assertEquals(2, $this->mock->foo()); + $this->assertEquals(3, $this->mock->foo()); + } + + /** + * @expectedException OutOfBoundsException + */ + public function testThrowsException() + { + $this->mock->shouldReceive('foo')->andThrow(new OutOfBoundsException); + $this->mock->foo(); + } + + /** + * @expectedException OutOfBoundsException + */ + public function testThrowsExceptionBasedOnArgs() + { + $this->mock->shouldReceive('foo')->andThrow('OutOfBoundsException'); + $this->mock->foo(); + } + + public function testThrowsExceptionBasedOnArgsWithMessage() + { + $this->mock->shouldReceive('foo')->andThrow('OutOfBoundsException', 'foo'); + try { + $this->mock->foo(); + } catch (OutOfBoundsException $e) { + $this->assertEquals('foo', $e->getMessage()); + } + } + + /** + * @expectedException OutOfBoundsException + */ + public function testThrowsExceptionSequentially() + { + $this->mock->shouldReceive('foo')->andThrow(new Exception)->andThrow(new OutOfBoundsException); + try { + $this->mock->foo(); + } catch (Exception $e) { + } + $this->mock->foo(); + } + + public function testAndThrowExceptions() + { + $this->mock->shouldReceive('foo')->andThrowExceptions(array( + new OutOfBoundsException, + new InvalidArgumentException, + )); + + try { + $this->mock->foo(); + throw new Exception("Expected OutOfBoundsException, non thrown"); + } catch (\Exception $e) { + $this->assertInstanceOf("OutOfBoundsException", $e, "Wrong or no exception thrown: {$e->getMessage()}"); + } + + try { + $this->mock->foo(); + throw new Exception("Expected InvalidArgumentException, non thrown"); + } catch (\Exception $e) { + $this->assertInstanceOf("InvalidArgumentException", $e, "Wrong or no exception thrown: {$e->getMessage()}"); + } + } + + /** + * @expectedException Mockery\Exception + * @expectedExceptionMessage You must pass an array of exception objects to andThrowExceptions + */ + public function testAndThrowExceptionsCatchNonExceptionArgument() + { + $this->mock + ->shouldReceive('foo') + ->andThrowExceptions(array('NotAnException')); + } + + public function testMultipleExpectationsWithReturns() + { + $this->mock->shouldReceive('foo')->with(1)->andReturn(10); + $this->mock->shouldReceive('bar')->with(2)->andReturn(20); + $this->assertEquals(10, $this->mock->foo(1)); + $this->assertEquals(20, $this->mock->bar(2)); + } + + public function testExpectsNoArguments() + { + $this->mock->shouldReceive('foo')->withNoArgs(); + $this->mock->foo(); + } + + /** + * @expectedException \Mockery\Exception + */ + public function testExpectsNoArgumentsThrowsExceptionIfAnyPassed() + { + $this->mock->shouldReceive('foo')->withNoArgs(); + $this->mock->foo(1); + } + + public function testExpectsArgumentsArray() + { + $this->mock->shouldReceive('foo')->withArgs(array(1, 2)); + $this->mock->foo(1, 2); + } + + /** + * @expectedException \Mockery\Exception + */ + public function testExpectsArgumentsArrayThrowsExceptionIfPassedEmptyArray() + { + $this->mock->shouldReceive('foo')->withArgs(array()); + $this->mock->foo(1, 2); + } + + /** + * @expectedException \Mockery\Exception + */ + public function testExpectsArgumentsArrayThrowsExceptionIfNoArgumentsPassed() + { + $this->mock->shouldReceive('foo')->with(); + $this->mock->foo(1); + } + + /** + * @expectedException \Mockery\Exception + */ + public function testExpectsArgumentsArrayThrowsExceptionIfPassedWrongArguments() + { + $this->mock->shouldReceive('foo')->withArgs(array(1, 2)); + $this->mock->foo(3, 4); + } + + /** + * @expectedException \Mockery\Exception + * @expectedExceptionMessageRegExp /foo\(NULL\)/ + */ + public function testExpectsStringArgumentExceptionMessageDifferentiatesBetweenNullAndEmptyString() + { + $this->mock->shouldReceive('foo')->withArgs(array('a string')); + $this->mock->foo(null); + } + + public function testExpectsAnyArguments() + { + $this->mock->shouldReceive('foo')->withAnyArgs(); + $this->mock->foo(); + $this->mock->foo(1); + $this->mock->foo(1, 'k', new stdClass); + } + + public function testExpectsArgumentMatchingRegularExpression() + { + $this->mock->shouldReceive('foo')->with('/bar/i'); + $this->mock->foo('xxBARxx'); + } + + public function testExpectsArgumentMatchingObjectType() + { + $this->mock->shouldReceive('foo')->with('\stdClass'); + $this->mock->foo(new stdClass); + } + + /** + * @expectedException \Mockery\Exception + */ + public function testThrowsExceptionOnNoArgumentMatch() + { + $this->mock->shouldReceive('foo')->with(1); + $this->mock->foo(2); + } + + public function testNeverCalled() + { + $this->mock->shouldReceive('foo')->never(); + $this->container->mockery_verify(); + } + + public function testShouldNotReceive() + { + $this->mock->shouldNotReceive('foo'); + $this->container->mockery_verify(); + } + + /** + * @expectedException \Mockery\Exception\InvalidCountException + */ + public function testShouldNotReceiveThrowsExceptionIfMethodCalled() + { + $this->mock->shouldNotReceive('foo'); + $this->mock->foo(); + $this->container->mockery_verify(); + } + + /** + * @expectedException \Mockery\Exception\InvalidCountException + */ + public function testShouldNotReceiveWithArgumentThrowsExceptionIfMethodCalled() + { + $this->mock->shouldNotReceive('foo')->with(2); + $this->mock->foo(2); + $this->container->mockery_verify(); + } + + /** + * @expectedException \Mockery\CountValidator\Exception + */ + public function testNeverCalledThrowsExceptionOnCall() + { + $this->mock->shouldReceive('foo')->never(); + $this->mock->foo(); + $this->container->mockery_verify(); + } + + public function testCalledOnce() + { + $this->mock->shouldReceive('foo')->once(); + $this->mock->foo(); + $this->container->mockery_verify(); + } + + /** + * @expectedException \Mockery\CountValidator\Exception + */ + public function testCalledOnceThrowsExceptionIfNotCalled() + { + $this->mock->shouldReceive('foo')->once(); + $this->container->mockery_verify(); + } + + /** + * @expectedException \Mockery\CountValidator\Exception + */ + public function testCalledOnceThrowsExceptionIfCalledTwice() + { + $this->mock->shouldReceive('foo')->once(); + $this->mock->foo(); + $this->mock->foo(); + $this->container->mockery_verify(); + } + + public function testCalledTwice() + { + $this->mock->shouldReceive('foo')->twice(); + $this->mock->foo(); + $this->mock->foo(); + $this->container->mockery_verify(); + } + + /** + * @expectedException \Mockery\CountValidator\Exception + */ + public function testCalledTwiceThrowsExceptionIfNotCalled() + { + $this->mock->shouldReceive('foo')->twice(); + $this->container->mockery_verify(); + } + + /** + * @expectedException \Mockery\CountValidator\Exception + */ + public function testCalledOnceThrowsExceptionIfCalledThreeTimes() + { + $this->mock->shouldReceive('foo')->twice(); + $this->mock->foo(); + $this->mock->foo(); + $this->mock->foo(); + $this->container->mockery_verify(); + } + + public function testCalledZeroOrMoreTimesAtZeroCalls() + { + $this->mock->shouldReceive('foo')->zeroOrMoreTimes(); + $this->container->mockery_verify(); + } + + public function testCalledZeroOrMoreTimesAtThreeCalls() + { + $this->mock->shouldReceive('foo')->zeroOrMoreTimes(); + $this->mock->foo(); + $this->mock->foo(); + $this->mock->foo(); + $this->container->mockery_verify(); + } + + public function testTimesCountCalls() + { + $this->mock->shouldReceive('foo')->times(4); + $this->mock->foo(); + $this->mock->foo(); + $this->mock->foo(); + $this->mock->foo(); + $this->container->mockery_verify(); + } + + /** + * @expectedException \Mockery\CountValidator\Exception + */ + public function testTimesCountCallThrowsExceptionOnTooFewCalls() + { + $this->mock->shouldReceive('foo')->times(2); + $this->mock->foo(); + $this->container->mockery_verify(); + } + + /** + * @expectedException \Mockery\CountValidator\Exception + */ + public function testTimesCountCallThrowsExceptionOnTooManyCalls() + { + $this->mock->shouldReceive('foo')->times(2); + $this->mock->foo(); + $this->mock->foo(); + $this->mock->foo(); + $this->container->mockery_verify(); + } + + public function testCalledAtLeastOnceAtExactlyOneCall() + { + $this->mock->shouldReceive('foo')->atLeast()->once(); + $this->mock->foo(); + $this->container->mockery_verify(); + } + + public function testCalledAtLeastOnceAtExactlyThreeCalls() + { + $this->mock->shouldReceive('foo')->atLeast()->times(3); + $this->mock->foo(); + $this->mock->foo(); + $this->mock->foo(); + $this->container->mockery_verify(); + } + + /** + * @expectedException \Mockery\CountValidator\Exception + */ + public function testCalledAtLeastThrowsExceptionOnTooFewCalls() + { + $this->mock->shouldReceive('foo')->atLeast()->twice(); + $this->mock->foo(); + $this->container->mockery_verify(); + } + + public function testCalledAtMostOnceAtExactlyOneCall() + { + $this->mock->shouldReceive('foo')->atMost()->once(); + $this->mock->foo(); + $this->container->mockery_verify(); + } + + public function testCalledAtMostAtExactlyThreeCalls() + { + $this->mock->shouldReceive('foo')->atMost()->times(3); + $this->mock->foo(); + $this->mock->foo(); + $this->mock->foo(); + $this->container->mockery_verify(); + } + + /** + * @expectedException \Mockery\CountValidator\Exception + */ + public function testCalledAtLeastThrowsExceptionOnTooManyCalls() + { + $this->mock->shouldReceive('foo')->atMost()->twice(); + $this->mock->foo(); + $this->mock->foo(); + $this->mock->foo(); + $this->container->mockery_verify(); + } + + /** + * @expectedException \Mockery\CountValidator\Exception + */ + public function testExactCountersOverrideAnyPriorSetNonExactCounters() + { + $this->mock->shouldReceive('foo')->atLeast()->once()->once(); + $this->mock->foo(); + $this->mock->foo(); + $this->container->mockery_verify(); + } + + public function testComboOfLeastAndMostCallsWithOneCall() + { + $this->mock->shouldReceive('foo')->atleast()->once()->atMost()->twice(); + $this->mock->foo(); + $this->container->mockery_verify(); + } + + public function testComboOfLeastAndMostCallsWithTwoCalls() + { + $this->mock->shouldReceive('foo')->atleast()->once()->atMost()->twice(); + $this->mock->foo(); + $this->mock->foo(); + $this->container->mockery_verify(); + } + + /** + * @expectedException \Mockery\CountValidator\Exception + */ + public function testComboOfLeastAndMostCallsThrowsExceptionAtTooFewCalls() + { + $this->mock->shouldReceive('foo')->atleast()->once()->atMost()->twice(); + $this->container->mockery_verify(); + } + + /** + * @expectedException \Mockery\CountValidator\Exception + */ + public function testComboOfLeastAndMostCallsThrowsExceptionAtTooManyCalls() + { + $this->mock->shouldReceive('foo')->atleast()->once()->atMost()->twice(); + $this->mock->foo(); + $this->mock->foo(); + $this->mock->foo(); + $this->container->mockery_verify(); + } + + public function testCallCountingOnlyAppliesToMatchedExpectations() + { + $this->mock->shouldReceive('foo')->with(1)->once(); + $this->mock->shouldReceive('foo')->with(2)->twice(); + $this->mock->shouldReceive('foo')->with(3); + $this->mock->foo(1); + $this->mock->foo(2); + $this->mock->foo(2); + $this->mock->foo(3); + $this->container->mockery_verify(); + } + + /** + * @expectedException \Mockery\CountValidator\Exception + */ + public function testCallCountingThrowsExceptionOnAnyMismatch() + { + $this->mock->shouldReceive('foo')->with(1)->once(); + $this->mock->shouldReceive('foo')->with(2)->twice(); + $this->mock->shouldReceive('foo')->with(3); + $this->mock->shouldReceive('bar'); + $this->mock->foo(1); + $this->mock->foo(2); + $this->mock->foo(3); + $this->mock->bar(); + $this->container->mockery_verify(); + } + + public function testOrderedCallsWithoutError() + { + $this->mock->shouldReceive('foo')->ordered(); + $this->mock->shouldReceive('bar')->ordered(); + $this->mock->foo(); + $this->mock->bar(); + $this->container->mockery_verify(); + } + + /** + * @expectedException \Mockery\Exception + */ + public function testOrderedCallsWithOutOfOrderError() + { + $this->mock->shouldReceive('foo')->ordered(); + $this->mock->shouldReceive('bar')->ordered(); + $this->mock->bar(); + $this->mock->foo(); + $this->container->mockery_verify(); + } + + public function testDifferentArgumentsAndOrderingsPassWithoutException() + { + $this->mock->shouldReceive('foo')->with(1)->ordered(); + $this->mock->shouldReceive('foo')->with(2)->ordered(); + $this->mock->foo(1); + $this->mock->foo(2); + $this->container->mockery_verify(); + } + + /** + * @expectedException \Mockery\Exception + */ + public function testDifferentArgumentsAndOrderingsThrowExceptionWhenInWrongOrder() + { + $this->mock->shouldReceive('foo')->with(1)->ordered(); + $this->mock->shouldReceive('foo')->with(2)->ordered(); + $this->mock->foo(2); + $this->mock->foo(1); + $this->container->mockery_verify(); + } + + public function testUnorderedCallsIgnoredForOrdering() + { + $this->mock->shouldReceive('foo')->with(1)->ordered(); + $this->mock->shouldReceive('foo')->with(2); + $this->mock->shouldReceive('foo')->with(3)->ordered(); + $this->mock->foo(2); + $this->mock->foo(1); + $this->mock->foo(2); + $this->mock->foo(3); + $this->mock->foo(2); + $this->container->mockery_verify(); + } + + public function testOrderingOfDefaultGrouping() + { + $this->mock->shouldReceive('foo')->ordered(); + $this->mock->shouldReceive('bar')->ordered(); + $this->mock->foo(); + $this->mock->bar(); + $this->container->mockery_verify(); + } + + /** + * @expectedException \Mockery\Exception + */ + public function testOrderingOfDefaultGroupingThrowsExceptionOnWrongOrder() + { + $this->mock->shouldReceive('foo')->ordered(); + $this->mock->shouldReceive('bar')->ordered(); + $this->mock->bar(); + $this->mock->foo(); + $this->container->mockery_verify(); + } + + public function testOrderingUsingNumberedGroups() + { + $this->mock->shouldReceive('start')->ordered(1); + $this->mock->shouldReceive('foo')->ordered(2); + $this->mock->shouldReceive('bar')->ordered(2); + $this->mock->shouldReceive('final')->ordered(); + $this->mock->start(); + $this->mock->bar(); + $this->mock->foo(); + $this->mock->bar(); + $this->mock->final(); + $this->container->mockery_verify(); + } + + public function testOrderingUsingNamedGroups() + { + $this->mock->shouldReceive('start')->ordered('start'); + $this->mock->shouldReceive('foo')->ordered('foobar'); + $this->mock->shouldReceive('bar')->ordered('foobar'); + $this->mock->shouldReceive('final')->ordered(); + $this->mock->start(); + $this->mock->bar(); + $this->mock->foo(); + $this->mock->bar(); + $this->mock->final(); + $this->container->mockery_verify(); + } + + /** + * @group 2A + */ + public function testGroupedUngroupedOrderingDoNotOverlap() + { + $s = $this->mock->shouldReceive('start')->ordered(); + $m = $this->mock->shouldReceive('mid')->ordered('foobar'); + $e = $this->mock->shouldReceive('end')->ordered(); + $this->assertTrue($s->getOrderNumber() < $m->getOrderNumber()); + $this->assertTrue($m->getOrderNumber() < $e->getOrderNumber()); + } + + /** + * @expectedException \Mockery\Exception + */ + public function testGroupedOrderingThrowsExceptionWhenCallsDisordered() + { + $this->mock->shouldReceive('foo')->ordered('first'); + $this->mock->shouldReceive('bar')->ordered('second'); + $this->mock->bar(); + $this->mock->foo(); + $this->container->mockery_verify(); + } + + public function testExpectationMatchingWithNoArgsOrderings() + { + $this->mock->shouldReceive('foo')->withNoArgs()->once()->ordered(); + $this->mock->shouldReceive('bar')->withNoArgs()->once()->ordered(); + $this->mock->shouldReceive('foo')->withNoArgs()->once()->ordered(); + $this->mock->foo(); + $this->mock->bar(); + $this->mock->foo(); + $this->container->mockery_verify(); + } + + public function testExpectationMatchingWithAnyArgsOrderings() + { + $this->mock->shouldReceive('foo')->withAnyArgs()->once()->ordered(); + $this->mock->shouldReceive('bar')->withAnyArgs()->once()->ordered(); + $this->mock->shouldReceive('foo')->withAnyArgs()->once()->ordered(); + $this->mock->foo(); + $this->mock->bar(); + $this->mock->foo(); + $this->container->mockery_verify(); + } + + public function testEnsuresOrderingIsNotCrossMockByDefault() + { + $this->mock->shouldReceive('foo')->ordered(); + $mock2 = $this->container->mock('bar'); + $mock2->shouldReceive('bar')->ordered(); + $mock2->bar(); + $this->mock->foo(); + } + + /** + * @expectedException \Mockery\Exception + */ + public function testEnsuresOrderingIsCrossMockWhenGloballyFlagSet() + { + $this->mock->shouldReceive('foo')->globally()->ordered(); + $mock2 = $this->container->mock('bar'); + $mock2->shouldReceive('bar')->globally()->ordered(); + $mock2->bar(); + $this->mock->foo(); + } + + public function testExpectationCastToStringFormatting() + { + $exp = $this->mock->shouldReceive('foo')->with(1, 'bar', new stdClass, array('Spam' => 'Ham', 'Bar' => 'Baz')); + $this->assertEquals('[foo(1, "bar", object(stdClass), array(\'Spam\'=>\'Ham\',\'Bar\'=>\'Baz\',))]', (string) $exp); + } + + public function testLongExpectationCastToStringFormatting() + { + $exp = $this->mock->shouldReceive('foo')->with(array('Spam' => 'Ham', 'Bar' => 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'End')); + $this->assertEquals("[foo(array('Spam'=>'Ham','Bar'=>'Baz',0=>'Bar',1=>'Baz',2=>'Bar',3=>'Baz',4=>'Bar',5=>'Baz',6=>'Bar',7=>'Baz',8=>'Bar',9=>'Baz',10=>'Bar',11=>'Baz',12=>'Bar',13=>'Baz',14=>'Bar',15=>'Baz',16=>'Bar',17=>'Baz',18=>'Bar',19=>'Baz',20=>'Bar',21=>'Baz',22=>'Bar',23=>'Baz',24=>'Bar',25=>'Baz',26=>'Bar',27=>'Baz',28=>'Bar',29=>'Baz',30=>'Bar',31=>'Baz',32=>'Bar',33=>'Baz',34=>'Bar',35=>'Baz',36=>'Bar',37=>'Baz',38=>'Bar',39=>'Baz',40=>'Bar',41=>'Baz',42=>'Bar',43=>'Baz',44=>'Bar',45=>'Baz',46=>'Baz',47=>'Bar',48=>'Baz',49=>'Bar',50=>'Baz',51=>'Bar',52=>'Baz',53=>'Bar',54=>'Baz',55=>'Bar',56=>'Baz',57=>'Baz',58=>'Bar',59=>'Baz',60=>'Bar',61=>'Baz',62=>'Bar',63=>'Baz',64=>'Bar',65=>'Baz',66=>'Bar',67=>'Baz',68=>'Baz',69=>'Bar',70=>'Baz',71=>'Bar',72=>'Baz',73=>'Bar',74=>'Baz',75=>'Bar',76=>'Baz',77=>'Bar',78=>'Baz',79=>'Baz',80=>'Bar',81=>'Baz',82=>'Bar',83=>'Baz',84=>'Bar',85=>'Baz',86=>'Bar',87=>'Baz',88=>'Bar',89=>'Baz',90=>'Baz',91=>'Bar',92=>'Baz',93=>'Bar',94=>'Baz',95=>'Bar',96=>'Baz',97=>'Ba...))]", (string) $exp); + } + + public function testMultipleExpectationCastToStringFormatting() + { + $exp = $this->mock->shouldReceive('foo', 'bar')->with(1); + $this->assertEquals('[foo(1), bar(1)]', (string) $exp); + } + + public function testGroupedOrderingWithLimitsAllowsMultipleReturnValues() + { + $this->mock->shouldReceive('foo')->with(2)->once()->andReturn('first'); + $this->mock->shouldReceive('foo')->with(2)->twice()->andReturn('second/third'); + $this->mock->shouldReceive('foo')->with(2)->andReturn('infinity'); + $this->assertEquals('first', $this->mock->foo(2)); + $this->assertEquals('second/third', $this->mock->foo(2)); + $this->assertEquals('second/third', $this->mock->foo(2)); + $this->assertEquals('infinity', $this->mock->foo(2)); + $this->assertEquals('infinity', $this->mock->foo(2)); + $this->assertEquals('infinity', $this->mock->foo(2)); + $this->container->mockery_verify(); + } + + public function testExpectationsCanBeMarkedAsDefaults() + { + $this->mock->shouldReceive('foo')->andReturn('bar')->byDefault(); + $this->assertEquals('bar', $this->mock->foo()); + $this->container->mockery_verify(); + } + + public function testDefaultExpectationsValidatedInCorrectOrder() + { + $this->mock->shouldReceive('foo')->with(1)->once()->andReturn('first')->byDefault(); + $this->mock->shouldReceive('foo')->with(2)->once()->andReturn('second')->byDefault(); + $this->assertEquals('first', $this->mock->foo(1)); + $this->assertEquals('second', $this->mock->foo(2)); + $this->container->mockery_verify(); + } + + public function testDefaultExpectationsAreReplacedByLaterConcreteExpectations() + { + $this->mock->shouldReceive('foo')->andReturn('bar')->once()->byDefault(); + $this->mock->shouldReceive('foo')->andReturn('bar')->twice(); + $this->mock->foo(); + $this->mock->foo(); + $this->container->mockery_verify(); + } + + public function testDefaultExpectationsCanBeChangedByLaterExpectations() + { + $this->mock->shouldReceive('foo')->with(1)->andReturn('bar')->once()->byDefault(); + $this->mock->shouldReceive('foo')->with(2)->andReturn('baz')->once(); + try { + $this->mock->foo(1); + $this->fail('Expected exception not thrown'); + } catch (\Mockery\Exception $e) { + } + $this->mock->foo(2); + $this->container->mockery_verify(); + } + + /** + * @expectedException \Mockery\Exception + */ + public function testDefaultExpectationsCanBeOrdered() + { + $this->mock->shouldReceive('foo')->ordered()->byDefault(); + $this->mock->shouldReceive('bar')->ordered()->byDefault(); + $this->mock->bar(); + $this->mock->foo(); + $this->container->mockery_verify(); + } + + public function testDefaultExpectationsCanBeOrderedAndReplaced() + { + $this->mock->shouldReceive('foo')->ordered()->byDefault(); + $this->mock->shouldReceive('bar')->ordered()->byDefault(); + $this->mock->shouldReceive('bar')->ordered(); + $this->mock->shouldReceive('foo')->ordered(); + $this->mock->bar(); + $this->mock->foo(); + $this->container->mockery_verify(); + } + + public function testByDefaultOperatesFromMockConstruction() + { + $container = new \Mockery\Container(\Mockery::getDefaultGenerator(), \Mockery::getDefaultLoader()); + $mock = $container->mock('f', array('foo'=>'rfoo', 'bar'=>'rbar', 'baz'=>'rbaz'))->byDefault(); + $mock->shouldReceive('foo')->andReturn('foobar'); + $this->assertEquals('foobar', $mock->foo()); + $this->assertEquals('rbar', $mock->bar()); + $this->assertEquals('rbaz', $mock->baz()); + $mock->mockery_verify(); + } + + public function testByDefaultOnAMockDoesSquatWithoutExpectations() + { + $container = new \Mockery\Container(\Mockery::getDefaultGenerator(), \Mockery::getDefaultLoader()); + $mock = $container->mock('f')->byDefault(); + } + + public function testDefaultExpectationsCanBeOverridden() + { + $this->mock->shouldReceive('foo')->with('test')->andReturn('bar')->byDefault(); + $this->mock->shouldReceive('foo')->with('test')->andReturn('newbar')->byDefault(); + $this->mock->foo('test'); + $this->assertEquals('newbar', $this->mock->foo('test')); + } + + /** + * @expectedException \Mockery\Exception + */ + public function testByDefaultPreventedFromSettingDefaultWhenDefaultingExpectationWasReplaced() + { + $exp = $this->mock->shouldReceive('foo')->andReturn(1); + $this->mock->shouldReceive('foo')->andReturn(2); + $exp->byDefault(); + } + + /** + * Argument Constraint Tests + */ + + public function testAnyConstraintMatchesAnyArg() + { + $this->mock->shouldReceive('foo')->with(1, Mockery::any())->twice(); + $this->mock->foo(1, 2); + $this->mock->foo(1, 'str'); + $this->container->mockery_verify(); + } + + public function testAnyConstraintNonMatchingCase() + { + $this->mock->shouldReceive('foo')->times(3); + $this->mock->shouldReceive('foo')->with(1, Mockery::any())->never(); + $this->mock->foo(); + $this->mock->foo(1); + $this->mock->foo(1, 2, 3); + $this->container->mockery_verify(); + } + + public function testArrayConstraintMatchesArgument() + { + $this->mock->shouldReceive('foo')->with(Mockery::type('array'))->once(); + $this->mock->foo(array()); + $this->container->mockery_verify(); + } + + public function testArrayConstraintNonMatchingCase() + { + $this->mock->shouldReceive('foo')->times(3); + $this->mock->shouldReceive('foo')->with(1, Mockery::type('array'))->never(); + $this->mock->foo(); + $this->mock->foo(1); + $this->mock->foo(1, 2, 3); + $this->container->mockery_verify(); + } + + /** + * @expectedException \Mockery\Exception + */ + public function testArrayConstraintThrowsExceptionWhenConstraintUnmatched() + { + $this->mock->shouldReceive('foo')->with(Mockery::type('array'))->once(); + $this->mock->foo(1); + $this->container->mockery_verify(); + } + + public function testBoolConstraintMatchesArgument() + { + $this->mock->shouldReceive('foo')->with(Mockery::type('bool'))->once(); + $this->mock->foo(true); + $this->container->mockery_verify(); + } + + public function testBoolConstraintNonMatchingCase() + { + $this->mock->shouldReceive('foo')->times(3); + $this->mock->shouldReceive('foo')->with(1, Mockery::type('bool'))->never(); + $this->mock->foo(); + $this->mock->foo(1); + $this->mock->foo(1, 2, 3); + $this->container->mockery_verify(); + } + + /** + * @expectedException \Mockery\Exception + */ + public function testBoolConstraintThrowsExceptionWhenConstraintUnmatched() + { + $this->mock->shouldReceive('foo')->with(Mockery::type('bool'))->once(); + $this->mock->foo(1); + $this->container->mockery_verify(); + } + + public function testCallableConstraintMatchesArgument() + { + $this->mock->shouldReceive('foo')->with(Mockery::type('callable'))->once(); + $this->mock->foo(function () {return 'f';}); + $this->container->mockery_verify(); + } + + public function testCallableConstraintNonMatchingCase() + { + $this->mock->shouldReceive('foo')->times(3); + $this->mock->shouldReceive('foo')->with(1, Mockery::type('callable'))->never(); + $this->mock->foo(); + $this->mock->foo(1); + $this->mock->foo(1, 2, 3); + $this->container->mockery_verify(); + } + + /** + * @expectedException \Mockery\Exception + */ + public function testCallableConstraintThrowsExceptionWhenConstraintUnmatched() + { + $this->mock->shouldReceive('foo')->with(Mockery::type('callable'))->once(); + $this->mock->foo(1); + $this->container->mockery_verify(); + } + + public function testDoubleConstraintMatchesArgument() + { + $this->mock->shouldReceive('foo')->with(Mockery::type('double'))->once(); + $this->mock->foo(2.25); + $this->container->mockery_verify(); + } + + public function testDoubleConstraintNonMatchingCase() + { + $this->mock->shouldReceive('foo')->times(3); + $this->mock->shouldReceive('foo')->with(1, Mockery::type('double'))->never(); + $this->mock->foo(); + $this->mock->foo(1); + $this->mock->foo(1, 2, 3); + $this->container->mockery_verify(); + } + + /** + * @expectedException \Mockery\Exception + */ + public function testDoubleConstraintThrowsExceptionWhenConstraintUnmatched() + { + $this->mock->shouldReceive('foo')->with(Mockery::type('double'))->once(); + $this->mock->foo(1); + $this->container->mockery_verify(); + } + + public function testFloatConstraintMatchesArgument() + { + $this->mock->shouldReceive('foo')->with(Mockery::type('float'))->once(); + $this->mock->foo(2.25); + $this->container->mockery_verify(); + } + + public function testFloatConstraintNonMatchingCase() + { + $this->mock->shouldReceive('foo')->times(3); + $this->mock->shouldReceive('foo')->with(1, Mockery::type('float'))->never(); + $this->mock->foo(); + $this->mock->foo(1); + $this->mock->foo(1, 2, 3); + $this->container->mockery_verify(); + } + + /** + * @expectedException \Mockery\Exception + */ + public function testFloatConstraintThrowsExceptionWhenConstraintUnmatched() + { + $this->mock->shouldReceive('foo')->with(Mockery::type('float'))->once(); + $this->mock->foo(1); + $this->container->mockery_verify(); + } + + public function testIntConstraintMatchesArgument() + { + $this->mock->shouldReceive('foo')->with(Mockery::type('int'))->once(); + $this->mock->foo(2); + $this->container->mockery_verify(); + } + + public function testIntConstraintNonMatchingCase() + { + $this->mock->shouldReceive('foo')->times(3); + $this->mock->shouldReceive('foo')->with(1, Mockery::type('int'))->never(); + $this->mock->foo(); + $this->mock->foo(1); + $this->mock->foo(1, 2, 3); + $this->container->mockery_verify(); + } + + /** + * @expectedException \Mockery\Exception + */ + public function testIntConstraintThrowsExceptionWhenConstraintUnmatched() + { + $this->mock->shouldReceive('foo')->with(Mockery::type('int'))->once(); + $this->mock->foo('f'); + $this->container->mockery_verify(); + } + + public function testLongConstraintMatchesArgument() + { + $this->mock->shouldReceive('foo')->with(Mockery::type('long'))->once(); + $this->mock->foo(2); + $this->container->mockery_verify(); + } + + public function testLongConstraintNonMatchingCase() + { + $this->mock->shouldReceive('foo')->times(3); + $this->mock->shouldReceive('foo')->with(1, Mockery::type('long'))->never(); + $this->mock->foo(); + $this->mock->foo(1); + $this->mock->foo(1, 2, 3); + $this->container->mockery_verify(); + } + + /** + * @expectedException \Mockery\Exception + */ + public function testLongConstraintThrowsExceptionWhenConstraintUnmatched() + { + $this->mock->shouldReceive('foo')->with(Mockery::type('long'))->once(); + $this->mock->foo('f'); + $this->container->mockery_verify(); + } + + public function testNullConstraintMatchesArgument() + { + $this->mock->shouldReceive('foo')->with(Mockery::type('null'))->once(); + $this->mock->foo(null); + $this->container->mockery_verify(); + } + + public function testNullConstraintNonMatchingCase() + { + $this->mock->shouldReceive('foo')->times(3); + $this->mock->shouldReceive('foo')->with(1, Mockery::type('null'))->never(); + $this->mock->foo(); + $this->mock->foo(1); + $this->mock->foo(1, 2, 3); + $this->container->mockery_verify(); + } + + /** + * @expectedException \Mockery\Exception + */ + public function testNullConstraintThrowsExceptionWhenConstraintUnmatched() + { + $this->mock->shouldReceive('foo')->with(Mockery::type('null'))->once(); + $this->mock->foo('f'); + $this->container->mockery_verify(); + } + + public function testNumericConstraintMatchesArgument() + { + $this->mock->shouldReceive('foo')->with(Mockery::type('numeric'))->once(); + $this->mock->foo('2'); + $this->container->mockery_verify(); + } + + public function testNumericConstraintNonMatchingCase() + { + $this->mock->shouldReceive('foo')->times(3); + $this->mock->shouldReceive('foo')->with(1, Mockery::type('numeric'))->never(); + $this->mock->foo(); + $this->mock->foo(1); + $this->mock->foo(1, 2, 3); + $this->container->mockery_verify(); + } + + /** + * @expectedException \Mockery\Exception + */ + public function testNumericConstraintThrowsExceptionWhenConstraintUnmatched() + { + $this->mock->shouldReceive('foo')->with(Mockery::type('numeric'))->once(); + $this->mock->foo('f'); + $this->container->mockery_verify(); + } + + public function testObjectConstraintMatchesArgument() + { + $this->mock->shouldReceive('foo')->with(Mockery::type('object'))->once(); + $this->mock->foo(new stdClass); + $this->container->mockery_verify(); + } + + public function testObjectConstraintNonMatchingCase() + { + $this->mock->shouldReceive('foo')->times(3); + $this->mock->shouldReceive('foo')->with(1, Mockery::type('object`'))->never(); + $this->mock->foo(); + $this->mock->foo(1); + $this->mock->foo(1, 2, 3); + $this->container->mockery_verify(); + } + + /** + * @expectedException \Mockery\Exception + */ + public function testObjectConstraintThrowsExceptionWhenConstraintUnmatched() + { + $this->mock->shouldReceive('foo')->with(Mockery::type('object'))->once(); + $this->mock->foo('f'); + $this->container->mockery_verify(); + } + + public function testRealConstraintMatchesArgument() + { + $this->mock->shouldReceive('foo')->with(Mockery::type('real'))->once(); + $this->mock->foo(2.25); + $this->container->mockery_verify(); + } + + public function testRealConstraintNonMatchingCase() + { + $this->mock->shouldReceive('foo')->times(3); + $this->mock->shouldReceive('foo')->with(1, Mockery::type('real'))->never(); + $this->mock->foo(); + $this->mock->foo(1); + $this->mock->foo(1, 2, 3); + $this->container->mockery_verify(); + } + + /** + * @expectedException \Mockery\Exception + */ + public function testRealConstraintThrowsExceptionWhenConstraintUnmatched() + { + $this->mock->shouldReceive('foo')->with(Mockery::type('real'))->once(); + $this->mock->foo('f'); + $this->container->mockery_verify(); + } + + public function testResourceConstraintMatchesArgument() + { + $this->mock->shouldReceive('foo')->with(Mockery::type('resource'))->once(); + $r = fopen(dirname(__FILE__) . '/_files/file.txt', 'r'); + $this->mock->foo($r); + $this->container->mockery_verify(); + } + + public function testResourceConstraintNonMatchingCase() + { + $this->mock->shouldReceive('foo')->times(3); + $this->mock->shouldReceive('foo')->with(1, Mockery::type('resource'))->never(); + $this->mock->foo(); + $this->mock->foo(1); + $this->mock->foo(1, 2, 3); + $this->container->mockery_verify(); + } + + /** + * @expectedException \Mockery\Exception + */ + public function testResourceConstraintThrowsExceptionWhenConstraintUnmatched() + { + $this->mock->shouldReceive('foo')->with(Mockery::type('resource'))->once(); + $this->mock->foo('f'); + $this->container->mockery_verify(); + } + + public function testScalarConstraintMatchesArgument() + { + $this->mock->shouldReceive('foo')->with(Mockery::type('scalar'))->once(); + $this->mock->foo(2); + $this->container->mockery_verify(); + } + + public function testScalarConstraintNonMatchingCase() + { + $this->mock->shouldReceive('foo')->times(3); + $this->mock->shouldReceive('foo')->with(1, Mockery::type('scalar'))->never(); + $this->mock->foo(); + $this->mock->foo(1); + $this->mock->foo(1, 2, 3); + $this->container->mockery_verify(); + } + + /** + * @expectedException \Mockery\Exception + */ + public function testScalarConstraintThrowsExceptionWhenConstraintUnmatched() + { + $this->mock->shouldReceive('foo')->with(Mockery::type('scalar'))->once(); + $this->mock->foo(array()); + $this->container->mockery_verify(); + } + + public function testStringConstraintMatchesArgument() + { + $this->mock->shouldReceive('foo')->with(Mockery::type('string'))->once(); + $this->mock->foo('2'); + $this->container->mockery_verify(); + } + + public function testStringConstraintNonMatchingCase() + { + $this->mock->shouldReceive('foo')->times(3); + $this->mock->shouldReceive('foo')->with(1, Mockery::type('string'))->never(); + $this->mock->foo(); + $this->mock->foo(1); + $this->mock->foo(1, 2, 3); + $this->container->mockery_verify(); + } + + /** + * @expectedException \Mockery\Exception + */ + public function testStringConstraintThrowsExceptionWhenConstraintUnmatched() + { + $this->mock->shouldReceive('foo')->with(Mockery::type('string'))->once(); + $this->mock->foo(1); + $this->container->mockery_verify(); + } + + public function testClassConstraintMatchesArgument() + { + $this->mock->shouldReceive('foo')->with(Mockery::type('stdClass'))->once(); + $this->mock->foo(new stdClass); + $this->container->mockery_verify(); + } + + public function testClassConstraintNonMatchingCase() + { + $this->mock->shouldReceive('foo')->times(3); + $this->mock->shouldReceive('foo')->with(1, Mockery::type('stdClass'))->never(); + $this->mock->foo(); + $this->mock->foo(1); + $this->mock->foo(1, 2, 3); + $this->container->mockery_verify(); + } + + /** + * @expectedException \Mockery\Exception + */ + public function testClassConstraintThrowsExceptionWhenConstraintUnmatched() + { + $this->mock->shouldReceive('foo')->with(Mockery::type('stdClass'))->once(); + $this->mock->foo(new Exception); + $this->container->mockery_verify(); + } + + public function testDucktypeConstraintMatchesArgument() + { + $this->mock->shouldReceive('foo')->with(Mockery::ducktype('quack', 'swim'))->once(); + $this->mock->foo(new Mockery_Duck); + $this->container->mockery_verify(); + } + + public function testDucktypeConstraintNonMatchingCase() + { + $this->mock->shouldReceive('foo')->times(3); + $this->mock->shouldReceive('foo')->with(1, Mockery::ducktype('quack', 'swim'))->never(); + $this->mock->foo(); + $this->mock->foo(1); + $this->mock->foo(1, 2, 3); + $this->container->mockery_verify(); + } + + /** + * @expectedException \Mockery\Exception + */ + public function testDucktypeConstraintThrowsExceptionWhenConstraintUnmatched() + { + $this->mock->shouldReceive('foo')->with(Mockery::ducktype('quack', 'swim'))->once(); + $this->mock->foo(new Mockery_Duck_Nonswimmer); + $this->container->mockery_verify(); + } + + public function testArrayContentConstraintMatchesArgument() + { + $this->mock->shouldReceive('foo')->with(Mockery::subset(array('a'=>1, 'b'=>2)))->once(); + $this->mock->foo(array('a'=>1, 'b'=>2, 'c'=>3)); + $this->container->mockery_verify(); + } + + public function testArrayContentConstraintNonMatchingCase() + { + $this->mock->shouldReceive('foo')->times(3); + $this->mock->shouldReceive('foo')->with(1, Mockery::subset(array('a'=>1, 'b'=>2)))->never(); + $this->mock->foo(); + $this->mock->foo(1); + $this->mock->foo(1, 2, 3); + $this->container->mockery_verify(); + } + + /** + * @expectedException \Mockery\Exception + */ + public function testArrayContentConstraintThrowsExceptionWhenConstraintUnmatched() + { + $this->mock->shouldReceive('foo')->with(Mockery::subset(array('a'=>1, 'b'=>2)))->once(); + $this->mock->foo(array('a'=>1, 'c'=>3)); + $this->container->mockery_verify(); + } + + public function testContainsConstraintMatchesArgument() + { + $this->mock->shouldReceive('foo')->with(Mockery::contains(1, 2))->once(); + $this->mock->foo(array('a'=>1, 'b'=>2, 'c'=>3)); + $this->container->mockery_verify(); + } + + public function testContainsConstraintNonMatchingCase() + { + $this->mock->shouldReceive('foo')->times(3); + $this->mock->shouldReceive('foo')->with(1, Mockery::contains(1, 2))->never(); + $this->mock->foo(); + $this->mock->foo(1); + $this->mock->foo(1, 2, 3); + $this->container->mockery_verify(); + } + + /** + * @expectedException \Mockery\Exception + */ + public function testContainsConstraintThrowsExceptionWhenConstraintUnmatched() + { + $this->mock->shouldReceive('foo')->with(Mockery::contains(1, 2))->once(); + $this->mock->foo(array('a'=>1, 'c'=>3)); + $this->container->mockery_verify(); + } + + public function testHasKeyConstraintMatchesArgument() + { + $this->mock->shouldReceive('foo')->with(Mockery::hasKey('c'))->once(); + $this->mock->foo(array('a'=>1, 'b'=>2, 'c'=>3)); + $this->container->mockery_verify(); + } + + public function testHasKeyConstraintNonMatchingCase() + { + $this->mock->shouldReceive('foo')->times(3); + $this->mock->shouldReceive('foo')->with(1, Mockery::hasKey('a'))->never(); + $this->mock->foo(); + $this->mock->foo(1); + $this->mock->foo(1, array('a'=>1), 3); + $this->container->mockery_verify(); + } + + /** + * @expectedException \Mockery\Exception + */ + public function testHasKeyConstraintThrowsExceptionWhenConstraintUnmatched() + { + $this->mock->shouldReceive('foo')->with(Mockery::hasKey('c'))->once(); + $this->mock->foo(array('a'=>1, 'b'=>3)); + $this->container->mockery_verify(); + } + + public function testHasValueConstraintMatchesArgument() + { + $this->mock->shouldReceive('foo')->with(Mockery::hasValue(1))->once(); + $this->mock->foo(array('a'=>1, 'b'=>2, 'c'=>3)); + $this->container->mockery_verify(); + } + + public function testHasValueConstraintNonMatchingCase() + { + $this->mock->shouldReceive('foo')->times(3); + $this->mock->shouldReceive('foo')->with(1, Mockery::hasValue(1))->never(); + $this->mock->foo(); + $this->mock->foo(1); + $this->mock->foo(1, array('a'=>1), 3); + $this->container->mockery_verify(); + } + + /** + * @expectedException \Mockery\Exception + */ + public function testHasValueConstraintThrowsExceptionWhenConstraintUnmatched() + { + $this->mock->shouldReceive('foo')->with(Mockery::hasValue(2))->once(); + $this->mock->foo(array('a'=>1, 'b'=>3)); + $this->container->mockery_verify(); + } + + public function testOnConstraintMatchesArgument_ClosureEvaluatesToTrue() + { + $function = function ($arg) {return $arg % 2 == 0;}; + $this->mock->shouldReceive('foo')->with(Mockery::on($function))->once(); + $this->mock->foo(4); + $this->container->mockery_verify(); + } + + /** + * @expectedException \Mockery\Exception + */ + public function testOnConstraintThrowsExceptionWhenConstraintUnmatched_ClosureEvaluatesToFalse() + { + $function = function ($arg) {return $arg % 2 == 0;}; + $this->mock->shouldReceive('foo')->with(Mockery::on($function))->once(); + $this->mock->foo(5); + $this->container->mockery_verify(); + } + + public function testMustBeConstraintMatchesArgument() + { + $this->mock->shouldReceive('foo')->with(Mockery::mustBe(2))->once(); + $this->mock->foo(2); + $this->container->mockery_verify(); + } + + public function testMustBeConstraintNonMatchingCase() + { + $this->mock->shouldReceive('foo')->times(3); + $this->mock->shouldReceive('foo')->with(1, Mockery::mustBe(2))->never(); + $this->mock->foo(); + $this->mock->foo(1); + $this->mock->foo(1, 2, 3); + $this->container->mockery_verify(); + } + + /** + * @expectedException \Mockery\Exception + */ + public function testMustBeConstraintThrowsExceptionWhenConstraintUnmatched() + { + $this->mock->shouldReceive('foo')->with(Mockery::mustBe(2))->once(); + $this->mock->foo('2'); + $this->container->mockery_verify(); + } + + public function testMustBeConstraintMatchesObjectArgumentWithEqualsComparisonNotIdentical() + { + $a = new stdClass; + $a->foo = 1; + $b = new stdClass; + $b->foo = 1; + $this->mock->shouldReceive('foo')->with(Mockery::mustBe($a))->once(); + $this->mock->foo($b); + $this->container->mockery_verify(); + } + + public function testMustBeConstraintNonMatchingCaseWithObject() + { + $a = new stdClass; + $a->foo = 1; + $this->mock->shouldReceive('foo')->times(3); + $this->mock->shouldReceive('foo')->with(1, Mockery::mustBe($a))->never(); + $this->mock->foo(); + $this->mock->foo(1); + $this->mock->foo(1, $a, 3); + $this->container->mockery_verify(); + } + + /** + * @expectedException \Mockery\Exception + */ + public function testMustBeConstraintThrowsExceptionWhenConstraintUnmatchedWithObject() + { + $a = new stdClass; + $a->foo = 1; + $b = new stdClass; + $b->foo = 2; + $this->mock->shouldReceive('foo')->with(Mockery::mustBe($a))->once(); + $this->mock->foo($b); + $this->container->mockery_verify(); + } + + public function testMatchPrecedenceBasedOnExpectedCallsFavouringExplicitMatch() + { + $this->mock->shouldReceive('foo')->with(1)->once(); + $this->mock->shouldReceive('foo')->with(Mockery::any())->never(); + $this->mock->foo(1); + $this->container->mockery_verify(); + } + + public function testMatchPrecedenceBasedOnExpectedCallsFavouringAnyMatch() + { + $this->mock->shouldReceive('foo')->with(Mockery::any())->once(); + $this->mock->shouldReceive('foo')->with(1)->never(); + $this->mock->foo(1); + $this->container->mockery_verify(); + } + + public function testReturnNullIfIgnoreMissingMethodsSet() + { + $this->mock->shouldIgnoreMissing(); + $this->assertNull($this->mock->g(1, 2)); + } + + public function testReturnUndefinedIfIgnoreMissingMethodsSet() + { + $this->mock->shouldIgnoreMissing()->asUndefined(); + $this->assertTrue($this->mock->g(1, 2) instanceof \Mockery\Undefined); + } + + public function testReturnAsUndefinedAllowsForInfiniteSelfReturningChain() + { + $this->mock->shouldIgnoreMissing()->asUndefined(); + $this->assertTrue($this->mock->g(1, 2)->a()->b()->c() instanceof \Mockery\Undefined); + } + + public function testShouldIgnoreMissingFluentInterface() + { + $this->assertTrue($this->mock->shouldIgnoreMissing() instanceof \Mockery\MockInterface); + } + + public function testShouldIgnoreMissingAsUndefinedFluentInterface() + { + $this->assertTrue($this->mock->shouldIgnoreMissing()->asUndefined() instanceof \Mockery\MockInterface); + } + + public function testShouldIgnoreMissingAsDefinedProxiesToUndefinedAllowingToString() + { + $this->mock->shouldIgnoreMissing()->asUndefined(); + $string = "Method call: {$this->mock->g()}"; + $string = "Mock: {$this->mock}"; + } + + public function testShouldIgnoreMissingDefaultReturnValue() + { + $this->mock->shouldIgnoreMissing(1); + $this->assertEquals(1, $this->mock->a()); + } + + /** @issue #253 */ + public function testShouldIgnoreMissingDefaultSelfAndReturnsSelf() + { + $this->mock->shouldIgnoreMissing($this->container->self()); + $this->assertSame($this->mock, $this->mock->a()->b()); + } + + public function testToStringMagicMethodCanBeMocked() + { + $this->mock->shouldReceive("__toString")->andReturn('dave'); + $this->assertEquals("{$this->mock}", "dave"); + } + + public function testOptionalMockRetrieval() + { + $m = $this->container->mock('f')->shouldReceive('foo')->with(1)->andReturn(3)->mock(); + $this->assertTrue($m instanceof \Mockery\MockInterface); + } + + public function testNotConstraintMatchesArgument() + { + $this->mock->shouldReceive('foo')->with(Mockery::not(1))->once(); + $this->mock->foo(2); + $this->container->mockery_verify(); + } + + public function testNotConstraintNonMatchingCase() + { + $this->mock->shouldReceive('foo')->times(3); + $this->mock->shouldReceive('foo')->with(1, Mockery::not(2))->never(); + $this->mock->foo(); + $this->mock->foo(1); + $this->mock->foo(1, 2, 3); + $this->container->mockery_verify(); + } + + /** + * @expectedException \Mockery\Exception + */ + public function testNotConstraintThrowsExceptionWhenConstraintUnmatched() + { + $this->mock->shouldReceive('foo')->with(Mockery::not(2))->once(); + $this->mock->foo(2); + $this->container->mockery_verify(); + } + + public function testAnyOfConstraintMatchesArgument() + { + $this->mock->shouldReceive('foo')->with(Mockery::anyOf(1, 2))->twice(); + $this->mock->foo(2); + $this->mock->foo(1); + $this->container->mockery_verify(); + } + + public function testAnyOfConstraintNonMatchingCase() + { + $this->mock->shouldReceive('foo')->times(3); + $this->mock->shouldReceive('foo')->with(1, Mockery::anyOf(1, 2))->never(); + $this->mock->foo(); + $this->mock->foo(1); + $this->mock->foo(1, 2, 3); + $this->container->mockery_verify(); + } + + /** + * @expectedException \Mockery\Exception + */ + public function testAnyOfConstraintThrowsExceptionWhenConstraintUnmatched() + { + $this->mock->shouldReceive('foo')->with(Mockery::anyOf(1, 2))->once(); + $this->mock->foo(3); + $this->container->mockery_verify(); + } + + public function testNotAnyOfConstraintMatchesArgument() + { + $this->mock->shouldReceive('foo')->with(Mockery::notAnyOf(1, 2))->once(); + $this->mock->foo(3); + $this->container->mockery_verify(); + } + + public function testNotAnyOfConstraintNonMatchingCase() + { + $this->mock->shouldReceive('foo')->times(3); + $this->mock->shouldReceive('foo')->with(1, Mockery::notAnyOf(1, 2))->never(); + $this->mock->foo(); + $this->mock->foo(1); + $this->mock->foo(1, 4, 3); + $this->container->mockery_verify(); + } + + /** + * @expectedException \Mockery\Exception + */ + public function testNotAnyOfConstraintThrowsExceptionWhenConstraintUnmatched() + { + $this->mock->shouldReceive('foo')->with(Mockery::notAnyOf(1, 2))->once(); + $this->mock->foo(2); + $this->container->mockery_verify(); + } + + /** + * @expectedException \Mockery\Exception + */ + public function testGlobalConfigMayForbidMockingNonExistentMethodsOnClasses() + { + \Mockery::getConfiguration()->allowMockingNonExistentMethods(false); + $mock = $this->container->mock('stdClass'); + $mock->shouldReceive('foo'); + } + + /** + * @expectedException \Mockery\Exception + * @expectedExceptionMessage Mockery's configuration currently forbids mocking + */ + public function testGlobalConfigMayForbidMockingNonExistentMethodsOnAutoDeclaredClasses() + { + \Mockery::getConfiguration()->allowMockingNonExistentMethods(false); + $mock = $this->container->mock('SomeMadeUpClass'); + $mock->shouldReceive('foo'); + } + + /** + * @expectedException \Mockery\Exception + */ + public function testGlobalConfigMayForbidMockingNonExistentMethodsOnObjects() + { + \Mockery::getConfiguration()->allowMockingNonExistentMethods(false); + $mock = $this->container->mock(new stdClass); + $mock->shouldReceive('foo'); + } + + public function testAnExampleWithSomeExpectationAmends() + { + $service = $this->container->mock('MyService'); + $service->shouldReceive('login')->with('user', 'pass')->once()->andReturn(true); + $service->shouldReceive('hasBookmarksTagged')->with('php')->once()->andReturn(false); + $service->shouldReceive('addBookmark')->with('/^http:/', \Mockery::type('string'))->times(3)->andReturn(true); + $service->shouldReceive('hasBookmarksTagged')->with('php')->once()->andReturn(true); + + $this->assertTrue($service->login('user', 'pass')); + $this->assertFalse($service->hasBookmarksTagged('php')); + $this->assertTrue($service->addBookmark('http://example.com/1', 'some_tag1')); + $this->assertTrue($service->addBookmark('http://example.com/2', 'some_tag2')); + $this->assertTrue($service->addBookmark('http://example.com/3', 'some_tag3')); + $this->assertTrue($service->hasBookmarksTagged('php')); + + $this->container->mockery_verify(); + } + + public function testAnExampleWithSomeExpectationAmendsOnCallCounts() + { + $service = $this->container->mock('MyService'); + $service->shouldReceive('login')->with('user', 'pass')->once()->andReturn(true); + $service->shouldReceive('hasBookmarksTagged')->with('php')->once()->andReturn(false); + $service->shouldReceive('addBookmark')->with('/^http:/', \Mockery::type('string'))->times(3)->andReturn(true); + $service->shouldReceive('hasBookmarksTagged')->with('php')->twice()->andReturn(true); + + $this->assertTrue($service->login('user', 'pass')); + $this->assertFalse($service->hasBookmarksTagged('php')); + $this->assertTrue($service->addBookmark('http://example.com/1', 'some_tag1')); + $this->assertTrue($service->addBookmark('http://example.com/2', 'some_tag2')); + $this->assertTrue($service->addBookmark('http://example.com/3', 'some_tag3')); + $this->assertTrue($service->hasBookmarksTagged('php')); + $this->assertTrue($service->hasBookmarksTagged('php')); + + $this->container->mockery_verify(); + } + + public function testAnExampleWithSomeExpectationAmendsOnCallCounts_PHPUnitTest() + { + $service = $this->getMock('MyService2'); + $service->expects($this->once())->method('login')->with('user', 'pass')->will($this->returnValue(true)); + $service->expects($this->exactly(3))->method('hasBookmarksTagged')->with('php') + ->will($this->onConsecutiveCalls(false, true, true)); + $service->expects($this->exactly(3))->method('addBookmark') + ->with($this->matchesRegularExpression('/^http:/'), $this->isType('string')) + ->will($this->returnValue(true)); + + $this->assertTrue($service->login('user', 'pass')); + $this->assertFalse($service->hasBookmarksTagged('php')); + $this->assertTrue($service->addBookmark('http://example.com/1', 'some_tag1')); + $this->assertTrue($service->addBookmark('http://example.com/2', 'some_tag2')); + $this->assertTrue($service->addBookmark('http://example.com/3', 'some_tag3')); + $this->assertTrue($service->hasBookmarksTagged('php')); + $this->assertTrue($service->hasBookmarksTagged('php')); + } + + public function testMockedMethodsCallableFromWithinOriginalClass() + { + $mock = $this->container->mock('MockeryTest_InterMethod1[doThird]'); + $mock->shouldReceive('doThird')->andReturn(true); + $this->assertTrue($mock->doFirst()); + } + + /** + * @group issue #20 + */ + public function testMockingDemeterChainsPassesMockeryExpectationToCompositeExpectation() + { + $mock = $this->container->mock('Mockery_Demeterowski'); + $mock->shouldReceive('foo->bar->baz')->andReturn('Spam!'); + $demeter = new Mockery_UseDemeter($mock); + $this->assertSame('Spam!', $demeter->doit()); + } + + /** + * @group issue #20 - with args in demeter chain + */ + public function testMockingDemeterChainsPassesMockeryExpectationToCompositeExpectationWithArgs() + { + $mock = $this->container->mock('Mockery_Demeterowski'); + $mock->shouldReceive('foo->bar->baz')->andReturn('Spam!'); + $demeter = new Mockery_UseDemeter($mock); + $this->assertSame('Spam!', $demeter->doitWithArgs()); + } + + public function testPassthruEnsuresRealMethodCalledForReturnValues() + { + $mock = $this->container->mock('MockeryTest_SubjectCall1'); + $mock->shouldReceive('foo')->once()->passthru(); + $this->assertEquals('bar', $mock->foo()); + $this->container->mockery_verify(); + } + + public function testShouldIgnoreMissingExpectationBasedOnArgs() + { + $mock = $this->container->mock("MyService2")->shouldIgnoreMissing(); + $mock->shouldReceive("hasBookmarksTagged")->with("dave")->once(); + $mock->hasBookmarksTagged("dave"); + $mock->hasBookmarksTagged("padraic"); + $this->container->mockery_verify(); + } + + public function testShouldDeferMissingExpectationBasedOnArgs() + { + $mock = $this->container->mock("MockeryTest_SubjectCall1")->shouldDeferMissing(); + + $this->assertEquals('bar', $mock->foo()); + $this->assertEquals('bar', $mock->foo("baz")); + $this->assertEquals('bar', $mock->foo("qux")); + + $mock->shouldReceive("foo")->with("baz")->twice()->andReturn('123'); + $this->assertEquals('bar', $mock->foo()); + $this->assertEquals('123', $mock->foo("baz")); + $this->assertEquals('bar', $mock->foo("qux")); + + $mock->shouldReceive("foo")->withNoArgs()->once()->andReturn('456'); + $this->assertEquals('456', $mock->foo()); + $this->assertEquals('123', $mock->foo("baz")); + $this->assertEquals('bar', $mock->foo("qux")); + + $this->container->mockery_verify(); + } + + public function testCanReturnSelf() + { + $this->mock->shouldReceive("foo")->andReturnSelf(); + $this->assertSame($this->mock, $this->mock->foo()); + } + + public function testExpectationCanBeOverridden() + { + $this->mock->shouldReceive('foo')->once()->andReturn('green'); + $this->mock->shouldReceive('foo')->andReturn('blue'); + $this->assertEquals($this->mock->foo(), 'green'); + $this->assertEquals($this->mock->foo(), 'blue'); + } +} + +class MockeryTest_SubjectCall1 +{ + public function foo() + { + return 'bar'; + } +} + +class MockeryTest_InterMethod1 +{ + public function doFirst() + { + return $this->doSecond(); + } + + private function doSecond() + { + return $this->doThird(); + } + + public function doThird() + { + return false; + } +} + +class MyService2 +{ + public function login($user, $pass) + { + } + public function hasBookmarksTagged($tag) + { + } + public function addBookmark($uri, $tag) + { + } +} + +class Mockery_Duck +{ + public function quack() + { + } + public function swim() + { + } +} + +class Mockery_Duck_Nonswimmer +{ + public function quack() + { + } +} + +class Mockery_Demeterowski +{ + public function foo() + { + return $this; + } + public function bar() + { + return $this; + } + public function baz() + { + return 'Ham!'; + } +} + +class Mockery_UseDemeter +{ + public function __construct($demeter) + { + $this->demeter = $demeter; + } + public function doit() + { + return $this->demeter->foo()->bar()->baz(); + } + public function doitWithArgs() + { + return $this->demeter->foo("foo")->bar("bar")->baz("baz"); + } +} + +class MockeryTest_Foo +{ + public function foo() + { + } +} diff --git a/vendor/mockery/mockery/tests/Mockery/Fixtures/MethodWithNullableParameters.php b/vendor/mockery/mockery/tests/Mockery/Fixtures/MethodWithNullableParameters.php new file mode 100644 index 0000000..17700e7 --- /dev/null +++ b/vendor/mockery/mockery/tests/Mockery/Fixtures/MethodWithNullableParameters.php @@ -0,0 +1,49 @@ +assertTrue($target->hasInternalAncestor()); + + $target = new DefinedTargetClass(new \ReflectionClass("Mockery\MockeryTest_ClassThatExtendsArrayObject")); + $this->assertTrue($target->hasInternalAncestor()); + + $target = new DefinedTargetClass(new \ReflectionClass("Mockery\DefinedTargetClassTest")); + $this->assertFalse($target->hasInternalAncestor()); + } +} + +class MockeryTest_ClassThatExtendsArrayObject extends \ArrayObject +{ +} diff --git a/vendor/mockery/mockery/tests/Mockery/Generator/MockConfigurationTest.php b/vendor/mockery/mockery/tests/Mockery/Generator/MockConfigurationTest.php new file mode 100644 index 0000000..12aee9c --- /dev/null +++ b/vendor/mockery/mockery/tests/Mockery/Generator/MockConfigurationTest.php @@ -0,0 +1,197 @@ +getMethodsToMock(); + $this->assertEquals(1, count($methods)); + $this->assertEquals("bar", $methods[0]->getName()); + } + + /** + * @test + */ + public function blackListsAreCaseInsensitive() + { + $config = new MockConfiguration(array("Mockery\Generator\\TestSubject"), array("FOO")); + + $methods = $config->getMethodsToMock(); + $this->assertEquals(1, count($methods)); + $this->assertEquals("bar", $methods[0]->getName()); + } + + + /** + * @test + */ + public function onlyWhiteListedMethodsShouldBeInListToBeMocked() + { + $config = new MockConfiguration(array("Mockery\Generator\\TestSubject"), array(), array('foo')); + + $methods = $config->getMethodsToMock(); + $this->assertEquals(1, count($methods)); + $this->assertEquals("foo", $methods[0]->getName()); + } + + /** + * @test + */ + public function whitelistOverRulesBlackList() + { + $config = new MockConfiguration(array("Mockery\Generator\\TestSubject"), array("foo"), array("foo")); + + $methods = $config->getMethodsToMock(); + $this->assertEquals(1, count($methods)); + $this->assertEquals("foo", $methods[0]->getName()); + } + + /** + * @test + */ + public function whiteListsAreCaseInsensitive() + { + $config = new MockConfiguration(array("Mockery\Generator\\TestSubject"), array(), array("FOO")); + + $methods = $config->getMethodsToMock(); + $this->assertEquals(1, count($methods)); + $this->assertEquals("foo", $methods[0]->getName()); + } + + /** + * @test + */ + public function finalMethodsAreExcluded() + { + $config = new MockConfiguration(array("Mockery\Generator\\ClassWithFinalMethod")); + + $methods = $config->getMethodsToMock(); + $this->assertEquals(1, count($methods)); + $this->assertEquals("bar", $methods[0]->getName()); + } + + /** + * @test + */ + public function shouldIncludeMethodsFromAllTargets() + { + $config = new MockConfiguration(array("Mockery\\Generator\\TestInterface", "Mockery\\Generator\\TestInterface2")); + $methods = $config->getMethodsToMock(); + $this->assertEquals(2, count($methods)); + } + + /** + * @test + * @expectedException Mockery\Exception + */ + public function shouldThrowIfTargetClassIsFinal() + { + $config = new MockConfiguration(array("Mockery\\Generator\\TestFinal")); + $config->getTargetClass(); + } + + /** + * @test + */ + public function shouldTargetIteratorAggregateIfTryingToMockTraversable() + { + $config = new MockConfiguration(array("\\Traversable")); + + $interfaces = $config->getTargetInterfaces(); + $this->assertEquals(1, count($interfaces)); + $first = array_shift($interfaces); + $this->assertEquals("IteratorAggregate", $first->getName()); + } + + /** + * @test + */ + public function shouldTargetIteratorAggregateIfTraversableInTargetsTree() + { + $config = new MockConfiguration(array("Mockery\Generator\TestTraversableInterface")); + + $interfaces = $config->getTargetInterfaces(); + $this->assertEquals(2, count($interfaces)); + $this->assertEquals("IteratorAggregate", $interfaces[0]->getName()); + $this->assertEquals("Mockery\Generator\TestTraversableInterface", $interfaces[1]->getName()); + } + + /** + * @test + */ + public function shouldBringIteratorToHeadOfTargetListIfTraversablePresent() + { + $config = new MockConfiguration(array("Mockery\Generator\TestTraversableInterface2")); + + $interfaces = $config->getTargetInterfaces(); + $this->assertEquals(2, count($interfaces)); + $this->assertEquals("Iterator", $interfaces[0]->getName()); + $this->assertEquals("Mockery\Generator\TestTraversableInterface2", $interfaces[1]->getName()); + } + + /** + * @test + */ + public function shouldBringIteratorAggregateToHeadOfTargetListIfTraversablePresent() + { + $config = new MockConfiguration(array("Mockery\Generator\TestTraversableInterface3")); + + $interfaces = $config->getTargetInterfaces(); + $this->assertEquals(2, count($interfaces)); + $this->assertEquals("IteratorAggregate", $interfaces[0]->getName()); + $this->assertEquals("Mockery\Generator\TestTraversableInterface3", $interfaces[1]->getName()); + } +} + +interface TestTraversableInterface extends \Traversable +{ +} +interface TestTraversableInterface2 extends \Traversable, \Iterator +{ +} +interface TestTraversableInterface3 extends \Traversable, \IteratorAggregate +{ +} + +final class TestFinal +{ +} + +interface TestInterface +{ + public function foo(); +} + +interface TestInterface2 +{ + public function bar(); +} + +class TestSubject +{ + public function foo() + { + } + + public function bar() + { + } +} + +class ClassWithFinalMethod +{ + final public function foo() + { + } + + public function bar() + { + } +} diff --git a/vendor/mockery/mockery/tests/Mockery/Generator/StringManipulation/Pass/CallTypeHintPassTest.php b/vendor/mockery/mockery/tests/Mockery/Generator/StringManipulation/Pass/CallTypeHintPassTest.php new file mode 100644 index 0000000..a8bb155 --- /dev/null +++ b/vendor/mockery/mockery/tests/Mockery/Generator/StringManipulation/Pass/CallTypeHintPassTest.php @@ -0,0 +1,39 @@ + true, + ))->shouldDeferMissing(); + $code = $pass->apply(static::CODE, $config); + $this->assertContains('__call($method, $args)', $code); + } + + /** + * @test + */ + public function shouldRemoveCallStaticTypeHintIfRequired() + { + $pass = new CallTypeHintPass; + $config = m::mock("Mockery\Generator\MockConfiguration", array( + "requiresCallStaticTypeHintRemoval" => true, + ))->shouldDeferMissing(); + $code = $pass->apply(static::CODE, $config); + $this->assertContains('__callStatic($method, $args)', $code); + } +} diff --git a/vendor/mockery/mockery/tests/Mockery/Generator/StringManipulation/Pass/ClassNamePassTest.php b/vendor/mockery/mockery/tests/Mockery/Generator/StringManipulation/Pass/ClassNamePassTest.php new file mode 100644 index 0000000..e283cce --- /dev/null +++ b/vendor/mockery/mockery/tests/Mockery/Generator/StringManipulation/Pass/ClassNamePassTest.php @@ -0,0 +1,58 @@ +pass = new ClassNamePass(); + } + + /** + * @test + */ + public function shouldRemoveNamespaceDefinition() + { + $config = new MockConfiguration(array(), array(), array(), "Dave\Dave"); + $code = $this->pass->apply(static::CODE, $config); + $this->assertNotContains('namespace Mockery;', $code); + } + + /** + * @test + */ + public function shouldReplaceNamespaceIfClassNameIsNamespaced() + { + $config = new MockConfiguration(array(), array(), array(), "Dave\Dave"); + $code = $this->pass->apply(static::CODE, $config); + $this->assertNotContains('namespace Mockery;', $code); + $this->assertContains('namespace Dave;', $code); + } + + /** + * @test + */ + public function shouldReplaceClassNameWithSpecifiedName() + { + $config = new MockConfiguration(array(), array(), array(), "Dave"); + $code = $this->pass->apply(static::CODE, $config); + $this->assertContains('class Dave', $code); + } + + /** + * @test + */ + public function shouldRemoveLeadingBackslashesFromNamespace() + { + $config = new MockConfiguration(array(), array(), array(), "\Dave\Dave"); + $code = $this->pass->apply(static::CODE, $config); + $this->assertContains('namespace Dave;', $code); + } +} diff --git a/vendor/mockery/mockery/tests/Mockery/Generator/StringManipulation/Pass/InstanceMockPassTest.php b/vendor/mockery/mockery/tests/Mockery/Generator/StringManipulation/Pass/InstanceMockPassTest.php new file mode 100644 index 0000000..23493de --- /dev/null +++ b/vendor/mockery/mockery/tests/Mockery/Generator/StringManipulation/Pass/InstanceMockPassTest.php @@ -0,0 +1,24 @@ +setInstanceMock(true); + $config = $builder->getMockConfiguration(); + $pass = new InstanceMockPass; + $code = $pass->apply('class Dave { }', $config); + $this->assertContains('public function __construct', $code); + $this->assertContains('protected $_mockery_ignoreVerification', $code); + } +} diff --git a/vendor/mockery/mockery/tests/Mockery/Generator/StringManipulation/Pass/InterfacePassTest.php b/vendor/mockery/mockery/tests/Mockery/Generator/StringManipulation/Pass/InterfacePassTest.php new file mode 100644 index 0000000..ff248ca --- /dev/null +++ b/vendor/mockery/mockery/tests/Mockery/Generator/StringManipulation/Pass/InterfacePassTest.php @@ -0,0 +1,46 @@ + array(), + )); + + $code = $pass->apply(static::CODE, $config); + $this->assertEquals(static::CODE, $code); + } + + /** + * @test + */ + public function shouldAddAnyInterfaceNamesToImplementsDefinition() + { + $pass = new InterfacePass; + + $config = m::mock("Mockery\Generator\MockConfiguration", array( + "getTargetInterfaces" => array( + m::mock(array("getName" => "Dave\Dave")), + m::mock(array("getName" => "Paddy\Paddy")), + ), + )); + + $code = $pass->apply(static::CODE, $config); + + $this->assertContains("implements MockInterface, \Dave\Dave, \Paddy\Paddy", $code); + } +} diff --git a/vendor/mockery/mockery/tests/Mockery/HamcrestExpectationTest.php b/vendor/mockery/mockery/tests/Mockery/HamcrestExpectationTest.php new file mode 100644 index 0000000..07f702e --- /dev/null +++ b/vendor/mockery/mockery/tests/Mockery/HamcrestExpectationTest.php @@ -0,0 +1,65 @@ +container = new \Mockery\Container(\Mockery::getDefaultGenerator(), \Mockery::getDefaultLoader()); + $this->mock = $this->container->mock('foo'); + } + + + public function tearDown() + { + \Mockery::getConfiguration()->allowMockingNonExistentMethods(true); + $this->container->mockery_close(); + } + + /** Just a quickie roundup of a few Hamcrest matchers to check nothing obvious out of place **/ + + public function testAnythingConstraintMatchesArgument() + { + $this->mock->shouldReceive('foo')->with(anything())->once(); + $this->mock->foo(2); + $this->container->mockery_verify(); + } + + public function testGreaterThanConstraintMatchesArgument() + { + $this->mock->shouldReceive('foo')->with(greaterThan(1))->once(); + $this->mock->foo(2); + $this->container->mockery_verify(); + } + + /** + * @expectedException Mockery\Exception + */ + public function testGreaterThanConstraintNotMatchesArgument() + { + $this->mock->shouldReceive('foo')->with(greaterThan(1))->once(); + $this->mock->foo(1); + $this->container->mockery_verify(); + } +} diff --git a/vendor/mockery/mockery/tests/Mockery/Loader/EvalLoaderTest.php b/vendor/mockery/mockery/tests/Mockery/Loader/EvalLoaderTest.php new file mode 100644 index 0000000..6081df4 --- /dev/null +++ b/vendor/mockery/mockery/tests/Mockery/Loader/EvalLoaderTest.php @@ -0,0 +1,16 @@ +getLoader()->load($definition); + + $this->assertTrue(class_exists($className)); + } + + abstract public function getLoader(); +} diff --git a/vendor/mockery/mockery/tests/Mockery/Loader/RequireLoaderTest.php b/vendor/mockery/mockery/tests/Mockery/Loader/RequireLoaderTest.php new file mode 100644 index 0000000..1d32abb --- /dev/null +++ b/vendor/mockery/mockery/tests/Mockery/Loader/RequireLoaderTest.php @@ -0,0 +1,16 @@ +register(); + $expected = array($loader, 'loadClass'); + $this->assertTrue(in_array($expected, spl_autoload_functions())); + } + + public function tearDown() + { + spl_autoload_unregister('\Mockery\Loader::loadClass'); + $loader = new \Mockery\Loader; + $loader->register(); + } +} diff --git a/vendor/mockery/mockery/tests/Mockery/MockClassWithFinalWakeupTest.php b/vendor/mockery/mockery/tests/Mockery/MockClassWithFinalWakeupTest.php new file mode 100644 index 0000000..c2cb278 --- /dev/null +++ b/vendor/mockery/mockery/tests/Mockery/MockClassWithFinalWakeupTest.php @@ -0,0 +1,96 @@ + + * @license http://github.com/padraic/mockery/blob/master/LICENSE New BSD License + */ + +namespace test\Mockery; + +use Mockery\Adapter\Phpunit\MockeryTestCase; + +class MockClassWithFinalWakeupTest extends MockeryTestCase +{ + + protected function setUp() + { + $this->container = new \Mockery\Container; + } + + protected function tearDown() + { + $this->container->mockery_close(); + } + + /** + * @test + * + * Test that we are able to create partial mocks of classes that have + * a __wakeup method marked as final. As long as __wakeup is not one of the + * mocked methods. + */ + public function testCreateMockForClassWithFinalWakeup() + { + $mock = $this->container->mock("test\Mockery\TestWithFinalWakeup"); + $this->assertInstanceOf("test\Mockery\TestWithFinalWakeup", $mock); + $this->assertEquals('test\Mockery\TestWithFinalWakeup::__wakeup', $mock->__wakeup()); + + $mock = $this->container->mock('test\Mockery\SubclassWithFinalWakeup'); + $this->assertInstanceOf('test\Mockery\SubclassWithFinalWakeup', $mock); + $this->assertEquals('test\Mockery\TestWithFinalWakeup::__wakeup', $mock->__wakeup()); + } + + public function testCreateMockForClassWithNonFinalWakeup() + { + $mock = $this->container->mock('test\Mockery\TestWithNonFinalWakeup'); + $this->assertInstanceOf('test\Mockery\TestWithNonFinalWakeup', $mock); + + // Make sure __wakeup is overridden and doesn't return anything. + $this->assertNull($mock->__wakeup()); + } +} + +class TestWithFinalWakeup +{ + + public function foo() + { + return 'foo'; + } + + public function bar() + { + return 'bar'; + } + + final public function __wakeup() + { + return __METHOD__; + } +} + +class SubclassWithFinalWakeup extends TestWithFinalWakeup +{ +} + +class TestWithNonFinalWakeup +{ + public function __wakeup() + { + return __METHOD__; + } +} diff --git a/vendor/mockery/mockery/tests/Mockery/MockClassWithUnknownTypeHintTest.php b/vendor/mockery/mockery/tests/Mockery/MockClassWithUnknownTypeHintTest.php new file mode 100644 index 0000000..b2a59f7 --- /dev/null +++ b/vendor/mockery/mockery/tests/Mockery/MockClassWithUnknownTypeHintTest.php @@ -0,0 +1,45 @@ +container = new \Mockery\Container; + } + + protected function tearDown() + { + $this->container->mockery_close(); + } + + /** @test */ + public function itShouldSuccessfullyBuildTheMock() + { + $this->container->mock("test\Mockery\HasUnknownClassAsTypeHintOnMethod"); + } +} + +class HasUnknownClassAsTypeHintOnMethod +{ + public function foo(\UnknownTestClass\Bar $bar) + { + } +} diff --git a/vendor/mockery/mockery/tests/Mockery/MockTest.php b/vendor/mockery/mockery/tests/Mockery/MockTest.php new file mode 100644 index 0000000..b9932cb --- /dev/null +++ b/vendor/mockery/mockery/tests/Mockery/MockTest.php @@ -0,0 +1,193 @@ +container = new \Mockery\Container(\Mockery::getDefaultGenerator(), \Mockery::getDefaultLoader()); + } + + public function teardown() + { + $this->container->mockery_close(); + } + + public function testAnonymousMockWorksWithNotAllowingMockingOfNonExistentMethods() + { + \Mockery::getConfiguration()->allowMockingNonExistentMethods(false); + $m = $this->container->mock(); + $m->shouldReceive("test123")->andReturn(true); + assertThat($m->test123(), equalTo(true)); + \Mockery::getConfiguration()->allowMockingNonExistentMethods(true); + } + + public function testMockWithNotAllowingMockingOfNonExistentMethodsCanBeGivenAdditionalMethodsToMockEvenIfTheyDontExistOnClass() + { + \Mockery::getConfiguration()->allowMockingNonExistentMethods(false); + $m = $this->container->mock('ExampleClassForTestingNonExistentMethod'); + $m->shouldAllowMockingMethod('testSomeNonExistentMethod'); + $m->shouldReceive("testSomeNonExistentMethod")->andReturn(true); + assertThat($m->testSomeNonExistentMethod(), equalTo(true)); + \Mockery::getConfiguration()->allowMockingNonExistentMethods(true); + } + + public function testShouldAllowMockingMethodReturnsMockInstance() + { + $m = Mockery::mock('someClass'); + $this->assertInstanceOf('Mockery\MockInterface', $m->shouldAllowMockingMethod('testFunction')); + } + + public function testShouldAllowMockingProtectedMethodReturnsMockInstance() + { + $m = Mockery::mock('someClass'); + $this->assertInstanceOf('Mockery\MockInterface', $m->shouldAllowMockingProtectedMethods('testFunction')); + } + + public function testMockAddsToString() + { + $mock = $this->container->mock('ClassWithNoToString'); + assertThat(hasToString($mock)); + } + + public function testMockToStringMayBeDeferred() + { + $mock = $this->container->mock('ClassWithToString')->shouldDeferMissing(); + assertThat((string)$mock, equalTo("foo")); + } + + public function testMockToStringShouldIgnoreMissingAlwaysReturnsString() + { + $mock = $this->container->mock('ClassWithNoToString')->shouldIgnoreMissing(); + assertThat(isNonEmptyString((string)$mock)); + + $mock->asUndefined(); + assertThat(isNonEmptyString((string)$mock)); + } + + public function testShouldIgnoreMissing() + { + $mock = $this->container->mock('ClassWithNoToString')->shouldIgnoreMissing(); + assertThat(nullValue($mock->nonExistingMethod())); + } + + public function testShouldIgnoreDebugInfo() + { + $mock = $this->container->mock('ClassWithDebugInfo'); + + $mock->__debugInfo(); + } + + /** + * @expectedException Mockery\Exception + */ + public function testShouldIgnoreMissingDisallowMockingNonExistentMethodsUsingGlobalConfiguration() + { + Mockery::getConfiguration()->allowMockingNonExistentMethods(false); + $mock = $this->container->mock('ClassWithMethods')->shouldIgnoreMissing(); + $mock->shouldReceive('nonExistentMethod'); + } + + /** + * @expectedException BadMethodCallException + */ + public function testShouldIgnoreMissingCallingNonExistentMethodsUsingGlobalConfiguration() + { + Mockery::getConfiguration()->allowMockingNonExistentMethods(false); + $mock = $this->container->mock('ClassWithMethods')->shouldIgnoreMissing(); + $mock->nonExistentMethod(); + } + + public function testShouldIgnoreMissingCallingExistentMethods() + { + Mockery::getConfiguration()->allowMockingNonExistentMethods(false); + $mock = $this->container->mock('ClassWithMethods')->shouldIgnoreMissing(); + assertThat(nullValue($mock->foo())); + $mock->shouldReceive('bar')->passthru(); + assertThat($mock->bar(), equalTo('bar')); + } + + public function testShouldIgnoreMissingCallingNonExistentMethods() + { + Mockery::getConfiguration()->allowMockingNonExistentMethods(true); + $mock = $this->container->mock('ClassWithMethods')->shouldIgnoreMissing(); + assertThat(nullValue($mock->foo())); + assertThat(nullValue($mock->bar())); + assertThat(nullValue($mock->nonExistentMethod())); + + $mock->shouldReceive(array('foo' => 'new_foo', 'nonExistentMethod' => 'result')); + $mock->shouldReceive('bar')->passthru(); + assertThat($mock->foo(), equalTo('new_foo')); + assertThat($mock->bar(), equalTo('bar')); + assertThat($mock->nonExistentMethod(), equalTo('result')); + } + + public function testCanMockException() + { + $exception = Mockery::mock('Exception'); + $this->assertInstanceOf('Exception', $exception); + } +} + + +class ExampleClassForTestingNonExistentMethod +{ +} + +class ClassWithToString +{ + public function __toString() + { + return 'foo'; + } +} + +class ClassWithNoToString +{ +} + +class ClassWithMethods +{ + public function foo() + { + return 'foo'; + } + + public function bar() + { + return 'bar'; + } +} + +class ClassWithDebugInfo +{ + public function __debugInfo() + { + return array('test' => 'test'); + } +} diff --git a/vendor/mockery/mockery/tests/Mockery/MockeryCanMockMultipleInterfacesWhichOverlapTest.php b/vendor/mockery/mockery/tests/Mockery/MockeryCanMockMultipleInterfacesWhichOverlapTest.php new file mode 100644 index 0000000..ac09ed4 --- /dev/null +++ b/vendor/mockery/mockery/tests/Mockery/MockeryCanMockMultipleInterfacesWhichOverlapTest.php @@ -0,0 +1,66 @@ +mock('Mockery\Tests\Evenement_EventEmitter', 'Mockery\Tests\Chatroulette_ConnectionInterface'); + } +} + +interface Evenement_EventEmitterInterface +{ + public function on($name, $callback); +} + +class Evenement_EventEmitter implements Evenement_EventEmitterInterface +{ + public function on($name, $callback) + { + } +} + +interface React_StreamInterface extends Evenement_EventEmitterInterface +{ + public function close(); +} + +interface React_ReadableStreamInterface extends React_StreamInterface +{ + public function pause(); +} + +interface React_WritableStreamInterface extends React_StreamInterface +{ + public function write($data); +} + +interface Chatroulette_ConnectionInterface extends React_ReadableStreamInterface, React_WritableStreamInterface +{ +} diff --git a/vendor/mockery/mockery/tests/Mockery/MockingMethodsWithNullableParametersTest.php b/vendor/mockery/mockery/tests/Mockery/MockingMethodsWithNullableParametersTest.php new file mode 100644 index 0000000..1e08364 --- /dev/null +++ b/vendor/mockery/mockery/tests/Mockery/MockingMethodsWithNullableParametersTest.php @@ -0,0 +1,185 @@ +container = new \Mockery\Container; + } + + protected function tearDown() + { + $this->container->mockery_close(); + } + + /** + * @test + */ + public function itShouldAllowNonNullableTypeToBeSet() + { + $mock = $this->container->mock('test\Mockery\Fixtures\MethodWithNullableParameters'); + + $mock->shouldReceive('nonNullablePrimitive')->with('a string'); + $mock->nonNullablePrimitive('a string'); + } + + /** + * @test + * @expectedException \TypeError + */ + public function itShouldNotAllowNonNullToBeNull() + { + $mock = $this->container->mock('test\Mockery\Fixtures\MethodWithNullableParameters'); + + $mock->nonNullablePrimitive(null); + } + + /** + * @test + */ + public function itShouldAllowPrimitiveNullableToBeNull() + { + $mock = $this->container->mock('test\Mockery\Fixtures\MethodWithNullableParameters'); + + $mock->shouldReceive('nullablePrimitive')->with(null); + $mock->nullablePrimitive(null); + } + + /** + * @test + */ + public function itShouldAllowPrimitiveNullabeToBeSet() + { + $mock = $this->container->mock('test\Mockery\Fixtures\MethodWithNullableParameters'); + + $mock->shouldReceive('nullablePrimitive')->with('a string'); + $mock->nullablePrimitive('a string'); + } + /** + * @test + */ + public function itShouldAllowSelfToBeSet() + { + $obj = new \test\Mockery\Fixtures\MethodWithNullableParameters; + $mock = $this->container->mock('test\Mockery\Fixtures\MethodWithNullableParameters'); + + $mock->shouldReceive('nonNullableSelf')->with($obj); + $mock->nonNullableSelf($obj); + } + + /** + * @test + * @expectedException \TypeError + */ + public function itShouldNotAllowSelfToBeNull() + { + $mock = $this->container->mock('test\Mockery\Fixtures\MethodWithNullableParameters'); + + $mock->nonNullableSelf(null); + } + + /** + * @test + */ + public function itShouldAllowNullalbeSelfToBeSet() + { + $obj = new \test\Mockery\Fixtures\MethodWithNullableParameters; + + $mock = $this->container->mock('test\Mockery\Fixtures\MethodWithNullableParameters'); + + $mock->shouldReceive('nullableSelf')->with($obj); + $mock->nullableSelf($obj); + } + + /** + * @test + */ + public function itShouldAllowNullableSelfToBeNull() + { + $mock = $this->container->mock('test\Mockery\Fixtures\MethodWithNullableParameters'); + + $mock->shouldReceive('nullableClass')->with(null); + $mock->nullableClass(null); + } + + /** + * @test + */ + public function itShouldAllowClassToBeSet() + { + $obj = new \test\Mockery\Fixtures\MethodWithNullableParameters; + $mock = $this->container->mock('test\Mockery\Fixtures\MethodWithNullableParameters'); + + $mock->shouldReceive('nonNullableClass')->with($obj); + $mock->nonNullableClass($obj); + } + + /** + * @test + * @expectedException \TypeError + */ + public function itShouldNotAllowClassToBeNull() + { + $mock = $this->container->mock('test\Mockery\Fixtures\MethodWithNullableParameters'); + + $mock->nonNullableClass(null); + } + + /** + * @test + */ + public function itShouldAllowNullalbeClassToBeSet() + { + $obj = new \test\Mockery\Fixtures\MethodWithNullableParameters; + + $mock = $this->container->mock('test\Mockery\Fixtures\MethodWithNullableParameters'); + + $mock->shouldReceive('nullableClass')->with($obj); + $mock->nullableClass($obj); + } + + /** + * @test + */ + public function itShouldAllowNullableClassToBeNull() + { + $mock = $this->container->mock('test\Mockery\Fixtures\MethodWithNullableParameters'); + + $mock->shouldReceive('nullableClass')->with(null); + $mock->nullableClass(null); + } +} diff --git a/vendor/mockery/mockery/tests/Mockery/MockingNullableMethodsTest.php b/vendor/mockery/mockery/tests/Mockery/MockingNullableMethodsTest.php new file mode 100644 index 0000000..26fbd3f --- /dev/null +++ b/vendor/mockery/mockery/tests/Mockery/MockingNullableMethodsTest.php @@ -0,0 +1,184 @@ +container = new \Mockery\Container; + } + + protected function tearDown() + { + $this->container->mockery_close(); + } + + /** + * @test + */ + public function itShouldAllowNonNullableTypeToBeSet() + { + $mock = $this->container->mock('test\Mockery\Fixtures\MethodWithNullableReturnType'); + + $mock->shouldReceive('nonNullablePrimitive')->andReturn('a string'); + $mock->nonNullablePrimitive(); + } + + /** + * @test + * @expectedException \TypeError + */ + public function itShouldNotAllowNonNullToBeNull() + { + $mock = $this->container->mock('test\Mockery\Fixtures\MethodWithNullableReturnType'); + + $mock->shouldReceive('nonNullablePrimitive')->andReturn(null); + $mock->nonNullablePrimitive(); + } + + /** + * @test + */ + public function itShouldAllowPrimitiveNullableToBeNull() + { + $mock = $this->container->mock('test\Mockery\Fixtures\MethodWithNullableReturnType'); + + $mock->shouldReceive('nullablePrimitive')->andReturn(null); + $mock->nullablePrimitive(); + } + + /** + * @test + */ + public function itShouldAllowPrimitiveNullabeToBeSet() + { + $mock = $this->container->mock('test\Mockery\Fixtures\MethodWithNullableReturnType'); + + $mock->shouldReceive('nullablePrimitive')->andReturn('a string'); + $mock->nullablePrimitive(); + } + + /** + * @test + */ + public function itShouldAllowSelfToBeSet() + { + $mock = $this->container->mock('test\Mockery\Fixtures\MethodWithNullableReturnType'); + + $mock->shouldReceive('nonNullableSelf')->andReturn(new MethodWithNullableReturnType()); + $mock->nonNullableSelf(); + } + + /** + * @test + * @expectedException \TypeError + */ + public function itShouldNotAllowSelfToBeNull() + { + $mock = $this->container->mock('test\Mockery\Fixtures\MethodWithNullableReturnType'); + + $mock->shouldReceive('nonNullableSelf')->andReturn(null); + $mock->nonNullableSelf(); + } + + /** + * @test + */ + public function itShouldAllowNullableSelfToBeSet() + { + $mock = $this->container->mock('test\Mockery\Fixtures\MethodWithNullableReturnType'); + + $mock->shouldReceive('nullableSelf')->andReturn(new MethodWithNullableReturnType()); + $mock->nullableSelf(); + } + + /** + * @test + */ + public function itShouldAllowNullableSelfToBeNull() + { + $mock = $this->container->mock('test\Mockery\Fixtures\MethodWithNullableReturnType'); + + $mock->shouldReceive('nullableSelf')->andReturn(null); + $mock->nullableSelf(); + } + + /** + * @test + */ + public function itShouldAllowClassToBeSet() + { + $mock = $this->container->mock('test\Mockery\Fixtures\MethodWithNullableReturnType'); + + $mock->shouldReceive('nonNullableClass')->andReturn(new MethodWithNullableReturnType()); + $mock->nonNullableClass(); + } + + /** + * @test + * @expectedException \TypeError + */ + public function itShouldNotAllowClassToBeNull() + { + $mock = $this->container->mock('test\Mockery\Fixtures\MethodWithNullableReturnType'); + + $mock->shouldReceive('nonNullableClass')->andReturn(null); + $mock->nonNullableClass(); + } + + /** + * @test + */ + public function itShouldAllowNullalbeClassToBeSet() + { + $mock = $this->container->mock('test\Mockery\Fixtures\MethodWithNullableReturnType'); + + $mock->shouldReceive('nullableClass')->andReturn(new MethodWithNullableReturnType()); + $mock->nullableClass(); + } + + /** + * @test + */ + public function itShouldAllowNullableClassToBeNull() + { + $mock = $this->container->mock('test\Mockery\Fixtures\MethodWithNullableReturnType'); + + $mock->shouldReceive('nullableClass')->andReturn(null); + $mock->nullableClass(); + } +} diff --git a/vendor/mockery/mockery/tests/Mockery/MockingParameterAndReturnTypesTest.php b/vendor/mockery/mockery/tests/Mockery/MockingParameterAndReturnTypesTest.php new file mode 100644 index 0000000..d4cb36c --- /dev/null +++ b/vendor/mockery/mockery/tests/Mockery/MockingParameterAndReturnTypesTest.php @@ -0,0 +1,151 @@ +container = new \Mockery\Container; + } + + public function teardown() + { + $this->container->mockery_close(); + } + + public function testMockingStringReturnType() + { + $mock = $this->container->mock("test\Mockery\TestWithParameterAndReturnType"); + + $mock->shouldReceive("returnString"); + $this->assertSame("", $mock->returnString()); + } + + public function testMockingIntegerReturnType() + { + $mock = $this->container->mock("test\Mockery\TestWithParameterAndReturnType"); + + $mock->shouldReceive("returnInteger"); + $this->assertEquals(0, $mock->returnInteger()); + } + + public function testMockingFloatReturnType() + { + $mock = $this->container->mock("test\Mockery\TestWithParameterAndReturnType"); + + $mock->shouldReceive("returnFloat"); + $this->assertSame(0.0, $mock->returnFloat()); + } + + public function testMockingBooleanReturnType() + { + $mock = $this->container->mock("test\Mockery\TestWithParameterAndReturnType"); + + $mock->shouldReceive("returnBoolean"); + $this->assertSame(false, $mock->returnBoolean()); + } + + public function testMockingArrayReturnType() + { + $mock = $this->container->mock("test\Mockery\TestWithParameterAndReturnType"); + + $mock->shouldReceive("returnArray"); + $this->assertSame([], $mock->returnArray()); + } + + public function testMockingGeneratorReturnTyps() + { + $mock = $this->container->mock("test\Mockery\TestWithParameterAndReturnType"); + + $mock->shouldReceive("returnGenerator"); + $this->assertInstanceOf("\Generator", $mock->returnGenerator()); + } + + public function testMockingCallableReturnType() + { + $mock = $this->container->mock("test\Mockery\TestWithParameterAndReturnType"); + + $mock->shouldReceive("returnCallable"); + $this->assertTrue(is_callable($mock->returnCallable())); + } + + public function testMockingClassReturnTypes() + { + $mock = $this->container->mock("test\Mockery\TestWithParameterAndReturnType"); + + $mock->shouldReceive("withClassReturnType"); + $this->assertInstanceOf("test\Mockery\TestWithParameterAndReturnType", $mock->withClassReturnType()); + } + + public function testMockingParameterTypes() + { + $mock = $this->container->mock("test\Mockery\TestWithParameterAndReturnType"); + + $mock->shouldReceive("withScalarParameters"); + $mock->withScalarParameters(1, 1.0, true, 'string'); + } +} + + +abstract class TestWithParameterAndReturnType +{ + public function returnString(): string + { + } + + public function returnInteger(): int + { + } + + public function returnFloat(): float + { + } + + public function returnBoolean(): bool + { + } + + public function returnArray(): array + { + } + + public function returnCallable(): callable + { + } + + public function returnGenerator(): \Generator + { + } + + public function withClassReturnType(): TestWithParameterAndReturnType + { + } + + public function withScalarParameters(int $integer, float $float, bool $boolean, string $string) + { + } +} diff --git a/vendor/mockery/mockery/tests/Mockery/MockingProtectedMethodsTest.php b/vendor/mockery/mockery/tests/Mockery/MockingProtectedMethodsTest.php new file mode 100644 index 0000000..4f704f5 --- /dev/null +++ b/vendor/mockery/mockery/tests/Mockery/MockingProtectedMethodsTest.php @@ -0,0 +1,122 @@ +container = new \Mockery\Container; + } + + public function teardown() + { + $this->container->mockery_close(); + } + + /** + * @test + * + * This is a regression test, basically we don't want the mock handling + * interfering with calling protected methods partials + */ + public function shouldAutomaticallyDeferCallsToProtectedMethodsForPartials() + { + $mock = $this->container->mock("test\Mockery\TestWithProtectedMethods[foo]"); + $this->assertEquals("bar", $mock->bar()); + } + + /** + * @test + * + * This is a regression test, basically we don't want the mock handling + * interfering with calling protected methods partials + */ + public function shouldAutomaticallyDeferCallsToProtectedMethodsForRuntimePartials() + { + $mock = $this->container->mock("test\Mockery\TestWithProtectedMethods")->shouldDeferMissing(); + $this->assertEquals("bar", $mock->bar()); + } + + /** @test */ + public function shouldAutomaticallyIgnoreAbstractProtectedMethods() + { + $mock = $this->container->mock("test\Mockery\TestWithProtectedMethods")->shouldDeferMissing(); + $this->assertEquals(null, $mock->foo()); + } + + /** @test */ + public function shouldAllowMockingProtectedMethods() + { + $mock = $this->container->mock("test\Mockery\TestWithProtectedMethods") + ->shouldDeferMissing() + ->shouldAllowMockingProtectedMethods(); + + $mock->shouldReceive("protectedBar")->andReturn("notbar"); + $this->assertEquals("notbar", $mock->bar()); + } + + /** @test */ + public function shouldAllowMockingProtectedMethodOnDefinitionTimePartial() + { + $mock = $this->container->mock("test\Mockery\TestWithProtectedMethods[protectedBar]") + ->shouldAllowMockingProtectedMethods(); + + $mock->shouldReceive("protectedBar")->andReturn("notbar"); + $this->assertEquals("notbar", $mock->bar()); + } + + /** @test */ + public function shouldAllowMockingAbstractProtectedMethods() + { + $mock = $this->container->mock("test\Mockery\TestWithProtectedMethods") + ->shouldDeferMissing() + ->shouldAllowMockingProtectedMethods(); + + $mock->shouldReceive("abstractProtected")->andReturn("abstractProtected"); + $this->assertEquals("abstractProtected", $mock->foo()); + } +} + + +abstract class TestWithProtectedMethods +{ + public function foo() + { + return $this->abstractProtected(); + } + + abstract protected function abstractProtected(); + + public function bar() + { + return $this->protectedBar(); + } + + protected function protectedBar() + { + return 'bar'; + } +} diff --git a/vendor/mockery/mockery/tests/Mockery/MockingVariadicArgumentsTest.php b/vendor/mockery/mockery/tests/Mockery/MockingVariadicArgumentsTest.php new file mode 100644 index 0000000..39faa80 --- /dev/null +++ b/vendor/mockery/mockery/tests/Mockery/MockingVariadicArgumentsTest.php @@ -0,0 +1,56 @@ +container = new \Mockery\Container; + } + + public function teardown() + { + $this->container->mockery_close(); + } + + /** @test */ + public function shouldAllowMockingVariadicArguments() + { + $mock = $this->container->mock("test\Mockery\TestWithVariadicArguments"); + + $mock->shouldReceive("foo")->andReturn("notbar"); + $this->assertEquals("notbar", $mock->foo()); + } +} + + +abstract class TestWithVariadicArguments +{ + public function foo(...$bar) + { + return $bar; + } +} diff --git a/vendor/mockery/mockery/tests/Mockery/MockingVoidMethodsTest.php b/vendor/mockery/mockery/tests/Mockery/MockingVoidMethodsTest.php new file mode 100644 index 0000000..993efe6 --- /dev/null +++ b/vendor/mockery/mockery/tests/Mockery/MockingVoidMethodsTest.php @@ -0,0 +1,56 @@ +container = new \Mockery\Container; + } + + public function teardown() + { + $this->container->mockery_close(); + } + + /** @test */ + public function shouldAllowMockingVoidMethods() + { + $this->expectOutputString('1'); + + $mock = $this->container->mock('test\Mockery\Fixtures\VoidMethod'); + $mock->shouldReceive("foo")->andReturnUsing( + function () { + echo 1; + } + ); + + $mock->foo(); + } +} diff --git a/vendor/mockery/mockery/tests/Mockery/NamedMockTest.php b/vendor/mockery/mockery/tests/Mockery/NamedMockTest.php new file mode 100644 index 0000000..2892007 --- /dev/null +++ b/vendor/mockery/mockery/tests/Mockery/NamedMockTest.php @@ -0,0 +1,54 @@ +assertEquals("Mockery\Dave123", get_class($mock)); + } + + /** @test */ + public function itCreatesPassesFurtherArgumentsJustLikeMock() + { + $mock = Mockery::namedMock("Mockery\Dave456", "DateTime", array( + "getDave" => "dave" + )); + + $this->assertInstanceOf("DateTime", $mock); + $this->assertEquals("dave", $mock->getDave()); + } + + /** + * @test + * @expectedException Mockery\Exception + * @expectedExceptionMessage The mock named 'Mockery\Dave7' has been already defined with a different mock configuration + */ + public function itShouldThrowIfAttemptingToRedefineNamedMock() + { + $mock = Mockery::namedMock("Mockery\Dave7"); + $mock = Mockery::namedMock("Mockery\Dave7", "DateTime"); + } +} diff --git a/vendor/mockery/mockery/tests/Mockery/RecorderTest.php b/vendor/mockery/mockery/tests/Mockery/RecorderTest.php new file mode 100644 index 0000000..ce8d3d3 --- /dev/null +++ b/vendor/mockery/mockery/tests/Mockery/RecorderTest.php @@ -0,0 +1,206 @@ +container = new \Mockery\Container(\Mockery::getDefaultGenerator(), \Mockery::getDefaultLoader()); + } + + public function teardown() + { + $this->container->mockery_close(); + } + + public function testRecorderWithSimpleObject() + { + $mock = $this->container->mock(new MockeryTestSubject); + $mock->shouldExpect(function ($subject) { + $user = new MockeryTestSubjectUser($subject); + $user->doFoo(); + }); + + $this->assertEquals(1, $mock->foo()); + $mock->mockery_verify(); + } + + public function testArgumentsArePassedAsMethodExpectations() + { + $mock = $this->container->mock(new MockeryTestSubject); + $mock->shouldExpect(function ($subject) { + $user = new MockeryTestSubjectUser($subject); + $user->doBar(); + }); + + $this->assertEquals(4, $mock->bar(2)); + $mock->mockery_verify(); + } + + public function testArgumentsLooselyMatchedByDefault() + { + $mock = $this->container->mock(new MockeryTestSubject); + $mock->shouldExpect(function ($subject) { + $user = new MockeryTestSubjectUser($subject); + $user->doBar(); + }); + + $this->assertEquals(4, $mock->bar('2')); + $mock->mockery_verify(); + } + + public function testMultipleMethodExpectations() + { + $mock = $this->container->mock(new MockeryTestSubject); + $mock->shouldExpect(function ($subject) { + $user = new MockeryTestSubjectUser($subject); + $user->doFoo(); + $user->doBar(); + }); + + $this->assertEquals(1, $mock->foo()); + $this->assertEquals(4, $mock->bar(2)); + $mock->mockery_verify(); + } + + public function testRecordingDoesNotSpecifyExactOrderByDefault() + { + $mock = $this->container->mock(new MockeryTestSubject); + $mock->shouldExpect(function ($subject) { + $user = new MockeryTestSubjectUser($subject); + $user->doFoo(); + $user->doBar(); + }); + + $this->assertEquals(4, $mock->bar(2)); + $this->assertEquals(1, $mock->foo()); + $mock->mockery_verify(); + } + + /** + * @expectedException \Mockery\Exception + */ + public function testRecordingDoesSpecifyExactOrderInStrictMode() + { + $mock = $this->container->mock(new MockeryTestSubject); + $mock->shouldExpect(function ($subject) { + $subject->shouldBeStrict(); + $user = new MockeryTestSubjectUser($subject); + $user->doFoo(); + $user->doBar(); + }); + + $mock->bar(2); + $mock->foo(); + $mock->mockery_verify(); + } + + /** + * @expectedException \Mockery\Exception + */ + public function testArgumentsAreMatchedExactlyUnderStrictMode() + { + $mock = $this->container->mock(new MockeryTestSubject); + $mock->shouldExpect(function ($subject) { + $subject->shouldBeStrict(); + $user = new MockeryTestSubjectUser($subject); + $user->doBar(); + }); + + $mock->bar('2'); + } + + /** + * @expectedException \Mockery\Exception + */ + public function testThrowsExceptionWhenArgumentsNotExpected() + { + $mock = $this->container->mock(new MockeryTestSubject); + $mock->shouldExpect(function ($subject) { + $user = new MockeryTestSubjectUser($subject); + $user->doBar(); + }); + + $mock->bar(4); + } + + public function testCallCountUnconstrainedByDefault() + { + $mock = $this->container->mock(new MockeryTestSubject); + $mock->shouldExpect(function ($subject) { + $user = new MockeryTestSubjectUser($subject); + $user->doBar(); + }); + + $mock->bar(2); + $this->assertEquals(4, $mock->bar(2)); + $mock->mockery_verify(); + } + + /** + * @expectedException \Mockery\CountValidator\Exception + */ + public function testCallCountConstrainedInStrictMode() + { + $mock = $this->container->mock(new MockeryTestSubject); + $mock->shouldExpect(function ($subject) { + $subject->shouldBeStrict(); + $user = new MockeryTestSubjectUser($subject); + $user->doBar(); + }); + + $mock->bar(2); + $mock->bar(2); + $mock->mockery_verify(); + } +} + +class MockeryTestSubject +{ + public function foo() + { + return 1; + } + public function bar($i) + { + return $i * 2; + } +} + +class MockeryTestSubjectUser +{ + public $subject = null; + public function __construct($subject) + { + $this->subject = $subject; + } + public function doFoo() + { + return $this->subject->foo(); + } + public function doBar() + { + return $this->subject->bar(2); + } +} diff --git a/vendor/mockery/mockery/tests/Mockery/SpyTest.php b/vendor/mockery/mockery/tests/Mockery/SpyTest.php new file mode 100644 index 0000000..dc8192c --- /dev/null +++ b/vendor/mockery/mockery/tests/Mockery/SpyTest.php @@ -0,0 +1,78 @@ +container = new \Mockery\Container; + } + + public function teardown() + { + $this->container->mockery_close(); + } + + /** @test */ + public function itVerifiesAMethodWasCalled() + { + $spy = m::spy(); + $spy->myMethod(); + $spy->shouldHaveReceived("myMethod"); + + $this->setExpectedException("Mockery\Exception\InvalidCountException"); + $spy->shouldHaveReceived("someMethodThatWasNotCalled"); + } + + /** @test */ + public function itVerifiesAMethodWasNotCalled() + { + $spy = m::spy(); + $spy->shouldNotHaveReceived("myMethod"); + + $this->setExpectedException("Mockery\Exception\InvalidCountException"); + $spy->myMethod(); + $spy->shouldNotHaveReceived("myMethod"); + } + + /** @test */ + public function itVerifiesAMethodWasNotCalledWithParticularArguments() + { + $spy = m::spy(); + $spy->myMethod(123, 456); + + $spy->shouldNotHaveReceived("myMethod", array(789, 10)); + + $this->setExpectedException("Mockery\Exception\InvalidCountException"); + $spy->shouldNotHaveReceived("myMethod", array(123, 456)); + } + + /** @test */ + public function itVerifiesAMethodWasCalledASpecificNumberOfTimes() + { + $spy = m::spy(); + $spy->myMethod(); + $spy->myMethod(); + $spy->shouldHaveReceived("myMethod")->twice(); + + $this->setExpectedException("Mockery\Exception\InvalidCountException"); + $spy->myMethod(); + $spy->shouldHaveReceived("myMethod")->twice(); + } + + /** @test */ + public function itVerifiesAMethodWasCalledWithSpecificArguments() + { + $spy = m::spy(); + $spy->myMethod(123, "a string"); + $spy->shouldHaveReceived("myMethod")->with(123, "a string"); + $spy->shouldHaveReceived("myMethod", array(123, "a string")); + + $this->setExpectedException("Mockery\Exception\InvalidCountException"); + $spy->shouldHaveReceived("myMethod")->with(123); + } +} diff --git a/vendor/mockery/mockery/tests/Mockery/Test/Generator/MockConfigurationBuilderTest.php b/vendor/mockery/mockery/tests/Mockery/Test/Generator/MockConfigurationBuilderTest.php new file mode 100644 index 0000000..e077ba3 --- /dev/null +++ b/vendor/mockery/mockery/tests/Mockery/Test/Generator/MockConfigurationBuilderTest.php @@ -0,0 +1,43 @@ +assertContains('abstract', $builder->getMockConfiguration()->getBlackListedMethods()); + + // need a builtin for this + $this->markTestSkipped("Need a builtin class with a method that is a reserved word"); + } + + /** + * @test + */ + public function magicMethodsAreBlackListedByDefault() + { + $builder = new MockConfigurationBuilder; + $builder->addTarget("Mockery\Generator\ClassWithMagicCall"); + $methods = $builder->getMockConfiguration()->getMethodsToMock(); + $this->assertEquals(1, count($methods)); + $this->assertEquals("foo", $methods[0]->getName()); + } +} + +class ClassWithMagicCall +{ + public function foo() + { + } + public function __call($method, $args) + { + } +} diff --git a/vendor/mockery/mockery/tests/Mockery/WithFormatterExpectationTest.php b/vendor/mockery/mockery/tests/Mockery/WithFormatterExpectationTest.php new file mode 100644 index 0000000..536405f --- /dev/null +++ b/vendor/mockery/mockery/tests/Mockery/WithFormatterExpectationTest.php @@ -0,0 +1,121 @@ +assertEquals( + $expected, + Mockery::formatObjects($args) + ); + } + + /** + * @expectedException Mockery\Exception\NoMatchingExpectationException + * + * Note that without the patch checked in with this test, rather than throwing + * an exception, the program will go into an infinite recursive loop + */ + public function testFormatObjectsWithMockCalledInGetterDoesNotLeadToRecursion() + { + $mock = Mockery::mock('stdClass'); + $mock->shouldReceive('doBar')->with('foo'); + $obj = new ClassWithGetter($mock); + $obj->getFoo(); + } + + public function formatObjectsDataProvider() + { + return array( + array( + array(null), + '' + ), + array( + array('a string', 98768, array('a', 'nother', 'array')), + '' + ), + ); + } + + /** @test */ + public function format_objects_should_not_call_getters_with_params() + { + $obj = new ClassWithGetterWithParam(); + $string = Mockery::formatObjects(array($obj)); + + $this->assertNotContains('Missing argument 1 for', $string); + } + + public function testFormatObjectsExcludesStaticProperties() + { + $obj = new ClassWithPublicStaticProperty(); + $string = Mockery::formatObjects(array($obj)); + + $this->assertNotContains('excludedProperty', $string); + } + + public function testFormatObjectsExcludesStaticGetters() + { + $obj = new ClassWithPublicStaticGetter(); + $string = Mockery::formatObjects(array($obj)); + + $this->assertNotContains('getExcluded', $string); + } +} + +class ClassWithGetter +{ + private $dep; + + public function __construct($dep) + { + $this->dep = $dep; + } + + public function getFoo() + { + return $this->dep->doBar('bar', $this); + } +} + +class ClassWithGetterWithParam +{ + public function getBar($bar) + { + } +} + +class ClassWithPublicStaticProperty +{ + public static $excludedProperty; +} + +class ClassWithPublicStaticGetter +{ + public static function getExcluded() + { + } +} diff --git a/vendor/mockery/mockery/tests/Mockery/_files/file.txt b/vendor/mockery/mockery/tests/Mockery/_files/file.txt new file mode 100644 index 0000000..e69de29 diff --git a/vendor/mockery/mockery/travis/after_success.sh b/vendor/mockery/mockery/travis/after_success.sh new file mode 100755 index 0000000..f1553ec --- /dev/null +++ b/vendor/mockery/mockery/travis/after_success.sh @@ -0,0 +1,6 @@ +#!/bin/bash +if [[ $TRAVIS_PHP_VERSION == "5.6" ]]; then + vendor/bin/coveralls -v + wget https://scrutinizer-ci.com/ocular.phar + php ocular.phar code-coverage:upload --format=php-clover ./build/logs/clover.xml +fi diff --git a/vendor/mockery/mockery/travis/before_script.sh b/vendor/mockery/mockery/travis/before_script.sh new file mode 100755 index 0000000..102c39a --- /dev/null +++ b/vendor/mockery/mockery/travis/before_script.sh @@ -0,0 +1,11 @@ +#!/bin/bash +if [[ $TRAVIS_PHP_VERSION != "hhvm" \ + && $TRAVIS_PHP_VERSION != "hhvm-nightly" \ + && $TRAVIS_PHP_VERSION != "7.0" ]]; then + phpenv config-add ./travis/extra.ini + phpenv rehash +fi + +if [[ $TRAVIS_PHP_VERSION == "5.6" ]]; then + sed '/MockeryPHPUnitIntegration/d' -i ./phpunit.xml.dist +fi diff --git a/vendor/mockery/mockery/travis/extra.ini b/vendor/mockery/mockery/travis/extra.ini new file mode 100644 index 0000000..897166d --- /dev/null +++ b/vendor/mockery/mockery/travis/extra.ini @@ -0,0 +1,2 @@ +extension = "mongo.so" +extension = "redis.so" \ No newline at end of file diff --git a/vendor/mockery/mockery/travis/install.sh b/vendor/mockery/mockery/travis/install.sh new file mode 100755 index 0000000..6ccf4cf --- /dev/null +++ b/vendor/mockery/mockery/travis/install.sh @@ -0,0 +1,6 @@ +#!/bin/bash +composer install -n + +if [[ $TRAVIS_PHP_VERSION == "5.6" ]]; then + composer require --dev satooshi/php-coveralls:~0.7@dev +fi diff --git a/vendor/mockery/mockery/travis/script.sh b/vendor/mockery/mockery/travis/script.sh new file mode 100755 index 0000000..7ef810a --- /dev/null +++ b/vendor/mockery/mockery/travis/script.sh @@ -0,0 +1,8 @@ +#!/bin/bash +if [[ $TRAVIS_PHP_VERSION != "hhvm" \ + && $TRAVIS_PHP_VERSION != "hhvm-nightly" \ + && $TRAVIS_PHP_VERSION != "7.0" ]]; then + vendor/bin/phpunit --coverage-text --coverage-clover ./build/logs/clover.xml +else + vendor/bin/phpunit +fi diff --git a/vendor/monolog/monolog/.php_cs b/vendor/monolog/monolog/.php_cs new file mode 100644 index 0000000..366ccd0 --- /dev/null +++ b/vendor/monolog/monolog/.php_cs @@ -0,0 +1,59 @@ + + +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/vendor/monolog/monolog/CHANGELOG.md b/vendor/monolog/monolog/CHANGELOG.md new file mode 100644 index 0000000..1153c62 --- /dev/null +++ b/vendor/monolog/monolog/CHANGELOG.md @@ -0,0 +1,333 @@ +### 1.22.1 (2017-03-13) + + * Fixed lots of minor issues in the new Slack integrations + * Fixed support for allowInlineLineBreaks in LineFormatter when formatting exception backtraces + +### 1.22.0 (2016-11-26) + + * Added SlackbotHandler and SlackWebhookHandler to set up Slack integration more easily + * Added MercurialProcessor to add mercurial revision and branch names to log records + * Added support for AWS SDK v3 in DynamoDbHandler + * Fixed fatal errors occuring when normalizing generators that have been fully consumed + * Fixed RollbarHandler to include a level (rollbar level), monolog_level (original name), channel and datetime (unix) + * Fixed RollbarHandler not flushing records automatically, calling close() explicitly is not necessary anymore + * Fixed SyslogUdpHandler to avoid sending empty frames + * Fixed a few PHP 7.0 and 7.1 compatibility issues + +### 1.21.0 (2016-07-29) + + * Break: Reverted the addition of $context when the ErrorHandler handles regular php errors from 1.20.0 as it was causing issues + * Added support for more formats in RotatingFileHandler::setFilenameFormat as long as they have Y, m and d in order + * Added ability to format the main line of text the SlackHandler sends by explictly setting a formatter on the handler + * Added information about SoapFault instances in NormalizerFormatter + * Added $handleOnlyReportedErrors option on ErrorHandler::registerErrorHandler (default true) to allow logging of all errors no matter the error_reporting level + +### 1.20.0 (2016-07-02) + + * Added FingersCrossedHandler::activate() to manually trigger the handler regardless of the activation policy + * Added StreamHandler::getUrl to retrieve the stream's URL + * Added ability to override addRow/addTitle in HtmlFormatter + * Added the $context to context information when the ErrorHandler handles a regular php error + * Deprecated RotatingFileHandler::setFilenameFormat to only support 3 formats: Y, Y-m and Y-m-d + * Fixed WhatFailureGroupHandler to work with PHP7 throwables + * Fixed a few minor bugs + +### 1.19.0 (2016-04-12) + + * Break: StreamHandler will not close streams automatically that it does not own. If you pass in a stream (not a path/url), then it will not close it for you. You can retrieve those using getStream() if needed + * Added DeduplicationHandler to remove duplicate records from notifications across multiple requests, useful for email or other notifications on errors + * Added ability to use `%message%` and other LineFormatter replacements in the subject line of emails sent with NativeMailHandler and SwiftMailerHandler + * Fixed HipChatHandler handling of long messages + +### 1.18.2 (2016-04-02) + + * Fixed ElasticaFormatter to use more precise dates + * Fixed GelfMessageFormatter sending too long messages + +### 1.18.1 (2016-03-13) + + * Fixed SlackHandler bug where slack dropped messages randomly + * Fixed RedisHandler issue when using with the PHPRedis extension + * Fixed AmqpHandler content-type being incorrectly set when using with the AMQP extension + * Fixed BrowserConsoleHandler regression + +### 1.18.0 (2016-03-01) + + * Added optional reduction of timestamp precision via `Logger->useMicrosecondTimestamps(false)`, disabling it gets you a bit of performance boost but reduces the precision to the second instead of microsecond + * Added possibility to skip some extra stack frames in IntrospectionProcessor if you have some library wrapping Monolog that is always adding frames + * Added `Logger->withName` to clone a logger (keeping all handlers) with a new name + * Added FluentdFormatter for the Fluentd unix socket protocol + * Added HandlerWrapper base class to ease the creation of handler wrappers, just extend it and override as needed + * Added support for replacing context sub-keys using `%context.*%` in LineFormatter + * Added support for `payload` context value in RollbarHandler + * Added setRelease to RavenHandler to describe the application version, sent with every log + * Added support for `fingerprint` context value in RavenHandler + * Fixed JSON encoding errors that would gobble up the whole log record, we now handle those more gracefully by dropping chars as needed + * Fixed write timeouts in SocketHandler and derivatives, set to 10sec by default, lower it with `setWritingTimeout()` + * Fixed PHP7 compatibility with regard to Exception/Throwable handling in a few places + +### 1.17.2 (2015-10-14) + + * Fixed ErrorHandler compatibility with non-Monolog PSR-3 loggers + * Fixed SlackHandler handling to use slack functionalities better + * Fixed SwiftMailerHandler bug when sending multiple emails they all had the same id + * Fixed 5.3 compatibility regression + +### 1.17.1 (2015-08-31) + + * Fixed RollbarHandler triggering PHP notices + +### 1.17.0 (2015-08-30) + + * Added support for `checksum` and `release` context/extra values in RavenHandler + * Added better support for exceptions in RollbarHandler + * Added UidProcessor::getUid + * Added support for showing the resource type in NormalizedFormatter + * Fixed IntrospectionProcessor triggering PHP notices + +### 1.16.0 (2015-08-09) + + * Added IFTTTHandler to notify ifttt.com triggers + * Added Logger::setHandlers() to allow setting/replacing all handlers + * Added $capSize in RedisHandler to cap the log size + * Fixed StreamHandler creation of directory to only trigger when the first log write happens + * Fixed bug in the handling of curl failures + * Fixed duplicate logging of fatal errors when both error and fatal error handlers are registered in monolog's ErrorHandler + * Fixed missing fatal errors records with handlers that need to be closed to flush log records + * Fixed TagProcessor::addTags support for associative arrays + +### 1.15.0 (2015-07-12) + + * Added addTags and setTags methods to change a TagProcessor + * Added automatic creation of directories if they are missing for a StreamHandler to open a log file + * Added retry functionality to Loggly, Cube and Mandrill handlers so they retry up to 5 times in case of network failure + * Fixed process exit code being incorrectly reset to 0 if ErrorHandler::registerExceptionHandler was used + * Fixed HTML/JS escaping in BrowserConsoleHandler + * Fixed JSON encoding errors being silently suppressed (PHP 5.5+ only) + +### 1.14.0 (2015-06-19) + + * Added PHPConsoleHandler to send record to Chrome's PHP Console extension and library + * Added support for objects implementing __toString in the NormalizerFormatter + * Added support for HipChat's v2 API in HipChatHandler + * Added Logger::setTimezone() to initialize the timezone monolog should use in case date.timezone isn't correct for your app + * Added an option to send formatted message instead of the raw record on PushoverHandler via ->useFormattedMessage(true) + * Fixed curl errors being silently suppressed + +### 1.13.1 (2015-03-09) + + * Fixed regression in HipChat requiring a new token to be created + +### 1.13.0 (2015-03-05) + + * Added Registry::hasLogger to check for the presence of a logger instance + * Added context.user support to RavenHandler + * Added HipChat API v2 support in the HipChatHandler + * Added NativeMailerHandler::addParameter to pass params to the mail() process + * Added context data to SlackHandler when $includeContextAndExtra is true + * Added ability to customize the Swift_Message per-email in SwiftMailerHandler + * Fixed SwiftMailerHandler to lazily create message instances if a callback is provided + * Fixed serialization of INF and NaN values in Normalizer and LineFormatter + +### 1.12.0 (2014-12-29) + + * Break: HandlerInterface::isHandling now receives a partial record containing only a level key. This was always the intent and does not break any Monolog handler but is strictly speaking a BC break and you should check if you relied on any other field in your own handlers. + * Added PsrHandler to forward records to another PSR-3 logger + * Added SamplingHandler to wrap around a handler and include only every Nth record + * Added MongoDBFormatter to support better storage with MongoDBHandler (it must be enabled manually for now) + * Added exception codes in the output of most formatters + * Added LineFormatter::includeStacktraces to enable exception stack traces in logs (uses more than one line) + * Added $useShortAttachment to SlackHandler to minify attachment size and $includeExtra to append extra data + * Added $host to HipChatHandler for users of private instances + * Added $transactionName to NewRelicHandler and support for a transaction_name context value + * Fixed MandrillHandler to avoid outputing API call responses + * Fixed some non-standard behaviors in SyslogUdpHandler + +### 1.11.0 (2014-09-30) + + * Break: The NewRelicHandler extra and context data are now prefixed with extra_ and context_ to avoid clashes. Watch out if you have scripts reading those from the API and rely on names + * Added WhatFailureGroupHandler to suppress any exception coming from the wrapped handlers and avoid chain failures if a logging service fails + * Added MandrillHandler to send emails via the Mandrillapp.com API + * Added SlackHandler to log records to a Slack.com account + * Added FleepHookHandler to log records to a Fleep.io account + * Added LogglyHandler::addTag to allow adding tags to an existing handler + * Added $ignoreEmptyContextAndExtra to LineFormatter to avoid empty [] at the end + * Added $useLocking to StreamHandler and RotatingFileHandler to enable flock() while writing + * Added support for PhpAmqpLib in the AmqpHandler + * Added FingersCrossedHandler::clear and BufferHandler::clear to reset them between batches in long running jobs + * Added support for adding extra fields from $_SERVER in the WebProcessor + * Fixed support for non-string values in PrsLogMessageProcessor + * Fixed SwiftMailer messages being sent with the wrong date in long running scripts + * Fixed minor PHP 5.6 compatibility issues + * Fixed BufferHandler::close being called twice + +### 1.10.0 (2014-06-04) + + * Added Logger::getHandlers() and Logger::getProcessors() methods + * Added $passthruLevel argument to FingersCrossedHandler to let it always pass some records through even if the trigger level is not reached + * Added support for extra data in NewRelicHandler + * Added $expandNewlines flag to the ErrorLogHandler to create multiple log entries when a message has multiple lines + +### 1.9.1 (2014-04-24) + + * Fixed regression in RotatingFileHandler file permissions + * Fixed initialization of the BufferHandler to make sure it gets flushed after receiving records + * Fixed ChromePHPHandler and FirePHPHandler's activation strategies to be more conservative + +### 1.9.0 (2014-04-20) + + * Added LogEntriesHandler to send logs to a LogEntries account + * Added $filePermissions to tweak file mode on StreamHandler and RotatingFileHandler + * Added $useFormatting flag to MemoryProcessor to make it send raw data in bytes + * Added support for table formatting in FirePHPHandler via the table context key + * Added a TagProcessor to add tags to records, and support for tags in RavenHandler + * Added $appendNewline flag to the JsonFormatter to enable using it when logging to files + * Added sound support to the PushoverHandler + * Fixed multi-threading support in StreamHandler + * Fixed empty headers issue when ChromePHPHandler received no records + * Fixed default format of the ErrorLogHandler + +### 1.8.0 (2014-03-23) + + * Break: the LineFormatter now strips newlines by default because this was a bug, set $allowInlineLineBreaks to true if you need them + * Added BrowserConsoleHandler to send logs to any browser's console via console.log() injection in the output + * Added FilterHandler to filter records and only allow those of a given list of levels through to the wrapped handler + * Added FlowdockHandler to send logs to a Flowdock account + * Added RollbarHandler to send logs to a Rollbar account + * Added HtmlFormatter to send prettier log emails with colors for each log level + * Added GitProcessor to add the current branch/commit to extra record data + * Added a Monolog\Registry class to allow easier global access to pre-configured loggers + * Added support for the new official graylog2/gelf-php lib for GelfHandler, upgrade if you can by replacing the mlehner/gelf-php requirement + * Added support for HHVM + * Added support for Loggly batch uploads + * Added support for tweaking the content type and encoding in NativeMailerHandler + * Added $skipClassesPartials to tweak the ignored classes in the IntrospectionProcessor + * Fixed batch request support in GelfHandler + +### 1.7.0 (2013-11-14) + + * Added ElasticSearchHandler to send logs to an Elastic Search server + * Added DynamoDbHandler and ScalarFormatter to send logs to Amazon's Dynamo DB + * Added SyslogUdpHandler to send logs to a remote syslogd server + * Added LogglyHandler to send logs to a Loggly account + * Added $level to IntrospectionProcessor so it only adds backtraces when needed + * Added $version to LogstashFormatter to allow using the new v1 Logstash format + * Added $appName to NewRelicHandler + * Added configuration of Pushover notification retries/expiry + * Added $maxColumnWidth to NativeMailerHandler to change the 70 chars default + * Added chainability to most setters for all handlers + * Fixed RavenHandler batch processing so it takes the message from the record with highest priority + * Fixed HipChatHandler batch processing so it sends all messages at once + * Fixed issues with eAccelerator + * Fixed and improved many small things + +### 1.6.0 (2013-07-29) + + * Added HipChatHandler to send logs to a HipChat chat room + * Added ErrorLogHandler to send logs to PHP's error_log function + * Added NewRelicHandler to send logs to NewRelic's service + * Added Monolog\ErrorHandler helper class to register a Logger as exception/error/fatal handler + * Added ChannelLevelActivationStrategy for the FingersCrossedHandler to customize levels by channel + * Added stack traces output when normalizing exceptions (json output & co) + * Added Monolog\Logger::API constant (currently 1) + * Added support for ChromePHP's v4.0 extension + * Added support for message priorities in PushoverHandler, see $highPriorityLevel and $emergencyLevel + * Added support for sending messages to multiple users at once with the PushoverHandler + * Fixed RavenHandler's support for batch sending of messages (when behind a Buffer or FingersCrossedHandler) + * Fixed normalization of Traversables with very large data sets, only the first 1000 items are shown now + * Fixed issue in RotatingFileHandler when an open_basedir restriction is active + * Fixed minor issues in RavenHandler and bumped the API to Raven 0.5.0 + * Fixed SyslogHandler issue when many were used concurrently with different facilities + +### 1.5.0 (2013-04-23) + + * Added ProcessIdProcessor to inject the PID in log records + * Added UidProcessor to inject a unique identifier to all log records of one request/run + * Added support for previous exceptions in the LineFormatter exception serialization + * Added Monolog\Logger::getLevels() to get all available levels + * Fixed ChromePHPHandler so it avoids sending headers larger than Chrome can handle + +### 1.4.1 (2013-04-01) + + * Fixed exception formatting in the LineFormatter to be more minimalistic + * Fixed RavenHandler's handling of context/extra data, requires Raven client >0.1.0 + * Fixed log rotation in RotatingFileHandler to work with long running scripts spanning multiple days + * Fixed WebProcessor array access so it checks for data presence + * Fixed Buffer, Group and FingersCrossed handlers to make use of their processors + +### 1.4.0 (2013-02-13) + + * Added RedisHandler to log to Redis via the Predis library or the phpredis extension + * Added ZendMonitorHandler to log to the Zend Server monitor + * Added the possibility to pass arrays of handlers and processors directly in the Logger constructor + * Added `$useSSL` option to the PushoverHandler which is enabled by default + * Fixed ChromePHPHandler and FirePHPHandler issue when multiple instances are used simultaneously + * Fixed header injection capability in the NativeMailHandler + +### 1.3.1 (2013-01-11) + + * Fixed LogstashFormatter to be usable with stream handlers + * Fixed GelfMessageFormatter levels on Windows + +### 1.3.0 (2013-01-08) + + * Added PSR-3 compliance, the `Monolog\Logger` class is now an instance of `Psr\Log\LoggerInterface` + * Added PsrLogMessageProcessor that you can selectively enable for full PSR-3 compliance + * Added LogstashFormatter (combine with SocketHandler or StreamHandler to send logs to Logstash) + * Added PushoverHandler to send mobile notifications + * Added CouchDBHandler and DoctrineCouchDBHandler + * Added RavenHandler to send data to Sentry servers + * Added support for the new MongoClient class in MongoDBHandler + * Added microsecond precision to log records' timestamps + * Added `$flushOnOverflow` param to BufferHandler to flush by batches instead of losing + the oldest entries + * Fixed normalization of objects with cyclic references + +### 1.2.1 (2012-08-29) + + * Added new $logopts arg to SyslogHandler to provide custom openlog options + * Fixed fatal error in SyslogHandler + +### 1.2.0 (2012-08-18) + + * Added AmqpHandler (for use with AMQP servers) + * Added CubeHandler + * Added NativeMailerHandler::addHeader() to send custom headers in mails + * Added the possibility to specify more than one recipient in NativeMailerHandler + * Added the possibility to specify float timeouts in SocketHandler + * Added NOTICE and EMERGENCY levels to conform with RFC 5424 + * Fixed the log records to use the php default timezone instead of UTC + * Fixed BufferHandler not being flushed properly on PHP fatal errors + * Fixed normalization of exotic resource types + * Fixed the default format of the SyslogHandler to avoid duplicating datetimes in syslog + +### 1.1.0 (2012-04-23) + + * Added Monolog\Logger::isHandling() to check if a handler will + handle the given log level + * Added ChromePHPHandler + * Added MongoDBHandler + * Added GelfHandler (for use with Graylog2 servers) + * Added SocketHandler (for use with syslog-ng for example) + * Added NormalizerFormatter + * Added the possibility to change the activation strategy of the FingersCrossedHandler + * Added possibility to show microseconds in logs + * Added `server` and `referer` to WebProcessor output + +### 1.0.2 (2011-10-24) + + * Fixed bug in IE with large response headers and FirePHPHandler + +### 1.0.1 (2011-08-25) + + * Added MemoryPeakUsageProcessor and MemoryUsageProcessor + * Added Monolog\Logger::getName() to get a logger's channel name + +### 1.0.0 (2011-07-06) + + * Added IntrospectionProcessor to get info from where the logger was called + * Fixed WebProcessor in CLI + +### 1.0.0-RC1 (2011-07-01) + + * Initial release diff --git a/vendor/monolog/monolog/LICENSE b/vendor/monolog/monolog/LICENSE new file mode 100644 index 0000000..1647321 --- /dev/null +++ b/vendor/monolog/monolog/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2011-2016 Jordi Boggiano + +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/vendor/monolog/monolog/README.md b/vendor/monolog/monolog/README.md new file mode 100644 index 0000000..7d8ade5 --- /dev/null +++ b/vendor/monolog/monolog/README.md @@ -0,0 +1,95 @@ +# Monolog - Logging for PHP [![Build Status](https://img.shields.io/travis/Seldaek/monolog.svg)](https://travis-ci.org/Seldaek/monolog) + +[![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 +web services. See the complete list of handlers below. Special handlers +allow you to build advanced logging strategies. + +This library implements the [PSR-3](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md) +interface that you can type-hint against in your own libraries to keep +a maximum of interoperability. You can also use it in your applications to +make sure you can always use another compatible logger at a later time. +As of 1.11.0 Monolog public APIs will also accept PSR-3 log levels. +Internally Monolog still uses its own level scheme since it predates PSR-3. + +## Installation + +Install the latest version with + +```bash +$ composer require monolog/monolog +``` + +## Basic Usage + +```php +pushHandler(new StreamHandler('path/to/your.log', Logger::WARNING)); + +// add records to the log +$log->addWarning('Foo'); +$log->addError('Bar'); +``` + +## Documentation + +- [Usage Instructions](doc/01-usage.md) +- [Handlers, Formatters and Processors](doc/02-handlers-formatters-processors.md) +- [Utility classes](doc/03-utilities.md) +- [Extending Monolog](doc/04-extending.md) + +## 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. + +## About + +### Requirements + +- Monolog works with PHP 5.3 or above, and is also tested to work with HHVM. + +### Submitting bugs and feature requests + +Bugs and feature request are tracked on [GitHub](https://github.com/Seldaek/monolog/issues) + +### Framework Integrations + +- Frameworks and libraries using [PSR-3](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md) + can be used very easily with Monolog since it implements the interface. +- [Symfony2](http://symfony.com) comes out of the box with Monolog. +- [Silex](http://silex.sensiolabs.org/) comes out of the box with Monolog. +- [Laravel 4 & 5](http://laravel.com/) come out of the box with Monolog. +- [Lumen](http://lumen.laravel.com/) comes out of the box with Monolog. +- [PPI](http://www.ppi.io/) comes out of the box with Monolog. +- [CakePHP](http://cakephp.org/) is usable with Monolog via the [cakephp-monolog](https://github.com/jadb/cakephp-monolog) plugin. +- [Slim](http://www.slimframework.com/) is usable with Monolog via the [Slim-Monolog](https://github.com/Flynsarmy/Slim-Monolog) log writer. +- [XOOPS 2.6](http://xoops.org/) comes out of the box with Monolog. +- [Aura.Web_Project](https://github.com/auraphp/Aura.Web_Project) comes out of the box with Monolog. +- [Nette Framework](http://nette.org/en/) can be used with Monolog via [Kdyby/Monolog](https://github.com/Kdyby/Monolog) extension. +- [Proton Micro Framework](https://github.com/alexbilbie/Proton) comes out of the box with Monolog. + +### Author + +Jordi Boggiano - -
+See also the list of [contributors](https://github.com/Seldaek/monolog/contributors) which participated in this project. + +### License + +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/) +library, although most concepts have been adjusted to fit to the PHP world. diff --git a/vendor/monolog/monolog/composer.json b/vendor/monolog/monolog/composer.json new file mode 100644 index 0000000..f74b7b9 --- /dev/null +++ b/vendor/monolog/monolog/composer.json @@ -0,0 +1,66 @@ +{ + "name": "monolog/monolog", + "description": "Sends your logs to files, sockets, inboxes, databases and various web services", + "keywords": ["log", "logging", "psr-3"], + "homepage": "http://github.com/Seldaek/monolog", + "type": "library", + "license": "MIT", + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "require": { + "php": ">=5.3.0", + "psr/log": "~1.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.5", + "graylog2/gelf-php": "~1.0", + "sentry/sentry": "^0.13", + "ruflin/elastica": ">=0.90 <3.0", + "doctrine/couchdb": "~1.0@dev", + "aws/aws-sdk-php": "^2.4.9 || ^3.0", + "php-amqplib/php-amqplib": "~2.4", + "swiftmailer/swiftmailer": "~5.3", + "php-console/php-console": "^3.1.3", + "phpunit/phpunit-mock-objects": "2.3.0", + "jakub-onderka/php-parallel-lint": "0.9" + }, + "_": "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", + "doctrine/couchdb": "Allow sending log messages to a CouchDB server", + "ruflin/elastica": "Allow sending log messages to an Elastic Search server", + "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", + "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", + "ext-mongo": "Allow sending log messages to a MongoDB server", + "mongodb/mongodb": "Allow sending log messages to a MongoDB server via PHP Driver", + "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", + "rollbar/rollbar": "Allow sending log messages to Rollbar", + "php-console/php-console": "Allow sending log messages to Google Chrome" + }, + "autoload": { + "psr-4": {"Monolog\\": "src/Monolog"} + }, + "autoload-dev": { + "psr-4": {"Monolog\\": "tests/Monolog"} + }, + "provide": { + "psr/log-implementation": "1.0.0" + }, + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "scripts": { + "test": [ + "parallel-lint . --exclude vendor", + "phpunit" + ] + } +} diff --git a/vendor/monolog/monolog/doc/01-usage.md b/vendor/monolog/monolog/doc/01-usage.md new file mode 100644 index 0000000..8e2551f --- /dev/null +++ b/vendor/monolog/monolog/doc/01-usage.md @@ -0,0 +1,231 @@ +# 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/vendor/monolog/monolog/doc/02-handlers-formatters-processors.md b/vendor/monolog/monolog/doc/02-handlers-formatters-processors.md new file mode 100644 index 0000000..bea968a --- /dev/null +++ b/vendor/monolog/monolog/doc/02-handlers-formatters-processors.md @@ -0,0 +1,157 @@ +# 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/vendor/monolog/monolog/doc/03-utilities.md b/vendor/monolog/monolog/doc/03-utilities.md new file mode 100644 index 0000000..c62aa41 --- /dev/null +++ b/vendor/monolog/monolog/doc/03-utilities.md @@ -0,0 +1,13 @@ +# 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/vendor/monolog/monolog/doc/04-extending.md b/vendor/monolog/monolog/doc/04-extending.md new file mode 100644 index 0000000..ebd9104 --- /dev/null +++ b/vendor/monolog/monolog/doc/04-extending.md @@ -0,0 +1,76 @@ +# 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/vendor/monolog/monolog/doc/sockets.md b/vendor/monolog/monolog/doc/sockets.md new file mode 100644 index 0000000..ea9cf0e --- /dev/null +++ b/vendor/monolog/monolog/doc/sockets.md @@ -0,0 +1,39 @@ +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/vendor/monolog/monolog/phpunit.xml.dist b/vendor/monolog/monolog/phpunit.xml.dist new file mode 100644 index 0000000..20d82b6 --- /dev/null +++ b/vendor/monolog/monolog/phpunit.xml.dist @@ -0,0 +1,19 @@ + + + + + + tests/Monolog/ + + + + + + src/Monolog/ + + + + + + + diff --git a/vendor/monolog/monolog/src/Monolog/ErrorHandler.php b/vendor/monolog/monolog/src/Monolog/ErrorHandler.php new file mode 100644 index 0000000..7bfcd83 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/ErrorHandler.php @@ -0,0 +1,230 @@ + + * + * 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 Monolog\Handler\AbstractHandler; + +/** + * Monolog error handler + * + * A facility to enable logging of runtime errors, exceptions and fatal errors. + * + * Quick setup: ErrorHandler::register($logger); + * + * @author Jordi Boggiano + */ +class ErrorHandler +{ + private $logger; + + private $previousExceptionHandler; + private $uncaughtExceptionLevel; + + private $previousErrorHandler; + private $errorLevelMap; + private $handleOnlyReportedErrors; + + private $hasFatalErrorHandler; + private $fatalLevel; + private $reservedMemory; + private static $fatalErrors = array(E_ERROR, E_PARSE, E_CORE_ERROR, E_COMPILE_ERROR, E_USER_ERROR); + + public function __construct(LoggerInterface $logger) + { + $this->logger = $logger; + } + + /** + * Registers a new ErrorHandler for a given Logger + * + * By default it will handle errors, exceptions and fatal errors + * + * @param LoggerInterface $logger + * @param array|false $errorLevelMap an array of E_* constant to LogLevel::* constant mapping, or false to disable error handling + * @param int|false $exceptionLevel a LogLevel::* constant, or false to disable exception handling + * @param int|false $fatalLevel a LogLevel::* constant, or false to disable fatal error handling + * @return ErrorHandler + */ + public static function register(LoggerInterface $logger, $errorLevelMap = array(), $exceptionLevel = null, $fatalLevel = null) + { + //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); + + $handler = new static($logger); + if ($errorLevelMap !== false) { + $handler->registerErrorHandler($errorLevelMap); + } + if ($exceptionLevel !== false) { + $handler->registerExceptionHandler($exceptionLevel); + } + if ($fatalLevel !== false) { + $handler->registerFatalHandler($fatalLevel); + } + + return $handler; + } + + public function registerExceptionHandler($level = null, $callPrevious = true) + { + $prev = set_exception_handler(array($this, 'handleException')); + $this->uncaughtExceptionLevel = $level; + if ($callPrevious && $prev) { + $this->previousExceptionHandler = $prev; + } + } + + public function registerErrorHandler(array $levelMap = array(), $callPrevious = true, $errorTypes = -1, $handleOnlyReportedErrors = true) + { + $prev = set_error_handler(array($this, 'handleError'), $errorTypes); + $this->errorLevelMap = array_replace($this->defaultErrorLevelMap(), $levelMap); + if ($callPrevious) { + $this->previousErrorHandler = $prev ?: true; + } + + $this->handleOnlyReportedErrors = $handleOnlyReportedErrors; + } + + public function registerFatalHandler($level = null, $reservedMemorySize = 20) + { + register_shutdown_function(array($this, 'handleFatalError')); + + $this->reservedMemory = str_repeat(' ', 1024 * $reservedMemorySize); + $this->fatalLevel = $level; + $this->hasFatalErrorHandler = true; + } + + protected function defaultErrorLevelMap() + { + return array( + E_ERROR => LogLevel::CRITICAL, + E_WARNING => LogLevel::WARNING, + E_PARSE => LogLevel::ALERT, + E_NOTICE => LogLevel::NOTICE, + E_CORE_ERROR => LogLevel::CRITICAL, + E_CORE_WARNING => LogLevel::WARNING, + E_COMPILE_ERROR => LogLevel::ALERT, + E_COMPILE_WARNING => LogLevel::WARNING, + E_USER_ERROR => LogLevel::ERROR, + E_USER_WARNING => LogLevel::WARNING, + E_USER_NOTICE => LogLevel::NOTICE, + E_STRICT => LogLevel::NOTICE, + E_RECOVERABLE_ERROR => LogLevel::ERROR, + E_DEPRECATED => LogLevel::NOTICE, + E_USER_DEPRECATED => LogLevel::NOTICE, + ); + } + + /** + * @private + */ + public function handleException($e) + { + $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()), + array('exception' => $e) + ); + + if ($this->previousExceptionHandler) { + call_user_func($this->previousExceptionHandler, $e); + } + + exit(255); + } + + /** + * @private + */ + public function handleError($code, $message, $file = '', $line = 0, $context = array()) + { + if ($this->handleOnlyReportedErrors && !(error_reporting() & $code)) { + return; + } + + // fatal error codes are ignored if a fatal error handler is present as well to avoid duplicate log entries + 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)); + } + + if ($this->previousErrorHandler === true) { + return false; + } elseif ($this->previousErrorHandler) { + return call_user_func($this->previousErrorHandler, $code, $message, $file, $line, $context); + } + } + + /** + * @private + */ + public function handleFatalError() + { + $this->reservedMemory = null; + + $lastError = error_get_last(); + if ($lastError && in_array($lastError['type'], self::$fatalErrors, true)) { + $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']) + ); + + if ($this->logger instanceof Logger) { + foreach ($this->logger->getHandlers() as $handler) { + if ($handler instanceof AbstractHandler) { + $handler->close(); + } + } + } + } + } + + private static function codeToString($code) + { + switch ($code) { + case E_ERROR: + return 'E_ERROR'; + case E_WARNING: + return 'E_WARNING'; + case E_PARSE: + return 'E_PARSE'; + case E_NOTICE: + return 'E_NOTICE'; + case E_CORE_ERROR: + return 'E_CORE_ERROR'; + case E_CORE_WARNING: + return 'E_CORE_WARNING'; + case E_COMPILE_ERROR: + return 'E_COMPILE_ERROR'; + case E_COMPILE_WARNING: + return 'E_COMPILE_WARNING'; + case E_USER_ERROR: + return 'E_USER_ERROR'; + case E_USER_WARNING: + return 'E_USER_WARNING'; + case E_USER_NOTICE: + return 'E_USER_NOTICE'; + case E_STRICT: + return 'E_STRICT'; + case E_RECOVERABLE_ERROR: + return 'E_RECOVERABLE_ERROR'; + case E_DEPRECATED: + return 'E_DEPRECATED'; + case E_USER_DEPRECATED: + return 'E_USER_DEPRECATED'; + } + + return 'Unknown PHP error'; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/ChromePHPFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/ChromePHPFormatter.php new file mode 100644 index 0000000..9beda1e --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Formatter/ChromePHPFormatter.php @@ -0,0 +1,78 @@ + + * + * 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; + +/** + * Formats a log message according to the ChromePHP array format + * + * @author Christophe Coevoet + */ +class ChromePHPFormatter implements FormatterInterface +{ + /** + * Translates Monolog log levels to Wildfire levels. + */ + private $logLevels = array( + Logger::DEBUG => 'log', + Logger::INFO => 'info', + Logger::NOTICE => 'info', + Logger::WARNING => 'warn', + Logger::ERROR => 'error', + Logger::CRITICAL => 'error', + Logger::ALERT => 'error', + Logger::EMERGENCY => 'error', + ); + + /** + * {@inheritdoc} + */ + public function format(array $record) + { + // Retrieve the line and file if set and remove them from the formatted extra + $backtrace = 'unknown'; + if (isset($record['extra']['file'], $record['extra']['line'])) { + $backtrace = $record['extra']['file'].' : '.$record['extra']['line']; + unset($record['extra']['file'], $record['extra']['line']); + } + + $message = array('message' => $record['message']); + if ($record['context']) { + $message['context'] = $record['context']; + } + if ($record['extra']) { + $message['extra'] = $record['extra']; + } + if (count($message) === 1) { + $message = reset($message); + } + + return array( + $record['channel'], + $message, + $backtrace, + $this->logLevels[$record['level']], + ); + } + + public function formatBatch(array $records) + { + $formatted = array(); + + foreach ($records as $record) { + $formatted[] = $this->format($record); + } + + return $formatted; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/ElasticaFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/ElasticaFormatter.php new file mode 100644 index 0000000..4c556cf --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Formatter/ElasticaFormatter.php @@ -0,0 +1,89 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +use Elastica\Document; + +/** + * Format a log message into an Elastica Document + * + * @author Jelle Vink + */ +class ElasticaFormatter extends NormalizerFormatter +{ + /** + * @var string Elastic search index name + */ + protected $index; + + /** + * @var string Elastic search document type + */ + protected $type; + + /** + * @param string $index Elastic Search index name + * @param string $type Elastic Search document type + */ + public function __construct($index, $type) + { + // elasticsearch requires a ISO 8601 format date with optional millisecond precision. + parent::__construct('Y-m-d\TH:i:s.uP'); + + $this->index = $index; + $this->type = $type; + } + + /** + * {@inheritdoc} + */ + public function format(array $record) + { + $record = parent::format($record); + + return $this->getDocument($record); + } + + /** + * Getter index + * @return string + */ + public function getIndex() + { + return $this->index; + } + + /** + * Getter type + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * Convert a log message into an Elastica Document + * + * @param array $record Log message + * @return Document + */ + protected function getDocument($record) + { + $document = new Document(); + $document->setData($record); + $document->setType($this->type); + $document->setIndex($this->index); + + return $document; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/FlowdockFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/FlowdockFormatter.php new file mode 100644 index 0000000..5094af3 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Formatter/FlowdockFormatter.php @@ -0,0 +1,116 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +/** + * formats the record to be used in the FlowdockHandler + * + * @author Dominik Liebler + */ +class FlowdockFormatter implements FormatterInterface +{ + /** + * @var string + */ + private $source; + + /** + * @var string + */ + private $sourceEmail; + + /** + * @param string $source + * @param string $sourceEmail + */ + public function __construct($source, $sourceEmail) + { + $this->source = $source; + $this->sourceEmail = $sourceEmail; + } + + /** + * {@inheritdoc} + */ + public function format(array $record) + { + $tags = array( + '#logs', + '#' . strtolower($record['level_name']), + '#' . $record['channel'], + ); + + foreach ($record['extra'] as $value) { + $tags[] = '#' . $value; + } + + $subject = sprintf( + 'in %s: %s - %s', + $this->source, + $record['level_name'], + $this->getShortMessage($record['message']) + ); + + $record['flowdock'] = array( + 'source' => $this->source, + 'from_address' => $this->sourceEmail, + 'subject' => $subject, + 'content' => $record['message'], + 'tags' => $tags, + 'project' => $this->source, + ); + + return $record; + } + + /** + * {@inheritdoc} + */ + public function formatBatch(array $records) + { + $formatted = array(); + + foreach ($records as $record) { + $formatted[] = $this->format($record); + } + + return $formatted; + } + + /** + * @param string $message + * + * @return string + */ + public function getShortMessage($message) + { + static $hasMbString; + + if (null === $hasMbString) { + $hasMbString = function_exists('mb_strlen'); + } + + $maxLength = 45; + + if ($hasMbString) { + if (mb_strlen($message, 'UTF-8') > $maxLength) { + $message = mb_substr($message, 0, $maxLength - 4, 'UTF-8') . ' ...'; + } + } else { + if (strlen($message) > $maxLength) { + $message = substr($message, 0, $maxLength - 4) . ' ...'; + } + } + + return $message; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/FluentdFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/FluentdFormatter.php new file mode 100644 index 0000000..02632bb --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Formatter/FluentdFormatter.php @@ -0,0 +1,85 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +/** + * Class FluentdFormatter + * + * Serializes a log message to Fluentd unix socket protocol + * + * Fluentd config: + * + * + * type unix + * path /var/run/td-agent/td-agent.sock + * + * + * Monolog setup: + * + * $logger = new Monolog\Logger('fluent.tag'); + * $fluentHandler = new Monolog\Handler\SocketHandler('unix:///var/run/td-agent/td-agent.sock'); + * $fluentHandler->setFormatter(new Monolog\Formatter\FluentdFormatter()); + * $logger->pushHandler($fluentHandler); + * + * @author Andrius Putna + */ +class FluentdFormatter implements FormatterInterface +{ + /** + * @var bool $levelTag should message level be a part of the fluentd tag + */ + protected $levelTag = false; + + public function __construct($levelTag = false) + { + if (!function_exists('json_encode')) { + throw new \RuntimeException('PHP\'s json extension is required to use Monolog\'s FluentdUnixFormatter'); + } + + $this->levelTag = (bool) $levelTag; + } + + public function isUsingLevelsInTag() + { + return $this->levelTag; + } + + public function format(array $record) + { + $tag = $record['channel']; + if ($this->levelTag) { + $tag .= '.' . strtolower($record['level_name']); + } + + $message = array( + 'message' => $record['message'], + 'extra' => $record['extra'], + ); + + if (!$this->levelTag) { + $message['level'] = $record['level']; + $message['level_name'] = $record['level_name']; + } + + return json_encode(array($tag, $record['datetime']->getTimestamp(), $message)); + } + + public function formatBatch(array $records) + { + $message = ''; + foreach ($records as $record) { + $message .= $this->format($record); + } + + return $message; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/FormatterInterface.php b/vendor/monolog/monolog/src/Monolog/Formatter/FormatterInterface.php new file mode 100644 index 0000000..b5de751 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Formatter/FormatterInterface.php @@ -0,0 +1,36 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +/** + * Interface for formatters + * + * @author Jordi Boggiano + */ +interface FormatterInterface +{ + /** + * Formats a log record. + * + * @param array $record A record to format + * @return mixed The formatted record + */ + public function format(array $record); + + /** + * Formats a set of log records. + * + * @param array $records A set of records to format + * @return mixed The formatted set of records + */ + public function formatBatch(array $records); +} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/GelfMessageFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/GelfMessageFormatter.php new file mode 100644 index 0000000..64e7665 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Formatter/GelfMessageFormatter.php @@ -0,0 +1,137 @@ + + * + * 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 Gelf\Message; + +/** + * Serializes a log message to GELF + * @see http://www.graylog2.org/about/gelf + * + * @author Matt Lehner + */ +class GelfMessageFormatter extends NormalizerFormatter +{ + const MAX_LENGTH = 32766; + + /** + * @var string the name of the system for the Gelf log message + */ + protected $systemName; + + /** + * @var string a prefix for 'extra' fields from the Monolog record (optional) + */ + protected $extraPrefix; + + /** + * @var string a prefix for 'context' fields from the Monolog record (optional) + */ + protected $contextPrefix; + + /** + * Translates Monolog log levels to Graylog2 log priorities. + */ + private $logLevels = array( + Logger::DEBUG => 7, + Logger::INFO => 6, + Logger::NOTICE => 5, + Logger::WARNING => 4, + Logger::ERROR => 3, + Logger::CRITICAL => 2, + Logger::ALERT => 1, + Logger::EMERGENCY => 0, + ); + + public function __construct($systemName = null, $extraPrefix = null, $contextPrefix = 'ctxt_') + { + parent::__construct('U.u'); + + $this->systemName = $systemName ?: gethostname(); + + $this->extraPrefix = $extraPrefix; + $this->contextPrefix = $contextPrefix; + } + + /** + * {@inheritdoc} + */ + public function format(array $record) + { + $record = parent::format($record); + + if (!isset($record['datetime'], $record['message'], $record['level'])) { + throw new \InvalidArgumentException('The record should at least contain datetime, message and level keys, '.var_export($record, true).' given'); + } + + $message = new Message(); + $message + ->setTimestamp($record['datetime']) + ->setShortMessage((string) $record['message']) + ->setHost($this->systemName) + ->setLevel($this->logLevels[$record['level']]); + + // start count with 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 (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)); + break; + } + $message->setAdditional($this->extraPrefix . $key, $val); + } + + 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)); + break; + } + $message->setAdditional($this->contextPrefix . $key, $val); + } + + if (null === $message->getFile() && isset($record['context']['exception']['file'])) { + if (preg_match("/^(.+):([0-9]+)$/", $record['context']['exception']['file'], $matches)) { + $message->setFile($matches[1]); + $message->setLine($matches[2]); + } + } + + return $message; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/HtmlFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/HtmlFormatter.php new file mode 100644 index 0000000..3eec95f --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Formatter/HtmlFormatter.php @@ -0,0 +1,141 @@ + + * + * 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; + +/** + * Formats incoming records into an HTML table + * + * This is especially useful for html email logging + * + * @author Tiago Brito + */ +class HtmlFormatter extends NormalizerFormatter +{ + /** + * Translates Monolog log levels to html color priorities. + */ + protected $logLevels = array( + Logger::DEBUG => '#cccccc', + Logger::INFO => '#468847', + Logger::NOTICE => '#3a87ad', + Logger::WARNING => '#c09853', + Logger::ERROR => '#f0ad4e', + Logger::CRITICAL => '#FF7708', + Logger::ALERT => '#C12A19', + Logger::EMERGENCY => '#000000', + ); + + /** + * @param string $dateFormat The format of the timestamp: one supported by DateTime::format + */ + public function __construct($dateFormat = null) + { + parent::__construct($dateFormat); + } + + /** + * Creates an HTML table row + * + * @param string $th Row header content + * @param string $td Row standard cell content + * @param bool $escapeTd false if td content must not be html escaped + * @return string + */ + protected function addRow($th, $td = ' ', $escapeTd = true) + { + $th = htmlspecialchars($th, ENT_NOQUOTES, 'UTF-8'); + if ($escapeTd) { + $td = '
'.htmlspecialchars($td, ENT_NOQUOTES, 'UTF-8').'
'; + } + + return "\n$th:\n".$td."\n"; + } + + /** + * Create a HTML h1 tag + * + * @param string $title Text to be in the h1 + * @param int $level Error level + * @return string + */ + protected function addTitle($title, $level) + { + $title = htmlspecialchars($title, ENT_NOQUOTES, 'UTF-8'); + + return '

'.$title.'

'; + } + + /** + * Formats a log record. + * + * @param array $record A record to format + * @return mixed The formatted record + */ + public function format(array $record) + { + $output = $this->addTitle($record['level_name'], $record['level']); + $output .= ''; + + $output .= $this->addRow('Message', (string) $record['message']); + $output .= $this->addRow('Time', $record['datetime']->format($this->dateFormat)); + $output .= $this->addRow('Channel', $record['channel']); + if ($record['context']) { + $embeddedTable = '
'; + foreach ($record['context'] as $key => $value) { + $embeddedTable .= $this->addRow($key, $this->convertToString($value)); + } + $embeddedTable .= '
'; + $output .= $this->addRow('Context', $embeddedTable, false); + } + if ($record['extra']) { + $embeddedTable = ''; + foreach ($record['extra'] as $key => $value) { + $embeddedTable .= $this->addRow($key, $this->convertToString($value)); + } + $embeddedTable .= '
'; + $output .= $this->addRow('Extra', $embeddedTable, false); + } + + return $output.''; + } + + /** + * Formats a set of log records. + * + * @param array $records A set of records to format + * @return mixed The formatted set of records + */ + public function formatBatch(array $records) + { + $message = ''; + foreach ($records as $record) { + $message .= $this->format($record); + } + + return $message; + } + + protected function convertToString($data) + { + if (null === $data || is_scalar($data)) { + return (string) $data; + } + + $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 str_replace('\\/', '/', json_encode($data)); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/JsonFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/JsonFormatter.php new file mode 100644 index 0000000..4b2be77 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Formatter/JsonFormatter.php @@ -0,0 +1,206 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +use Exception; +use Throwable; + +/** + * Encodes whatever record data is passed to it as json + * + * This can be useful to log to databases or remote APIs + * + * @author Jordi Boggiano + */ +class JsonFormatter extends NormalizerFormatter +{ + const BATCH_MODE_JSON = 1; + const BATCH_MODE_NEWLINES = 2; + + protected $batchMode; + protected $appendNewline; + /** + * @var bool + */ + protected $includeStacktraces = false; + + /** + * @param int $batchMode + */ + public function __construct($batchMode = self::BATCH_MODE_JSON, $appendNewline = true) + { + $this->batchMode = $batchMode; + $this->appendNewline = $appendNewline; + } + + /** + * The batch mode option configures the formatting style for + * multiple records. By default, multiple records will be + * formatted as a JSON-encoded array. However, for + * compatibility with some API endpoints, alternative styles + * are available. + * + * @return int + */ + public function getBatchMode() + { + return $this->batchMode; + } + + /** + * True if newlines are appended to every formatted record + * + * @return bool + */ + public function isAppendingNewlines() + { + return $this->appendNewline; + } + + /** + * {@inheritdoc} + */ + public function format(array $record) + { + return $this->toJson($this->normalize($record), true) . ($this->appendNewline ? "\n" : ''); + } + + /** + * {@inheritdoc} + */ + public function formatBatch(array $records) + { + switch ($this->batchMode) { + case static::BATCH_MODE_NEWLINES: + return $this->formatBatchNewlines($records); + + case static::BATCH_MODE_JSON: + default: + return $this->formatBatchJson($records); + } + } + + /** + * @param bool $include + */ + public function includeStacktraces($include = true) + { + $this->includeStacktraces = $include; + } + + /** + * Return a JSON-encoded array of records. + * + * @param array $records + * @return string + */ + protected function formatBatchJson(array $records) + { + return $this->toJson($this->normalize($records), true); + } + + /** + * Use new lines to separate records instead of a + * JSON-encoded array. + * + * @param array $records + * @return string + */ + protected function formatBatchNewlines(array $records) + { + $instance = $this; + + $oldNewline = $this->appendNewline; + $this->appendNewline = false; + array_walk($records, function (&$value, $key) use ($instance) { + $value = $instance->format($value); + }); + $this->appendNewline = $oldNewline; + + return implode("\n", $records); + } + + /** + * Normalizes given $data. + * + * @param mixed $data + * + * @return mixed + */ + protected function normalize($data) + { + if (is_array($data) || $data instanceof \Traversable) { + $normalized = array(); + + $count = 1; + foreach ($data as $key => $value) { + if ($count++ >= 1000) { + $normalized['...'] = 'Over 1000 items, aborting normalization'; + break; + } + $normalized[$key] = $this->normalize($value); + } + + return $normalized; + } + + if ($data instanceof Exception || $data instanceof Throwable) { + return $this->normalizeException($data); + } + + return $data; + } + + /** + * Normalizes given exception with or without its own stack trace based on + * `includeStacktraces` property. + * + * @param Exception|Throwable $e + * + * @return array + */ + protected function normalizeException($e) + { + // 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)); + } + + $data = array( + 'class' => get_class($e), + 'message' => $e->getMessage(), + 'code' => $e->getCode(), + 'file' => $e->getFile().':'.$e->getLine(), + ); + + if ($this->includeStacktraces) { + $trace = $e->getTrace(); + 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); + } + } + } + + if ($previous = $e->getPrevious()) { + $data['previous'] = $this->normalizeException($previous); + } + + return $data; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/LineFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/LineFormatter.php new file mode 100644 index 0000000..d3e209e --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Formatter/LineFormatter.php @@ -0,0 +1,179 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +/** + * Formats incoming records into a one-line string + * + * This is especially useful for logging to files + * + * @author Jordi Boggiano + * @author Christophe Coevoet + */ +class LineFormatter extends NormalizerFormatter +{ + const SIMPLE_FORMAT = "[%datetime%] %channel%.%level_name%: %message% %context% %extra%\n"; + + protected $format; + protected $allowInlineLineBreaks; + protected $ignoreEmptyContextAndExtra; + protected $includeStacktraces; + + /** + * @param string $format The format of the message + * @param string $dateFormat The format of the timestamp: one supported by DateTime::format + * @param bool $allowInlineLineBreaks Whether to allow inline line breaks in log entries + * @param bool $ignoreEmptyContextAndExtra + */ + public function __construct($format = null, $dateFormat = null, $allowInlineLineBreaks = false, $ignoreEmptyContextAndExtra = false) + { + $this->format = $format ?: static::SIMPLE_FORMAT; + $this->allowInlineLineBreaks = $allowInlineLineBreaks; + $this->ignoreEmptyContextAndExtra = $ignoreEmptyContextAndExtra; + parent::__construct($dateFormat); + } + + public function includeStacktraces($include = true) + { + $this->includeStacktraces = $include; + if ($this->includeStacktraces) { + $this->allowInlineLineBreaks = true; + } + } + + public function allowInlineLineBreaks($allow = true) + { + $this->allowInlineLineBreaks = $allow; + } + + public function ignoreEmptyContextAndExtra($ignore = true) + { + $this->ignoreEmptyContextAndExtra = $ignore; + } + + /** + * {@inheritdoc} + */ + public function format(array $record) + { + $vars = parent::format($record); + + $output = $this->format; + + foreach ($vars['extra'] as $var => $val) { + if (false !== strpos($output, '%extra.'.$var.'%')) { + $output = str_replace('%extra.'.$var.'%', $this->stringify($val), $output); + unset($vars['extra'][$var]); + } + } + + + foreach ($vars['context'] as $var => $val) { + if (false !== strpos($output, '%context.'.$var.'%')) { + $output = str_replace('%context.'.$var.'%', $this->stringify($val), $output); + unset($vars['context'][$var]); + } + } + + if ($this->ignoreEmptyContextAndExtra) { + if (empty($vars['context'])) { + unset($vars['context']); + $output = str_replace('%context%', '', $output); + } + + if (empty($vars['extra'])) { + unset($vars['extra']); + $output = str_replace('%extra%', '', $output); + } + } + + foreach ($vars as $var => $val) { + if (false !== strpos($output, '%'.$var.'%')) { + $output = str_replace('%'.$var.'%', $this->stringify($val), $output); + } + } + + // remove leftover %extra.xxx% and %context.xxx% if any + if (false !== strpos($output, '%')) { + $output = preg_replace('/%(?:extra|context)\..+?%/', '', $output); + } + + return $output; + } + + public function formatBatch(array $records) + { + $message = ''; + foreach ($records as $record) { + $message .= $this->format($record); + } + + return $message; + } + + public function stringify($value) + { + return $this->replaceNewlines($this->convertToString($value)); + } + + protected function normalizeException($e) + { + // 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)); + } + + $previousText = ''; + if ($previous = $e->getPrevious()) { + do { + $previousText .= ', '.get_class($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.')'; + if ($this->includeStacktraces) { + $str .= "\n[stacktrace]\n".$e->getTraceAsString()."\n"; + } + + return $str; + } + + protected function convertToString($data) + { + if (null === $data || is_bool($data)) { + return var_export($data, true); + } + + if (is_scalar($data)) { + return (string) $data; + } + + if (version_compare(PHP_VERSION, '5.4.0', '>=')) { + return $this->toJson($data, true); + } + + return str_replace('\\/', '/', @json_encode($data)); + } + + protected function replaceNewlines($str) + { + if ($this->allowInlineLineBreaks) { + if (0 === strpos($str, '{')) { + return str_replace(array('\r', '\n'), array("\r", "\n"), $str); + } + + return $str; + } + + return str_replace(array("\r\n", "\r", "\n"), ' ', $str); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/LogglyFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/LogglyFormatter.php new file mode 100644 index 0000000..401859b --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Formatter/LogglyFormatter.php @@ -0,0 +1,47 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +/** + * Encodes message information into JSON in a format compatible with Loggly. + * + * @author Adam Pancutt + */ +class LogglyFormatter extends JsonFormatter +{ + /** + * Overrides the default batch mode to new lines for compatibility with the + * Loggly bulk API. + * + * @param int $batchMode + */ + public function __construct($batchMode = self::BATCH_MODE_NEWLINES, $appendNewline = false) + { + parent::__construct($batchMode, $appendNewline); + } + + /** + * Appends the 'timestamp' parameter for indexing by Loggly. + * + * @see https://www.loggly.com/docs/automated-parsing/#json + * @see \Monolog\Formatter\JsonFormatter::format() + */ + public function format(array $record) + { + if (isset($record["datetime"]) && ($record["datetime"] instanceof \DateTime)) { + $record["timestamp"] = $record["datetime"]->format("Y-m-d\TH:i:s.uO"); + // TODO 2.0 unset the 'datetime' parameter, retained for BC + } + + return parent::format($record); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/LogstashFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/LogstashFormatter.php new file mode 100644 index 0000000..8f83bec --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Formatter/LogstashFormatter.php @@ -0,0 +1,166 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +/** + * Serializes a log message to Logstash Event Format + * + * @see http://logstash.net/ + * @see https://github.com/logstash/logstash/blob/master/lib/logstash/event.rb + * + * @author Tim Mower + */ +class LogstashFormatter extends NormalizerFormatter +{ + const V0 = 0; + const V1 = 1; + + /** + * @var string the name of the system for the Logstash log message, used to fill the @source field + */ + protected $systemName; + + /** + * @var string an application name for the Logstash log message, used to fill the @type field + */ + protected $applicationName; + + /** + * @var string a prefix for 'extra' fields from the Monolog record (optional) + */ + protected $extraPrefix; + + /** + * @var string a prefix for 'context' fields from the Monolog record (optional) + */ + protected $contextPrefix; + + /** + * @var int logstash format version to use + */ + protected $version; + + /** + * @param string $applicationName the application that sends the data, used as the "type" field of logstash + * @param string $systemName the system/machine name, used as the "source" field of logstash, defaults to the hostname of the machine + * @param string $extraPrefix prefix for extra keys inside logstash "fields" + * @param string $contextPrefix prefix for context keys inside logstash "fields", defaults to ctxt_ + * @param int $version the logstash format version to use, defaults to 0 + */ + public function __construct($applicationName, $systemName = null, $extraPrefix = null, $contextPrefix = 'ctxt_', $version = self::V0) + { + // logstash requires a ISO 8601 format date with optional millisecond precision. + parent::__construct('Y-m-d\TH:i:s.uP'); + + $this->systemName = $systemName ?: gethostname(); + $this->applicationName = $applicationName; + $this->extraPrefix = $extraPrefix; + $this->contextPrefix = $contextPrefix; + $this->version = $version; + } + + /** + * {@inheritdoc} + */ + public function format(array $record) + { + $record = parent::format($record); + + if ($this->version === self::V1) { + $message = $this->formatV1($record); + } else { + $message = $this->formatV0($record); + } + + return $this->toJson($message) . "\n"; + } + + protected function formatV0(array $record) + { + if (empty($record['datetime'])) { + $record['datetime'] = gmdate('c'); + } + $message = array( + '@timestamp' => $record['datetime'], + '@source' => $this->systemName, + '@fields' => array(), + ); + if (isset($record['message'])) { + $message['@message'] = $record['message']; + } + if (isset($record['channel'])) { + $message['@tags'] = array($record['channel']); + $message['@fields']['channel'] = $record['channel']; + } + if (isset($record['level'])) { + $message['@fields']['level'] = $record['level']; + } + if ($this->applicationName) { + $message['@type'] = $this->applicationName; + } + if (isset($record['extra']['server'])) { + $message['@source_host'] = $record['extra']['server']; + } + if (isset($record['extra']['url'])) { + $message['@source_path'] = $record['extra']['url']; + } + if (!empty($record['extra'])) { + foreach ($record['extra'] as $key => $val) { + $message['@fields'][$this->extraPrefix . $key] = $val; + } + } + if (!empty($record['context'])) { + foreach ($record['context'] as $key => $val) { + $message['@fields'][$this->contextPrefix . $key] = $val; + } + } + + return $message; + } + + protected function formatV1(array $record) + { + if (empty($record['datetime'])) { + $record['datetime'] = gmdate('c'); + } + $message = array( + '@timestamp' => $record['datetime'], + '@version' => 1, + 'host' => $this->systemName, + ); + if (isset($record['message'])) { + $message['message'] = $record['message']; + } + if (isset($record['channel'])) { + $message['type'] = $record['channel']; + $message['channel'] = $record['channel']; + } + if (isset($record['level_name'])) { + $message['level'] = $record['level_name']; + } + if ($this->applicationName) { + $message['type'] = $this->applicationName; + } + if (!empty($record['extra'])) { + foreach ($record['extra'] as $key => $val) { + $message[$this->extraPrefix . $key] = $val; + } + } + if (!empty($record['context'])) { + foreach ($record['context'] as $key => $val) { + $message[$this->contextPrefix . $key] = $val; + } + } + + return $message; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/MongoDBFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/MongoDBFormatter.php new file mode 100644 index 0000000..eb067bb --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Formatter/MongoDBFormatter.php @@ -0,0 +1,105 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +/** + * Formats a record for use with the MongoDBHandler. + * + * @author Florian Plattner + */ +class MongoDBFormatter implements FormatterInterface +{ + private $exceptionTraceAsString; + private $maxNestingLevel; + + /** + * @param int $maxNestingLevel 0 means infinite nesting, the $record itself is level 1, $record['context'] is 2 + * @param bool $exceptionTraceAsString set to false to log exception traces as a sub documents instead of strings + */ + public function __construct($maxNestingLevel = 3, $exceptionTraceAsString = true) + { + $this->maxNestingLevel = max($maxNestingLevel, 0); + $this->exceptionTraceAsString = (bool) $exceptionTraceAsString; + } + + /** + * {@inheritDoc} + */ + public function format(array $record) + { + return $this->formatArray($record); + } + + /** + * {@inheritDoc} + */ + public function formatBatch(array $records) + { + foreach ($records as $key => $record) { + $records[$key] = $this->format($record); + } + + return $records; + } + + protected function formatArray(array $record, $nestingLevel = 0) + { + if ($this->maxNestingLevel == 0 || $nestingLevel <= $this->maxNestingLevel) { + foreach ($record as $name => $value) { + if ($value instanceof \DateTime) { + $record[$name] = $this->formatDate($value, $nestingLevel + 1); + } elseif ($value instanceof \Exception) { + $record[$name] = $this->formatException($value, $nestingLevel + 1); + } elseif (is_array($value)) { + $record[$name] = $this->formatArray($value, $nestingLevel + 1); + } elseif (is_object($value)) { + $record[$name] = $this->formatObject($value, $nestingLevel + 1); + } + } + } else { + $record = '[...]'; + } + + return $record; + } + + protected function formatObject($value, $nestingLevel) + { + $objectVars = get_object_vars($value); + $objectVars['class'] = get_class($value); + + return $this->formatArray($objectVars, $nestingLevel); + } + + protected function formatException(\Exception $exception, $nestingLevel) + { + $formattedException = array( + 'class' => get_class($exception), + 'message' => $exception->getMessage(), + 'code' => $exception->getCode(), + 'file' => $exception->getFile() . ':' . $exception->getLine(), + ); + + if ($this->exceptionTraceAsString === true) { + $formattedException['trace'] = $exception->getTraceAsString(); + } else { + $formattedException['trace'] = $exception->getTrace(); + } + + return $this->formatArray($formattedException, $nestingLevel); + } + + protected function formatDate(\DateTime $value, $nestingLevel) + { + return new \MongoDate($value->getTimestamp()); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php new file mode 100644 index 0000000..d441488 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php @@ -0,0 +1,297 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +use Exception; + +/** + * Normalizes incoming records to remove objects/resources so it's easier to dump to various targets + * + * @author Jordi Boggiano + */ +class NormalizerFormatter implements FormatterInterface +{ + const SIMPLE_DATE = "Y-m-d H:i:s"; + + protected $dateFormat; + + /** + * @param string $dateFormat The format of the timestamp: one supported by DateTime::format + */ + public function __construct($dateFormat = null) + { + $this->dateFormat = $dateFormat ?: static::SIMPLE_DATE; + if (!function_exists('json_encode')) { + throw new \RuntimeException('PHP\'s json extension is required to use Monolog\'s NormalizerFormatter'); + } + } + + /** + * {@inheritdoc} + */ + public function format(array $record) + { + return $this->normalize($record); + } + + /** + * {@inheritdoc} + */ + public function formatBatch(array $records) + { + foreach ($records as $key => $record) { + $records[$key] = $this->format($record); + } + + return $records; + } + + protected function normalize($data) + { + if (null === $data || is_scalar($data)) { + if (is_float($data)) { + if (is_infinite($data)) { + return ($data > 0 ? '' : '-') . 'INF'; + } + if (is_nan($data)) { + return 'NaN'; + } + } + + return $data; + } + + if (is_array($data)) { + $normalized = array(); + + $count = 1; + foreach ($data as $key => $value) { + if ($count++ >= 1000) { + $normalized['...'] = 'Over 1000 items ('.count($data).' total), aborting normalization'; + break; + } + $normalized[$key] = $this->normalize($value); + } + + return $normalized; + } + + if ($data instanceof \DateTime) { + return $data->format($this->dateFormat); + } + + if (is_object($data)) { + // TODO 2.0 only check for Throwable + if ($data instanceof Exception || (PHP_VERSION_ID > 70000 && $data instanceof \Throwable)) { + return $this->normalizeException($data); + } + + // non-serializable objects that implement __toString stringified + if (method_exists($data, '__toString') && !$data instanceof \JsonSerializable) { + $value = $data->__toString(); + } else { + // the rest is json-serialized in some way + $value = $this->toJson($data, true); + } + + return sprintf("[object] (%s: %s)", get_class($data), $value); + } + + if (is_resource($data)) { + return sprintf('[resource] (%s)', get_resource_type($data)); + } + + return '[unknown('.gettype($data).')]'; + } + + protected function normalizeException($e) + { + // 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)); + } + + $data = array( + 'class' => get_class($e), + 'message' => $e->getMessage(), + 'code' => $e->getCode(), + 'file' => $e->getFile().':'.$e->getLine(), + ); + + if ($e instanceof \SoapFault) { + if (isset($e->faultcode)) { + $data['faultcode'] = $e->faultcode; + } + + if (isset($e->faultactor)) { + $data['faultactor'] = $e->faultactor; + } + + if (isset($e->detail)) { + $data['detail'] = $e->detail; + } + } + + $trace = $e->getTrace(); + 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); + } + } + + if ($previous = $e->getPrevious()) { + $data['previous'] = $this->normalizeException($previous); + } + + return $data; + } + + /** + * Return the JSON representation of a value + * + * @param mixed $data + * @param bool $ignoreErrors + * @throws \RuntimeException if encoding fails and errors are not ignored + * @return string + */ + 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; + } + + /** + * @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 + ); + } + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/ScalarFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/ScalarFormatter.php new file mode 100644 index 0000000..5d345d5 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Formatter/ScalarFormatter.php @@ -0,0 +1,48 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +/** + * Formats data into an associative array of scalar values. + * Objects and arrays will be JSON encoded. + * + * @author Andrew Lawson + */ +class ScalarFormatter extends NormalizerFormatter +{ + /** + * {@inheritdoc} + */ + public function format(array $record) + { + foreach ($record as $key => $value) { + $record[$key] = $this->normalizeValue($value); + } + + return $record; + } + + /** + * @param mixed $value + * @return mixed + */ + protected function normalizeValue($value) + { + $normalized = $this->normalize($value); + + if (is_array($normalized) || is_object($normalized)) { + return $this->toJson($normalized, true); + } + + return $normalized; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/WildfireFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/WildfireFormatter.php new file mode 100644 index 0000000..654710a --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Formatter/WildfireFormatter.php @@ -0,0 +1,113 @@ + + * + * 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; + +/** + * Serializes a log message according to Wildfire's header requirements + * + * @author Eric Clemmons (@ericclemmons) + * @author Christophe Coevoet + * @author Kirill chEbba Chebunin + */ +class WildfireFormatter extends NormalizerFormatter +{ + const TABLE = 'table'; + + /** + * Translates Monolog log levels to Wildfire levels. + */ + private $logLevels = array( + Logger::DEBUG => 'LOG', + Logger::INFO => 'INFO', + Logger::NOTICE => 'INFO', + Logger::WARNING => 'WARN', + Logger::ERROR => 'ERROR', + Logger::CRITICAL => 'ERROR', + Logger::ALERT => 'ERROR', + Logger::EMERGENCY => 'ERROR', + ); + + /** + * {@inheritdoc} + */ + public function format(array $record) + { + // Retrieve the line and file if set and remove them from the formatted extra + $file = $line = ''; + if (isset($record['extra']['file'])) { + $file = $record['extra']['file']; + unset($record['extra']['file']); + } + if (isset($record['extra']['line'])) { + $line = $record['extra']['line']; + unset($record['extra']['line']); + } + + $record = $this->normalize($record); + $message = array('message' => $record['message']); + $handleError = false; + if ($record['context']) { + $message['context'] = $record['context']; + $handleError = true; + } + if ($record['extra']) { + $message['extra'] = $record['extra']; + $handleError = true; + } + if (count($message) === 1) { + $message = reset($message); + } + + if (isset($record['context'][self::TABLE])) { + $type = 'TABLE'; + $label = $record['channel'] .': '. $record['message']; + $message = $record['context'][self::TABLE]; + } else { + $type = $this->logLevels[$record['level']]; + $label = $record['channel']; + } + + // Create JSON object describing the appearance of the message in the console + $json = $this->toJson(array( + array( + 'Type' => $type, + 'File' => $file, + 'Line' => $line, + 'Label' => $label, + ), + $message, + ), $handleError); + + // The message itself is a serialization of the above JSON object + it's length + return sprintf( + '%s|%s|', + strlen($json), + $json + ); + } + + public function formatBatch(array $records) + { + throw new \BadMethodCallException('Batch formatting does not make sense for the WildfireFormatter'); + } + + protected function normalize($data) + { + if (is_object($data) && !$data instanceof \DateTime) { + return $data; + } + + return parent::normalize($data); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/AbstractHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/AbstractHandler.php new file mode 100644 index 0000000..758a425 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/AbstractHandler.php @@ -0,0 +1,186 @@ + + * + * 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\Formatter\FormatterInterface; +use Monolog\Formatter\LineFormatter; + +/** + * Base Handler class providing the Handler structure + * + * @author Jordi Boggiano + */ +abstract class AbstractHandler implements HandlerInterface +{ + protected $level = Logger::DEBUG; + protected $bubble = true; + + /** + * @var FormatterInterface + */ + protected $formatter; + 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 + */ + public function __construct($level = Logger::DEBUG, $bubble = true) + { + $this->setLevel($level); + $this->bubble = $bubble; + } + + /** + * {@inheritdoc} + */ + public function isHandling(array $record) + { + return $record['level'] >= $this->level; + } + + /** + * {@inheritdoc} + */ + public function handleBatch(array $records) + { + foreach ($records as $record) { + $this->handle($record); + } + } + + /** + * Closes the handler. + * + * This will be called automatically when the object is destroyed + */ + public function close() + { + } + + /** + * {@inheritdoc} + */ + public function pushProcessor($callback) + { + if (!is_callable($callback)) { + throw new \InvalidArgumentException('Processors must be valid callables (callback or object with an __invoke method), '.var_export($callback, true).' given'); + } + array_unshift($this->processors, $callback); + + return $this; + } + + /** + * {@inheritdoc} + */ + public function popProcessor() + { + if (!$this->processors) { + throw new \LogicException('You tried to pop from an empty processor stack.'); + } + + return array_shift($this->processors); + } + + /** + * {@inheritdoc} + */ + public function setFormatter(FormatterInterface $formatter) + { + $this->formatter = $formatter; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function getFormatter() + { + if (!$this->formatter) { + $this->formatter = $this->getDefaultFormatter(); + } + + return $this->formatter; + } + + /** + * Sets minimum logging level at which this handler will be triggered. + * + * @param int|string $level Level or level name + * @return self + */ + public function setLevel($level) + { + $this->level = Logger::toMonologLevel($level); + + return $this; + } + + /** + * Gets minimum logging level at which this handler will be triggered. + * + * @return int + */ + public function getLevel() + { + return $this->level; + } + + /** + * Sets the bubbling behavior. + * + * @param Boolean $bubble true means that this handler allows bubbling. + * false means that bubbling is not permitted. + * @return self + */ + public function setBubble($bubble) + { + $this->bubble = $bubble; + + return $this; + } + + /** + * Gets the bubbling behavior. + * + * @return Boolean true means that this handler allows bubbling. + * false means that bubbling is not permitted. + */ + public function getBubble() + { + return $this->bubble; + } + + public function __destruct() + { + try { + $this->close(); + } catch (\Exception $e) { + // do nothing + } catch (\Throwable $e) { + // do nothing + } + } + + /** + * Gets the default formatter. + * + * @return FormatterInterface + */ + protected function getDefaultFormatter() + { + return new LineFormatter(); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php new file mode 100644 index 0000000..6f18f72 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php @@ -0,0 +1,66 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +/** + * Base Handler class providing the Handler structure + * + * Classes extending it should (in most cases) only implement write($record) + * + * @author Jordi Boggiano + * @author Christophe Coevoet + */ +abstract class AbstractProcessingHandler extends AbstractHandler +{ + /** + * {@inheritdoc} + */ + public function handle(array $record) + { + if (!$this->isHandling($record)) { + return false; + } + + $record = $this->processRecord($record); + + $record['formatted'] = $this->getFormatter()->format($record); + + $this->write($record); + + return false === $this->bubble; + } + + /** + * Writes the record down to the log of the implementing handler + * + * @param array $record + * @return void + */ + abstract protected function write(array $record); + + /** + * Processes a record. + * + * @param array $record + * @return array + */ + protected function processRecord(array $record) + { + if ($this->processors) { + foreach ($this->processors as $processor) { + $record = call_user_func($processor, $record); + } + } + + return $record; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/AbstractSyslogHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/AbstractSyslogHandler.php new file mode 100644 index 0000000..e2b2832 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/AbstractSyslogHandler.php @@ -0,0 +1,101 @@ + + * + * 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\Formatter\LineFormatter; + +/** + * Common syslog functionality + */ +abstract class AbstractSyslogHandler extends AbstractProcessingHandler +{ + protected $facility; + + /** + * Translates Monolog log levels to syslog log priorities. + */ + protected $logLevels = array( + Logger::DEBUG => LOG_DEBUG, + Logger::INFO => LOG_INFO, + Logger::NOTICE => LOG_NOTICE, + Logger::WARNING => LOG_WARNING, + Logger::ERROR => LOG_ERR, + Logger::CRITICAL => LOG_CRIT, + Logger::ALERT => LOG_ALERT, + Logger::EMERGENCY => LOG_EMERG, + ); + + /** + * List of valid log facility names. + */ + protected $facilities = array( + 'auth' => LOG_AUTH, + 'authpriv' => LOG_AUTHPRIV, + 'cron' => LOG_CRON, + 'daemon' => LOG_DAEMON, + 'kern' => LOG_KERN, + 'lpr' => LOG_LPR, + 'mail' => LOG_MAIL, + 'news' => LOG_NEWS, + 'syslog' => LOG_SYSLOG, + 'user' => LOG_USER, + 'uucp' => LOG_UUCP, + ); + + /** + * @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 + */ + public function __construct($facility = LOG_USER, $level = Logger::DEBUG, $bubble = true) + { + parent::__construct($level, $bubble); + + if (!defined('PHP_WINDOWS_VERSION_BUILD')) { + $this->facilities['local0'] = LOG_LOCAL0; + $this->facilities['local1'] = LOG_LOCAL1; + $this->facilities['local2'] = LOG_LOCAL2; + $this->facilities['local3'] = LOG_LOCAL3; + $this->facilities['local4'] = LOG_LOCAL4; + $this->facilities['local5'] = LOG_LOCAL5; + $this->facilities['local6'] = LOG_LOCAL6; + $this->facilities['local7'] = LOG_LOCAL7; + } else { + $this->facilities['local0'] = 128; // LOG_LOCAL0 + $this->facilities['local1'] = 136; // LOG_LOCAL1 + $this->facilities['local2'] = 144; // LOG_LOCAL2 + $this->facilities['local3'] = 152; // LOG_LOCAL3 + $this->facilities['local4'] = 160; // LOG_LOCAL4 + $this->facilities['local5'] = 168; // LOG_LOCAL5 + $this->facilities['local6'] = 176; // LOG_LOCAL6 + $this->facilities['local7'] = 184; // LOG_LOCAL7 + } + + // convert textual description of facility to syslog constant + if (array_key_exists(strtolower($facility), $this->facilities)) { + $facility = $this->facilities[strtolower($facility)]; + } elseif (!in_array($facility, array_values($this->facilities), true)) { + throw new \UnexpectedValueException('Unknown facility value "'.$facility.'" given'); + } + + $this->facility = $facility; + } + + /** + * {@inheritdoc} + */ + protected function getDefaultFormatter() + { + return new LineFormatter('%channel%.%level_name%: %message% %context% %extra%'); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/AmqpHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/AmqpHandler.php new file mode 100644 index 0000000..e5a46bc --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/AmqpHandler.php @@ -0,0 +1,148 @@ + + * + * 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\Formatter\JsonFormatter; +use PhpAmqpLib\Message\AMQPMessage; +use PhpAmqpLib\Channel\AMQPChannel; +use AMQPExchange; + +class AmqpHandler extends AbstractProcessingHandler +{ + /** + * @var AMQPExchange|AMQPChannel $exchange + */ + protected $exchange; + + /** + * @var string + */ + protected $exchangeName; + + /** + * @param AMQPExchange|AMQPChannel $exchange AMQPExchange (php AMQP ext) or PHP AMQP lib channel, ready for use + * @param string $exchangeName + * @param int $level + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not + */ + public function __construct($exchange, $exchangeName = 'log', $level = Logger::DEBUG, $bubble = true) + { + if ($exchange instanceof AMQPExchange) { + $exchange->setName($exchangeName); + } elseif ($exchange instanceof AMQPChannel) { + $this->exchangeName = $exchangeName; + } else { + throw new \InvalidArgumentException('PhpAmqpLib\Channel\AMQPChannel or AMQPExchange instance required'); + } + $this->exchange = $exchange; + + parent::__construct($level, $bubble); + } + + /** + * {@inheritDoc} + */ + protected function write(array $record) + { + $data = $record["formatted"]; + $routingKey = $this->getRoutingKey($record); + + if ($this->exchange instanceof AMQPExchange) { + $this->exchange->publish( + $data, + $routingKey, + 0, + array( + 'delivery_mode' => 2, + 'content_type' => 'application/json', + ) + ); + } else { + $this->exchange->basic_publish( + $this->createAmqpMessage($data), + $this->exchangeName, + $routingKey + ); + } + } + + /** + * {@inheritDoc} + */ + public function handleBatch(array $records) + { + if ($this->exchange instanceof AMQPExchange) { + parent::handleBatch($records); + + return; + } + + foreach ($records as $record) { + if (!$this->isHandling($record)) { + continue; + } + + $record = $this->processRecord($record); + $data = $this->getFormatter()->format($record); + + $this->exchange->batch_basic_publish( + $this->createAmqpMessage($data), + $this->exchangeName, + $this->getRoutingKey($record) + ); + } + + $this->exchange->publish_batch(); + } + + /** + * Gets the routing key for the AMQP exchange + * + * @param array $record + * @return string + */ + protected function getRoutingKey(array $record) + { + $routingKey = sprintf( + '%s.%s', + // TODO 2.0 remove substr call + substr($record['level_name'], 0, 4), + $record['channel'] + ); + + return strtolower($routingKey); + } + + /** + * @param string $data + * @return AMQPMessage + */ + private function createAmqpMessage($data) + { + return new AMQPMessage( + (string) $data, + array( + 'delivery_mode' => 2, + 'content_type' => 'application/json', + ) + ); + } + + /** + * {@inheritDoc} + */ + protected function getDefaultFormatter() + { + return new JsonFormatter(JsonFormatter::BATCH_MODE_JSON, false); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/BrowserConsoleHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/BrowserConsoleHandler.php new file mode 100644 index 0000000..b3a21bd --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/BrowserConsoleHandler.php @@ -0,0 +1,230 @@ + + * + * 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; + +/** + * Handler sending logs to browser's javascript console with no browser extension required + * + * @author Olivier Poitrey + */ +class BrowserConsoleHandler extends AbstractProcessingHandler +{ + protected static $initialized = false; + protected static $records = array(); + + /** + * {@inheritDoc} + * + * Formatted output may contain some formatting markers to be transferred to `console.log` using the %c format. + * + * Example of formatted string: + * + * You can do [[blue text]]{color: blue} or [[green background]]{background-color: green; color: white} + */ + protected function getDefaultFormatter() + { + return new LineFormatter('[[%channel%]]{macro: autolabel} [[%level_name%]]{font-weight: bold} %message%'); + } + + /** + * {@inheritDoc} + */ + protected function write(array $record) + { + // Accumulate records + self::$records[] = $record; + + // Register shutdown handler if not already done + if (!self::$initialized) { + self::$initialized = true; + $this->registerShutdownFunction(); + } + } + + /** + * Convert records to javascript console commands and send it to the browser. + * This method is automatically called on PHP shutdown if output is HTML or Javascript. + */ + public static function send() + { + $format = self::getResponseFormat(); + if ($format === 'unknown') { + return; + } + + if (count(self::$records)) { + if ($format === 'html') { + self::writeOutput(''); + } elseif ($format === 'js') { + self::writeOutput(self::generateScript()); + } + self::reset(); + } + } + + /** + * Forget all logged records + */ + public static function reset() + { + self::$records = array(); + } + + /** + * Wrapper for register_shutdown_function to allow overriding + */ + protected function registerShutdownFunction() + { + if (PHP_SAPI !== 'cli') { + register_shutdown_function(array('Monolog\Handler\BrowserConsoleHandler', 'send')); + } + } + + /** + * Wrapper for echo to allow overriding + * + * @param string $str + */ + protected static function writeOutput($str) + { + echo $str; + } + + /** + * Checks the format of the response + * + * If Content-Type is set to application/javascript or text/javascript -> js + * If Content-Type is set to text/html, or is unset -> html + * If Content-Type is anything else -> unknown + * + * @return string One of 'js', 'html' or 'unknown' + */ + protected static function getResponseFormat() + { + // Check content type + foreach (headers_list() as $header) { + if (stripos($header, 'content-type:') === 0) { + // This handler only works with HTML and javascript outputs + // text/javascript is obsolete in favour of application/javascript, but still used + if (stripos($header, 'application/javascript') !== false || stripos($header, 'text/javascript') !== false) { + return 'js'; + } + if (stripos($header, 'text/html') === false) { + return 'unknown'; + } + break; + } + } + + return 'html'; + } + + private static function generateScript() + { + $script = array(); + foreach (self::$records as $record) { + $context = self::dump('Context', $record['context']); + $extra = self::dump('Extra', $record['extra']); + + if (empty($context) && empty($extra)) { + $script[] = self::call_array('log', self::handleStyles($record['formatted'])); + } else { + $script = array_merge($script, + array(self::call_array('groupCollapsed', self::handleStyles($record['formatted']))), + $context, + $extra, + array(self::call('groupEnd')) + ); + } + } + + return "(function (c) {if (c && c.groupCollapsed) {\n" . implode("\n", $script) . "\n}})(console);"; + } + + private static function handleStyles($formatted) + { + $args = array(self::quote('font-weight: normal')); + $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"'; + + $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)); + + return $args; + } + + private static function handleCustomStyles($style, $string) + { + static $colors = array('blue', 'green', 'red', 'magenta', 'orange', 'black', 'grey'); + static $labels = array(); + + return preg_replace_callback('/macro\s*:(.*?)(?:;|$)/', function ($m) use ($string, &$colors, &$labels) { + if (trim($m[1]) === 'autolabel') { + // Format the string as a label with consistent auto assigned background color + if (!isset($labels[$string])) { + $labels[$string] = $colors[count($labels) % count($colors)]; + } + $color = $labels[$string]; + + return "background-color: $color; color: white; border-radius: 3px; padding: 0 2px 0 2px"; + } + + return $m[1]; + }, $style); + } + + private static function dump($title, array $dict) + { + $script = array(); + $dict = array_filter($dict); + if (empty($dict)) { + return $script; + } + $script[] = self::call('log', self::quote('%c%s'), self::quote('font-weight: bold'), self::quote($title)); + foreach ($dict as $key => $value) { + $value = json_encode($value); + if (empty($value)) { + $value = self::quote(''); + } + $script[] = self::call('log', self::quote('%s: %o'), self::quote($key), $value); + } + + return $script; + } + + private static function quote($arg) + { + return '"' . addcslashes($arg, "\"\n\\") . '"'; + } + + private static function call() + { + $args = func_get_args(); + $method = array_shift($args); + + return self::call_array($method, $args); + } + + private static function call_array($method, array $args) + { + return 'c.' . $method . '(' . implode(', ', $args) . ');'; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/BufferHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/BufferHandler.php new file mode 100644 index 0000000..72f8953 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/BufferHandler.php @@ -0,0 +1,117 @@ + + * + * 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; + +/** + * Buffers all records until closing the handler and then pass them as batch. + * + * This is useful for a MailHandler to send only one mail per request instead of + * sending one per log message. + * + * @author Christophe Coevoet + */ +class BufferHandler extends AbstractHandler +{ + protected $handler; + protected $bufferSize = 0; + protected $bufferLimit; + protected $flushOnOverflow; + protected $buffer = array(); + protected $initialized = false; + + /** + * @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 + */ + public function __construct(HandlerInterface $handler, $bufferLimit = 0, $level = Logger::DEBUG, $bubble = true, $flushOnOverflow = false) + { + parent::__construct($level, $bubble); + $this->handler = $handler; + $this->bufferLimit = (int) $bufferLimit; + $this->flushOnOverflow = $flushOnOverflow; + } + + /** + * {@inheritdoc} + */ + public function handle(array $record) + { + if ($record['level'] < $this->level) { + return false; + } + + if (!$this->initialized) { + // __destructor() doesn't get called on Fatal errors + register_shutdown_function(array($this, 'close')); + $this->initialized = true; + } + + if ($this->bufferLimit > 0 && $this->bufferSize === $this->bufferLimit) { + if ($this->flushOnOverflow) { + $this->flush(); + } else { + array_shift($this->buffer); + $this->bufferSize--; + } + } + + if ($this->processors) { + foreach ($this->processors as $processor) { + $record = call_user_func($processor, $record); + } + } + + $this->buffer[] = $record; + $this->bufferSize++; + + return false === $this->bubble; + } + + public function flush() + { + if ($this->bufferSize === 0) { + return; + } + + $this->handler->handleBatch($this->buffer); + $this->clear(); + } + + public function __destruct() + { + // suppress the parent behavior since we already have register_shutdown_function() + // to call close(), and the reference contained there will prevent this from being + // GC'd until the end of the request + } + + /** + * {@inheritdoc} + */ + public function close() + { + $this->flush(); + } + + /** + * Clears the buffer without flushing any messages down to the wrapped handler. + */ + public function clear() + { + $this->bufferSize = 0; + $this->buffer = array(); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/ChromePHPHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/ChromePHPHandler.php new file mode 100644 index 0000000..b00fa84 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/ChromePHPHandler.php @@ -0,0 +1,211 @@ + + * + * 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\ChromePHPFormatter; +use Monolog\Logger; + +/** + * Handler sending logs to the ChromePHP extension (http://www.chromephp.com/) + * + * This also works out of the box with Firefox 43+ + * + * @author Christophe Coevoet + */ +class ChromePHPHandler extends AbstractProcessingHandler +{ + /** + * Version of the extension + */ + const VERSION = '4.0'; + + /** + * 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}'; + + 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 + * + * @var Boolean + */ + protected static $overflowed = false; + + protected static $json = array( + 'version' => self::VERSION, + 'columns' => array('label', 'log', 'backtrace', 'type'), + 'rows' => array(), + ); + + 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 + */ + public function __construct($level = Logger::DEBUG, $bubble = true) + { + parent::__construct($level, $bubble); + if (!function_exists('json_encode')) { + throw new \RuntimeException('PHP\'s json extension is required to use Monolog\'s ChromePHPHandler'); + } + } + + /** + * {@inheritdoc} + */ + public function handleBatch(array $records) + { + $messages = array(); + + foreach ($records as $record) { + if ($record['level'] < $this->level) { + continue; + } + $messages[] = $this->processRecord($record); + } + + if (!empty($messages)) { + $messages = $this->getFormatter()->formatBatch($messages); + self::$json['rows'] = array_merge(self::$json['rows'], $messages); + $this->send(); + } + } + + /** + * {@inheritDoc} + */ + protected function getDefaultFormatter() + { + return new ChromePHPFormatter(); + } + + /** + * Creates & sends header for a record + * + * @see sendHeader() + * @see send() + * @param array $record + */ + protected function write(array $record) + { + self::$json['rows'][] = $record['formatted']; + + $this->send(); + } + + /** + * Sends the log header + * + * @see sendHeader() + */ + protected function send() + { + if (self::$overflowed || !self::$sendHeaders) { + return; + } + + if (!self::$initialized) { + self::$initialized = true; + + self::$sendHeaders = $this->headersAccepted(); + if (!self::$sendHeaders) { + return; + } + + self::$json['request_uri'] = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : ''; + } + + $json = @json_encode(self::$json); + $data = base64_encode(utf8_encode($json)); + if (strlen($data) > 240 * 1024) { + self::$overflowed = true; + + $record = array( + 'message' => 'Incomplete logs, chrome header size limit reached', + 'context' => array(), + 'level' => Logger::WARNING, + 'level_name' => Logger::getLevelName(Logger::WARNING), + 'channel' => 'monolog', + 'datetime' => new \DateTime(), + 'extra' => array(), + ); + self::$json['rows'][count(self::$json['rows']) - 1] = $this->getFormatter()->format($record); + $json = @json_encode(self::$json); + $data = base64_encode(utf8_encode($json)); + } + + if (trim($data) !== '') { + $this->sendHeader(self::HEADER_NAME, $data); + } + } + + /** + * Send header string to the client + * + * @param string $header + * @param string $content + */ + protected function sendHeader($header, $content) + { + if (!headers_sent() && self::$sendHeaders) { + header(sprintf('%s: %s', $header, $content)); + } + } + + /** + * Verifies if the headers are accepted by the current user agent + * + * @return Boolean + */ + protected function headersAccepted() + { + if (empty($_SERVER['HTTP_USER_AGENT'])) { + return false; + } + + return preg_match(self::USER_AGENT_REGEX, $_SERVER['HTTP_USER_AGENT']); + } + + /** + * BC getter for the sendHeaders property that has been made static + */ + public function __get($property) + { + if ('sendHeaders' !== $property) { + throw new \InvalidArgumentException('Undefined property '.$property); + } + + return static::$sendHeaders; + } + + /** + * BC setter for the sendHeaders property that has been made static + */ + public function __set($property, $value) + { + if ('sendHeaders' !== $property) { + throw new \InvalidArgumentException('Undefined property '.$property); + } + + static::$sendHeaders = $value; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/CouchDBHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/CouchDBHandler.php new file mode 100644 index 0000000..cc98697 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/CouchDBHandler.php @@ -0,0 +1,72 @@ + + * + * 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\JsonFormatter; +use Monolog\Logger; + +/** + * CouchDB handler + * + * @author Markus Bachmann + */ +class CouchDBHandler extends AbstractProcessingHandler +{ + private $options; + + public function __construct(array $options = array(), $level = Logger::DEBUG, $bubble = true) + { + $this->options = array_merge(array( + 'host' => 'localhost', + 'port' => 5984, + 'dbname' => 'logger', + 'username' => null, + 'password' => null, + ), $options); + + parent::__construct($level, $bubble); + } + + /** + * {@inheritDoc} + */ + protected function write(array $record) + { + $basicAuth = null; + if ($this->options['username']) { + $basicAuth = sprintf('%s:%s@', $this->options['username'], $this->options['password']); + } + + $url = 'http://'.$basicAuth.$this->options['host'].':'.$this->options['port'].'/'.$this->options['dbname']; + $context = stream_context_create(array( + 'http' => array( + 'method' => 'POST', + 'content' => $record['formatted'], + 'ignore_errors' => true, + 'max_redirects' => 0, + 'header' => 'Content-type: application/json', + ), + )); + + if (false === @file_get_contents($url, null, $context)) { + throw new \RuntimeException(sprintf('Could not connect to %s', $url)); + } + } + + /** + * {@inheritDoc} + */ + protected function getDefaultFormatter() + { + return new JsonFormatter(JsonFormatter::BATCH_MODE_JSON, false); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/CubeHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/CubeHandler.php new file mode 100644 index 0000000..96b3ca0 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/CubeHandler.php @@ -0,0 +1,151 @@ + + * + * 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; + +/** + * Logs to Cube. + * + * @link http://square.github.com/cube/ + * @author Wan Chen + */ +class CubeHandler extends AbstractProcessingHandler +{ + private $udpConnection; + private $httpConnection; + private $scheme; + private $host; + private $port; + private $acceptedSchemes = array('http', 'udp'); + + /** + * Create a Cube handler + * + * @throws \UnexpectedValueException when given url is not a valid url. + * A valid url must consist of three parts : protocol://host:port + * Only valid protocols used by Cube are http and udp + */ + public function __construct($url, $level = Logger::DEBUG, $bubble = true) + { + $urlInfo = parse_url($url); + + if (!isset($urlInfo['scheme'], $urlInfo['host'], $urlInfo['port'])) { + throw new \UnexpectedValueException('URL "'.$url.'" is not valid'); + } + + if (!in_array($urlInfo['scheme'], $this->acceptedSchemes)) { + throw new \UnexpectedValueException( + 'Invalid protocol (' . $urlInfo['scheme'] . ').' + . ' Valid options are ' . implode(', ', $this->acceptedSchemes)); + } + + $this->scheme = $urlInfo['scheme']; + $this->host = $urlInfo['host']; + $this->port = $urlInfo['port']; + + parent::__construct($level, $bubble); + } + + /** + * Establish a connection to an UDP socket + * + * @throws \LogicException when unable to connect to the socket + * @throws MissingExtensionException when there is no socket extension + */ + protected function connectUdp() + { + if (!extension_loaded('sockets')) { + throw new MissingExtensionException('The sockets extension is required to use udp URLs with the CubeHandler'); + } + + $this->udpConnection = socket_create(AF_INET, SOCK_DGRAM, 0); + if (!$this->udpConnection) { + throw new \LogicException('Unable to create a socket'); + } + + if (!socket_connect($this->udpConnection, $this->host, $this->port)) { + throw new \LogicException('Unable to connect to the socket at ' . $this->host . ':' . $this->port); + } + } + + /** + * Establish a connection to a http server + * @throws \LogicException when no curl extension + */ + protected function connectHttp() + { + if (!extension_loaded('curl')) { + throw new \LogicException('The curl extension is needed to use http URLs with the CubeHandler'); + } + + $this->httpConnection = curl_init('http://'.$this->host.':'.$this->port.'/1.0/event/put'); + + if (!$this->httpConnection) { + throw new \LogicException('Unable to connect to ' . $this->host . ':' . $this->port); + } + + curl_setopt($this->httpConnection, CURLOPT_CUSTOMREQUEST, "POST"); + curl_setopt($this->httpConnection, CURLOPT_RETURNTRANSFER, true); + } + + /** + * {@inheritdoc} + */ + protected function write(array $record) + { + $date = $record['datetime']; + + $data = array('time' => $date->format('Y-m-d\TH:i:s.uO')); + unset($record['datetime']); + + if (isset($record['context']['type'])) { + $data['type'] = $record['context']['type']; + unset($record['context']['type']); + } else { + $data['type'] = $record['channel']; + } + + $data['data'] = $record['context']; + $data['data']['level'] = $record['level']; + + if ($this->scheme === 'http') { + $this->writeHttp(json_encode($data)); + } else { + $this->writeUdp(json_encode($data)); + } + } + + private function writeUdp($data) + { + if (!$this->udpConnection) { + $this->connectUdp(); + } + + socket_send($this->udpConnection, $data, strlen($data), 0); + } + + private function writeHttp($data) + { + if (!$this->httpConnection) { + $this->connectHttp(); + } + + curl_setopt($this->httpConnection, CURLOPT_POSTFIELDS, '['.$data.']'); + curl_setopt($this->httpConnection, CURLOPT_HTTPHEADER, array( + 'Content-Type: application/json', + 'Content-Length: ' . strlen('['.$data.']'), + )); + + Curl\Util::execute($this->httpConnection, 5, false); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/Curl/Util.php b/vendor/monolog/monolog/src/Monolog/Handler/Curl/Util.php new file mode 100644 index 0000000..48d30b3 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/Curl/Util.php @@ -0,0 +1,57 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler\Curl; + +class Util +{ + private static $retriableErrorCodes = array( + CURLE_COULDNT_RESOLVE_HOST, + CURLE_COULDNT_CONNECT, + CURLE_HTTP_NOT_FOUND, + CURLE_READ_ERROR, + CURLE_OPERATION_TIMEOUTED, + CURLE_HTTP_POST_ERROR, + CURLE_SSL_CONNECT_ERROR, + ); + + /** + * Executes a CURL request with optional retries and exception on failure + * + * @param resource $ch curl handler + * @throws \RuntimeException + */ + public static function execute($ch, $retries = 5, $closeAfterDone = true) + { + while ($retries--) { + if (curl_exec($ch) === false) { + $curlErrno = curl_errno($ch); + + if (false === in_array($curlErrno, self::$retriableErrorCodes, true) || !$retries) { + $curlError = curl_error($ch); + + if ($closeAfterDone) { + curl_close($ch); + } + + throw new \RuntimeException(sprintf('Curl error (code %s): %s', $curlErrno, $curlError)); + } + + continue; + } + + if ($closeAfterDone) { + curl_close($ch); + } + break; + } + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/DeduplicationHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/DeduplicationHandler.php new file mode 100644 index 0000000..7778c22 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/DeduplicationHandler.php @@ -0,0 +1,169 @@ + + * + * 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; + +/** + * Simple handler wrapper that deduplicates log records across multiple requests + * + * It also includes the BufferHandler functionality and will buffer + * all messages until the end of the request or flush() is called. + * + * This works by storing all log records' messages above $deduplicationLevel + * to the file specified by $deduplicationStore. When further logs come in at the end of the + * request (or when flush() is called), all those above $deduplicationLevel are checked + * against the existing stored logs. If they match and the timestamps in the stored log is + * not older than $time seconds, the new log record is discarded. If no log record is new, the + * whole data set is discarded. + * + * This is mainly useful in combination with Mail handlers or things like Slack or HipChat handlers + * that send messages to people, to avoid spamming with the same message over and over in case of + * a major component failure like a database server being down which makes all requests fail in the + * same way. + * + * @author Jordi Boggiano + */ +class DeduplicationHandler extends BufferHandler +{ + /** + * @var string + */ + protected $deduplicationStore; + + /** + * @var int + */ + protected $deduplicationLevel; + + /** + * @var int + */ + protected $time; + + /** + * @var bool + */ + private $gc = false; + + /** + * @param HandlerInterface $handler Handler. + * @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 + */ + public function __construct(HandlerInterface $handler, $deduplicationStore = null, $deduplicationLevel = Logger::ERROR, $time = 60, $bubble = true) + { + parent::__construct($handler, 0, Logger::DEBUG, $bubble, false); + + $this->deduplicationStore = $deduplicationStore === null ? sys_get_temp_dir() . '/monolog-dedup-' . substr(md5(__FILE__), 0, 20) .'.log' : $deduplicationStore; + $this->deduplicationLevel = Logger::toMonologLevel($deduplicationLevel); + $this->time = $time; + } + + public function flush() + { + if ($this->bufferSize === 0) { + return; + } + + $passthru = null; + + foreach ($this->buffer as $record) { + if ($record['level'] >= $this->deduplicationLevel) { + + $passthru = $passthru || !$this->isDuplicate($record); + if ($passthru) { + $this->appendRecord($record); + } + } + } + + // default of null is valid as well as if no record matches duplicationLevel we just pass through + if ($passthru === true || $passthru === null) { + $this->handler->handleBatch($this->buffer); + } + + $this->clear(); + + if ($this->gc) { + $this->collectLogs(); + } + } + + private function isDuplicate(array $record) + { + if (!file_exists($this->deduplicationStore)) { + return false; + } + + $store = file($this->deduplicationStore, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); + if (!is_array($store)) { + return false; + } + + $yesterday = time() - 86400; + $timestampValidity = $record['datetime']->getTimestamp() - $this->time; + $expectedMessage = preg_replace('{[\r\n].*}', '', $record['message']); + + for ($i = count($store) - 1; $i >= 0; $i--) { + list($timestamp, $level, $message) = explode(':', $store[$i], 3); + + if ($level === $record['level_name'] && $message === $expectedMessage && $timestamp > $timestampValidity) { + return true; + } + + if ($timestamp < $yesterday) { + $this->gc = true; + } + } + + return false; + } + + private function collectLogs() + { + if (!file_exists($this->deduplicationStore)) { + return false; + } + + $handle = fopen($this->deduplicationStore, 'rw+'); + flock($handle, LOCK_EX); + $validLogs = array(); + + $timestampValidity = time() - $this->time; + + while (!feof($handle)) { + $log = fgets($handle); + if (substr($log, 0, 10) >= $timestampValidity) { + $validLogs[] = $log; + } + } + + ftruncate($handle, 0); + rewind($handle); + foreach ($validLogs as $log) { + fwrite($handle, $log); + } + + flock($handle, LOCK_UN); + fclose($handle); + + $this->gc = false; + } + + private function appendRecord(array $record) + { + file_put_contents($this->deduplicationStore, $record['datetime']->getTimestamp() . ':' . $record['level_name'] . ':' . preg_replace('{[\r\n].*}', '', $record['message']) . "\n", FILE_APPEND); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/DoctrineCouchDBHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/DoctrineCouchDBHandler.php new file mode 100644 index 0000000..b91ffec --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/DoctrineCouchDBHandler.php @@ -0,0 +1,45 @@ + + * + * 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\Formatter\NormalizerFormatter; +use Doctrine\CouchDB\CouchDBClient; + +/** + * CouchDB handler for Doctrine CouchDB ODM + * + * @author Markus Bachmann + */ +class DoctrineCouchDBHandler extends AbstractProcessingHandler +{ + private $client; + + public function __construct(CouchDBClient $client, $level = Logger::DEBUG, $bubble = true) + { + $this->client = $client; + parent::__construct($level, $bubble); + } + + /** + * {@inheritDoc} + */ + protected function write(array $record) + { + $this->client->postDocument($record['formatted']); + } + + protected function getDefaultFormatter() + { + return new NormalizerFormatter; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/DynamoDbHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/DynamoDbHandler.php new file mode 100644 index 0000000..ad1011d --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/DynamoDbHandler.php @@ -0,0 +1,107 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Aws\Common\Aws; +use Aws\DynamoDb\DynamoDbClient; +use Aws\DynamoDb\Marshaler; +use Monolog\Formatter\ScalarFormatter; +use Monolog\Logger; + +/** + * Amazon DynamoDB handler (http://aws.amazon.com/dynamodb/) + * + * @link https://github.com/aws/aws-sdk-php/ + * @author Andrew Lawson + */ +class DynamoDbHandler extends AbstractProcessingHandler +{ + const DATE_FORMAT = 'Y-m-d\TH:i:s.uO'; + + /** + * @var DynamoDbClient + */ + protected $client; + + /** + * @var string + */ + protected $table; + + /** + * @var int + */ + protected $version; + + /** + * @var Marshaler + */ + protected $marshaler; + + /** + * @param DynamoDbClient $client + * @param string $table + * @param int $level + * @param bool $bubble + */ + public function __construct(DynamoDbClient $client, $table, $level = Logger::DEBUG, $bubble = true) + { + if (defined('Aws\Common\Aws::VERSION') && version_compare(Aws::VERSION, '3.0', '>=')) { + $this->version = 3; + $this->marshaler = new Marshaler; + } else { + $this->version = 2; + } + + $this->client = $client; + $this->table = $table; + + parent::__construct($level, $bubble); + } + + /** + * {@inheritdoc} + */ + protected function write(array $record) + { + $filtered = $this->filterEmptyFields($record['formatted']); + if ($this->version === 3) { + $formatted = $this->marshaler->marshalItem($filtered); + } else { + $formatted = $this->client->formatAttributes($filtered); + } + + $this->client->putItem(array( + 'TableName' => $this->table, + 'Item' => $formatted, + )); + } + + /** + * @param array $record + * @return array + */ + protected function filterEmptyFields(array $record) + { + return array_filter($record, function ($value) { + return !empty($value) || false === $value || 0 === $value; + }); + } + + /** + * {@inheritdoc} + */ + protected function getDefaultFormatter() + { + return new ScalarFormatter(self::DATE_FORMAT); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/ElasticSearchHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/ElasticSearchHandler.php new file mode 100644 index 0000000..8196740 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/ElasticSearchHandler.php @@ -0,0 +1,128 @@ + + * + * 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\ElasticaFormatter; +use Monolog\Logger; +use Elastica\Client; +use Elastica\Exception\ExceptionInterface; + +/** + * Elastic Search handler + * + * Usage example: + * + * $client = new \Elastica\Client(); + * $options = array( + * 'index' => 'elastic_index_name', + * 'type' => 'elastic_doc_type', + * ); + * $handler = new ElasticSearchHandler($client, $options); + * $log = new Logger('application'); + * $log->pushHandler($handler); + * + * @author Jelle Vink + */ +class ElasticSearchHandler extends AbstractProcessingHandler +{ + /** + * @var Client + */ + protected $client; + + /** + * @var array Handler config options + */ + 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 + */ + public function __construct(Client $client, array $options = array(), $level = Logger::DEBUG, $bubble = true) + { + parent::__construct($level, $bubble); + $this->client = $client; + $this->options = array_merge( + array( + 'index' => 'monolog', // Elastic index name + 'type' => 'record', // Elastic document type + 'ignore_error' => false, // Suppress Elastica exceptions + ), + $options + ); + } + + /** + * {@inheritDoc} + */ + protected function write(array $record) + { + $this->bulkSend(array($record['formatted'])); + } + + /** + * {@inheritdoc} + */ + public function setFormatter(FormatterInterface $formatter) + { + if ($formatter instanceof ElasticaFormatter) { + return parent::setFormatter($formatter); + } + throw new \InvalidArgumentException('ElasticSearchHandler is only compatible with ElasticaFormatter'); + } + + /** + * Getter options + * @return array + */ + public function getOptions() + { + return $this->options; + } + + /** + * {@inheritDoc} + */ + protected function getDefaultFormatter() + { + return new ElasticaFormatter($this->options['index'], $this->options['type']); + } + + /** + * {@inheritdoc} + */ + public function handleBatch(array $records) + { + $documents = $this->getFormatter()->formatBatch($records); + $this->bulkSend($documents); + } + + /** + * Use Elasticsearch bulk API to send list of documents + * @param array $documents + * @throws \RuntimeException + */ + protected function bulkSend(array $documents) + { + try { + $this->client->addDocuments($documents); + } catch (ExceptionInterface $e) { + if (!$this->options['ignore_error']) { + throw new \RuntimeException("Error sending messages to Elasticsearch", 0, $e); + } + } + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/ErrorLogHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/ErrorLogHandler.php new file mode 100644 index 0000000..1447a58 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/ErrorLogHandler.php @@ -0,0 +1,82 @@ + + * + * 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; + +/** + * Stores to PHP error_log() handler. + * + * @author Elan Ruusamäe + */ +class ErrorLogHandler extends AbstractProcessingHandler +{ + const OPERATING_SYSTEM = 0; + const SAPI = 4; + + protected $messageType; + 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 + */ + public function __construct($messageType = self::OPERATING_SYSTEM, $level = Logger::DEBUG, $bubble = true, $expandNewlines = false) + { + parent::__construct($level, $bubble); + + if (false === in_array($messageType, self::getAvailableTypes())) { + $message = sprintf('The given message type "%s" is not supported', print_r($messageType, true)); + throw new \InvalidArgumentException($message); + } + + $this->messageType = $messageType; + $this->expandNewlines = $expandNewlines; + } + + /** + * @return array With all available types + */ + public static function getAvailableTypes() + { + return array( + self::OPERATING_SYSTEM, + self::SAPI, + ); + } + + /** + * {@inheritDoc} + */ + protected function getDefaultFormatter() + { + return new LineFormatter('[%datetime%] %channel%.%level_name%: %message% %context% %extra%'); + } + + /** + * {@inheritdoc} + */ + protected function write(array $record) + { + if ($this->expandNewlines) { + $lines = preg_split('{[\r\n]+}', (string) $record['formatted']); + foreach ($lines as $line) { + error_log($line, $this->messageType); + } + } else { + error_log((string) $record['formatted'], $this->messageType); + } + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FilterHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/FilterHandler.php new file mode 100644 index 0000000..2a0f7fd --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/FilterHandler.php @@ -0,0 +1,140 @@ + + * + * 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; + +/** + * Simple handler wrapper that filters records based on a list of levels + * + * It can be configured with an exact list of levels to allow, or a min/max level. + * + * @author Hennadiy Verkh + * @author Jordi Boggiano + */ +class FilterHandler extends AbstractHandler +{ + /** + * Handler or factory callable($record, $this) + * + * @var callable|\Monolog\Handler\HandlerInterface + */ + protected $handler; + + /** + * Minimum level for logs that are passed to handler + * + * @var int[] + */ + protected $acceptedLevels; + + /** + * Whether the messages that are handled can bubble up the stack or not + * + * @var Boolean + */ + protected $bubble; + + /** + * @param callable|HandlerInterface $handler Handler or factory callable($record, $this). + * @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 + */ + public function __construct($handler, $minLevelOrList = Logger::DEBUG, $maxLevel = Logger::EMERGENCY, $bubble = true) + { + $this->handler = $handler; + $this->bubble = $bubble; + $this->setAcceptedLevels($minLevelOrList, $maxLevel); + + if (!$this->handler instanceof HandlerInterface && !is_callable($this->handler)) { + throw new \RuntimeException("The given handler (".json_encode($this->handler).") is not a callable nor a Monolog\Handler\HandlerInterface object"); + } + } + + /** + * @return array + */ + public function getAcceptedLevels() + { + return array_flip($this->acceptedLevels); + } + + /** + * @param int|string|array $minLevelOrList A list of levels to accept or a minimum level or level name if maxLevel is provided + * @param int|string $maxLevel Maximum level or level name to accept, only used if $minLevelOrList is not an array + */ + public function setAcceptedLevels($minLevelOrList = Logger::DEBUG, $maxLevel = Logger::EMERGENCY) + { + if (is_array($minLevelOrList)) { + $acceptedLevels = array_map('Monolog\Logger::toMonologLevel', $minLevelOrList); + } else { + $minLevelOrList = Logger::toMonologLevel($minLevelOrList); + $maxLevel = Logger::toMonologLevel($maxLevel); + $acceptedLevels = array_values(array_filter(Logger::getLevels(), function ($level) use ($minLevelOrList, $maxLevel) { + return $level >= $minLevelOrList && $level <= $maxLevel; + })); + } + $this->acceptedLevels = array_flip($acceptedLevels); + } + + /** + * {@inheritdoc} + */ + public function isHandling(array $record) + { + return isset($this->acceptedLevels[$record['level']]); + } + + /** + * {@inheritdoc} + */ + public function handle(array $record) + { + if (!$this->isHandling($record)) { + 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); + + return false === $this->bubble; + } + + /** + * {@inheritdoc} + */ + public function handleBatch(array $records) + { + $filtered = array(); + foreach ($records as $record) { + if ($this->isHandling($record)) { + $filtered[] = $record; + } + } + + $this->handler->handleBatch($filtered); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ActivationStrategyInterface.php b/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ActivationStrategyInterface.php new file mode 100644 index 0000000..c3e42ef --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ActivationStrategyInterface.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler\FingersCrossed; + +/** + * Interface for activation strategies for the FingersCrossedHandler. + * + * @author Johannes M. Schmitt + */ +interface ActivationStrategyInterface +{ + /** + * Returns whether the given record activates the handler. + * + * @param array $record + * @return Boolean + */ + public function isHandlerActivated(array $record); +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ChannelLevelActivationStrategy.php b/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ChannelLevelActivationStrategy.php new file mode 100644 index 0000000..2a2a64d --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ChannelLevelActivationStrategy.php @@ -0,0 +1,59 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler\FingersCrossed; + +use Monolog\Logger; + +/** + * Channel and Error level based monolog activation strategy. Allows to trigger activation + * based on level per channel. e.g. trigger activation on level 'ERROR' by default, except + * for records of the 'sql' channel; those should trigger activation on level 'WARN'. + * + * Example: + * + * + * $activationStrategy = new ChannelLevelActivationStrategy( + * Logger::CRITICAL, + * array( + * 'request' => Logger::ALERT, + * 'sensitive' => Logger::ERROR, + * ) + * ); + * $handler = new FingersCrossedHandler(new StreamHandler('php://stderr'), $activationStrategy); + * + * + * @author Mike Meessen + */ +class ChannelLevelActivationStrategy implements ActivationStrategyInterface +{ + private $defaultActionLevel; + private $channelToActionLevel; + + /** + * @param int $defaultActionLevel The default action level to be used if the record's category doesn't match any + * @param array $channelToActionLevel An array that maps channel names to action levels. + */ + public function __construct($defaultActionLevel, $channelToActionLevel = array()) + { + $this->defaultActionLevel = Logger::toMonologLevel($defaultActionLevel); + $this->channelToActionLevel = array_map('Monolog\Logger::toMonologLevel', $channelToActionLevel); + } + + public function isHandlerActivated(array $record) + { + if (isset($this->channelToActionLevel[$record['channel']])) { + return $record['level'] >= $this->channelToActionLevel[$record['channel']]; + } + + return $record['level'] >= $this->defaultActionLevel; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ErrorLevelActivationStrategy.php b/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ErrorLevelActivationStrategy.php new file mode 100644 index 0000000..6e63085 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ErrorLevelActivationStrategy.php @@ -0,0 +1,34 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler\FingersCrossed; + +use Monolog\Logger; + +/** + * Error level based activation strategy. + * + * @author Johannes M. Schmitt + */ +class ErrorLevelActivationStrategy implements ActivationStrategyInterface +{ + private $actionLevel; + + public function __construct($actionLevel) + { + $this->actionLevel = Logger::toMonologLevel($actionLevel); + } + + public function isHandlerActivated(array $record) + { + return $record['level'] >= $this->actionLevel; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossedHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossedHandler.php new file mode 100644 index 0000000..d1dcaac --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossedHandler.php @@ -0,0 +1,163 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Handler\FingersCrossed\ErrorLevelActivationStrategy; +use Monolog\Handler\FingersCrossed\ActivationStrategyInterface; +use Monolog\Logger; + +/** + * Buffers all records until a certain level is reached + * + * The advantage of this approach is that you don't get any clutter in your log files. + * Only requests which actually trigger an error (or whatever your actionLevel is) will be + * in the logs, but they will contain all records, not only those above the level threshold. + * + * You can find the various activation strategies in the + * Monolog\Handler\FingersCrossed\ namespace. + * + * @author Jordi Boggiano + */ +class FingersCrossedHandler extends AbstractHandler +{ + protected $handler; + protected $activationStrategy; + protected $buffering = true; + protected $bufferSize; + protected $buffer = array(); + protected $stopBuffering; + protected $passthruLevel; + + /** + * @param callable|HandlerInterface $handler Handler or factory callable($record, $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 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) + { + if (null === $activationStrategy) { + $activationStrategy = new ErrorLevelActivationStrategy(Logger::WARNING); + } + + // convert simple int activationStrategy to an object + if (!$activationStrategy instanceof ActivationStrategyInterface) { + $activationStrategy = new ErrorLevelActivationStrategy($activationStrategy); + } + + $this->handler = $handler; + $this->activationStrategy = $activationStrategy; + $this->bufferSize = $bufferSize; + $this->bubble = $bubble; + $this->stopBuffering = $stopBuffering; + + if ($passthruLevel !== null) { + $this->passthruLevel = Logger::toMonologLevel($passthruLevel); + } + + if (!$this->handler instanceof HandlerInterface && !is_callable($this->handler)) { + throw new \RuntimeException("The given handler (".json_encode($this->handler).") is not a callable nor a Monolog\Handler\HandlerInterface object"); + } + } + + /** + * {@inheritdoc} + */ + public function isHandling(array $record) + { + return true; + } + + /** + * Manually activate this logger regardless of the activation strategy + */ + public function activate() + { + 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->buffer = array(); + } + + /** + * {@inheritdoc} + */ + public function handle(array $record) + { + if ($this->processors) { + foreach ($this->processors as $processor) { + $record = call_user_func($processor, $record); + } + } + + if ($this->buffering) { + $this->buffer[] = $record; + if ($this->bufferSize > 0 && count($this->buffer) > $this->bufferSize) { + array_shift($this->buffer); + } + if ($this->activationStrategy->isHandlerActivated($record)) { + $this->activate(); + } + } else { + $this->handler->handle($record); + } + + return false === $this->bubble; + } + + /** + * {@inheritdoc} + */ + 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(); + } + } + } + + /** + * Resets the state of the handler. Stops forwarding records to the wrapped handler. + */ + public function reset() + { + $this->buffering = true; + } + + /** + * Clears the buffer without flushing any messages down to the wrapped handler. + * + * It also resets the handler to its initial buffering state. + */ + public function clear() + { + $this->buffer = array(); + $this->reset(); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FirePHPHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/FirePHPHandler.php new file mode 100644 index 0000000..fee4795 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/FirePHPHandler.php @@ -0,0 +1,195 @@ + + * + * 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\WildfireFormatter; + +/** + * Simple FirePHP Handler (http://www.firephp.org/), which uses the Wildfire protocol. + * + * @author Eric Clemmons (@ericclemmons) + */ +class FirePHPHandler extends AbstractProcessingHandler +{ + /** + * WildFire JSON header message format + */ + const PROTOCOL_URI = 'http://meta.wildfirehq.org/Protocol/JsonStream/0.2'; + + /** + * FirePHP structure for parsing messages & their presentation + */ + const STRUCTURE_URI = 'http://meta.firephp.org/Wildfire/Structure/FirePHP/FirebugConsole/0.1'; + + /** + * Must reference a "known" plugin, otherwise headers won't display in FirePHP + */ + const PLUGIN_URI = 'http://meta.firephp.org/Wildfire/Plugin/FirePHP/Library-FirePHPCore/0.3'; + + /** + * Header prefix for Wildfire to recognize & parse headers + */ + const HEADER_PREFIX = 'X-Wf'; + + /** + * Whether or not Wildfire vendor-specific headers have been generated & sent yet + */ + protected static $initialized = false; + + /** + * Shared static message index between potentially multiple handlers + * @var int + */ + protected static $messageIndex = 1; + + protected static $sendHeaders = true; + + /** + * Base header creation function used by init headers & record headers + * + * @param array $meta Wildfire Plugin, Protocol & Structure Indexes + * @param string $message Log message + * @return array Complete header string ready for the client as key and message as value + */ + protected function createHeader(array $meta, $message) + { + $header = sprintf('%s-%s', self::HEADER_PREFIX, join('-', $meta)); + + return array($header => $message); + } + + /** + * Creates message header from record + * + * @see createHeader() + * @param array $record + * @return string + */ + protected function createRecordHeader(array $record) + { + // Wildfire is extensible to support multiple protocols & plugins in a single request, + // but we're not taking advantage of that (yet), so we're using "1" for simplicity's sake. + return $this->createHeader( + array(1, 1, 1, self::$messageIndex++), + $record['formatted'] + ); + } + + /** + * {@inheritDoc} + */ + protected function getDefaultFormatter() + { + return new WildfireFormatter(); + } + + /** + * Wildfire initialization headers to enable message parsing + * + * @see createHeader() + * @see sendHeader() + * @return array + */ + protected function getInitHeaders() + { + // Initial payload consists of required headers for Wildfire + return array_merge( + $this->createHeader(array('Protocol', 1), self::PROTOCOL_URI), + $this->createHeader(array(1, 'Structure', 1), self::STRUCTURE_URI), + $this->createHeader(array(1, 'Plugin', 1), self::PLUGIN_URI) + ); + } + + /** + * Send header string to the client + * + * @param string $header + * @param string $content + */ + protected function sendHeader($header, $content) + { + if (!headers_sent() && self::$sendHeaders) { + header(sprintf('%s: %s', $header, $content)); + } + } + + /** + * Creates & sends header for a record, ensuring init headers have been sent prior + * + * @see sendHeader() + * @see sendInitHeaders() + * @param array $record + */ + protected function write(array $record) + { + if (!self::$sendHeaders) { + return; + } + + // WildFire-specific headers must be sent prior to any messages + if (!self::$initialized) { + self::$initialized = true; + + self::$sendHeaders = $this->headersAccepted(); + if (!self::$sendHeaders) { + return; + } + + foreach ($this->getInitHeaders() as $header => $content) { + $this->sendHeader($header, $content); + } + } + + $header = $this->createRecordHeader($record); + if (trim(current($header)) !== '') { + $this->sendHeader(key($header), current($header)); + } + } + + /** + * Verifies if the headers are accepted by the current user agent + * + * @return Boolean + */ + protected function headersAccepted() + { + if (!empty($_SERVER['HTTP_USER_AGENT']) && preg_match('{\bFirePHP/\d+\.\d+\b}', $_SERVER['HTTP_USER_AGENT'])) { + return true; + } + + return isset($_SERVER['HTTP_X_FIREPHP_VERSION']); + } + + /** + * BC getter for the sendHeaders property that has been made static + */ + public function __get($property) + { + if ('sendHeaders' !== $property) { + throw new \InvalidArgumentException('Undefined property '.$property); + } + + return static::$sendHeaders; + } + + /** + * BC setter for the sendHeaders property that has been made static + */ + public function __set($property, $value) + { + if ('sendHeaders' !== $property) { + throw new \InvalidArgumentException('Undefined property '.$property); + } + + static::$sendHeaders = $value; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FleepHookHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/FleepHookHandler.php new file mode 100644 index 0000000..c43c013 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/FleepHookHandler.php @@ -0,0 +1,126 @@ + + * + * 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; + +/** + * Sends logs to Fleep.io using Webhook integrations + * + * You'll need a Fleep.io account to use this handler. + * + * @see https://fleep.io/integrations/webhooks/ Fleep Webhooks Documentation + * @author Ando Roots + */ +class FleepHookHandler extends SocketHandler +{ + const FLEEP_HOST = 'fleep.io'; + + const FLEEP_HOOK_URI = '/hook/'; + + /** + * @var string Webhook token (specifies the conversation where logs are sent) + */ + protected $token; + + /** + * Construct a new Fleep.io Handler. + * + * For instructions on how to create a new web hook in your conversations + * see https://fleep.io/integrations/webhooks/ + * + * @param string $token Webhook token + * @param bool|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 + * @throws MissingExtensionException + */ + public function __construct($token, $level = Logger::DEBUG, $bubble = true) + { + if (!extension_loaded('openssl')) { + throw new MissingExtensionException('The OpenSSL PHP extension is required to use the FleepHookHandler'); + } + + $this->token = $token; + + $connectionString = 'ssl://' . self::FLEEP_HOST . ':443'; + parent::__construct($connectionString, $level, $bubble); + } + + /** + * Returns the default formatter to use with this handler + * + * Overloaded to remove empty context and extra arrays from the end of the log message. + * + * @return LineFormatter + */ + protected function getDefaultFormatter() + { + return new LineFormatter(null, null, true, true); + } + + /** + * Handles a log record + * + * @param array $record + */ + public function write(array $record) + { + parent::write($record); + $this->closeSocket(); + } + + /** + * {@inheritdoc} + * + * @param array $record + * @return string + */ + protected function generateDataStream($record) + { + $content = $this->buildContent($record); + + return $this->buildHeader($content) . $content; + } + + /** + * Builds the header of the API Call + * + * @param string $content + * @return string + */ + private function buildHeader($content) + { + $header = "POST " . self::FLEEP_HOOK_URI . $this->token . " HTTP/1.1\r\n"; + $header .= "Host: " . self::FLEEP_HOST . "\r\n"; + $header .= "Content-Type: application/x-www-form-urlencoded\r\n"; + $header .= "Content-Length: " . strlen($content) . "\r\n"; + $header .= "\r\n"; + + return $header; + } + + /** + * Builds the body of API call + * + * @param array $record + * @return string + */ + private function buildContent($record) + { + $dataArray = array( + 'message' => $record['formatted'], + ); + + return http_build_query($dataArray); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FlowdockHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/FlowdockHandler.php new file mode 100644 index 0000000..dd9a361 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/FlowdockHandler.php @@ -0,0 +1,127 @@ + + * + * 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\Formatter\FlowdockFormatter; +use Monolog\Formatter\FormatterInterface; + +/** + * Sends notifications through the Flowdock push API + * + * This must be configured with a FlowdockFormatter instance via setFormatter() + * + * Notes: + * API token - Flowdock API token + * + * @author Dominik Liebler + * @see https://www.flowdock.com/api/push + */ +class FlowdockHandler extends SocketHandler +{ + /** + * @var string + */ + protected $apiToken; + + /** + * @param string $apiToken + * @param bool|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 + * + * @throws MissingExtensionException if OpenSSL is missing + */ + public function __construct($apiToken, $level = Logger::DEBUG, $bubble = true) + { + if (!extension_loaded('openssl')) { + throw new MissingExtensionException('The OpenSSL PHP extension is required to use the FlowdockHandler'); + } + + parent::__construct('ssl://api.flowdock.com:443', $level, $bubble); + $this->apiToken = $apiToken; + } + + /** + * {@inheritdoc} + */ + public function setFormatter(FormatterInterface $formatter) + { + if (!$formatter instanceof FlowdockFormatter) { + throw new \InvalidArgumentException('The FlowdockHandler requires an instance of Monolog\Formatter\FlowdockFormatter to function correctly'); + } + + return parent::setFormatter($formatter); + } + + /** + * Gets the default formatter. + * + * @return FormatterInterface + */ + protected function getDefaultFormatter() + { + throw new \InvalidArgumentException('The FlowdockHandler must be configured (via setFormatter) with an instance of Monolog\Formatter\FlowdockFormatter to function correctly'); + } + + /** + * {@inheritdoc} + * + * @param array $record + */ + protected function write(array $record) + { + parent::write($record); + + $this->closeSocket(); + } + + /** + * {@inheritdoc} + * + * @param array $record + * @return string + */ + protected function generateDataStream($record) + { + $content = $this->buildContent($record); + + return $this->buildHeader($content) . $content; + } + + /** + * Builds the body of API call + * + * @param array $record + * @return string + */ + private function buildContent($record) + { + return json_encode($record['formatted']['flowdock']); + } + + /** + * Builds the header of the API Call + * + * @param string $content + * @return string + */ + private function buildHeader($content) + { + $header = "POST /v1/messages/team_inbox/" . $this->apiToken . " HTTP/1.1\r\n"; + $header .= "Host: api.flowdock.com\r\n"; + $header .= "Content-Type: application/json\r\n"; + $header .= "Content-Length: " . strlen($content) . "\r\n"; + $header .= "\r\n"; + + return $header; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/GelfHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/GelfHandler.php new file mode 100644 index 0000000..d3847d8 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/GelfHandler.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 Gelf\IMessagePublisher; +use Gelf\PublisherInterface; +use Gelf\Publisher; +use InvalidArgumentException; +use Monolog\Logger; +use Monolog\Formatter\GelfMessageFormatter; + +/** + * Handler to send messages to a Graylog2 (http://www.graylog2.org) server + * + * @author Matt Lehner + * @author Benjamin Zikarsky + */ +class GelfHandler extends AbstractProcessingHandler +{ + /** + * @var Publisher the publisher object that sends the message to the server + */ + protected $publisher; + + /** + * @param PublisherInterface|IMessagePublisher|Publisher $publisher a publisher object + * @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($publisher, $level = Logger::DEBUG, $bubble = true) + { + parent::__construct($level, $bubble); + + if (!$publisher instanceof Publisher && !$publisher instanceof IMessagePublisher && !$publisher instanceof PublisherInterface) { + throw new InvalidArgumentException('Invalid publisher, expected a Gelf\Publisher, Gelf\IMessagePublisher or Gelf\PublisherInterface instance'); + } + + $this->publisher = $publisher; + } + + /** + * {@inheritdoc} + */ + public function close() + { + $this->publisher = null; + } + + /** + * {@inheritdoc} + */ + protected function write(array $record) + { + $this->publisher->publish($record['formatted']); + } + + /** + * {@inheritDoc} + */ + protected function getDefaultFormatter() + { + return new GelfMessageFormatter(); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/GroupHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/GroupHandler.php new file mode 100644 index 0000000..663f5a9 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/GroupHandler.php @@ -0,0 +1,104 @@ + + * + * 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; + +/** + * Forwards records to multiple handlers + * + * @author Lenar Lõhmus + */ +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 + */ + public function __construct(array $handlers, $bubble = true) + { + foreach ($handlers as $handler) { + if (!$handler instanceof HandlerInterface) { + throw new \InvalidArgumentException('The first argument of the GroupHandler must be an array of HandlerInterface instances.'); + } + } + + $this->handlers = $handlers; + $this->bubble = $bubble; + } + + /** + * {@inheritdoc} + */ + public function isHandling(array $record) + { + foreach ($this->handlers as $handler) { + if ($handler->isHandling($record)) { + return true; + } + } + + return false; + } + + /** + * {@inheritdoc} + */ + public function handle(array $record) + { + if ($this->processors) { + foreach ($this->processors as $processor) { + $record = call_user_func($processor, $record); + } + } + + foreach ($this->handlers as $handler) { + $handler->handle($record); + } + + return false === $this->bubble; + } + + /** + * {@inheritdoc} + */ + public function handleBatch(array $records) + { + if ($this->processors) { + $processed = array(); + foreach ($records as $record) { + foreach ($this->processors as $processor) { + $processed[] = call_user_func($processor, $record); + } + } + $records = $processed; + } + + foreach ($this->handlers as $handler) { + $handler->handleBatch($records); + } + } + + /** + * {@inheritdoc} + */ + public function setFormatter(FormatterInterface $formatter) + { + foreach ($this->handlers as $handler) { + $handler->setFormatter($formatter); + } + + return $this; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/HandlerInterface.php b/vendor/monolog/monolog/src/Monolog/Handler/HandlerInterface.php new file mode 100644 index 0000000..d920c4b --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/HandlerInterface.php @@ -0,0 +1,90 @@ + + * + * 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 that all Monolog Handlers must implement + * + * @author Jordi Boggiano + */ +interface HandlerInterface +{ + /** + * Checks whether the given record will be handled by this handler. + * + * This is mostly done for performance reasons, to avoid calling processors for nothing. + * + * Handlers should still check the record levels within handle(), returning false in isHandling() + * is no guarantee that handle() will not be called, and isHandling() might not be called + * for a given record. + * + * @param array $record Partial log record containing only a level key + * + * @return Boolean + */ + public function isHandling(array $record); + + /** + * Handles a record. + * + * All records may be passed to this method, and the handler should discard + * those that it does not want to handle. + * + * The return value of this function controls the bubbling process of the handler stack. + * Unless the bubbling is interrupted (by returning true), the Logger class will keep on + * 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. + * false means the record was either not processed or that this handler allows bubbling. + */ + public function handle(array $record); + + /** + * Handles a set of records at once. + * + * @param array $records The records to handle (an array of record arrays) + */ + public function handleBatch(array $records); + + /** + * Adds a processor in the stack. + * + * @param callable $callback + * @return self + */ + public function pushProcessor($callback); + + /** + * Removes the processor on top of the stack and returns it. + * + * @return callable + */ + public function popProcessor(); + + /** + * Sets the formatter. + * + * @param FormatterInterface $formatter + * @return self + */ + public function setFormatter(FormatterInterface $formatter); + + /** + * Gets the formatter. + * + * @return FormatterInterface + */ + public function getFormatter(); +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/HandlerWrapper.php b/vendor/monolog/monolog/src/Monolog/Handler/HandlerWrapper.php new file mode 100644 index 0000000..56bc270 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/HandlerWrapper.php @@ -0,0 +1,106 @@ + + * + * 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; + +/** + * This simple wrapper class can be used to extend handlers functionality. + * + * Example: A filtering handle. Inherit from this class, override isHandling() like this + * + * public function isHandling(array $record) + * { + * if ($record meets certain conditions) { + * return false; + * } + * return $this->handler->isHandling($record); + * } + * + * @author Alexey Karapetov + */ +class HandlerWrapper implements HandlerInterface +{ + /** + * @var HandlerInterface + */ + protected $handler; + + /** + * HandlerWrapper constructor. + * @param HandlerInterface $handler + */ + public function __construct(HandlerInterface $handler) + { + $this->handler = $handler; + } + + /** + * {@inheritdoc} + */ + public function isHandling(array $record) + { + return $this->handler->isHandling($record); + } + + /** + * {@inheritdoc} + */ + public function handle(array $record) + { + return $this->handler->handle($record); + } + + /** + * {@inheritdoc} + */ + public function handleBatch(array $records) + { + return $this->handler->handleBatch($records); + } + + /** + * {@inheritdoc} + */ + public function pushProcessor($callback) + { + $this->handler->pushProcessor($callback); + + return $this; + } + + /** + * {@inheritdoc} + */ + public function popProcessor() + { + return $this->handler->popProcessor(); + } + + /** + * {@inheritdoc} + */ + public function setFormatter(FormatterInterface $formatter) + { + $this->handler->setFormatter($formatter); + + return $this; + } + + /** + * {@inheritdoc} + */ + public function getFormatter() + { + return $this->handler->getFormatter(); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/HipChatHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/HipChatHandler.php new file mode 100644 index 0000000..73049f3 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/HipChatHandler.php @@ -0,0 +1,350 @@ + + * + * 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; + +/** + * Sends notifications through the hipchat api to a hipchat room + * + * Notes: + * API token - HipChat API token + * Room - HipChat Room Id or name, where messages are sent + * Name - Name used to send the message (from) + * notify - Should the message trigger a notification in the clients + * version - The API version to use (HipChatHandler::API_V1 | HipChatHandler::API_V2) + * + * @author Rafael Dohms + * @see https://www.hipchat.com/docs/api + */ +class HipChatHandler extends SocketHandler +{ + /** + * Use API version 1 + */ + const API_V1 = 'v1'; + + /** + * Use API version v2 + */ + const API_V2 = 'v2'; + + /** + * The maximum allowed length for the name used in the "from" field. + */ + const MAXIMUM_NAME_LENGTH = 15; + + /** + * The maximum allowed length for the message. + */ + const MAXIMUM_MESSAGE_LENGTH = 9500; + + /** + * @var string + */ + private $token; + + /** + * @var string + */ + private $room; + + /** + * @var string + */ + private $name; + + /** + * @var bool + */ + private $notify; + + /** + * @var string + */ + private $format; + + /** + * @var string + */ + private $host; + + /** + * @var string + */ + private $version; + + /** + * @param string $token HipChat API Token + * @param string $room The room that should be alerted of the message (Id or Name) + * @param string $name Name used in the "from" field. + * @param bool $notify Trigger a notification in clients 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 + * @param bool $useSSL Whether to connect via SSL. + * @param string $format The format of the messages (default to text, can be set to html if you have html in the messages) + * @param string $host The HipChat server hostname. + * @param string $version The HipChat API version (default HipChatHandler::API_V1) + */ + 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) + { + 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.'); + } + + $connectionString = $useSSL ? 'ssl://'.$host.':443' : $host.':80'; + parent::__construct($connectionString, $level, $bubble); + + $this->token = $token; + $this->name = $name; + $this->notify = $notify; + $this->room = $room; + $this->format = $format; + $this->host = $host; + $this->version = $version; + } + + /** + * {@inheritdoc} + * + * @param array $record + * @return string + */ + protected function generateDataStream($record) + { + $content = $this->buildContent($record); + + return $this->buildHeader($content) . $content; + } + + /** + * Builds the body of API call + * + * @param array $record + * @return string + */ + private function buildContent($record) + { + $dataArray = array( + 'notify' => $this->version == self::API_V1 ? + ($this->notify ? 1 : 0) : + ($this->notify ? 'true' : 'false'), + 'message' => $record['formatted'], + 'message_format' => $this->format, + 'color' => $this->getAlertColor($record['level']), + ); + + if (!$this->validateStringLength($dataArray['message'], static::MAXIMUM_MESSAGE_LENGTH)) { + if (function_exists('mb_substr')) { + $dataArray['message'] = mb_substr($dataArray['message'], 0, static::MAXIMUM_MESSAGE_LENGTH).' [truncated]'; + } else { + $dataArray['message'] = substr($dataArray['message'], 0, static::MAXIMUM_MESSAGE_LENGTH).' [truncated]'; + } + } + + // if we are using the legacy API then we need to send some additional information + if ($this->version == self::API_V1) { + $dataArray['room_id'] = $this->room; + } + + // append the sender name if it is set + // always append it if we use the v1 api (it is required in v1) + if ($this->version == self::API_V1 || $this->name !== null) { + $dataArray['from'] = (string) $this->name; + } + + return http_build_query($dataArray); + } + + /** + * Builds the header of the API Call + * + * @param string $content + * @return string + */ + private function buildHeader($content) + { + if ($this->version == self::API_V1) { + $header = "POST /v1/rooms/message?format=json&auth_token={$this->token} HTTP/1.1\r\n"; + } else { + // needed for rooms with special (spaces, etc) characters in the name + $room = rawurlencode($this->room); + $header = "POST /v2/room/{$room}/notification?auth_token={$this->token} HTTP/1.1\r\n"; + } + + $header .= "Host: {$this->host}\r\n"; + $header .= "Content-Type: application/x-www-form-urlencoded\r\n"; + $header .= "Content-Length: " . strlen($content) . "\r\n"; + $header .= "\r\n"; + + return $header; + } + + /** + * Assigns a color to each level of log records. + * + * @param int $level + * @return string + */ + protected function getAlertColor($level) + { + switch (true) { + case $level >= Logger::ERROR: + return 'red'; + case $level >= Logger::WARNING: + return 'yellow'; + case $level >= Logger::INFO: + return 'green'; + case $level == Logger::DEBUG: + return 'gray'; + default: + return 'yellow'; + } + } + + /** + * {@inheritdoc} + * + * @param array $record + */ + protected function write(array $record) + { + parent::write($record); + $this->closeSocket(); + } + + /** + * {@inheritdoc} + */ + public function handleBatch(array $records) + { + if (count($records) == 0) { + return true; + } + + $batchRecords = $this->combineRecords($records); + + $handled = false; + foreach ($batchRecords as $batchRecord) { + if ($this->isHandling($batchRecord)) { + $this->write($batchRecord); + $handled = true; + } + } + + if (!$handled) { + return false; + } + + return false === $this->bubble; + } + + /** + * Combines multiple records into one. Error level of the combined record + * will be the highest level from the given records. Datetime will be taken + * from the first record. + * + * @param $records + * @return array + */ + private function combineRecords($records) + { + $batchRecord = null; + $batchRecords = array(); + $messages = array(); + $formattedMessages = array(); + $level = 0; + $levelName = null; + $datetime = null; + + foreach ($records as $record) { + $record = $this->processRecord($record); + + if ($record['level'] > $level) { + $level = $record['level']; + $levelName = $record['level_name']; + } + + if (null === $datetime) { + $datetime = $record['datetime']; + } + + $messages[] = $record['message']; + $messageStr = implode(PHP_EOL, $messages); + $formattedMessages[] = $this->getFormatter()->format($record); + $formattedMessageStr = implode('', $formattedMessages); + + $batchRecord = array( + 'message' => $messageStr, + 'formatted' => $formattedMessageStr, + 'context' => array(), + 'extra' => array(), + ); + + if (!$this->validateStringLength($batchRecord['formatted'], static::MAXIMUM_MESSAGE_LENGTH)) { + // Pop the last message and implode the remaining messages + $lastMessage = array_pop($messages); + $lastFormattedMessage = array_pop($formattedMessages); + $batchRecord['message'] = implode(PHP_EOL, $messages); + $batchRecord['formatted'] = implode('', $formattedMessages); + + $batchRecords[] = $batchRecord; + $messages = array($lastMessage); + $formattedMessages = array($lastFormattedMessage); + + $batchRecord = null; + } + } + + if (null !== $batchRecord) { + $batchRecords[] = $batchRecord; + } + + // Set the max level and datetime for all records + foreach ($batchRecords as &$batchRecord) { + $batchRecord = array_merge( + $batchRecord, + array( + 'level' => $level, + 'level_name' => $levelName, + 'datetime' => $datetime, + ) + ); + } + + return $batchRecords; + } + + /** + * Validates the length of a string. + * + * If the `mb_strlen()` function is available, it will use that, as HipChat + * allows UTF-8 characters. Otherwise, it will fall back to `strlen()`. + * + * Note that this might cause false failures in the specific case of using + * a valid name with less than 16 characters, but 16 or more bytes, on a + * system where `mb_strlen()` is unavailable. + * + * @param string $str + * @param int $length + * + * @return bool + */ + private function validateStringLength($str, $length) + { + if (function_exists('mb_strlen')) { + return (mb_strlen($str) <= $length); + } + + return (strlen($str) <= $length); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/IFTTTHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/IFTTTHandler.php new file mode 100644 index 0000000..d60a3c8 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/IFTTTHandler.php @@ -0,0 +1,69 @@ + + * + * 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; + +/** + * IFTTTHandler uses cURL to trigger IFTTT Maker actions + * + * Register a secret key and trigger/event name at https://ifttt.com/maker + * + * value1 will be the channel from monolog's Logger constructor, + * value2 will be the level name (ERROR, WARNING, ..) + * value3 will be the log record's message + * + * @author Nehal Patel + */ +class IFTTTHandler extends AbstractProcessingHandler +{ + private $eventName; + 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 + */ + public function __construct($eventName, $secretKey, $level = Logger::ERROR, $bubble = true) + { + $this->eventName = $eventName; + $this->secretKey = $secretKey; + + parent::__construct($level, $bubble); + } + + /** + * {@inheritdoc} + */ + public function write(array $record) + { + $postData = array( + "value1" => $record["channel"], + "value2" => $record["level_name"], + "value3" => $record["message"], + ); + $postString = json_encode($postData); + + $ch = curl_init(); + curl_setopt($ch, CURLOPT_URL, "https://maker.ifttt.com/trigger/" . $this->eventName . "/with/key/" . $this->secretKey); + curl_setopt($ch, CURLOPT_POST, true); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_POSTFIELDS, $postString); + curl_setopt($ch, CURLOPT_HTTPHEADER, array( + "Content-Type: application/json", + )); + + Curl\Util::execute($ch); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/LogEntriesHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/LogEntriesHandler.php new file mode 100644 index 0000000..494c605 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/LogEntriesHandler.php @@ -0,0 +1,55 @@ + + * + * 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; + +/** + * @author Robert Kaufmann III + */ +class LogEntriesHandler extends SocketHandler +{ + /** + * @var string + */ + protected $logToken; + + /** + * @param string $token Log token supplied by LogEntries + * @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, $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 LogEntriesHandler'); + } + + $endpoint = $useSSL ? 'ssl://data.logentries.com:443' : 'data.logentries.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/vendor/monolog/monolog/src/Monolog/Handler/LogglyHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/LogglyHandler.php new file mode 100644 index 0000000..bcd62e1 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/LogglyHandler.php @@ -0,0 +1,102 @@ + + * + * 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\Formatter\LogglyFormatter; + +/** + * Sends errors to Loggly. + * + * @author Przemek Sobstel + * @author Adam Pancutt + * @author Gregory Barchard + */ +class LogglyHandler extends AbstractProcessingHandler +{ + const HOST = 'logs-01.loggly.com'; + const ENDPOINT_SINGLE = 'inputs'; + const ENDPOINT_BATCH = 'bulk'; + + protected $token; + + protected $tag = array(); + + public function __construct($token, $level = Logger::DEBUG, $bubble = true) + { + if (!extension_loaded('curl')) { + throw new \LogicException('The curl extension is needed to use the LogglyHandler'); + } + + $this->token = $token; + + parent::__construct($level, $bubble); + } + + public function setTag($tag) + { + $tag = !empty($tag) ? $tag : array(); + $this->tag = is_array($tag) ? $tag : array($tag); + } + + public function addTag($tag) + { + if (!empty($tag)) { + $tag = is_array($tag) ? $tag : array($tag); + $this->tag = array_unique(array_merge($this->tag, $tag)); + } + } + + protected function write(array $record) + { + $this->send($record["formatted"], self::ENDPOINT_SINGLE); + } + + public function handleBatch(array $records) + { + $level = $this->level; + + $records = array_filter($records, function ($record) use ($level) { + return ($record['level'] >= $level); + }); + + if ($records) { + $this->send($this->getFormatter()->formatBatch($records), self::ENDPOINT_BATCH); + } + } + + protected function send($data, $endpoint) + { + $url = sprintf("https://%s/%s/%s/", self::HOST, $endpoint, $this->token); + + $headers = array('Content-Type: application/json'); + + if (!empty($this->tag)) { + $headers[] = 'X-LOGGLY-TAG: '.implode(',', $this->tag); + } + + $ch = curl_init(); + + curl_setopt($ch, CURLOPT_URL, $url); + curl_setopt($ch, CURLOPT_POST, true); + curl_setopt($ch, CURLOPT_POSTFIELDS, $data); + curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + + Curl\Util::execute($ch); + } + + protected function getDefaultFormatter() + { + return new LogglyFormatter(); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/MailHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/MailHandler.php new file mode 100644 index 0000000..9e23283 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/MailHandler.php @@ -0,0 +1,67 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +/** + * Base class for all mail handlers + * + * @author Gyula Sallai + */ +abstract class MailHandler extends AbstractProcessingHandler +{ + /** + * {@inheritdoc} + */ + public function handleBatch(array $records) + { + $messages = array(); + + foreach ($records as $record) { + if ($record['level'] < $this->level) { + continue; + } + $messages[] = $this->processRecord($record); + } + + if (!empty($messages)) { + $this->send((string) $this->getFormatter()->formatBatch($messages), $messages); + } + } + + /** + * Send a mail with the given content + * + * @param string $content formatted email body to be sent + * @param array $records the array of log records that formed this content + */ + abstract protected function send($content, array $records); + + /** + * {@inheritdoc} + */ + protected function write(array $record) + { + $this->send((string) $record['formatted'], array($record)); + } + + protected function getHighestRecord(array $records) + { + $highestRecord = null; + foreach ($records as $record) { + if ($highestRecord === null || $highestRecord['level'] < $record['level']) { + $highestRecord = $record; + } + } + + return $highestRecord; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/MandrillHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/MandrillHandler.php new file mode 100644 index 0000000..ab95924 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/MandrillHandler.php @@ -0,0 +1,68 @@ + + * + * 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; + +/** + * MandrillHandler uses cURL to send the emails to the Mandrill API + * + * @author Adam Nicholson + */ +class MandrillHandler extends MailHandler +{ + protected $message; + protected $apiKey; + + /** + * @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 + */ + public function __construct($apiKey, $message, $level = Logger::ERROR, $bubble = true) + { + parent::__construct($level, $bubble); + + if (!$message instanceof \Swift_Message && is_callable($message)) { + $message = call_user_func($message); + } + if (!$message instanceof \Swift_Message) { + throw new \InvalidArgumentException('You must provide either a Swift_Message instance or a callable returning it'); + } + $this->message = $message; + $this->apiKey = $apiKey; + } + + /** + * {@inheritdoc} + */ + protected function send($content, array $records) + { + $message = clone $this->message; + $message->setBody($content); + $message->setDate(time()); + + $ch = curl_init(); + + curl_setopt($ch, CURLOPT_URL, 'https://mandrillapp.com/api/1.0/messages/send-raw.json'); + curl_setopt($ch, CURLOPT_POST, 1); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query(array( + 'key' => $this->apiKey, + 'raw_message' => (string) $message, + 'async' => false, + ))); + + Curl\Util::execute($ch); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/MissingExtensionException.php b/vendor/monolog/monolog/src/Monolog/Handler/MissingExtensionException.php new file mode 100644 index 0000000..4724a7e --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/MissingExtensionException.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +/** + * Exception can be thrown if an extension for an handler is missing + * + * @author Christian Bergau + */ +class MissingExtensionException extends \Exception +{ +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/MongoDBHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/MongoDBHandler.php new file mode 100644 index 0000000..56fe755 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/MongoDBHandler.php @@ -0,0 +1,59 @@ + + * + * 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\Formatter\NormalizerFormatter; + +/** + * Logs to a MongoDB database. + * + * usage example: + * + * $log = new Logger('application'); + * $mongodb = new MongoDBHandler(new \Mongo("mongodb://localhost:27017"), "logs", "prod"); + * $log->pushHandler($mongodb); + * + * @author Thomas Tourlourat + */ +class MongoDBHandler extends AbstractProcessingHandler +{ + protected $mongoCollection; + + public function __construct($mongo, $database, $collection, $level = Logger::DEBUG, $bubble = true) + { + if (!($mongo instanceof \MongoClient || $mongo instanceof \Mongo || $mongo instanceof \MongoDB\Client)) { + throw new \InvalidArgumentException('MongoClient, Mongo or MongoDB\Client instance required'); + } + + $this->mongoCollection = $mongo->selectCollection($database, $collection); + + parent::__construct($level, $bubble); + } + + protected function write(array $record) + { + if ($this->mongoCollection instanceof \MongoDB\Collection) { + $this->mongoCollection->insertOne($record["formatted"]); + } else { + $this->mongoCollection->save($record["formatted"]); + } + } + + /** + * {@inheritDoc} + */ + protected function getDefaultFormatter() + { + return new NormalizerFormatter(); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/NativeMailerHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/NativeMailerHandler.php new file mode 100644 index 0000000..d7807fd --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/NativeMailerHandler.php @@ -0,0 +1,185 @@ + + * + * 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\Formatter\LineFormatter; + +/** + * NativeMailerHandler uses the mail() function to send the emails + * + * @author Christophe Coevoet + * @author Mark Garrett + */ +class NativeMailerHandler extends MailHandler +{ + /** + * The email addresses to which the message will be sent + * @var array + */ + protected $to; + + /** + * The subject of the email + * @var string + */ + protected $subject; + + /** + * Optional headers for the message + * @var array + */ + protected $headers = array(); + + /** + * Optional parameters for the message + * @var array + */ + protected $parameters = array(); + + /** + * The wordwrap length for the message + * @var int + */ + protected $maxColumnWidth; + + /** + * The Content-type for the message + * @var string + */ + protected $contentType = 'text/plain'; + + /** + * The encoding for the message + * @var string + */ + protected $encoding = 'utf-8'; + + /** + * @param string|array $to The receiver of the mail + * @param string $subject The subject of the mail + * @param string $from The sender of the mail + * @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 $maxColumnWidth The maximum column width that the message lines will have + */ + public function __construct($to, $subject, $from, $level = Logger::ERROR, $bubble = true, $maxColumnWidth = 70) + { + parent::__construct($level, $bubble); + $this->to = is_array($to) ? $to : array($to); + $this->subject = $subject; + $this->addHeader(sprintf('From: %s', $from)); + $this->maxColumnWidth = $maxColumnWidth; + } + + /** + * Add headers to the message + * + * @param string|array $headers Custom added headers + * @return self + */ + public function addHeader($headers) + { + foreach ((array) $headers as $header) { + if (strpos($header, "\n") !== false || strpos($header, "\r") !== false) { + throw new \InvalidArgumentException('Headers can not contain newline characters for security reasons'); + } + $this->headers[] = $header; + } + + return $this; + } + + /** + * Add parameters to the message + * + * @param string|array $parameters Custom added parameters + * @return self + */ + public function addParameter($parameters) + { + $this->parameters = array_merge($this->parameters, (array) $parameters); + + return $this; + } + + /** + * {@inheritdoc} + */ + protected function send($content, array $records) + { + $content = wordwrap($content, $this->maxColumnWidth); + $headers = ltrim(implode("\r\n", $this->headers) . "\r\n", "\r\n"); + $headers .= 'Content-type: ' . $this->getContentType() . '; charset=' . $this->getEncoding() . "\r\n"; + if ($this->getContentType() == 'text/html' && false === strpos($headers, 'MIME-Version:')) { + $headers .= 'MIME-Version: 1.0' . "\r\n"; + } + + $subject = $this->subject; + if ($records) { + $subjectFormatter = new LineFormatter($this->subject); + $subject = $subjectFormatter->format($this->getHighestRecord($records)); + } + + $parameters = implode(' ', $this->parameters); + foreach ($this->to as $to) { + mail($to, $subject, $content, $headers, $parameters); + } + } + + /** + * @return string $contentType + */ + public function getContentType() + { + return $this->contentType; + } + + /** + * @return string $encoding + */ + public function getEncoding() + { + return $this->encoding; + } + + /** + * @param string $contentType The content type of the email - Defaults to text/plain. Use text/html for HTML + * messages. + * @return self + */ + public function setContentType($contentType) + { + if (strpos($contentType, "\n") !== false || strpos($contentType, "\r") !== false) { + throw new \InvalidArgumentException('The content type can not contain newline characters to prevent email header injection'); + } + + $this->contentType = $contentType; + + return $this; + } + + /** + * @param string $encoding + * @return self + */ + public function setEncoding($encoding) + { + if (strpos($encoding, "\n") !== false || strpos($encoding, "\r") !== false) { + throw new \InvalidArgumentException('The encoding can not contain newline characters to prevent email header injection'); + } + + $this->encoding = $encoding; + + return $this; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/NewRelicHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/NewRelicHandler.php new file mode 100644 index 0000000..6718e9e --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/NewRelicHandler.php @@ -0,0 +1,202 @@ + + * + * 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\Formatter\NormalizerFormatter; + +/** + * Class to record a log on a NewRelic application. + * Enabling New Relic High Security mode may prevent capture of useful information. + * + * @see https://docs.newrelic.com/docs/agents/php-agent + * @see https://docs.newrelic.com/docs/accounts-partnerships/accounts/security/high-security + */ +class NewRelicHandler extends AbstractProcessingHandler +{ + /** + * Name of the New Relic application that will receive logs from this handler. + * + * @var string + */ + protected $appName; + + /** + * Name of the current transaction + * + * @var string + */ + protected $transactionName; + + /** + * Some context and extra data is passed into the handler as arrays of values. Do we send them as is + * (useful if we are using the API), or explode them for display on the NewRelic RPM website? + * + * @var bool + */ + protected $explodeArrays; + + /** + * {@inheritDoc} + * + * @param string $appName + * @param bool $explodeArrays + * @param string $transactionName + */ + public function __construct( + $level = Logger::ERROR, + $bubble = true, + $appName = null, + $explodeArrays = false, + $transactionName = null + ) { + parent::__construct($level, $bubble); + + $this->appName = $appName; + $this->explodeArrays = $explodeArrays; + $this->transactionName = $transactionName; + } + + /** + * {@inheritDoc} + */ + protected function write(array $record) + { + if (!$this->isNewRelicEnabled()) { + throw new MissingExtensionException('The newrelic PHP extension is required to use the NewRelicHandler'); + } + + if ($appName = $this->getAppName($record['context'])) { + $this->setNewRelicAppName($appName); + } + + if ($transactionName = $this->getTransactionName($record['context'])) { + $this->setNewRelicTransactionName($transactionName); + unset($record['formatted']['context']['transaction_name']); + } + + if (isset($record['context']['exception']) && $record['context']['exception'] instanceof \Exception) { + newrelic_notice_error($record['message'], $record['context']['exception']); + unset($record['formatted']['context']['exception']); + } else { + newrelic_notice_error($record['message']); + } + + if (isset($record['formatted']['context']) && is_array($record['formatted']['context'])) { + foreach ($record['formatted']['context'] as $key => $parameter) { + if (is_array($parameter) && $this->explodeArrays) { + foreach ($parameter as $paramKey => $paramValue) { + $this->setNewRelicParameter('context_' . $key . '_' . $paramKey, $paramValue); + } + } else { + $this->setNewRelicParameter('context_' . $key, $parameter); + } + } + } + + if (isset($record['formatted']['extra']) && is_array($record['formatted']['extra'])) { + foreach ($record['formatted']['extra'] as $key => $parameter) { + if (is_array($parameter) && $this->explodeArrays) { + foreach ($parameter as $paramKey => $paramValue) { + $this->setNewRelicParameter('extra_' . $key . '_' . $paramKey, $paramValue); + } + } else { + $this->setNewRelicParameter('extra_' . $key, $parameter); + } + } + } + } + + /** + * Checks whether the NewRelic extension is enabled in the system. + * + * @return bool + */ + protected function isNewRelicEnabled() + { + return extension_loaded('newrelic'); + } + + /** + * Returns the appname where this log should be sent. Each log can override the default appname, set in this + * handler's constructor, by providing the appname in it's context. + * + * @param array $context + * @return null|string + */ + protected function getAppName(array $context) + { + if (isset($context['appname'])) { + return $context['appname']; + } + + return $this->appName; + } + + /** + * Returns the name of the current transaction. Each log can override the default transaction name, set in this + * handler's constructor, by providing the transaction_name in it's context + * + * @param array $context + * + * @return null|string + */ + protected function getTransactionName(array $context) + { + if (isset($context['transaction_name'])) { + return $context['transaction_name']; + } + + return $this->transactionName; + } + + /** + * Sets the NewRelic application that should receive this log. + * + * @param string $appName + */ + protected function setNewRelicAppName($appName) + { + newrelic_set_appname($appName); + } + + /** + * Overwrites the name of the current transaction + * + * @param string $transactionName + */ + protected function setNewRelicTransactionName($transactionName) + { + newrelic_name_transaction($transactionName); + } + + /** + * @param string $key + * @param mixed $value + */ + protected function setNewRelicParameter($key, $value) + { + if (null === $value || is_scalar($value)) { + newrelic_add_custom_parameter($key, $value); + } else { + newrelic_add_custom_parameter($key, @json_encode($value)); + } + } + + /** + * {@inheritDoc} + */ + protected function getDefaultFormatter() + { + return new NormalizerFormatter(); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/NullHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/NullHandler.php new file mode 100644 index 0000000..4b84588 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/NullHandler.php @@ -0,0 +1,45 @@ + + * + * 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; + +/** + * Blackhole + * + * Any record it can handle will be thrown away. This can be used + * to put on top of an existing stack to override it temporarily. + * + * @author Jordi Boggiano + */ +class NullHandler extends AbstractHandler +{ + /** + * @param int $level The minimum logging level at which this handler will be triggered + */ + public function __construct($level = Logger::DEBUG) + { + parent::__construct($level, false); + } + + /** + * {@inheritdoc} + */ + public function handle(array $record) + { + if ($record['level'] < $this->level) { + return false; + } + + return true; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/PHPConsoleHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/PHPConsoleHandler.php new file mode 100644 index 0000000..1f2076a --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/PHPConsoleHandler.php @@ -0,0 +1,242 @@ + + * + * 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\Formatter\LineFormatter; +use Monolog\Logger; +use PhpConsole\Connector; +use PhpConsole\Handler; +use PhpConsole\Helper; + +/** + * Monolog handler for Google Chrome extension "PHP Console" + * + * Display PHP error/debug log messages in Google Chrome console and notification popups, executes PHP code remotely + * + * Usage: + * 1. Install Google Chrome extension https://chrome.google.com/webstore/detail/php-console/nfhmhhlpfleoednkpnnnkolmclajemef + * 2. See overview https://github.com/barbushin/php-console#overview + * 3. Install PHP Console library https://github.com/barbushin/php-console#installation + * 4. Example (result will looks like http://i.hizliresim.com/vg3Pz4.png) + * + * $logger = new \Monolog\Logger('all', array(new \Monolog\Handler\PHPConsoleHandler())); + * \Monolog\ErrorHandler::register($logger); + * echo $undefinedVar; + * $logger->addDebug('SELECT * FROM users', array('db', 'time' => 0.012)); + * PC::debug($_SERVER); // PHP Console debugger for any type of vars + * + * @author Sergey Barbushin https://www.linkedin.com/in/barbushin + */ +class PHPConsoleHandler extends AbstractProcessingHandler +{ + private $options = array( + 'enabled' => true, // bool Is PHP Console server enabled + 'classesPartialsTraceIgnore' => array('Monolog\\'), // array Hide calls of classes started with... + 'debugTagsKeysInContext' => array(0, 'tag'), // bool Is PHP Console server enabled + 'useOwnErrorsHandler' => false, // bool Enable errors handling + 'useOwnExceptionsHandler' => false, // bool Enable exceptions handling + 'sourcesBasePath' => null, // string Base path of all project sources to strip in errors source paths + 'registerHelper' => true, // bool Register PhpConsole\Helper that allows short debug calls like PC::debug($var, 'ta.g.s') + 'serverEncoding' => null, // string|null Server internal encoding + 'headersLimit' => null, // int|null Set headers size limit for your web-server + 'password' => null, // string|null Protect PHP Console connection by password + 'enableSslOnlyMode' => false, // bool Force connection by SSL for clients with PHP Console installed + 'ipMasks' => array(), // array Set IP masks of clients that will be allowed to connect to PHP Console: array('192.168.*.*', '127.0.0.1') + 'enableEvalListener' => false, // bool Enable eval request to be handled by eval dispatcher(if enabled, 'password' option is also required) + 'dumperDetectCallbacks' => false, // bool Convert callback items in dumper vars to (callback SomeClass::someMethod) strings + 'dumperLevelLimit' => 5, // int Maximum dumped vars array or object nested dump level + 'dumperItemsCountLimit' => 100, // int Maximum dumped var same level array items or object properties number + 'dumperItemSizeLimit' => 5000, // int Maximum length of any string or dumped array item + 'dumperDumpSizeLimit' => 500000, // int Maximum approximate size of dumped vars result formatted in JSON + 'detectDumpTraceAndSource' => false, // bool Autodetect and append trace data to debug + 'dataStorage' => null, // PhpConsole\Storage|null Fixes problem with custom $_SESSION handler(see http://goo.gl/Ne8juJ) + ); + + /** @var Connector */ + private $connector; + + /** + * @param array $options See \Monolog\Handler\PHPConsoleHandler::$options for more details + * @param Connector|null $connector Instance of \PhpConsole\Connector class (optional) + * @param int $level + * @param bool $bubble + * @throws Exception + */ + public function __construct(array $options = array(), Connector $connector = null, $level = Logger::DEBUG, $bubble = true) + { + if (!class_exists('PhpConsole\Connector')) { + throw new Exception('PHP Console library not found. See https://github.com/barbushin/php-console#installation'); + } + parent::__construct($level, $bubble); + $this->options = $this->initOptions($options); + $this->connector = $this->initConnector($connector); + } + + private function initOptions(array $options) + { + $wrongOptions = array_diff(array_keys($options), array_keys($this->options)); + if ($wrongOptions) { + throw new Exception('Unknown options: ' . implode(', ', $wrongOptions)); + } + + return array_replace($this->options, $options); + } + + private function initConnector(Connector $connector = null) + { + if (!$connector) { + if ($this->options['dataStorage']) { + Connector::setPostponeStorage($this->options['dataStorage']); + } + $connector = Connector::getInstance(); + } + + if ($this->options['registerHelper'] && !Helper::isRegistered()) { + Helper::register(); + } + + if ($this->options['enabled'] && $connector->isActiveClient()) { + if ($this->options['useOwnErrorsHandler'] || $this->options['useOwnExceptionsHandler']) { + $handler = Handler::getInstance(); + $handler->setHandleErrors($this->options['useOwnErrorsHandler']); + $handler->setHandleExceptions($this->options['useOwnExceptionsHandler']); + $handler->start(); + } + if ($this->options['sourcesBasePath']) { + $connector->setSourcesBasePath($this->options['sourcesBasePath']); + } + if ($this->options['serverEncoding']) { + $connector->setServerEncoding($this->options['serverEncoding']); + } + if ($this->options['password']) { + $connector->setPassword($this->options['password']); + } + if ($this->options['enableSslOnlyMode']) { + $connector->enableSslOnlyMode(); + } + if ($this->options['ipMasks']) { + $connector->setAllowedIpMasks($this->options['ipMasks']); + } + if ($this->options['headersLimit']) { + $connector->setHeadersLimit($this->options['headersLimit']); + } + if ($this->options['detectDumpTraceAndSource']) { + $connector->getDebugDispatcher()->detectTraceAndSource = true; + } + $dumper = $connector->getDumper(); + $dumper->levelLimit = $this->options['dumperLevelLimit']; + $dumper->itemsCountLimit = $this->options['dumperItemsCountLimit']; + $dumper->itemSizeLimit = $this->options['dumperItemSizeLimit']; + $dumper->dumpSizeLimit = $this->options['dumperDumpSizeLimit']; + $dumper->detectCallbacks = $this->options['dumperDetectCallbacks']; + if ($this->options['enableEvalListener']) { + $connector->startEvalRequestsListener(); + } + } + + return $connector; + } + + public function getConnector() + { + return $this->connector; + } + + public function getOptions() + { + return $this->options; + } + + public function handle(array $record) + { + if ($this->options['enabled'] && $this->connector->isActiveClient()) { + return parent::handle($record); + } + + return !$this->bubble; + } + + /** + * Writes the record down to the log of the implementing handler + * + * @param array $record + * @return void + */ + protected function write(array $record) + { + if ($record['level'] < Logger::NOTICE) { + $this->handleDebugRecord($record); + } elseif (isset($record['context']['exception']) && $record['context']['exception'] instanceof Exception) { + $this->handleExceptionRecord($record); + } else { + $this->handleErrorRecord($record); + } + } + + private function handleDebugRecord(array $record) + { + $tags = $this->getRecordTags($record); + $message = $record['message']; + if ($record['context']) { + $message .= ' ' . json_encode($this->connector->getDumper()->dump(array_filter($record['context']))); + } + $this->connector->getDebugDispatcher()->dispatchDebug($message, $tags, $this->options['classesPartialsTraceIgnore']); + } + + private function handleExceptionRecord(array $record) + { + $this->connector->getErrorsDispatcher()->dispatchException($record['context']['exception']); + } + + private function handleErrorRecord(array $record) + { + $context = $record['context']; + + $this->connector->getErrorsDispatcher()->dispatchError( + isset($context['code']) ? $context['code'] : null, + isset($context['message']) ? $context['message'] : $record['message'], + isset($context['file']) ? $context['file'] : null, + isset($context['line']) ? $context['line'] : null, + $this->options['classesPartialsTraceIgnore'] + ); + } + + private function getRecordTags(array &$record) + { + $tags = null; + if (!empty($record['context'])) { + $context = & $record['context']; + foreach ($this->options['debugTagsKeysInContext'] as $key) { + if (!empty($context[$key])) { + $tags = $context[$key]; + if ($key === 0) { + array_shift($context); + } else { + unset($context[$key]); + } + break; + } + } + } + + return $tags ?: strtolower($record['level_name']); + } + + /** + * {@inheritDoc} + */ + protected function getDefaultFormatter() + { + return new LineFormatter('%message%'); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/PsrHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/PsrHandler.php new file mode 100644 index 0000000..1ae8584 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/PsrHandler.php @@ -0,0 +1,56 @@ + + * + * 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 Psr\Log\LoggerInterface; + +/** + * Proxies log messages to an existing PSR-3 compliant logger. + * + * @author Michael Moussa + */ +class PsrHandler extends AbstractHandler +{ + /** + * PSR-3 compliant logger + * + * @var LoggerInterface + */ + protected $logger; + + /** + * @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 + */ + public function __construct(LoggerInterface $logger, $level = Logger::DEBUG, $bubble = true) + { + parent::__construct($level, $bubble); + + $this->logger = $logger; + } + + /** + * {@inheritDoc} + */ + public function handle(array $record) + { + if (!$this->isHandling($record)) { + return false; + } + + $this->logger->log(strtolower($record['level_name']), $record['message'], $record['context']); + + return false === $this->bubble; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/PushoverHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/PushoverHandler.php new file mode 100644 index 0000000..bba7200 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/PushoverHandler.php @@ -0,0 +1,185 @@ + + * + * 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; + +/** + * Sends notifications through the pushover api to mobile phones + * + * @author Sebastian Göttschkes + * @see https://www.pushover.net/api + */ +class PushoverHandler extends SocketHandler +{ + private $token; + private $users; + private $title; + private $user; + private $retry; + private $expire; + + private $highPriorityLevel; + private $emergencyLevel; + private $useFormattedMessage = false; + + /** + * All parameters that can be sent to Pushover + * @see https://pushover.net/api + * @var array + */ + private $parameterNames = array( + 'token' => true, + 'user' => true, + 'message' => true, + 'device' => true, + 'title' => true, + 'url' => true, + 'url_title' => true, + 'priority' => true, + 'timestamp' => true, + 'sound' => true, + 'retry' => true, + 'expire' => true, + 'callback' => true, + ); + + /** + * Sounds the api supports by default + * @see https://pushover.net/api#sounds + * @var array + */ + private $sounds = array( + 'pushover', 'bike', 'bugle', 'cashregister', 'classical', 'cosmic', 'falling', 'gamelan', 'incoming', + 'intermission', 'magic', 'mechanical', 'pianobar', 'siren', 'spacealarm', 'tugboat', 'alien', 'climb', + 'persistent', 'echo', 'updown', 'none', + ); + + /** + * @param string $token Pushover api token + * @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 + * 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 + * @param int $emergencyLevel The minimum logging level at which this handler will start + * sending "emergency" requests to the Pushover API + * @param int $retry The retry parameter specifies how often (in seconds) the Pushover servers will send the same notification to the user. + * @param int $expire The expire parameter specifies how many seconds your notification will continue to be retried for (every retry seconds). + */ + public function __construct($token, $users, $title = null, $level = Logger::CRITICAL, $bubble = true, $useSSL = true, $highPriorityLevel = Logger::CRITICAL, $emergencyLevel = Logger::EMERGENCY, $retry = 30, $expire = 25200) + { + $connectionString = $useSSL ? 'ssl://api.pushover.net:443' : 'api.pushover.net:80'; + parent::__construct($connectionString, $level, $bubble); + + $this->token = $token; + $this->users = (array) $users; + $this->title = $title ?: gethostname(); + $this->highPriorityLevel = Logger::toMonologLevel($highPriorityLevel); + $this->emergencyLevel = Logger::toMonologLevel($emergencyLevel); + $this->retry = $retry; + $this->expire = $expire; + } + + protected function generateDataStream($record) + { + $content = $this->buildContent($record); + + return $this->buildHeader($content) . $content; + } + + private function buildContent($record) + { + // Pushover has a limit of 512 characters on title and message combined. + $maxMessageLength = 512 - strlen($this->title); + + $message = ($this->useFormattedMessage) ? $record['formatted'] : $record['message']; + $message = substr($message, 0, $maxMessageLength); + + $timestamp = $record['datetime']->getTimestamp(); + + $dataArray = array( + 'token' => $this->token, + 'user' => $this->user, + 'message' => $message, + 'title' => $this->title, + 'timestamp' => $timestamp, + ); + + if (isset($record['level']) && $record['level'] >= $this->emergencyLevel) { + $dataArray['priority'] = 2; + $dataArray['retry'] = $this->retry; + $dataArray['expire'] = $this->expire; + } elseif (isset($record['level']) && $record['level'] >= $this->highPriorityLevel) { + $dataArray['priority'] = 1; + } + + // First determine the available parameters + $context = array_intersect_key($record['context'], $this->parameterNames); + $extra = array_intersect_key($record['extra'], $this->parameterNames); + + // Least important info should be merged with subsequent info + $dataArray = array_merge($extra, $context, $dataArray); + + // Only pass sounds that are supported by the API + if (isset($dataArray['sound']) && !in_array($dataArray['sound'], $this->sounds)) { + unset($dataArray['sound']); + } + + return http_build_query($dataArray); + } + + private function buildHeader($content) + { + $header = "POST /1/messages.json HTTP/1.1\r\n"; + $header .= "Host: api.pushover.net\r\n"; + $header .= "Content-Type: application/x-www-form-urlencoded\r\n"; + $header .= "Content-Length: " . strlen($content) . "\r\n"; + $header .= "\r\n"; + + return $header; + } + + protected function write(array $record) + { + foreach ($this->users as $user) { + $this->user = $user; + + parent::write($record); + $this->closeSocket(); + } + + $this->user = null; + } + + public function setHighPriorityLevel($value) + { + $this->highPriorityLevel = $value; + } + + public function setEmergencyLevel($value) + { + $this->emergencyLevel = $value; + } + + /** + * Use the formatted message? + * @param bool $value + */ + public function useFormattedMessage($value) + { + $this->useFormattedMessage = (boolean) $value; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/RavenHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/RavenHandler.php new file mode 100644 index 0000000..53a8b39 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/RavenHandler.php @@ -0,0 +1,232 @@ + + * + * 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\Formatter\FormatterInterface; +use Monolog\Logger; +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) + * + * @author Marc Abramowitz + */ +class RavenHandler extends AbstractProcessingHandler +{ + /** + * Translates Monolog log levels to Raven log levels. + */ + private $logLevels = array( + Logger::DEBUG => Raven_Client::DEBUG, + Logger::INFO => Raven_Client::INFO, + Logger::NOTICE => Raven_Client::INFO, + Logger::WARNING => Raven_Client::WARNING, + Logger::ERROR => Raven_Client::ERROR, + Logger::CRITICAL => Raven_Client::FATAL, + Logger::ALERT => Raven_Client::FATAL, + Logger::EMERGENCY => Raven_Client::FATAL, + ); + + /** + * @var string should represent the current version of the calling + * software. Can be any string (git commit, version number) + */ + private $release; + + /** + * @var Raven_Client the client object that sends the message to the server + */ + protected $ravenClient; + + /** + * @var LineFormatter 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 + */ + public function __construct(Raven_Client $ravenClient, $level = Logger::DEBUG, $bubble = true) + { + parent::__construct($level, $bubble); + + $this->ravenClient = $ravenClient; + } + + /** + * {@inheritdoc} + */ + public function handleBatch(array $records) + { + $level = $this->level; + + // filter records based on their level + $records = array_filter($records, function ($record) use ($level) { + return $record['level'] >= $level; + }); + + if (!$records) { + return; + } + + // the record with the highest severity is the "main" one + $record = array_reduce($records, function ($highest, $record) { + if ($record['level'] > $highest['level']) { + return $record; + } + + return $highest; + }); + + // the other ones are added as a context item + $logs = array(); + foreach ($records as $r) { + $logs[] = $this->processRecord($r); + } + + if ($logs) { + $record['context']['logs'] = (string) $this->getBatchFormatter()->formatBatch($logs); + } + + $this->handle($record); + } + + /** + * Sets the formatter for the logs generated by handleBatch(). + * + * @param FormatterInterface $formatter + */ + public function setBatchFormatter(FormatterInterface $formatter) + { + $this->batchFormatter = $formatter; + } + + /** + * Gets the formatter for the logs generated by handleBatch(). + * + * @return FormatterInterface + */ + public function getBatchFormatter() + { + if (!$this->batchFormatter) { + $this->batchFormatter = $this->getDefaultBatchFormatter(); + } + + return $this->batchFormatter; + } + + /** + * {@inheritdoc} + */ + protected function write(array $record) + { + $previousUserContext = false; + $options = array(); + $options['level'] = $this->logLevels[$record['level']]; + $options['tags'] = array(); + if (!empty($record['extra']['tags'])) { + $options['tags'] = array_merge($options['tags'], $record['extra']['tags']); + unset($record['extra']['tags']); + } + if (!empty($record['context']['tags'])) { + $options['tags'] = array_merge($options['tags'], $record['context']['tags']); + unset($record['context']['tags']); + } + if (!empty($record['context']['fingerprint'])) { + $options['fingerprint'] = $record['context']['fingerprint']; + unset($record['context']['fingerprint']); + } + if (!empty($record['context']['logger'])) { + $options['logger'] = $record['context']['logger']; + unset($record['context']['logger']); + } else { + $options['logger'] = $record['channel']; + } + foreach ($this->getExtraParameters() as $key) { + foreach (array('extra', 'context') as $source) { + if (!empty($record[$source][$key])) { + $options[$key] = $record[$source][$key]; + unset($record[$source][$key]); + } + } + } + if (!empty($record['context'])) { + $options['extra']['context'] = $record['context']; + if (!empty($record['context']['user'])) { + $previousUserContext = $this->ravenClient->context->user; + $this->ravenClient->user_context($record['context']['user']); + unset($options['extra']['context']['user']); + } + } + if (!empty($record['extra'])) { + $options['extra']['extra'] = $record['extra']; + } + + if (!empty($this->release) && !isset($options['release'])) { + $options['release'] = $this->release; + } + + if (isset($record['context']['exception']) && ($record['context']['exception'] instanceof \Exception || (PHP_VERSION_ID >= 70000 && $record['context']['exception'] instanceof \Throwable))) { + $options['extra']['message'] = $record['formatted']; + $this->ravenClient->captureException($record['context']['exception'], $options); + } else { + $this->ravenClient->captureMessage($record['formatted'], array(), $options); + } + + if ($previousUserContext !== false) { + $this->ravenClient->user_context($previousUserContext); + } + } + + /** + * {@inheritDoc} + */ + protected function getDefaultFormatter() + { + return new LineFormatter('[%channel%] %message%'); + } + + /** + * Gets the default formatter for the logs generated by handleBatch(). + * + * @return FormatterInterface + */ + protected function getDefaultBatchFormatter() + { + return new LineFormatter(); + } + + /** + * Gets extra parameters supported by Raven that can be found in "extra" and "context" + * + * @return array + */ + protected function getExtraParameters() + { + return array('checksum', 'release', 'event_id'); + } + + /** + * @param string $value + * @return self + */ + public function setRelease($value) + { + $this->release = $value; + + return $this; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/RedisHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/RedisHandler.php new file mode 100644 index 0000000..590f996 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/RedisHandler.php @@ -0,0 +1,97 @@ + + * + * 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; + +/** + * Logs to a Redis key using rpush + * + * usage example: + * + * $log = new Logger('application'); + * $redis = new RedisHandler(new Predis\Client("tcp://localhost:6379"), "logs", "prod"); + * $log->pushHandler($redis); + * + * @author Thomas Tourlourat + */ +class RedisHandler extends AbstractProcessingHandler +{ + private $redisClient; + private $redisKey; + protected $capSize; + + /** + * @param \Predis\Client|\Redis $redis The redis instance + * @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 + */ + public function __construct($redis, $key, $level = Logger::DEBUG, $bubble = true, $capSize = false) + { + if (!(($redis instanceof \Predis\Client) || ($redis instanceof \Redis))) { + throw new \InvalidArgumentException('Predis\Client or Redis instance required'); + } + + $this->redisClient = $redis; + $this->redisKey = $key; + $this->capSize = $capSize; + + parent::__construct($level, $bubble); + } + + /** + * {@inheritDoc} + */ + protected function write(array $record) + { + if ($this->capSize) { + $this->writeCapped($record); + } else { + $this->redisClient->rpush($this->redisKey, $record["formatted"]); + } + } + + /** + * Write and cap the collection + * Writes the record to the redis list and caps its + * + * @param array $record associative record array + * @return void + */ + protected function writeCapped(array $record) + { + if ($this->redisClient instanceof \Redis) { + $this->redisClient->multi() + ->rpush($this->redisKey, $record["formatted"]) + ->ltrim($this->redisKey, -$this->capSize, -1) + ->exec(); + } else { + $redisKey = $this->redisKey; + $capSize = $this->capSize; + $this->redisClient->transaction(function ($tx) use ($record, $redisKey, $capSize) { + $tx->rpush($redisKey, $record["formatted"]); + $tx->ltrim($redisKey, -$capSize, -1); + }); + } + } + + /** + * {@inheritDoc} + */ + protected function getDefaultFormatter() + { + return new LineFormatter(); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/RollbarHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/RollbarHandler.php new file mode 100644 index 0000000..0d9de1a --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/RollbarHandler.php @@ -0,0 +1,131 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use RollbarNotifier; +use Exception; +use Monolog\Logger; + +/** + * Sends errors to Rollbar + * + * If the context data contains a `payload` key, that is used as an array + * of payload options to RollbarNotifier's report_message/report_exception methods. + * + * Rollbar's context info will contain the context + extra keys from the log record + * merged, and then on top of that a few keys: + * + * - level (rollbar level name) + * - monolog_level (monolog level name, raw level, as rollbar only has 5 but monolog 8) + * - channel + * - datetime (unix timestamp) + * + * @author Paul Statezny + */ +class RollbarHandler extends AbstractProcessingHandler +{ + /** + * Rollbar notifier + * + * @var RollbarNotifier + */ + protected $rollbarNotifier; + + protected $levelMap = array( + Logger::DEBUG => 'debug', + Logger::INFO => 'info', + Logger::NOTICE => 'info', + Logger::WARNING => 'warning', + Logger::ERROR => 'error', + Logger::CRITICAL => 'critical', + Logger::ALERT => 'critical', + Logger::EMERGENCY => 'critical', + ); + + /** + * Records whether any log records have been added since the last flush of the rollbar notifier + * + * @var bool + */ + private $hasRecords = false; + + protected $initialized = false; + + /** + * @param RollbarNotifier $rollbarNotifier RollbarNotifier object constructed with valid token + * @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(RollbarNotifier $rollbarNotifier, $level = Logger::ERROR, $bubble = true) + { + $this->rollbarNotifier = $rollbarNotifier; + + parent::__construct($level, $bubble); + } + + /** + * {@inheritdoc} + */ + protected function write(array $record) + { + if (!$this->initialized) { + // __destructor() doesn't get called on Fatal errors + register_shutdown_function(array($this, 'close')); + $this->initialized = true; + } + + $context = $record['context']; + $payload = array(); + if (isset($context['payload'])) { + $payload = $context['payload']; + unset($context['payload']); + } + $context = array_merge($context, $record['extra'], array( + 'level' => $this->levelMap[$record['level']], + 'monolog_level' => $record['level_name'], + 'channel' => $record['channel'], + 'datetime' => $record['datetime']->format('U'), + )); + + if (isset($context['exception']) && $context['exception'] instanceof Exception) { + $exception = $context['exception']; + unset($context['exception']); + + $this->rollbarNotifier->report_exception($exception, $context, $payload); + } else { + $this->rollbarNotifier->report_message( + $record['message'], + $context['level'], + $context, + $payload + ); + } + + $this->hasRecords = true; + } + + public function flush() + { + if ($this->hasRecords) { + $this->rollbarNotifier->flush(); + $this->hasRecords = false; + } + } + + /** + * {@inheritdoc} + */ + public function close() + { + $this->flush(); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php new file mode 100644 index 0000000..3b60b3d --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php @@ -0,0 +1,178 @@ + + * + * 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; + +/** + * Stores logs to files that are rotated every day and a limited number of files are kept. + * + * This rotation is only intended to be used as a workaround. Using logrotate to + * handle the rotation is strongly encouraged when you can use it. + * + * @author Christophe Coevoet + * @author Jordi Boggiano + */ +class RotatingFileHandler extends StreamHandler +{ + const FILE_PER_DAY = 'Y-m-d'; + const FILE_PER_MONTH = 'Y-m'; + const FILE_PER_YEAR = 'Y'; + + protected $filename; + protected $maxFiles; + protected $mustRotate; + protected $nextRotation; + protected $filenameFormat; + protected $dateFormat; + + /** + * @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 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 + */ + public function __construct($filename, $maxFiles = 0, $level = Logger::DEBUG, $bubble = true, $filePermission = null, $useLocking = false) + { + $this->filename = $filename; + $this->maxFiles = (int) $maxFiles; + $this->nextRotation = new \DateTime('tomorrow'); + $this->filenameFormat = '{filename}-{date}'; + $this->dateFormat = 'Y-m-d'; + + parent::__construct($this->getTimedFilename(), $level, $bubble, $filePermission, $useLocking); + } + + /** + * {@inheritdoc} + */ + public function close() + { + parent::close(); + + if (true === $this->mustRotate) { + $this->rotate(); + } + } + + public function setFilenameFormat($filenameFormat, $dateFormat) + { + if (!preg_match('{^Y(([/_.-]?m)([/_.-]?d)?)?$}', $dateFormat)) { + trigger_error( + '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.', + E_USER_DEPRECATED + ); + } + if (substr_count($filenameFormat, '{date}') === 0) { + trigger_error( + 'Invalid filename format - format should contain at least `{date}`, because otherwise rotating is impossible.', + E_USER_DEPRECATED + ); + } + $this->filenameFormat = $filenameFormat; + $this->dateFormat = $dateFormat; + $this->url = $this->getTimedFilename(); + $this->close(); + } + + /** + * {@inheritdoc} + */ + protected function write(array $record) + { + // on the first record written, if the log is new, we should rotate (once per day) + if (null === $this->mustRotate) { + $this->mustRotate = !file_exists($this->url); + } + + if ($this->nextRotation < $record['datetime']) { + $this->mustRotate = true; + $this->close(); + } + + parent::write($record); + } + + /** + * Rotates the files. + */ + protected function rotate() + { + // update filename + $this->url = $this->getTimedFilename(); + $this->nextRotation = new \DateTime('tomorrow'); + + // skip GC of old logs if files are unlimited + if (0 === $this->maxFiles) { + return; + } + + $logFiles = glob($this->getGlobPattern()); + if ($this->maxFiles >= count($logFiles)) { + // no files to remove + return; + } + + // Sorting the files by name to remove the older ones + usort($logFiles, function ($a, $b) { + return strcmp($b, $a); + }); + + foreach (array_slice($logFiles, $this->maxFiles) as $file) { + if (is_writable($file)) { + // suppress errors here as unlink() might fail if two processes + // are cleaning up/rotating at the same time + set_error_handler(function ($errno, $errstr, $errfile, $errline) {}); + unlink($file); + restore_error_handler(); + } + } + + $this->mustRotate = false; + } + + protected function getTimedFilename() + { + $fileInfo = pathinfo($this->filename); + $timedFilename = str_replace( + array('{filename}', '{date}'), + array($fileInfo['filename'], date($this->dateFormat)), + $fileInfo['dirname'] . '/' . $this->filenameFormat + ); + + if (!empty($fileInfo['extension'])) { + $timedFilename .= '.'.$fileInfo['extension']; + } + + return $timedFilename; + } + + protected function getGlobPattern() + { + $fileInfo = pathinfo($this->filename); + $glob = str_replace( + array('{filename}', '{date}'), + array($fileInfo['filename'], '*'), + $fileInfo['dirname'] . '/' . $this->filenameFormat + ); + if (!empty($fileInfo['extension'])) { + $glob .= '.'.$fileInfo['extension']; + } + + return $glob; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SamplingHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/SamplingHandler.php new file mode 100644 index 0000000..9509ae3 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/SamplingHandler.php @@ -0,0 +1,82 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +/** + * Sampling handler + * + * A sampled event stream can be useful for logging high frequency events in + * a production environment where you only need an idea of what is happening + * and are not concerned with capturing every occurrence. Since the decision to + * handle or not handle a particular event is determined randomly, the + * resulting sampled log is not guaranteed to contain 1/N of the events that + * occurred in the application, but based on the Law of large numbers, it will + * tend to be close to this ratio with a large number of attempts. + * + * @author Bryan Davis + * @author Kunal Mehta + */ +class SamplingHandler extends AbstractHandler +{ + /** + * @var callable|HandlerInterface $handler + */ + protected $handler; + + /** + * @var int $factor + */ + protected $factor; + + /** + * @param callable|HandlerInterface $handler Handler or factory callable($record, $fingersCrossedHandler). + * @param int $factor Sample factor + */ + public function __construct($handler, $factor) + { + parent::__construct(); + $this->handler = $handler; + $this->factor = $factor; + + if (!$this->handler instanceof HandlerInterface && !is_callable($this->handler)) { + throw new \RuntimeException("The given handler (".json_encode($this->handler).") is not a callable nor a Monolog\Handler\HandlerInterface object"); + } + } + + public function isHandling(array $record) + { + return $this->handler->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); + } + + return false === $this->bubble; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/Slack/SlackRecord.php b/vendor/monolog/monolog/src/Monolog/Handler/Slack/SlackRecord.php new file mode 100644 index 0000000..38bc838 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/Slack/SlackRecord.php @@ -0,0 +1,294 @@ + + * + * 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\Formatter\NormalizerFormatter; +use Monolog\Formatter\FormatterInterface; + +/** + * Slack record utility helping to log to Slack webhooks or API. + * + * @author Greg Kedzierski + * @author Haralan Dobrev + * @see https://api.slack.com/incoming-webhooks + * @see https://api.slack.com/docs/message-attachments + */ +class SlackRecord +{ + const COLOR_DANGER = 'danger'; + + const COLOR_WARNING = 'warning'; + + const COLOR_GOOD = 'good'; + + const COLOR_DEFAULT = '#e3e4e6'; + + /** + * Slack channel (encoded ID or name) + * @var string|null + */ + private $channel; + + /** + * Name of a bot + * @var string|null + */ + private $username; + + /** + * User icon e.g. 'ghost', 'http://example.com/user.png' + * @var string + */ + private $userIcon; + + /** + * Whether the message should be added to Slack as attachment (plain text otherwise) + * @var bool + */ + private $useAttachment; + + /** + * Whether the the context/extra messages added to Slack as attachments are in a short style + * @var bool + */ + private $useShortAttachment; + + /** + * Whether the attachment should include context and extra data + * @var bool + */ + private $includeContextAndExtra; + + /** + * Dot separated list of fields to exclude from slack message. E.g. ['context.field1', 'extra.field2'] + * @var array + */ + private $excludeFields; + + /** + * @var FormatterInterface + */ + private $formatter; + + /** + * @var NormalizerFormatter + */ + private $normalizerFormatter; + + public function __construct($channel = null, $username = null, $useAttachment = true, $userIcon = null, $useShortAttachment = false, $includeContextAndExtra = false, array $excludeFields = array(), FormatterInterface $formatter = null) + { + $this->channel = $channel; + $this->username = $username; + $this->userIcon = trim($userIcon, ':'); + $this->useAttachment = $useAttachment; + $this->useShortAttachment = $useShortAttachment; + $this->includeContextAndExtra = $includeContextAndExtra; + $this->excludeFields = $excludeFields; + $this->formatter = $formatter; + + if ($this->includeContextAndExtra) { + $this->normalizerFormatter = new NormalizerFormatter(); + } + } + + public function getSlackData(array $record) + { + $dataArray = array(); + $record = $this->excludeFields($record); + + if ($this->username) { + $dataArray['username'] = $this->username; + } + + if ($this->channel) { + $dataArray['channel'] = $this->channel; + } + + if ($this->formatter && !$this->useAttachment) { + $message = $this->formatter->format($record); + } else { + $message = $record['message']; + } + + if ($this->useAttachment) { + $attachment = array( + 'fallback' => $message, + 'text' => $message, + 'color' => $this->getAttachmentColor($record['level']), + 'fields' => array(), + 'mrkdwn_in' => array('fields'), + 'ts' => $record['datetime']->getTimestamp() + ); + + if ($this->useShortAttachment) { + $attachment['title'] = $record['level_name']; + } else { + $attachment['title'] = 'Message'; + $attachment['fields'][] = $this->generateAttachmentField('Level', $record['level_name']); + } + + + if ($this->includeContextAndExtra) { + foreach (array('extra', 'context') as $key) { + if (empty($record[$key])) { + continue; + } + + if ($this->useShortAttachment) { + $attachment['fields'][] = $this->generateAttachmentField( + ucfirst($key), + $record[$key] + ); + } else { + // Add all extra fields as individual fields in attachment + $attachment['fields'] = array_merge( + $attachment['fields'], + $this->generateAttachmentFields($record[$key]) + ); + } + } + } + + $dataArray['attachments'] = array($attachment); + } else { + $dataArray['text'] = $message; + } + + if ($this->userIcon) { + if (filter_var($this->userIcon, FILTER_VALIDATE_URL)) { + $dataArray['icon_url'] = $this->userIcon; + } else { + $dataArray['icon_emoji'] = ":{$this->userIcon}:"; + } + } + + return $dataArray; + } + + /** + * Returned a Slack message attachment color associated with + * provided level. + * + * @param int $level + * @return string + */ + public function getAttachmentColor($level) + { + switch (true) { + case $level >= Logger::ERROR: + return self::COLOR_DANGER; + case $level >= Logger::WARNING: + return self::COLOR_WARNING; + case $level >= Logger::INFO: + return self::COLOR_GOOD; + default: + return self::COLOR_DEFAULT; + } + } + + /** + * Stringifies an array of key/value pairs to be used in attachment fields + * + * @param array $fields + * + * @return string + */ + public function stringify($fields) + { + $normalized = $this->normalizerFormatter->format($fields); + $prettyPrintFlag = defined('JSON_PRETTY_PRINT') ? JSON_PRETTY_PRINT : 128; + + $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); + } + + /** + * Sets the formatter + * + * @param FormatterInterface $formatter + */ + public function setFormatter(FormatterInterface $formatter) + { + $this->formatter = $formatter; + } + + /** + * Generates attachment field + * + * @param string $title + * @param string|array $value\ + * + * @return array + */ + private function generateAttachmentField($title, $value) + { + $value = is_array($value) + ? sprintf('```%s```', $this->stringify($value)) + : $value; + + return array( + 'title' => $title, + 'value' => $value, + 'short' => false + ); + } + + /** + * Generates a collection of attachment fields from array + * + * @param array $data + * + * @return array + */ + private function generateAttachmentFields(array $data) + { + $fields = array(); + foreach ($data as $key => $value) { + $fields[] = $this->generateAttachmentField($key, $value); + } + + return $fields; + } + + /** + * Get a copy of record with fields excluded according to $this->excludeFields + * + * @param array $record + * + * @return array + */ + private function excludeFields(array $record) + { + foreach ($this->excludeFields as $field) { + $keys = explode('.', $field); + $node = &$record; + $lastKey = end($keys); + foreach ($keys as $key) { + if (!isset($node[$key])) { + break; + } + if ($lastKey === $key) { + unset($node[$key]); + break; + } + $node = &$node[$key]; + } + } + + return $record; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SlackHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/SlackHandler.php new file mode 100644 index 0000000..9324fc9 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/SlackHandler.php @@ -0,0 +1,204 @@ + + * + * 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\Logger; +use Monolog\Handler\Slack\SlackRecord; + +/** + * Sends notifications through Slack API + * + * @author Greg Kedzierski + * @see https://api.slack.com/ + */ +class SlackHandler extends SocketHandler +{ + /** + * Slack API token + * @var string + */ + private $token; + + /** + * Instance of the SlackRecord util class preparing data for Slack API. + * @var SlackRecord + */ + private $slackRecord; + + /** + * @param string $token Slack API token + * @param string $channel Slack channel (encoded ID or name) + * @param string|null $username Name of a bot + * @param bool $useAttachment Whether the message should be added to Slack as attachment (plain text otherwise) + * @param string|null $iconEmoji The emoji name to use (or null) + * @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 $useShortAttachment Whether the the context/extra messages added to Slack as attachments are in a short style + * @param bool $includeContextAndExtra Whether the attachment should include context and extra data + * @param array $excludeFields Dot separated list of fields to exclude from slack message. E.g. ['context.field1', 'extra.field2'] + * @throws MissingExtensionException If no OpenSSL PHP extension configured + */ + public function __construct($token, $channel, $username = null, $useAttachment = true, $iconEmoji = null, $level = Logger::CRITICAL, $bubble = true, $useShortAttachment = false, $includeContextAndExtra = false, array $excludeFields = array()) + { + if (!extension_loaded('openssl')) { + throw new MissingExtensionException('The OpenSSL PHP extension is required to use the SlackHandler'); + } + + parent::__construct('ssl://slack.com:443', $level, $bubble); + + $this->slackRecord = new SlackRecord( + $channel, + $username, + $useAttachment, + $iconEmoji, + $useShortAttachment, + $includeContextAndExtra, + $excludeFields, + $this->formatter + ); + + $this->token = $token; + } + + public function getSlackRecord() + { + return $this->slackRecord; + } + + /** + * {@inheritdoc} + * + * @param array $record + * @return string + */ + protected function generateDataStream($record) + { + $content = $this->buildContent($record); + + return $this->buildHeader($content) . $content; + } + + /** + * Builds the body of API call + * + * @param array $record + * @return string + */ + private function buildContent($record) + { + $dataArray = $this->prepareContentData($record); + + return http_build_query($dataArray); + } + + /** + * Prepares content data + * + * @param array $record + * @return array + */ + protected function prepareContentData($record) + { + $dataArray = $this->slackRecord->getSlackData($record); + $dataArray['token'] = $this->token; + + if (!empty($dataArray['attachments'])) { + $dataArray['attachments'] = json_encode($dataArray['attachments']); + } + + return $dataArray; + } + + /** + * Builds the header of the API Call + * + * @param string $content + * @return string + */ + private function buildHeader($content) + { + $header = "POST /api/chat.postMessage HTTP/1.1\r\n"; + $header .= "Host: slack.com\r\n"; + $header .= "Content-Type: application/x-www-form-urlencoded\r\n"; + $header .= "Content-Length: " . strlen($content) . "\r\n"; + $header .= "\r\n"; + + return $header; + } + + /** + * {@inheritdoc} + * + * @param array $record + */ + protected function write(array $record) + { + parent::write($record); + $res = $this->getResource(); + if (is_resource($res)) { + @fread($res, 2048); + } + $this->closeSocket(); + } + + /** + * Returned a Slack message attachment color associated with + * provided level. + * + * @param int $level + * @return string + * @deprecated Use underlying SlackRecord instead + */ + protected function getAttachmentColor($level) + { + trigger_error( + 'SlackHandler::getAttachmentColor() is deprecated. Use underlying SlackRecord instead.', + E_USER_DEPRECATED + ); + + return $this->slackRecord->getAttachmentColor($level); + } + + /** + * Stringifies an array of key/value pairs to be used in attachment fields + * + * @param array $fields + * @return string + * @deprecated Use underlying SlackRecord instead + */ + protected function stringify($fields) + { + trigger_error( + 'SlackHandler::stringify() is deprecated. Use underlying SlackRecord instead.', + E_USER_DEPRECATED + ); + + return $this->slackRecord->stringify($fields); + } + + public function setFormatter(FormatterInterface $formatter) + { + parent::setFormatter($formatter); + $this->slackRecord->setFormatter($formatter); + + return $this; + } + + public function getFormatter() + { + $formatter = parent::getFormatter(); + $this->slackRecord->setFormatter($formatter); + + return $formatter; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SlackWebhookHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/SlackWebhookHandler.php new file mode 100644 index 0000000..0d3e3ea --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/SlackWebhookHandler.php @@ -0,0 +1,110 @@ + + * + * 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\Logger; +use Monolog\Handler\Slack\SlackRecord; + +/** + * Sends notifications through Slack Webhooks + * + * @author Haralan Dobrev + * @see https://api.slack.com/incoming-webhooks + */ +class SlackWebhookHandler extends AbstractProcessingHandler +{ + /** + * Slack Webhook token + * @var string + */ + private $webhookUrl; + + /** + * Instance of the SlackRecord util class preparing data for Slack API. + * @var SlackRecord + */ + private $slackRecord; + + /** + * @param string $webhookUrl Slack Webhook URL + * @param string|null $channel Slack channel (encoded ID or name) + * @param string|null $username Name of a bot + * @param bool $useAttachment Whether the message should be added to Slack as attachment (plain text otherwise) + * @param string|null $iconEmoji The emoji name to use (or null) + * @param bool $useShortAttachment Whether the the context/extra messages added to Slack as attachments are in a short style + * @param bool $includeContextAndExtra Whether the attachment should include context and extra data + * @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 array $excludeFields Dot separated list of fields to exclude from slack message. E.g. ['context.field1', 'extra.field2'] + */ + public function __construct($webhookUrl, $channel = null, $username = null, $useAttachment = true, $iconEmoji = null, $useShortAttachment = false, $includeContextAndExtra = false, $level = Logger::CRITICAL, $bubble = true, array $excludeFields = array()) + { + parent::__construct($level, $bubble); + + $this->webhookUrl = $webhookUrl; + + $this->slackRecord = new SlackRecord( + $channel, + $username, + $useAttachment, + $iconEmoji, + $useShortAttachment, + $includeContextAndExtra, + $excludeFields, + $this->formatter + ); + } + + public function getSlackRecord() + { + return $this->slackRecord; + } + + /** + * {@inheritdoc} + * + * @param array $record + */ + protected function write(array $record) + { + $postData = $this->slackRecord->getSlackData($record); + $postString = json_encode($postData); + + $ch = curl_init(); + curl_setopt($ch, CURLOPT_URL, $this->webhookUrl); + curl_setopt($ch, CURLOPT_POST, true); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + if (defined('CURLOPT_SAFE_UPLOAD')) { + curl_setopt($ch, CURLOPT_SAFE_UPLOAD, true); + } + curl_setopt($ch, CURLOPT_POSTFIELDS, array('payload' => $postString)); + + Curl\Util::execute($ch); + } + + public function setFormatter(FormatterInterface $formatter) + { + parent::setFormatter($formatter); + $this->slackRecord->setFormatter($formatter); + + return $this; + } + + public function getFormatter() + { + $formatter = parent::getFormatter(); + $this->slackRecord->setFormatter($formatter); + + return $formatter; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SlackbotHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/SlackbotHandler.php new file mode 100644 index 0000000..baead52 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/SlackbotHandler.php @@ -0,0 +1,80 @@ + + * + * 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; + +/** + * Sends notifications through Slack's Slackbot + * + * @author Haralan Dobrev + * @see https://slack.com/apps/A0F81R8ET-slackbot + */ +class SlackbotHandler extends AbstractProcessingHandler +{ + /** + * The slug of the Slack team + * @var string + */ + private $slackTeam; + + /** + * Slackbot token + * @var string + */ + private $token; + + /** + * Slack channel name + * @var string + */ + private $channel; + + /** + * @param string $slackTeam Slack team slug + * @param string $token Slackbot token + * @param string $channel Slack channel (encoded ID or name) + * @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($slackTeam, $token, $channel, $level = Logger::CRITICAL, $bubble = true) + { + parent::__construct($level, $bubble); + + $this->slackTeam = $slackTeam; + $this->token = $token; + $this->channel = $channel; + } + + /** + * {@inheritdoc} + * + * @param array $record + */ + protected function write(array $record) + { + $slackbotUrl = sprintf( + 'https://%s.slack.com/services/hooks/slackbot?token=%s&channel=%s', + $this->slackTeam, + $this->token, + $this->channel + ); + + $ch = curl_init(); + curl_setopt($ch, CURLOPT_URL, $slackbotUrl); + curl_setopt($ch, CURLOPT_POST, true); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_POSTFIELDS, $record['message']); + + Curl\Util::execute($ch); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SocketHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/SocketHandler.php new file mode 100644 index 0000000..7a61bf4 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/SocketHandler.php @@ -0,0 +1,346 @@ + + * + * 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; + +/** + * Stores to any socket - uses fsockopen() or pfsockopen(). + * + * @author Pablo de Leon Belloc + * @see http://php.net/manual/en/function.fsockopen.php + */ +class SocketHandler extends AbstractProcessingHandler +{ + private $connectionString; + private $connectionTimeout; + private $resource; + private $timeout = 0; + private $writingTimeout = 10; + private $lastSentBytes = 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 + */ + public function __construct($connectionString, $level = Logger::DEBUG, $bubble = true) + { + parent::__construct($level, $bubble); + $this->connectionString = $connectionString; + $this->connectionTimeout = (float) ini_get('default_socket_timeout'); + } + + /** + * Connect (if necessary) and write to the socket + * + * @param array $record + * + * @throws \UnexpectedValueException + * @throws \RuntimeException + */ + protected function write(array $record) + { + $this->connectIfNotConnected(); + $data = $this->generateDataStream($record); + $this->writeToSocket($data); + } + + /** + * We will not close a PersistentSocket instance so it can be reused in other requests. + */ + public function close() + { + if (!$this->isPersistent()) { + $this->closeSocket(); + } + } + + /** + * Close socket, if open + */ + public function closeSocket() + { + if (is_resource($this->resource)) { + fclose($this->resource); + $this->resource = null; + } + } + + /** + * Set socket connection to nbe persistent. It only has effect before the connection is initiated. + * + * @param bool $persistent + */ + public function setPersistent($persistent) + { + $this->persistent = (boolean) $persistent; + } + + /** + * Set connection timeout. Only has effect before we connect. + * + * @param float $seconds + * + * @see http://php.net/manual/en/function.fsockopen.php + */ + public function setConnectionTimeout($seconds) + { + $this->validateTimeout($seconds); + $this->connectionTimeout = (float) $seconds; + } + + /** + * Set write timeout. Only has effect before we connect. + * + * @param float $seconds + * + * @see http://php.net/manual/en/function.stream-set-timeout.php + */ + public function setTimeout($seconds) + { + $this->validateTimeout($seconds); + $this->timeout = (float) $seconds; + } + + /** + * Set writing timeout. Only has effect during connection in the writing cycle. + * + * @param float $seconds 0 for no timeout + */ + public function setWritingTimeout($seconds) + { + $this->validateTimeout($seconds); + $this->writingTimeout = (float) $seconds; + } + + /** + * Get current connection string + * + * @return string + */ + public function getConnectionString() + { + return $this->connectionString; + } + + /** + * Get persistent setting + * + * @return bool + */ + public function isPersistent() + { + return $this->persistent; + } + + /** + * Get current connection timeout setting + * + * @return float + */ + public function getConnectionTimeout() + { + return $this->connectionTimeout; + } + + /** + * Get current in-transfer timeout + * + * @return float + */ + public function getTimeout() + { + return $this->timeout; + } + + /** + * Get current local writing timeout + * + * @return float + */ + public function getWritingTimeout() + { + return $this->writingTimeout; + } + + /** + * Check to see if the socket is currently available. + * + * UDP might appear to be connected but might fail when writing. See http://php.net/fsockopen for details. + * + * @return bool + */ + public function isConnected() + { + return is_resource($this->resource) + && !feof($this->resource); // on TCP - other party can close connection. + } + + /** + * Wrapper to allow mocking + */ + protected function pfsockopen() + { + return @pfsockopen($this->connectionString, -1, $this->errno, $this->errstr, $this->connectionTimeout); + } + + /** + * Wrapper to allow mocking + */ + protected function fsockopen() + { + return @fsockopen($this->connectionString, -1, $this->errno, $this->errstr, $this->connectionTimeout); + } + + /** + * Wrapper to allow mocking + * + * @see http://php.net/manual/en/function.stream-set-timeout.php + */ + protected function streamSetTimeout() + { + $seconds = floor($this->timeout); + $microseconds = round(($this->timeout - $seconds) * 1e6); + + return stream_set_timeout($this->resource, $seconds, $microseconds); + } + + /** + * Wrapper to allow mocking + */ + protected function fwrite($data) + { + return @fwrite($this->resource, $data); + } + + /** + * Wrapper to allow mocking + */ + protected function streamGetMetadata() + { + return stream_get_meta_data($this->resource); + } + + private function validateTimeout($value) + { + $ok = filter_var($value, FILTER_VALIDATE_FLOAT); + if ($ok === false || $value < 0) { + throw new \InvalidArgumentException("Timeout must be 0 or a positive float (got $value)"); + } + } + + private function connectIfNotConnected() + { + if ($this->isConnected()) { + return; + } + $this->connect(); + } + + protected function generateDataStream($record) + { + return (string) $record['formatted']; + } + + /** + * @return resource|null + */ + protected function getResource() + { + return $this->resource; + } + + private function connect() + { + $this->createSocketResource(); + $this->setSocketTimeout(); + } + + private function createSocketResource() + { + if ($this->isPersistent()) { + $resource = $this->pfsockopen(); + } else { + $resource = $this->fsockopen(); + } + if (!$resource) { + throw new \UnexpectedValueException("Failed connecting to $this->connectionString ($this->errno: $this->errstr)"); + } + $this->resource = $resource; + } + + private function setSocketTimeout() + { + if (!$this->streamSetTimeout()) { + throw new \UnexpectedValueException("Failed setting timeout with stream_set_timeout()"); + } + } + + private function writeToSocket($data) + { + $length = strlen($data); + $sent = 0; + $this->lastSentBytes = $sent; + while ($this->isConnected() && $sent < $length) { + if (0 == $sent) { + $chunk = $this->fwrite($data); + } else { + $chunk = $this->fwrite(substr($data, $sent)); + } + if ($chunk === false) { + throw new \RuntimeException("Could not write to socket"); + } + $sent += $chunk; + $socketInfo = $this->streamGetMetadata(); + if ($socketInfo['timed_out']) { + throw new \RuntimeException("Write timed-out"); + } + + if ($this->writingIsTimedOut($sent)) { + throw new \RuntimeException("Write timed-out, no data sent for `{$this->writingTimeout}` seconds, probably we got disconnected (sent $sent of $length)"); + } + } + if (!$this->isConnected() && $sent < $length) { + throw new \RuntimeException("End-of-file reached, probably we got disconnected (sent $sent of $length)"); + } + } + + private function writingIsTimedOut($sent) + { + $writingTimeout = (int) floor($this->writingTimeout); + if (0 === $writingTimeout) { + return false; + } + + if ($sent !== $this->lastSentBytes) { + $this->lastWritingAt = time(); + $this->lastSentBytes = $sent; + + return false; + } else { + usleep(100); + } + + if ((time() - $this->lastWritingAt) >= $writingTimeout) { + $this->closeSocket(); + + return true; + } + + return false; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php new file mode 100644 index 0000000..09a1573 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php @@ -0,0 +1,176 @@ + + * + * 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; + +/** + * Stores to any stream resource + * + * Can be used to store into php://stderr, remote and local files, etc. + * + * @author Jordi Boggiano + */ +class StreamHandler extends AbstractProcessingHandler +{ + protected $stream; + protected $url; + private $errorMessage; + protected $filePermission; + protected $useLocking; + private $dirCreated; + + /** + * @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 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 + * + * @throws \Exception If a missing directory is not buildable + * @throws \InvalidArgumentException If stream is not a resource or string + */ + public function __construct($stream, $level = Logger::DEBUG, $bubble = true, $filePermission = null, $useLocking = false) + { + parent::__construct($level, $bubble); + if (is_resource($stream)) { + $this->stream = $stream; + } elseif (is_string($stream)) { + $this->url = $stream; + } else { + throw new \InvalidArgumentException('A stream must either be a resource or a string.'); + } + + $this->filePermission = $filePermission; + $this->useLocking = $useLocking; + } + + /** + * {@inheritdoc} + */ + public function close() + { + if ($this->url && is_resource($this->stream)) { + fclose($this->stream); + } + $this->stream = null; + } + + /** + * Return the currently active stream if it is open + * + * @return resource|null + */ + public function getStream() + { + return $this->stream; + } + + /** + * Return the stream URL if it was configured with a URL and not an active resource + * + * @return string|null + */ + public function getUrl() + { + return $this->url; + } + + /** + * {@inheritdoc} + */ + protected function write(array $record) + { + if (!is_resource($this->stream)) { + if (null === $this->url || '' === $this->url) { + throw new \LogicException('Missing stream url, the stream can not be opened. This may be caused by a premature call to close().'); + } + $this->createDir(); + $this->errorMessage = null; + set_error_handler(array($this, 'customErrorHandler')); + $this->stream = fopen($this->url, 'a'); + if ($this->filePermission !== null) { + @chmod($this->url, $this->filePermission); + } + 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)); + } + } + + if ($this->useLocking) { + // ignoring errors here, there's not much we can do about them + flock($this->stream, LOCK_EX); + } + + $this->streamWrite($this->stream, $record); + + if ($this->useLocking) { + flock($this->stream, LOCK_UN); + } + } + + /** + * Write to stream + * @param resource $stream + * @param array $record + */ + protected function streamWrite($stream, array $record) + { + fwrite($stream, (string) $record['formatted']); + } + + private function customErrorHandler($code, $msg) + { + $this->errorMessage = preg_replace('{^(fopen|mkdir)\(.*?\): }', '', $msg); + } + + /** + * @param string $stream + * + * @return null|string + */ + private function getDirFromStream($stream) + { + $pos = strpos($stream, '://'); + if ($pos === false) { + return dirname($stream); + } + + if ('file://' === substr($stream, 0, 7)) { + return dirname(substr($stream, 7)); + } + + return; + } + + private function createDir() + { + // Do not try to create dir if it has already been tried. + if ($this->dirCreated) { + return; + } + + $dir = $this->getDirFromStream($this->url); + if (null !== $dir && !is_dir($dir)) { + $this->errorMessage = null; + set_error_handler(array($this, 'customErrorHandler')); + $status = mkdir($dir, 0777, true); + restore_error_handler(); + if (false === $status) { + throw new \UnexpectedValueException(sprintf('There is no existing directory at "%s" and its not buildable: '.$this->errorMessage, $dir)); + } + } + $this->dirCreated = true; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SwiftMailerHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/SwiftMailerHandler.php new file mode 100644 index 0000000..aba1396 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/SwiftMailerHandler.php @@ -0,0 +1,94 @@ + + * + * 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\Formatter\LineFormatter; + +/** + * SwiftMailerHandler uses Swift_Mailer to send the emails + * + * @author Gyula Sallai + */ +class SwiftMailerHandler extends MailHandler +{ + protected $mailer; + private $messageTemplate; + + /** + * @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 + */ + public function __construct(\Swift_Mailer $mailer, $message, $level = Logger::ERROR, $bubble = true) + { + parent::__construct($level, $bubble); + + $this->mailer = $mailer; + $this->messageTemplate = $message; + } + + /** + * {@inheritdoc} + */ + protected function send($content, array $records) + { + $this->mailer->send($this->buildMessage($content, $records)); + } + + /** + * Creates instance of Swift_Message to be sent + * + * @param string $content formatted email body to be sent + * @param array $records Log records that formed the content + * @return \Swift_Message + */ + protected function buildMessage($content, array $records) + { + $message = null; + if ($this->messageTemplate instanceof \Swift_Message) { + $message = clone $this->messageTemplate; + $message->generateId(); + } elseif (is_callable($this->messageTemplate)) { + $message = call_user_func($this->messageTemplate, $content, $records); + } + + if (!$message instanceof \Swift_Message) { + throw new \InvalidArgumentException('Could not resolve message as instance of Swift_Message or a callable returning it'); + } + + if ($records) { + $subjectFormatter = new LineFormatter($message->getSubject()); + $message->setSubject($subjectFormatter->format($this->getHighestRecord($records))); + } + + $message->setBody($content); + $message->setDate(time()); + + return $message; + } + + /** + * BC getter, to be removed in 2.0 + */ + public function __get($name) + { + if ($name === 'message') { + trigger_error('SwiftMailerHandler->message is deprecated, use ->buildMessage() instead to retrieve the message', E_USER_DEPRECATED); + + return $this->buildMessage(null, array()); + } + + throw new \InvalidArgumentException('Invalid property '.$name); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SyslogHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/SyslogHandler.php new file mode 100644 index 0000000..376bc3b --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/SyslogHandler.php @@ -0,0 +1,67 @@ + + * + * 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; + +/** + * Logs to syslog service. + * + * usage example: + * + * $log = new Logger('application'); + * $syslog = new SyslogHandler('myfacility', 'local6'); + * $formatter = new LineFormatter("%channel%.%level_name%: %message% %extra%"); + * $syslog->setFormatter($formatter); + * $log->pushHandler($syslog); + * + * @author Sven Paulus + */ +class SyslogHandler extends AbstractSyslogHandler +{ + protected $ident; + 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 + */ + public function __construct($ident, $facility = LOG_USER, $level = Logger::DEBUG, $bubble = true, $logopts = LOG_PID) + { + parent::__construct($facility, $level, $bubble); + + $this->ident = $ident; + $this->logopts = $logopts; + } + + /** + * {@inheritdoc} + */ + public function close() + { + closelog(); + } + + /** + * {@inheritdoc} + */ + protected function write(array $record) + { + if (!openlog($this->ident, $this->logopts, $this->facility)) { + throw new \LogicException('Can\'t open syslog for ident "'.$this->ident.'" and facility "'.$this->facility.'"'); + } + syslog($this->logLevels[$record['level']], (string) $record['formatted']); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SyslogUdp/UdpSocket.php b/vendor/monolog/monolog/src/Monolog/Handler/SyslogUdp/UdpSocket.php new file mode 100644 index 0000000..3bff085 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/SyslogUdp/UdpSocket.php @@ -0,0 +1,56 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler\SyslogUdp; + +class UdpSocket +{ + const DATAGRAM_MAX_LENGTH = 65023; + + protected $ip; + protected $port; + protected $socket; + + public function __construct($ip, $port = 514) + { + $this->ip = $ip; + $this->port = $port; + $this->socket = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP); + } + + public function write($line, $header = "") + { + $this->send($this->assembleMessage($line, $header)); + } + + public function close() + { + if (is_resource($this->socket)) { + socket_close($this->socket); + $this->socket = null; + } + } + + protected function send($chunk) + { + if (!is_resource($this->socket)) { + throw new \LogicException('The UdpSocket to '.$this->ip.':'.$this->port.' has been closed and can not be written to anymore'); + } + socket_sendto($this->socket, $chunk, strlen($chunk), $flags = 0, $this->ip, $this->port); + } + + protected function assembleMessage($line, $header) + { + $chunkSize = self::DATAGRAM_MAX_LENGTH - strlen($header); + + return $header . substr($line, 0, $chunkSize); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SyslogUdpHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/SyslogUdpHandler.php new file mode 100644 index 0000000..74d946a --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/SyslogUdpHandler.php @@ -0,0 +1,82 @@ + + * + * 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\Handler\SyslogUdp\UdpSocket; + +/** + * A Handler for logging to a remote syslogd server. + * + * @author Jesper Skovgaard Nielsen + */ +class SyslogUdpHandler extends AbstractSyslogHandler +{ + protected $socket; + + /** + * @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 + */ + public function __construct($host, $port = 514, $facility = LOG_USER, $level = Logger::DEBUG, $bubble = true) + { + parent::__construct($facility, $level, $bubble); + + $this->socket = new UdpSocket($host, $port ?: 514); + } + + protected function write(array $record) + { + $lines = $this->splitMessageIntoLines($record['formatted']); + + $header = $this->makeCommonSyslogHeader($this->logLevels[$record['level']]); + + foreach ($lines as $line) { + $this->socket->write($line, $header); + } + } + + public function close() + { + $this->socket->close(); + } + + private function splitMessageIntoLines($message) + { + if (is_array($message)) { + $message = implode("\n", $message); + } + + return preg_split('/$\R?^/m', $message, -1, PREG_SPLIT_NO_EMPTY); + } + + /** + * Make common syslog header (see rfc5424) + */ + protected function makeCommonSyslogHeader($severity) + { + $priority = $severity + $this->facility; + + return "<$priority>1 "; + } + + /** + * Inject your own socket, mainly used for testing + */ + public function setSocket($socket) + { + $this->socket = $socket; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/TestHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/TestHandler.php new file mode 100644 index 0000000..e39cfc6 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/TestHandler.php @@ -0,0 +1,154 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +/** + * Used for testing purposes. + * + * It records all records and gives you access to them for verification. + * + * @author Jordi Boggiano + * + * @method bool hasEmergency($record) + * @method bool hasAlert($record) + * @method bool hasCritical($record) + * @method bool hasError($record) + * @method bool hasWarning($record) + * @method bool hasNotice($record) + * @method bool hasInfo($record) + * @method bool hasDebug($record) + * + * @method bool hasEmergencyRecords() + * @method bool hasAlertRecords() + * @method bool hasCriticalRecords() + * @method bool hasErrorRecords() + * @method bool hasWarningRecords() + * @method bool hasNoticeRecords() + * @method bool hasInfoRecords() + * @method bool hasDebugRecords() + * + * @method bool hasEmergencyThatContains($message) + * @method bool hasAlertThatContains($message) + * @method bool hasCriticalThatContains($message) + * @method bool hasErrorThatContains($message) + * @method bool hasWarningThatContains($message) + * @method bool hasNoticeThatContains($message) + * @method bool hasInfoThatContains($message) + * @method bool hasDebugThatContains($message) + * + * @method bool hasEmergencyThatMatches($message) + * @method bool hasAlertThatMatches($message) + * @method bool hasCriticalThatMatches($message) + * @method bool hasErrorThatMatches($message) + * @method bool hasWarningThatMatches($message) + * @method bool hasNoticeThatMatches($message) + * @method bool hasInfoThatMatches($message) + * @method bool hasDebugThatMatches($message) + * + * @method bool hasEmergencyThatPasses($message) + * @method bool hasAlertThatPasses($message) + * @method bool hasCriticalThatPasses($message) + * @method bool hasErrorThatPasses($message) + * @method bool hasWarningThatPasses($message) + * @method bool hasNoticeThatPasses($message) + * @method bool hasInfoThatPasses($message) + * @method bool hasDebugThatPasses($message) + */ +class TestHandler extends AbstractProcessingHandler +{ + protected $records = array(); + protected $recordsByLevel = array(); + + public function getRecords() + { + return $this->records; + } + + public function clear() + { + $this->records = array(); + $this->recordsByLevel = array(); + } + + public function hasRecords($level) + { + return isset($this->recordsByLevel[$level]); + } + + public function hasRecord($record, $level) + { + if (is_array($record)) { + $record = $record['message']; + } + + return $this->hasRecordThatPasses(function ($rec) use ($record) { + return $rec['message'] === $record; + }, $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($predicate, $level) + { + if (!is_callable($predicate)) { + throw new \InvalidArgumentException("Expected a callable for hasRecordThatSucceeds"); + } + + 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; + } + + /** + * {@inheritdoc} + */ + protected function write(array $record) + { + $this->recordsByLevel[$record['level']][] = $record; + $this->records[] = $record; + } + + 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 = constant('Monolog\Logger::' . strtoupper($matches[2])); + if (method_exists($this, $genericMethod)) { + $args[] = $level; + + return call_user_func_array(array($this, $genericMethod), $args); + } + } + + throw new \BadMethodCallException('Call to undefined method ' . get_class($this) . '::' . $method . '()'); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/WhatFailureGroupHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/WhatFailureGroupHandler.php new file mode 100644 index 0000000..2732ba3 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/WhatFailureGroupHandler.php @@ -0,0 +1,61 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +/** + * Forwards records to multiple handlers suppressing failures of each handler + * and continuing through to give every handler a chance to succeed. + * + * @author Craig D'Amelio + */ +class WhatFailureGroupHandler extends GroupHandler +{ + /** + * {@inheritdoc} + */ + public function handle(array $record) + { + if ($this->processors) { + foreach ($this->processors as $processor) { + $record = call_user_func($processor, $record); + } + } + + foreach ($this->handlers as $handler) { + try { + $handler->handle($record); + } catch (\Exception $e) { + // What failure? + } catch (\Throwable $e) { + // What failure? + } + } + + return false === $this->bubble; + } + + /** + * {@inheritdoc} + */ + public function handleBatch(array $records) + { + foreach ($this->handlers as $handler) { + try { + $handler->handleBatch($records); + } catch (\Exception $e) { + // What failure? + } catch (\Throwable $e) { + // What failure? + } + } + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/ZendMonitorHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/ZendMonitorHandler.php new file mode 100644 index 0000000..f22cf21 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/ZendMonitorHandler.php @@ -0,0 +1,95 @@ + + * + * 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\NormalizerFormatter; +use Monolog\Logger; + +/** + * Handler sending logs to Zend Monitor + * + * @author Christian Bergau + */ +class ZendMonitorHandler extends AbstractProcessingHandler +{ + /** + * Monolog level / ZendMonitor Custom Event priority map + * + * @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, + ); + + /** + * Construct + * + * @param int $level + * @param bool $bubble + * @throws MissingExtensionException + */ + 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'); + } + parent::__construct($level, $bubble); + } + + /** + * {@inheritdoc} + */ + protected function write(array $record) + { + $this->writeZendMonitorCustomEvent( + $this->levelMap[$record['level']], + $record['message'], + $record['formatted'] + ); + } + + /** + * Write a record to Zend Monitor + * + * @param int $level + * @param string $message + * @param array $formatted + */ + protected function writeZendMonitorCustomEvent($level, $message, $formatted) + { + zend_monitor_custom_event($level, $message, $formatted); + } + + /** + * {@inheritdoc} + */ + public function getDefaultFormatter() + { + return new NormalizerFormatter(); + } + + /** + * Get the level map + * + * @return array + */ + public function getLevelMap() + { + return $this->levelMap; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Logger.php b/vendor/monolog/monolog/src/Monolog/Logger.php new file mode 100644 index 0000000..49d00af --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Logger.php @@ -0,0 +1,700 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog; + +use Monolog\Handler\HandlerInterface; +use Monolog\Handler\StreamHandler; +use Psr\Log\LoggerInterface; +use Psr\Log\InvalidArgumentException; + +/** + * Monolog log channel + * + * It contains a stack of Handlers and a stack of Processors, + * and uses them to store records that are added to it. + * + * @author Jordi Boggiano + */ +class Logger implements LoggerInterface +{ + /** + * Detailed debug information + */ + const DEBUG = 100; + + /** + * Interesting events + * + * Examples: User logs in, SQL logs. + */ + const INFO = 200; + + /** + * Uncommon events + */ + const NOTICE = 250; + + /** + * Exceptional occurrences that are not errors + * + * Examples: Use of deprecated APIs, poor use of an API, + * undesirable things that are not necessarily wrong. + */ + const WARNING = 300; + + /** + * Runtime errors + */ + const ERROR = 400; + + /** + * Critical conditions + * + * Example: Application component unavailable, unexpected exception. + */ + const CRITICAL = 500; + + /** + * Action must be taken immediately + * + * Example: Entire website down, database unavailable, etc. + * This should trigger the SMS alerts and wake you up. + */ + const ALERT = 550; + + /** + * Urgent alert. + */ + const EMERGENCY = 600; + + /** + * Monolog API version + * + * This is only bumped when API breaks are done and should + * follow the major version of the library + * + * @var int + */ + const API = 1; + + /** + * Logging levels from syslog protocol defined in RFC 5424 + * + * @var array $levels Logging levels + */ + protected static $levels = array( + self::DEBUG => 'DEBUG', + self::INFO => 'INFO', + self::NOTICE => 'NOTICE', + self::WARNING => 'WARNING', + self::ERROR => 'ERROR', + self::CRITICAL => 'CRITICAL', + self::ALERT => 'ALERT', + self::EMERGENCY => 'EMERGENCY', + ); + + /** + * @var \DateTimeZone + */ + protected static $timezone; + + /** + * @var string + */ + protected $name; + + /** + * The handler stack + * + * @var HandlerInterface[] + */ + protected $handlers; + + /** + * Processors that will process all log records + * + * To process records of a single handler instead, add the processor on that specific handler + * + * @var callable[] + */ + protected $processors; + + /** + * @var bool + */ + protected $microsecondTimestamps = true; + + /** + * @param string $name The logging channel + * @param HandlerInterface[] $handlers Optional stack of handlers, the first one in the array is called first, etc. + * @param callable[] $processors Optional array of processors + */ + public function __construct($name, array $handlers = array(), array $processors = array()) + { + $this->name = $name; + $this->handlers = $handlers; + $this->processors = $processors; + } + + /** + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Return a new cloned instance with the name changed + * + * @return static + */ + public function withName($name) + { + $new = clone $this; + $new->name = $name; + + return $new; + } + + /** + * Pushes a handler on to the stack. + * + * @param HandlerInterface $handler + * @return $this + */ + public function pushHandler(HandlerInterface $handler) + { + array_unshift($this->handlers, $handler); + + return $this; + } + + /** + * Pops a handler from the stack + * + * @return HandlerInterface + */ + public function popHandler() + { + if (!$this->handlers) { + throw new \LogicException('You tried to pop from an empty handler stack.'); + } + + return array_shift($this->handlers); + } + + /** + * Set handlers, replacing all existing ones. + * + * If a map is passed, keys will be ignored. + * + * @param HandlerInterface[] $handlers + * @return $this + */ + public function setHandlers(array $handlers) + { + $this->handlers = array(); + foreach (array_reverse($handlers) as $handler) { + $this->pushHandler($handler); + } + + return $this; + } + + /** + * @return HandlerInterface[] + */ + public function getHandlers() + { + return $this->handlers; + } + + /** + * Adds a processor on to the stack. + * + * @param callable $callback + * @return $this + */ + public function pushProcessor($callback) + { + if (!is_callable($callback)) { + throw new \InvalidArgumentException('Processors must be valid callables (callback or object with an __invoke method), '.var_export($callback, true).' given'); + } + array_unshift($this->processors, $callback); + + return $this; + } + + /** + * Removes the processor on top of the stack and returns it. + * + * @return callable + */ + public function popProcessor() + { + if (!$this->processors) { + throw new \LogicException('You tried to pop from an empty processor stack.'); + } + + return array_shift($this->processors); + } + + /** + * @return callable[] + */ + public function getProcessors() + { + return $this->processors; + } + + /** + * Control the use of microsecond resolution timestamps in the 'datetime' + * member of new records. + * + * Generating microsecond resolution timestamps by calling + * microtime(true), formatting the result via sprintf() and then parsing + * the resulting string via \DateTime::createFromFormat() can incur + * a measurable runtime overhead vs simple usage of DateTime to capture + * a second resolution timestamp in systems which generate a large number + * of log events. + * + * @param bool $micro True to use microtime() to create timestamps + */ + public function useMicrosecondTimestamps($micro) + { + $this->microsecondTimestamps = (bool) $micro; + } + + /** + * Adds a log record. + * + * @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 + */ + public function addRecord($level, $message, array $context = array()) + { + if (!$this->handlers) { + $this->pushHandler(new StreamHandler('php://stderr', static::DEBUG)); + } + + $levelName = static::getLevelName($level); + + // check if any handler will handle this message so we can return early and save cycles + $handlerKey = null; + reset($this->handlers); + while ($handler = current($this->handlers)) { + if ($handler->isHandling(array('level' => $level))) { + $handlerKey = key($this->handlers); + break; + } + + next($this->handlers); + } + + if (null === $handlerKey) { + return false; + } + + if (!static::$timezone) { + static::$timezone = new \DateTimeZone(date_default_timezone_get() ?: 'UTC'); + } + + // php7.1+ always has microseconds enabled, so we do not need this hack + 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->setTimezone(static::$timezone); + + $record = array( + 'message' => (string) $message, + 'context' => $context, + 'level' => $level, + 'level_name' => $levelName, + 'channel' => $this->name, + 'datetime' => $ts, + 'extra' => array(), + ); + + foreach ($this->processors as $processor) { + $record = call_user_func($processor, $record); + } + + while ($handler = current($this->handlers)) { + if (true === $handler->handle($record)) { + break; + } + + next($this->handlers); + } + + return true; + } + + /** + * 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 + */ + public function addDebug($message, array $context = array()) + { + return $this->addRecord(static::DEBUG, $message, $context); + } + + /** + * 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 + */ + public function addInfo($message, array $context = array()) + { + return $this->addRecord(static::INFO, $message, $context); + } + + /** + * 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 + */ + public function addNotice($message, array $context = array()) + { + return $this->addRecord(static::NOTICE, $message, $context); + } + + /** + * 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 + */ + public function addWarning($message, array $context = array()) + { + return $this->addRecord(static::WARNING, $message, $context); + } + + /** + * 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 + */ + public function addError($message, array $context = array()) + { + return $this->addRecord(static::ERROR, $message, $context); + } + + /** + * 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 + */ + public function addCritical($message, array $context = array()) + { + return $this->addRecord(static::CRITICAL, $message, $context); + } + + /** + * 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 + */ + public function addAlert($message, array $context = array()) + { + return $this->addRecord(static::ALERT, $message, $context); + } + + /** + * 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 + */ + public function addEmergency($message, array $context = array()) + { + return $this->addRecord(static::EMERGENCY, $message, $context); + } + + /** + * Gets all supported logging levels. + * + * @return array Assoc array with human-readable level names => level codes. + */ + public static function getLevels() + { + return array_flip(static::$levels); + } + + /** + * Gets the name of the logging level. + * + * @param int $level + * @return string + */ + public static function getLevelName($level) + { + if (!isset(static::$levels[$level])) { + throw new InvalidArgumentException('Level "'.$level.'" is not defined, use one of: '.implode(', ', array_keys(static::$levels))); + } + + return static::$levels[$level]; + } + + /** + * Converts PSR-3 levels to Monolog ones if necessary + * + * @param string|int 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)); + } + + return $level; + } + + /** + * Checks whether the Logger has a handler that listens on the given level + * + * @param int $level + * @return Boolean + */ + public function isHandling($level) + { + $record = array( + 'level' => $level, + ); + + foreach ($this->handlers as $handler) { + if ($handler->isHandling($record)) { + return true; + } + } + + return false; + } + + /** + * 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 + */ + public function log($level, $message, array $context = array()) + { + $level = static::toMonologLevel($level); + + return $this->addRecord($level, $message, $context); + } + + /** + * Adds a log record at the DEBUG level. + * + * 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 + */ + public function debug($message, array $context = array()) + { + return $this->addRecord(static::DEBUG, $message, $context); + } + + /** + * Adds a log record at the INFO level. + * + * 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 + */ + public function info($message, array $context = array()) + { + return $this->addRecord(static::INFO, $message, $context); + } + + /** + * Adds a log record at the NOTICE level. + * + * 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 + */ + public function notice($message, array $context = array()) + { + return $this->addRecord(static::NOTICE, $message, $context); + } + + /** + * Adds a log record at the WARNING level. + * + * 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 + */ + public function warn($message, array $context = array()) + { + return $this->addRecord(static::WARNING, $message, $context); + } + + /** + * Adds a log record at the WARNING level. + * + * 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 + */ + public function warning($message, array $context = array()) + { + return $this->addRecord(static::WARNING, $message, $context); + } + + /** + * Adds a log record at the ERROR level. + * + * 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 + */ + public function err($message, array $context = array()) + { + return $this->addRecord(static::ERROR, $message, $context); + } + + /** + * Adds a log record at the ERROR level. + * + * 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 + */ + public function error($message, array $context = array()) + { + return $this->addRecord(static::ERROR, $message, $context); + } + + /** + * Adds a log record at the CRITICAL level. + * + * 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 + */ + public function crit($message, array $context = array()) + { + return $this->addRecord(static::CRITICAL, $message, $context); + } + + /** + * Adds a log record at the CRITICAL level. + * + * 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 + */ + public function critical($message, array $context = array()) + { + return $this->addRecord(static::CRITICAL, $message, $context); + } + + /** + * Adds a log record at the ALERT level. + * + * 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 + */ + public function alert($message, array $context = array()) + { + return $this->addRecord(static::ALERT, $message, $context); + } + + /** + * Adds a log record at the EMERGENCY level. + * + * 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 + */ + public function emerg($message, array $context = array()) + { + return $this->addRecord(static::EMERGENCY, $message, $context); + } + + /** + * Adds a log record at the EMERGENCY level. + * + * 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 + */ + public function emergency($message, array $context = array()) + { + return $this->addRecord(static::EMERGENCY, $message, $context); + } + + /** + * Set the timezone to be used for the timestamp of log records. + * + * This is stored globally for all Logger instances + * + * @param \DateTimeZone $tz Timezone object + */ + public static function setTimezone(\DateTimeZone $tz) + { + self::$timezone = $tz; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/GitProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/GitProcessor.php new file mode 100644 index 0000000..1899400 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Processor/GitProcessor.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 Monolog\Processor; + +use Monolog\Logger; + +/** + * Injects Git branch and Git commit SHA in all records + * + * @author Nick Otter + * @author Jordi Boggiano + */ +class GitProcessor +{ + private $level; + private static $cache; + + public function __construct($level = Logger::DEBUG) + { + $this->level = Logger::toMonologLevel($level); + } + + /** + * @param array $record + * @return array + */ + public function __invoke(array $record) + { + // return if the level is not high enough + if ($record['level'] < $this->level) { + return $record; + } + + $record['extra']['git'] = self::getGitInfo(); + + return $record; + } + + private static function getGitInfo() + { + if (self::$cache) { + return self::$cache; + } + + $branches = `git branch -v --no-abbrev`; + if (preg_match('{^\* (.+?)\s+([a-f0-9]{40})(?:\s|$)}m', $branches, $matches)) { + return self::$cache = array( + 'branch' => $matches[1], + 'commit' => $matches[2], + ); + } + + return self::$cache = array(); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/IntrospectionProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/IntrospectionProcessor.php new file mode 100644 index 0000000..2691630 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Processor/IntrospectionProcessor.php @@ -0,0 +1,107 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Processor; + +use Monolog\Logger; + +/** + * Injects line/file:class/function where the log message came from + * + * Warning: This only works if the handler processes the logs directly. + * If you put the processor on a handler that is behind a FingersCrossedHandler + * for example, the processor will only be called once the trigger level is reached, + * and all the log records will have the same file/line/.. data from the call that + * triggered the FingersCrossedHandler. + * + * @author Jordi Boggiano + */ +class IntrospectionProcessor +{ + private $level; + + private $skipClassesPartials; + + private $skipStackFramesCount; + + private $skipFunctions = array( + 'call_user_func', + 'call_user_func_array', + ); + + public function __construct($level = Logger::DEBUG, array $skipClassesPartials = array(), $skipStackFramesCount = 0) + { + $this->level = Logger::toMonologLevel($level); + $this->skipClassesPartials = array_merge(array('Monolog\\'), $skipClassesPartials); + $this->skipStackFramesCount = $skipStackFramesCount; + } + + /** + * @param array $record + * @return array + */ + public function __invoke(array $record) + { + // return if the level is not high enough + if ($record['level'] < $this->level) { + return $record; + } + + $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); + + // skip first since it's always the current method + array_shift($trace); + // the call_user_func call is also skipped + array_shift($trace); + + $i = 0; + + while ($this->isTraceClassOrSkippedFunction($trace, $i)) { + if (isset($trace[$i]['class'])) { + foreach ($this->skipClassesPartials as $part) { + if (strpos($trace[$i]['class'], $part) !== false) { + $i++; + continue 2; + } + } + } elseif (in_array($trace[$i]['function'], $this->skipFunctions)) { + $i++; + continue; + } + + break; + } + + $i += $this->skipStackFramesCount; + + // we should have the call source now + $record['extra'] = array_merge( + $record['extra'], + array( + 'file' => isset($trace[$i - 1]['file']) ? $trace[$i - 1]['file'] : null, + 'line' => isset($trace[$i - 1]['line']) ? $trace[$i - 1]['line'] : null, + 'class' => isset($trace[$i]['class']) ? $trace[$i]['class'] : null, + 'function' => isset($trace[$i]['function']) ? $trace[$i]['function'] : null, + ) + ); + + return $record; + } + + private function isTraceClassOrSkippedFunction(array $trace, $index) + { + if (!isset($trace[$index])) { + return false; + } + + return isset($trace[$index]['class']) || in_array($trace[$index]['function'], $this->skipFunctions); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/MemoryPeakUsageProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/MemoryPeakUsageProcessor.php new file mode 100644 index 0000000..0543e92 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Processor/MemoryPeakUsageProcessor.php @@ -0,0 +1,35 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Processor; + +/** + * Injects memory_get_peak_usage in all records + * + * @see Monolog\Processor\MemoryProcessor::__construct() for options + * @author Rob Jensen + */ +class MemoryPeakUsageProcessor extends MemoryProcessor +{ + /** + * @param array $record + * @return array + */ + public function __invoke(array $record) + { + $bytes = memory_get_peak_usage($this->realUsage); + $formatted = $this->formatBytes($bytes); + + $record['extra']['memory_peak_usage'] = $formatted; + + return $record; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/MemoryProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/MemoryProcessor.php new file mode 100644 index 0000000..85f9dc5 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Processor/MemoryProcessor.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\Processor; + +/** + * Some methods that are common for all memory processors + * + * @author Rob Jensen + */ +abstract class MemoryProcessor +{ + /** + * @var bool If true, get the real size of memory allocated from system. Else, only the memory used by emalloc() is reported. + */ + protected $realUsage; + + /** + * @var bool If true, then format memory size to human readable string (MB, KB, B depending on size) + */ + protected $useFormatting; + + /** + * @param bool $realUsage Set this to true to get the real size of memory allocated from system. + * @param bool $useFormatting If true, then format memory size to human readable string (MB, KB, B depending on size) + */ + public function __construct($realUsage = true, $useFormatting = true) + { + $this->realUsage = (boolean) $realUsage; + $this->useFormatting = (boolean) $useFormatting; + } + + /** + * Formats bytes into a human readable string if $this->useFormatting is true, otherwise return $bytes as is + * + * @param int $bytes + * @return string|int Formatted string if $this->useFormatting is true, otherwise return $bytes as is + */ + protected function formatBytes($bytes) + { + $bytes = (int) $bytes; + + if (!$this->useFormatting) { + return $bytes; + } + + if ($bytes > 1024 * 1024) { + return round($bytes / 1024 / 1024, 2).' MB'; + } elseif ($bytes > 1024) { + return round($bytes / 1024, 2).' KB'; + } + + return $bytes . ' B'; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/MemoryUsageProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/MemoryUsageProcessor.php new file mode 100644 index 0000000..2783d65 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Processor/MemoryUsageProcessor.php @@ -0,0 +1,35 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Processor; + +/** + * Injects memory_get_usage in all records + * + * @see Monolog\Processor\MemoryProcessor::__construct() for options + * @author Rob Jensen + */ +class MemoryUsageProcessor extends MemoryProcessor +{ + /** + * @param array $record + * @return array + */ + public function __invoke(array $record) + { + $bytes = memory_get_usage($this->realUsage); + $formatted = $this->formatBytes($bytes); + + $record['extra']['memory_usage'] = $formatted; + + return $record; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/MercurialProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/MercurialProcessor.php new file mode 100644 index 0000000..7c07a7e --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Processor/MercurialProcessor.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\Processor; + +use Monolog\Logger; + +/** + * Injects Hg branch and Hg revision number in all records + * + * @author Jonathan A. Schweder + */ +class MercurialProcessor +{ + private $level; + private static $cache; + + public function __construct($level = Logger::DEBUG) + { + $this->level = Logger::toMonologLevel($level); + } + + /** + * @param array $record + * @return array + */ + public function __invoke(array $record) + { + // return if the level is not high enough + if ($record['level'] < $this->level) { + return $record; + } + + $record['extra']['hg'] = self::getMercurialInfo(); + + return $record; + } + + private static function getMercurialInfo() + { + if (self::$cache) { + return self::$cache; + } + + $result = explode(' ', trim(`hg id -nb`)); + if (count($result) >= 3) { + return self::$cache = array( + 'branch' => $result[1], + 'revision' => $result[2], + ); + } + + return self::$cache = array(); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/ProcessIdProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/ProcessIdProcessor.php new file mode 100644 index 0000000..9d3f559 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Processor/ProcessIdProcessor.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\Processor; + +/** + * Adds value of getmypid into records + * + * @author Andreas Hörnicke + */ +class ProcessIdProcessor +{ + /** + * @param array $record + * @return array + */ + public function __invoke(array $record) + { + $record['extra']['process_id'] = getmypid(); + + return $record; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php new file mode 100644 index 0000000..c2686ce --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php @@ -0,0 +1,48 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Processor; + +/** + * Processes a record's message according to PSR-3 rules + * + * It replaces {foo} with the value from $context['foo'] + * + * @author Jordi Boggiano + */ +class PsrLogMessageProcessor +{ + /** + * @param array $record + * @return array + */ + public function __invoke(array $record) + { + if (false === strpos($record['message'], '{')) { + return $record; + } + + $replacements = array(); + foreach ($record['context'] as $key => $val) { + if (is_null($val) || is_scalar($val) || (is_object($val) && method_exists($val, "__toString"))) { + $replacements['{'.$key.'}'] = $val; + } elseif (is_object($val)) { + $replacements['{'.$key.'}'] = '[object '.get_class($val).']'; + } else { + $replacements['{'.$key.'}'] = '['.gettype($val).']'; + } + } + + $record['message'] = strtr($record['message'], $replacements); + + return $record; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/TagProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/TagProcessor.php new file mode 100644 index 0000000..7e2df2a --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Processor/TagProcessor.php @@ -0,0 +1,44 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Processor; + +/** + * Adds a tags array into record + * + * @author Martijn Riemers + */ +class TagProcessor +{ + private $tags; + + public function __construct(array $tags = array()) + { + $this->setTags($tags); + } + + public function addTags(array $tags = array()) + { + $this->tags = array_merge($this->tags, $tags); + } + + public function setTags(array $tags = array()) + { + $this->tags = $tags; + } + + public function __invoke(array $record) + { + $record['extra']['tags'] = $this->tags; + + return $record; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/UidProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/UidProcessor.php new file mode 100644 index 0000000..812707c --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Processor/UidProcessor.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 Monolog\Processor; + +/** + * Adds a unique identifier into records + * + * @author Simon Mönch + */ +class UidProcessor +{ + private $uid; + + public function __construct($length = 7) + { + if (!is_int($length) || $length > 32 || $length < 1) { + throw new \InvalidArgumentException('The uid length must be an integer between 1 and 32'); + } + + $this->uid = substr(hash('md5', uniqid('', true)), 0, $length); + } + + public function __invoke(array $record) + { + $record['extra']['uid'] = $this->uid; + + return $record; + } + + /** + * @return string + */ + public function getUid() + { + return $this->uid; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/WebProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/WebProcessor.php new file mode 100644 index 0000000..ea1d897 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Processor/WebProcessor.php @@ -0,0 +1,113 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Processor; + +/** + * Injects url/method and remote IP of the current web request in all records + * + * @author Jordi Boggiano + */ +class WebProcessor +{ + /** + * @var array|\ArrayAccess + */ + protected $serverData; + + /** + * Default fields + * + * Array is structured as [key in record.extra => key in $serverData] + * + * @var array + */ + protected $extraFields = array( + 'url' => 'REQUEST_URI', + 'ip' => 'REMOTE_ADDR', + 'http_method' => 'REQUEST_METHOD', + 'server' => 'SERVER_NAME', + 'referrer' => 'HTTP_REFERER', + ); + + /** + * @param array|\ArrayAccess $serverData Array or object w/ ArrayAccess that provides access to the $_SERVER data + * @param array|null $extraFields Field names and the related key inside $serverData to be added. If not provided it defaults to: url, ip, http_method, server, referrer + */ + public function __construct($serverData = null, array $extraFields = null) + { + if (null === $serverData) { + $this->serverData = &$_SERVER; + } elseif (is_array($serverData) || $serverData instanceof \ArrayAccess) { + $this->serverData = $serverData; + } else { + throw new \UnexpectedValueException('$serverData must be an array or object implementing ArrayAccess.'); + } + + if (null !== $extraFields) { + if (isset($extraFields[0])) { + foreach (array_keys($this->extraFields) as $fieldName) { + if (!in_array($fieldName, $extraFields)) { + unset($this->extraFields[$fieldName]); + } + } + } else { + $this->extraFields = $extraFields; + } + } + } + + /** + * @param array $record + * @return array + */ + public function __invoke(array $record) + { + // skip processing if for some reason request data + // is not present (CLI or wonky SAPIs) + if (!isset($this->serverData['REQUEST_URI'])) { + return $record; + } + + $record['extra'] = $this->appendExtraFields($record['extra']); + + return $record; + } + + /** + * @param string $extraName + * @param string $serverName + * @return $this + */ + public function addExtraField($extraName, $serverName) + { + $this->extraFields[$extraName] = $serverName; + + return $this; + } + + /** + * @param array $extra + * @return array + */ + private function appendExtraFields(array $extra) + { + foreach ($this->extraFields as $extraName => $serverName) { + $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/vendor/monolog/monolog/src/Monolog/Registry.php b/vendor/monolog/monolog/src/Monolog/Registry.php new file mode 100644 index 0000000..159b751 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Registry.php @@ -0,0 +1,134 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog; + +use InvalidArgumentException; + +/** + * Monolog log registry + * + * Allows to get `Logger` instances in the global scope + * via static method calls on this class. + * + * + * $application = new Monolog\Logger('application'); + * $api = new Monolog\Logger('api'); + * + * Monolog\Registry::addLogger($application); + * Monolog\Registry::addLogger($api); + * + * function testLogger() + * { + * Monolog\Registry::api()->addError('Sent to $api Logger instance'); + * Monolog\Registry::application()->addError('Sent to $application Logger instance'); + * } + * + * + * @author Tomas Tatarko + */ +class Registry +{ + /** + * List of all loggers in the registry (by named indexes) + * + * @var Logger[] + */ + private static $loggers = array(); + + /** + * Adds new logging channel to the registry + * + * @param Logger $logger Instance of the logging channel + * @param string|null $name Name of the logging channel ($logger->getName() by default) + * @param bool $overwrite Overwrite instance in the registry if the given name already exists? + * @throws \InvalidArgumentException If $overwrite set to false and named Logger instance already exists + */ + public static function addLogger(Logger $logger, $name = null, $overwrite = false) + { + $name = $name ?: $logger->getName(); + + if (isset(self::$loggers[$name]) && !$overwrite) { + throw new InvalidArgumentException('Logger with the given name already exists'); + } + + self::$loggers[$name] = $logger; + } + + /** + * Checks if such logging channel exists by name or instance + * + * @param string|Logger $logger Name or logger instance + */ + public static function hasLogger($logger) + { + if ($logger instanceof Logger) { + $index = array_search($logger, self::$loggers, true); + + return false !== $index; + } else { + return isset(self::$loggers[$logger]); + } + } + + /** + * Removes instance from registry by name or instance + * + * @param string|Logger $logger Name or logger instance + */ + public static function removeLogger($logger) + { + if ($logger instanceof Logger) { + if (false !== ($idx = array_search($logger, self::$loggers, true))) { + unset(self::$loggers[$idx]); + } + } else { + unset(self::$loggers[$logger]); + } + } + + /** + * Clears the registry + */ + public static function clear() + { + self::$loggers = array(); + } + + /** + * Gets Logger instance from the registry + * + * @param string $name Name of the requested Logger instance + * @throws \InvalidArgumentException If named Logger instance is not in the registry + * @return Logger Requested instance of Logger + */ + public static function getInstance($name) + { + if (!isset(self::$loggers[$name])) { + throw new InvalidArgumentException(sprintf('Requested "%s" logger instance is not in the registry', $name)); + } + + return self::$loggers[$name]; + } + + /** + * Gets Logger instance from the registry via static method call + * + * @param string $name Name of the requested Logger instance + * @param array $arguments Arguments passed to static method call + * @throws \InvalidArgumentException If named Logger instance is not in the registry + * @return Logger Requested instance of Logger + */ + public static function __callStatic($name, $arguments) + { + return self::getInstance($name); + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/ErrorHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/ErrorHandlerTest.php new file mode 100644 index 0000000..a9a3f30 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/ErrorHandlerTest.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; + +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/vendor/monolog/monolog/tests/Monolog/Formatter/ChromePHPFormatterTest.php b/vendor/monolog/monolog/tests/Monolog/Formatter/ChromePHPFormatterTest.php new file mode 100644 index 0000000..71c4204 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Formatter/ChromePHPFormatterTest.php @@ -0,0 +1,158 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/Formatter/ElasticaFormatterTest.php b/vendor/monolog/monolog/tests/Monolog/Formatter/ElasticaFormatterTest.php new file mode 100644 index 0000000..90cc48d --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Formatter/ElasticaFormatterTest.php @@ -0,0 +1,79 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/Formatter/FlowdockFormatterTest.php b/vendor/monolog/monolog/tests/Monolog/Formatter/FlowdockFormatterTest.php new file mode 100644 index 0000000..1b2fd97 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Formatter/FlowdockFormatterTest.php @@ -0,0 +1,55 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/Formatter/FluentdFormatterTest.php b/vendor/monolog/monolog/tests/Monolog/Formatter/FluentdFormatterTest.php new file mode 100644 index 0000000..622b2ba --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Formatter/FluentdFormatterTest.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\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/vendor/monolog/monolog/tests/Monolog/Formatter/GelfMessageFormatterTest.php b/vendor/monolog/monolog/tests/Monolog/Formatter/GelfMessageFormatterTest.php new file mode 100644 index 0000000..e6bd309 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Formatter/GelfMessageFormatterTest.php @@ -0,0 +1,234 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/Formatter/JsonFormatterTest.php b/vendor/monolog/monolog/tests/Monolog/Formatter/JsonFormatterTest.php new file mode 100644 index 0000000..c9445f3 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Formatter/JsonFormatterTest.php @@ -0,0 +1,183 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/Formatter/LineFormatterTest.php b/vendor/monolog/monolog/tests/Monolog/Formatter/LineFormatterTest.php new file mode 100644 index 0000000..310d93c --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Formatter/LineFormatterTest.php @@ -0,0 +1,222 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/Formatter/LogglyFormatterTest.php b/vendor/monolog/monolog/tests/Monolog/Formatter/LogglyFormatterTest.php new file mode 100644 index 0000000..6d59b3f --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Formatter/LogglyFormatterTest.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\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/vendor/monolog/monolog/tests/Monolog/Formatter/LogstashFormatterTest.php b/vendor/monolog/monolog/tests/Monolog/Formatter/LogstashFormatterTest.php new file mode 100644 index 0000000..9f6b1cc --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Formatter/LogstashFormatterTest.php @@ -0,0 +1,333 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/Formatter/MongoDBFormatterTest.php b/vendor/monolog/monolog/tests/Monolog/Formatter/MongoDBFormatterTest.php new file mode 100644 index 0000000..52e699e --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Formatter/MongoDBFormatterTest.php @@ -0,0 +1,262 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/Formatter/NormalizerFormatterTest.php b/vendor/monolog/monolog/tests/Monolog/Formatter/NormalizerFormatterTest.php new file mode 100644 index 0000000..57bcdf9 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Formatter/NormalizerFormatterTest.php @@ -0,0 +1,423 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/Formatter/ScalarFormatterTest.php b/vendor/monolog/monolog/tests/Monolog/Formatter/ScalarFormatterTest.php new file mode 100644 index 0000000..b1c8fd4 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Formatter/ScalarFormatterTest.php @@ -0,0 +1,110 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/Formatter/WildfireFormatterTest.php b/vendor/monolog/monolog/tests/Monolog/Formatter/WildfireFormatterTest.php new file mode 100644 index 0000000..52f15a3 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Formatter/WildfireFormatterTest.php @@ -0,0 +1,142 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/Handler/AbstractHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/AbstractHandlerTest.php new file mode 100644 index 0000000..568eb9d --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/AbstractHandlerTest.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\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/vendor/monolog/monolog/tests/Monolog/Handler/AbstractProcessingHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/AbstractProcessingHandlerTest.php new file mode 100644 index 0000000..24d4f63 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/AbstractProcessingHandlerTest.php @@ -0,0 +1,80 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/Handler/AmqpHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/AmqpHandlerTest.php new file mode 100644 index 0000000..8e0e723 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/AmqpHandlerTest.php @@ -0,0 +1,136 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/Handler/BrowserConsoleHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/BrowserConsoleHandlerTest.php new file mode 100644 index 0000000..ffb1d74 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/BrowserConsoleHandlerTest.php @@ -0,0 +1,130 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/Handler/BufferHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/BufferHandlerTest.php new file mode 100644 index 0000000..da8b3c3 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/BufferHandlerTest.php @@ -0,0 +1,158 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/Handler/ChromePHPHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/ChromePHPHandlerTest.php new file mode 100644 index 0000000..ef3cd1c --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/ChromePHPHandlerTest.php @@ -0,0 +1,141 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/Handler/CouchDBHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/CouchDBHandlerTest.php new file mode 100644 index 0000000..9fc4b38 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/CouchDBHandlerTest.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; + +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/vendor/monolog/monolog/tests/Monolog/Handler/DeduplicationHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/DeduplicationHandlerTest.php new file mode 100644 index 0000000..e2aff86 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/DeduplicationHandlerTest.php @@ -0,0 +1,165 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/Handler/DoctrineCouchDBHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/DoctrineCouchDBHandlerTest.php new file mode 100644 index 0000000..d67da90 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/DoctrineCouchDBHandlerTest.php @@ -0,0 +1,52 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/Handler/DynamoDbHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/DynamoDbHandlerTest.php new file mode 100644 index 0000000..f3a6968 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/DynamoDbHandlerTest.php @@ -0,0 +1,75 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/Handler/ElasticSearchHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/ElasticSearchHandlerTest.php new file mode 100644 index 0000000..1687074 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/ElasticSearchHandlerTest.php @@ -0,0 +1,239 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/Handler/ErrorLogHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/ErrorLogHandlerTest.php new file mode 100644 index 0000000..99785cb --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/ErrorLogHandlerTest.php @@ -0,0 +1,66 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/Handler/FilterHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/FilterHandlerTest.php new file mode 100644 index 0000000..31b7686 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/FilterHandlerTest.php @@ -0,0 +1,170 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/Handler/FingersCrossedHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/FingersCrossedHandlerTest.php new file mode 100644 index 0000000..b92bf43 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/FingersCrossedHandlerTest.php @@ -0,0 +1,279 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/Handler/FirePHPHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/FirePHPHandlerTest.php new file mode 100644 index 0000000..0eb10a6 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/FirePHPHandlerTest.php @@ -0,0 +1,96 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/Handler/Fixtures/.gitkeep b/vendor/monolog/monolog/tests/Monolog/Handler/Fixtures/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/FleepHookHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/FleepHookHandlerTest.php new file mode 100644 index 0000000..91cdd31 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/FleepHookHandlerTest.php @@ -0,0 +1,85 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/Handler/FlowdockHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/FlowdockHandlerTest.php new file mode 100644 index 0000000..4b120d5 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/FlowdockHandlerTest.php @@ -0,0 +1,88 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/Handler/GelfHandlerLegacyTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/GelfHandlerLegacyTest.php new file mode 100644 index 0000000..9d007b1 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/GelfHandlerLegacyTest.php @@ -0,0 +1,95 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/Handler/GelfHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/GelfHandlerTest.php new file mode 100644 index 0000000..8cdd64f --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/GelfHandlerTest.php @@ -0,0 +1,117 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/Handler/GelfMockMessagePublisher.php b/vendor/monolog/monolog/tests/Monolog/Handler/GelfMockMessagePublisher.php new file mode 100644 index 0000000..873d92f --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/GelfMockMessagePublisher.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\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/vendor/monolog/monolog/tests/Monolog/Handler/GroupHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/GroupHandlerTest.php new file mode 100644 index 0000000..a1b8617 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/GroupHandlerTest.php @@ -0,0 +1,112 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/Handler/HandlerWrapperTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/HandlerWrapperTest.php new file mode 100644 index 0000000..d8d0452 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/HandlerWrapperTest.php @@ -0,0 +1,130 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/Handler/HipChatHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/HipChatHandlerTest.php new file mode 100644 index 0000000..52dc9da --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/HipChatHandlerTest.php @@ -0,0 +1,279 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/Handler/LogEntriesHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/LogEntriesHandlerTest.php new file mode 100644 index 0000000..b2deb40 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/LogEntriesHandlerTest.php @@ -0,0 +1,84 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/Handler/MailHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/MailHandlerTest.php new file mode 100644 index 0000000..6754f3d --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/MailHandlerTest.php @@ -0,0 +1,75 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/Handler/MockRavenClient.php b/vendor/monolog/monolog/tests/Monolog/Handler/MockRavenClient.php new file mode 100644 index 0000000..a083322 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/MockRavenClient.php @@ -0,0 +1,27 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/Handler/MongoDBHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/MongoDBHandlerTest.php new file mode 100644 index 0000000..0fdef63 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/MongoDBHandlerTest.php @@ -0,0 +1,65 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/Handler/NativeMailerHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/NativeMailerHandlerTest.php new file mode 100644 index 0000000..ddf545d --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/NativeMailerHandlerTest.php @@ -0,0 +1,111 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/Handler/NewRelicHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/NewRelicHandlerTest.php new file mode 100644 index 0000000..4d3a615 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/NewRelicHandlerTest.php @@ -0,0 +1,200 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/Handler/NullHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/NullHandlerTest.php new file mode 100644 index 0000000..292df78 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/NullHandlerTest.php @@ -0,0 +1,33 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/Handler/PHPConsoleHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/PHPConsoleHandlerTest.php new file mode 100644 index 0000000..152573e --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/PHPConsoleHandlerTest.php @@ -0,0 +1,273 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/Handler/PsrHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/PsrHandlerTest.php new file mode 100644 index 0000000..64eaab1 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/PsrHandlerTest.php @@ -0,0 +1,50 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/Handler/PushoverHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/PushoverHandlerTest.php new file mode 100644 index 0000000..56df474 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/PushoverHandlerTest.php @@ -0,0 +1,141 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/Handler/RavenHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/RavenHandlerTest.php new file mode 100644 index 0000000..26d212b --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/RavenHandlerTest.php @@ -0,0 +1,255 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/Handler/RedisHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/RedisHandlerTest.php new file mode 100644 index 0000000..689d527 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/RedisHandlerTest.php @@ -0,0 +1,127 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/Handler/RotatingFileHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/RotatingFileHandlerTest.php new file mode 100644 index 0000000..c510617 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/RotatingFileHandlerTest.php @@ -0,0 +1,211 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/Handler/SamplingHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/SamplingHandlerTest.php new file mode 100644 index 0000000..b354cee --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/SamplingHandlerTest.php @@ -0,0 +1,33 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/Handler/Slack/SlackRecordTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/Slack/SlackRecordTest.php new file mode 100644 index 0000000..e1aa96d --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/Slack/SlackRecordTest.php @@ -0,0 +1,387 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/Handler/SlackHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/SlackHandlerTest.php new file mode 100644 index 0000000..b12b01f --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/SlackHandlerTest.php @@ -0,0 +1,155 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/Handler/SlackWebhookHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/SlackWebhookHandlerTest.php new file mode 100644 index 0000000..c9229e2 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/SlackWebhookHandlerTest.php @@ -0,0 +1,107 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/Handler/SlackbotHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/SlackbotHandlerTest.php new file mode 100644 index 0000000..b1b02bd --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/SlackbotHandlerTest.php @@ -0,0 +1,47 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/Handler/SocketHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/SocketHandlerTest.php new file mode 100644 index 0000000..1f9c1f2 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/SocketHandlerTest.php @@ -0,0 +1,309 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/Handler/StreamHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/StreamHandlerTest.php new file mode 100644 index 0000000..487030f --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/StreamHandlerTest.php @@ -0,0 +1,184 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/Handler/SwiftMailerHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/SwiftMailerHandlerTest.php new file mode 100644 index 0000000..8588691 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/SwiftMailerHandlerTest.php @@ -0,0 +1,113 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/Handler/SyslogHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/SyslogHandlerTest.php new file mode 100644 index 0000000..8f9e46b --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/SyslogHandlerTest.php @@ -0,0 +1,44 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/Handler/SyslogUdpHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/SyslogUdpHandlerTest.php new file mode 100644 index 0000000..aa4a334 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/SyslogUdpHandlerTest.php @@ -0,0 +1,65 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/Handler/TestHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/TestHandlerTest.php new file mode 100644 index 0000000..bfb8d3d --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/TestHandlerTest.php @@ -0,0 +1,70 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/Handler/UdpSocketTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/UdpSocketTest.php new file mode 100644 index 0000000..fa524d0 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/UdpSocketTest.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 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/vendor/monolog/monolog/tests/Monolog/Handler/WhatFailureGroupHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/WhatFailureGroupHandlerTest.php new file mode 100644 index 0000000..8d37a1f --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/WhatFailureGroupHandlerTest.php @@ -0,0 +1,121 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/Handler/ZendMonitorHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/ZendMonitorHandlerTest.php new file mode 100644 index 0000000..69b001e --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/ZendMonitorHandlerTest.php @@ -0,0 +1,69 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/LoggerTest.php b/vendor/monolog/monolog/tests/Monolog/LoggerTest.php new file mode 100644 index 0000000..1ecc34a --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/LoggerTest.php @@ -0,0 +1,548 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/Processor/GitProcessorTest.php b/vendor/monolog/monolog/tests/Monolog/Processor/GitProcessorTest.php new file mode 100644 index 0000000..5adb505 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Processor/GitProcessorTest.php @@ -0,0 +1,29 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/Processor/IntrospectionProcessorTest.php b/vendor/monolog/monolog/tests/Monolog/Processor/IntrospectionProcessorTest.php new file mode 100644 index 0000000..0dd411d --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Processor/IntrospectionProcessorTest.php @@ -0,0 +1,123 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/Processor/MemoryPeakUsageProcessorTest.php b/vendor/monolog/monolog/tests/Monolog/Processor/MemoryPeakUsageProcessorTest.php new file mode 100644 index 0000000..eb66614 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Processor/MemoryPeakUsageProcessorTest.php @@ -0,0 +1,42 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/Processor/MemoryUsageProcessorTest.php b/vendor/monolog/monolog/tests/Monolog/Processor/MemoryUsageProcessorTest.php new file mode 100644 index 0000000..4692dbf --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Processor/MemoryUsageProcessorTest.php @@ -0,0 +1,42 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/Processor/MercurialProcessorTest.php b/vendor/monolog/monolog/tests/Monolog/Processor/MercurialProcessorTest.php new file mode 100644 index 0000000..11f2b35 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Processor/MercurialProcessorTest.php @@ -0,0 +1,41 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/Processor/ProcessIdProcessorTest.php b/vendor/monolog/monolog/tests/Monolog/Processor/ProcessIdProcessorTest.php new file mode 100644 index 0000000..458d2a3 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Processor/ProcessIdProcessorTest.php @@ -0,0 +1,30 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/Processor/PsrLogMessageProcessorTest.php b/vendor/monolog/monolog/tests/Monolog/Processor/PsrLogMessageProcessorTest.php new file mode 100644 index 0000000..029a0c0 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Processor/PsrLogMessageProcessorTest.php @@ -0,0 +1,43 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/Processor/TagProcessorTest.php b/vendor/monolog/monolog/tests/Monolog/Processor/TagProcessorTest.php new file mode 100644 index 0000000..0d860c6 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Processor/TagProcessorTest.php @@ -0,0 +1,49 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/Processor/UidProcessorTest.php b/vendor/monolog/monolog/tests/Monolog/Processor/UidProcessorTest.php new file mode 100644 index 0000000..5d13058 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Processor/UidProcessorTest.php @@ -0,0 +1,33 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/Processor/WebProcessorTest.php b/vendor/monolog/monolog/tests/Monolog/Processor/WebProcessorTest.php new file mode 100644 index 0000000..4105baf --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Processor/WebProcessorTest.php @@ -0,0 +1,113 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/PsrLogCompatTest.php b/vendor/monolog/monolog/tests/Monolog/PsrLogCompatTest.php new file mode 100644 index 0000000..ab89944 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/PsrLogCompatTest.php @@ -0,0 +1,47 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/RegistryTest.php b/vendor/monolog/monolog/tests/Monolog/RegistryTest.php new file mode 100644 index 0000000..15fdfbd --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/RegistryTest.php @@ -0,0 +1,153 @@ + + * + * 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/vendor/monolog/monolog/tests/Monolog/TestCase.php b/vendor/monolog/monolog/tests/Monolog/TestCase.php new file mode 100644 index 0000000..4eb7b4c --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/TestCase.php @@ -0,0 +1,58 @@ + + * + * 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/vendor/mtdowling/cron-expression/.editorconfig b/vendor/mtdowling/cron-expression/.editorconfig new file mode 100644 index 0000000..1492202 --- /dev/null +++ b/vendor/mtdowling/cron-expression/.editorconfig @@ -0,0 +1,16 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +indent_style = space +indent_size = 4 +trim_trailing_whitespace = true + +[*.md] +trim_trailing_whitespace = false + +[*.yml] +indent_style = space +indent_size = 2 diff --git a/vendor/mtdowling/cron-expression/CHANGELOG.md b/vendor/mtdowling/cron-expression/CHANGELOG.md new file mode 100644 index 0000000..8ddab90 --- /dev/null +++ b/vendor/mtdowling/cron-expression/CHANGELOG.md @@ -0,0 +1,36 @@ +# Change Log + +## [1.2.0] - 2017-01-22 +### Added +- Added IDE, CodeSniffer, and StyleCI.IO support + +### Changed +- Switched to PSR-4 Autoloading + +### Fixed +- 0 step expressions are handled better +- Fixed `DayOfMonth` validation to be more strict +- Typos + +## [1.1.0] - 2016-01-26 +### Added +- Support for non-hourly offset timezones +- Checks for valid expressions + +### Changed +- Max Iterations no longer hardcoded for `getRunDate()` +- Supports DateTimeImmutable for newer PHP verions + +### Fixed +- Fixed looping bug for PHP 7 when determining the last specified weekday of a month + +## [1.0.3] - 2013-11-23 +### Added +- Now supports expressions with any number of extra spaces, tabs, or newlines + +### Changed +- Using static instead of self in `CronExpression::factory` + +### Fixed +- Fixes issue [#28](https://github.com/mtdowling/cron-expression/issues/28) where PHP increments of ranges were failing due to PHP casting hyphens to 0 +- Only set default timezone if the given $currentTime is not a DateTime instance ([#34](https://github.com/mtdowling/cron-expression/issues/34)) diff --git a/vendor/mtdowling/cron-expression/LICENSE b/vendor/mtdowling/cron-expression/LICENSE new file mode 100644 index 0000000..c6d88ac --- /dev/null +++ b/vendor/mtdowling/cron-expression/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2011 Michael Dowling and contributors + +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/vendor/mtdowling/cron-expression/README.md b/vendor/mtdowling/cron-expression/README.md new file mode 100644 index 0000000..c9e3bf3 --- /dev/null +++ b/vendor/mtdowling/cron-expression/README.md @@ -0,0 +1,71 @@ +PHP Cron Expression Parser +========================== + +[![Latest Stable Version](https://poser.pugx.org/mtdowling/cron-expression/v/stable.png)](https://packagist.org/packages/mtdowling/cron-expression) [![Total Downloads](https://poser.pugx.org/mtdowling/cron-expression/downloads.png)](https://packagist.org/packages/mtdowling/cron-expression) [![Build Status](https://secure.travis-ci.org/mtdowling/cron-expression.png)](http://travis-ci.org/mtdowling/cron-expression) + +The PHP cron expression parser can parse a CRON expression, determine if it is +due to run, calculate the next run date of the expression, and calculate the previous +run date of the expression. You can calculate dates far into the future or past by +skipping n number of matching dates. + +The parser can handle increments of ranges (e.g. */12, 2-59/3), intervals (e.g. 0-9), +lists (e.g. 1,2,3), W to find the nearest weekday for a given day of the month, L to +find the last day of the month, L to find the last given weekday of a month, and hash +(#) to find the nth weekday of a given month. + +Installing +========== + +Add the dependency to your project: + +```bash +composer require mtdowling/cron-expression +``` + +Usage +===== +```php +isDue(); +echo $cron->getNextRunDate()->format('Y-m-d H:i:s'); +echo $cron->getPreviousRunDate()->format('Y-m-d H:i:s'); + +// Works with complex expressions +$cron = Cron\CronExpression::factory('3-59/15 2,6-12 */15 1 2-5'); +echo $cron->getNextRunDate()->format('Y-m-d H:i:s'); + +// Calculate a run date two iterations into the future +$cron = Cron\CronExpression::factory('@daily'); +echo $cron->getNextRunDate(null, 2)->format('Y-m-d H:i:s'); + +// Calculate a run date relative to a specific time +$cron = Cron\CronExpression::factory('@monthly'); +echo $cron->getNextRunDate('2010-01-12 00:00:00')->format('Y-m-d H:i:s'); +``` + +CRON Expressions +================ + +A CRON expression is a string representing the schedule for a particular command to execute. The parts of a CRON schedule are as follows: + + * * * * * * + - - - - - - + | | | | | | + | | | | | + year [optional] + | | | | +----- day of week (0 - 7) (Sunday=0 or 7) + | | | +---------- month (1 - 12) + | | +--------------- day of month (1 - 31) + | +-------------------- hour (0 - 23) + +------------------------- min (0 - 59) + +Requirements +============ + +- PHP 5.3+ +- PHPUnit is required to run the unit tests +- Composer is required to run the unit tests \ No newline at end of file diff --git a/vendor/mtdowling/cron-expression/composer.json b/vendor/mtdowling/cron-expression/composer.json new file mode 100644 index 0000000..ce42d40 --- /dev/null +++ b/vendor/mtdowling/cron-expression/composer.json @@ -0,0 +1,28 @@ +{ + "name": "mtdowling/cron-expression", + "type": "library", + "description": "CRON for PHP: Calculate the next or previous run date and determine if a CRON expression is due", + "keywords": ["cron", "schedule"], + "license": "MIT", + "authors": [{ + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }], + "require": { + "php": ">=5.3.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.0|~5.0" + }, + "autoload": { + "psr-4": { + "Cron\\": "src/Cron/" + } + }, + "autoload-dev": { + "psr-4": { + "Tests\\": "tests/Cron/" + } + } +} \ No newline at end of file diff --git a/vendor/mtdowling/cron-expression/src/Cron/AbstractField.php b/vendor/mtdowling/cron-expression/src/Cron/AbstractField.php new file mode 100644 index 0000000..cd2410a --- /dev/null +++ b/vendor/mtdowling/cron-expression/src/Cron/AbstractField.php @@ -0,0 +1,148 @@ +isIncrementsOfRanges($value)) { + return $this->isInIncrementsOfRanges($dateValue, $value); + } elseif ($this->isRange($value)) { + return $this->isInRange($dateValue, $value); + } + + return $value == '*' || $dateValue == $value; + } + + /** + * Check if a value is a range + * + * @param string $value Value to test + * + * @return bool + */ + public function isRange($value) + { + return strpos($value, '-') !== false; + } + + /** + * Check if a value is an increments of ranges + * + * @param string $value Value to test + * + * @return bool + */ + public function isIncrementsOfRanges($value) + { + return strpos($value, '/') !== false; + } + + /** + * Test if a value is within a range + * + * @param string $dateValue Set date value + * @param string $value Value to test + * + * @return bool + */ + public function isInRange($dateValue, $value) + { + $parts = array_map('trim', explode('-', $value, 2)); + + return $dateValue >= $parts[0] && $dateValue <= $parts[1]; + } + + /** + * Test if a value is within an increments of ranges (offset[-to]/step size) + * + * @param string $dateValue Set date value + * @param string $value Value to test + * + * @return bool + */ + public function isInIncrementsOfRanges($dateValue, $value) + { + $parts = array_map('trim', explode('/', $value, 2)); + $stepSize = isset($parts[1]) ? (int) $parts[1] : 0; + + if ($stepSize === 0) { + return false; + } + + if (($parts[0] == '*' || $parts[0] === '0')) { + return (int) $dateValue % $stepSize == 0; + } + + $range = explode('-', $parts[0], 2); + $offset = $range[0]; + $to = isset($range[1]) ? $range[1] : $dateValue; + // Ensure that the date value is within the range + if ($dateValue < $offset || $dateValue > $to) { + return false; + } + + if ($dateValue > $offset && 0 === $stepSize) { + return false; + } + + for ($i = $offset; $i <= $to; $i+= $stepSize) { + if ($i == $dateValue) { + return true; + } + } + + return false; + } + + /** + * Returns a range of values for the given cron expression + * + * @param string $expression The expression to evaluate + * @param int $max Maximum offset for range + * + * @return array + */ + public function getRangeForExpression($expression, $max) + { + $values = array(); + + if ($this->isRange($expression) || $this->isIncrementsOfRanges($expression)) { + if (!$this->isIncrementsOfRanges($expression)) { + list ($offset, $to) = explode('-', $expression); + $stepSize = 1; + } + else { + $range = array_map('trim', explode('/', $expression, 2)); + $stepSize = isset($range[1]) ? $range[1] : 0; + $range = $range[0]; + $range = explode('-', $range, 2); + $offset = $range[0]; + $to = isset($range[1]) ? $range[1] : $max; + } + $offset = $offset == '*' ? 0 : $offset; + for ($i = $offset; $i <= $to; $i += $stepSize) { + $values[] = $i; + } + sort($values); + } + else { + $values = array($expression); + } + + return $values; + } + +} diff --git a/vendor/mtdowling/cron-expression/src/Cron/CronExpression.php b/vendor/mtdowling/cron-expression/src/Cron/CronExpression.php new file mode 100644 index 0000000..d69b415 --- /dev/null +++ b/vendor/mtdowling/cron-expression/src/Cron/CronExpression.php @@ -0,0 +1,389 @@ + '0 0 1 1 *', + '@annually' => '0 0 1 1 *', + '@monthly' => '0 0 1 * *', + '@weekly' => '0 0 * * 0', + '@daily' => '0 0 * * *', + '@hourly' => '0 * * * *' + ); + + if (isset($mappings[$expression])) { + $expression = $mappings[$expression]; + } + + return new static($expression, $fieldFactory ?: new FieldFactory()); + } + + /** + * Validate a CronExpression. + * + * @param string $expression The CRON expression to validate. + * + * @return bool True if a valid CRON expression was passed. False if not. + * @see \Cron\CronExpression::factory + */ + public static function isValidExpression($expression) + { + try { + self::factory($expression); + } catch (InvalidArgumentException $e) { + return false; + } + + return true; + } + + /** + * Parse a CRON expression + * + * @param string $expression CRON expression (e.g. '8 * * * *') + * @param FieldFactory $fieldFactory Factory to create cron fields + */ + public function __construct($expression, FieldFactory $fieldFactory) + { + $this->fieldFactory = $fieldFactory; + $this->setExpression($expression); + } + + /** + * Set or change the CRON expression + * + * @param string $value CRON expression (e.g. 8 * * * *) + * + * @return CronExpression + * @throws \InvalidArgumentException if not a valid CRON expression + */ + public function setExpression($value) + { + $this->cronParts = preg_split('/\s/', $value, -1, PREG_SPLIT_NO_EMPTY); + if (count($this->cronParts) < 5) { + throw new InvalidArgumentException( + $value . ' is not a valid CRON expression' + ); + } + + foreach ($this->cronParts as $position => $part) { + $this->setPart($position, $part); + } + + return $this; + } + + /** + * Set part of the CRON expression + * + * @param int $position The position of the CRON expression to set + * @param string $value The value to set + * + * @return CronExpression + * @throws \InvalidArgumentException if the value is not valid for the part + */ + public function setPart($position, $value) + { + if (!$this->fieldFactory->getField($position)->validate($value)) { + throw new InvalidArgumentException( + 'Invalid CRON field value ' . $value . ' at position ' . $position + ); + } + + $this->cronParts[$position] = $value; + + return $this; + } + + /** + * Set max iteration count for searching next run dates + * + * @param int $maxIterationCount Max iteration count when searching for next run date + * + * @return CronExpression + */ + public function setMaxIterationCount($maxIterationCount) + { + $this->maxIterationCount = $maxIterationCount; + + return $this; + } + + /** + * Get a next run date relative to the current date or a specific date + * + * @param string|\DateTime $currentTime Relative calculation date + * @param int $nth Number of matches to skip before returning a + * matching next run date. 0, the default, will return the current + * date and time if the next run date falls on the current date and + * time. Setting this value to 1 will skip the first match and go to + * the second match. Setting this value to 2 will skip the first 2 + * matches and so on. + * @param bool $allowCurrentDate Set to TRUE to return the current date if + * it matches the cron expression. + * + * @return \DateTime + * @throws \RuntimeException on too many iterations + */ + public function getNextRunDate($currentTime = 'now', $nth = 0, $allowCurrentDate = false) + { + return $this->getRunDate($currentTime, $nth, false, $allowCurrentDate); + } + + /** + * Get a previous run date relative to the current date or a specific date + * + * @param string|\DateTime $currentTime Relative calculation date + * @param int $nth Number of matches to skip before returning + * @param bool $allowCurrentDate Set to TRUE to return the + * current date if it matches the cron expression + * + * @return \DateTime + * @throws \RuntimeException on too many iterations + * @see \Cron\CronExpression::getNextRunDate + */ + public function getPreviousRunDate($currentTime = 'now', $nth = 0, $allowCurrentDate = false) + { + return $this->getRunDate($currentTime, $nth, true, $allowCurrentDate); + } + + /** + * Get multiple run dates starting at the current date or a specific date + * + * @param int $total Set the total number of dates to calculate + * @param string|\DateTime $currentTime Relative calculation date + * @param bool $invert Set to TRUE to retrieve previous dates + * @param bool $allowCurrentDate Set to TRUE to return the + * current date if it matches the cron expression + * + * @return array Returns an array of run dates + */ + public function getMultipleRunDates($total, $currentTime = 'now', $invert = false, $allowCurrentDate = false) + { + $matches = array(); + for ($i = 0; $i < max(0, $total); $i++) { + try { + $matches[] = $this->getRunDate($currentTime, $i, $invert, $allowCurrentDate); + } catch (RuntimeException $e) { + break; + } + } + + return $matches; + } + + /** + * Get all or part of the CRON expression + * + * @param string $part Specify the part to retrieve or NULL to get the full + * cron schedule string. + * + * @return string|null Returns the CRON expression, a part of the + * CRON expression, or NULL if the part was specified but not found + */ + public function getExpression($part = null) + { + if (null === $part) { + return implode(' ', $this->cronParts); + } elseif (array_key_exists($part, $this->cronParts)) { + return $this->cronParts[$part]; + } + + return null; + } + + /** + * Helper method to output the full expression. + * + * @return string Full CRON expression + */ + public function __toString() + { + return $this->getExpression(); + } + + /** + * Determine if the cron is due to run based on the current date or a + * specific date. This method assumes that the current number of + * seconds are irrelevant, and should be called once per minute. + * + * @param string|\DateTime $currentTime Relative calculation date + * + * @return bool Returns TRUE if the cron is due to run or FALSE if not + */ + public function isDue($currentTime = 'now') + { + if ('now' === $currentTime) { + $currentDate = date('Y-m-d H:i'); + $currentTime = strtotime($currentDate); + } elseif ($currentTime instanceof DateTime) { + $currentDate = clone $currentTime; + // Ensure time in 'current' timezone is used + $currentDate->setTimezone(new DateTimeZone(date_default_timezone_get())); + $currentDate = $currentDate->format('Y-m-d H:i'); + $currentTime = strtotime($currentDate); + } elseif ($currentTime instanceof DateTimeImmutable) { + $currentDate = DateTime::createFromFormat('U', $currentTime->format('U')); + $currentDate->setTimezone(new DateTimeZone(date_default_timezone_get())); + $currentDate = $currentDate->format('Y-m-d H:i'); + $currentTime = strtotime($currentDate); + } else { + $currentTime = new DateTime($currentTime); + $currentTime->setTime($currentTime->format('H'), $currentTime->format('i'), 0); + $currentDate = $currentTime->format('Y-m-d H:i'); + $currentTime = $currentTime->getTimeStamp(); + } + + try { + return $this->getNextRunDate($currentDate, 0, true)->getTimestamp() == $currentTime; + } catch (Exception $e) { + return false; + } + } + + /** + * Get the next or previous run date of the expression relative to a date + * + * @param string|\DateTime $currentTime Relative calculation date + * @param int $nth Number of matches to skip before returning + * @param bool $invert Set to TRUE to go backwards in time + * @param bool $allowCurrentDate Set to TRUE to return the + * current date if it matches the cron expression + * + * @return \DateTime + * @throws \RuntimeException on too many iterations + */ + protected function getRunDate($currentTime = null, $nth = 0, $invert = false, $allowCurrentDate = false) + { + if ($currentTime instanceof DateTime) { + $currentDate = clone $currentTime; + } elseif ($currentTime instanceof DateTimeImmutable) { + $currentDate = DateTime::createFromFormat('U', $currentTime->format('U')); + $currentDate->setTimezone($currentTime->getTimezone()); + } else { + $currentDate = new DateTime($currentTime ?: 'now'); + $currentDate->setTimezone(new DateTimeZone(date_default_timezone_get())); + } + + $currentDate->setTime($currentDate->format('H'), $currentDate->format('i'), 0); + $nextRun = clone $currentDate; + $nth = (int) $nth; + + // We don't have to satisfy * or null fields + $parts = array(); + $fields = array(); + foreach (self::$order as $position) { + $part = $this->getExpression($position); + if (null === $part || '*' === $part) { + continue; + } + $parts[$position] = $part; + $fields[$position] = $this->fieldFactory->getField($position); + } + + // Set a hard limit to bail on an impossible date + for ($i = 0; $i < $this->maxIterationCount; $i++) { + + foreach ($parts as $position => $part) { + $satisfied = false; + // Get the field object used to validate this part + $field = $fields[$position]; + // Check if this is singular or a list + if (strpos($part, ',') === false) { + $satisfied = $field->isSatisfiedBy($nextRun, $part); + } else { + foreach (array_map('trim', explode(',', $part)) as $listPart) { + if ($field->isSatisfiedBy($nextRun, $listPart)) { + $satisfied = true; + break; + } + } + } + + // If the field is not satisfied, then start over + if (!$satisfied) { + $field->increment($nextRun, $invert, $part); + continue 2; + } + } + + // Skip this match if needed + if ((!$allowCurrentDate && $nextRun == $currentDate) || --$nth > -1) { + $this->fieldFactory->getField(0)->increment($nextRun, $invert, isset($parts[0]) ? $parts[0] : null); + continue; + } + + return $nextRun; + } + + // @codeCoverageIgnoreStart + throw new RuntimeException('Impossible CRON expression'); + // @codeCoverageIgnoreEnd + } +} diff --git a/vendor/mtdowling/cron-expression/src/Cron/DayOfMonthField.php b/vendor/mtdowling/cron-expression/src/Cron/DayOfMonthField.php new file mode 100644 index 0000000..53e15bc --- /dev/null +++ b/vendor/mtdowling/cron-expression/src/Cron/DayOfMonthField.php @@ -0,0 +1,173 @@ + + */ +class DayOfMonthField extends AbstractField +{ + /** + * Get the nearest day of the week for a given day in a month + * + * @param int $currentYear Current year + * @param int $currentMonth Current month + * @param int $targetDay Target day of the month + * + * @return \DateTime Returns the nearest date + */ + private static function getNearestWeekday($currentYear, $currentMonth, $targetDay) + { + $tday = str_pad($targetDay, 2, '0', STR_PAD_LEFT); + $target = DateTime::createFromFormat('Y-m-d', "$currentYear-$currentMonth-$tday"); + $currentWeekday = (int) $target->format('N'); + + if ($currentWeekday < 6) { + return $target; + } + + $lastDayOfMonth = $target->format('t'); + + foreach (array(-1, 1, -2, 2) as $i) { + $adjusted = $targetDay + $i; + if ($adjusted > 0 && $adjusted <= $lastDayOfMonth) { + $target->setDate($currentYear, $currentMonth, $adjusted); + if ($target->format('N') < 6 && $target->format('m') == $currentMonth) { + return $target; + } + } + } + } + + public function isSatisfiedBy(DateTime $date, $value) + { + // ? states that the field value is to be skipped + if ($value == '?') { + return true; + } + + $fieldValue = $date->format('d'); + + // Check to see if this is the last day of the month + if ($value == 'L') { + return $fieldValue == $date->format('t'); + } + + // Check to see if this is the nearest weekday to a particular value + if (strpos($value, 'W')) { + // Parse the target day + $targetDay = substr($value, 0, strpos($value, 'W')); + // Find out if the current day is the nearest day of the week + return $date->format('j') == self::getNearestWeekday( + $date->format('Y'), + $date->format('m'), + $targetDay + )->format('j'); + } + + return $this->isSatisfied($date->format('d'), $value); + } + + public function increment(DateTime $date, $invert = false) + { + if ($invert) { + $date->modify('previous day'); + $date->setTime(23, 59); + } else { + $date->modify('next day'); + $date->setTime(0, 0); + } + + return $this; + } + + /** + * Validates that the value is valid for the Day of the Month field + * Days of the month can contain values of 1-31, *, L, or ? by default. This can be augmented with lists via a ',', + * ranges via a '-', or with a '[0-9]W' to specify the closest weekday. + * + * @param string $value + * @return bool + */ + public function validate($value) + { + // Allow wildcards and a single L + if ($value === '?' || $value === '*' || $value === 'L') { + return true; + } + + // If you only contain numbers and are within 1-31 + if ((bool) preg_match('/^\d{1,2}$/', $value) && ($value >= 1 && $value <= 31)) { + return true; + } + + // If you have a -, we will deal with each of your chunks + if ((bool) preg_match('/-/', $value)) { + // We cannot have a range within a list or vice versa + if ((bool) preg_match('/,/', $value)) { + return false; + } + + $chunks = explode('-', $value); + foreach ($chunks as $chunk) { + if (!$this->validate($chunk)) { + return false; + } + } + + return true; + } + + // If you have a comma, we will deal with each value + if ((bool) preg_match('/,/', $value)) { + // We cannot have a range within a list or vice versa + if ((bool) preg_match('/-/', $value)) { + return false; + } + + $chunks = explode(',', $value); + foreach ($chunks as $chunk) { + if (!$this->validate($chunk)) { + return false; + } + } + + return true; + } + + // If you contain a /, we'll deal with it + if ((bool) preg_match('/\//', $value)) { + $chunks = explode('/', $value); + foreach ($chunks as $chunk) { + if (!$this->validate($chunk)) { + return false; + } + } + return true; + } + + // If you end in W, make sure that it has a numeric in front of it + if ((bool) preg_match('/^\d{1,2}W$/', $value)) { + return true; + } + + return false; + } +} diff --git a/vendor/mtdowling/cron-expression/src/Cron/DayOfWeekField.php b/vendor/mtdowling/cron-expression/src/Cron/DayOfWeekField.php new file mode 100644 index 0000000..83e2f4c --- /dev/null +++ b/vendor/mtdowling/cron-expression/src/Cron/DayOfWeekField.php @@ -0,0 +1,141 @@ +convertLiterals($value); + + $currentYear = $date->format('Y'); + $currentMonth = $date->format('m'); + $lastDayOfMonth = $date->format('t'); + + // Find out if this is the last specific weekday of the month + if (strpos($value, 'L')) { + $weekday = str_replace('7', '0', substr($value, 0, strpos($value, 'L'))); + $tdate = clone $date; + $tdate->setDate($currentYear, $currentMonth, $lastDayOfMonth); + while ($tdate->format('w') != $weekday) { + $tdateClone = new DateTime(); + $tdate = $tdateClone + ->setTimezone($tdate->getTimezone()) + ->setDate($currentYear, $currentMonth, --$lastDayOfMonth); + } + + return $date->format('j') == $lastDayOfMonth; + } + + // Handle # hash tokens + if (strpos($value, '#')) { + list($weekday, $nth) = explode('#', $value); + + // 0 and 7 are both Sunday, however 7 matches date('N') format ISO-8601 + if ($weekday === '0') { + $weekday = 7; + } + + // Validate the hash fields + if ($weekday < 0 || $weekday > 7) { + throw new InvalidArgumentException("Weekday must be a value between 0 and 7. {$weekday} given"); + } + if ($nth > 5) { + throw new InvalidArgumentException('There are never more than 5 of a given weekday in a month'); + } + // The current weekday must match the targeted weekday to proceed + if ($date->format('N') != $weekday) { + return false; + } + + $tdate = clone $date; + $tdate->setDate($currentYear, $currentMonth, 1); + $dayCount = 0; + $currentDay = 1; + while ($currentDay < $lastDayOfMonth + 1) { + if ($tdate->format('N') == $weekday) { + if (++$dayCount >= $nth) { + break; + } + } + $tdate->setDate($currentYear, $currentMonth, ++$currentDay); + } + + return $date->format('j') == $currentDay; + } + + // Handle day of the week values + if (strpos($value, '-')) { + $parts = explode('-', $value); + if ($parts[0] == '7') { + $parts[0] = '0'; + } elseif ($parts[1] == '0') { + $parts[1] = '7'; + } + $value = implode('-', $parts); + } + + // Test to see which Sunday to use -- 0 == 7 == Sunday + $format = in_array(7, str_split($value)) ? 'N' : 'w'; + $fieldValue = $date->format($format); + + return $this->isSatisfied($fieldValue, $value); + } + + public function increment(DateTime $date, $invert = false) + { + if ($invert) { + $date->modify('-1 day'); + $date->setTime(23, 59, 0); + } else { + $date->modify('+1 day'); + $date->setTime(0, 0, 0); + } + + return $this; + } + + public function validate($value) + { + $value = $this->convertLiterals($value); + + foreach (explode(',', $value) as $expr) { + if (!preg_match('/^(\*|[0-7](L?|#[1-5]))([\/\,\-][0-7]+)*$/', $expr)) { + return false; + } + } + + return true; + } + + private function convertLiterals($string) + { + return str_ireplace( + array('SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT'), + range(0, 6), + $string + ); + } +} diff --git a/vendor/mtdowling/cron-expression/src/Cron/FieldFactory.php b/vendor/mtdowling/cron-expression/src/Cron/FieldFactory.php new file mode 100644 index 0000000..fa0e6fe --- /dev/null +++ b/vendor/mtdowling/cron-expression/src/Cron/FieldFactory.php @@ -0,0 +1,57 @@ +fields[$position])) { + switch ($position) { + case 0: + $this->fields[$position] = new MinutesField(); + break; + case 1: + $this->fields[$position] = new HoursField(); + break; + case 2: + $this->fields[$position] = new DayOfMonthField(); + break; + case 3: + $this->fields[$position] = new MonthField(); + break; + case 4: + $this->fields[$position] = new DayOfWeekField(); + break; + case 5: + $this->fields[$position] = new YearField(); + break; + default: + throw new InvalidArgumentException( + $position . ' is not a valid position' + ); + } + } + + return $this->fields[$position]; + } +} diff --git a/vendor/mtdowling/cron-expression/src/Cron/FieldInterface.php b/vendor/mtdowling/cron-expression/src/Cron/FieldInterface.php new file mode 100644 index 0000000..be37b93 --- /dev/null +++ b/vendor/mtdowling/cron-expression/src/Cron/FieldInterface.php @@ -0,0 +1,40 @@ +isSatisfied($date->format('H'), $value); + } + + public function increment(DateTime $date, $invert = false, $parts = null) + { + // Change timezone to UTC temporarily. This will + // allow us to go back or forwards and hour even + // if DST will be changed between the hours. + if (is_null($parts) || $parts == '*') { + $timezone = $date->getTimezone(); + $date->setTimezone(new DateTimeZone('UTC')); + if ($invert) { + $date->modify('-1 hour'); + } else { + $date->modify('+1 hour'); + } + $date->setTimezone($timezone); + + $date->setTime($date->format('H'), $invert ? 59 : 0); + return $this; + } + + $parts = strpos($parts, ',') !== false ? explode(',', $parts) : array($parts); + $hours = array(); + foreach ($parts as $part) { + $hours = array_merge($hours, $this->getRangeForExpression($part, 23)); + } + + $current_hour = $date->format('H'); + $position = $invert ? count($hours) - 1 : 0; + if (count($hours) > 1) { + for ($i = 0; $i < count($hours) - 1; $i++) { + if ((!$invert && $current_hour >= $hours[$i] && $current_hour < $hours[$i + 1]) || + ($invert && $current_hour > $hours[$i] && $current_hour <= $hours[$i + 1])) { + $position = $invert ? $i : $i + 1; + break; + } + } + } + + $hour = $hours[$position]; + if ((!$invert && $date->format('H') >= $hour) || ($invert && $date->format('H') <= $hour)) { + $date->modify(($invert ? '-' : '+') . '1 day'); + $date->setTime($invert ? 23 : 0, $invert ? 59 : 0); + } + else { + $date->setTime($hour, $invert ? 59 : 0); + } + + return $this; + } + + public function validate($value) + { + return (bool) preg_match('/^[\*,\/\-0-9]+$/', $value); + } +} diff --git a/vendor/mtdowling/cron-expression/src/Cron/MinutesField.php b/vendor/mtdowling/cron-expression/src/Cron/MinutesField.php new file mode 100644 index 0000000..d8432b5 --- /dev/null +++ b/vendor/mtdowling/cron-expression/src/Cron/MinutesField.php @@ -0,0 +1,62 @@ +isSatisfied($date->format('i'), $value); + } + + public function increment(DateTime $date, $invert = false, $parts = null) + { + if (is_null($parts)) { + if ($invert) { + $date->modify('-1 minute'); + } else { + $date->modify('+1 minute'); + } + return $this; + } + + $parts = strpos($parts, ',') !== false ? explode(',', $parts) : array($parts); + $minutes = array(); + foreach ($parts as $part) { + $minutes = array_merge($minutes, $this->getRangeForExpression($part, 59)); + } + + $current_minute = $date->format('i'); + $position = $invert ? count($minutes) - 1 : 0; + if (count($minutes) > 1) { + for ($i = 0; $i < count($minutes) - 1; $i++) { + if ((!$invert && $current_minute >= $minutes[$i] && $current_minute < $minutes[$i + 1]) || + ($invert && $current_minute > $minutes[$i] && $current_minute <= $minutes[$i + 1])) { + $position = $invert ? $i : $i + 1; + break; + } + } + } + + if ((!$invert && $current_minute >= $minutes[$position]) || ($invert && $current_minute <= $minutes[$position])) { + $date->modify(($invert ? '-' : '+') . '1 hour'); + $date->setTime($date->format('H'), $invert ? 59 : 0); + } + else { + $date->setTime($date->format('H'), $minutes[$position]); + } + + return $this; + } + + public function validate($value) + { + return (bool) preg_match('/^[\*,\/\-0-9]+$/', $value); + } +} diff --git a/vendor/mtdowling/cron-expression/src/Cron/MonthField.php b/vendor/mtdowling/cron-expression/src/Cron/MonthField.php new file mode 100644 index 0000000..0205c17 --- /dev/null +++ b/vendor/mtdowling/cron-expression/src/Cron/MonthField.php @@ -0,0 +1,44 @@ +isSatisfied($date->format('m'), $value); + } + + public function increment(DateTime $date, $invert = false) + { + if ($invert) { + $date->modify('last day of previous month'); + $date->setTime(23, 59); + } else { + $date->modify('first day of next month'); + $date->setTime(0, 0); + } + + return $this; + } + + public function validate($value) + { + return (bool) preg_match('/^[\*,\/\-0-9A-Z]+$/', $value); + } +} diff --git a/vendor/mtdowling/cron-expression/src/Cron/YearField.php b/vendor/mtdowling/cron-expression/src/Cron/YearField.php new file mode 100644 index 0000000..db244fb --- /dev/null +++ b/vendor/mtdowling/cron-expression/src/Cron/YearField.php @@ -0,0 +1,37 @@ +isSatisfied($date->format('Y'), $value); + } + + public function increment(DateTime $date, $invert = false) + { + if ($invert) { + $date->modify('-1 year'); + $date->setDate($date->format('Y'), 12, 31); + $date->setTime(23, 59, 0); + } else { + $date->modify('+1 year'); + $date->setDate($date->format('Y'), 1, 1); + $date->setTime(0, 0, 0); + } + + return $this; + } + + public function validate($value) + { + return (bool) preg_match('/^[\*,\/\-0-9]+$/', $value); + } +} diff --git a/vendor/mtdowling/cron-expression/tests/Cron/AbstractFieldTest.php b/vendor/mtdowling/cron-expression/tests/Cron/AbstractFieldTest.php new file mode 100644 index 0000000..a1d653b --- /dev/null +++ b/vendor/mtdowling/cron-expression/tests/Cron/AbstractFieldTest.php @@ -0,0 +1,86 @@ + + */ +class AbstractFieldTest extends PHPUnit_Framework_TestCase +{ + /** + * @covers Cron\AbstractField::isRange + */ + public function testTestsIfRange() + { + $f = new DayOfWeekField(); + $this->assertTrue($f->isRange('1-2')); + $this->assertFalse($f->isRange('2')); + } + + /** + * @covers Cron\AbstractField::isIncrementsOfRanges + */ + public function testTestsIfIncrementsOfRanges() + { + $f = new DayOfWeekField(); + $this->assertFalse($f->isIncrementsOfRanges('1-2')); + $this->assertTrue($f->isIncrementsOfRanges('1/2')); + $this->assertTrue($f->isIncrementsOfRanges('*/2')); + $this->assertTrue($f->isIncrementsOfRanges('3-12/2')); + } + + /** + * @covers Cron\AbstractField::isInRange + */ + public function testTestsIfInRange() + { + $f = new DayOfWeekField(); + $this->assertTrue($f->isInRange('1', '1-2')); + $this->assertTrue($f->isInRange('2', '1-2')); + $this->assertTrue($f->isInRange('5', '4-12')); + $this->assertFalse($f->isInRange('3', '4-12')); + $this->assertFalse($f->isInRange('13', '4-12')); + } + + /** + * @covers Cron\AbstractField::isInIncrementsOfRanges + */ + public function testTestsIfInIncrementsOfRanges() + { + $f = new DayOfWeekField(); + $this->assertTrue($f->isInIncrementsOfRanges('3', '3-59/2')); + $this->assertTrue($f->isInIncrementsOfRanges('13', '3-59/2')); + $this->assertTrue($f->isInIncrementsOfRanges('15', '3-59/2')); + $this->assertTrue($f->isInIncrementsOfRanges('14', '*/2')); + $this->assertFalse($f->isInIncrementsOfRanges('2', '3-59/13')); + $this->assertFalse($f->isInIncrementsOfRanges('14', '*/13')); + $this->assertFalse($f->isInIncrementsOfRanges('14', '3-59/2')); + $this->assertFalse($f->isInIncrementsOfRanges('3', '2-59')); + $this->assertFalse($f->isInIncrementsOfRanges('3', '2')); + $this->assertFalse($f->isInIncrementsOfRanges('3', '*')); + $this->assertFalse($f->isInIncrementsOfRanges('0', '*/0')); + $this->assertFalse($f->isInIncrementsOfRanges('1', '*/0')); + + $this->assertTrue($f->isInIncrementsOfRanges('4', '4/10')); + $this->assertTrue($f->isInIncrementsOfRanges('14', '4/10')); + $this->assertTrue($f->isInIncrementsOfRanges('34', '4/10')); + } + + /** + * @covers Cron\AbstractField::isSatisfied + */ + public function testTestsIfSatisfied() + { + $f = new DayOfWeekField(); + $this->assertTrue($f->isSatisfied('12', '3-13')); + $this->assertTrue($f->isSatisfied('15', '3-59/12')); + $this->assertTrue($f->isSatisfied('12', '*')); + $this->assertTrue($f->isSatisfied('12', '12')); + $this->assertFalse($f->isSatisfied('12', '3-11')); + $this->assertFalse($f->isSatisfied('12', '3-59/13')); + $this->assertFalse($f->isSatisfied('12', '11')); + } +} diff --git a/vendor/mtdowling/cron-expression/tests/Cron/CronExpressionTest.php b/vendor/mtdowling/cron-expression/tests/Cron/CronExpressionTest.php new file mode 100644 index 0000000..f6fedb9 --- /dev/null +++ b/vendor/mtdowling/cron-expression/tests/Cron/CronExpressionTest.php @@ -0,0 +1,414 @@ + + */ +class CronExpressionTest extends PHPUnit_Framework_TestCase +{ + /** + * @covers Cron\CronExpression::factory + */ + public function testFactoryRecognizesTemplates() + { + $this->assertEquals('0 0 1 1 *', CronExpression::factory('@annually')->getExpression()); + $this->assertEquals('0 0 1 1 *', CronExpression::factory('@yearly')->getExpression()); + $this->assertEquals('0 0 * * 0', CronExpression::factory('@weekly')->getExpression()); + } + + /** + * @covers Cron\CronExpression::__construct + * @covers Cron\CronExpression::getExpression + * @covers Cron\CronExpression::__toString + */ + public function testParsesCronSchedule() + { + // '2010-09-10 12:00:00' + $cron = CronExpression::factory('1 2-4 * 4,5,6 */3'); + $this->assertEquals('1', $cron->getExpression(CronExpression::MINUTE)); + $this->assertEquals('2-4', $cron->getExpression(CronExpression::HOUR)); + $this->assertEquals('*', $cron->getExpression(CronExpression::DAY)); + $this->assertEquals('4,5,6', $cron->getExpression(CronExpression::MONTH)); + $this->assertEquals('*/3', $cron->getExpression(CronExpression::WEEKDAY)); + $this->assertEquals('1 2-4 * 4,5,6 */3', $cron->getExpression()); + $this->assertEquals('1 2-4 * 4,5,6 */3', (string) $cron); + $this->assertNull($cron->getExpression('foo')); + + try { + $cron = CronExpression::factory('A 1 2 3 4'); + $this->fail('Validation exception not thrown'); + } catch (InvalidArgumentException $e) { + } + } + + /** + * @covers Cron\CronExpression::__construct + * @covers Cron\CronExpression::getExpression + * @dataProvider scheduleWithDifferentSeparatorsProvider + */ + public function testParsesCronScheduleWithAnySpaceCharsAsSeparators($schedule, array $expected) + { + $cron = CronExpression::factory($schedule); + $this->assertEquals($expected[0], $cron->getExpression(CronExpression::MINUTE)); + $this->assertEquals($expected[1], $cron->getExpression(CronExpression::HOUR)); + $this->assertEquals($expected[2], $cron->getExpression(CronExpression::DAY)); + $this->assertEquals($expected[3], $cron->getExpression(CronExpression::MONTH)); + $this->assertEquals($expected[4], $cron->getExpression(CronExpression::WEEKDAY)); + $this->assertEquals($expected[5], $cron->getExpression(CronExpression::YEAR)); + } + + /** + * Data provider for testParsesCronScheduleWithAnySpaceCharsAsSeparators + * + * @return array + */ + public static function scheduleWithDifferentSeparatorsProvider() + { + return array( + array("*\t*\t*\t*\t*\t*", array('*', '*', '*', '*', '*', '*')), + array("* * * * * *", array('*', '*', '*', '*', '*', '*')), + array("* \t * \t * \t * \t * \t *", array('*', '*', '*', '*', '*', '*')), + array("*\t \t*\t \t*\t \t*\t \t*\t \t*", array('*', '*', '*', '*', '*', '*')), + ); + } + + /** + * @covers Cron\CronExpression::__construct + * @covers Cron\CronExpression::setExpression + * @covers Cron\CronExpression::setPart + * @expectedException InvalidArgumentException + */ + public function testInvalidCronsWillFail() + { + // Only four values + $cron = CronExpression::factory('* * * 1'); + } + + /** + * @covers Cron\CronExpression::setPart + * @expectedException InvalidArgumentException + */ + public function testInvalidPartsWillFail() + { + // Only four values + $cron = CronExpression::factory('* * * * *'); + $cron->setPart(1, 'abc'); + } + + /** + * Data provider for cron schedule + * + * @return array + */ + public function scheduleProvider() + { + return array( + array('*/2 */2 * * *', '2015-08-10 21:47:27', '2015-08-10 22:00:00', false), + array('* * * * *', '2015-08-10 21:50:37', '2015-08-10 21:50:00', true), + array('* 20,21,22 * * *', '2015-08-10 21:50:00', '2015-08-10 21:50:00', true), + // Handles CSV values + array('* 20,22 * * *', '2015-08-10 21:50:00', '2015-08-10 22:00:00', false), + // CSV values can be complex + array('* 5,21-22 * * *', '2015-08-10 21:50:00', '2015-08-10 21:50:00', true), + array('7-9 * */9 * *', '2015-08-10 22:02:33', '2015-08-18 00:07:00', false), + // 15th minute, of the second hour, every 15 days, in January, every Friday + array('1 * * * 7', '2015-08-10 21:47:27', '2015-08-16 00:01:00', false), + // Test with exact times + array('47 21 * * *', strtotime('2015-08-10 21:47:30'), '2015-08-10 21:47:00', true), + // Test Day of the week (issue #1) + // According cron implementation, 0|7 = sunday, 1 => monday, etc + array('* * * * 0', strtotime('2011-06-15 23:09:00'), '2011-06-19 00:00:00', false), + array('* * * * 7', strtotime('2011-06-15 23:09:00'), '2011-06-19 00:00:00', false), + array('* * * * 1', strtotime('2011-06-15 23:09:00'), '2011-06-20 00:00:00', false), + // Should return the sunday date as 7 equals 0 + array('0 0 * * MON,SUN', strtotime('2011-06-15 23:09:00'), '2011-06-19 00:00:00', false), + array('0 0 * * 1,7', strtotime('2011-06-15 23:09:00'), '2011-06-19 00:00:00', false), + array('0 0 * * 0-4', strtotime('2011-06-15 23:09:00'), '2011-06-16 00:00:00', false), + array('0 0 * * 7-4', strtotime('2011-06-15 23:09:00'), '2011-06-16 00:00:00', false), + array('0 0 * * 4-7', strtotime('2011-06-15 23:09:00'), '2011-06-16 00:00:00', false), + array('0 0 * * 7-3', strtotime('2011-06-15 23:09:00'), '2011-06-19 00:00:00', false), + array('0 0 * * 3-7', strtotime('2011-06-15 23:09:00'), '2011-06-16 00:00:00', false), + array('0 0 * * 3-7', strtotime('2011-06-18 23:09:00'), '2011-06-19 00:00:00', false), + // Test lists of values and ranges (Abhoryo) + array('0 0 * * 2-7', strtotime('2011-06-20 23:09:00'), '2011-06-21 00:00:00', false), + array('0 0 * * 0,2-6', strtotime('2011-06-20 23:09:00'), '2011-06-21 00:00:00', false), + array('0 0 * * 2-7', strtotime('2011-06-18 23:09:00'), '2011-06-19 00:00:00', false), + array('0 0 * * 4-7', strtotime('2011-07-19 00:00:00'), '2011-07-21 00:00:00', false), + // Test increments of ranges + array('0-12/4 * * * *', strtotime('2011-06-20 12:04:00'), '2011-06-20 12:04:00', true), + array('4-59/2 * * * *', strtotime('2011-06-20 12:04:00'), '2011-06-20 12:04:00', true), + array('4-59/2 * * * *', strtotime('2011-06-20 12:06:00'), '2011-06-20 12:06:00', true), + array('4-59/3 * * * *', strtotime('2011-06-20 12:06:00'), '2011-06-20 12:07:00', false), + //array('0 0 * * 0,2-6', strtotime('2011-06-20 23:09:00'), '2011-06-21 00:00:00', false), + // Test Day of the Week and the Day of the Month (issue #1) + array('0 0 1 1 0', strtotime('2011-06-15 23:09:00'), '2012-01-01 00:00:00', false), + array('0 0 1 JAN 0', strtotime('2011-06-15 23:09:00'), '2012-01-01 00:00:00', false), + array('0 0 1 * 0', strtotime('2011-06-15 23:09:00'), '2012-01-01 00:00:00', false), + array('0 0 L * *', strtotime('2011-07-15 00:00:00'), '2011-07-31 00:00:00', false), + // Test the W day of the week modifier for day of the month field + array('0 0 2W * *', strtotime('2011-07-01 00:00:00'), '2011-07-01 00:00:00', true), + array('0 0 1W * *', strtotime('2011-05-01 00:00:00'), '2011-05-02 00:00:00', false), + array('0 0 1W * *', strtotime('2011-07-01 00:00:00'), '2011-07-01 00:00:00', true), + array('0 0 3W * *', strtotime('2011-07-01 00:00:00'), '2011-07-04 00:00:00', false), + array('0 0 16W * *', strtotime('2011-07-01 00:00:00'), '2011-07-15 00:00:00', false), + array('0 0 28W * *', strtotime('2011-07-01 00:00:00'), '2011-07-28 00:00:00', false), + array('0 0 30W * *', strtotime('2011-07-01 00:00:00'), '2011-07-29 00:00:00', false), + array('0 0 31W * *', strtotime('2011-07-01 00:00:00'), '2011-07-29 00:00:00', false), + // Test the year field + array('* * * * * 2012', strtotime('2011-05-01 00:00:00'), '2012-01-01 00:00:00', false), + // Test the last weekday of a month + array('* * * * 5L', strtotime('2011-07-01 00:00:00'), '2011-07-29 00:00:00', false), + array('* * * * 6L', strtotime('2011-07-01 00:00:00'), '2011-07-30 00:00:00', false), + array('* * * * 7L', strtotime('2011-07-01 00:00:00'), '2011-07-31 00:00:00', false), + array('* * * * 1L', strtotime('2011-07-24 00:00:00'), '2011-07-25 00:00:00', false), + array('* * * * TUEL', strtotime('2011-07-24 00:00:00'), '2011-07-26 00:00:00', false), + array('* * * 1 5L', strtotime('2011-12-25 00:00:00'), '2012-01-27 00:00:00', false), + // Test the hash symbol for the nth weekday of a given month + array('* * * * 5#2', strtotime('2011-07-01 00:00:00'), '2011-07-08 00:00:00', false), + array('* * * * 5#1', strtotime('2011-07-01 00:00:00'), '2011-07-01 00:00:00', true), + array('* * * * 3#4', strtotime('2011-07-01 00:00:00'), '2011-07-27 00:00:00', false), + ); + } + + /** + * @covers Cron\CronExpression::isDue + * @covers Cron\CronExpression::getNextRunDate + * @covers Cron\DayOfMonthField + * @covers Cron\DayOfWeekField + * @covers Cron\MinutesField + * @covers Cron\HoursField + * @covers Cron\MonthField + * @covers Cron\YearField + * @covers Cron\CronExpression::getRunDate + * @dataProvider scheduleProvider + */ + public function testDeterminesIfCronIsDue($schedule, $relativeTime, $nextRun, $isDue) + { + $relativeTimeString = is_int($relativeTime) ? date('Y-m-d H:i:s', $relativeTime) : $relativeTime; + + // Test next run date + $cron = CronExpression::factory($schedule); + if (is_string($relativeTime)) { + $relativeTime = new DateTime($relativeTime); + } elseif (is_int($relativeTime)) { + $relativeTime = date('Y-m-d H:i:s', $relativeTime); + } + $this->assertEquals($isDue, $cron->isDue($relativeTime)); + $next = $cron->getNextRunDate($relativeTime, 0, true); + $this->assertEquals(new DateTime($nextRun), $next); + } + + /** + * @covers Cron\CronExpression::isDue + */ + public function testIsDueHandlesDifferentDates() + { + $cron = CronExpression::factory('* * * * *'); + $this->assertTrue($cron->isDue()); + $this->assertTrue($cron->isDue('now')); + $this->assertTrue($cron->isDue(new DateTime('now'))); + $this->assertTrue($cron->isDue(date('Y-m-d H:i'))); + } + + /** + * @covers Cron\CronExpression::isDue + */ + public function testIsDueHandlesDifferentTimezones() + { + $cron = CronExpression::factory('0 15 * * 3'); //Wednesday at 15:00 + $date = '2014-01-01 15:00'; //Wednesday + $utc = new DateTimeZone('UTC'); + $amsterdam = new DateTimeZone('Europe/Amsterdam'); + $tokyo = new DateTimeZone('Asia/Tokyo'); + + date_default_timezone_set('UTC'); + $this->assertTrue($cron->isDue(new DateTime($date, $utc))); + $this->assertFalse($cron->isDue(new DateTime($date, $amsterdam))); + $this->assertFalse($cron->isDue(new DateTime($date, $tokyo))); + + date_default_timezone_set('Europe/Amsterdam'); + $this->assertFalse($cron->isDue(new DateTime($date, $utc))); + $this->assertTrue($cron->isDue(new DateTime($date, $amsterdam))); + $this->assertFalse($cron->isDue(new DateTime($date, $tokyo))); + + date_default_timezone_set('Asia/Tokyo'); + $this->assertFalse($cron->isDue(new DateTime($date, $utc))); + $this->assertFalse($cron->isDue(new DateTime($date, $amsterdam))); + $this->assertTrue($cron->isDue(new DateTime($date, $tokyo))); + } + + /** + * @covers Cron\CronExpression::getPreviousRunDate + */ + public function testCanGetPreviousRunDates() + { + $cron = CronExpression::factory('* * * * *'); + $next = $cron->getNextRunDate('now'); + $two = $cron->getNextRunDate('now', 1); + $this->assertEquals($next, $cron->getPreviousRunDate($two)); + + $cron = CronExpression::factory('* */2 * * *'); + $next = $cron->getNextRunDate('now'); + $two = $cron->getNextRunDate('now', 1); + $this->assertEquals($next, $cron->getPreviousRunDate($two)); + + $cron = CronExpression::factory('* * * */2 *'); + $next = $cron->getNextRunDate('now'); + $two = $cron->getNextRunDate('now', 1); + $this->assertEquals($next, $cron->getPreviousRunDate($two)); + } + + /** + * @covers Cron\CronExpression::getMultipleRunDates + */ + public function testProvidesMultipleRunDates() + { + $cron = CronExpression::factory('*/2 * * * *'); + $this->assertEquals(array( + new DateTime('2008-11-09 00:00:00'), + new DateTime('2008-11-09 00:02:00'), + new DateTime('2008-11-09 00:04:00'), + new DateTime('2008-11-09 00:06:00') + ), $cron->getMultipleRunDates(4, '2008-11-09 00:00:00', false, true)); + } + + /** + * @covers Cron\CronExpression::getMultipleRunDates + * @covers Cron\CronExpression::setMaxIterationCount + */ + public function testProvidesMultipleRunDatesForTheFarFuture() { + // Fails with the default 1000 iteration limit + $cron = CronExpression::factory('0 0 12 1 * */2'); + $cron->setMaxIterationCount(2000); + $this->assertEquals(array( + new DateTime('2016-01-12 00:00:00'), + new DateTime('2018-01-12 00:00:00'), + new DateTime('2020-01-12 00:00:00'), + new DateTime('2022-01-12 00:00:00'), + new DateTime('2024-01-12 00:00:00'), + new DateTime('2026-01-12 00:00:00'), + new DateTime('2028-01-12 00:00:00'), + new DateTime('2030-01-12 00:00:00'), + new DateTime('2032-01-12 00:00:00'), + ), $cron->getMultipleRunDates(9, '2015-04-28 00:00:00', false, true)); + } + + /** + * @covers Cron\CronExpression + */ + public function testCanIterateOverNextRuns() + { + $cron = CronExpression::factory('@weekly'); + $nextRun = $cron->getNextRunDate("2008-11-09 08:00:00"); + $this->assertEquals($nextRun, new DateTime("2008-11-16 00:00:00")); + + // true is cast to 1 + $nextRun = $cron->getNextRunDate("2008-11-09 00:00:00", true, true); + $this->assertEquals($nextRun, new DateTime("2008-11-16 00:00:00")); + + // You can iterate over them + $nextRun = $cron->getNextRunDate($cron->getNextRunDate("2008-11-09 00:00:00", 1, true), 1, true); + $this->assertEquals($nextRun, new DateTime("2008-11-23 00:00:00")); + + // You can skip more than one + $nextRun = $cron->getNextRunDate("2008-11-09 00:00:00", 2, true); + $this->assertEquals($nextRun, new DateTime("2008-11-23 00:00:00")); + $nextRun = $cron->getNextRunDate("2008-11-09 00:00:00", 3, true); + $this->assertEquals($nextRun, new DateTime("2008-11-30 00:00:00")); + } + + /** + * @covers Cron\CronExpression::getRunDate + */ + public function testSkipsCurrentDateByDefault() + { + $cron = CronExpression::factory('* * * * *'); + $current = new DateTime('now'); + $next = $cron->getNextRunDate($current); + $nextPrev = $cron->getPreviousRunDate($next); + $this->assertEquals($current->format('Y-m-d H:i:00'), $nextPrev->format('Y-m-d H:i:s')); + } + + /** + * @covers Cron\CronExpression::getRunDate + * @ticket 7 + */ + public function testStripsForSeconds() + { + $cron = CronExpression::factory('* * * * *'); + $current = new DateTime('2011-09-27 10:10:54'); + $this->assertEquals('2011-09-27 10:11:00', $cron->getNextRunDate($current)->format('Y-m-d H:i:s')); + } + + /** + * @covers Cron\CronExpression::getRunDate + */ + public function testFixesPhpBugInDateIntervalMonth() + { + $cron = CronExpression::factory('0 0 27 JAN *'); + $this->assertEquals('2011-01-27 00:00:00', $cron->getPreviousRunDate('2011-08-22 00:00:00')->format('Y-m-d H:i:s')); + } + + public function testIssue29() + { + $cron = CronExpression::factory('@weekly'); + $this->assertEquals( + '2013-03-10 00:00:00', + $cron->getPreviousRunDate('2013-03-17 00:00:00')->format('Y-m-d H:i:s') + ); + } + + /** + * @see https://github.com/mtdowling/cron-expression/issues/20 + */ + public function testIssue20() { + $e = CronExpression::factory('* * * * MON#1'); + $this->assertTrue($e->isDue(new DateTime('2014-04-07 00:00:00'))); + $this->assertFalse($e->isDue(new DateTime('2014-04-14 00:00:00'))); + $this->assertFalse($e->isDue(new DateTime('2014-04-21 00:00:00'))); + + $e = CronExpression::factory('* * * * SAT#2'); + $this->assertFalse($e->isDue(new DateTime('2014-04-05 00:00:00'))); + $this->assertTrue($e->isDue(new DateTime('2014-04-12 00:00:00'))); + $this->assertFalse($e->isDue(new DateTime('2014-04-19 00:00:00'))); + + $e = CronExpression::factory('* * * * SUN#3'); + $this->assertFalse($e->isDue(new DateTime('2014-04-13 00:00:00'))); + $this->assertTrue($e->isDue(new DateTime('2014-04-20 00:00:00'))); + $this->assertFalse($e->isDue(new DateTime('2014-04-27 00:00:00'))); + } + + /** + * @covers Cron\CronExpression::getRunDate + */ + public function testKeepOriginalTime() + { + $now = new \DateTime; + $strNow = $now->format(DateTime::ISO8601); + $cron = CronExpression::factory('0 0 * * *'); + $cron->getPreviousRunDate($now); + $this->assertEquals($strNow, $now->format(DateTime::ISO8601)); + } + + /** + * @covers Cron\CronExpression::__construct + * @covers Cron\CronExpression::factory + * @covers Cron\CronExpression::isValidExpression + * @covers Cron\CronExpression::setExpression + * @covers Cron\CronExpression::setPart + */ + public function testValidationWorks() + { + // Invalid. Only four values + $this->assertFalse(CronExpression::isValidExpression('* * * 1')); + // Valid + $this->assertTrue(CronExpression::isValidExpression('* * * * 1')); + } +} diff --git a/vendor/mtdowling/cron-expression/tests/Cron/DayOfMonthFieldTest.php b/vendor/mtdowling/cron-expression/tests/Cron/DayOfMonthFieldTest.php new file mode 100644 index 0000000..eff0455 --- /dev/null +++ b/vendor/mtdowling/cron-expression/tests/Cron/DayOfMonthFieldTest.php @@ -0,0 +1,61 @@ + + */ +class DayOfMonthFieldTest extends PHPUnit_Framework_TestCase +{ + /** + * @covers Cron\DayOfMonthField::validate + */ + public function testValidatesField() + { + $f = new DayOfMonthField(); + $this->assertTrue($f->validate('1')); + $this->assertTrue($f->validate('*')); + $this->assertTrue($f->validate('5W,L')); + $this->assertFalse($f->validate('1.')); + } + + /** + * @covers Cron\DayOfMonthField::isSatisfiedBy + */ + public function testChecksIfSatisfied() + { + $f = new DayOfMonthField(); + $this->assertTrue($f->isSatisfiedBy(new DateTime(), '?')); + } + + /** + * @covers Cron\DayOfMonthField::increment + */ + public function testIncrementsDate() + { + $d = new DateTime('2011-03-15 11:15:00'); + $f = new DayOfMonthField(); + $f->increment($d); + $this->assertEquals('2011-03-16 00:00:00', $d->format('Y-m-d H:i:s')); + + $d = new DateTime('2011-03-15 11:15:00'); + $f->increment($d, true); + $this->assertEquals('2011-03-14 23:59:00', $d->format('Y-m-d H:i:s')); + } + + /** + * Day of the month cannot accept a 0 value, it must be between 1 and 31 + * See Github issue #120 + * + * @since 2017-01-22 + */ + public function testDoesNotAccept0Date() + { + $f = new DayOfMonthField(); + $this->assertFalse($f->validate(0)); + } +} diff --git a/vendor/mtdowling/cron-expression/tests/Cron/DayOfWeekFieldTest.php b/vendor/mtdowling/cron-expression/tests/Cron/DayOfWeekFieldTest.php new file mode 100644 index 0000000..182d5e9 --- /dev/null +++ b/vendor/mtdowling/cron-expression/tests/Cron/DayOfWeekFieldTest.php @@ -0,0 +1,117 @@ + + */ +class DayOfWeekFieldTest extends PHPUnit_Framework_TestCase +{ + /** + * @covers Cron\DayOfWeekField::validate + */ + public function testValidatesField() + { + $f = new DayOfWeekField(); + $this->assertTrue($f->validate('1')); + $this->assertTrue($f->validate('*')); + $this->assertTrue($f->validate('*/3,1,1-12')); + $this->assertTrue($f->validate('SUN-2')); + $this->assertFalse($f->validate('1.')); + } + + /** + * @covers Cron\DayOfWeekField::isSatisfiedBy + */ + public function testChecksIfSatisfied() + { + $f = new DayOfWeekField(); + $this->assertTrue($f->isSatisfiedBy(new DateTime(), '?')); + } + + /** + * @covers Cron\DayOfWeekField::increment + */ + public function testIncrementsDate() + { + $d = new DateTime('2011-03-15 11:15:00'); + $f = new DayOfWeekField(); + $f->increment($d); + $this->assertEquals('2011-03-16 00:00:00', $d->format('Y-m-d H:i:s')); + + $d = new DateTime('2011-03-15 11:15:00'); + $f->increment($d, true); + $this->assertEquals('2011-03-14 23:59:00', $d->format('Y-m-d H:i:s')); + } + + /** + * @covers Cron\DayOfWeekField::isSatisfiedBy + * @expectedException InvalidArgumentException + * @expectedExceptionMessage Weekday must be a value between 0 and 7. 12 given + */ + public function testValidatesHashValueWeekday() + { + $f = new DayOfWeekField(); + $this->assertTrue($f->isSatisfiedBy(new DateTime(), '12#1')); + } + + /** + * @covers Cron\DayOfWeekField::isSatisfiedBy + * @expectedException InvalidArgumentException + * @expectedExceptionMessage There are never more than 5 of a given weekday in a month + */ + public function testValidatesHashValueNth() + { + $f = new DayOfWeekField(); + $this->assertTrue($f->isSatisfiedBy(new DateTime(), '3#6')); + } + + /** + * @covers Cron\DayOfWeekField::validate + */ + public function testValidateWeekendHash() + { + $f = new DayOfWeekField(); + $this->assertTrue($f->validate('MON#1')); + $this->assertTrue($f->validate('TUE#2')); + $this->assertTrue($f->validate('WED#3')); + $this->assertTrue($f->validate('THU#4')); + $this->assertTrue($f->validate('FRI#5')); + $this->assertTrue($f->validate('SAT#1')); + $this->assertTrue($f->validate('SUN#3')); + $this->assertTrue($f->validate('MON#1,MON#3')); + } + + /** + * @covers Cron\DayOfWeekField::isSatisfiedBy + */ + public function testHandlesZeroAndSevenDayOfTheWeekValues() + { + $f = new DayOfWeekField(); + $this->assertTrue($f->isSatisfiedBy(new DateTime('2011-09-04 00:00:00'), '0-2')); + $this->assertTrue($f->isSatisfiedBy(new DateTime('2011-09-04 00:00:00'), '6-0')); + + $this->assertTrue($f->isSatisfiedBy(new DateTime('2014-04-20 00:00:00'), 'SUN')); + $this->assertTrue($f->isSatisfiedBy(new DateTime('2014-04-20 00:00:00'), 'SUN#3')); + $this->assertTrue($f->isSatisfiedBy(new DateTime('2014-04-20 00:00:00'), '0#3')); + $this->assertTrue($f->isSatisfiedBy(new DateTime('2014-04-20 00:00:00'), '7#3')); + } + + /** + * @see https://github.com/mtdowling/cron-expression/issues/47 + */ + public function testIssue47() { + $f = new DayOfWeekField(); + $this->assertFalse($f->validate('mon,')); + $this->assertFalse($f->validate('mon-')); + $this->assertFalse($f->validate('*/2,')); + $this->assertFalse($f->validate('-mon')); + $this->assertFalse($f->validate(',1')); + $this->assertFalse($f->validate('*-')); + $this->assertFalse($f->validate(',-')); + } +} diff --git a/vendor/mtdowling/cron-expression/tests/Cron/FieldFactoryTest.php b/vendor/mtdowling/cron-expression/tests/Cron/FieldFactoryTest.php new file mode 100644 index 0000000..f34cc9b --- /dev/null +++ b/vendor/mtdowling/cron-expression/tests/Cron/FieldFactoryTest.php @@ -0,0 +1,43 @@ + + */ +class FieldFactoryTest extends PHPUnit_Framework_TestCase +{ + /** + * @covers Cron\FieldFactory::getField + */ + public function testRetrievesFieldInstances() + { + $mappings = array( + 0 => 'Cron\MinutesField', + 1 => 'Cron\HoursField', + 2 => 'Cron\DayOfMonthField', + 3 => 'Cron\MonthField', + 4 => 'Cron\DayOfWeekField', + 5 => 'Cron\YearField' + ); + + $f = new FieldFactory(); + + foreach ($mappings as $position => $class) { + $this->assertEquals($class, get_class($f->getField($position))); + } + } + + /** + * @covers Cron\FieldFactory::getField + * @expectedException InvalidArgumentException + */ + public function testValidatesFieldPosition() + { + $f = new FieldFactory(); + $f->getField(-1); + } +} diff --git a/vendor/mtdowling/cron-expression/tests/Cron/HoursFieldTest.php b/vendor/mtdowling/cron-expression/tests/Cron/HoursFieldTest.php new file mode 100644 index 0000000..d2d8a22 --- /dev/null +++ b/vendor/mtdowling/cron-expression/tests/Cron/HoursFieldTest.php @@ -0,0 +1,75 @@ + + */ +class HoursFieldTest extends PHPUnit_Framework_TestCase +{ + /** + * @covers Cron\HoursField::validate + */ + public function testValidatesField() + { + $f = new HoursField(); + $this->assertTrue($f->validate('1')); + $this->assertTrue($f->validate('*')); + $this->assertTrue($f->validate('*/3,1,1-12')); + } + + /** + * @covers Cron\HoursField::increment + */ + public function testIncrementsDate() + { + $d = new DateTime('2011-03-15 11:15:00'); + $f = new HoursField(); + $f->increment($d); + $this->assertEquals('2011-03-15 12:00:00', $d->format('Y-m-d H:i:s')); + + $d->setTime(11, 15, 0); + $f->increment($d, true); + $this->assertEquals('2011-03-15 10:59:00', $d->format('Y-m-d H:i:s')); + } + + /** + * @covers Cron\HoursField::increment + */ + public function testIncrementsDateWithThirtyMinuteOffsetTimezone() + { + $tz = date_default_timezone_get(); + date_default_timezone_set('America/St_Johns'); + $d = new DateTime('2011-03-15 11:15:00'); + $f = new HoursField(); + $f->increment($d); + $this->assertEquals('2011-03-15 12:00:00', $d->format('Y-m-d H:i:s')); + + $d->setTime(11, 15, 0); + $f->increment($d, true); + $this->assertEquals('2011-03-15 10:59:00', $d->format('Y-m-d H:i:s')); + date_default_timezone_set($tz); + } + + /** + * @covers Cron\HoursField::increment + */ + public function testIncrementDateWithFifteenMinuteOffsetTimezone() + { + $tz = date_default_timezone_get(); + date_default_timezone_set('Asia/Kathmandu'); + $d = new DateTime('2011-03-15 11:15:00'); + $f = new HoursField(); + $f->increment($d); + $this->assertEquals('2011-03-15 12:00:00', $d->format('Y-m-d H:i:s')); + + $d->setTime(11, 15, 0); + $f->increment($d, true); + $this->assertEquals('2011-03-15 10:59:00', $d->format('Y-m-d H:i:s')); + date_default_timezone_set($tz); + } +} diff --git a/vendor/mtdowling/cron-expression/tests/Cron/MinutesFieldTest.php b/vendor/mtdowling/cron-expression/tests/Cron/MinutesFieldTest.php new file mode 100644 index 0000000..af3fef7 --- /dev/null +++ b/vendor/mtdowling/cron-expression/tests/Cron/MinutesFieldTest.php @@ -0,0 +1,37 @@ + + */ +class MinutesFieldTest extends PHPUnit_Framework_TestCase +{ + /** + * @covers Cron\MinutesField::validate + */ + public function testValidatesField() + { + $f = new MinutesField(); + $this->assertTrue($f->validate('1')); + $this->assertTrue($f->validate('*')); + $this->assertTrue($f->validate('*/3,1,1-12')); + } + + /** + * @covers Cron\MinutesField::increment + */ + public function testIncrementsDate() + { + $d = new DateTime('2011-03-15 11:15:00'); + $f = new MinutesField(); + $f->increment($d); + $this->assertEquals('2011-03-15 11:16:00', $d->format('Y-m-d H:i:s')); + $f->increment($d, true); + $this->assertEquals('2011-03-15 11:15:00', $d->format('Y-m-d H:i:s')); + } +} diff --git a/vendor/mtdowling/cron-expression/tests/Cron/MonthFieldTest.php b/vendor/mtdowling/cron-expression/tests/Cron/MonthFieldTest.php new file mode 100644 index 0000000..2d9b0ad --- /dev/null +++ b/vendor/mtdowling/cron-expression/tests/Cron/MonthFieldTest.php @@ -0,0 +1,81 @@ + + */ +class MonthFieldTest extends PHPUnit_Framework_TestCase +{ + /** + * @covers Cron\MonthField::validate + */ + public function testValidatesField() + { + $f = new MonthField(); + $this->assertTrue($f->validate('12')); + $this->assertTrue($f->validate('*')); + $this->assertTrue($f->validate('*/10,2,1-12')); + $this->assertFalse($f->validate('1.fix-regexp')); + } + + /** + * @covers Cron\MonthField::increment + */ + public function testIncrementsDate() + { + $d = new DateTime('2011-03-15 11:15:00'); + $f = new MonthField(); + $f->increment($d); + $this->assertEquals('2011-04-01 00:00:00', $d->format('Y-m-d H:i:s')); + + $d = new DateTime('2011-03-15 11:15:00'); + $f->increment($d, true); + $this->assertEquals('2011-02-28 23:59:00', $d->format('Y-m-d H:i:s')); + } + + /** + * @covers Cron\MonthField::increment + */ + public function testIncrementsDateWithThirtyMinuteTimezone() + { + $tz = date_default_timezone_get(); + date_default_timezone_set('America/St_Johns'); + $d = new DateTime('2011-03-31 11:59:59'); + $f = new MonthField(); + $f->increment($d); + $this->assertEquals('2011-04-01 00:00:00', $d->format('Y-m-d H:i:s')); + + $d = new DateTime('2011-03-15 11:15:00'); + $f->increment($d, true); + $this->assertEquals('2011-02-28 23:59:00', $d->format('Y-m-d H:i:s')); + date_default_timezone_set($tz); + } + + + /** + * @covers Cron\MonthField::increment + */ + public function testIncrementsYearAsNeeded() + { + $f = new MonthField(); + $d = new DateTime('2011-12-15 00:00:00'); + $f->increment($d); + $this->assertEquals('2012-01-01 00:00:00', $d->format('Y-m-d H:i:s')); + } + + /** + * @covers Cron\MonthField::increment + */ + public function testDecrementsYearAsNeeded() + { + $f = new MonthField(); + $d = new DateTime('2011-01-15 00:00:00'); + $f->increment($d, true); + $this->assertEquals('2010-12-31 23:59:00', $d->format('Y-m-d H:i:s')); + } +} diff --git a/vendor/mtdowling/cron-expression/tests/Cron/YearFieldTest.php b/vendor/mtdowling/cron-expression/tests/Cron/YearFieldTest.php new file mode 100644 index 0000000..b5059ec --- /dev/null +++ b/vendor/mtdowling/cron-expression/tests/Cron/YearFieldTest.php @@ -0,0 +1,37 @@ + + */ +class YearFieldTest extends PHPUnit_Framework_TestCase +{ + /** + * @covers Cron\YearField::validate + */ + public function testValidatesField() + { + $f = new YearField(); + $this->assertTrue($f->validate('2011')); + $this->assertTrue($f->validate('*')); + $this->assertTrue($f->validate('*/10,2012,1-12')); + } + + /** + * @covers Cron\YearField::increment + */ + public function testIncrementsDate() + { + $d = new DateTime('2011-03-15 11:15:00'); + $f = new YearField(); + $f->increment($d); + $this->assertEquals('2012-01-01 00:00:00', $d->format('Y-m-d H:i:s')); + $f->increment($d, true); + $this->assertEquals('2011-12-31 23:59:00', $d->format('Y-m-d H:i:s')); + } +} diff --git a/vendor/myclabs/deep-copy/.gitattributes b/vendor/myclabs/deep-copy/.gitattributes new file mode 100755 index 0000000..8018068 --- /dev/null +++ b/vendor/myclabs/deep-copy/.gitattributes @@ -0,0 +1,7 @@ +# Auto detect text files and perform LF normalization +* text=auto + +*.png binary + +tests/ export-ignore +phpunit.xml.dist export-ignore diff --git a/vendor/myclabs/deep-copy/.gitignore b/vendor/myclabs/deep-copy/.gitignore new file mode 100755 index 0000000..9354171 --- /dev/null +++ b/vendor/myclabs/deep-copy/.gitignore @@ -0,0 +1,6 @@ +.DS_Store +.idea/* + +vendor/* +composer.phar +composer.lock diff --git a/vendor/myclabs/deep-copy/.travis.yml b/vendor/myclabs/deep-copy/.travis.yml new file mode 100755 index 0000000..347c6e7 --- /dev/null +++ b/vendor/myclabs/deep-copy/.travis.yml @@ -0,0 +1,37 @@ +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/vendor/myclabs/deep-copy/LICENSE b/vendor/myclabs/deep-copy/LICENSE new file mode 100644 index 0000000..c3e8350 --- /dev/null +++ b/vendor/myclabs/deep-copy/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2013 My C-Sense + +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/vendor/myclabs/deep-copy/README.md b/vendor/myclabs/deep-copy/README.md new file mode 100644 index 0000000..853b761 --- /dev/null +++ b/vendor/myclabs/deep-copy/README.md @@ -0,0 +1,290 @@ +# DeepCopy + +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) + + +## Table of Contents + +1. [How](#how) +1. [Why](#why) + 1. [Using simply `clone`](#using-simply-clone) + 1. [Overridding `__clone()`](#overridding-__clone) + 1. [With `DeepCopy`](#with-deepcopy) +1. [How it works](#how-it-works) +1. [Going further](#going-further) + 1. [Matchers](#matchers) + 1. [Property name](#property-name) + 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. [Contributing](#contributing) + 1. [Tests](#tests) + +## How? + +Install with Composer: + +```json +composer require myclabs/deep-copy +``` + +Use simply: + +```php +use DeepCopy\DeepCopy; + +$deepCopy = new DeepCopy(); +$myCopy = $deepCopy->copy($myObject); +``` + + +## Why? + +- How do you create copies of your objects? + +```php +$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. + +- But how do you handle **cycles** in the association graph? + +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) + +### 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. + +## Going further + +You can add filters to customize the copy process. + +The method to add a filter is `$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: + +```php +use DeepCopy\Matcher\PropertyNameMatcher; + +$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: + +```php +use DeepCopy\Matcher\PropertyMatcher; + +$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): + +```php +use DeepCopy\TypeMatcher\TypeMatcher; + +$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`. + +#### `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: + +```php +use DeepCopy\DeepCopy; +use DeepCopy\Filter\SetNullFilter; +use DeepCopy\Matcher\PropertyNameMatcher; + +$myObject = MyClass::load(123); +echo $myObject->id; // 123 + +$deepCopy = new DeepCopy(); +$deepCopy->addFilter(new SetNullFilter(), new PropertyNameMatcher('id')); +$myCopy = $deepCopy->copy($myObject); + +echo $myCopy->id; // null +``` + +#### `KeepFilter` + +If you want a property to remain untouched (for example, an association to an object): + +```php +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); + +// $myCopy->category has not been touched +``` + +#### `ReplaceFilter` + + 1. If you want to replace the value of a property: + + ```php + use DeepCopy\DeepCopy; + use DeepCopy\Filter\ReplaceFilter; + use DeepCopy\Matcher\PropertyMatcher; + + $deepCopy = new DeepCopy(); + $callback = function ($currentValue) { + return $currentValue . ' (copy)' + }; + $deepCopy->addFilter(new ReplaceFilter($callback), new PropertyMatcher('MyClass', 'title')); + $myCopy = $deepCopy->copy($myObject); + + // $myCopy->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; + + $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)); + + // $myCopy will contain ['MyClass', 'some string', 'MyClass'] + ``` + + +The `$callback` parameter of the `ReplaceFilter` constructor accepts any PHP callable. + +#### `ShallowCopyFilter` + +Stop *DeepCopy* from recursively copying element, using standard `clone` instead: + +```php +use DeepCopy\DeepCopy; +use DeepCopy\TypeFilter\ShallowCopyFilter; +use DeepCopy\TypeMatcher\TypeMatcher; +use Mockery as m; + +$this->deepCopy = new DeepCopy(); +$this->deepCopy->addTypeFilter( + new ShallowCopyFilter, + new TypeMatcher(m\MockInterface::class) +); + +$myServiceWithMocks = new MyService(m::mock(MyDependency1::class), m::mock(MyDependency2::class)); +// 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`: + +```php +use DeepCopy\DeepCopy; +use DeepCopy\Filter\Doctrine\DoctrineCollectionFilter; +use DeepCopy\Matcher\PropertyTypeMatcher; + +$deepCopy = new DeepCopy(); +$deepCopy->addFilter(new DoctrineCollectionFilter(), new PropertyTypeMatcher('Doctrine\Common\Collections\Collection')); +$myCopy = $deepCopy->copy($myObject); +``` + +#### `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 +``` diff --git a/vendor/myclabs/deep-copy/composer.json b/vendor/myclabs/deep-copy/composer.json new file mode 100644 index 0000000..d20287a --- /dev/null +++ b/vendor/myclabs/deep-copy/composer.json @@ -0,0 +1,21 @@ +{ + "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/" } + }, + "require": { + "php": ">=5.4.0" + }, + "require-dev": { + "doctrine/collections": "1.*", + "phpunit/phpunit": "~4.1" + } +} diff --git a/vendor/myclabs/deep-copy/doc/clone.png b/vendor/myclabs/deep-copy/doc/clone.png new file mode 100644 index 0000000..376afd4 Binary files /dev/null and b/vendor/myclabs/deep-copy/doc/clone.png differ diff --git a/vendor/myclabs/deep-copy/doc/deep-clone.png b/vendor/myclabs/deep-copy/doc/deep-clone.png new file mode 100644 index 0000000..2b37a6d Binary files /dev/null and b/vendor/myclabs/deep-copy/doc/deep-clone.png differ diff --git a/vendor/myclabs/deep-copy/doc/deep-copy.png b/vendor/myclabs/deep-copy/doc/deep-copy.png new file mode 100644 index 0000000..68c508a Binary files /dev/null and b/vendor/myclabs/deep-copy/doc/deep-copy.png differ diff --git a/vendor/myclabs/deep-copy/doc/graph.png b/vendor/myclabs/deep-copy/doc/graph.png new file mode 100644 index 0000000..4d5c942 Binary files /dev/null and b/vendor/myclabs/deep-copy/doc/graph.png differ diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/DeepCopy.php b/vendor/myclabs/deep-copy/src/DeepCopy/DeepCopy.php new file mode 100644 index 0000000..aee9e72 --- /dev/null +++ b/vendor/myclabs/deep-copy/src/DeepCopy/DeepCopy.php @@ -0,0 +1,246 @@ +useCloneMethod = $useCloneMethod; + + $this->addTypeFilter(new SplDoublyLinkedList($this), new TypeMatcher('\SplDoublyLinkedList')); + } + + /** + * Cloning uncloneable properties won't throw exception. + * @param $skipUncloneable + * @return $this + */ + public function skipUncloneable($skipUncloneable = true) + { + $this->skipUncloneable = $skipUncloneable; + return $this; + } + + /** + * Perform a deep copy of the object. + * @param mixed $object + * @return mixed + */ + public function copy($object) + { + $this->hashMap = []; + + return $this->recursiveCopy($object); + } + + public function addFilter(Filter $filter, Matcher $matcher) + { + $this->filters[] = [ + 'matcher' => $matcher, + 'filter' => $filter, + ]; + } + + public function addTypeFilter(TypeFilter $filter, TypeMatcher $matcher) + { + $this->typeFilters[] = [ + 'matcher' => $matcher, + 'filter' => $filter, + ]; + } + + + private function recursiveCopy($var) + { + // Matches Type Filter + if ($filter = $this->getFirstMatchedTypeFilter($this->typeFilters, $var)) { + return $filter->apply($var); + } + + // Resource + if (is_resource($var)) { + return $var; + } + // Array + if (is_array($var)) { + return $this->copyArray($var); + } + // Scalar + if (! is_object($var)) { + return $var; + } + // Object + return $this->copyObject($var); + } + + /** + * Copy an array + * @param array $array + * @return array + */ + private function copyArray(array $array) + { + foreach ($array as $key => $value) { + $array[$key] = $this->recursiveCopy($value); + } + + return $array; + } + + /** + * Copy an object + * @param object $object + * @return object + */ + private function copyObject($object) + { + $objectHash = spl_object_hash($object); + + if (isset($this->hashMap[$objectHash])) { + return $this->hashMap[$objectHash]; + } + + $reflectedObject = new \ReflectionObject($object); + + if (false === $isCloneable = $reflectedObject->isCloneable() and $this->skipUncloneable) { + $this->hashMap[$objectHash] = $object; + return $object; + } + + if (false === $isCloneable) { + throw new CloneException(sprintf( + '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) { + return $newObject; + } + foreach (ReflectionHelper::getProperties($reflectedObject) as $property) { + $this->copyObjectProperty($newObject, $property); + } + + return $newObject; + } + + private function copyObjectProperty($object, ReflectionProperty $property) + { + // Ignore static properties + if ($property->isStatic()) { + return; + } + + // Apply the filters + foreach ($this->filters as $item) { + /** @var Matcher $matcher */ + $matcher = $item['matcher']; + /** @var Filter $filter */ + $filter = $item['filter']; + + if ($matcher->matches($object, $property->getName())) { + $filter->apply( + $object, + $property->getName(), + function ($object) { + return $this->recursiveCopy($object); + } + ); + // If a filter matches, we stop processing this property + return; + } + } + + $property->setAccessible(true); + $propertyValue = $property->getValue($object); + + // Copy the property + $property->setValue($object, $this->recursiveCopy($propertyValue)); + } + + /** + * 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) + { + $matched = $this->first( + $filterRecords, + function (array $record) use ($var) { + /* @var TypeMatcher $matcher */ + $matcher = $record['matcher']; + + return $matcher->matches($var); + } + ); + + return isset($matched) ? $matched['filter'] : null; + } + + /** + * Returns first element that matches predicate, NULL if no such element found. + * @param array $elements + * @param callable $predicate Predicate arguments are: element. + * @return mixed|null + */ + private function first(array $elements, callable $predicate) + { + foreach ($elements as $element) { + if (call_user_func($predicate, $element)) { + return $element; + } + } + + return null; + } +} diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/Exception/CloneException.php b/vendor/myclabs/deep-copy/src/DeepCopy/Exception/CloneException.php new file mode 100644 index 0000000..dd3b617 --- /dev/null +++ b/vendor/myclabs/deep-copy/src/DeepCopy/Exception/CloneException.php @@ -0,0 +1,6 @@ +setAccessible(true); + $oldCollection = $reflectionProperty->getValue($object); + + $newCollection = $oldCollection->map( + function ($item) use ($objectCopier) { + return $objectCopier($item); + } + ); + + $reflectionProperty->setValue($object, $newCollection); + } +} diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineEmptyCollectionFilter.php b/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineEmptyCollectionFilter.php new file mode 100644 index 0000000..f9b3f7a --- /dev/null +++ b/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineEmptyCollectionFilter.php @@ -0,0 +1,24 @@ +setAccessible(true); + + $reflectionProperty->setValue($object, new ArrayCollection()); + } +} \ No newline at end of file diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineProxyFilter.php b/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineProxyFilter.php new file mode 100644 index 0000000..a855277 --- /dev/null +++ b/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineProxyFilter.php @@ -0,0 +1,20 @@ +__load(); + } +} diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Filter.php b/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Filter.php new file mode 100644 index 0000000..48076a1 --- /dev/null +++ b/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Filter.php @@ -0,0 +1,17 @@ +callback = $callable; + } + + /** + * {@inheritdoc} + */ + public function apply($object, $property, $objectCopier) + { + $reflectionProperty = new \ReflectionProperty($object, $property); + $reflectionProperty->setAccessible(true); + + $value = call_user_func($this->callback, $reflectionProperty->getValue($object)); + + $reflectionProperty->setValue($object, $value); + } +} diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/Filter/SetNullFilter.php b/vendor/myclabs/deep-copy/src/DeepCopy/Filter/SetNullFilter.php new file mode 100644 index 0000000..d48f15b --- /dev/null +++ b/vendor/myclabs/deep-copy/src/DeepCopy/Filter/SetNullFilter.php @@ -0,0 +1,22 @@ +setAccessible(true); + $reflectionProperty->setValue($object, null); + } +} diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/Doctrine/DoctrineProxyMatcher.php b/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/Doctrine/DoctrineProxyMatcher.php new file mode 100644 index 0000000..6a7bcf5 --- /dev/null +++ b/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/Doctrine/DoctrineProxyMatcher.php @@ -0,0 +1,20 @@ +class = $class; + $this->property = $property; + } + + /** + * {@inheritdoc} + */ + public function matches($object, $property) + { + return ($object instanceof $this->class) && ($property == $this->property); + } +} diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyNameMatcher.php b/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyNameMatcher.php new file mode 100644 index 0000000..9d9575f --- /dev/null +++ b/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyNameMatcher.php @@ -0,0 +1,30 @@ +property = $property; + } + + /** + * {@inheritdoc} + */ + public function matches($object, $property) + { + return $property == $this->property; + } +} diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyTypeMatcher.php b/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyTypeMatcher.php new file mode 100644 index 0000000..da116c1 --- /dev/null +++ b/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyTypeMatcher.php @@ -0,0 +1,38 @@ +propertyType = $propertyType; + } + + /** + * {@inheritdoc} + */ + public function matches($object, $property) + { + $reflectionProperty = new ReflectionProperty($object, $property); + $reflectionProperty->setAccessible(true); + + return $reflectionProperty->getValue($object) instanceof $this->propertyType; + } +} diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/Reflection/ReflectionHelper.php b/vendor/myclabs/deep-copy/src/DeepCopy/Reflection/ReflectionHelper.php new file mode 100644 index 0000000..a094e72 --- /dev/null +++ b/vendor/myclabs/deep-copy/src/DeepCopy/Reflection/ReflectionHelper.php @@ -0,0 +1,39 @@ +getProperties() does not return private properties from ancestor classes. + * + * @author muratyaman@gmail.com + * @see http://php.net/manual/en/reflectionclass.getproperties.php + * + * @param \ReflectionClass $ref + * @return \ReflectionProperty[] + */ + public static function getProperties(\ReflectionClass $ref) + { + $props = $ref->getProperties(); + $propsArr = array(); + + foreach ($props as $prop) { + $propertyName = $prop->getName(); + $propsArr[$propertyName] = $prop; + } + + if ($parentClass = $ref->getParentClass()) { + $parentPropsArr = self::getProperties($parentClass); + foreach ($propsArr as $key => $property) { + $parentPropsArr[$key] = $property; + } + + return $parentPropsArr; + } + + return $propsArr; + } +} diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/ReplaceFilter.php b/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/ReplaceFilter.php new file mode 100644 index 0000000..0e42b0f --- /dev/null +++ b/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/ReplaceFilter.php @@ -0,0 +1,27 @@ +callback = $callable; + } + + /** + * {@inheritdoc} + */ + public function apply($element) + { + return call_user_func($this->callback, $element); + } +} diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/ShallowCopyFilter.php b/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/ShallowCopyFilter.php new file mode 100644 index 0000000..408d18b --- /dev/null +++ b/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/ShallowCopyFilter.php @@ -0,0 +1,14 @@ +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/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/TypeFilter.php b/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/TypeFilter.php new file mode 100644 index 0000000..a37a8ba --- /dev/null +++ b/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/TypeFilter.php @@ -0,0 +1,12 @@ +type = $type; + } + + /** + * @param $element + * @return boolean + */ + public function matches($element) + { + return is_object($element) ? is_a($element, $this->type) : gettype($element) === $this->type; + } +} diff --git a/vendor/nesbot/carbon/.php_cs.dist b/vendor/nesbot/carbon/.php_cs.dist new file mode 100644 index 0000000..ff8b56f --- /dev/null +++ b/vendor/nesbot/carbon/.php_cs.dist @@ -0,0 +1,57 @@ + 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/vendor/nesbot/carbon/LICENSE b/vendor/nesbot/carbon/LICENSE new file mode 100644 index 0000000..6de45eb --- /dev/null +++ b/vendor/nesbot/carbon/LICENSE @@ -0,0 +1,19 @@ +Copyright (C) Brian Nesbitt + +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/vendor/nesbot/carbon/composer.json b/vendor/nesbot/carbon/composer.json new file mode 100644 index 0000000..63d576d --- /dev/null +++ b/vendor/nesbot/carbon/composer.json @@ -0,0 +1,54 @@ +{ + "name": "nesbot/carbon", + "type": "library", + "description": "A simple API extension for DateTime.", + "keywords": [ + "date", + "time", + "DateTime" + ], + "homepage": "http://carbon.nesbot.com", + "support": { + "issues": "https://github.com/briannesbitt/Carbon/issues", + "source": "https://github.com/briannesbitt/Carbon" + }, + "license": "MIT", + "authors": [ + { + "name": "Brian Nesbitt", + "email": "brian@nesbot.com", + "homepage": "http://nesbot.com" + } + ], + "require": { + "php": ">=5.3.0", + "symfony/translation": "~2.6 || ~3.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "~2", + "phpunit/phpunit": "~4.0 || ~5.0" + }, + "autoload": { + "psr-4": { + "Carbon\\": "src/Carbon/" + } + }, + "autoload-dev": { + "psr-4": { + "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;" + } +} diff --git a/vendor/nesbot/carbon/readme.md b/vendor/nesbot/carbon/readme.md new file mode 100644 index 0000000..57836c3 --- /dev/null +++ b/vendor/nesbot/carbon/readme.md @@ -0,0 +1,92 @@ +# Carbon + +[![Latest Stable Version](https://poser.pugx.org/nesbot/carbon/v/stable.png)](https://packagist.org/packages/nesbot/carbon) +[![Total Downloads](https://poser.pugx.org/nesbot/carbon/downloads.png)](https://packagist.org/packages/nesbot/carbon) +[![Build Status](https://travis-ci.org/briannesbitt/Carbon.svg?branch=master)](https://travis-ci.org/briannesbitt/Carbon) +[![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) + +A simple PHP API extension for DateTime. [http://carbon.nesbot.com](http://carbon.nesbot.com) + +```php +use Carbon\Carbon; + +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); + +$officialDate = Carbon::now()->toRfc2822String(); + +$howOldAmI = Carbon::createFromDate(1975, 5, 21)->age; + +$noonTodayLondonTime = Carbon::createFromTime(12, 0, 0, 'Europe/London'); + +$worldWillEnd = Carbon::createFromDate(2012, 12, 21, 'GMT'); + +// Don't really want to die so mock now +Carbon::setTestNow(Carbon::createFromDate(2000, 1, 1)); + +// comparisons are always done in UTC +if (Carbon::now()->gte($worldWillEnd)) { + die(); +} + +// Phew! Return to normal behaviour +Carbon::setTestNow(); + +if (Carbon::now()->isWeekend()) { + echo 'Party!'; +} +echo Carbon::now()->subMinutes(2)->diffForHumans(); // '2 minutes ago' + +// ... but also does 'from now', 'after' and 'before' +// rolling up to seconds, minutes, hours, days, months, years + +$daysSinceEpoch = Carbon::createFromTimestamp(0)->diffInDays(); +``` + +## Installation + +### With Composer + +``` +$ composer require nesbot/carbon +``` + +```json +{ + "require": { + "nesbot/carbon": "~1.21" + } +} +``` + +```php + +### 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. + +```php + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon; + +use Carbon\Exceptions\InvalidDateException; +use Closure; +use DatePeriod; +use DateTime; +use DateTimeZone; +use InvalidArgumentException; +use Symfony\Component\Translation\Loader\ArrayLoader; +use Symfony\Component\Translation\Translator; +use Symfony\Component\Translation\TranslatorInterface; + +/** + * A simple API extension for DateTime + * + * @property int $year + * @property int $yearIso + * @property int $month + * @property int $day + * @property int $hour + * @property int $minute + * @property int $second + * @property int $timestamp seconds since the Unix Epoch + * @property \DateTimeZone $timezone the current timezone + * @property \DateTimeZone $tz alias of timezone + * @property-read int $micro + * @property-read int $dayOfWeek 0 (for Sunday) through 6 (for Saturday) + * @property-read int $dayOfYear 0 through 365 + * @property-read int $weekOfMonth 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 + * @property-read int $quarter the quarter of this instance, 1 - 4 + * @property-read int $offset the timezone offset in seconds from UTC + * @property-read int $offsetHours the timezone offset in hours from UTC + * @property-read bool $dst daylight savings time indicator, true if DST, false otherwise + * @property-read bool $local checks if the timezone is local, true if local, false otherwise + * @property-read bool $utc checks if the timezone is UTC, true if UTC, false otherwise + * @property-read string $timezoneName + * @property-read string $tzName + */ +class Carbon extends DateTime +{ + /** + * The day constants. + */ + const SUNDAY = 0; + const MONDAY = 1; + const TUESDAY = 2; + const WEDNESDAY = 3; + const THURSDAY = 4; + const FRIDAY = 5; + const SATURDAY = 6; + + /** + * Names of days of the week. + * + * @var array + */ + protected static $days = array( + self::SUNDAY => 'Sunday', + self::MONDAY => 'Monday', + self::TUESDAY => 'Tuesday', + self::WEDNESDAY => 'Wednesday', + self::THURSDAY => 'Thursday', + self::FRIDAY => 'Friday', + 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_CENTURY = 100; + const YEARS_PER_DECADE = 10; + const MONTHS_PER_YEAR = 12; + const MONTHS_PER_QUARTER = 3; + const WEEKS_PER_YEAR = 52; + const DAYS_PER_WEEK = 7; + const HOURS_PER_DAY = 24; + const MINUTES_PER_HOUR = 60; + const SECONDS_PER_MINUTE = 60; + + /** + * Default format to use for __toString method when type juggling occurs. + * + * @var string + */ + const DEFAULT_TO_STRING_FORMAT = 'Y-m-d H:i:s'; + + /** + * Format to use for __toString method when type juggling occurs. + * + * @var string + */ + protected static $toStringFormat = self::DEFAULT_TO_STRING_FORMAT; + + /** + * First day of week. + * + * @var int + */ + protected static $weekStartsAt = self::MONDAY; + + /** + * Last day of week. + * + * @var int + */ + protected static $weekEndsAt = self::SUNDAY; + + /** + * Days of weekend. + * + * @var array + */ + protected static $weekendDays = array( + self::SATURDAY, + self::SUNDAY, + ); + + /** + * A test Carbon instance to be returned when now instances are created. + * + * @var \Carbon\Carbon + */ + protected static $testNow; + + /** + * A translator to ... er ... translate stuff. + * + * @var \Symfony\Component\Translation\TranslatorInterface + */ + protected static $translator; + + /** + * The errors that can occur. + * + * @var array + */ + protected static $lastErrors; + + /** + * Will UTF8 encoding be used to print localized date/time ? + * + * @var bool + */ + protected static $utf8 = false; + + /* + * Indicates if months should be calculated with overflow. + * + * @var bool + */ + protected static $monthsOverflow = true; + + /** + * Indicates if months should be calculated with overflow. + * + * @param bool $monthsOverflow + * + * @return void + */ + public static function useMonthsOverflow($monthsOverflow = true) + { + static::$monthsOverflow = $monthsOverflow; + } + + /** + * Reset the month overflow behavior. + * + * @return void + */ + public static function resetMonthsOverflow() + { + static::$monthsOverflow = true; + } + + /** + * Get the month overflow behavior. + * + * @return bool + */ + public static function shouldOverflowMonths() + { + return static::$monthsOverflow; + } + + /** + * Creates a DateTimeZone from a string, DateTimeZone or integer offset. + * + * @param \DateTimeZone|string|int|null $object + * + * @throws \InvalidArgumentException + * + * @return \DateTimeZone + */ + protected static function safeCreateDateTimeZone($object) + { + if ($object === null) { + // Don't return null... avoid Bug #52063 in PHP <5.3.6 + return new DateTimeZone(date_default_timezone_get()); + } + + if ($object instanceof DateTimeZone) { + return $object; + } + + if (is_numeric($object)) { + $tzName = timezone_name_from_abbr(null, $object * 3600, true); + + if ($tzName === false) { + throw new InvalidArgumentException('Unknown or bad timezone ('.$object.')'); + } + + $object = $tzName; + } + + $tz = @timezone_open((string) $object); + + if ($tz === false) { + throw new InvalidArgumentException('Unknown or bad timezone ('.$object.')'); + } + + return $tz; + } + + /////////////////////////////////////////////////////////////////// + //////////////////////////// CONSTRUCTORS ///////////////////////// + /////////////////////////////////////////////////////////////////// + + /** + * Create a new Carbon instance. + * + * Please see the testing aids section (specifically static::setTestNow()) + * for more on the possibility of this constructor returning a test instance. + * + * @param string|null $time + * @param \DateTimeZone|string|null $tz + */ + public function __construct($time = null, $tz = null) + { + // 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))) { + $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()) { + $testInstance->setTimezone($tz); + } else { + $tz = $testInstance->getTimezone(); + } + + $time = $testInstance->toDateTimeString(); + } + + parent::__construct($time, static::safeCreateDateTimeZone($tz)); + } + + /** + * Create a Carbon instance from a DateTime one. + * + * @param \DateTime $dt + * + * @return static + */ + public static function instance(DateTime $dt) + { + if ($dt instanceof static) { + return clone $dt; + } + + return new static($dt->format('Y-m-d H:i:s.u'), $dt->getTimezone()); + } + + /** + * Create a carbon instance from a string. + * + * This is an alias for the constructor that allows better fluent syntax + * as it allows you to do Carbon::parse('Monday next week')->fn() rather + * than (new Carbon('Monday next week'))->fn(). + * + * @param string|null $time + * @param \DateTimeZone|string|null $tz + * + * @return static + */ + public static function parse($time = null, $tz = null) + { + return new static($time, $tz); + } + + /** + * Get a Carbon instance for the current date and time. + * + * @param \DateTimeZone|string|null $tz + * + * @return static + */ + public static function now($tz = null) + { + return new static(null, $tz); + } + + /** + * Create a Carbon instance for today. + * + * @param \DateTimeZone|string|null $tz + * + * @return static + */ + public static function today($tz = null) + { + return static::now($tz)->startOfDay(); + } + + /** + * Create a Carbon instance for tomorrow. + * + * @param \DateTimeZone|string|null $tz + * + * @return static + */ + public static function tomorrow($tz = null) + { + return static::today($tz)->addDay(); + } + + /** + * Create a Carbon instance for yesterday. + * + * @param \DateTimeZone|string|null $tz + * + * @return static + */ + public static function yesterday($tz = null) + { + return static::today($tz)->subDay(); + } + + /** + * Create a Carbon instance for the greatest supported date. + * + * @return static + */ + public static function maxValue() + { + if (PHP_INT_SIZE === 4) { + // 32 bit (and additionally Windows 64 bit) + return static::createFromTimestamp(PHP_INT_MAX); + } + + // 64 bit + return static::create(9999, 12, 31, 23, 59, 59); + } + + /** + * Create a Carbon instance for the lowest supported date. + * + * @return static + */ + public static function minValue() + { + if (PHP_INT_SIZE === 4) { + // 32 bit (and additionally Windows 64 bit) + return static::createFromTimestamp(~PHP_INT_MAX); + } + + // 64 bit + return static::create(1, 1, 1, 0, 0, 0); + } + + /** + * Create a new Carbon instance from a specific date and time. + * + * If any of $year, $month or $day are set to null their now() values will + * be used. + * + * If $hour is null it will be set to its now() value and the default + * values for $minute and $second will be their now() values. + * + * If $hour is not null then the default values for $minute and $second + * will be 0. + * + * @param int|null $year + * @param int|null $month + * @param int|null $day + * @param int|null $hour + * @param int|null $minute + * @param int|null $second + * @param \DateTimeZone|string|null $tz + * + * @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(); + + $defaults = array_combine(array( + 'year', + 'month', + 'day', + 'hour', + 'minute', + 'second', + ), explode('-', date('Y-n-j-G-i-s', $now))); + + $year = $year === null ? $defaults['year'] : $year; + $month = $month === null ? $defaults['month'] : $month; + $day = $day === null ? $defaults['day'] : $day; + + if ($hour === null) { + $hour = $defaults['hour']; + $minute = $minute === null ? $defaults['minute'] : $minute; + $second = $second === null ? $defaults['second'] : $second; + } else { + $minute = $minute === null ? 0 : $minute; + $second = $second === null ? 0 : $second; + } + + $fixYear = null; + + if ($year < 0) { + $fixYear = $year; + $year = 0; + } elseif ($year > 9999) { + $fixYear = $year - 9999; + $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); + + if ($fixYear !== null) { + $instance->addYears($fixYear); + } + + return $instance; + } + + /** + * Create a new safe Carbon instance from a specific date and time. + * + * If any of $year, $month or $day are set to null their now() values will + * be used. + * + * If $hour is null it will be set to its now() value and the default + * values for $minute and $second will be their now() values. + * + * If $hour is not null then the default values for $minute and $second + * will be 0. + * + * If one of the set values is not valid, an \InvalidArgumentException + * will be thrown. + * + * @param int|null $year + * @param int|null $month + * @param int|null $day + * @param int|null $hour + * @param int|null $minute + * @param int|null $second + * @param \DateTimeZone|string|null $tz + * + * @throws \Carbon\Exceptions\InvalidDateException + * + * @return static + */ + public static function createSafe($year = null, $month = null, $day = null, $hour = null, $minute = null, $second = null, $tz = null) + { + $fields = array( + 'year' => array(0, 9999), + 'month' => array(0, 12), + 'day' => array(0, 31), + 'hour' => array(0, 24), + 'minute' => array(0, 59), + 'second' => array(0, 59), + ); + + foreach ($fields as $field => $range) { + if ($$field !== null && (!is_int($$field) || $$field < $range[0] || $$field > $range[1])) { + throw new InvalidDateException($field, $$field); + } + } + + $instance = static::create($year, $month, 1, $hour, $minute, $second, $tz); + + if ($day !== null && $day > $instance->daysInMonth) { + throw new InvalidDateException('day', $day); + } + + return $instance->day($day); + } + + /** + * Create a Carbon instance from just a date. The time portion is set to now. + * + * @param int|null $year + * @param int|null $month + * @param int|null $day + * @param \DateTimeZone|string|null $tz + * + * @return static + */ + public static function createFromDate($year = null, $month = null, $day = null, $tz = null) + { + return static::create($year, $month, $day, null, null, null, $tz); + } + + /** + * Create a Carbon instance from just a time. The date portion is set to today. + * + * @param int|null $hour + * @param int|null $minute + * @param int|null $second + * @param \DateTimeZone|string|null $tz + * + * @return static + */ + public static function createFromTime($hour = null, $minute = null, $second = null, $tz = null) + { + return static::create(null, null, null, $hour, $minute, $second, $tz); + } + + /** + * Create a Carbon instance from a specific format. + * + * @param string $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); + } + + static::setLastErrors($lastErrors = parent::getLastErrors()); + + if ($dt instanceof DateTime) { + return static::instance($dt); + } + + throw new InvalidArgumentException(implode(PHP_EOL, $lastErrors['errors'])); + } + + /** + * Set last errors. + * + * @param array $lastErrors + * + * @return void + */ + private static function setLastErrors(array $lastErrors) + { + static::$lastErrors = $lastErrors; + } + + /** + * {@inheritdoc} + */ + public static function getLastErrors() + { + return static::$lastErrors; + } + + /** + * Create a Carbon instance from a timestamp. + * + * @param int $timestamp + * @param \DateTimeZone|string|null $tz + * + * @return static + */ + public static function createFromTimestamp($timestamp, $tz = null) + { + return static::now($tz)->setTimestamp($timestamp); + } + + /** + * Create a Carbon instance from an UTC timestamp. + * + * @param int $timestamp + * + * @return static + */ + public static function createFromTimestampUTC($timestamp) + { + return new static('@'.$timestamp); + } + + /** + * Get a copy of the instance. + * + * @return static + */ + public function copy() + { + return clone $this; + } + + /////////////////////////////////////////////////////////////////// + ///////////////////////// GETTERS AND SETTERS ///////////////////// + /////////////////////////////////////////////////////////////////// + + /** + * Get a part of the Carbon object + * + * @param string $name + * + * @throws \InvalidArgumentException + * + * @return string|int|\DateTimeZone + */ + public function __get($name) + { + 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 $name === 'weekOfMonth': + return (int) ceil($this->day / static::DAYS_PER_WEEK); + + case $name === 'age': + return $this->diffInYears(); + + case $name === 'quarter': + return (int) ceil($this->month / static::MONTHS_PER_QUARTER); + + case $name === 'offset': + return $this->getOffset(); + + case $name === 'offsetHours': + return $this->getOffset() / static::SECONDS_PER_MINUTE / static::MINUTES_PER_HOUR; + + case $name === 'dst': + return $this->format('I') === '1'; + + case $name === 'local': + return $this->getOffset() === $this->copy()->setTimezone(date_default_timezone_get())->getOffset(); + + case $name === 'utc': + return $this->getOffset() === 0; + + case $name === 'timezone' || $name === 'tz': + return $this->getTimezone(); + + case $name === 'timezoneName' || $name === 'tzName': + return $this->getTimezone()->getName(); + + default: + throw new InvalidArgumentException(sprintf("Unknown getter '%s'", $name)); + } + } + + /** + * Check if an attribute exists on the object + * + * @param string $name + * + * @return bool + */ + public function __isset($name) + { + try { + $this->__get($name); + } catch (InvalidArgumentException $e) { + return false; + } + + return true; + } + + /** + * Set a part of the Carbon object + * + * @param string $name + * @param string|int|\DateTimeZone $value + * + * @throws \InvalidArgumentException + */ + public function __set($name, $value) + { + switch ($name) { + case 'year': + case 'month': + case 'day': + case 'hour': + case 'minute': + case 'second': + list($year, $month, $day, $hour, $minute, $second) = explode('-', $this->format('Y-n-j-G-i-s')); + $$name = $value; + $this->setDateTime($year, $month, $day, $hour, $minute, $second); + break; + + case 'timestamp': + parent::setTimestamp($value); + break; + + case 'timezone': + case 'tz': + $this->setTimezone($value); + break; + + default: + throw new InvalidArgumentException(sprintf("Unknown setter '%s'", $name)); + } + } + + /** + * Set the instance's year + * + * @param int $value + * + * @return static + */ + public function year($value) + { + $this->year = $value; + + return $this; + } + + /** + * Set the instance's month + * + * @param int $value + * + * @return static + */ + public function month($value) + { + $this->month = $value; + + return $this; + } + + /** + * Set the instance's day + * + * @param int $value + * + * @return static + */ + public function day($value) + { + $this->day = $value; + + return $this; + } + + /** + * Set the instance's hour + * + * @param int $value + * + * @return static + */ + public function hour($value) + { + $this->hour = $value; + + return $this; + } + + /** + * Set the instance's minute + * + * @param int $value + * + * @return static + */ + public function minute($value) + { + $this->minute = $value; + + return $this; + } + + /** + * Set the instance's second + * + * @param int $value + * + * @return static + */ + public function second($value) + { + $this->second = $value; + + return $this; + } + + /** + * Sets the current date of the DateTime object to a different date. + * Calls modify as a workaround for a php bug + * + * @param int $year + * @param int $month + * @param int $day + * + * @return static + * + * @see https://github.com/briannesbitt/Carbon/issues/539 + * @see https://bugs.php.net/bug.php?id=63863 + */ + public function setDate($year, $month, $day) + { + $this->modify('+0 day'); + + return parent::setDate($year, $month, $day); + } + + /** + * Set the date and time all together + * + * @param int $year + * @param int $month + * @param int $day + * @param int $hour + * @param int $minute + * @param int $second + * + * @return static + */ + public function setDateTime($year, $month, $day, $hour, $minute, $second = 0) + { + return $this->setDate($year, $month, $day)->setTime($hour, $minute, $second); + } + + /** + * Set the time by time string + * + * @param string $time + * + * @return static + */ + public function setTimeFromTimeString($time) + { + $time = explode(':', $time); + + $hour = $time[0]; + $minute = isset($time[1]) ? $time[1] : 0; + $second = isset($time[2]) ? $time[2] : 0; + + return $this->setTime($hour, $minute, $second); + } + + /** + * Set the instance's timestamp + * + * @param int $value + * + * @return static + */ + public function timestamp($value) + { + return $this->setTimestamp($value); + } + + /** + * Alias for setTimezone() + * + * @param \DateTimeZone|string $value + * + * @return static + */ + public function timezone($value) + { + return $this->setTimezone($value); + } + + /** + * Alias for setTimezone() + * + * @param \DateTimeZone|string $value + * + * @return static + */ + public function tz($value) + { + return $this->setTimezone($value); + } + + /** + * Set the instance's timezone from a string or object + * + * @param \DateTimeZone|string $value + * + * @return static + */ + public function setTimezone($value) + { + return parent::setTimezone(static::safeCreateDateTimeZone($value)); + } + + /////////////////////////////////////////////////////////////////// + /////////////////////// WEEK SPECIAL DAYS ///////////////////////// + /////////////////////////////////////////////////////////////////// + + /** + * Get the first day of week + * + * @return int + */ + public static function getWeekStartsAt() + { + return static::$weekStartsAt; + } + + /** + * Set the first day of week + * + * @param int + */ + public static function setWeekStartsAt($day) + { + static::$weekStartsAt = $day; + } + + /** + * Get the last day of week + * + * @return int + */ + public static function getWeekEndsAt() + { + return static::$weekEndsAt; + } + + /** + * Set the last day of week + * + * @param int + */ + public static function setWeekEndsAt($day) + { + static::$weekEndsAt = $day; + } + + /** + * Get weekend days + * + * @return array + */ + public static function getWeekendDays() + { + return static::$weekendDays; + } + + /** + * Set weekend days + * + * @param array + */ + public static function setWeekendDays($days) + { + static::$weekendDays = $days; + } + + /////////////////////////////////////////////////////////////////// + ///////////////////////// TESTING AIDS //////////////////////////// + /////////////////////////////////////////////////////////////////// + + /** + * Set a Carbon instance (real or mock) to be returned when a "now" + * instance is created. The provided instance will be returned + * specifically under the following conditions: + * - A call to the static now() method, ex. Carbon::now() + * - When a null (or blank string) is passed to the constructor or parse(), ex. new Carbon(null) + * - When the string "now" is passed to the constructor or parse(), ex. new Carbon('now') + * - When a string containing the desired time is passed to Carbon::parse(). + * + * Note the timezone parameter was left out of the examples above and + * has no affect as the mock value will be returned regardless of its value. + * + * To clear the test instance call this method using the default + * parameter of null. + * + * @param \Carbon\Carbon|string|null $testNow + */ + public static function setTestNow($testNow = null) + { + static::$testNow = is_string($testNow) ? static::parse($testNow) : $testNow; + } + + /** + * Get the Carbon instance (real or mock) to be returned when a "now" + * instance is created. + * + * @return static the current instance used for testing + */ + public static function getTestNow() + { + return static::$testNow; + } + + /** + * Determine if there is a valid test instance set. A valid test instance + * is anything that is not null. + * + * @return bool true if there is a test instance, otherwise false + */ + public static function hasTestNow() + { + return static::getTestNow() !== null; + } + + /** + * 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 + * + * @param string $time + * + * @return bool true if there is a keyword, otherwise false + */ + 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; + } + } + } + + return false; + } + + /////////////////////////////////////////////////////////////////// + /////////////////////// LOCALIZATION ////////////////////////////// + /////////////////////////////////////////////////////////////////// + + /** + * Initialize the translator instance if necessary. + * + * @return \Symfony\Component\Translation\TranslatorInterface + */ + protected static function translator() + { + if (static::$translator === null) { + static::$translator = new Translator('en'); + static::$translator->addLoader('array', new ArrayLoader()); + static::setLocale('en'); + } + + return static::$translator; + } + + /** + * Get the translator instance in use + * + * @return \Symfony\Component\Translation\TranslatorInterface + */ + public static function getTranslator() + { + return static::translator(); + } + + /** + * Set the translator instance to use + * + * @param \Symfony\Component\Translation\TranslatorInterface $translator + */ + public static function setTranslator(TranslatorInterface $translator) + { + static::$translator = $translator; + } + + /** + * Get the current translator locale + * + * @return string + */ + public static function getLocale() + { + return static::translator()->getLocale(); + } + + /** + * Set the current translator locale and indicate if the source locale file exists + * + * @param string $locale + * + * @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)); + + 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); + + return true; + } + + return false; + } + + /////////////////////////////////////////////////////////////////// + /////////////////////// STRING FORMATTING ///////////////////////// + /////////////////////////////////////////////////////////////////// + + /** + * Set if UTF8 will be used for localized date/time + * + * @param bool $utf8 + */ + public static function setUtf8($utf8) + { + static::$utf8 = $utf8; + } + + /** + * Format the instance with the current locale. You can set the current + * locale using setlocale() http://php.net/setlocale. + * + * @param string $format + * + * @return string + */ + public function formatLocalized($format) + { + // Check for Windows to find and replace the %e + // modifier correctly + if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { + $format = preg_replace('#(?format(static::$toStringFormat); + } + + /** + * Format the instance as date + * + * @return string + */ + public function toDateString() + { + return $this->format('Y-m-d'); + } + + /** + * Format the instance as a readable date + * + * @return string + */ + public function toFormattedDateString() + { + return $this->format('M j, Y'); + } + + /** + * Format the instance as time + * + * @return string + */ + public function toTimeString() + { + return $this->format('H:i:s'); + } + + /** + * Format the instance as date and time + * + * @return string + */ + public function toDateTimeString() + { + return $this->format('Y-m-d H:i:s'); + } + + /** + * Format the instance with day, date and time + * + * @return string + */ + public function toDayDateTimeString() + { + return $this->format('D, M j, Y g:i A'); + } + + /** + * Format the instance as ATOM + * + * @return string + */ + public function toAtomString() + { + return $this->format(static::ATOM); + } + + /** + * Format the instance as COOKIE + * + * @return string + */ + public function toCookieString() + { + return $this->format(static::COOKIE); + } + + /** + * Format the instance as ISO8601 + * + * @return string + */ + public function toIso8601String() + { + return $this->toAtomString(); + } + + /** + * Format the instance as RFC822 + * + * @return string + */ + public function toRfc822String() + { + return $this->format(static::RFC822); + } + + /** + * Format the instance as RFC850 + * + * @return string + */ + public function toRfc850String() + { + return $this->format(static::RFC850); + } + + /** + * Format the instance as RFC1036 + * + * @return string + */ + public function toRfc1036String() + { + return $this->format(static::RFC1036); + } + + /** + * Format the instance as RFC1123 + * + * @return string + */ + public function toRfc1123String() + { + return $this->format(static::RFC1123); + } + + /** + * Format the instance as RFC2822 + * + * @return string + */ + public function toRfc2822String() + { + return $this->format(static::RFC2822); + } + + /** + * Format the instance as RFC3339 + * + * @return string + */ + public function toRfc3339String() + { + return $this->format(static::RFC3339); + } + + /** + * Format the instance as RSS + * + * @return string + */ + public function toRssString() + { + return $this->format(static::RSS); + } + + /** + * Format the instance as W3C + * + * @return string + */ + public function toW3cString() + { + return $this->format(static::W3C); + } + + /////////////////////////////////////////////////////////////////// + ////////////////////////// COMPARISONS //////////////////////////// + /////////////////////////////////////////////////////////////////// + + /** + * Determines if the instance is equal to another + * + * @param Carbon $dt + * + * @return bool + */ + public function eq(Carbon $dt) + { + return $this == $dt; + } + + /** + * Determines if the instance is equal to another + * + * @param Carbon $dt + * + * @see eq() + * + * @return bool + */ + public function equalTo(Carbon $dt) + { + return $this->eq($dt); + } + + /** + * Determines if the instance is not equal to another + * + * @param Carbon $dt + * + * @return bool + */ + public function ne(Carbon $dt) + { + return !$this->eq($dt); + } + + /** + * Determines if the instance is not equal to another + * + * @param Carbon $dt + * + * @see ne() + * + * @return bool + */ + public function notEqualTo(Carbon $dt) + { + return $this->ne($dt); + } + + /** + * Determines if the instance is greater (after) than another + * + * @param Carbon $dt + * + * @return bool + */ + public function gt(Carbon $dt) + { + return $this > $dt; + } + + /** + * Determines if the instance is greater (after) than another + * + * @param Carbon $dt + * + * @see gt() + * + * @return bool + */ + public function greaterThan(Carbon $dt) + { + return $this->gt($dt); + } + + /** + * Determines if the instance is greater (after) than or equal to another + * + * @param Carbon $dt + * + * @return bool + */ + public function gte(Carbon $dt) + { + return $this >= $dt; + } + + /** + * Determines if the instance is greater (after) than or equal to another + * + * @param Carbon $dt + * + * @see gte() + * + * @return bool + */ + public function greaterThanOrEqualTo(Carbon $dt) + { + return $this->gte($dt); + } + + /** + * Determines if the instance is less (before) than another + * + * @param Carbon $dt + * + * @return bool + */ + public function lt(Carbon $dt) + { + return $this < $dt; + } + + /** + * Determines if the instance is less (before) than another + * + * @param Carbon $dt + * + * @see lt() + * + * @return bool + */ + public function lessThan(Carbon $dt) + { + return $this->lt($dt); + } + + /** + * Determines if the instance is less (before) or equal to another + * + * @param Carbon $dt + * + * @return bool + */ + public function lte(Carbon $dt) + { + return $this <= $dt; + } + + /** + * Determines if the instance is less (before) or equal to another + * + * @param Carbon $dt + * + * @see lte() + * + * @return bool + */ + public function lessThanOrEqualTo(Carbon $dt) + { + return $this->lte($dt); + } + + /** + * 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 >= + * + * @return bool + */ + public function between(Carbon $dt1, Carbon $dt2, $equal = true) + { + if ($dt1->gt($dt2)) { + $temp = $dt1; + $dt1 = $dt2; + $dt2 = $temp; + } + + if ($equal) { + return $this->gte($dt1) && $this->lte($dt2); + } + + return $this->gt($dt1) && $this->lt($dt2); + } + + /** + * Get the closest date from the instance. + * + * @param Carbon $dt1 + * @param Carbon $dt2 + * + * @return static + */ + public function closest(Carbon $dt1, Carbon $dt2) + { + return $this->diffInSeconds($dt1) < $this->diffInSeconds($dt2) ? $dt1 : $dt2; + } + + /** + * Get the farthest date from the instance. + * + * @param Carbon $dt1 + * @param Carbon $dt2 + * + * @return static + */ + public function farthest(Carbon $dt1, Carbon $dt2) + { + return $this->diffInSeconds($dt1) > $this->diffInSeconds($dt2) ? $dt1 : $dt2; + } + + /** + * Get the minimum instance between a given instance (default now) and the current instance. + * + * @param \Carbon\Carbon|null $dt + * + * @return static + */ + public function min(Carbon $dt = null) + { + $dt = $dt ?: static::now($this->getTimezone()); + + return $this->lt($dt) ? $this : $dt; + } + + /** + * Get the minimum instance between a given instance (default now) and the current instance. + * + * @param \Carbon\Carbon|null $dt + * + * @see min() + * + * @return static + */ + public function minimum(Carbon $dt = null) + { + return $this->min($dt); + } + + /** + * Get the maximum instance between a given instance (default now) and the current instance. + * + * @param \Carbon\Carbon|null $dt + * + * @return static + */ + public function max(Carbon $dt = null) + { + $dt = $dt ?: static::now($this->getTimezone()); + + return $this->gt($dt) ? $this : $dt; + } + + /** + * Get the maximum instance between a given instance (default now) and the current instance. + * + * @param \Carbon\Carbon|null $dt + * + * @see max() + * + * @return static + */ + public function maximum(Carbon $dt = null) + { + return $this->max($dt); + } + + /** + * Determines if the instance is a weekday + * + * @return bool + */ + public function isWeekday() + { + return !$this->isWeekend(); + } + + /** + * Determines if the instance is a weekend day + * + * @return bool + */ + public function isWeekend() + { + return in_array($this->dayOfWeek, static::$weekendDays); + } + + /** + * Determines if the instance is yesterday + * + * @return bool + */ + public function isYesterday() + { + return $this->toDateString() === static::yesterday($this->getTimezone())->toDateString(); + } + + /** + * Determines if the instance is today + * + * @return bool + */ + public function isToday() + { + return $this->toDateString() === static::now($this->getTimezone())->toDateString(); + } + + /** + * Determines if the instance is tomorrow + * + * @return bool + */ + public function isTomorrow() + { + return $this->toDateString() === static::tomorrow($this->getTimezone())->toDateString(); + } + + /** + * Determines if the instance is within the next week + * + * @return bool + */ + public function isNextWeek() + { + return $this->weekOfYear === static::now($this->getTimezone())->addWeek()->weekOfYear; + } + + /** + * Determines if the instance is within the last week + * + * @return bool + */ + public function isLastWeek() + { + return $this->weekOfYear === static::now($this->getTimezone())->subWeek()->weekOfYear; + } + + /** + * Determines if the instance is within the next month + * + * @return bool + */ + public function isNextMonth() + { + return $this->month === static::now($this->getTimezone())->addMonthNoOverflow()->month; + } + + /** + * Determines if the instance is within the last month + * + * @return bool + */ + public function isLastMonth() + { + return $this->month === static::now($this->getTimezone())->subMonthNoOverflow()->month; + } + + /** + * Determines if the instance is within next year + * + * @return bool + */ + public function isNextYear() + { + return $this->year === static::now($this->getTimezone())->addYear()->year; + } + + /** + * Determines if the instance is within the previous year + * + * @return bool + */ + public function isLastYear() + { + return $this->year === static::now($this->getTimezone())->subYear()->year; + } + + /** + * 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())); + } + + /** + * 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())); + } + + /** + * Determines if the instance is a leap year + * + * @return bool + */ + public function isLeapYear() + { + return $this->format('L') === '1'; + } + + /** + * Determines if the instance is a long year + * + * @see https://en.wikipedia.org/wiki/ISO_8601#Week_dates + * + * @return bool + */ + public function isLongYear() + { + 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. + * + * @return bool + */ + public function isSameAs($format, Carbon $dt = null) + { + $dt = $dt ?: static::now($this->tz); + + return $this->format($format) === $dt->format($format); + } + + /** + * Determines if the instance is in the current year + * + * @return bool + */ + public function isCurrentYear() + { + return $this->isSameYear(); + } + + /** + * 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. + * + * @return bool + */ + public function isSameYear(Carbon $dt = null) + { + return $this->isSameAs('Y', $dt); + } + + /** + * Determines if the instance is in the current month + * + * @return bool + */ + public function isCurrentMonth() + { + return $this->isSameMonth(); + } + + /** + * Checks if the passed in date is in the same month as the instance month (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. + * + * @return bool + */ + public function isSameMonth(Carbon $dt = null, $ofSameYear = false) + { + $format = $ofSameYear ? 'Y-m' : 'm'; + + return $this->isSameAs($format, $dt); + } + + /** + * Checks if the passed in date is the same day as the instance current day. + * + * @param \Carbon\Carbon $dt + * + * @return bool + */ + public function isSameDay(Carbon $dt) + { + return $this->toDateString() === $dt->toDateString(); + } + + /** + * Checks if this day is a Sunday. + * + * @return bool + */ + public function isSunday() + { + return $this->dayOfWeek === static::SUNDAY; + } + + /** + * Checks if this day is a Monday. + * + * @return bool + */ + public function isMonday() + { + return $this->dayOfWeek === static::MONDAY; + } + + /** + * Checks if this day is a Tuesday. + * + * @return bool + */ + public function isTuesday() + { + return $this->dayOfWeek === static::TUESDAY; + } + + /** + * Checks if this day is a Wednesday. + * + * @return bool + */ + public function isWednesday() + { + return $this->dayOfWeek === static::WEDNESDAY; + } + + /** + * Checks if this day is a Thursday. + * + * @return bool + */ + public function isThursday() + { + return $this->dayOfWeek === static::THURSDAY; + } + + /** + * Checks if this day is a Friday. + * + * @return bool + */ + public function isFriday() + { + return $this->dayOfWeek === static::FRIDAY; + } + + /** + * Checks if this day is a Saturday. + * + * @return bool + */ + public function isSaturday() + { + return $this->dayOfWeek === static::SATURDAY; + } + + /////////////////////////////////////////////////////////////////// + /////////////////// ADDITIONS AND SUBTRACTIONS //////////////////// + /////////////////////////////////////////////////////////////////// + + /** + * Add years to the instance. Positive $value travel forward while + * negative $value travel into the past. + * + * @param int $value + * + * @return static + */ + public function addYears($value) + { + return $this->modify((int) $value.' year'); + } + + /** + * Add a year to the instance + * + * @param int $value + * + * @return static + */ + public function addYear($value = 1) + { + return $this->addYears($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. + * + * @param int $value + * + * @return static + */ + public function subYears($value) + { + return $this->addYears(-1 * $value); + } + + /** + * Add quarters to the instance. Positive $value travels forward while + * negative $value travels into the past. + * + * @param int $value + * + * @return static + */ + public function addQuarters($value) + { + return $this->addMonths(static::MONTHS_PER_QUARTER * $value); + } + + /** + * Add a quarter to the instance + * + * @param int $value + * + * @return static + */ + public function addQuarter($value = 1) + { + 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 + * + * @param int $value + * + * @return static + */ + public function subQuarters($value) + { + return $this->addQuarters(-1 * $value); + } + + /** + * 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 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); + } + + /** + * Add months to the instance. Positive $value travels forward while + * negative $value travels into the past. + * + * @param int $value + * + * @return static + */ + public function addMonths($value) + { + if (static::shouldOverflowMonths()) { + return $this->addMonthsWithOverflow($value); + } + + return $this->addMonthsNoOverflow($value); + } + + /** + * Add a month to the instance + * + * @param int $value + * + * @return static + */ + public function addMonth($value = 1) + { + 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 + * + * @param int $value + * + * @return static + */ + public function subMonths($value) + { + return $this->addMonths(-1 * $value); + } + + /** + * Add months to the instance. Positive $value travels forward while + * negative $value travels into the past. + * + * @param int $value + * + * @return static + */ + public function addMonthsWithOverflow($value) + { + return $this->modify((int) $value.' month'); + } + + /** + * Add a month to the instance + * + * @param int $value + * + * @return static + */ + public function addMonthWithOverflow($value = 1) + { + 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 + * + * @param int $value + * + * @return static + */ + public function subMonthsWithOverflow($value) + { + return $this->addMonthsWithOverflow(-1 * $value); + } + + /** + * Add months without overflowing to the instance. Positive $value + * travels forward while negative $value travels into the past. + * + * @param int $value + * + * @return static + */ + public function addMonthsNoOverflow($value) + { + $day = $this->day; + + $this->modify((int) $value.' month'); + + if ($day !== $this->day) { + $this->modify('last day of previous month'); + } + + return $this; + } + + /** + * Add a month with no overflow to the instance + * + * @param int $value + * + * @return static + */ + public function addMonthNoOverflow($value = 1) + { + 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 + * + * @param int $value + * + * @return static + */ + public function subMonthsNoOverflow($value) + { + return $this->addMonthsNoOverflow(-1 * $value); + } + + /** + * Add days to the instance. Positive $value travels forward while + * negative $value travels into the past. + * + * @param int $value + * + * @return static + */ + public function addDays($value) + { + return $this->modify((int) $value.' day'); + } + + /** + * Add a day to the instance + * + * @param int $value + * + * @return static + */ + public function addDay($value = 1) + { + 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 + * + * @param int $value + * + * @return static + */ + public function subDays($value) + { + return $this->addDays(-1 * $value); + } + + /** + * Add weekdays to the instance. Positive $value travels forward while + * negative $value travels into the past. + * + * @param int $value + * + * @return static + */ + public function addWeekdays($value) + { + // fix for https://bugs.php.net/bug.php?id=54909 + $t = $this->toTimeString(); + $this->modify((int) $value.' weekday'); + + return $this->setTimeFromTimeString($t); + } + + /** + * Add a weekday to the instance + * + * @param int $value + * + * @return static + */ + public function addWeekday($value = 1) + { + 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 + * + * @param int $value + * + * @return static + */ + public function subWeekdays($value) + { + return $this->addWeekdays(-1 * $value); + } + + /** + * Add weeks to the instance. Positive $value travels forward while + * negative $value travels into the past. + * + * @param int $value + * + * @return static + */ + public function addWeeks($value) + { + return $this->modify((int) $value.' week'); + } + + /** + * Add a week to the instance + * + * @param int $value + * + * @return static + */ + public function addWeek($value = 1) + { + 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 + * + * @param int $value + * + * @return static + */ + public function subWeeks($value) + { + return $this->addWeeks(-1 * $value); + } + + /** + * Add hours to the instance. Positive $value travels forward while + * negative $value travels into the past. + * + * @param int $value + * + * @return static + */ + public function addHours($value) + { + return $this->modify((int) $value.' hour'); + } + + /** + * Add an hour to the instance + * + * @param int $value + * + * @return static + */ + public function addHour($value = 1) + { + return $this->addHours($value); + } + + /** + * Remove an hour from the instance + * + * @param int $value + * + * @return static + */ + public function subHour($value = 1) + { + return $this->subHours($value); + } + + /** + * Remove hours from the instance + * + * @param int $value + * + * @return static + */ + public function subHours($value) + { + return $this->addHours(-1 * $value); + } + + /** + * Add minutes to the instance. Positive $value travels forward while + * negative $value travels into the past. + * + * @param int $value + * + * @return static + */ + public function addMinutes($value) + { + return $this->modify((int) $value.' minute'); + } + + /** + * Add a minute to the instance + * + * @param int $value + * + * @return static + */ + public function addMinute($value = 1) + { + return $this->addMinutes($value); + } + + /** + * Remove a minute from the instance + * + * @param int $value + * + * @return static + */ + public function subMinute($value = 1) + { + return $this->subMinutes($value); + } + + /** + * Remove minutes from the instance + * + * @param int $value + * + * @return static + */ + public function subMinutes($value) + { + return $this->addMinutes(-1 * $value); + } + + /** + * Add seconds to the instance. Positive $value travels forward while + * negative $value travels into the past. + * + * @param int $value + * + * @return static + */ + public function addSeconds($value) + { + return $this->modify((int) $value.' second'); + } + + /** + * Add a second to the instance + * + * @param int $value + * + * @return static + */ + public function addSecond($value = 1) + { + return $this->addSeconds($value); + } + + /** + * Remove a second from the instance + * + * @param int $value + * + * @return static + */ + public function subSecond($value = 1) + { + return $this->subSeconds($value); + } + + /** + * Remove seconds from the instance + * + * @param int $value + * + * @return static + */ + public function subSeconds($value) + { + return $this->addSeconds(-1 * $value); + } + + /////////////////////////////////////////////////////////////////// + /////////////////////////// DIFFERENCES /////////////////////////// + /////////////////////////////////////////////////////////////////// + + /** + * Get the difference in years + * + * @param \Carbon\Carbon|null $dt + * @param bool $abs Get the absolute of the difference + * + * @return int + */ + public function diffInYears(Carbon $dt = null, $abs = true) + { + $dt = $dt ?: static::now($this->getTimezone()); + + return (int) $this->diff($dt, $abs)->format('%r%y'); + } + + /** + * Get the difference in months + * + * @param \Carbon\Carbon|null $dt + * @param bool $abs Get the absolute of the difference + * + * @return int + */ + public function diffInMonths(Carbon $dt = null, $abs = true) + { + $dt = $dt ?: static::now($this->getTimezone()); + + return $this->diffInYears($dt, $abs) * static::MONTHS_PER_YEAR + (int) $this->diff($dt, $abs)->format('%r%m'); + } + + /** + * Get the difference in weeks + * + * @param \Carbon\Carbon|null $dt + * @param bool $abs Get the absolute of the difference + * + * @return int + */ + public function diffInWeeks(Carbon $dt = null, $abs = true) + { + return (int) ($this->diffInDays($dt, $abs) / static::DAYS_PER_WEEK); + } + + /** + * Get the difference in days + * + * @param \Carbon\Carbon|null $dt + * @param bool $abs Get the absolute of the difference + * + * @return int + */ + public function diffInDays(Carbon $dt = null, $abs = true) + { + $dt = $dt ?: static::now($this->getTimezone()); + + return (int) $this->diff($dt, $abs)->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 + * + * @return int + */ + public function diffInDaysFiltered(Closure $callback, Carbon $dt = null, $abs = true) + { + return $this->diffFiltered(CarbonInterval::day(), $callback, $dt, $abs); + } + + /** + * 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 + * + * @return int + */ + public function diffInHoursFiltered(Closure $callback, Carbon $dt = null, $abs = true) + { + return $this->diffFiltered(CarbonInterval::hour(), $callback, $dt, $abs); + } + + /** + * 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 + * + * @return int + */ + public function diffFiltered(CarbonInterval $ci, Closure $callback, Carbon $dt = null, $abs = true) + { + $start = $this; + $end = $dt ?: static::now($this->getTimezone()); + $inverse = false; + + if ($end < $start) { + $start = $end; + $end = $this; + $inverse = true; + } + + $period = new DatePeriod($start, $ci, $end); + $vals = array_filter(iterator_to_array($period), function (DateTime $date) use ($callback) { + return call_user_func($callback, Carbon::instance($date)); + }); + + $diff = count($vals); + + return $inverse && !$abs ? -$diff : $diff; + } + + /** + * Get the difference in weekdays + * + * @param \Carbon\Carbon|null $dt + * @param bool $abs Get the absolute of the difference + * + * @return int + */ + public function diffInWeekdays(Carbon $dt = null, $abs = true) + { + return $this->diffInDaysFiltered(function (Carbon $date) { + return $date->isWeekday(); + }, $dt, $abs); + } + + /** + * Get the difference in weekend days using a filter + * + * @param \Carbon\Carbon|null $dt + * @param bool $abs Get the absolute of the difference + * + * @return int + */ + public function diffInWeekendDays(Carbon $dt = null, $abs = true) + { + return $this->diffInDaysFiltered(function (Carbon $date) { + return $date->isWeekend(); + }, $dt, $abs); + } + + /** + * Get the difference in hours + * + * @param \Carbon\Carbon|null $dt + * @param bool $abs Get the absolute of the difference + * + * @return int + */ + public function diffInHours(Carbon $dt = null, $abs = true) + { + return (int) ($this->diffInSeconds($dt, $abs) / static::SECONDS_PER_MINUTE / static::MINUTES_PER_HOUR); + } + + /** + * Get the difference in minutes + * + * @param \Carbon\Carbon|null $dt + * @param bool $abs Get the absolute of the difference + * + * @return int + */ + public function diffInMinutes(Carbon $dt = null, $abs = true) + { + return (int) ($this->diffInSeconds($dt, $abs) / static::SECONDS_PER_MINUTE); + } + + /** + * Get the difference in seconds + * + * @param \Carbon\Carbon|null $dt + * @param bool $abs Get the absolute of the difference + * + * @return int + */ + public function diffInSeconds(Carbon $dt = null, $abs = true) + { + $dt = $dt ?: static::now($this->getTimezone()); + $value = $dt->getTimestamp() - $this->getTimestamp(); + + return $abs ? abs($value) : $value; + } + + /** + * The number of seconds since midnight. + * + * @return int + */ + public function secondsSinceMidnight() + { + return $this->diffInSeconds($this->copy()->startOfDay()); + } + + /** + * The number of seconds until 23:23:59. + * + * @return int + */ + public function secondsUntilEndOfDay() + { + return $this->diffInSeconds($this->copy()->endOfDay()); + } + + /** + * 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 + * + * @return string + */ + public function diffForHumans(Carbon $other = null, $absolute = false, $short = false) + { + $isNow = $other === null; + + if ($isNow) { + $other = static::now($this->getTimezone()); + } + + $diffInterval = $this->diff($other); + + switch (true) { + case $diffInterval->y > 0: + $unit = $short ? 'y' : 'year'; + $count = $diffInterval->y; + break; + + case $diffInterval->m > 0: + $unit = $short ? 'm' : 'month'; + $count = $diffInterval->m; + break; + + case $diffInterval->d > 0: + $unit = $short ? 'd' : 'day'; + $count = $diffInterval->d; + + if ($count >= static::DAYS_PER_WEEK) { + $unit = $short ? 'w' : 'week'; + $count = (int) ($count / static::DAYS_PER_WEEK); + } + 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; + } + + if ($count === 0) { + $count = 1; + } + + $time = static::translator()->transChoice($unit, $count, array(':count' => $count)); + + if ($absolute) { + return $time; + } + + $isFuture = $diffInterval->invert === 1; + + $transId = $isNow ? ($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)); + } + + return static::translator()->trans($transId, array(':time' => $time)); + } + + /////////////////////////////////////////////////////////////////// + //////////////////////////// MODIFIERS //////////////////////////// + /////////////////////////////////////////////////////////////////// + + /** + * Resets the time to 00:00:00 + * + * @return static + */ + public function startOfDay() + { + return $this->setTime(0, 0, 0); + } + + /** + * Resets the time to 23:59:59 + * + * @return static + */ + public function endOfDay() + { + return $this->setTime(23, 59, 59); + } + + /** + * Resets the date to the first day of the month and the time to 00:00:00 + * + * @return static + */ + public function startOfMonth() + { + return $this->setDateTime($this->year, $this->month, 1, 0, 0, 0); + } + + /** + * Resets the date to end of the month and time to 23:59:59 + * + * @return static + */ + public function endOfMonth() + { + return $this->setDateTime($this->year, $this->month, $this->daysInMonth, 23, 59, 59); + } + + /** + * Resets the date to the first day of the quarter and the time to 00:00:00 + * + * @return static + */ + public function startOfQuarter() + { + $month = ($this->quarter - 1) * static::MONTHS_PER_QUARTER + 1; + + return $this->setDateTime($this->year, $month, 1, 0, 0, 0); + } + + /** + * Resets the date to end of the quarter and time to 23:59:59 + * + * @return static + */ + public function endOfQuarter() + { + return $this->startOfQuarter()->addMonths(static::MONTHS_PER_QUARTER - 1)->endOfMonth(); + } + + /** + * Resets the date to the first day of the year and the time to 00:00:00 + * + * @return static + */ + public function startOfYear() + { + return $this->setDateTime($this->year, 1, 1, 0, 0, 0); + } + + /** + * Resets the date to end of the year and time to 23:59:59 + * + * @return static + */ + public function endOfYear() + { + return $this->setDateTime($this->year, 12, 31, 23, 59, 59); + } + + /** + * Resets the date to the first day of the decade and the time to 00:00:00 + * + * @return static + */ + public function startOfDecade() + { + $year = $this->year - $this->year % static::YEARS_PER_DECADE; + + return $this->setDateTime($year, 1, 1, 0, 0, 0); + } + + /** + * Resets the date to end of the decade and time to 23:59:59 + * + * @return static + */ + public function endOfDecade() + { + $year = $this->year - $this->year % static::YEARS_PER_DECADE + static::YEARS_PER_DECADE - 1; + + return $this->setDateTime($year, 12, 31, 23, 59, 59); + } + + /** + * Resets the date to the first day of the century and the time to 00:00:00 + * + * @return static + */ + public function startOfCentury() + { + $year = $this->year - ($this->year - 1) % static::YEARS_PER_CENTURY; + + return $this->setDateTime($year, 1, 1, 0, 0, 0); + } + + /** + * Resets the date to end of the century and time to 23:59:59 + * + * @return static + */ + public function endOfCentury() + { + $year = $this->year - 1 - ($this->year - 1) % static::YEARS_PER_CENTURY + static::YEARS_PER_CENTURY; + + return $this->setDateTime($year, 12, 31, 23, 59, 59); + } + + /** + * Resets the date to the first day of week (defined in $weekStartsAt) and the time to 00:00:00 + * + * @return static + */ + public function startOfWeek() + { + while ($this->dayOfWeek !== static::$weekStartsAt) { + $this->subDay(); + } + + return $this->startOfDay(); + } + + /** + * Resets the date to end of week (defined in $weekEndsAt) and time to 23:59:59 + * + * @return static + */ + public function endOfWeek() + { + while ($this->dayOfWeek !== static::$weekEndsAt) { + $this->addDay(); + } + + return $this->endOfDay(); + } + + /** + * Modify to the next occurrence of a given day of the week. + * If no dayOfWeek is provided, modify to the next occurrence + * of the current day of the week. Use the supplied constants + * to indicate the desired dayOfWeek, ex. static::MONDAY. + * + * @param int|null $dayOfWeek + * + * @return static + */ + public function next($dayOfWeek = null) + { + if ($dayOfWeek === null) { + $dayOfWeek = $this->dayOfWeek; + } + + return $this->startOfDay()->modify('next '.static::$days[$dayOfWeek]); + } + + /** + * Go forward or backward to the next week- or weekend-day. + * + * @param bool $weekday + * @param bool $forward + * + * @return static + */ + private function nextOrPreviousDay($weekday = true, $forward = true) + { + $step = $forward ? 1 : -1; + + do { + $this->addDay($step); + } while ($weekday ? $this->isWeekend() : $this->isWeekday()); + + return $this; + } + + /** + * Go forward to the next weekday. + * + * @return $this + */ + public function nextWeekday() + { + return $this->nextOrPreviousDay(); + } + + /** + * Go backward to the previous weekday. + * + * @return static + */ + public function previousWeekday() + { + return $this->nextOrPreviousDay(true, false); + } + + /** + * Go forward to the next weekend day. + * + * @return static + */ + public function nextWeekendDay() + { + return $this->nextOrPreviousDay(false); + } + + /** + * Go backward to the previous weekend day. + * + * @return static + */ + public function previousWeekendDay() + { + return $this->nextOrPreviousDay(false, false); + } + + /** + * Modify to the previous occurrence of a given day of the week. + * If no dayOfWeek is provided, modify to the previous occurrence + * of the current day of the week. Use the supplied constants + * to indicate the desired dayOfWeek, ex. static::MONDAY. + * + * @param int|null $dayOfWeek + * + * @return static + */ + public function previous($dayOfWeek = null) + { + if ($dayOfWeek === null) { + $dayOfWeek = $this->dayOfWeek; + } + + return $this->startOfDay()->modify('last '.static::$days[$dayOfWeek]); + } + + /** + * Modify to the first occurrence of a given day of the week + * in the current month. If no dayOfWeek is provided, modify to the + * first day of the current month. Use the supplied constants + * to indicate the desired dayOfWeek, ex. static::MONDAY. + * + * @param int|null $dayOfWeek + * + * @return static + */ + public function firstOfMonth($dayOfWeek = null) + { + $this->startOfDay(); + + if ($dayOfWeek === null) { + return $this->day(1); + } + + return $this->modify('first '.static::$days[$dayOfWeek].' of '.$this->format('F').' '.$this->year); + } + + /** + * Modify to the last occurrence of a given day of the week + * in the current month. If no dayOfWeek is provided, modify to the + * last day of the current month. Use the supplied constants + * to indicate the desired dayOfWeek, ex. static::MONDAY. + * + * @param int|null $dayOfWeek + * + * @return static + */ + public function lastOfMonth($dayOfWeek = null) + { + $this->startOfDay(); + + if ($dayOfWeek === null) { + return $this->day($this->daysInMonth); + } + + return $this->modify('last '.static::$days[$dayOfWeek].' of '.$this->format('F').' '.$this->year); + } + + /** + * Modify to the given occurrence of a given day of the week + * in the current month. If the calculated occurrence is outside the scope + * of the current month, then return false and no modifications are made. + * Use the supplied constants to indicate the desired dayOfWeek, ex. static::MONDAY. + * + * @param int $nth + * @param int $dayOfWeek + * + * @return mixed + */ + public function nthOfMonth($nth, $dayOfWeek) + { + $dt = $this->copy()->firstOfMonth(); + $check = $dt->format('Y-m'); + $dt->modify('+'.$nth.' '.static::$days[$dayOfWeek]); + + return $dt->format('Y-m') === $check ? $this->modify($dt) : false; + } + + /** + * Modify to the first occurrence of a given day of the week + * in the current quarter. If no dayOfWeek is provided, modify to the + * first day of the current quarter. Use the supplied constants + * to indicate the desired dayOfWeek, ex. static::MONDAY. + * + * @param int|null $dayOfWeek + * + * @return static + */ + public function firstOfQuarter($dayOfWeek = null) + { + return $this->setDate($this->year, $this->quarter * static::MONTHS_PER_QUARTER - 2, 1)->firstOfMonth($dayOfWeek); + } + + /** + * Modify to the last occurrence of a given day of the week + * in the current quarter. If no dayOfWeek is provided, modify to the + * last day of the current quarter. Use the supplied constants + * to indicate the desired dayOfWeek, ex. static::MONDAY. + * + * @param int|null $dayOfWeek + * + * @return static + */ + public function lastOfQuarter($dayOfWeek = null) + { + return $this->setDate($this->year, $this->quarter * static::MONTHS_PER_QUARTER, 1)->lastOfMonth($dayOfWeek); + } + + /** + * Modify to the given occurrence of a given day of the week + * in the current quarter. If the calculated occurrence is outside the scope + * of the current quarter, then return false and no modifications are made. + * Use the supplied constants to indicate the desired dayOfWeek, ex. static::MONDAY. + * + * @param int $nth + * @param int $dayOfWeek + * + * @return mixed + */ + 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]); + + return ($lastMonth < $dt->month || $year !== $dt->year) ? false : $this->modify($dt); + } + + /** + * Modify to the first occurrence of a given day of the week + * in the current year. If no dayOfWeek is provided, modify to the + * first day of the current year. Use the supplied constants + * to indicate the desired dayOfWeek, ex. static::MONDAY. + * + * @param int|null $dayOfWeek + * + * @return static + */ + public function firstOfYear($dayOfWeek = null) + { + return $this->month(1)->firstOfMonth($dayOfWeek); + } + + /** + * Modify to the last occurrence of a given day of the week + * in the current year. If no dayOfWeek is provided, modify to the + * last day of the current year. Use the supplied constants + * to indicate the desired dayOfWeek, ex. static::MONDAY. + * + * @param int|null $dayOfWeek + * + * @return static + */ + public function lastOfYear($dayOfWeek = null) + { + return $this->month(static::MONTHS_PER_YEAR)->lastOfMonth($dayOfWeek); + } + + /** + * Modify to the given occurrence of a given day of the week + * in the current year. If the calculated occurrence is outside the scope + * of the current year, then return false and no modifications are made. + * Use the supplied constants to indicate the desired dayOfWeek, ex. static::MONDAY. + * + * @param int $nth + * @param int $dayOfWeek + * + * @return mixed + */ + public function nthOfYear($nth, $dayOfWeek) + { + $dt = $this->copy()->firstOfYear()->modify('+'.$nth.' '.static::$days[$dayOfWeek]); + + return $this->year === $dt->year ? $this->modify($dt) : false; + } + + /** + * Modify the current instance to the average of a given instance (default now) and the current instance. + * + * @param \Carbon\Carbon|null $dt + * + * @return static + */ + public function average(Carbon $dt = null) + { + $dt = $dt ?: static::now($this->getTimezone()); + + 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); + } + + $timezone = $this->getTimezone(); + $this->setTimezone('UTC'); + $instance = parent::modify($modify); + $this->setTimezone($timezone); + + return $instance; + } + + /** + * Return a serialized string of the instance. + * + * @return string + */ + public function serialize() + { + return serialize($this); + } + + /** + * Create an instance form a serialized string. + * + * @param string $value + * + * @throws \InvalidArgumentException + * + * @return static + */ + public static function fromSerialized($value) + { + $instance = @unserialize($value); + + if (!$instance instanceof static) { + throw new InvalidArgumentException('Invalid serialized value.'); + } + + return $instance; + } +} diff --git a/vendor/nesbot/carbon/src/Carbon/CarbonInterval.php b/vendor/nesbot/carbon/src/Carbon/CarbonInterval.php new file mode 100644 index 0000000..514ca6e --- /dev/null +++ b/vendor/nesbot/carbon/src/Carbon/CarbonInterval.php @@ -0,0 +1,557 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon; + +use DateInterval; +use InvalidArgumentException; +use Symfony\Component\Translation\Loader\ArrayLoader; +use Symfony\Component\Translation\Translator; +use Symfony\Component\Translation\TranslatorInterface; + +/** + * A simple API extension for DateInterval. + * The implementation provides helpers to handle weeks but only days are saved. + * Weeks are calculated based on the total days of the current instance. + * + * @property int $years Total years of the current interval. + * @property int $months Total months of the current interval. + * @property int $weeks Total weeks of the current interval calculated from the days. + * @property int $dayz Total days of the current interval (weeks * 7 + days). + * @property int $hours Total hours of the current interval. + * @property int $minutes Total minutes of the current interval. + * @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 + * + * @method static CarbonInterval years($years = 1) Create instance specifying a number of years. + * @method static CarbonInterval year($years = 1) Alias for years() + * @method static CarbonInterval months($months = 1) Create instance specifying a number of months. + * @method static CarbonInterval month($months = 1) Alias for months() + * @method static CarbonInterval weeks($weeks = 1) Create instance specifying a number of weeks. + * @method static CarbonInterval week($weeks = 1) Alias for weeks() + * @method static CarbonInterval days($days = 1) Create instance specifying a number of days. + * @method static CarbonInterval dayz($days = 1) Alias for days() + * @method static CarbonInterval day($days = 1) Alias for days() + * @method static CarbonInterval hours($hours = 1) Create instance specifying a number of hours. + * @method static CarbonInterval hour($hours = 1) Alias for hours() + * @method static CarbonInterval minutes($minutes = 1) Create instance specifying a number of minutes. + * @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(). + */ +class CarbonInterval extends DateInterval +{ + /** + * Interval spec period designators + */ + const PERIOD_PREFIX = 'P'; + const PERIOD_YEARS = 'Y'; + const PERIOD_MONTHS = 'M'; + const PERIOD_DAYS = 'D'; + const PERIOD_TIME_PREFIX = 'T'; + const PERIOD_HOURS = 'H'; + const PERIOD_MINUTES = 'M'; + const PERIOD_SECONDS = 'S'; + + /** + * A translator to ... er ... translate stuff + * + * @var \Symfony\Component\Translation\TranslatorInterface + */ + protected static $translator; + + /** + * 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(). + */ + const PHP_DAYS_FALSE = -99999; + + /** + * Determine if the interval was created via DateTime:diff() or not. + * + * @param DateInterval $interval + * + * @return bool + */ + private static function wasCreatedFromDiff(DateInterval $interval) + { + return $interval->days !== false && $interval->days !== static::PHP_DAYS_FALSE; + } + + /////////////////////////////////////////////////////////////////// + //////////////////////////// CONSTRUCTORS ///////////////////////// + /////////////////////////////////////////////////////////////////// + + /** + * Create a new CarbonInterval instance. + * + * @param int $years + * @param int $months + * @param int $weeks + * @param int $days + * @param int $hours + * @param int $minutes + * @param int $seconds + */ + public function __construct($years = 1, $months = null, $weeks = null, $days = null, $hours = null, $minutes = null, $seconds = null) + { + $spec = static::PERIOD_PREFIX; + + $spec .= $years > 0 ? $years.static::PERIOD_YEARS : ''; + $spec .= $months > 0 ? $months.static::PERIOD_MONTHS : ''; + + $specDays = 0; + $specDays += $weeks > 0 ? $weeks * Carbon::DAYS_PER_WEEK : 0; + $specDays += $days > 0 ? $days : 0; + + $spec .= $specDays > 0 ? $specDays.static::PERIOD_DAYS : ''; + + 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); + } + + /** + * Create a new CarbonInterval instance from specific values. + * This is an alias for the constructor that allows better fluent + * syntax as it allows you to do CarbonInterval::create(1)->fn() rather than + * (new CarbonInterval(1))->fn(). + * + * @param int $years + * @param int $months + * @param int $weeks + * @param int $days + * @param int $hours + * @param int $minutes + * @param int $seconds + * + * @return static + */ + public static function create($years = 1, $months = null, $weeks = null, $days = null, $hours = null, $minutes = null, $seconds = null) + { + return new static($years, $months, $weeks, $days, $hours, $minutes, $seconds); + } + + /** + * Provide static helpers to create instances. Allows CarbonInterval::years(3). + * + * Note: This is done using the magic method to allow static and instance methods to + * have the same names. + * + * @param string $name + * @param array $args + * + * @return static + */ + public static function __callStatic($name, $args) + { + $arg = count($args) === 0 ? 1 : $args[0]; + + switch ($name) { + case 'years': + case 'year': + return new static($arg); + + case 'months': + case 'month': + return new static(null, $arg); + + case 'weeks': + case 'week': + return new static(null, null, $arg); + + case 'days': + case 'dayz': + case 'day': + return new static(null, null, null, $arg); + + case 'hours': + case 'hour': + return new static(null, null, null, null, $arg); + + case 'minutes': + case 'minute': + return new static(null, null, null, null, null, $arg); + + case 'seconds': + case 'second': + return new static(null, null, null, null, null, null, $arg); + } + } + + /** + * Create a CarbonInterval instance from a DateInterval one. Can not instance + * DateInterval objects created from DateTime::diff() as you can't externally + * set the $days field. + * + * @param DateInterval $di + * + * @throws \InvalidArgumentException + * + * @return static + */ + public static function instance(DateInterval $di) + { + if (static::wasCreatedFromDiff($di)) { + throw new InvalidArgumentException('Can not instance a DateInterval object created from DateTime::diff().'); + } + + $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; + } + + /////////////////////////////////////////////////////////////////// + /////////////////////// LOCALIZATION ////////////////////////////// + /////////////////////////////////////////////////////////////////// + + /** + * Initialize the translator instance if necessary. + * + * @return \Symfony\Component\Translation\TranslatorInterface + */ + protected static function translator() + { + if (static::$translator === null) { + static::$translator = new Translator('en'); + static::$translator->addLoader('array', new ArrayLoader()); + static::setLocale('en'); + } + + return static::$translator; + } + + /** + * Get the translator instance in use + * + * @return \Symfony\Component\Translation\TranslatorInterface + */ + public static function getTranslator() + { + return static::translator(); + } + + /** + * Set the translator instance to use + * + * @param TranslatorInterface $translator + */ + public static function setTranslator(TranslatorInterface $translator) + { + static::$translator = $translator; + } + + /** + * Get the current translator locale + * + * @return string + */ + public static function getLocale() + { + return static::translator()->getLocale(); + } + + /** + * 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); + } + + /////////////////////////////////////////////////////////////////// + ///////////////////////// GETTERS AND SETTERS ///////////////////// + /////////////////////////////////////////////////////////////////// + + /** + * Get a part of the CarbonInterval object + * + * @param string $name + * + * @throws \InvalidArgumentException + * + * @return int + */ + public function __get($name) + { + switch ($name) { + case 'years': + return $this->y; + + case 'months': + return $this->m; + + case 'dayz': + return $this->d; + + case 'hours': + return $this->h; + + case 'minutes': + return $this->i; + + case 'seconds': + return $this->s; + + case 'weeks': + return (int) floor($this->d / Carbon::DAYS_PER_WEEK); + + case 'daysExcludeWeeks': + case 'dayzExcludeWeeks': + return $this->d % Carbon::DAYS_PER_WEEK; + + default: + throw new InvalidArgumentException(sprintf("Unknown getter '%s'", $name)); + } + } + + /** + * Set a part of the CarbonInterval object + * + * @param string $name + * @param int $val + * + * @throws \InvalidArgumentException + */ + public function __set($name, $val) + { + switch ($name) { + case 'years': + $this->y = $val; + break; + + case 'months': + $this->m = $val; + break; + + case 'weeks': + $this->d = $val * Carbon::DAYS_PER_WEEK; + break; + + case 'dayz': + $this->d = $val; + break; + + case 'hours': + $this->h = $val; + break; + + case 'minutes': + $this->i = $val; + break; + + case 'seconds': + $this->s = $val; + break; + } + } + + /** + * Allow setting of weeks and days to be cumulative. + * + * @param int $weeks Number of weeks to set + * @param int $days Number of days to set + * + * @return static + */ + public function weeksAndDays($weeks, $days) + { + $this->dayz = ($weeks * Carbon::DAYS_PER_WEEK) + $days; + + return $this; + } + + /** + * Allow fluent calls on the setters... CarbonInterval::years(3)->months(5)->day(). + * + * Note: This is done using the magic method to allow static and instance methods to + * have the same names. + * + * @param string $name + * @param array $args + * + * @return static + */ + public function __call($name, $args) + { + $arg = count($args) === 0 ? 1 : $args[0]; + + switch ($name) { + case 'years': + case 'year': + $this->years = $arg; + break; + + case 'months': + case 'month': + $this->months = $arg; + break; + + case 'weeks': + case 'week': + $this->dayz = $arg * Carbon::DAYS_PER_WEEK; + break; + + case 'days': + case 'dayz': + case 'day': + $this->dayz = $arg; + break; + + case 'hours': + case 'hour': + $this->hours = $arg; + break; + + case 'minutes': + case 'minute': + $this->minutes = $arg; + break; + + case 'seconds': + case 'second': + $this->seconds = $arg; + break; + } + + return $this; + } + + /** + * Get the current interval in a human readable format in the current locale. + * + * @return string + */ + public function forHumans() + { + $periods = array( + 'year' => $this->years, + 'month' => $this->months, + 'week' => $this->weeks, + 'day' => $this->daysExcludeWeeks, + 'hour' => $this->hours, + 'minute' => $this->minutes, + 'second' => $this->seconds, + ); + + $parts = array(); + foreach ($periods as $unit => $count) { + if ($count > 0) { + array_push($parts, static::translator()->transChoice($unit, $count, array(':count' => $count))); + } + } + + return implode(' ', $parts); + } + + /** + * Format the instance as a string using the forHumans() function. + * + * @return string + */ + public function __toString() + { + return $this->forHumans(); + } + + /** + * Add the passed interval to the current instance + * + * @param DateInterval $interval + * + * @return static + */ + public function add(DateInterval $interval) + { + $sign = $interval->invert === 1 ? -1 : 1; + + if (static::wasCreatedFromDiff($interval)) { + $this->dayz += $interval->days * $sign; + } else { + $this->years += $interval->y * $sign; + $this->months += $interval->m * $sign; + $this->dayz += $interval->d * $sign; + $this->hours += $interval->h * $sign; + $this->minutes += $interval->i * $sign; + $this->seconds += $interval->s * $sign; + } + + return $this; + } + + /** + * Get the interval_spec string + * + * @return string + */ + public function spec() + { + $date = array_filter(array( + static::PERIOD_YEARS => $this->y, + static::PERIOD_MONTHS => $this->m, + static::PERIOD_DAYS => $this->d, + )); + + $time = array_filter(array( + static::PERIOD_HOURS => $this->h, + static::PERIOD_MINUTES => $this->i, + static::PERIOD_SECONDS => $this->s, + )); + + $specString = static::PERIOD_PREFIX; + + foreach ($date as $key => $value) { + $specString .= $value.$key; + } + + if (count($time) > 0) { + $specString .= static::PERIOD_TIME_PREFIX; + foreach ($time as $key => $value) { + $specString .= $value.$key; + } + } + + return $specString === static::PERIOD_PREFIX ? 'PT0S' : $specString; + } +} diff --git a/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidDateException.php b/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidDateException.php new file mode 100644 index 0000000..1b0d473 --- /dev/null +++ b/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidDateException.php @@ -0,0 +1,67 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\Exceptions; + +use Exception; +use InvalidArgumentException; + +class InvalidDateException extends InvalidArgumentException +{ + /** + * The invalid field. + * + * @var string + */ + private $field; + + /** + * The invalid value. + * + * @var mixed + */ + private $value; + + /** + * Constructor. + * + * @param string $field + * @param mixed $value + * @param int $code + * @param \Exception|null $previous + */ + public function __construct($field, $value, $code = 0, Exception $previous = null) + { + $this->field = $field; + $this->value = $value; + parent::__construct($field.' : '.$value.' is not a valid value.', $code, $previous); + } + + /** + * Get the invalid field. + * + * @return string + */ + public function getField() + { + return $this->field; + } + + /** + * Get the invalid value. + * + * @return mixed + */ + public function getValue() + { + return $this->value; + } +} diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/af.php b/vendor/nesbot/carbon/src/Carbon/Lang/af.php new file mode 100644 index 0000000..a8610d6 --- /dev/null +++ b/vendor/nesbot/carbon/src/Carbon/Lang/af.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 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', + 'ago' => ':time terug', + 'from_now' => ':time van nou af', + 'after' => ':time na', + 'before' => ':time voor', +); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ar.php b/vendor/nesbot/carbon/src/Carbon/Lang/ar.php new file mode 100644 index 0000000..253cf50 --- /dev/null +++ b/vendor/nesbot/carbon/src/Carbon/Lang/ar.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/vendor/nesbot/carbon/src/Carbon/Lang/az.php b/vendor/nesbot/carbon/src/Carbon/Lang/az.php new file mode 100644 index 0000000..e4f3789 --- /dev/null +++ b/vendor/nesbot/carbon/src/Carbon/Lang/az.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 il', + 'y' => ':count il', + 'month' => ':count ay', + 'm' => ':count ay', + 'week' => ':count hÉ™ftÉ™', + 'w' => ':count hÉ™ftÉ™', + 'day' => ':count gün', + 'd' => ':count gün', + 'hour' => ':count saat', + 'h' => ':count saat', + 'minute' => ':count dÉ™qiqÉ™', + 'min' => ':count dÉ™qiqÉ™', + 'second' => ':count saniyÉ™', + 's' => ':count saniyÉ™', + 'ago' => ':time öncÉ™', + 'from_now' => ':time sonra', + 'after' => ':time sonra', + 'before' => ':time öncÉ™', +); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/bg.php b/vendor/nesbot/carbon/src/Carbon/Lang/bg.php new file mode 100644 index 0000000..309934b --- /dev/null +++ b/vendor/nesbot/carbon/src/Carbon/Lang/bg.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 минути', + 'm' => '1 минута|:count минути', + 'second' => '1 Ñекунда|:count Ñекунди', + 's' => '1 Ñекунда|:count Ñекунди', + 'ago' => 'преди :time', + 'from_now' => ':time от Ñега', + 'after' => 'Ñлед :time', + 'before' => 'преди :time', +); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/bn.php b/vendor/nesbot/carbon/src/Carbon/Lang/bn.php new file mode 100644 index 0000000..a930df3 --- /dev/null +++ b/vendor/nesbot/carbon/src/Carbon/Lang/bn.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/vendor/nesbot/carbon/src/Carbon/Lang/ca.php b/vendor/nesbot/carbon/src/Carbon/Lang/ca.php new file mode 100644 index 0000000..91262e7 --- /dev/null +++ b/vendor/nesbot/carbon/src/Carbon/Lang/ca.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 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', + 'ago' => 'fa :time', + 'from_now' => 'dins de :time', + 'after' => ':time després', + 'before' => ':time abans', +); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/cs.php b/vendor/nesbot/carbon/src/Carbon/Lang/cs.php new file mode 100644 index 0000000..f4aba76 --- /dev/null +++ b/vendor/nesbot/carbon/src/Carbon/Lang/cs.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 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', + 'ago' => ':time nazpÄ›t', + 'from_now' => 'za :time', + 'after' => ':time pozdÄ›ji', + 'before' => ':time pÅ™edtím', +); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/da.php b/vendor/nesbot/carbon/src/Carbon/Lang/da.php new file mode 100644 index 0000000..6710474 --- /dev/null +++ b/vendor/nesbot/carbon/src/Carbon/Lang/da.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Ã¥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', + 'ago' => ':time siden', + 'from_now' => 'om :time', + 'after' => ':time efter', + 'before' => ':time før', +); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/de.php b/vendor/nesbot/carbon/src/Carbon/Lang/de.php new file mode 100644 index 0000000..d1c572a --- /dev/null +++ b/vendor/nesbot/carbon/src/Carbon/Lang/de.php @@ -0,0 +1,40 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +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', + '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', +); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/el.php b/vendor/nesbot/carbon/src/Carbon/Lang/el.php new file mode 100644 index 0000000..6028074 --- /dev/null +++ b/vendor/nesbot/carbon/src/Carbon/Lang/el.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/vendor/nesbot/carbon/src/Carbon/Lang/en.php b/vendor/nesbot/carbon/src/Carbon/Lang/en.php new file mode 100644 index 0000000..181c59b --- /dev/null +++ b/vendor/nesbot/carbon/src/Carbon/Lang/en.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 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', + 'ago' => ':time ago', + 'from_now' => ':time from now', + 'after' => ':time after', + 'before' => ':time before', +); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/eo.php b/vendor/nesbot/carbon/src/Carbon/Lang/eo.php new file mode 100644 index 0000000..ff1f531 --- /dev/null +++ b/vendor/nesbot/carbon/src/Carbon/Lang/eo.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 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', + 'ago' => 'antaÅ­ :time', + 'from_now' => 'je :time', + 'after' => ':time poste', + 'before' => ':time antaÅ­e', +); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/es.php b/vendor/nesbot/carbon/src/Carbon/Lang/es.php new file mode 100644 index 0000000..fb0aff1 --- /dev/null +++ b/vendor/nesbot/carbon/src/Carbon/Lang/es.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 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', + 'ago' => 'hace :time', + 'from_now' => 'dentro de :time', + 'after' => ':time después', + 'before' => ':time antes', +); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/et.php b/vendor/nesbot/carbon/src/Carbon/Lang/et.php new file mode 100644 index 0000000..70d682d --- /dev/null +++ b/vendor/nesbot/carbon/src/Carbon/Lang/et.php @@ -0,0 +1,38 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +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', + 'ago' => ':time tagasi', + 'from_now' => ':time pärast', + 'after' => ':time pärast', + 'before' => ':time enne', + 'year_from_now' => ':count aasta', + 'month_from_now' => ':count kuu', + 'week_from_now' => ':count nädala', + 'day_from_now' => ':count päeva', + 'hour_from_now' => ':count tunni', + 'minute_from_now' => ':count minuti', + 'second_from_now' => ':count sekundi', +); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/eu.php b/vendor/nesbot/carbon/src/Carbon/Lang/eu.php new file mode 100644 index 0000000..1cb6b7c --- /dev/null +++ b/vendor/nesbot/carbon/src/Carbon/Lang/eu.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' => 'Urte 1|:count urte', + 'y' => 'Urte 1|:count urte', + 'month' => 'Hile 1|:count hile', + 'm' => 'Hile 1|:count hile', + 'week' => 'Aste 1|:count aste', + 'w' => 'Aste 1|:count aste', + 'day' => 'Egun 1|:count egun', + 'd' => 'Egun 1|:count egun', + 'hour' => 'Ordu 1|:count ordu', + 'h' => 'Ordu 1|:count ordu', + 'minute' => 'Minutu 1|:count minutu', + 'min' => 'Minutu 1|:count minutu', + 'second' => 'Segundu 1|:count segundu', + 's' => 'Segundu 1|:count segundu', + 'ago' => 'Orain dela :time', + 'from_now' => ':time barru', + 'after' => ':time geroago', + 'before' => ':time lehenago', +); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fa.php b/vendor/nesbot/carbon/src/Carbon/Lang/fa.php new file mode 100644 index 0000000..31bec88 --- /dev/null +++ b/vendor/nesbot/carbon/src/Carbon/Lang/fa.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/vendor/nesbot/carbon/src/Carbon/Lang/fi.php b/vendor/nesbot/carbon/src/Carbon/Lang/fi.php new file mode 100644 index 0000000..46794fa --- /dev/null +++ b/vendor/nesbot/carbon/src/Carbon/Lang/fi.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 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', + 'ago' => ':time sitten', + 'from_now' => ':time tästä hetkestä', + 'after' => ':time sen jälkeen', + 'before' => ':time ennen', +); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fo.php b/vendor/nesbot/carbon/src/Carbon/Lang/fo.php new file mode 100644 index 0000000..d4d6823 --- /dev/null +++ b/vendor/nesbot/carbon/src/Carbon/Lang/fo.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á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', + 'ago' => ':time síðan', + 'from_now' => 'um :time', + 'after' => ':time aftaná', + 'before' => ':time áðrenn', +); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fr.php b/vendor/nesbot/carbon/src/Carbon/Lang/fr.php new file mode 100644 index 0000000..be79738 --- /dev/null +++ b/vendor/nesbot/carbon/src/Carbon/Lang/fr.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 an|:count ans', + 'y' => '1 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', + 'ago' => 'il y a :time', + 'from_now' => 'dans :time', + 'after' => ':time après', + 'before' => ':time avant', +); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/gl.php b/vendor/nesbot/carbon/src/Carbon/Lang/gl.php new file mode 100644 index 0000000..609bf75 --- /dev/null +++ b/vendor/nesbot/carbon/src/Carbon/Lang/gl.php @@ -0,0 +1,24 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +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', + 'ago' => 'fai :time', + 'from_now' => 'dentro de :time', + 'after' => ':time despois', + 'before' => ':time antes', +); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/he.php b/vendor/nesbot/carbon/src/Carbon/Lang/he.php new file mode 100644 index 0000000..2d4f4f8 --- /dev/null +++ b/vendor/nesbot/carbon/src/Carbon/Lang/he.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' => 'שנה|{2}שנתיי×|:count שני×', + 'y' => 'שנה|{2}שנתיי×|:count שני×', + 'month' => 'חודש|{2}חודשיי×|:count חודשי×', + 'm' => 'חודש|{2}חודשיי×|:count חודשי×', + 'week' => 'שבוע|{2}שבועיי×|:count שבועות', + 'w' => 'שבוע|{2}שבועיי×|:count שבועות', + 'day' => 'יו×|{2}יומיי×|:count ימי×', + 'd' => 'יו×|{2}יומיי×|:count ימי×', + 'hour' => 'שעה|{2}שעתיי×|:count שעות', + 'h' => 'שעה|{2}שעתיי×|:count שעות', + 'minute' => 'דקה|{2}דקותיי×|:count דקות', + 'min' => 'דקה|{2}דקותיי×|:count דקות', + 'second' => 'שניה|:count שניות', + 's' => 'שניה|:count שניות', + 'ago' => 'לפני :time', + 'from_now' => 'בעוד :time', + 'after' => '×חרי :time', + 'before' => 'לפני :time', +); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/hr.php b/vendor/nesbot/carbon/src/Carbon/Lang/hr.php new file mode 100644 index 0000000..1a339de --- /dev/null +++ b/vendor/nesbot/carbon/src/Carbon/Lang/hr.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 godinu|:count godine|:count godina', + 'y' => ':count godinu|:count godine|:count godina', + 'month' => ':count mjesec|:count mjeseca|:count mjeseci', + 'm' => ':count mjesec|:count mjeseca|:count mjeseci', + 'week' => ':count tjedan|:count tjedna|:count tjedana', + 'w' => ':count tjedan|:count tjedna|:count tjedana', + '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 minutu|:count minute |:count minuta', + 'min' => ':count minutu|:count minute |:count minuta', + 'second' => ':count sekundu|:count sekunde|:count sekundi', + 's' => ':count sekundu|:count sekunde|:count sekundi', + 'ago' => 'prije :time', + 'from_now' => 'za :time', + 'after' => 'za :time', + 'before' => 'prije :time', +); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/hu.php b/vendor/nesbot/carbon/src/Carbon/Lang/hu.php new file mode 100644 index 0000000..45daf41 --- /dev/null +++ b/vendor/nesbot/carbon/src/Carbon/Lang/hu.php @@ -0,0 +1,52 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array( + 'year' => ':count év', + 'y' => ':count év', + 'month' => ':count hónap', + 'm' => ':count hónap', + 'week' => ':count hét', + 'w' => ':count hét', + 'day' => ':count nap', + 'd' => ':count nap', + 'hour' => ':count óra', + 'h' => ':count óra', + 'minute' => ':count perc', + 'min' => ':count perc', + 'second' => ':count másodperc', + 's' => ':count másodperc', + 'ago' => ':time', + 'from_now' => ':time múlva', + 'after' => ':time késÅ‘bb', + 'before' => ':time korábban', + 'year_ago' => ':count éve', + 'month_ago' => ':count hónapja', + 'week_ago' => ':count hete', + 'day_ago' => ':count napja', + 'hour_ago' => ':count órája', + 'minute_ago' => ':count perce', + 'second_ago' => ':count másodperce', + 'year_after' => ':count évvel', + 'month_after' => ':count hónappal', + 'week_after' => ':count héttel', + 'day_after' => ':count nappal', + 'hour_after' => ':count órával', + 'minute_after' => ':count perccel', + 'second_after' => ':count másodperccel', + 'year_before' => ':count évvel', + 'month_before' => ':count hónappal', + 'week_before' => ':count héttel', + 'day_before' => ':count nappal', + 'hour_before' => ':count órával', + 'minute_before' => ':count perccel', + 'second_before' => ':count másodperccel', +); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/hy.php b/vendor/nesbot/carbon/src/Carbon/Lang/hy.php new file mode 100644 index 0000000..4b4545d --- /dev/null +++ b/vendor/nesbot/carbon/src/Carbon/Lang/hy.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/vendor/nesbot/carbon/src/Carbon/Lang/id.php b/vendor/nesbot/carbon/src/Carbon/Lang/id.php new file mode 100644 index 0000000..7f7114f --- /dev/null +++ b/vendor/nesbot/carbon/src/Carbon/Lang/id.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 tahun', + 'y' => ':count tahun', + 'month' => ':count bulan', + 'm' => ':count bulan', + 'week' => ':count minggu', + 'w' => ':count minggu', + 'day' => ':count hari', + 'd' => ':count hari', + 'hour' => ':count jam', + 'h' => ':count jam', + 'minute' => ':count menit', + 'min' => ':count menit', + 'second' => ':count detik', + 's' => ':count detik', + 'ago' => ':time yang lalu', + 'from_now' => ':time dari sekarang', + 'after' => ':time setelah', + 'before' => ':time sebelum', +); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/it.php b/vendor/nesbot/carbon/src/Carbon/Lang/it.php new file mode 100644 index 0000000..19eedaf --- /dev/null +++ b/vendor/nesbot/carbon/src/Carbon/Lang/it.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 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', + 'ago' => ':time fa', + 'from_now' => ':time da adesso', + 'after' => ':time dopo', + 'before' => ':time prima', +); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ja.php b/vendor/nesbot/carbon/src/Carbon/Lang/ja.php new file mode 100644 index 0000000..c12c199 --- /dev/null +++ b/vendor/nesbot/carbon/src/Carbon/Lang/ja.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/vendor/nesbot/carbon/src/Carbon/Lang/ka.php b/vendor/nesbot/carbon/src/Carbon/Lang/ka.php new file mode 100644 index 0000000..a8dde7e --- /dev/null +++ b/vendor/nesbot/carbon/src/Carbon/Lang/ka.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/vendor/nesbot/carbon/src/Carbon/Lang/km.php b/vendor/nesbot/carbon/src/Carbon/Lang/km.php new file mode 100644 index 0000000..a104e06 --- /dev/null +++ b/vendor/nesbot/carbon/src/Carbon/Lang/km.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/vendor/nesbot/carbon/src/Carbon/Lang/ko.php b/vendor/nesbot/carbon/src/Carbon/Lang/ko.php new file mode 100644 index 0000000..9eac8c9 --- /dev/null +++ b/vendor/nesbot/carbon/src/Carbon/Lang/ko.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/vendor/nesbot/carbon/src/Carbon/Lang/lt.php b/vendor/nesbot/carbon/src/Carbon/Lang/lt.php new file mode 100644 index 0000000..3f2fd1e --- /dev/null +++ b/vendor/nesbot/carbon/src/Carbon/Lang/lt.php @@ -0,0 +1,38 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array( + 'year' => ':count metus|:count metus|:count metų', + 'y' => ':count metus|:count metus|:count metų', + 'month' => ':count mÄ—nesį|:count mÄ—nesius|:count mÄ—nesių', + 'm' => ':count mÄ—nesį|:count mÄ—nesius|:count mÄ—nesių', + 'week' => ':count savaitÄ™|:count savaites|:count savaiÄių', + 'w' => ':count savaitÄ™|:count savaites|:count savaiÄių', + 'day' => ':count dienÄ…|:count dienas|:count dienų', + 'd' => ':count dienÄ…|:count dienas|:count dienų', + 'hour' => ':count valandÄ…|:count valandas|:count valandų', + 'h' => ':count valandÄ…|:count valandas|:count valandų', + 'minute' => ':count minutÄ™|:count minutes|:count minuÄių', + 'min' => ':count minutÄ™|:count minutes|:count minuÄių', + 'second' => ':count sekundÄ™|:count sekundes|:count sekundžių', + 's' => ':count sekundÄ™|:count sekundes|:count sekundžių', + 'second_from_now' => ':count sekundÄ—s|:count sekundžių|:count sekundžių', + 'minute_from_now' => ':count minutÄ—s|:count minuÄių|:count minuÄių', + 'hour_from_now' => ':count valandos|:count valandų|:count valandų', + 'day_from_now' => ':count dienos|:count dienų|:count dienų', + 'week_from_now' => ':count savaitÄ—s|:count savaiÄių|:count savaiÄių', + 'month_from_now' => ':count mÄ—nesio|:count mÄ—nesių|:count mÄ—nesių', + 'year_from_now' => ':count metų', + 'ago' => 'prieÅ¡ :time', + 'from_now' => 'už :time', + 'after' => 'po :time', + 'before' => ':time nuo dabar', +); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/lv.php b/vendor/nesbot/carbon/src/Carbon/Lang/lv.php new file mode 100644 index 0000000..363193d --- /dev/null +++ b/vendor/nesbot/carbon/src/Carbon/Lang/lv.php @@ -0,0 +1,47 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array( + 'year' => '0 gadiem|:count gada|:count gadiem', + 'y' => '0 gadiem|:count gada|:count gadiem', + 'month' => '0 mÄ“neÅ¡iem|:count mÄ“neÅ¡a|:count mÄ“neÅ¡iem', + 'm' => '0 mÄ“neÅ¡iem|:count mÄ“neÅ¡a|:count mÄ“neÅ¡iem', + 'week' => '0 nedēļÄm|:count nedēļas|:count nedēļÄm', + 'w' => '0 nedēļÄm|:count nedēļas|:count nedēļÄm', + 'day' => '0 dienÄm|:count dienas|:count dienÄm', + 'd' => '0 dienÄm|:count dienas|:count dienÄm', + 'hour' => '0 stundÄm|:count stundas|:count stundÄm', + 'h' => '0 stundÄm|:count stundas|:count stundÄm', + 'minute' => '0 minÅ«tÄ“m|:count minÅ«tes|:count minÅ«tÄ“m', + 'min' => '0 minÅ«tÄ“m|:count minÅ«tes|:count minÅ«tÄ“m', + 'second' => '0 sekundÄ“m|:count sekundes|:count sekundÄ“m', + 's' => '0 sekundÄ“m|:count sekundes|:count sekundÄ“m', + 'ago' => 'pirms :time', + 'from_now' => 'pÄ“c :time', + 'after' => ':time vÄ“lÄk', + 'before' => ':time pirms', + + 'year_after' => '0 gadus|:count gadu|:count gadus', + 'month_after' => '0 mÄ“neÅ¡us|:count mÄ“nesi|:count mÄ“neÅ¡us', + 'week_after' => '0 nedēļas|:count nedēļu|:count nedēļas', + 'day_after' => '0 dienas|:count dienu|:count dienas', + 'hour_after' => '0 stundas|:count stundu|:count stundas', + 'minute_after' => '0 minÅ«tes|:count minÅ«ti|:count minÅ«tes', + 'second_after' => '0 sekundes|:count sekundi|:count sekundes', + + 'year_before' => '0 gadus|:count gadu|:count gadus', + 'month_before' => '0 mÄ“neÅ¡us|:count mÄ“nesi|:count mÄ“neÅ¡us', + 'week_before' => '0 nedēļas|:count nedēļu|:count nedēļas', + 'day_before' => '0 dienas|:count dienu|:count dienas', + 'hour_before' => '0 stundas|:count stundu|:count stundas', + 'minute_before' => '0 minÅ«tes|:count minÅ«ti|:count minÅ«tes', + 'second_before' => '0 sekundes|:count sekundi|:count sekundes', +); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/mk.php b/vendor/nesbot/carbon/src/Carbon/Lang/mk.php new file mode 100644 index 0000000..51e661d --- /dev/null +++ b/vendor/nesbot/carbon/src/Carbon/Lang/mk.php @@ -0,0 +1,24 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array( + 'year' => '1 година|:count години', + 'month' => '1 меÑец|:count меÑеци', + 'week' => '1 Ñедмица|:count Ñедмици', + 'day' => '1 ден|:count дена', + 'hour' => '1 чаÑ|:count чаÑа', + 'minute' => '1 минута|:count минути', + 'second' => '1 Ñекунда|:count Ñекунди', + 'ago' => 'пред :time', + 'from_now' => ':time од Ñега', + 'after' => 'по :time', + 'before' => 'пред :time', +); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ms.php b/vendor/nesbot/carbon/src/Carbon/Lang/ms.php new file mode 100644 index 0000000..ef57422 --- /dev/null +++ b/vendor/nesbot/carbon/src/Carbon/Lang/ms.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 tahun', + 'y' => ':count tahun', + 'month' => ':count bulan', + 'm' => ':count bulan', + 'week' => ':count minggu', + 'w' => ':count minggu', + 'day' => ':count hari', + 'd' => ':count hari', + 'hour' => ':count jam', + 'h' => ':count jam', + 'minute' => ':count minit', + 'min' => ':count minit', + 'second' => ':count saat', + 's' => ':count saat', + 'ago' => ':time yang lalu', + 'from_now' => ':time dari sekarang', + 'after' => ':time selepas', + 'before' => ':time sebelum', +); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/nl.php b/vendor/nesbot/carbon/src/Carbon/Lang/nl.php new file mode 100644 index 0000000..a398ca9 --- /dev/null +++ b/vendor/nesbot/carbon/src/Carbon/Lang/nl.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 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', + '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', + 'ago' => ':time geleden', + 'from_now' => 'over :time', + 'after' => ':time later', + 'before' => ':time eerder', +); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/no.php b/vendor/nesbot/carbon/src/Carbon/Lang/no.php new file mode 100644 index 0000000..178fbdc --- /dev/null +++ b/vendor/nesbot/carbon/src/Carbon/Lang/no.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Ã¥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', + 'ago' => ':time siden', + 'from_now' => 'om :time', + 'after' => ':time etter', + 'before' => ':time før', +); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/pl.php b/vendor/nesbot/carbon/src/Carbon/Lang/pl.php new file mode 100644 index 0000000..bca2d7f --- /dev/null +++ b/vendor/nesbot/carbon/src/Carbon/Lang/pl.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 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', + 'ago' => ':time temu', + 'from_now' => ':time od teraz', + 'after' => ':time przed', + 'before' => ':time po', +); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/pt.php b/vendor/nesbot/carbon/src/Carbon/Lang/pt.php new file mode 100644 index 0000000..f170648 --- /dev/null +++ b/vendor/nesbot/carbon/src/Carbon/Lang/pt.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 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', + 'ago' => ':time atrás', + 'from_now' => 'em :time', + 'after' => ':time depois', + 'before' => ':time antes', +); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/pt_BR.php b/vendor/nesbot/carbon/src/Carbon/Lang/pt_BR.php new file mode 100644 index 0000000..f9cbdc7 --- /dev/null +++ b/vendor/nesbot/carbon/src/Carbon/Lang/pt_BR.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 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', + 'ago' => 'há :time', + 'from_now' => 'em :time', + 'after' => 'após :time', + 'before' => ':time atrás', +); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ro.php b/vendor/nesbot/carbon/src/Carbon/Lang/ro.php new file mode 100644 index 0000000..cc16724 --- /dev/null +++ b/vendor/nesbot/carbon/src/Carbon/Lang/ro.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' => 'un an|:count ani|:count ani', + 'y' => 'un an|:count ani|:count ani', + 'month' => 'o lună|:count luni|:count luni', + 'm' => 'o lună|:count luni|:count luni', + 'week' => 'o săptămână|:count săptămâni|:count săptămâni', + 'w' => 'o săptămână|:count săptămâni|:count săptămâni', + 'day' => 'o zi|:count zile|:count zile', + 'd' => 'o zi|:count zile|:count zile', + 'hour' => 'o oră|:count ore|:count ore', + 'h' => 'o oră|:count ore|:count ore', + 'minute' => 'un minut|:count minute|:count minute', + 'min' => 'un minut|:count minute|:count minute', + 'second' => 'o secundă|:count secunde|:count secunde', + 's' => 'o secundă|:count secunde|:count secunde', + 'ago' => 'acum :time', + 'from_now' => ':time de acum', + 'after' => 'peste :time', + 'before' => 'acum :time', +); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ru.php b/vendor/nesbot/carbon/src/Carbon/Lang/ru.php new file mode 100644 index 0000000..680cbdc --- /dev/null +++ b/vendor/nesbot/carbon/src/Carbon/Lang/ru.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 года|:count лет', + 'y' => ':count год|:count года|:count лет', + 'month' => ':count меÑÑц|:count меÑÑца|:count меÑÑцев', + 'm' => ':count меÑÑц|:count меÑÑца|:count меÑÑцев', + 'week' => ':count неделю|:count недели|:count недель', + 'w' => ':count неделю|:count недели|:count недель', + 'day' => ':count день|:count днÑ|:count дней', + 'd' => ':count день|:count днÑ|:count дней', + 'hour' => ':count чаÑ|:count чаÑа|:count чаÑов', + 'h' => ':count чаÑ|:count чаÑа|:count чаÑов', + 'minute' => ':count минуту|:count минуты|:count минут', + 'min' => ':count минуту|:count минуты|:count минут', + 'second' => ':count Ñекунду|:count Ñекунды|:count Ñекунд', + 's' => ':count Ñекунду|:count Ñекунды|:count Ñекунд', + 'ago' => ':time назад', + 'from_now' => 'через :time', + 'after' => ':time поÑле', + 'before' => ':time до', +); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sk.php b/vendor/nesbot/carbon/src/Carbon/Lang/sk.php new file mode 100644 index 0000000..45c8f76 --- /dev/null +++ b/vendor/nesbot/carbon/src/Carbon/Lang/sk.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' => 'rok|:count roky|:count rokov', + 'y' => 'rok|:count roky|:count rokov', + 'month' => 'mesiac|:count mesiace|:count mesiacov', + 'm' => 'mesiac|:count mesiace|:count mesiacov', + 'week' => 'týždeň|:count týždne|:count týždňov', + 'w' => 'týždeň|:count týždne|:count týždňov', + 'day' => 'deň|:count dni|:count dní', + 'd' => 'deň|:count dni|:count dní', + 'hour' => 'hodinu|:count hodiny|:count hodín', + 'h' => 'hodinu|:count hodiny|:count hodín', + 'minute' => 'minútu|:count minúty|:count minút', + 'min' => 'minútu|:count minúty|:count minút', + 'second' => 'sekundu|:count sekundy|:count sekúnd', + 's' => 'sekundu|:count sekundy|:count sekúnd', + 'ago' => 'pred :time', + 'from_now' => 'za :time', + 'after' => ':time neskôr', + 'before' => ':time predtým', +); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sl.php b/vendor/nesbot/carbon/src/Carbon/Lang/sl.php new file mode 100644 index 0000000..fcef085 --- /dev/null +++ b/vendor/nesbot/carbon/src/Carbon/Lang/sl.php @@ -0,0 +1,38 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array( + 'year' => ':count leto|:count leti|:count leta|:count let', + 'y' => ':count leto|:count leti|:count leta|:count let', + 'month' => ':count mesec|:count meseca|:count mesece|:count mesecev', + 'm' => ':count mesec|:count meseca|:count mesece|:count mesecev', + 'week' => ':count teden|:count tedna|:count tedne|:count tednov', + 'w' => ':count teden|:count tedna|:count tedne|:count tednov', + 'day' => ':count dan|:count dni|:count dni|:count dni', + 'd' => ':count dan|:count dni|:count dni|:count dni', + 'hour' => ':count uro|:count uri|:count ure|:count ur', + 'h' => ':count uro|:count uri|:count ure|:count ur', + 'minute' => ':count minuto|:count minuti|:count minute|:count minut', + 'min' => ':count minuto|:count minuti|:count minute|:count minut', + 'second' => ':count sekundo|:count sekundi|:count sekunde|:count sekund', + 's' => ':count sekundo|:count sekundi|:count sekunde|:count sekund', + 'year_ago' => ':count letom|:count leti|:count leti|:count leti', + 'month_ago' => ':count mesecem|:count meseci|:count meseci|:count meseci', + 'week_ago' => ':count tednom|:count tednoma|:count tedni|:count tedni', + 'day_ago' => ':count dnem|:count dnevoma|:count dnevi|:count dnevi', + 'hour_ago' => ':count uro|:count urama|:count urami|:count urami', + 'minute_ago' => ':count minuto|:count minutama|:count minutami|:count minutami', + 'second_ago' => ':count sekundo|:count sekundama|:count sekundami|:count sekundami', + 'ago' => 'pred :time', + 'from_now' => 'Äez :time', + 'after' => 'Äez :time', + 'before' => 'pred :time', +); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sq.php b/vendor/nesbot/carbon/src/Carbon/Lang/sq.php new file mode 100644 index 0000000..41be251 --- /dev/null +++ b/vendor/nesbot/carbon/src/Carbon/Lang/sq.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 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', + 'ago' => ':time më parë', + 'from_now' => ':time nga tani', + 'after' => ':time pas', + 'before' => ':time para', +); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sr.php b/vendor/nesbot/carbon/src/Carbon/Lang/sr.php new file mode 100644 index 0000000..70915a2 --- /dev/null +++ b/vendor/nesbot/carbon/src/Carbon/Lang/sr.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 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 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 sekunde|:count sekunde', + 's' => ':count sekund|:count sekunde|:count sekunde', + 'ago' => 'pre :time', + 'from_now' => ':time od sada', + 'after' => 'nakon :time', + 'before' => 'pre :time', +); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sr_Cyrl_ME.php b/vendor/nesbot/carbon/src/Carbon/Lang/sr_Cyrl_ME.php new file mode 100644 index 0000000..9b67838 --- /dev/null +++ b/vendor/nesbot/carbon/src/Carbon/Lang/sr_Cyrl_ME.php @@ -0,0 +1,38 @@ + + * + * 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 --git a/vendor/nesbot/carbon/src/Carbon/Lang/sr_Latn_ME.php b/vendor/nesbot/carbon/src/Carbon/Lang/sr_Latn_ME.php new file mode 100644 index 0000000..d0aaee3 --- /dev/null +++ b/vendor/nesbot/carbon/src/Carbon/Lang/sr_Latn_ME.php @@ -0,0 +1,38 @@ + + * + * 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 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', + +); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sr_ME.php b/vendor/nesbot/carbon/src/Carbon/Lang/sr_ME.php new file mode 100644 index 0000000..d0aaee3 --- /dev/null +++ b/vendor/nesbot/carbon/src/Carbon/Lang/sr_ME.php @@ -0,0 +1,38 @@ + + * + * 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 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', + +); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sv.php b/vendor/nesbot/carbon/src/Carbon/Lang/sv.php new file mode 100644 index 0000000..6bebf7b --- /dev/null +++ b/vendor/nesbot/carbon/src/Carbon/Lang/sv.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Ã¥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', + 'ago' => ':time sedan', + 'from_now' => 'om :time', + 'after' => ':time efter', + 'before' => ':time före', +); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/th.php b/vendor/nesbot/carbon/src/Carbon/Lang/th.php new file mode 100644 index 0000000..c4c402e --- /dev/null +++ b/vendor/nesbot/carbon/src/Carbon/Lang/th.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/vendor/nesbot/carbon/src/Carbon/Lang/tr.php b/vendor/nesbot/carbon/src/Carbon/Lang/tr.php new file mode 100644 index 0000000..6a9dfed --- /dev/null +++ b/vendor/nesbot/carbon/src/Carbon/Lang/tr.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ıl', + 'y' => ':count yıl', + 'month' => ':count ay', + 'm' => ':count ay', + 'week' => ':count hafta', + 'w' => ':count hafta', + 'day' => ':count gün', + 'd' => ':count gün', + 'hour' => ':count saat', + 'h' => ':count saat', + 'minute' => ':count dakika', + 'min' => ':count dakika', + 'second' => ':count saniye', + 's' => ':count saniye', + 'ago' => ':time önce', + 'from_now' => ':time sonra', + 'after' => ':time sonra', + 'before' => ':time önce', +); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/uk.php b/vendor/nesbot/carbon/src/Carbon/Lang/uk.php new file mode 100644 index 0000000..aeebca3 --- /dev/null +++ b/vendor/nesbot/carbon/src/Carbon/Lang/uk.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 роки|:count років', + 'y' => ':count рік|:count роки|:count років', + 'month' => ':count міÑÑць|:count міÑÑці|:count міÑÑців', + 'm' => ':count міÑÑць|:count міÑÑці|:count міÑÑців', + 'week' => ':count тиждень|:count тижні|:count тижнів', + 'w' => ':count тиждень|:count тижні|:count тижнів', + 'day' => ':count день|:count дні|:count днів', + 'd' => ':count день|:count дні|:count днів', + 'hour' => ':count година|:count години|:count годин', + 'h' => ':count година|:count години|:count годин', + 'minute' => ':count хвилину|:count хвилини|:count хвилин', + 'min' => ':count хвилину|:count хвилини|:count хвилин', + 'second' => ':count Ñекунду|:count Ñекунди|:count Ñекунд', + 's' => ':count Ñекунду|:count Ñекунди|:count Ñекунд', + 'ago' => ':time назад', + 'from_now' => 'через :time', + 'after' => ':time піÑлÑ', + 'before' => ':time до', +); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ur.php b/vendor/nesbot/carbon/src/Carbon/Lang/ur.php new file mode 100644 index 0000000..3c5f7ed --- /dev/null +++ b/vendor/nesbot/carbon/src/Carbon/Lang/ur.php @@ -0,0 +1,24 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array( + 'year' => ':count سال', + 'month' => ':count ماه', + 'week' => ':count ÛÙتے', + 'day' => ':count روز', + 'hour' => ':count گھنٹے', + 'minute' => ':count منٹ', + 'second' => ':count سیکنڈ', + 'ago' => ':time Ù¾ÛÙ„Û’', + 'from_now' => ':time بعد', + 'after' => ':time بعد', + 'before' => ':time Ù¾ÛÙ„Û’', +); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/uz.php b/vendor/nesbot/carbon/src/Carbon/Lang/uz.php new file mode 100644 index 0000000..c997f29 --- /dev/null +++ b/vendor/nesbot/carbon/src/Carbon/Lang/uz.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 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', + 'ago' => ':time avval', + 'from_now' => ':time keyin', + 'after' => ':time keyin', + 'before' => ':time oldin', +); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/vi.php b/vendor/nesbot/carbon/src/Carbon/Lang/vi.php new file mode 100644 index 0000000..3f9838d --- /dev/null +++ b/vendor/nesbot/carbon/src/Carbon/Lang/vi.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 năm', + 'y' => ':count năm', + 'month' => ':count tháng', + 'm' => ':count tháng', + 'week' => ':count tuần', + 'w' => ':count tuần', + 'day' => ':count ngày', + 'd' => ':count ngày', + 'hour' => ':count giá»', + 'h' => ':count giá»', + 'minute' => ':count phút', + 'min' => ':count phút', + 'second' => ':count giây', + 's' => ':count giây', + 'ago' => ':time trÆ°á»›c', + 'from_now' => ':time từ bây giá»', + 'after' => ':time sau', + 'before' => ':time trÆ°á»›c', +); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/zh.php b/vendor/nesbot/carbon/src/Carbon/Lang/zh.php new file mode 100644 index 0000000..9e1f6ca --- /dev/null +++ b/vendor/nesbot/carbon/src/Carbon/Lang/zh.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/vendor/nesbot/carbon/src/Carbon/Lang/zh_TW.php b/vendor/nesbot/carbon/src/Carbon/Lang/zh_TW.php new file mode 100644 index 0000000..6c1d417 --- /dev/null +++ b/vendor/nesbot/carbon/src/Carbon/Lang/zh_TW.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/vendor/nikic/php-parser/.gitignore b/vendor/nikic/php-parser/.gitignore new file mode 100644 index 0000000..8c7db2a --- /dev/null +++ b/vendor/nikic/php-parser/.gitignore @@ -0,0 +1,4 @@ +vendor/ +composer.lock +grammar/kmyacc.exe +grammar/y.output diff --git a/vendor/nikic/php-parser/.travis.yml b/vendor/nikic/php-parser/.travis.yml new file mode 100644 index 0000000..933600f --- /dev/null +++ b/vendor/nikic/php-parser/.travis.yml @@ -0,0 +1,31 @@ +language: php + +sudo: false + +cache: + directories: + - $HOME/.composer/cache + +php: + - 5.5 + - 5.6 + - 7.0 + - nightly + - hhvm + +install: + - if [ $TRAVIS_PHP_VERSION = '5.6' ]; then composer require satooshi/php-coveralls '~1.0'; fi + - composer install --prefer-dist + +matrix: + allow_failures: + - php: nightly + fast_finish: true + +script: + - if [ $TRAVIS_PHP_VERSION = '5.6' ]; then vendor/bin/phpunit --coverage-clover build/logs/clover.xml; else vendor/bin/phpunit; fi + - if [ $TRAVIS_PHP_VERSION = '7.0' ]; then test_old/run-php-src.sh; fi + +after_success: + if [ $TRAVIS_PHP_VERSION = '5.6' ]; then php vendor/bin/coveralls; fi + diff --git a/vendor/nikic/php-parser/CHANGELOG.md b/vendor/nikic/php-parser/CHANGELOG.md new file mode 100644 index 0000000..9ef936e --- /dev/null +++ b/vendor/nikic/php-parser/CHANGELOG.md @@ -0,0 +1,341 @@ +Version 3.0.6-dev +----------------- + +Nothing yet. + +Version 3.0.5 (2017-03-05) +-------------------------- + +### Fixed + +* Name resolution of `NullableType`s is now performed earlier, so that a fully resolved signature is + available when a function is entered. (#360) +* `Error` nodes are now considered empty, while previously they extended until the token where the + error occurred. This made some nodes larger than expected. (#359) +* Fixed notices being thrown during error recovery in some situations. (#362) + +Version 3.0.4 (2017-02-10) +-------------------------- + +### Fixed + +* Fixed some extensibility issues in pretty printer (`pUseType()` is now public and `pPrec()` calls + into `p()`, instead of directly dispatching to the type-specific printing method). +* Fixed notice in `bin/php-parse` script. + +### Added + +* Error recovery from missing semicolons is now supported in more cases. +* Error recovery from trailing commas in positions where PHP does not support them is now supported. + +Version 3.0.3 (2017-02-03) +-------------------------- + +### Fixed + +* In `"$foo[0]"` the `0` is now parsed as an `LNumber` rather than `String`. (#325) +* Ensure integers and floats are always pretty printed preserving semantics, even if the particular + value can only be manually constructed. +* Throw a `LogicException` when trying to pretty-print an `Error` node. Previously this resulted in + an undefined method exception or fatal error. + +### Added + +* [PHP 7.1] Added support for negative interpolated offsets: `"$foo[-1]"` +* Added `preserveOriginalNames` option to `NameResolver`. If this option is enabled, an + `originalName` attribute, containing the unresolved name, will be added to each resolved name. +* Added `php-parse --with-positions` option, which dumps nodes with position information. + +### Deprecated + +* The XML serializer has been deprecated. In particular, the classes `Serializer\XML`, + `Unserializer\XML`, as well as the interfaces `Serializer` and `Unserializer` are deprecated. + +Version 3.0.2 (2016-12-06) +-------------------------- + +### Fixed + +* Fixed name resolution of nullable types. (#324) +* Fixed pretty-printing of nullable types. + +Version 3.0.1 (2016-12-01) +-------------------------- + +### Fixed + +* Fixed handling of nested `list()`s: If the nested list was unkeyed, it was directly included in + the list items. If it was keyed, it was wrapped in `ArrayItem`. Now nested `List_` nodes are + always wrapped in `ArrayItem`s. (#321) + +Version 3.0.0 (2016-11-30) +-------------------------- + +### Added + +* Added support for dumping node positions in the NodeDumper through the `dumpPositions` option. +* Added error recovery support for `$`, `new`, `Foo::`. + +Version 3.0.0-beta2 (2016-10-29) +-------------------------------- + +This release primarily improves our support for error recovery. + +### Added + +* Added `Node::setDocComment()` method. +* Added `Error::getMessageWithColumnInfo()` method. +* Added support for recovery from lexer errors. +* Added support for recovering from "special" errors (i.e. non-syntax parse errors). +* Added precise location information for lexer errors. +* Added `ErrorHandler` interface, and `ErrorHandler\Throwing` and `ErrorHandler\Collecting` as + specific implementations. These provide a general mechanism for handling error recovery. +* Added optional `ErrorHandler` argument to `Parser::parse()`, `Lexer::startLexing()` and + `NameResolver::__construct()`. +* The `NameResolver` now adds a `namespacedName` attribute on name nodes that cannot be statically + resolved (unqualified unaliased function or constant names in namespaces). + +### Fixed + +* Fixed attribute assignment for `GroupUse` prefix and variables in interpolated strings. + +### Changed + +* The constants on `NameTraverserInterface` have been moved into the `NameTraverser` class. +* Due to the error handling changes, the `Parser` interface and `Lexer` API have changed. +* The emulative lexer now directly postprocesses tokens, instead of using `~__EMU__~` sequences. + This changes the protected API of the lexer. +* The `Name::slice()` method now returns `null` for empty slices, previously `new Name([])` was + used. `Name::concat()` now also supports concatenation with `null`. + +### Removed + +* Removed `Name::append()` and `Name::prepend()`. These mutable methods have been superseded by + the immutable `Name::concat()`. +* Removed `Error::getRawLine()` and `Error::setRawLine()`. These methods have been superseded by + `Error::getStartLine()` and `Error::setStartLine()`. +* Removed support for node cloning in the `NodeTraverser`. +* Removed `$separator` argument from `Name::toString()`. +* Removed `throw_on_error` parser option and `Parser::getErrors()` method. Use the `ErrorHandler` + mechanism instead. + +Version 3.0.0-beta1 (2016-09-16) +-------------------------------- + +### Added + +* [7.1] Function/method and parameter builders now support PHP 7.1 type hints (void, iterable and + nullable types). +* Nodes and Comments now implement `JsonSerializable`. The node kind is stored in a `nodeType` + property. +* The `InlineHTML` node now has an `hasLeadingNewline` attribute, that specifies whether the + preceding closing tag contained a newline. The pretty printer honors this attribute. +* Partial parsing of `$obj->` (with missing property name) is now supported in error recovery mode. +* The error recovery mode is now exposed in the `php-parse` script through the `--with-recovery` + or `-r` flags. + +The following changes are also part of PHP-Parser 2.1.1: + +* The PHP 7 parser will now generate a parse error for `$var =& new Obj` assignments. +* Comments on free-standing code blocks will now be retained as comments on the first statement in + the code block. + +Version 3.0.0-alpha1 (2016-07-25) +--------------------------------- + +### Added + +* [7.1] Added support for `void` and `iterable` types. These will now be represented as strings + (instead of `Name` instances) similar to other builtin types. +* [7.1] Added support for class constant visibility. The `ClassConst` node now has a `flags` subnode + holding the visibility modifier, as well as `isPublic()`, `isProtected()` and `isPrivate()` + methods. The constructor changed to accept the additional subnode. +* [7.1] Added support for nullable types. These are represented using a new `NullableType` node + with a single `type` subnode. +* [7.1] Added support for short array destructuring syntax. This means that `Array` nodes may now + appear as the left-hand-side of assignments and foreach value targets. Additionally the array + items may now contain `null` values if elements are skipped. +* [7.1] Added support for keys in list() destructuring. The `List` subnode `vars` has been renamed + to `items` and now contains `ArrayItem`s instead of plain variables. +* [7.1] Added support for multi-catch. The `Catch` subnode `type` has been renamed to `types` and + is now an array of `Name`s. +* `Name::slice()` now supports lengths and negative offsets. This brings it in line with + `array_slice()` functionality. + +### Changed + +Due to PHP 7.1 support additions described above, the node structure changed as follows: + +* `void` and `iterable` types are now stored as strings if the PHP 7 parser is used. +* The `ClassConst` constructor changed to accept an additional `flags` subnode. +* The `Array` subnode `items` may now contain `null` elements (destructuring). +* The `List` subnode `vars` has been renamed to `items` and now contains `ArrayItem`s instead of + plain variables. +* The `Catch` subnode `type` has been renamed to `types` and is now an array of `Name`s. + +Additionally the following changes were made: + +* The `type` subnode on `Class`, `ClassMethod` and `Property` has been renamed to `flags`. The + `type` subnode has retained for backwards compatibility and is populated to the same value as + `flags`. However, writes to `type` will not update `flags`. +* The `TryCatch` subnode `finallyStmts` has been replaced with a `finally` subnode that holds an + explicit `Finally` node. This allows for more accurate attribute assignment. +* The `Trait` constructor now has the same form as the `Class` and `Interface` constructors: It + takes an array of subnodes. Unlike classes/interfaces, traits can only have a `stmts` subnode. +* The `NodeDumper` now prints class/method/property/constant modifiers, as well as the include and + use type in a textual representation, instead of only showing the number. +* All methods on `PrettyPrinter\Standard` are now protected. Previoulsy most of them were public. + +### Removed + +* Removed support for running on PHP 5.4. It is however still possible to parse PHP 5.2-5.4 code + while running on a newer version. +* The deprecated `Comment::setLine()` and `Comment::setText()` methods have been removed. +* The deprecated `Name::set()`, `Name::setFirst()` and `Name::setLast()` methods have been removed. + +Version 2.1.1 (2016-09-16) +-------------------------- + +### Changed + +* The pretty printer will now escape all control characters in the range `\x00-\x1F` inside double + quoted strings. If no special escape sequence is available, an octal escape will be used. +* The quality of the error recovery has been improved. In particular unterminated expressions should + be handled more gracefully. +* The PHP 7 parser will now generate a parse error for `$var =& new Obj` assignments. +* Comments on free-standing code blocks will no be retained as comments on the first statement in + the code block. + +Version 2.1.0 (2016-04-19) +-------------------------- + +### Fixed + +* Properly support `B""` strings (with uppercase `B`) in a number of places. +* Fixed reformatting of indented parts in a certain non-standard comment style. + +### Added + +* Added `dumpComments` option to node dumper, to enable dumping of comments associated with nodes. +* Added `Stmt\Nop` node, that is used to collect comments located at the end of a block or at the + end of a file (without a following node with which they could otherwise be associated). +* Added `kind` attribute to `Expr\Exit` to distinguish between `exit` and `die`. +* Added `kind` attribute to `Scalar\LNumber` to distinguish between decimal, binary, octal and + hexadecimal numbers. +* Added `kind` attribtue to `Expr\Array` to distinguish between `array()` and `[]`. +* Added `kind` attribute to `Scalar\String` and `Scalar\Encapsed` to distinguish between + single-quoted, double-quoted, heredoc and nowdoc string. +* Added `docLabel` attribute to `Scalar\String` and `Scalar\Encapsed`, if it is a heredoc or + nowdoc string. +* Added start file offset information to `Comment` nodes. +* Added `setReturnType()` method to function and method builders. +* Added `-h` and `--help` options to `php-parse` script. + +### Changed + +* Invalid octal literals now throw a parse error in PHP 7 mode. +* The pretty printer takes all the new attributes mentioned in the previous section into account. +* The protected `AbstractPrettyPrinter::pComments()` method no longer returns a trailing newline. +* The bundled autoloader supports library files being stored in a different directory than + `PhpParser` for easier downstream distribution. + +### Deprecated + +* The `Comment::setLine()` and `Comment::setText()` methods have been deprecated. Construct new + objects instead. + +### Removed + +* The internal (but public) method `Scalar\LNumber::parse()` has been removed. A non-internal + `LNumber::fromString()` method has been added instead. + +Version 2.0.1 (2016-02-28) +-------------------------- + +### Fixed + +* `declare() {}` and `declare();` are not semantically equivalent and will now result in different + ASTs. The format case will have an empty `stmts` array, while the latter will set `stmts` to + `null`. +* Magic constants are now supported as semi-reserved keywords. +* A shebang line like `#!/usr/bin/env php` is now allowed at the start of a namespaced file. + Previously this generated an exception. +* The `prettyPrintFile()` method will not strip a trailing `?>` from the raw data that follows a + `__halt_compiler()` statement. +* The `prettyPrintFile()` method will not strip an opening `slice()` which takes a subslice of a name. + +### Changed + +* `PhpParser\Parser` is now an interface, implemented by `Parser\Php5`, `Parser\Php7` and + `Parser\Multiple`. The `Multiple` parser will try multiple parsers, until one succeeds. +* Token constants are now defined on `PhpParser\Parser\Tokens` rather than `PhpParser\Parser`. +* The `Name->set()`, `Name->append()`, `Name->prepend()` and `Name->setFirst()` methods are + deprecated in favor of `Name::concat()` and `Name->slice()`. +* The `NodeTraverser` no longer clones nodes by default. The old behavior can be restored by + passing `true` to the constructor. +* The constructor for `Scalar` nodes no longer has a default value. E.g. `new LNumber()` should now + be written as `new LNumber(0)`. + +--- + +**This changelog only includes changes from the 2.0 series. For older changes see the +[1.x series changelog](https://github.com/nikic/PHP-Parser/blob/1.x/CHANGELOG.md) and the +[0.9 series changelog](https://github.com/nikic/PHP-Parser/blob/0.9/CHANGELOG.md).** \ No newline at end of file diff --git a/vendor/nikic/php-parser/LICENSE b/vendor/nikic/php-parser/LICENSE new file mode 100644 index 0000000..443210b --- /dev/null +++ b/vendor/nikic/php-parser/LICENSE @@ -0,0 +1,31 @@ +Copyright (c) 2011 by Nikita Popov. + +Some rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + + * The names of the contributors may not be used to endorse or + promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/vendor/nikic/php-parser/README.md b/vendor/nikic/php-parser/README.md new file mode 100644 index 0000000..2f62754 --- /dev/null +++ b/vendor/nikic/php-parser/README.md @@ -0,0 +1,99 @@ +PHP Parser +========== + +[![Build Status](https://travis-ci.org/nikic/PHP-Parser.svg?branch=master)](https://travis-ci.org/nikic/PHP-Parser) [![Coverage Status](https://coveralls.io/repos/github/nikic/PHP-Parser/badge.svg?branch=master)](https://coveralls.io/github/nikic/PHP-Parser?branch=master) + +This is a PHP 5.2 to PHP 7.1 parser written in PHP. Its purpose is to simplify static code analysis and +manipulation. + +[**Documentation for version 3.x**][doc_master] (stable; for running on PHP >= 5.5; for parsing PHP 5.2 to PHP 7.1). + +[Documentation for version 2.x][doc_2_x] (stable; for running on PHP >= 5.4; for parsing PHP 5.2 to PHP 7.0). + +[Documentation for version 1.x][doc_1_x] (unsupported; for running on PHP >= 5.3; for parsing PHP 5.2 to PHP 5.6). + +In a Nutshell +------------- + +The parser turns PHP source code into an abstract syntax tree. For example, if you pass the following code into the +parser: + +```php + Expr_AssignOp_BitwiseAnd +Expr_AssignBitwiseOr => Expr_AssignOp_BitwiseOr +Expr_AssignBitwiseXor => Expr_AssignOp_BitwiseXor +Expr_AssignConcat => Expr_AssignOp_Concat +Expr_AssignDiv => Expr_AssignOp_Div +Expr_AssignMinus => Expr_AssignOp_Minus +Expr_AssignMod => Expr_AssignOp_Mod +Expr_AssignMul => Expr_AssignOp_Mul +Expr_AssignPlus => Expr_AssignOp_Plus +Expr_AssignShiftLeft => Expr_AssignOp_ShiftLeft +Expr_AssignShiftRight => Expr_AssignOp_ShiftRight + +Expr_BitwiseAnd => Expr_BinaryOp_BitwiseAnd +Expr_BitwiseOr => Expr_BinaryOp_BitwiseOr +Expr_BitwiseXor => Expr_BinaryOp_BitwiseXor +Expr_BooleanAnd => Expr_BinaryOp_BooleanAnd +Expr_BooleanOr => Expr_BinaryOp_BooleanOr +Expr_Concat => Expr_BinaryOp_Concat +Expr_Div => Expr_BinaryOp_Div +Expr_Equal => Expr_BinaryOp_Equal +Expr_Greater => Expr_BinaryOp_Greater +Expr_GreaterOrEqual => Expr_BinaryOp_GreaterOrEqual +Expr_Identical => Expr_BinaryOp_Identical +Expr_LogicalAnd => Expr_BinaryOp_LogicalAnd +Expr_LogicalOr => Expr_BinaryOp_LogicalOr +Expr_LogicalXor => Expr_BinaryOp_LogicalXor +Expr_Minus => Expr_BinaryOp_Minus +Expr_Mod => Expr_BinaryOp_Mod +Expr_Mul => Expr_BinaryOp_Mul +Expr_NotEqual => Expr_BinaryOp_NotEqual +Expr_NotIdentical => Expr_BinaryOp_NotIdentical +Expr_Plus => Expr_BinaryOp_Plus +Expr_ShiftLeft => Expr_BinaryOp_ShiftLeft +Expr_ShiftRight => Expr_BinaryOp_ShiftRight +Expr_Smaller => Expr_BinaryOp_Smaller +Expr_SmallerOrEqual => Expr_BinaryOp_SmallerOrEqual + +Scalar_ClassConst => Scalar_MagicConst_Class +Scalar_DirConst => Scalar_MagicConst_Dir +Scalar_FileConst => Scalar_MagicConst_File +Scalar_FuncConst => Scalar_MagicConst_Function +Scalar_LineConst => Scalar_MagicConst_Line +Scalar_MethodConst => Scalar_MagicConst_Method +Scalar_NSConst => Scalar_MagicConst_Namespace +Scalar_TraitConst => Scalar_MagicConst_Trait +``` + +These changes may affect custom pretty printers and code comparing the return value of `Node::getType()` to specific +strings. + +### Miscellaneous + + * The classes `Template` and `TemplateLoader` have been removed. You should use some other [code generation][code_gen] + project built on top of PHP-Parser instead. + + * The `PrettyPrinterAbstract::pStmts()` method now emits a leading newline if the statement list is not empty. + Custom pretty printers should remove the explicit newline before `pStmts()` calls. + + Old: + + ```php + public function pStmt_Trait(PHPParser_Node_Stmt_Trait $node) { + return 'trait ' . $node->name + . "\n" . '{' . "\n" . $this->pStmts($node->stmts) . "\n" . '}'; + } + ``` + + New: + + ```php + public function pStmt_Trait(Stmt\Trait_ $node) { + return 'trait ' . $node->name + . "\n" . '{' . $this->pStmts($node->stmts) . "\n" . '}'; + } + ``` + + [code_gen]: https://github.com/nikic/PHP-Parser/wiki/Projects-using-the-PHP-Parser#code-generation \ No newline at end of file diff --git a/vendor/nikic/php-parser/UPGRADE-2.0.md b/vendor/nikic/php-parser/UPGRADE-2.0.md new file mode 100644 index 0000000..1c61de5 --- /dev/null +++ b/vendor/nikic/php-parser/UPGRADE-2.0.md @@ -0,0 +1,74 @@ +Upgrading from PHP-Parser 1.x to 2.0 +==================================== + +### PHP version requirements + +PHP-Parser now requires PHP 5.4 or newer to run. It is however still possible to *parse* PHP 5.2 and +PHP 5.3 source code, while running on a newer version. + +### Creating a parser instance + +Parser instances should now be created through the `ParserFactory`. Old direct instantiation code +will not work, because the parser class was renamed. + +Old: + +```php +use PhpParser\Parser, PhpParser\Lexer; +$parser = new Parser(new Lexer\Emulative); +``` + +New: + +```php +use PhpParser\ParserFactory; +$parser = (new ParserFactory)->create(ParserFactory::PREFER_PHP7); +``` + +The first argument to `ParserFactory` determines how different PHP versions are handled. The +possible values are: + + * `ParserFactory::PREFER_PHP7`: Try to parse code as PHP 7. If this fails, try to parse it as PHP 5. + * `ParserFactory::PREFER_PHP5`: Try to parse code as PHP 5. If this fails, try to parse it as PHP 7. + * `ParserFactory::ONLY_PHP7`: Parse code as PHP 7. + * `ParserFactory::ONLY_PHP5`: Parse code as PHP 5. + +For most practical purposes the difference between `PREFER_PHP7` and `PREFER_PHP5` is mainly whether +a scalar type hint like `string` will be stored as `'string'` (PHP 7) or as `new Name('string')` +(PHP 5). + +To use a custom lexer, pass it as the second argument to the `create()` method: + +```php +use PhpParser\ParserFactory; +$lexer = new MyLexer; +$parser = (new ParserFactory)->create(ParserFactory::PREFER_PHP7, $lexer); +``` + +### Rename of the `PhpParser\Parser` class + +`PhpParser\Parser` is now an interface, which is implemented by `Parser\Php5`, `Parser\Php7` and +`Parser\Multiple`. Parser tokens are now defined in `Parser\Tokens`. If you use the `ParserFactory` +described above to create your parser instance, these changes should have no further impact on you. + +### Removal of legacy aliases + +All legacy aliases for classes have been removed. This includes the old non-namespaced `PHPParser_` +classes, as well as the classes that had to be renamed for PHP 7 support. + +### Deprecations + +The `set()`, `setFirst()`, `append()` and `prepend()` methods of the `Node\Name` class have been +deprecated. Instead `Name::concat()` and `Name->slice()` should be used. + +### Miscellaneous + +* The `NodeTraverser` no longer clones nodes by default. If you want to restore the old behavior, + pass `true` to the constructor. +* The legacy node format has been removed. If you use custom nodes, they are now expected to + implement a `getSubNodeNames()` method. +* The default value for `Scalar` node constructors was removed. This means that something like + `new LNumber()` should be replaced by `new LNumber(0)`. +* String parts of encapsed strings are now represented using `Scalar\EncapsStringPart` nodes, while + previously raw strings were used. This affects the `parts` child of `Scalar\Encaps` and + `Expr\ShellExec`. \ No newline at end of file diff --git a/vendor/nikic/php-parser/UPGRADE-3.0.md b/vendor/nikic/php-parser/UPGRADE-3.0.md new file mode 100644 index 0000000..9e04f2a --- /dev/null +++ b/vendor/nikic/php-parser/UPGRADE-3.0.md @@ -0,0 +1,160 @@ +Upgrading from PHP-Parser 2.x to 3.0 +==================================== + +The backwards-incompatible changes in this release may be summarized as follows: + + * The specific details of the node representation have changed in some cases, primarily to + accomodate new PHP 7.1 features. + * There have been significant changes to the error recovery implementation. This may affect you, + if you used the error recovery mode or have a custom lexer implementation. + * A number of deprecated methods were removed. + +### PHP version requirements + +PHP-Parser now requires PHP 5.5 or newer to run. It is however still possible to *parse* PHP 5.2, +5.3 and 5.4 source code, while running on a newer version. + +### Changes to the node structure + +The following changes are likely to require code changes if the respective nodes are used: + + * The `List` subnode `vars` has been renamed to `items` and now contains `ArrayItem`s instead of + plain variables. + * The `Catch` subnode `type` has been renamed to `types` and is now an array of `Name`s. + * The `TryCatch` subnode `finallyStmts` has been replaced with a `finally` subnode that holds an + explicit `Finally` node. + * The `type` subnode on `Class`, `ClassMethod` and `Property` has been renamed to `flags`. The + `type` subnode has retained for backwards compatibility and is populated to the same value as + `flags`. However, writes to `type` will not update `flags` and use of `type` is discouraged. + +The following changes are unlikely to require code changes: + + * The `ClassConst` constructor changed to accept an additional `flags` subnode. + * The `Trait` constructor now has the same form as the `Class` and `Interface` constructors: It + takes an array of subnodes. Unlike classes/interfaces, traits can only have a `stmts` subnode. + * The `Array` subnode `items` may now contain `null` elements (due to destructuring). + * `void` and `iterable` types are now stored as strings if the PHP 7 parser is used. Previously + these would have been represented as `Name` instances. + +### Changes to error recovery mode + +Previously, error recovery mode was enabled by setting the `throwOnError` option to `false` when +creating the parser, while collected errors were retrieved using the `getErrors()` method: + +```php +$lexer = ...; +$parser = (new ParserFactory)->create(ParserFactor::ONLY_PHP7, $lexer, [ + 'throwOnError' => true, +]); + +$stmts = $parser->parse($code); +$errors = $parser->getErrors(); +if ($errors) { + handleErrors($errors); +} +processAst($stmts); +``` + +Both the `throwOnError` option and the `getErrors()` method have been removed in PHP-Parser 3.0. +Instead an instance of `ErrorHandler\Collecting` should be passed to the `parse()` method: + +```php +$lexer = ...; +$parser = (new ParserFactory)->create(ParserFactor::ONLY_PHP7, $lexer); + +$errorHandler = new ErrorHandler\Collecting; +$stmts = $parser->parse($code, $errorHandler); +if ($errorHandler->hasErrors()) { + handleErrors($errorHandler->getErrors()); +} +processAst($stmts); +``` + +#### Multiple parser fallback in error recovery mode + +As a result of this change, if a `Multiple` parser is used (e.g. through the `ParserFactory` using +`PREFER_PHP7` or `PREFER_PHP5`), it will now return the result of the first *non-throwing* parse. As +parsing never throws in error recovery mode, the result from the first parser will always be +returned. + +The PHP 7 parser is a superset of the PHP 5 parser, with the exceptions that `=& new` and +`global $$foo->bar` are not supported (other differences are in representation only). The PHP 7 +parser will be able to recover from the error in both cases. For this reason, this change will +likely pass unnoticed if you do not specifically test for this syntax. + +It is possible to restore the precise previous behavior with the following code: + +```php +$lexer = ...; +$parser7 = new Parser\Php7($lexer); +$parser5 = new Parser\Php5($lexer); + +$errors7 = new ErrorHandler\Collecting(); +$stmts7 = $parser7->parse($code, $errors7); +if ($errors7->hasErrors()) { + $errors5 = new ErrorHandler\Collecting(); + $stmts5 = $parser5->parse($code, $errors5); + if (!$errors5->hasErrors()) { + // If PHP 7 parse has errors but PHP 5 parse has no errors, use PHP 5 result + return [$stmts5, $errors5]; + } +} +// If PHP 7 succeeds or both fail use PHP 7 result +return [$stmts7, $errors7]; +``` + +#### Error handling in the lexer + +In order to support recovery from lexer errors, the signature of the `startLexing()` method changed +to optionally accept an `ErrorHandler`: + +```php +// OLD +public function startLexing($code); +// NEW +public function startLexing($code, ErrorHandler $errorHandler = null); +``` + +If you use a custom lexer with overriden `startLexing()` method, it needs to be changed to accept +the extra parameter. The value should be passed on to the parent method. + +#### Error checks in node constructors + +The constructors of certain nodes used to contain additional checks for semantic errors, such as +creating a try block without either catch or finally. These checks have been moved from the node +constructors into the parser. This allows recovery from such errors, as well as representing the +resulting (invalid) AST. + +This means that certain error conditions are no longer checked for manually constructed nodes. + +### Removed methods, arguments, options + +The following methods, arguments or options have been removed: + + * `Comment::setLine()`, `Comment::setText()`: Create new `Comment` instances instead. + * `Name::set()`, `Name::setFirst()`, `Name::setLast()`, `Name::append()`, `Name::prepend()`: + Use `Name::concat()` in combination with `Name::slice()` instead. + * `Error::getRawLine()`, `Error::setRawLine()`. Use `Error::getStartLine()` and + `Error::setStartLine()` instead. + * `Parser::getErrors()`. Use `ErrorHandler\Collecting` instead. + * `$separator` argument of `Name::toString()`. Use `strtr()` instead, if you really need it. + * `$cloneNodes` argument of `NodeTraverser::__construct()`. Explicitly clone nodes in the visitor + instead. + * `throwOnError` parser option. Use `ErrorHandler\Collecting` instead. + +### Miscellaneous + + * The `NameResolver` will now resolve unqualified function and constant names in the global + namespace into fully qualified names. For example `foo()` in the global namespace resolves to + `\foo()`. For names where no static resolution is possible, a `namespacedName` attribute is + added now, containing the namespaced variant of the name. + * All methods on `PrettyPrinter\Standard` are now protected. Previoulsy most of them were public. + The pretty printer should only be invoked using the `prettyPrint()`, `prettyPrintFile()` and + `prettyPrintExpr()` methods. + * The node dumper now prints numeric values that act as enums/flags in a string representation. + If node dumper results are used in tests, updates may be needed to account for this. + * The constants on `NameTraverserInterface` have been moved into the `NameTraverser` class. + * The emulative lexer now directly postprocesses tokens, instead of using `~__EMU__~` sequences. + This changes the protected API of the emulative lexer. + * The `Name::slice()` method now returns `null` for empty slices, previously `new Name([])` was + used. `Name::concat()` now also supports concatenation with `null`. diff --git a/vendor/nikic/php-parser/bin/php-parse b/vendor/nikic/php-parser/bin/php-parse new file mode 100755 index 0000000..1760e75 --- /dev/null +++ b/vendor/nikic/php-parser/bin/php-parse @@ -0,0 +1,202 @@ +#!/usr/bin/env php + array( + 'startLine', 'endLine', 'startFilePos', 'endFilePos', 'comments' +))); +$parser = (new PhpParser\ParserFactory)->create( + PhpParser\ParserFactory::PREFER_PHP7, + $lexer +); +$dumper = new PhpParser\NodeDumper([ + 'dumpComments' => true, + 'dumpPositions' => $attributes['with-positions'], +]); +$prettyPrinter = new PhpParser\PrettyPrinter\Standard; +$serializer = new PhpParser\Serializer\XML; + +$traverser = new PhpParser\NodeTraverser(); +$traverser->addVisitor(new PhpParser\NodeVisitor\NameResolver); + +foreach ($files as $file) { + if (strpos($file, ' Code $code\n"; + } else { + if (!file_exists($file)) { + die("File $file does not exist.\n"); + } + + $code = file_get_contents($file); + echo "====> File $file:\n"; + } + + if ($attributes['with-recovery']) { + $errorHandler = new PhpParser\ErrorHandler\Collecting; + $stmts = $parser->parse($code, $errorHandler); + foreach ($errorHandler->getErrors() as $error) { + $message = formatErrorMessage($error, $code, $attributes['with-column-info']); + echo $message . "\n"; + } + if (null === $stmts) { + continue; + } + } else { + try { + $stmts = $parser->parse($code); + } catch (PhpParser\Error $error) { + $message = formatErrorMessage($error, $code, $attributes['with-column-info']); + die($message . "\n"); + } + } + + foreach ($operations as $operation) { + if ('dump' === $operation) { + echo "==> Node dump:\n"; + echo $dumper->dump($stmts, $code), "\n"; + } elseif ('pretty-print' === $operation) { + echo "==> Pretty print:\n"; + echo $prettyPrinter->prettyPrintFile($stmts), "\n"; + } elseif ('serialize-xml' === $operation) { + echo "==> Serialized XML:\n"; + echo $serializer->serialize($stmts), "\n"; + } elseif ('var-dump' === $operation) { + echo "==> var_dump():\n"; + var_dump($stmts); + } elseif ('resolve-names' === $operation) { + echo "==> Resolved names.\n"; + $stmts = $traverser->traverse($stmts); + } + } +} + +function formatErrorMessage(PhpParser\Error $e, $code, $withColumnInfo) { + if ($withColumnInfo && $e->hasColumnInfo()) { + return $e->getMessageWithColumnInfo($code); + } else { + return $e->getMessage(); + } +} + +function showHelp($error = '') { + if ($error) { + echo $error . "\n\n"; + } + die(<< false, + 'with-positions' => false, + 'with-recovery' => false, + ); + + array_shift($args); + $parseOptions = true; + foreach ($args as $arg) { + if (!$parseOptions) { + $files[] = $arg; + continue; + } + + switch ($arg) { + case '--dump': + case '-d': + $operations[] = 'dump'; + break; + case '--pretty-print': + case '-p': + $operations[] = 'pretty-print'; + break; + case '--serialize-xml': + $operations[] = 'serialize-xml'; + break; + case '--var-dump': + $operations[] = 'var-dump'; + break; + case '--resolve-names': + case '-N'; + $operations[] = 'resolve-names'; + break; + case '--with-column-info': + case '-c'; + $attributes['with-column-info'] = true; + break; + case '--with-positions': + case '-P': + $attributes['with-positions'] = true; + break; + case '--with-recovery': + case '-r': + $attributes['with-recovery'] = true; + break; + case '--help': + case '-h'; + showHelp(); + break; + case '--': + $parseOptions = false; + break; + default: + if ($arg[0] === '-') { + showHelp("Invalid operation $arg."); + } else { + $files[] = $arg; + } + } + } + + return array($operations, $files, $attributes); +} diff --git a/vendor/nikic/php-parser/composer.json b/vendor/nikic/php-parser/composer.json new file mode 100644 index 0000000..66df90a --- /dev/null +++ b/vendor/nikic/php-parser/composer.json @@ -0,0 +1,30 @@ +{ + "name": "nikic/php-parser", + "description": "A PHP parser written in PHP", + "keywords": ["php", "parser"], + "type": "library", + "license": "BSD-3-Clause", + "authors": [ + { + "name": "Nikita Popov" + } + ], + "require": { + "php": ">=5.5", + "ext-tokenizer": "*" + }, + "require-dev": { + "phpunit/phpunit": "~4.0|~5.0" + }, + "autoload": { + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } + }, + "bin": ["bin/php-parse"], + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + } +} diff --git a/vendor/nikic/php-parser/doc/0_Introduction.markdown b/vendor/nikic/php-parser/doc/0_Introduction.markdown new file mode 100644 index 0000000..ca1ceb2 --- /dev/null +++ b/vendor/nikic/php-parser/doc/0_Introduction.markdown @@ -0,0 +1,80 @@ +Introduction +============ + +This project is a PHP 5.2 to PHP 7.1 parser **written in PHP itself**. + +What is this for? +----------------- + +A parser is useful for [static analysis][0], manipulation of code and basically any other +application dealing with code programmatically. A parser constructs an [Abstract Syntax Tree][1] +(AST) of the code and thus allows dealing with it in an abstract and robust way. + +There are other ways of processing source code. One that PHP supports natively is using the +token stream generated by [`token_get_all`][2]. The token stream is much more low level than +the AST and thus has different applications: It allows to also analyze the exact formatting of +a file. On the other hand the token stream is much harder to deal with for more complex analysis. +For example an AST abstracts away the fact that in PHP variables can be written as `$foo`, but also +as `$$bar`, `${'foobar'}` or even `${!${''}=barfoo()}`. You don't have to worry about recognizing +all the different syntaxes from a stream of tokens. + +Another question is: Why would I want to have a PHP parser *written in PHP*? Well, PHP might not be +a language especially suited for fast parsing, but processing the AST is much easier in PHP than it +would be in other, faster languages like C. Furthermore the people most probably wanting to do +programmatic PHP code analysis are incidentally PHP developers, not C developers. + +What can it parse? +------------------ + +The parser supports parsing PHP 5.2-5.6 and PHP 7. + +As the parser is based on the tokens returned by `token_get_all` (which is only able to lex the PHP +version it runs on), additionally a wrapper for emulating tokens from newer versions is provided. +This allows to parse PHP 7.1 source code running on PHP 5.5, for example. This emulation is somewhat +hacky and not perfect, but it should work well on any sane code. + +What output does it produce? +---------------------------- + +The parser produces an [Abstract Syntax Tree][1] (AST) also known as a node tree. How this looks like +can best be seen in an example. The program `create(ParserFactory::PREFER_PHP7); +``` + +The factory accepts a kind argument, that determines how different PHP versions are treated: + +Kind | Behavior +-----|--------- +`ParserFactory::PREFER_PHP7` | Try to parse code as PHP 7. If this fails, try to parse it as PHP 5. +`ParserFactory::PREFER_PHP5` | Try to parse code as PHP 5. If this fails, try to parse it as PHP 7. +`ParserFactory::ONLY_PHP7` | Parse code as PHP 7. +`ParserFactory::ONLY_PHP5` | Parse code as PHP 5. + +Unless you have strong reason to use something else, `PREFER_PHP7` is a reasonable default. + +The `create()` method optionally accepts a `Lexer` instance as the second argument. Some use cases +that require customized lexers are discussed in the [lexer documentation](component/Lexer.markdown). + +Subsequently you can pass PHP code (including the opening `create(ParserFactory::PREFER_PHP7); + +try { + $stmts = $parser->parse($code); + // $stmts is an array of statement nodes +} catch (Error $e) { + echo 'Parse Error: ', $e->getMessage(); +} +``` + +A parser instance can be reused to parse multiple files. + +Node tree +--------- + +If you use the above code with `$code = "subNodeName`. The `Stmt\Echo_` node has only one subnode `exprs`. So in order to access it +in the above example you would write `$stmts[0]->exprs`. If you wanted to access the name of the function +call, you would write `$stmts[0]->exprs[1]->name`. + +All nodes also define a `getType()` method that returns the node type. The type is the class name +without the `PhpParser\Node\` prefix and `\` replaced with `_`. It also does not contain a trailing +`_` for reserved-keyword class names. + +It is possible to associate custom metadata with a node using the `setAttribute()` method. This data +can then be retrieved using `hasAttribute()`, `getAttribute()` and `getAttributes()`. + +By default the lexer adds the `startLine`, `endLine` and `comments` attributes. `comments` is an array +of `PhpParser\Comment[\Doc]` instances. + +The start line can also be accessed using `getLine()`/`setLine()` (instead of `getAttribute('startLine')`). +The last doc comment from the `comments` attribute can be obtained using `getDocComment()`. + +Pretty printer +-------------- + +The pretty printer component compiles the AST back to PHP code. As the parser does not retain formatting +information the formatting is done using a specified scheme. Currently there is only one scheme available, +namely `PhpParser\PrettyPrinter\Standard`. + +```php +use PhpParser\Error; +use PhpParser\ParserFactory; +use PhpParser\PrettyPrinter; + +$code = "create(ParserFactory::PREFER_PHP7); +$prettyPrinter = new PrettyPrinter\Standard; + +try { + // parse + $stmts = $parser->parse($code); + + // change + $stmts[0] // the echo statement + ->exprs // sub expressions + [0] // the first of them (the string node) + ->value // it's value, i.e. 'Hi ' + = 'Hello '; // change to 'Hello ' + + // pretty print + $code = $prettyPrinter->prettyPrint($stmts); + + echo $code; +} catch (Error $e) { + echo 'Parse Error: ', $e->getMessage(); +} +``` + +The above code will output: + + parse()`, then changed and then +again converted to code using `PhpParser\PrettyPrinter\Standard->prettyPrint()`. + +The `prettyPrint()` method pretty prints a statements array. It is also possible to pretty print only a +single expression using `prettyPrintExpr()`. + +The `prettyPrintFile()` method can be used to print an entire file. This will include the opening `create(ParserFactory::PREFER_PHP7); +$traverser = new NodeTraverser; +$prettyPrinter = new PrettyPrinter\Standard; + +// add your visitor +$traverser->addVisitor(new MyNodeVisitor); + +try { + $code = file_get_contents($fileName); + + // parse + $stmts = $parser->parse($code); + + // traverse + $stmts = $traverser->traverse($stmts); + + // pretty print + $code = $prettyPrinter->prettyPrintFile($stmts); + + echo $code; +} catch (PhpParser\Error $e) { + echo 'Parse Error: ', $e->getMessage(); +} +``` + +The corresponding node visitor might look like this: + +```php +use PhpParser\Node; +use PhpParser\NodeVisitorAbstract; + +class MyNodeVisitor extends NodeVisitorAbstract +{ + public function leaveNode(Node $node) { + if ($node instanceof Node\Scalar\String_) { + $node->value = 'foo'; + } + } +} +``` + +The above node visitor would change all string literals in the program to `'foo'`. + +All visitors must implement the `PhpParser\NodeVisitor` interface, which defines the following four +methods: + +```php +public function beforeTraverse(array $nodes); +public function enterNode(\PhpParser\Node $node); +public function leaveNode(\PhpParser\Node $node); +public function afterTraverse(array $nodes); +``` + +The `beforeTraverse()` method is called once before the traversal begins and is passed the nodes the +traverser was called with. This method can be used for resetting values before traversation or +preparing the tree for traversal. + +The `afterTraverse()` method is similar to the `beforeTraverse()` method, with the only difference that +it is called once after the traversal. + +The `enterNode()` and `leaveNode()` methods are called on every node, the former when it is entered, +i.e. before its subnodes are traversed, the latter when it is left. + +All four methods can either return the changed node or not return at all (i.e. `null`) in which +case the current node is not changed. + +The `enterNode()` method can additionally return the value `NodeTraverser::DONT_TRAVERSE_CHILDREN`, +which instructs the traverser to skip all children of the current node. + +The `leaveNode()` method can additionally return the value `NodeTraverser::REMOVE_NODE`, in which +case the current node will be removed from the parent array. Furthermore it is possible to return +an array of nodes, which will be merged into the parent array at the offset of the current node. +I.e. if in `array(A, B, C)` the node `B` should be replaced with `array(X, Y, Z)` the result will +be `array(A, X, Y, Z, C)`. + +Instead of manually implementing the `NodeVisitor` interface you can also extend the `NodeVisitorAbstract` +class, which will define empty default implementations for all the above methods. + +The NameResolver node visitor +----------------------------- + +One visitor is already bundled with the package: `PhpParser\NodeVisitor\NameResolver`. This visitor +helps you work with namespaced code by trying to resolve most names to fully qualified ones. + +For example, consider the following code: + + use A as B; + new B\C(); + +In order to know that `B\C` really is `A\C` you would need to track aliases and namespaces yourself. +The `NameResolver` takes care of that and resolves names as far as possible. + +After running it most names will be fully qualified. The only names that will stay unqualified are +unqualified function and constant names. These are resolved at runtime and thus the visitor can't +know which function they are referring to. In most cases this is a non-issue as the global functions +are meant. + +Also the `NameResolver` adds a `namespacedName` subnode to class, function and constant declarations +that contains the namespaced name instead of only the shortname that is available via `name`. + +Example: Converting namespaced code to pseudo namespaces +-------------------------------------------------------- + +A small example to understand the concept: We want to convert namespaced code to pseudo namespaces +so it works on 5.2, i.e. names like `A\\B` should be converted to `A_B`. Note that such conversions +are fairly complicated if you take PHP's dynamic features into account, so our conversion will +assume that no dynamic features are used. + +We start off with the following base code: + +```php +use PhpParser\ParserFactory; +use PhpParser\PrettyPrinter; +use PhpParser\NodeTraverser; +use PhpParser\NodeVisitor\NameResolver; + +$inDir = '/some/path'; +$outDir = '/some/other/path'; + +$parser = (new ParserFactory)->create(ParserFactory::PREFER_PHP7); +$traverser = new NodeTraverser; +$prettyPrinter = new PrettyPrinter\Standard; + +$traverser->addVisitor(new NameResolver); // we will need resolved names +$traverser->addVisitor(new NamespaceConverter); // our own node visitor + +// iterate over all .php files in the directory +$files = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($inDir)); +$files = new \RegexIterator($files, '/\.php$/'); + +foreach ($files as $file) { + try { + // read the file that should be converted + $code = file_get_contents($file); + + // parse + $stmts = $parser->parse($code); + + // traverse + $stmts = $traverser->traverse($stmts); + + // pretty print + $code = $prettyPrinter->prettyPrintFile($stmts); + + // write the converted file to the target directory + file_put_contents( + substr_replace($file->getPathname(), $outDir, 0, strlen($inDir)), + $code + ); + } catch (PhpParser\Error $e) { + echo 'Parse Error: ', $e->getMessage(); + } +} +``` + +Now lets start with the main code, the `NodeVisitor\NamespaceConverter`. One thing it needs to do +is convert `A\\B` style names to `A_B` style ones. + +```php +use PhpParser\Node; + +class NamespaceConverter extends \PhpParser\NodeVisitorAbstract +{ + public function leaveNode(Node $node) { + if ($node instanceof Node\Name) { + return new Node\Name($node->toString('_')); + } + } +} +``` + +The above code profits from the fact that the `NameResolver` already resolved all names as far as +possible, so we don't need to do that. We only need to create a string with the name parts separated +by underscores instead of backslashes. This is what `$node->toString('_')` does. (If you want to +create a name with backslashes either write `$node->toString()` or `(string) $node`.) Then we create +a new name from the string and return it. Returning a new node replaces the old node. + +Another thing we need to do is change the class/function/const declarations. Currently they contain +only the shortname (i.e. the last part of the name), but they need to contain the complete name including +the namespace prefix: + +```php +use PhpParser\Node; +use PhpParser\Node\Stmt; + +class NodeVisitor_NamespaceConverter extends \PhpParser\NodeVisitorAbstract +{ + public function leaveNode(Node $node) { + if ($node instanceof Node\Name) { + return new Node\Name($node->toString('_')); + } elseif ($node instanceof Stmt\Class_ + || $node instanceof Stmt\Interface_ + || $node instanceof Stmt\Function_) { + $node->name = $node->namespacedName->toString('_'); + } elseif ($node instanceof Stmt\Const_) { + foreach ($node->consts as $const) { + $const->name = $const->namespacedName->toString('_'); + } + } + } +} +``` + +There is not much more to it than converting the namespaced name to string with `_` as separator. + +The last thing we need to do is remove the `namespace` and `use` statements: + +```php +use PhpParser\Node; +use PhpParser\Node\Stmt; + +class NodeVisitor_NamespaceConverter extends \PhpParser\NodeVisitorAbstract +{ + public function leaveNode(Node $node) { + if ($node instanceof Node\Name) { + return new Node\Name($node->toString('_')); + } elseif ($node instanceof Stmt\Class_ + || $node instanceof Stmt\Interface_ + || $node instanceof Stmt\Function_) { + $node->name = $node->namespacedName->toString('_'); + } elseif ($node instanceof Stmt\Const_) { + foreach ($node->consts as $const) { + $const->name = $const->namespacedName->toString('_'); + } + } elseif ($node instanceof Stmt\Namespace_) { + // returning an array merges is into the parent array + return $node->stmts; + } elseif ($node instanceof Stmt\Use_) { + // returning false removed the node altogether + return false; + } + } +} +``` + +That's all. diff --git a/vendor/nikic/php-parser/doc/3_Other_node_tree_representations.markdown b/vendor/nikic/php-parser/doc/3_Other_node_tree_representations.markdown new file mode 100644 index 0000000..0830f39 --- /dev/null +++ b/vendor/nikic/php-parser/doc/3_Other_node_tree_representations.markdown @@ -0,0 +1,330 @@ +Other node tree representations +=============================== + +It is possible to convert the AST into several textual representations, which serve different uses. + +Simple serialization +-------------------- + +It is possible to serialize the node tree using `serialize()` and also unserialize it using +`unserialize()`. The output is not human readable and not easily processable from anything +but PHP, but it is compact and generates quickly. The main application thus is in caching. + +Human readable dumping +---------------------- + +Furthermore it is possible to dump nodes into a human readable format using the `dump` method of +`PhpParser\NodeDumper`. This can be used for debugging. + +```php +$code = <<<'CODE' +create(PhpParser\ParserFactory::PREFER_PHP7); +$nodeDumper = new PhpParser\NodeDumper; + +try { + $stmts = $parser->parse($code); + + echo $nodeDumper->dump($stmts), "\n"; +} catch (PhpParser\Error $e) { + echo 'Parse Error: ', $e->getMessage(); +} +``` + +The above script will have an output looking roughly like this: + +``` +array( + 0: Stmt_Function( + byRef: false + params: array( + 0: Param( + name: msg + default: null + type: null + byRef: false + ) + ) + stmts: array( + 0: Stmt_Echo( + exprs: array( + 0: Expr_Variable( + name: msg + ) + 1: Scalar_String( + value: + + ) + ) + ) + ) + name: printLine + ) + 1: Expr_FuncCall( + name: Name( + parts: array( + 0: printLine + ) + ) + args: array( + 0: Arg( + value: Scalar_String( + value: Hello World!!! + ) + byRef: false + ) + ) + ) +) +``` + +JSON encoding +------------- + +Nodes (and comments) implement the `JsonSerializable` interface. As such, it is possible to JSON +encode the AST directly using `json_encode()`: + +```php +$code = <<<'CODE' +create(PhpParser\ParserFactory::PREFER_PHP7); +$nodeDumper = new PhpParser\NodeDumper; + +try { + $stmts = $parser->parse($code); + + echo json_encode($stmts, JSON_PRETTY_PRINT), "\n"; +} catch (PhpParser\Error $e) { + echo 'Parse Error: ', $e->getMessage(); +} +``` + +This will result in the following output (which includes attributes): + +```json +[ + { + "nodeType": "Stmt_Function", + "byRef": false, + "name": "printLine", + "params": [ + { + "nodeType": "Param", + "type": null, + "byRef": false, + "variadic": false, + "name": "msg", + "default": null, + "attributes": { + "startLine": 3, + "endLine": 3 + } + } + ], + "returnType": null, + "stmts": [ + { + "nodeType": "Stmt_Echo", + "exprs": [ + { + "nodeType": "Expr_Variable", + "name": "msg", + "attributes": { + "startLine": 4, + "endLine": 4 + } + }, + { + "nodeType": "Scalar_String", + "value": "\n", + "attributes": { + "startLine": 4, + "endLine": 4, + "kind": 2 + } + } + ], + "attributes": { + "startLine": 4, + "endLine": 4 + } + } + ], + "attributes": { + "startLine": 3, + "endLine": 5 + } + }, + { + "nodeType": "Expr_FuncCall", + "name": { + "nodeType": "Name", + "parts": [ + "printLine" + ], + "attributes": { + "startLine": 7, + "endLine": 7 + } + }, + "args": [ + { + "nodeType": "Arg", + "value": { + "nodeType": "Scalar_String", + "value": "Hello World!!!", + "attributes": { + "startLine": 7, + "endLine": 7, + "kind": 1 + } + }, + "byRef": false, + "unpack": false, + "attributes": { + "startLine": 7, + "endLine": 7 + } + } + ], + "attributes": { + "startLine": 7, + "endLine": 7 + } + } +] +``` + +There is currently no mechanism to convert JSON back into a node tree. Furthermore, not all ASTs +can be JSON encoded. In particular, JSON only supports UTF-8 strings. + +Serialization to XML +-------------------- + +It is also possible to serialize the node tree to XML using `PhpParser\Serializer\XML->serialize()` +and to unserialize it using `PhpParser\Unserializer\XML->unserialize()`. This is useful for +interfacing with other languages and applications or for doing transformation using XSLT. + +```php +create(PhpParser\ParserFactory::PREFER_PHP7); +$serializer = new PhpParser\Serializer\XML; + +try { + $stmts = $parser->parse($code); + + echo $serializer->serialize($stmts); +} catch (PhpParser\Error $e) { + echo 'Parse Error: ', $e->getMessage(); +} +``` + +Produces: + +```xml + + + + + + + + + + + + msg + + + + + + + + + + + + + + + + + + + + + msg + + + + + + + + + + + + + + + printLine + + + + + + + + printLine + + + + + + + + + + + Hello World!!! + + + + + + + + + + + + +``` \ No newline at end of file diff --git a/vendor/nikic/php-parser/doc/4_Code_generation.markdown b/vendor/nikic/php-parser/doc/4_Code_generation.markdown new file mode 100644 index 0000000..2c0aa0e --- /dev/null +++ b/vendor/nikic/php-parser/doc/4_Code_generation.markdown @@ -0,0 +1,84 @@ +Code generation +=============== + +It is also possible to generate code using the parser, by first creating an Abstract Syntax Tree and then using the +pretty printer to convert it to PHP code. To simplify code generation, the project comes with builders which allow +creating node trees using a fluid interface, instead of instantiating all nodes manually. Builders are available for +the following syntactic elements: + + * namespaces and use statements + * classes, interfaces and traits + * methods, functions and parameters + * properties + +Here is an example: + +```php +use PhpParser\BuilderFactory; +use PhpParser\PrettyPrinter; +use PhpParser\Node; + +$factory = new BuilderFactory; +$node = $factory->namespace('Name\Space') + ->addStmt($factory->use('Some\Other\Thingy')->as('SomeOtherClass')) + ->addStmt($factory->class('SomeClass') + ->extend('SomeOtherClass') + ->implement('A\Few', '\Interfaces') + ->makeAbstract() // ->makeFinal() + + ->addStmt($factory->method('someMethod') + ->makePublic() + ->makeAbstract() // ->makeFinal() + ->setReturnType('bool') + ->addParam($factory->param('someParam')->setTypeHint('SomeClass')) + ->setDocComment('/** + * This method does something. + * + * @param SomeClass And takes a parameter + */') + ) + + ->addStmt($factory->method('anotherMethod') + ->makeProtected() // ->makePublic() [default], ->makePrivate() + ->addParam($factory->param('someParam')->setDefault('test')) + // it is possible to add manually created nodes + ->addStmt(new Node\Expr\Print_(new Node\Expr\Variable('someParam'))) + ) + + // properties will be correctly reordered above the methods + ->addStmt($factory->property('someProperty')->makeProtected()) + ->addStmt($factory->property('anotherProperty')->makePrivate()->setDefault(array(1, 2, 3))) + ) + + ->getNode() +; + +$stmts = array($node); +$prettyPrinter = new PrettyPrinter\Standard(); +echo $prettyPrinter->prettyPrintFile($stmts); +``` + +This will produce the following output with the standard pretty printer: + +```php + array('comments', 'startLine', 'endLine', 'startFilePos', 'endFilePos'), +)); +$parser = (new PhpParser\ParserFactory)->create(PhpParser\ParserFactory::PREFER_PHP7, $lexer); + +try { + $stmts = $parser->parse($code); + // ... +} catch (PhpParser\Error $e) { + // ... +} +``` + +Before using column information its availability needs to be checked with `$e->hasColumnInfo()`, as the precise +location of an error cannot always be determined. The methods for retrieving column information also have to be passed +the source code of the parsed file. An example for printing an error: + +```php +if ($e->hasColumnInfo()) { + echo $e->getRawMessage() . ' from ' . $e->getStartLine() . ':' . $e->getStartColumn($code) + . ' to ' . $e->getEndLine() . ':' . $e->getEndColumn($code); + // or: + echo $e->getMessageWithColumnInfo(); +} else { + echo $e->getMessage(); +} +``` + +Both line numbers and column numbers are 1-based. EOF errors will be located at the position one past the end of the +file. + +Error recovery +-------------- + +The error behavior of the parser (and other components) is controlled by an `ErrorHandler`. Whenever an error is +encountered, `ErrorHandler::handleError()` is invoked. The default error handling strategy is `ErrorHandler\Throwing`, +which will immediately throw when an error is encountered. + +To instead collect all encountered errors into an array, while trying to continue parsing the rest of the source code, +an instance of `ErrorHandler\Collecting` can be passed to the `Parser::parse()` method. A usage example: + +```php +$parser = (new PhpParser\ParserFactory)->create(PhpParser\ParserFactory::ONLY_PHP7); +$errorHandler = new PhpParser\ErrorHandler\Collecting; + +$stmts = $parser->parse($code, $errorHandler); + +if ($errorHandler->hasErrors()) { + foreach ($errorHandler->getErrors() as $error) { + // $error is an ordinary PhpParser\Error + } +} + +if (null !== $stmts) { + // $stmts is a best-effort partial AST +} +``` + +The `NameResolver` visitor also accepts an `ErrorHandler` as a constructor argument. \ No newline at end of file diff --git a/vendor/nikic/php-parser/doc/component/Lexer.markdown b/vendor/nikic/php-parser/doc/component/Lexer.markdown new file mode 100644 index 0000000..b22942d --- /dev/null +++ b/vendor/nikic/php-parser/doc/component/Lexer.markdown @@ -0,0 +1,152 @@ +Lexer component documentation +============================= + +The lexer is responsible for providing tokens to the parser. The project comes with two lexers: `PhpParser\Lexer` and +`PhpParser\Lexer\Emulative`. The latter is an extension of the former, which adds the ability to emulate tokens of +newer PHP versions and thus allows parsing of new code on older versions. + +This documentation discusses options available for the default lexers and explains how lexers can be extended. + +Lexer options +------------- + +The two default lexers accept an `$options` array in the constructor. Currently only the `'usedAttributes'` option is +supported, which allows you to specify which attributes will be added to the AST nodes. The attributes can then be +accessed using `$node->getAttribute()`, `$node->setAttribute()`, `$node->hasAttribute()` and `$node->getAttributes()` +methods. A sample options array: + +```php +$lexer = new PhpParser\Lexer(array( + 'usedAttributes' => array( + 'comments', 'startLine', 'endLine' + ) +)); +``` + +The attributes used in this example match the default behavior of the lexer. The following attributes are supported: + + * `comments`: Array of `PhpParser\Comment` or `PhpParser\Comment\Doc` instances, representing all comments that occurred + between the previous non-discarded token and the current one. Use of this attribute is required for the + `$node->getDocComment()` method to work. The attribute is also needed if you wish the pretty printer to retain + comments present in the original code. + * `startLine`: Line in which the node starts. This attribute is required for the `$node->getLine()` to work. It is also + required if syntax errors should contain line number information. + * `endLine`: Line in which the node ends. + * `startTokenPos`: Offset into the token array of the first token in the node. + * `endTokenPos`: Offset into the token array of the last token in the node. + * `startFilePos`: Offset into the code string of the first character that is part of the node. + * `endFilePos`: Offset into the code string of the last character that is part of the node. + +### Using token positions + +The token offset information is useful if you wish to examine the exact formatting used for a node. For example the AST +does not distinguish whether a property was declared using `public` or using `var`, but you can retrieve this +information based on the token position: + +```php +function isDeclaredUsingVar(array $tokens, PhpParser\Node\Stmt\Property $prop) { + $i = $prop->getAttribute('startTokenPos'); + return $tokens[$i][0] === T_VAR; +} +``` + +In order to make use of this function, you will have to provide the tokens from the lexer to your node visitor using +code similar to the following: + +```php +class MyNodeVisitor extends PhpParser\NodeVisitorAbstract { + private $tokens; + public function setTokens(array $tokens) { + $this->tokens = $tokens; + } + + public function leaveNode(PhpParser\Node $node) { + if ($node instanceof PhpParser\Node\Stmt\Property) { + var_dump(isDeclaredUsingVar($this->tokens, $node)); + } + } +} + +$lexer = new PhpParser\Lexer(array( + 'usedAttributes' => array( + 'comments', 'startLine', 'endLine', 'startTokenPos', 'endTokenPos' + ) +)); +$parser = (new PhpParser\ParserFactory)->create(PhpParser\ParserFactory::PREFER_PHP7, $lexer); + +$visitor = new MyNodeVisitor(); +$traverser = new PhpParser\NodeTraverser(); +$traverser->addVisitor($visitor); + +try { + $stmts = $parser->parse($code); + $visitor->setTokens($lexer->getTokens()); + $stmts = $traverser->traverse($stmts); +} catch (PhpParser\Error $e) { + echo 'Parse Error: ', $e->getMessage(); +} +``` + +The same approach can also be used to perform specific modifications in the code, without changing the formatting in +other places (which is the case when using the pretty printer). + +Lexer extension +--------------- + +A lexer has to define the following public interface: + + void startLexing(string $code, ErrorHandler $errorHandler = null); + array getTokens(); + string handleHaltCompiler(); + int getNextToken(string &$value = null, array &$startAttributes = null, array &$endAttributes = null); + +The `startLexing()` method is invoked with the source code that is to be lexed (including the opening tag) whenever the +`parse()` method of the parser is called. It can be used to reset state or preprocess the source code or tokens. The +passes `ErrorHandler` should be used to report lexing errors. + +The `getTokens()` method returns the current token array, in the usual `token_get_all()` format. This method is not +used by the parser (which uses `getNextToken()`), but is useful in combination with the token position attributes. + +The `handleHaltCompiler()` method is called whenever a `T_HALT_COMPILER` token is encountered. It has to return the +remaining string after the construct (not including `();`). + +The `getNextToken()` method returns the ID of the next token (as defined by the `Parser::T_*` constants). If no more +tokens are available it must return `0`, which is the ID of the `EOF` token. Furthermore the string content of the +token should be written into the by-reference `$value` parameter (which will then be available as `$n` in the parser). + +### Attribute handling + +The other two by-ref variables `$startAttributes` and `$endAttributes` define which attributes will eventually be +assigned to the generated nodes: The parser will take the `$startAttributes` from the first token which is part of the +node and the `$endAttributes` from the last token that is part of the node. + +E.g. if the tokens `T_FUNCTION T_STRING ... '{' ... '}'` constitute a node, then the `$startAttributes` from the +`T_FUNCTION` token will be taken and the `$endAttributes` from the `'}'` token. + +An application of custom attributes is storing the exact original formatting of literals: While the parser does retain +some information about the formatting of integers (like decimal vs. hexadecimal) or strings (like used quote type), it +does not preserve the exact original formatting (e.g. leading zeros for integers or escape sequences in strings). This +can be remedied by storing the original value in an attribute: + +```php +use PhpParser\Lexer; +use PhpParser\Parser\Tokens; + +class KeepOriginalValueLexer extends Lexer // or Lexer\Emulative +{ + public function getNextToken(&$value = null, &$startAttributes = null, &$endAttributes = null) { + $tokenId = parent::getNextToken($value, $startAttributes, $endAttributes); + + if ($tokenId == Tokens::T_CONSTANT_ENCAPSED_STRING // non-interpolated string + || $tokenId == Tokens::T_ENCAPSED_AND_WHITESPACE // interpolated string + || $tokenId == Tokens::T_LNUMBER // integer + || $tokenId == Tokens::T_DNUMBER // floating point number + ) { + // could also use $startAttributes, doesn't really matter here + $endAttributes['originalValue'] = $value; + } + + return $tokenId; + } +} +``` diff --git a/vendor/nikic/php-parser/grammar/README.md b/vendor/nikic/php-parser/grammar/README.md new file mode 100644 index 0000000..3f1698a --- /dev/null +++ b/vendor/nikic/php-parser/grammar/README.md @@ -0,0 +1,28 @@ +What do all those files mean? +============================= + + * `php5.y`: PHP 5 grammar written in a pseudo language + * `php7.y`: PHP 7 grammar written in a pseudo language + * `tokens.y`: Tokens definition shared between PHP 5 and PHP 7 grammars + * `parser.template`: A `kmyacc` parser prototype file for PHP + * `tokens.template`: A `kmyacc` prototype file for the `Tokens` class + * `rebuildParsers.php`: Preprocesses the grammar and builds the parser using `kmyacc` + +.phpy pseudo language +===================== + +The `.y` file is a normal grammer in `kmyacc` (`yacc`) style, with some transformations +applied to it: + + * Nodes are created using the syntax `Name[..., ...]`. This is transformed into + `new Name(..., ..., attributes())` + * Some function-like constructs are resolved (see `rebuildParsers.php` for a list) + +Building the parser +=================== + +In order to rebuild the parser, you need [moriyoshi's fork of kmyacc](https://github.com/moriyoshi/kmyacc-forked). +After you compiled/installed it, run the `rebuildParsers.php` script. + +By default only the `Parser.php` is built. If you want to additionally emit debug symbols and create `y.output`, run the +script with `--debug`. If you want to retain the preprocessed grammar pass `--keep-tmp-grammar`. diff --git a/vendor/nikic/php-parser/grammar/parser.template b/vendor/nikic/php-parser/grammar/parser.template new file mode 100644 index 0000000..fff893f --- /dev/null +++ b/vendor/nikic/php-parser/grammar/parser.template @@ -0,0 +1,103 @@ +semValue +#semval($,%t) $this->semValue +#semval(%n) $this->stackPos-(%l-%n) +#semval(%n,%t) $this->stackPos-(%l-%n) + +namespace PhpParser\Parser; + +use PhpParser\Error; +use PhpParser\Node; +use PhpParser\Node\Expr; +use PhpParser\Node\Name; +use PhpParser\Node\Scalar; +use PhpParser\Node\Stmt; +#include; + +/* This is an automatically GENERATED file, which should not be manually edited. + * Instead edit one of the following: + * * the grammar files grammar/php5.y or grammar/php7.y + * * the skeleton file grammar/parser.template + * * the preprocessing script grammar/rebuildParsers.php + */ +class #(-p) extends \PhpParser\ParserAbstract +{ + protected $tokenToSymbolMapSize = #(YYMAXLEX); + protected $actionTableSize = #(YYLAST); + protected $gotoTableSize = #(YYGLAST); + + protected $invalidSymbol = #(YYBADCH); + protected $errorSymbol = #(YYINTERRTOK); + protected $defaultAction = #(YYDEFAULT); + protected $unexpectedTokenRule = #(YYUNEXPECTED); + + protected $YY2TBLSTATE = #(YY2TBLSTATE); + protected $YYNLSTATES = #(YYNLSTATES); + + protected $symbolToName = array( + #listvar terminals + ); + + protected $tokenToSymbol = array( + #listvar yytranslate + ); + + protected $action = array( + #listvar yyaction + ); + + protected $actionCheck = array( + #listvar yycheck + ); + + protected $actionBase = array( + #listvar yybase + ); + + protected $actionDefault = array( + #listvar yydefault + ); + + protected $goto = array( + #listvar yygoto + ); + + protected $gotoCheck = array( + #listvar yygcheck + ); + + protected $gotoBase = array( + #listvar yygbase + ); + + protected $gotoDefault = array( + #listvar yygdefault + ); + + protected $ruleToNonTerminal = array( + #listvar yylhs + ); + + protected $ruleToLength = array( + #listvar yylen + ); +#if -t + + protected $productions = array( + #production-strings; + ); +#endif +#reduce + + protected function reduceRule%n() { + %b + } +#noact + + protected function reduceRule%n() { + $this->semValue = $this->semStack[$this->stackPos]; + } +#endreduce +} +#tailcode; diff --git a/vendor/nikic/php-parser/grammar/php5.y b/vendor/nikic/php-parser/grammar/php5.y new file mode 100644 index 0000000..8c51e6c --- /dev/null +++ b/vendor/nikic/php-parser/grammar/php5.y @@ -0,0 +1,995 @@ +%pure_parser +%expect 6 + +%tokens + +%% + +start: + top_statement_list { $$ = $this->handleNamespaces($1); } +; + +top_statement_list_ex: + top_statement_list_ex top_statement { pushNormalizing($1, $2); } + | /* empty */ { init(); } +; + +top_statement_list: + top_statement_list_ex + { makeNop($nop, $this->lookaheadStartAttributes); + if ($nop !== null) { $1[] = $nop; } $$ = $1; } +; + +reserved_non_modifiers: + T_INCLUDE | T_INCLUDE_ONCE | T_EVAL | T_REQUIRE | T_REQUIRE_ONCE | T_LOGICAL_OR | T_LOGICAL_XOR | T_LOGICAL_AND + | T_INSTANCEOF | T_NEW | T_CLONE | T_EXIT | T_IF | T_ELSEIF | T_ELSE | T_ENDIF | T_ECHO | T_DO | T_WHILE + | T_ENDWHILE | T_FOR | T_ENDFOR | T_FOREACH | T_ENDFOREACH | T_DECLARE | T_ENDDECLARE | T_AS | T_TRY | T_CATCH + | T_FINALLY | T_THROW | T_USE | T_INSTEADOF | T_GLOBAL | T_VAR | T_UNSET | T_ISSET | T_EMPTY | T_CONTINUE | T_GOTO + | T_FUNCTION | T_CONST | T_RETURN | T_PRINT | T_YIELD | T_LIST | T_SWITCH | T_ENDSWITCH | T_CASE | T_DEFAULT + | T_BREAK | T_ARRAY | T_CALLABLE | T_EXTENDS | T_IMPLEMENTS | T_NAMESPACE | T_TRAIT | T_INTERFACE | T_CLASS + | T_CLASS_C | T_TRAIT_C | T_FUNC_C | T_METHOD_C | T_LINE | T_FILE | T_DIR | T_NS_C | T_HALT_COMPILER +; + +semi_reserved: + reserved_non_modifiers + | T_STATIC | T_ABSTRACT | T_FINAL | T_PRIVATE | T_PROTECTED | T_PUBLIC +; + +identifier: + T_STRING { $$ = $1; } + | semi_reserved { $$ = $1; } +; + +namespace_name_parts: + T_STRING { init($1); } + | namespace_name_parts T_NS_SEPARATOR T_STRING { push($1, $3); } +; + +namespace_name: + namespace_name_parts { $$ = Name[$1]; } +; + +top_statement: + statement { $$ = $1; } + | function_declaration_statement { $$ = $1; } + | class_declaration_statement { $$ = $1; } + | T_HALT_COMPILER + { $$ = Stmt\HaltCompiler[$this->lexer->handleHaltCompiler()]; } + | T_NAMESPACE namespace_name ';' + { $$ = Stmt\Namespace_[$2, null]; $this->checkNamespace($$); } + | T_NAMESPACE namespace_name '{' top_statement_list '}' + { $$ = Stmt\Namespace_[$2, $4]; $this->checkNamespace($$); } + | T_NAMESPACE '{' top_statement_list '}' + { $$ = Stmt\Namespace_[null, $3]; $this->checkNamespace($$); } + | T_USE use_declarations ';' { $$ = Stmt\Use_[$2, Stmt\Use_::TYPE_NORMAL]; } + | T_USE use_type use_declarations ';' { $$ = Stmt\Use_[$3, $2]; } + | group_use_declaration ';' { $$ = $1; } + | T_CONST constant_declaration_list ';' { $$ = Stmt\Const_[$2]; } +; + +use_type: + T_FUNCTION { $$ = Stmt\Use_::TYPE_FUNCTION; } + | T_CONST { $$ = Stmt\Use_::TYPE_CONSTANT; } +; + +/* Using namespace_name_parts here to avoid s/r conflict on T_NS_SEPARATOR */ +group_use_declaration: + T_USE use_type namespace_name_parts T_NS_SEPARATOR '{' unprefixed_use_declarations '}' + { $$ = Stmt\GroupUse[new Name($3, stackAttributes(#3)), $6, $2]; } + | T_USE use_type T_NS_SEPARATOR namespace_name_parts T_NS_SEPARATOR '{' unprefixed_use_declarations '}' + { $$ = Stmt\GroupUse[new Name($4, stackAttributes(#4)), $7, $2]; } + | T_USE namespace_name_parts T_NS_SEPARATOR '{' inline_use_declarations '}' + { $$ = Stmt\GroupUse[new Name($2, stackAttributes(#2)), $5, Stmt\Use_::TYPE_UNKNOWN]; } + | T_USE T_NS_SEPARATOR namespace_name_parts T_NS_SEPARATOR '{' inline_use_declarations '}' + { $$ = Stmt\GroupUse[new Name($3, stackAttributes(#3)), $6, Stmt\Use_::TYPE_UNKNOWN]; } +; + +unprefixed_use_declarations: + unprefixed_use_declarations ',' unprefixed_use_declaration + { push($1, $3); } + | unprefixed_use_declaration { init($1); } +; + +use_declarations: + use_declarations ',' use_declaration { push($1, $3); } + | use_declaration { init($1); } +; + +inline_use_declarations: + inline_use_declarations ',' inline_use_declaration { push($1, $3); } + | inline_use_declaration { init($1); } +; + +unprefixed_use_declaration: + namespace_name + { $$ = Stmt\UseUse[$1, null, Stmt\Use_::TYPE_UNKNOWN]; $this->checkUseUse($$, #1); } + | namespace_name T_AS T_STRING + { $$ = Stmt\UseUse[$1, $3, Stmt\Use_::TYPE_UNKNOWN]; $this->checkUseUse($$, #3); } +; + +use_declaration: + unprefixed_use_declaration { $$ = $1; } + | T_NS_SEPARATOR unprefixed_use_declaration { $$ = $2; } +; + +inline_use_declaration: + unprefixed_use_declaration { $$ = $1; $$->type = Stmt\Use_::TYPE_NORMAL; } + | use_type unprefixed_use_declaration { $$ = $2; $$->type = $1; } +; + +constant_declaration_list: + constant_declaration_list ',' constant_declaration { push($1, $3); } + | constant_declaration { init($1); } +; + +constant_declaration: + T_STRING '=' static_scalar { $$ = Node\Const_[$1, $3]; } +; + +class_const_list: + class_const_list ',' class_const { push($1, $3); } + | class_const { init($1); } +; + +class_const: + identifier '=' static_scalar { $$ = Node\Const_[$1, $3]; } +; + +inner_statement_list_ex: + inner_statement_list_ex inner_statement { pushNormalizing($1, $2); } + | /* empty */ { init(); } +; + +inner_statement_list: + inner_statement_list_ex + { makeNop($nop, $this->lookaheadStartAttributes); + if ($nop !== null) { $1[] = $nop; } $$ = $1; } +; + +inner_statement: + statement { $$ = $1; } + | function_declaration_statement { $$ = $1; } + | class_declaration_statement { $$ = $1; } + | T_HALT_COMPILER + { throw new Error('__HALT_COMPILER() can only be used from the outermost scope', attributes()); } +; + +non_empty_statement: + '{' inner_statement_list '}' { $$ = $2; prependLeadingComments($$); } + | T_IF parentheses_expr statement elseif_list else_single + { $$ = Stmt\If_[$2, ['stmts' => toArray($3), 'elseifs' => $4, 'else' => $5]]; } + | T_IF parentheses_expr ':' inner_statement_list new_elseif_list new_else_single T_ENDIF ';' + { $$ = Stmt\If_[$2, ['stmts' => $4, 'elseifs' => $5, 'else' => $6]]; } + | T_WHILE parentheses_expr while_statement { $$ = Stmt\While_[$2, $3]; } + | T_DO statement T_WHILE parentheses_expr ';' { $$ = Stmt\Do_ [$4, toArray($2)]; } + | T_FOR '(' for_expr ';' for_expr ';' for_expr ')' for_statement + { $$ = Stmt\For_[['init' => $3, 'cond' => $5, 'loop' => $7, 'stmts' => $9]]; } + | T_SWITCH parentheses_expr switch_case_list { $$ = Stmt\Switch_[$2, $3]; } + | T_BREAK ';' { $$ = Stmt\Break_[null]; } + | T_BREAK expr ';' { $$ = Stmt\Break_[$2]; } + | T_CONTINUE ';' { $$ = Stmt\Continue_[null]; } + | T_CONTINUE expr ';' { $$ = Stmt\Continue_[$2]; } + | T_RETURN ';' { $$ = Stmt\Return_[null]; } + | T_RETURN expr ';' { $$ = Stmt\Return_[$2]; } + | yield_expr ';' { $$ = $1; } + | T_GLOBAL global_var_list ';' { $$ = Stmt\Global_[$2]; } + | T_STATIC static_var_list ';' { $$ = Stmt\Static_[$2]; } + | T_ECHO expr_list ';' { $$ = Stmt\Echo_[$2]; } + | T_INLINE_HTML { $$ = Stmt\InlineHTML[$1]; } + | expr ';' { $$ = $1; } + | T_UNSET '(' variables_list ')' ';' { $$ = Stmt\Unset_[$3]; } + | T_FOREACH '(' expr T_AS foreach_variable ')' foreach_statement + { $$ = Stmt\Foreach_[$3, $5[0], ['keyVar' => null, 'byRef' => $5[1], 'stmts' => $7]]; } + | T_FOREACH '(' expr T_AS variable T_DOUBLE_ARROW foreach_variable ')' foreach_statement + { $$ = Stmt\Foreach_[$3, $7[0], ['keyVar' => $5, 'byRef' => $7[1], 'stmts' => $9]]; } + | T_DECLARE '(' declare_list ')' declare_statement { $$ = Stmt\Declare_[$3, $5]; } + | T_TRY '{' inner_statement_list '}' catches optional_finally + { $$ = Stmt\TryCatch[$3, $5, $6]; $this->checkTryCatch($$); } + | T_THROW expr ';' { $$ = Stmt\Throw_[$2]; } + | T_GOTO T_STRING ';' { $$ = Stmt\Goto_[$2]; } + | T_STRING ':' { $$ = Stmt\Label[$1]; } + | expr error { $$ = $1; } + | error { $$ = array(); /* means: no statement */ } +; + +statement: + non_empty_statement { $$ = $1; } + | ';' + { makeNop($$, $this->startAttributeStack[#1]); + if ($$ === null) $$ = array(); /* means: no statement */ } +; + +catches: + /* empty */ { init(); } + | catches catch { push($1, $2); } +; + +catch: + T_CATCH '(' name T_VARIABLE ')' '{' inner_statement_list '}' + { $$ = Stmt\Catch_[array($3), parseVar($4), $7]; } +; + +optional_finally: + /* empty */ { $$ = null; } + | T_FINALLY '{' inner_statement_list '}' { $$ = Stmt\Finally_[$3]; } +; + +variables_list: + variable { init($1); } + | variables_list ',' variable { push($1, $3); } +; + +optional_ref: + /* empty */ { $$ = false; } + | '&' { $$ = true; } +; + +optional_ellipsis: + /* empty */ { $$ = false; } + | T_ELLIPSIS { $$ = true; } +; + +function_declaration_statement: + T_FUNCTION optional_ref T_STRING '(' parameter_list ')' optional_return_type '{' inner_statement_list '}' + { $$ = Stmt\Function_[$3, ['byRef' => $2, 'params' => $5, 'returnType' => $7, 'stmts' => $9]]; } +; + +class_declaration_statement: + class_entry_type T_STRING extends_from implements_list '{' class_statement_list '}' + { $$ = Stmt\Class_[$2, ['type' => $1, 'extends' => $3, 'implements' => $4, 'stmts' => $6]]; + $this->checkClass($$, #2); } + | T_INTERFACE T_STRING interface_extends_list '{' class_statement_list '}' + { $$ = Stmt\Interface_[$2, ['extends' => $3, 'stmts' => $5]]; + $this->checkInterface($$, #2); } + | T_TRAIT T_STRING '{' class_statement_list '}' + { $$ = Stmt\Trait_[$2, ['stmts' => $4]]; } +; + +class_entry_type: + T_CLASS { $$ = 0; } + | T_ABSTRACT T_CLASS { $$ = Stmt\Class_::MODIFIER_ABSTRACT; } + | T_FINAL T_CLASS { $$ = Stmt\Class_::MODIFIER_FINAL; } +; + +extends_from: + /* empty */ { $$ = null; } + | T_EXTENDS class_name { $$ = $2; } +; + +interface_extends_list: + /* empty */ { $$ = array(); } + | T_EXTENDS class_name_list { $$ = $2; } +; + +implements_list: + /* empty */ { $$ = array(); } + | T_IMPLEMENTS class_name_list { $$ = $2; } +; + +class_name_list: + class_name { init($1); } + | class_name_list ',' class_name { push($1, $3); } +; + +for_statement: + statement { $$ = toArray($1); } + | ':' inner_statement_list T_ENDFOR ';' { $$ = $2; } +; + +foreach_statement: + statement { $$ = toArray($1); } + | ':' inner_statement_list T_ENDFOREACH ';' { $$ = $2; } +; + +declare_statement: + non_empty_statement { $$ = toArray($1); } + | ';' { $$ = null; } + | ':' inner_statement_list T_ENDDECLARE ';' { $$ = $2; } +; + +declare_list: + declare_list_element { init($1); } + | declare_list ',' declare_list_element { push($1, $3); } +; + +declare_list_element: + T_STRING '=' static_scalar { $$ = Stmt\DeclareDeclare[$1, $3]; } +; + +switch_case_list: + '{' case_list '}' { $$ = $2; } + | '{' ';' case_list '}' { $$ = $3; } + | ':' case_list T_ENDSWITCH ';' { $$ = $2; } + | ':' ';' case_list T_ENDSWITCH ';' { $$ = $3; } +; + +case_list: + /* empty */ { init(); } + | case_list case { push($1, $2); } +; + +case: + T_CASE expr case_separator inner_statement_list { $$ = Stmt\Case_[$2, $4]; } + | T_DEFAULT case_separator inner_statement_list { $$ = Stmt\Case_[null, $3]; } +; + +case_separator: + ':' + | ';' +; + +while_statement: + statement { $$ = toArray($1); } + | ':' inner_statement_list T_ENDWHILE ';' { $$ = $2; } +; + +elseif_list: + /* empty */ { init(); } + | elseif_list elseif { push($1, $2); } +; + +elseif: + T_ELSEIF parentheses_expr statement { $$ = Stmt\ElseIf_[$2, toArray($3)]; } +; + +new_elseif_list: + /* empty */ { init(); } + | new_elseif_list new_elseif { push($1, $2); } +; + +new_elseif: + T_ELSEIF parentheses_expr ':' inner_statement_list { $$ = Stmt\ElseIf_[$2, $4]; } +; + +else_single: + /* empty */ { $$ = null; } + | T_ELSE statement { $$ = Stmt\Else_[toArray($2)]; } +; + +new_else_single: + /* empty */ { $$ = null; } + | T_ELSE ':' inner_statement_list { $$ = Stmt\Else_[$3]; } +; + +foreach_variable: + variable { $$ = array($1, false); } + | '&' variable { $$ = array($2, true); } + | list_expr { $$ = array($1, false); } +; + +parameter_list: + non_empty_parameter_list { $$ = $1; } + | /* empty */ { $$ = array(); } +; + +non_empty_parameter_list: + parameter { init($1); } + | non_empty_parameter_list ',' parameter { push($1, $3); } +; + +parameter: + optional_param_type optional_ref optional_ellipsis T_VARIABLE + { $$ = Node\Param[parseVar($4), null, $1, $2, $3]; $this->checkParam($$); } + | optional_param_type optional_ref optional_ellipsis T_VARIABLE '=' static_scalar + { $$ = Node\Param[parseVar($4), $6, $1, $2, $3]; $this->checkParam($$); } +; + +type: + name { $$ = $1; } + | T_ARRAY { $$ = 'array'; } + | T_CALLABLE { $$ = 'callable'; } +; + +optional_param_type: + /* empty */ { $$ = null; } + | type { $$ = $1; } +; + +optional_return_type: + /* empty */ { $$ = null; } + | ':' type { $$ = $2; } +; + +argument_list: + '(' ')' { $$ = array(); } + | '(' non_empty_argument_list ')' { $$ = $2; } + | '(' yield_expr ')' { $$ = array(Node\Arg[$2, false, false]); } +; + +non_empty_argument_list: + argument { init($1); } + | non_empty_argument_list ',' argument { push($1, $3); } +; + +argument: + expr { $$ = Node\Arg[$1, false, false]; } + | '&' variable { $$ = Node\Arg[$2, true, false]; } + | T_ELLIPSIS expr { $$ = Node\Arg[$2, false, true]; } +; + +global_var_list: + global_var_list ',' global_var { push($1, $3); } + | global_var { init($1); } +; + +global_var: + T_VARIABLE { $$ = Expr\Variable[parseVar($1)]; } + | '$' variable { $$ = Expr\Variable[$2]; } + | '$' '{' expr '}' { $$ = Expr\Variable[$3]; } +; + +static_var_list: + static_var_list ',' static_var { push($1, $3); } + | static_var { init($1); } +; + +static_var: + T_VARIABLE { $$ = Stmt\StaticVar[parseVar($1), null]; } + | T_VARIABLE '=' static_scalar { $$ = Stmt\StaticVar[parseVar($1), $3]; } +; + +class_statement_list: + class_statement_list class_statement { push($1, $2); } + | /* empty */ { init(); } +; + +class_statement: + variable_modifiers property_declaration_list ';' + { $$ = Stmt\Property[$1, $2]; $this->checkProperty($$, #1); } + | T_CONST class_const_list ';' { $$ = Stmt\ClassConst[$2, 0]; } + | method_modifiers T_FUNCTION optional_ref identifier '(' parameter_list ')' optional_return_type method_body + { $$ = Stmt\ClassMethod[$4, ['type' => $1, 'byRef' => $3, 'params' => $6, 'returnType' => $8, 'stmts' => $9]]; + $this->checkClassMethod($$, #1); } + | T_USE class_name_list trait_adaptations { $$ = Stmt\TraitUse[$2, $3]; } +; + +trait_adaptations: + ';' { $$ = array(); } + | '{' trait_adaptation_list '}' { $$ = $2; } +; + +trait_adaptation_list: + /* empty */ { init(); } + | trait_adaptation_list trait_adaptation { push($1, $2); } +; + +trait_adaptation: + trait_method_reference_fully_qualified T_INSTEADOF class_name_list ';' + { $$ = Stmt\TraitUseAdaptation\Precedence[$1[0], $1[1], $3]; } + | trait_method_reference T_AS member_modifier identifier ';' + { $$ = Stmt\TraitUseAdaptation\Alias[$1[0], $1[1], $3, $4]; } + | trait_method_reference T_AS member_modifier ';' + { $$ = Stmt\TraitUseAdaptation\Alias[$1[0], $1[1], $3, null]; } + | trait_method_reference T_AS T_STRING ';' + { $$ = Stmt\TraitUseAdaptation\Alias[$1[0], $1[1], null, $3]; } + | trait_method_reference T_AS reserved_non_modifiers ';' + { $$ = Stmt\TraitUseAdaptation\Alias[$1[0], $1[1], null, $3]; } +; + +trait_method_reference_fully_qualified: + name T_PAAMAYIM_NEKUDOTAYIM identifier { $$ = array($1, $3); } +; +trait_method_reference: + trait_method_reference_fully_qualified { $$ = $1; } + | identifier { $$ = array(null, $1); } +; + +method_body: + ';' /* abstract method */ { $$ = null; } + | '{' inner_statement_list '}' { $$ = $2; } +; + +variable_modifiers: + non_empty_member_modifiers { $$ = $1; } + | T_VAR { $$ = 0; } +; + +method_modifiers: + /* empty */ { $$ = 0; } + | non_empty_member_modifiers { $$ = $1; } +; + +non_empty_member_modifiers: + member_modifier { $$ = $1; } + | non_empty_member_modifiers member_modifier { $this->checkModifier($1, $2, #2); $$ = $1 | $2; } +; + +member_modifier: + T_PUBLIC { $$ = Stmt\Class_::MODIFIER_PUBLIC; } + | T_PROTECTED { $$ = Stmt\Class_::MODIFIER_PROTECTED; } + | T_PRIVATE { $$ = Stmt\Class_::MODIFIER_PRIVATE; } + | T_STATIC { $$ = Stmt\Class_::MODIFIER_STATIC; } + | T_ABSTRACT { $$ = Stmt\Class_::MODIFIER_ABSTRACT; } + | T_FINAL { $$ = Stmt\Class_::MODIFIER_FINAL; } +; + +property_declaration_list: + property_declaration { init($1); } + | property_declaration_list ',' property_declaration { push($1, $3); } +; + +property_declaration: + T_VARIABLE { $$ = Stmt\PropertyProperty[parseVar($1), null]; } + | T_VARIABLE '=' static_scalar { $$ = Stmt\PropertyProperty[parseVar($1), $3]; } +; + +expr_list: + expr_list ',' expr { push($1, $3); } + | expr { init($1); } +; + +for_expr: + /* empty */ { $$ = array(); } + | expr_list { $$ = $1; } +; + +expr: + variable { $$ = $1; } + | list_expr '=' expr { $$ = Expr\Assign[$1, $3]; } + | variable '=' expr { $$ = Expr\Assign[$1, $3]; } + | variable '=' '&' variable { $$ = Expr\AssignRef[$1, $4]; } + | variable '=' '&' new_expr { $$ = Expr\AssignRef[$1, $4]; } + | new_expr { $$ = $1; } + | T_CLONE expr { $$ = Expr\Clone_[$2]; } + | variable T_PLUS_EQUAL expr { $$ = Expr\AssignOp\Plus [$1, $3]; } + | variable T_MINUS_EQUAL expr { $$ = Expr\AssignOp\Minus [$1, $3]; } + | variable T_MUL_EQUAL expr { $$ = Expr\AssignOp\Mul [$1, $3]; } + | variable T_DIV_EQUAL expr { $$ = Expr\AssignOp\Div [$1, $3]; } + | variable T_CONCAT_EQUAL expr { $$ = Expr\AssignOp\Concat [$1, $3]; } + | variable T_MOD_EQUAL expr { $$ = Expr\AssignOp\Mod [$1, $3]; } + | variable T_AND_EQUAL expr { $$ = Expr\AssignOp\BitwiseAnd[$1, $3]; } + | variable T_OR_EQUAL expr { $$ = Expr\AssignOp\BitwiseOr [$1, $3]; } + | variable T_XOR_EQUAL expr { $$ = Expr\AssignOp\BitwiseXor[$1, $3]; } + | variable T_SL_EQUAL expr { $$ = Expr\AssignOp\ShiftLeft [$1, $3]; } + | variable T_SR_EQUAL expr { $$ = Expr\AssignOp\ShiftRight[$1, $3]; } + | variable T_POW_EQUAL expr { $$ = Expr\AssignOp\Pow [$1, $3]; } + | variable T_INC { $$ = Expr\PostInc[$1]; } + | T_INC variable { $$ = Expr\PreInc [$2]; } + | variable T_DEC { $$ = Expr\PostDec[$1]; } + | T_DEC variable { $$ = Expr\PreDec [$2]; } + | expr T_BOOLEAN_OR expr { $$ = Expr\BinaryOp\BooleanOr [$1, $3]; } + | expr T_BOOLEAN_AND expr { $$ = Expr\BinaryOp\BooleanAnd[$1, $3]; } + | expr T_LOGICAL_OR expr { $$ = Expr\BinaryOp\LogicalOr [$1, $3]; } + | expr T_LOGICAL_AND expr { $$ = Expr\BinaryOp\LogicalAnd[$1, $3]; } + | expr T_LOGICAL_XOR expr { $$ = Expr\BinaryOp\LogicalXor[$1, $3]; } + | expr '|' expr { $$ = Expr\BinaryOp\BitwiseOr [$1, $3]; } + | expr '&' expr { $$ = Expr\BinaryOp\BitwiseAnd[$1, $3]; } + | expr '^' expr { $$ = Expr\BinaryOp\BitwiseXor[$1, $3]; } + | expr '.' expr { $$ = Expr\BinaryOp\Concat [$1, $3]; } + | expr '+' expr { $$ = Expr\BinaryOp\Plus [$1, $3]; } + | expr '-' expr { $$ = Expr\BinaryOp\Minus [$1, $3]; } + | expr '*' expr { $$ = Expr\BinaryOp\Mul [$1, $3]; } + | expr '/' expr { $$ = Expr\BinaryOp\Div [$1, $3]; } + | expr '%' expr { $$ = Expr\BinaryOp\Mod [$1, $3]; } + | expr T_SL expr { $$ = Expr\BinaryOp\ShiftLeft [$1, $3]; } + | expr T_SR expr { $$ = Expr\BinaryOp\ShiftRight[$1, $3]; } + | expr T_POW expr { $$ = Expr\BinaryOp\Pow [$1, $3]; } + | '+' expr %prec T_INC { $$ = Expr\UnaryPlus [$2]; } + | '-' expr %prec T_INC { $$ = Expr\UnaryMinus[$2]; } + | '!' expr { $$ = Expr\BooleanNot[$2]; } + | '~' expr { $$ = Expr\BitwiseNot[$2]; } + | expr T_IS_IDENTICAL expr { $$ = Expr\BinaryOp\Identical [$1, $3]; } + | expr T_IS_NOT_IDENTICAL expr { $$ = Expr\BinaryOp\NotIdentical [$1, $3]; } + | expr T_IS_EQUAL expr { $$ = Expr\BinaryOp\Equal [$1, $3]; } + | expr T_IS_NOT_EQUAL expr { $$ = Expr\BinaryOp\NotEqual [$1, $3]; } + | expr T_SPACESHIP expr { $$ = Expr\BinaryOp\Spaceship [$1, $3]; } + | expr '<' expr { $$ = Expr\BinaryOp\Smaller [$1, $3]; } + | expr T_IS_SMALLER_OR_EQUAL expr { $$ = Expr\BinaryOp\SmallerOrEqual[$1, $3]; } + | expr '>' expr { $$ = Expr\BinaryOp\Greater [$1, $3]; } + | expr T_IS_GREATER_OR_EQUAL expr { $$ = Expr\BinaryOp\GreaterOrEqual[$1, $3]; } + | expr T_INSTANCEOF class_name_reference { $$ = Expr\Instanceof_[$1, $3]; } + | parentheses_expr { $$ = $1; } + /* we need a separate '(' new_expr ')' rule to avoid problems caused by a s/r conflict */ + | '(' new_expr ')' { $$ = $2; } + | expr '?' expr ':' expr { $$ = Expr\Ternary[$1, $3, $5]; } + | expr '?' ':' expr { $$ = Expr\Ternary[$1, null, $4]; } + | expr T_COALESCE expr { $$ = Expr\BinaryOp\Coalesce[$1, $3]; } + | T_ISSET '(' variables_list ')' { $$ = Expr\Isset_[$3]; } + | T_EMPTY '(' expr ')' { $$ = Expr\Empty_[$3]; } + | T_INCLUDE expr { $$ = Expr\Include_[$2, Expr\Include_::TYPE_INCLUDE]; } + | T_INCLUDE_ONCE expr { $$ = Expr\Include_[$2, Expr\Include_::TYPE_INCLUDE_ONCE]; } + | T_EVAL parentheses_expr { $$ = Expr\Eval_[$2]; } + | T_REQUIRE expr { $$ = Expr\Include_[$2, Expr\Include_::TYPE_REQUIRE]; } + | T_REQUIRE_ONCE expr { $$ = Expr\Include_[$2, Expr\Include_::TYPE_REQUIRE_ONCE]; } + | T_INT_CAST expr { $$ = Expr\Cast\Int_ [$2]; } + | T_DOUBLE_CAST expr { $$ = Expr\Cast\Double [$2]; } + | T_STRING_CAST expr { $$ = Expr\Cast\String_ [$2]; } + | T_ARRAY_CAST expr { $$ = Expr\Cast\Array_ [$2]; } + | T_OBJECT_CAST expr { $$ = Expr\Cast\Object_ [$2]; } + | T_BOOL_CAST expr { $$ = Expr\Cast\Bool_ [$2]; } + | T_UNSET_CAST expr { $$ = Expr\Cast\Unset_ [$2]; } + | T_EXIT exit_expr + { $attrs = attributes(); + $attrs['kind'] = strtolower($1) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE; + $$ = new Expr\Exit_($2, $attrs); } + | '@' expr { $$ = Expr\ErrorSuppress[$2]; } + | scalar { $$ = $1; } + | array_expr { $$ = $1; } + | scalar_dereference { $$ = $1; } + | '`' backticks_expr '`' { $$ = Expr\ShellExec[$2]; } + | T_PRINT expr { $$ = Expr\Print_[$2]; } + | T_YIELD { $$ = Expr\Yield_[null, null]; } + | T_YIELD_FROM expr { $$ = Expr\YieldFrom[$2]; } + | T_FUNCTION optional_ref '(' parameter_list ')' lexical_vars optional_return_type + '{' inner_statement_list '}' + { $$ = Expr\Closure[['static' => false, 'byRef' => $2, 'params' => $4, 'uses' => $6, 'returnType' => $7, 'stmts' => $9]]; } + | T_STATIC T_FUNCTION optional_ref '(' parameter_list ')' lexical_vars optional_return_type + '{' inner_statement_list '}' + { $$ = Expr\Closure[['static' => true, 'byRef' => $3, 'params' => $5, 'uses' => $7, 'returnType' => $8, 'stmts' => $10]]; } +; + +parentheses_expr: + '(' expr ')' { $$ = $2; } + | '(' yield_expr ')' { $$ = $2; } +; + +yield_expr: + T_YIELD expr { $$ = Expr\Yield_[$2, null]; } + | T_YIELD expr T_DOUBLE_ARROW expr { $$ = Expr\Yield_[$4, $2]; } +; + +array_expr: + T_ARRAY '(' array_pair_list ')' + { $attrs = attributes(); $attrs['kind'] = Expr\Array_::KIND_LONG; + $$ = new Expr\Array_($3, $attrs); } + | '[' array_pair_list ']' + { $attrs = attributes(); $attrs['kind'] = Expr\Array_::KIND_SHORT; + $$ = new Expr\Array_($2, $attrs); } +; + +scalar_dereference: + array_expr '[' dim_offset ']' { $$ = Expr\ArrayDimFetch[$1, $3]; } + | T_CONSTANT_ENCAPSED_STRING '[' dim_offset ']' + { $attrs = attributes(); $attrs['kind'] = strKind($1); + $$ = Expr\ArrayDimFetch[new Scalar\String_(Scalar\String_::parse($1), $attrs), $3]; } + | constant '[' dim_offset ']' { $$ = Expr\ArrayDimFetch[$1, $3]; } + | scalar_dereference '[' dim_offset ']' { $$ = Expr\ArrayDimFetch[$1, $3]; } + /* alternative array syntax missing intentionally */ +; + +anonymous_class: + T_CLASS ctor_arguments extends_from implements_list '{' class_statement_list '}' + { $$ = array(Stmt\Class_[null, ['type' => 0, 'extends' => $3, 'implements' => $4, 'stmts' => $6]], $2); + $this->checkClass($$[0], -1); } + +new_expr: + T_NEW class_name_reference ctor_arguments { $$ = Expr\New_[$2, $3]; } + | T_NEW anonymous_class + { list($class, $ctorArgs) = $2; $$ = Expr\New_[$class, $ctorArgs]; } +; + +lexical_vars: + /* empty */ { $$ = array(); } + | T_USE '(' lexical_var_list ')' { $$ = $3; } +; + +lexical_var_list: + lexical_var { init($1); } + | lexical_var_list ',' lexical_var { push($1, $3); } +; + +lexical_var: + optional_ref T_VARIABLE { $$ = Expr\ClosureUse[parseVar($2), $1]; } +; + +function_call: + name argument_list { $$ = Expr\FuncCall[$1, $2]; } + | class_name_or_var T_PAAMAYIM_NEKUDOTAYIM identifier argument_list + { $$ = Expr\StaticCall[$1, $3, $4]; } + | class_name_or_var T_PAAMAYIM_NEKUDOTAYIM '{' expr '}' argument_list + { $$ = Expr\StaticCall[$1, $4, $6]; } + | static_property argument_list { + if ($1 instanceof Node\Expr\StaticPropertyFetch) { + $$ = Expr\StaticCall[$1->class, Expr\Variable[$1->name], $2]; + } elseif ($1 instanceof Node\Expr\ArrayDimFetch) { + $tmp = $1; + while ($tmp->var instanceof Node\Expr\ArrayDimFetch) { + $tmp = $tmp->var; + } + + $$ = Expr\StaticCall[$tmp->var->class, $1, $2]; + $tmp->var = Expr\Variable[$tmp->var->name]; + } else { + throw new \Exception; + } + } + | variable_without_objects argument_list + { $$ = Expr\FuncCall[$1, $2]; } + | function_call '[' dim_offset ']' { $$ = Expr\ArrayDimFetch[$1, $3]; } + /* alternative array syntax missing intentionally */ +; + +class_name: + T_STATIC { $$ = Name[$1]; } + | name { $$ = $1; } +; + +name: + namespace_name_parts { $$ = Name[$1]; } + | T_NS_SEPARATOR namespace_name_parts { $$ = Name\FullyQualified[$2]; } + | T_NAMESPACE T_NS_SEPARATOR namespace_name_parts { $$ = Name\Relative[$3]; } +; + +class_name_reference: + class_name { $$ = $1; } + | dynamic_class_name_reference { $$ = $1; } +; + +dynamic_class_name_reference: + object_access_for_dcnr { $$ = $1; } + | base_variable { $$ = $1; } +; + +class_name_or_var: + class_name { $$ = $1; } + | reference_variable { $$ = $1; } +; + +object_access_for_dcnr: + base_variable T_OBJECT_OPERATOR object_property + { $$ = Expr\PropertyFetch[$1, $3]; } + | object_access_for_dcnr T_OBJECT_OPERATOR object_property + { $$ = Expr\PropertyFetch[$1, $3]; } + | object_access_for_dcnr '[' dim_offset ']' { $$ = Expr\ArrayDimFetch[$1, $3]; } + | object_access_for_dcnr '{' expr '}' { $$ = Expr\ArrayDimFetch[$1, $3]; } +; + +exit_expr: + /* empty */ { $$ = null; } + | '(' ')' { $$ = null; } + | parentheses_expr { $$ = $1; } +; + +backticks_expr: + /* empty */ { $$ = array(); } + | T_ENCAPSED_AND_WHITESPACE + { $$ = array(Scalar\EncapsedStringPart[Scalar\String_::parseEscapeSequences($1, '`', false)]); } + | encaps_list { parseEncapsed($1, '`', false); $$ = $1; } +; + +ctor_arguments: + /* empty */ { $$ = array(); } + | argument_list { $$ = $1; } +; + +common_scalar: + T_LNUMBER { $$ = $this->parseLNumber($1, attributes(), true); } + | T_DNUMBER { $$ = Scalar\DNumber[Scalar\DNumber::parse($1)]; } + | T_CONSTANT_ENCAPSED_STRING + { $attrs = attributes(); $attrs['kind'] = strKind($1); + $$ = new Scalar\String_(Scalar\String_::parse($1, false), $attrs); } + | T_LINE { $$ = Scalar\MagicConst\Line[]; } + | T_FILE { $$ = Scalar\MagicConst\File[]; } + | T_DIR { $$ = Scalar\MagicConst\Dir[]; } + | T_CLASS_C { $$ = Scalar\MagicConst\Class_[]; } + | T_TRAIT_C { $$ = Scalar\MagicConst\Trait_[]; } + | T_METHOD_C { $$ = Scalar\MagicConst\Method[]; } + | T_FUNC_C { $$ = Scalar\MagicConst\Function_[]; } + | T_NS_C { $$ = Scalar\MagicConst\Namespace_[]; } + | T_START_HEREDOC T_ENCAPSED_AND_WHITESPACE T_END_HEREDOC + { $attrs = attributes(); setDocStringAttrs($attrs, $1); + $$ = new Scalar\String_(Scalar\String_::parseDocString($1, $2, false), $attrs); } + | T_START_HEREDOC T_END_HEREDOC + { $attrs = attributes(); setDocStringAttrs($attrs, $1); + $$ = new Scalar\String_('', $attrs); } +; + +static_scalar: + common_scalar { $$ = $1; } + | class_name T_PAAMAYIM_NEKUDOTAYIM identifier { $$ = Expr\ClassConstFetch[$1, $3]; } + | name { $$ = Expr\ConstFetch[$1]; } + | T_ARRAY '(' static_array_pair_list ')' { $$ = Expr\Array_[$3]; } + | '[' static_array_pair_list ']' { $$ = Expr\Array_[$2]; } + | static_operation { $$ = $1; } +; + +static_operation: + static_scalar T_BOOLEAN_OR static_scalar { $$ = Expr\BinaryOp\BooleanOr [$1, $3]; } + | static_scalar T_BOOLEAN_AND static_scalar { $$ = Expr\BinaryOp\BooleanAnd[$1, $3]; } + | static_scalar T_LOGICAL_OR static_scalar { $$ = Expr\BinaryOp\LogicalOr [$1, $3]; } + | static_scalar T_LOGICAL_AND static_scalar { $$ = Expr\BinaryOp\LogicalAnd[$1, $3]; } + | static_scalar T_LOGICAL_XOR static_scalar { $$ = Expr\BinaryOp\LogicalXor[$1, $3]; } + | static_scalar '|' static_scalar { $$ = Expr\BinaryOp\BitwiseOr [$1, $3]; } + | static_scalar '&' static_scalar { $$ = Expr\BinaryOp\BitwiseAnd[$1, $3]; } + | static_scalar '^' static_scalar { $$ = Expr\BinaryOp\BitwiseXor[$1, $3]; } + | static_scalar '.' static_scalar { $$ = Expr\BinaryOp\Concat [$1, $3]; } + | static_scalar '+' static_scalar { $$ = Expr\BinaryOp\Plus [$1, $3]; } + | static_scalar '-' static_scalar { $$ = Expr\BinaryOp\Minus [$1, $3]; } + | static_scalar '*' static_scalar { $$ = Expr\BinaryOp\Mul [$1, $3]; } + | static_scalar '/' static_scalar { $$ = Expr\BinaryOp\Div [$1, $3]; } + | static_scalar '%' static_scalar { $$ = Expr\BinaryOp\Mod [$1, $3]; } + | static_scalar T_SL static_scalar { $$ = Expr\BinaryOp\ShiftLeft [$1, $3]; } + | static_scalar T_SR static_scalar { $$ = Expr\BinaryOp\ShiftRight[$1, $3]; } + | static_scalar T_POW static_scalar { $$ = Expr\BinaryOp\Pow [$1, $3]; } + | '+' static_scalar %prec T_INC { $$ = Expr\UnaryPlus [$2]; } + | '-' static_scalar %prec T_INC { $$ = Expr\UnaryMinus[$2]; } + | '!' static_scalar { $$ = Expr\BooleanNot[$2]; } + | '~' static_scalar { $$ = Expr\BitwiseNot[$2]; } + | static_scalar T_IS_IDENTICAL static_scalar { $$ = Expr\BinaryOp\Identical [$1, $3]; } + | static_scalar T_IS_NOT_IDENTICAL static_scalar { $$ = Expr\BinaryOp\NotIdentical [$1, $3]; } + | static_scalar T_IS_EQUAL static_scalar { $$ = Expr\BinaryOp\Equal [$1, $3]; } + | static_scalar T_IS_NOT_EQUAL static_scalar { $$ = Expr\BinaryOp\NotEqual [$1, $3]; } + | static_scalar '<' static_scalar { $$ = Expr\BinaryOp\Smaller [$1, $3]; } + | static_scalar T_IS_SMALLER_OR_EQUAL static_scalar { $$ = Expr\BinaryOp\SmallerOrEqual[$1, $3]; } + | static_scalar '>' static_scalar { $$ = Expr\BinaryOp\Greater [$1, $3]; } + | static_scalar T_IS_GREATER_OR_EQUAL static_scalar { $$ = Expr\BinaryOp\GreaterOrEqual[$1, $3]; } + | static_scalar '?' static_scalar ':' static_scalar { $$ = Expr\Ternary[$1, $3, $5]; } + | static_scalar '?' ':' static_scalar { $$ = Expr\Ternary[$1, null, $4]; } + | static_scalar '[' static_scalar ']' { $$ = Expr\ArrayDimFetch[$1, $3]; } + | '(' static_scalar ')' { $$ = $2; } +; + +constant: + name { $$ = Expr\ConstFetch[$1]; } + | class_name_or_var T_PAAMAYIM_NEKUDOTAYIM identifier + { $$ = Expr\ClassConstFetch[$1, $3]; } +; + +scalar: + common_scalar { $$ = $1; } + | constant { $$ = $1; } + | '"' encaps_list '"' + { $attrs = attributes(); $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; + parseEncapsed($2, '"', true); $$ = new Scalar\Encapsed($2, $attrs); } + | T_START_HEREDOC encaps_list T_END_HEREDOC + { $attrs = attributes(); setDocStringAttrs($attrs, $1); + parseEncapsedDoc($2, true); $$ = new Scalar\Encapsed($2, $attrs); } +; + +static_array_pair_list: + /* empty */ { $$ = array(); } + | non_empty_static_array_pair_list optional_comma { $$ = $1; } +; + +optional_comma: + /* empty */ + | ',' +; + +non_empty_static_array_pair_list: + non_empty_static_array_pair_list ',' static_array_pair { push($1, $3); } + | static_array_pair { init($1); } +; + +static_array_pair: + static_scalar T_DOUBLE_ARROW static_scalar { $$ = Expr\ArrayItem[$3, $1, false]; } + | static_scalar { $$ = Expr\ArrayItem[$1, null, false]; } +; + +variable: + object_access { $$ = $1; } + | base_variable { $$ = $1; } + | function_call { $$ = $1; } + | new_expr_array_deref { $$ = $1; } +; + +new_expr_array_deref: + '(' new_expr ')' '[' dim_offset ']' { $$ = Expr\ArrayDimFetch[$2, $5]; } + | new_expr_array_deref '[' dim_offset ']' { $$ = Expr\ArrayDimFetch[$1, $3]; } + /* alternative array syntax missing intentionally */ +; + +object_access: + variable_or_new_expr T_OBJECT_OPERATOR object_property + { $$ = Expr\PropertyFetch[$1, $3]; } + | variable_or_new_expr T_OBJECT_OPERATOR object_property argument_list + { $$ = Expr\MethodCall[$1, $3, $4]; } + | object_access argument_list { $$ = Expr\FuncCall[$1, $2]; } + | object_access '[' dim_offset ']' { $$ = Expr\ArrayDimFetch[$1, $3]; } + | object_access '{' expr '}' { $$ = Expr\ArrayDimFetch[$1, $3]; } +; + +variable_or_new_expr: + variable { $$ = $1; } + | '(' new_expr ')' { $$ = $2; } +; + +variable_without_objects: + reference_variable { $$ = $1; } + | '$' variable_without_objects { $$ = Expr\Variable[$2]; } +; + +base_variable: + variable_without_objects { $$ = $1; } + | static_property { $$ = $1; } +; + +static_property: + class_name_or_var T_PAAMAYIM_NEKUDOTAYIM '$' reference_variable + { $$ = Expr\StaticPropertyFetch[$1, $4]; } + | static_property_with_arrays { $$ = $1; } +; + +static_property_with_arrays: + class_name_or_var T_PAAMAYIM_NEKUDOTAYIM T_VARIABLE + { $$ = Expr\StaticPropertyFetch[$1, parseVar($3)]; } + | class_name_or_var T_PAAMAYIM_NEKUDOTAYIM '$' '{' expr '}' + { $$ = Expr\StaticPropertyFetch[$1, $5]; } + | static_property_with_arrays '[' dim_offset ']' { $$ = Expr\ArrayDimFetch[$1, $3]; } + | static_property_with_arrays '{' expr '}' { $$ = Expr\ArrayDimFetch[$1, $3]; } +; + +reference_variable: + reference_variable '[' dim_offset ']' { $$ = Expr\ArrayDimFetch[$1, $3]; } + | reference_variable '{' expr '}' { $$ = Expr\ArrayDimFetch[$1, $3]; } + | T_VARIABLE { $$ = Expr\Variable[parseVar($1)]; } + | '$' '{' expr '}' { $$ = Expr\Variable[$3]; } +; + +dim_offset: + /* empty */ { $$ = null; } + | expr { $$ = $1; } +; + +object_property: + T_STRING { $$ = $1; } + | '{' expr '}' { $$ = $2; } + | variable_without_objects { $$ = $1; } + | error { $$ = Expr\Error[]; $this->errorState = 2; } +; + +list_expr: + T_LIST '(' list_expr_elements ')' { $$ = Expr\List_[$3]; } +; + +list_expr_elements: + list_expr_elements ',' list_expr_element { push($1, $3); } + | list_expr_element { init($1); } +; + +list_expr_element: + variable { $$ = Expr\ArrayItem[$1, null, false]; } + | list_expr { $$ = Expr\ArrayItem[$1, null, false]; } + | /* empty */ { $$ = null; } +; + +array_pair_list: + /* empty */ { $$ = array(); } + | non_empty_array_pair_list optional_comma { $$ = $1; } +; + +non_empty_array_pair_list: + non_empty_array_pair_list ',' array_pair { push($1, $3); } + | array_pair { init($1); } +; + +array_pair: + expr T_DOUBLE_ARROW expr { $$ = Expr\ArrayItem[$3, $1, false]; } + | expr { $$ = Expr\ArrayItem[$1, null, false]; } + | expr T_DOUBLE_ARROW '&' variable { $$ = Expr\ArrayItem[$4, $1, true]; } + | '&' variable { $$ = Expr\ArrayItem[$2, null, true]; } +; + +encaps_list: + encaps_list encaps_var { push($1, $2); } + | encaps_list encaps_string_part { push($1, $2); } + | encaps_var { init($1); } + | encaps_string_part encaps_var { init($1, $2); } +; + +encaps_string_part: + T_ENCAPSED_AND_WHITESPACE { $$ = Scalar\EncapsedStringPart[$1]; } +; + +encaps_base_var: + T_VARIABLE { $$ = Expr\Variable[parseVar($1)]; } +; + +encaps_var: + encaps_base_var { $$ = $1; } + | encaps_base_var '[' encaps_var_offset ']' { $$ = Expr\ArrayDimFetch[$1, $3]; } + | encaps_base_var T_OBJECT_OPERATOR T_STRING { $$ = Expr\PropertyFetch[$1, $3]; } + | T_DOLLAR_OPEN_CURLY_BRACES expr '}' { $$ = Expr\Variable[$2]; } + | T_DOLLAR_OPEN_CURLY_BRACES T_STRING_VARNAME '}' { $$ = Expr\Variable[$2]; } + | T_DOLLAR_OPEN_CURLY_BRACES T_STRING_VARNAME '[' expr ']' '}' + { $$ = Expr\ArrayDimFetch[Expr\Variable[$2], $4]; } + | T_CURLY_OPEN variable '}' { $$ = $2; } +; + +encaps_var_offset: + T_STRING { $$ = Scalar\String_[$1]; } + | T_NUM_STRING { $$ = $this->parseNumString($1, attributes()); } + | T_VARIABLE { $$ = Expr\Variable[parseVar($1)]; } +; + +%% diff --git a/vendor/nikic/php-parser/grammar/php7.y b/vendor/nikic/php-parser/grammar/php7.y new file mode 100644 index 0000000..308c3cf --- /dev/null +++ b/vendor/nikic/php-parser/grammar/php7.y @@ -0,0 +1,947 @@ +%pure_parser +%expect 2 + +%tokens + +%% + +start: + top_statement_list { $$ = $this->handleNamespaces($1); } +; + +top_statement_list_ex: + top_statement_list_ex top_statement { pushNormalizing($1, $2); } + | /* empty */ { init(); } +; + +top_statement_list: + top_statement_list_ex + { makeNop($nop, $this->lookaheadStartAttributes); + if ($nop !== null) { $1[] = $nop; } $$ = $1; } +; + +reserved_non_modifiers: + T_INCLUDE | T_INCLUDE_ONCE | T_EVAL | T_REQUIRE | T_REQUIRE_ONCE | T_LOGICAL_OR | T_LOGICAL_XOR | T_LOGICAL_AND + | T_INSTANCEOF | T_NEW | T_CLONE | T_EXIT | T_IF | T_ELSEIF | T_ELSE | T_ENDIF | T_ECHO | T_DO | T_WHILE + | T_ENDWHILE | T_FOR | T_ENDFOR | T_FOREACH | T_ENDFOREACH | T_DECLARE | T_ENDDECLARE | T_AS | T_TRY | T_CATCH + | T_FINALLY | T_THROW | T_USE | T_INSTEADOF | T_GLOBAL | T_VAR | T_UNSET | T_ISSET | T_EMPTY | T_CONTINUE | T_GOTO + | T_FUNCTION | T_CONST | T_RETURN | T_PRINT | T_YIELD | T_LIST | T_SWITCH | T_ENDSWITCH | T_CASE | T_DEFAULT + | T_BREAK | T_ARRAY | T_CALLABLE | T_EXTENDS | T_IMPLEMENTS | T_NAMESPACE | T_TRAIT | T_INTERFACE | T_CLASS + | T_CLASS_C | T_TRAIT_C | T_FUNC_C | T_METHOD_C | T_LINE | T_FILE | T_DIR | T_NS_C | T_HALT_COMPILER +; + +semi_reserved: + reserved_non_modifiers + | T_STATIC | T_ABSTRACT | T_FINAL | T_PRIVATE | T_PROTECTED | T_PUBLIC +; + +identifier: + T_STRING { $$ = $1; } + | semi_reserved { $$ = $1; } +; + +namespace_name_parts: + T_STRING { init($1); } + | namespace_name_parts T_NS_SEPARATOR T_STRING { push($1, $3); } +; + +namespace_name: + namespace_name_parts { $$ = Name[$1]; } +; + +semi: + ';' { /* nothing */ } + | error { /* nothing */ } +; + +no_comma: + /* empty */ { /* nothing */ } + | ',' { $this->emitError(new Error('A trailing comma is not allowed here', attributes())); } +; + +top_statement: + statement { $$ = $1; } + | function_declaration_statement { $$ = $1; } + | class_declaration_statement { $$ = $1; } + | T_HALT_COMPILER + { $$ = Stmt\HaltCompiler[$this->lexer->handleHaltCompiler()]; } + | T_NAMESPACE namespace_name semi + { $$ = Stmt\Namespace_[$2, null]; $this->checkNamespace($$); } + | T_NAMESPACE namespace_name '{' top_statement_list '}' + { $$ = Stmt\Namespace_[$2, $4]; $this->checkNamespace($$); } + | T_NAMESPACE '{' top_statement_list '}' + { $$ = Stmt\Namespace_[null, $3]; $this->checkNamespace($$); } + | T_USE use_declarations semi { $$ = Stmt\Use_[$2, Stmt\Use_::TYPE_NORMAL]; } + | T_USE use_type use_declarations semi { $$ = Stmt\Use_[$3, $2]; } + | group_use_declaration semi { $$ = $1; } + | T_CONST constant_declaration_list semi { $$ = Stmt\Const_[$2]; } +; + +use_type: + T_FUNCTION { $$ = Stmt\Use_::TYPE_FUNCTION; } + | T_CONST { $$ = Stmt\Use_::TYPE_CONSTANT; } +; + +/* Using namespace_name_parts here to avoid s/r conflict on T_NS_SEPARATOR */ +group_use_declaration: + T_USE use_type namespace_name_parts T_NS_SEPARATOR '{' unprefixed_use_declarations '}' + { $$ = Stmt\GroupUse[new Name($3, stackAttributes(#3)), $6, $2]; } + | T_USE use_type T_NS_SEPARATOR namespace_name_parts T_NS_SEPARATOR '{' unprefixed_use_declarations '}' + { $$ = Stmt\GroupUse[new Name($4, stackAttributes(#4)), $7, $2]; } + | T_USE namespace_name_parts T_NS_SEPARATOR '{' inline_use_declarations '}' + { $$ = Stmt\GroupUse[new Name($2, stackAttributes(#2)), $5, Stmt\Use_::TYPE_UNKNOWN]; } + | T_USE T_NS_SEPARATOR namespace_name_parts T_NS_SEPARATOR '{' inline_use_declarations '}' + { $$ = Stmt\GroupUse[new Name($3, stackAttributes(#3)), $6, Stmt\Use_::TYPE_UNKNOWN]; } +; + +unprefixed_use_declarations: + non_empty_unprefixed_use_declarations no_comma { $$ = $1; } +; + +non_empty_unprefixed_use_declarations: + non_empty_unprefixed_use_declarations ',' unprefixed_use_declaration + { push($1, $3); } + | unprefixed_use_declaration { init($1); } +; + +use_declarations: + non_empty_use_declarations no_comma { $$ = $1; } +; + +non_empty_use_declarations: + non_empty_use_declarations ',' use_declaration { push($1, $3); } + | use_declaration { init($1); } +; + +inline_use_declarations: + non_empty_inline_use_declarations no_comma { $$ = $1; } +; + +non_empty_inline_use_declarations: + non_empty_inline_use_declarations ',' inline_use_declaration + { push($1, $3); } + | inline_use_declaration { init($1); } +; + +unprefixed_use_declaration: + namespace_name + { $$ = Stmt\UseUse[$1, null, Stmt\Use_::TYPE_UNKNOWN]; $this->checkUseUse($$, #1); } + | namespace_name T_AS T_STRING + { $$ = Stmt\UseUse[$1, $3, Stmt\Use_::TYPE_UNKNOWN]; $this->checkUseUse($$, #3); } +; + +use_declaration: + unprefixed_use_declaration { $$ = $1; } + | T_NS_SEPARATOR unprefixed_use_declaration { $$ = $2; } +; + +inline_use_declaration: + unprefixed_use_declaration { $$ = $1; $$->type = Stmt\Use_::TYPE_NORMAL; } + | use_type unprefixed_use_declaration { $$ = $2; $$->type = $1; } +; + +constant_declaration_list: + non_empty_constant_declaration_list no_comma { $$ = $1; } +; + +non_empty_constant_declaration_list: + non_empty_constant_declaration_list ',' constant_declaration + { push($1, $3); } + | constant_declaration { init($1); } +; + +constant_declaration: + T_STRING '=' expr { $$ = Node\Const_[$1, $3]; } +; + +class_const_list: + non_empty_class_const_list no_comma { $$ = $1; } +; + +non_empty_class_const_list: + non_empty_class_const_list ',' class_const { push($1, $3); } + | class_const { init($1); } +; + +class_const: + identifier '=' expr { $$ = Node\Const_[$1, $3]; } +; + +inner_statement_list_ex: + inner_statement_list_ex inner_statement { pushNormalizing($1, $2); } + | /* empty */ { init(); } +; + +inner_statement_list: + inner_statement_list_ex + { makeNop($nop, $this->lookaheadStartAttributes); + if ($nop !== null) { $1[] = $nop; } $$ = $1; } +; + +inner_statement: + statement { $$ = $1; } + | function_declaration_statement { $$ = $1; } + | class_declaration_statement { $$ = $1; } + | T_HALT_COMPILER + { throw new Error('__HALT_COMPILER() can only be used from the outermost scope', attributes()); } +; + +non_empty_statement: + '{' inner_statement_list '}' { $$ = $2; prependLeadingComments($$); } + | T_IF '(' expr ')' statement elseif_list else_single + { $$ = Stmt\If_[$3, ['stmts' => toArray($5), 'elseifs' => $6, 'else' => $7]]; } + | T_IF '(' expr ')' ':' inner_statement_list new_elseif_list new_else_single T_ENDIF ';' + { $$ = Stmt\If_[$3, ['stmts' => $6, 'elseifs' => $7, 'else' => $8]]; } + | T_WHILE '(' expr ')' while_statement { $$ = Stmt\While_[$3, $5]; } + | T_DO statement T_WHILE '(' expr ')' ';' { $$ = Stmt\Do_ [$5, toArray($2)]; } + | T_FOR '(' for_expr ';' for_expr ';' for_expr ')' for_statement + { $$ = Stmt\For_[['init' => $3, 'cond' => $5, 'loop' => $7, 'stmts' => $9]]; } + | T_SWITCH '(' expr ')' switch_case_list { $$ = Stmt\Switch_[$3, $5]; } + | T_BREAK optional_expr semi { $$ = Stmt\Break_[$2]; } + | T_CONTINUE optional_expr semi { $$ = Stmt\Continue_[$2]; } + | T_RETURN optional_expr semi { $$ = Stmt\Return_[$2]; } + | T_GLOBAL global_var_list semi { $$ = Stmt\Global_[$2]; } + | T_STATIC static_var_list semi { $$ = Stmt\Static_[$2]; } + | T_ECHO expr_list semi { $$ = Stmt\Echo_[$2]; } + | T_INLINE_HTML { $$ = Stmt\InlineHTML[$1]; } + | expr semi { $$ = $1; } + | T_UNSET '(' variables_list ')' semi { $$ = Stmt\Unset_[$3]; } + | T_FOREACH '(' expr T_AS foreach_variable ')' foreach_statement + { $$ = Stmt\Foreach_[$3, $5[0], ['keyVar' => null, 'byRef' => $5[1], 'stmts' => $7]]; } + | T_FOREACH '(' expr T_AS variable T_DOUBLE_ARROW foreach_variable ')' foreach_statement + { $$ = Stmt\Foreach_[$3, $7[0], ['keyVar' => $5, 'byRef' => $7[1], 'stmts' => $9]]; } + | T_DECLARE '(' declare_list ')' declare_statement { $$ = Stmt\Declare_[$3, $5]; } + | T_TRY '{' inner_statement_list '}' catches optional_finally + { $$ = Stmt\TryCatch[$3, $5, $6]; $this->checkTryCatch($$); } + | T_THROW expr semi { $$ = Stmt\Throw_[$2]; } + | T_GOTO T_STRING semi { $$ = Stmt\Goto_[$2]; } + | T_STRING ':' { $$ = Stmt\Label[$1]; } + | error { $$ = array(); /* means: no statement */ } +; + +statement: + non_empty_statement { $$ = $1; } + | ';' + { makeNop($$, $this->startAttributeStack[#1]); + if ($$ === null) $$ = array(); /* means: no statement */ } +; + +catches: + /* empty */ { init(); } + | catches catch { push($1, $2); } +; + +name_union: + name { init($1); } + | name_union '|' name { push($1, $3); } +; + +catch: + T_CATCH '(' name_union T_VARIABLE ')' '{' inner_statement_list '}' + { $$ = Stmt\Catch_[$3, parseVar($4), $7]; } +; + +optional_finally: + /* empty */ { $$ = null; } + | T_FINALLY '{' inner_statement_list '}' { $$ = Stmt\Finally_[$3]; } +; + +variables_list: + non_empty_variables_list no_comma { $$ = $1; } +; + +non_empty_variables_list: + variable { init($1); } + | non_empty_variables_list ',' variable { push($1, $3); } +; + +optional_ref: + /* empty */ { $$ = false; } + | '&' { $$ = true; } +; + +optional_ellipsis: + /* empty */ { $$ = false; } + | T_ELLIPSIS { $$ = true; } +; + +function_declaration_statement: + T_FUNCTION optional_ref T_STRING '(' parameter_list ')' optional_return_type '{' inner_statement_list '}' + { $$ = Stmt\Function_[$3, ['byRef' => $2, 'params' => $5, 'returnType' => $7, 'stmts' => $9]]; } +; + +class_declaration_statement: + class_entry_type T_STRING extends_from implements_list '{' class_statement_list '}' + { $$ = Stmt\Class_[$2, ['type' => $1, 'extends' => $3, 'implements' => $4, 'stmts' => $6]]; + $this->checkClass($$, #2); } + | T_INTERFACE T_STRING interface_extends_list '{' class_statement_list '}' + { $$ = Stmt\Interface_[$2, ['extends' => $3, 'stmts' => $5]]; + $this->checkInterface($$, #2); } + | T_TRAIT T_STRING '{' class_statement_list '}' + { $$ = Stmt\Trait_[$2, ['stmts' => $4]]; } +; + +class_entry_type: + T_CLASS { $$ = 0; } + | T_ABSTRACT T_CLASS { $$ = Stmt\Class_::MODIFIER_ABSTRACT; } + | T_FINAL T_CLASS { $$ = Stmt\Class_::MODIFIER_FINAL; } +; + +extends_from: + /* empty */ { $$ = null; } + | T_EXTENDS class_name { $$ = $2; } +; + +interface_extends_list: + /* empty */ { $$ = array(); } + | T_EXTENDS class_name_list { $$ = $2; } +; + +implements_list: + /* empty */ { $$ = array(); } + | T_IMPLEMENTS class_name_list { $$ = $2; } +; + +class_name_list: + non_empty_class_name_list no_comma { $$ = $1; } +; + +non_empty_class_name_list: + class_name { init($1); } + | non_empty_class_name_list ',' class_name { push($1, $3); } +; + +for_statement: + statement { $$ = toArray($1); } + | ':' inner_statement_list T_ENDFOR ';' { $$ = $2; } +; + +foreach_statement: + statement { $$ = toArray($1); } + | ':' inner_statement_list T_ENDFOREACH ';' { $$ = $2; } +; + +declare_statement: + non_empty_statement { $$ = toArray($1); } + | ';' { $$ = null; } + | ':' inner_statement_list T_ENDDECLARE ';' { $$ = $2; } +; + +declare_list: + non_empty_declare_list no_comma { $$ = $1; } +; + +non_empty_declare_list: + declare_list_element { init($1); } + | non_empty_declare_list ',' declare_list_element { push($1, $3); } +; + +declare_list_element: + T_STRING '=' expr { $$ = Stmt\DeclareDeclare[$1, $3]; } +; + +switch_case_list: + '{' case_list '}' { $$ = $2; } + | '{' ';' case_list '}' { $$ = $3; } + | ':' case_list T_ENDSWITCH ';' { $$ = $2; } + | ':' ';' case_list T_ENDSWITCH ';' { $$ = $3; } +; + +case_list: + /* empty */ { init(); } + | case_list case { push($1, $2); } +; + +case: + T_CASE expr case_separator inner_statement_list { $$ = Stmt\Case_[$2, $4]; } + | T_DEFAULT case_separator inner_statement_list { $$ = Stmt\Case_[null, $3]; } +; + +case_separator: + ':' + | ';' +; + +while_statement: + statement { $$ = toArray($1); } + | ':' inner_statement_list T_ENDWHILE ';' { $$ = $2; } +; + +elseif_list: + /* empty */ { init(); } + | elseif_list elseif { push($1, $2); } +; + +elseif: + T_ELSEIF '(' expr ')' statement { $$ = Stmt\ElseIf_[$3, toArray($5)]; } +; + +new_elseif_list: + /* empty */ { init(); } + | new_elseif_list new_elseif { push($1, $2); } +; + +new_elseif: + T_ELSEIF '(' expr ')' ':' inner_statement_list { $$ = Stmt\ElseIf_[$3, $6]; } +; + +else_single: + /* empty */ { $$ = null; } + | T_ELSE statement { $$ = Stmt\Else_[toArray($2)]; } +; + +new_else_single: + /* empty */ { $$ = null; } + | T_ELSE ':' inner_statement_list { $$ = Stmt\Else_[$3]; } +; + +foreach_variable: + variable { $$ = array($1, false); } + | '&' variable { $$ = array($2, true); } + | list_expr { $$ = array($1, false); } + | array_short_syntax { $$ = array($1, false); } +; + +parameter_list: + non_empty_parameter_list no_comma { $$ = $1; } + | /* empty */ { $$ = array(); } +; + +non_empty_parameter_list: + parameter { init($1); } + | non_empty_parameter_list ',' parameter { push($1, $3); } +; + +parameter: + optional_param_type optional_ref optional_ellipsis T_VARIABLE + { $$ = Node\Param[parseVar($4), null, $1, $2, $3]; $this->checkParam($$); } + | optional_param_type optional_ref optional_ellipsis T_VARIABLE '=' expr + { $$ = Node\Param[parseVar($4), $6, $1, $2, $3]; $this->checkParam($$); } +; + +type_expr: + type { $$ = $1; } + | '?' type { $$ = Node\NullableType[$2]; } +; + +type: + name { $$ = $this->handleBuiltinTypes($1); } + | T_ARRAY { $$ = 'array'; } + | T_CALLABLE { $$ = 'callable'; } +; + +optional_param_type: + /* empty */ { $$ = null; } + | type_expr { $$ = $1; } +; + +optional_return_type: + /* empty */ { $$ = null; } + | ':' type_expr { $$ = $2; } +; + +argument_list: + '(' ')' { $$ = array(); } + | '(' non_empty_argument_list no_comma ')' { $$ = $2; } +; + +non_empty_argument_list: + argument { init($1); } + | non_empty_argument_list ',' argument { push($1, $3); } +; + +argument: + expr { $$ = Node\Arg[$1, false, false]; } + | '&' variable { $$ = Node\Arg[$2, true, false]; } + | T_ELLIPSIS expr { $$ = Node\Arg[$2, false, true]; } +; + +global_var_list: + non_empty_global_var_list no_comma { $$ = $1; } +; + +non_empty_global_var_list: + non_empty_global_var_list ',' global_var { push($1, $3); } + | global_var { init($1); } +; + +global_var: + simple_variable { $$ = Expr\Variable[$1]; } +; + +static_var_list: + non_empty_static_var_list no_comma { $$ = $1; } +; + +non_empty_static_var_list: + non_empty_static_var_list ',' static_var { push($1, $3); } + | static_var { init($1); } +; + +static_var: + T_VARIABLE { $$ = Stmt\StaticVar[parseVar($1), null]; } + | T_VARIABLE '=' expr { $$ = Stmt\StaticVar[parseVar($1), $3]; } +; + +class_statement_list: + class_statement_list class_statement { push($1, $2); } + | /* empty */ { init(); } +; + +class_statement: + variable_modifiers property_declaration_list ';' + { $$ = Stmt\Property[$1, $2]; $this->checkProperty($$, #1); } + | method_modifiers T_CONST class_const_list ';' + { $$ = Stmt\ClassConst[$3, $1]; $this->checkClassConst($$, #1); } + | method_modifiers T_FUNCTION optional_ref identifier '(' parameter_list ')' optional_return_type method_body + { $$ = Stmt\ClassMethod[$4, ['type' => $1, 'byRef' => $3, 'params' => $6, 'returnType' => $8, 'stmts' => $9]]; + $this->checkClassMethod($$, #1); } + | T_USE class_name_list trait_adaptations { $$ = Stmt\TraitUse[$2, $3]; } +; + +trait_adaptations: + ';' { $$ = array(); } + | '{' trait_adaptation_list '}' { $$ = $2; } +; + +trait_adaptation_list: + /* empty */ { init(); } + | trait_adaptation_list trait_adaptation { push($1, $2); } +; + +trait_adaptation: + trait_method_reference_fully_qualified T_INSTEADOF class_name_list ';' + { $$ = Stmt\TraitUseAdaptation\Precedence[$1[0], $1[1], $3]; } + | trait_method_reference T_AS member_modifier identifier ';' + { $$ = Stmt\TraitUseAdaptation\Alias[$1[0], $1[1], $3, $4]; } + | trait_method_reference T_AS member_modifier ';' + { $$ = Stmt\TraitUseAdaptation\Alias[$1[0], $1[1], $3, null]; } + | trait_method_reference T_AS T_STRING ';' + { $$ = Stmt\TraitUseAdaptation\Alias[$1[0], $1[1], null, $3]; } + | trait_method_reference T_AS reserved_non_modifiers ';' + { $$ = Stmt\TraitUseAdaptation\Alias[$1[0], $1[1], null, $3]; } +; + +trait_method_reference_fully_qualified: + name T_PAAMAYIM_NEKUDOTAYIM identifier { $$ = array($1, $3); } +; +trait_method_reference: + trait_method_reference_fully_qualified { $$ = $1; } + | identifier { $$ = array(null, $1); } +; + +method_body: + ';' /* abstract method */ { $$ = null; } + | '{' inner_statement_list '}' { $$ = $2; } +; + +variable_modifiers: + non_empty_member_modifiers { $$ = $1; } + | T_VAR { $$ = 0; } +; + +method_modifiers: + /* empty */ { $$ = 0; } + | non_empty_member_modifiers { $$ = $1; } +; + +non_empty_member_modifiers: + member_modifier { $$ = $1; } + | non_empty_member_modifiers member_modifier { $this->checkModifier($1, $2, #2); $$ = $1 | $2; } +; + +member_modifier: + T_PUBLIC { $$ = Stmt\Class_::MODIFIER_PUBLIC; } + | T_PROTECTED { $$ = Stmt\Class_::MODIFIER_PROTECTED; } + | T_PRIVATE { $$ = Stmt\Class_::MODIFIER_PRIVATE; } + | T_STATIC { $$ = Stmt\Class_::MODIFIER_STATIC; } + | T_ABSTRACT { $$ = Stmt\Class_::MODIFIER_ABSTRACT; } + | T_FINAL { $$ = Stmt\Class_::MODIFIER_FINAL; } +; + +property_declaration_list: + non_empty_property_declaration_list no_comma { $$ = $1; } +; + +non_empty_property_declaration_list: + property_declaration { init($1); } + | non_empty_property_declaration_list ',' property_declaration + { push($1, $3); } +; + +property_declaration: + T_VARIABLE { $$ = Stmt\PropertyProperty[parseVar($1), null]; } + | T_VARIABLE '=' expr { $$ = Stmt\PropertyProperty[parseVar($1), $3]; } +; + +expr_list: + non_empty_expr_list no_comma { $$ = $1; } +; + +non_empty_expr_list: + non_empty_expr_list ',' expr { push($1, $3); } + | expr { init($1); } +; + +for_expr: + /* empty */ { $$ = array(); } + | expr_list { $$ = $1; } +; + +expr: + variable { $$ = $1; } + | list_expr '=' expr { $$ = Expr\Assign[$1, $3]; } + | array_short_syntax '=' expr { $$ = Expr\Assign[$1, $3]; } + | variable '=' expr { $$ = Expr\Assign[$1, $3]; } + | variable '=' '&' variable { $$ = Expr\AssignRef[$1, $4]; } + | new_expr { $$ = $1; } + | T_CLONE expr { $$ = Expr\Clone_[$2]; } + | variable T_PLUS_EQUAL expr { $$ = Expr\AssignOp\Plus [$1, $3]; } + | variable T_MINUS_EQUAL expr { $$ = Expr\AssignOp\Minus [$1, $3]; } + | variable T_MUL_EQUAL expr { $$ = Expr\AssignOp\Mul [$1, $3]; } + | variable T_DIV_EQUAL expr { $$ = Expr\AssignOp\Div [$1, $3]; } + | variable T_CONCAT_EQUAL expr { $$ = Expr\AssignOp\Concat [$1, $3]; } + | variable T_MOD_EQUAL expr { $$ = Expr\AssignOp\Mod [$1, $3]; } + | variable T_AND_EQUAL expr { $$ = Expr\AssignOp\BitwiseAnd[$1, $3]; } + | variable T_OR_EQUAL expr { $$ = Expr\AssignOp\BitwiseOr [$1, $3]; } + | variable T_XOR_EQUAL expr { $$ = Expr\AssignOp\BitwiseXor[$1, $3]; } + | variable T_SL_EQUAL expr { $$ = Expr\AssignOp\ShiftLeft [$1, $3]; } + | variable T_SR_EQUAL expr { $$ = Expr\AssignOp\ShiftRight[$1, $3]; } + | variable T_POW_EQUAL expr { $$ = Expr\AssignOp\Pow [$1, $3]; } + | variable T_INC { $$ = Expr\PostInc[$1]; } + | T_INC variable { $$ = Expr\PreInc [$2]; } + | variable T_DEC { $$ = Expr\PostDec[$1]; } + | T_DEC variable { $$ = Expr\PreDec [$2]; } + | expr T_BOOLEAN_OR expr { $$ = Expr\BinaryOp\BooleanOr [$1, $3]; } + | expr T_BOOLEAN_AND expr { $$ = Expr\BinaryOp\BooleanAnd[$1, $3]; } + | expr T_LOGICAL_OR expr { $$ = Expr\BinaryOp\LogicalOr [$1, $3]; } + | expr T_LOGICAL_AND expr { $$ = Expr\BinaryOp\LogicalAnd[$1, $3]; } + | expr T_LOGICAL_XOR expr { $$ = Expr\BinaryOp\LogicalXor[$1, $3]; } + | expr '|' expr { $$ = Expr\BinaryOp\BitwiseOr [$1, $3]; } + | expr '&' expr { $$ = Expr\BinaryOp\BitwiseAnd[$1, $3]; } + | expr '^' expr { $$ = Expr\BinaryOp\BitwiseXor[$1, $3]; } + | expr '.' expr { $$ = Expr\BinaryOp\Concat [$1, $3]; } + | expr '+' expr { $$ = Expr\BinaryOp\Plus [$1, $3]; } + | expr '-' expr { $$ = Expr\BinaryOp\Minus [$1, $3]; } + | expr '*' expr { $$ = Expr\BinaryOp\Mul [$1, $3]; } + | expr '/' expr { $$ = Expr\BinaryOp\Div [$1, $3]; } + | expr '%' expr { $$ = Expr\BinaryOp\Mod [$1, $3]; } + | expr T_SL expr { $$ = Expr\BinaryOp\ShiftLeft [$1, $3]; } + | expr T_SR expr { $$ = Expr\BinaryOp\ShiftRight[$1, $3]; } + | expr T_POW expr { $$ = Expr\BinaryOp\Pow [$1, $3]; } + | '+' expr %prec T_INC { $$ = Expr\UnaryPlus [$2]; } + | '-' expr %prec T_INC { $$ = Expr\UnaryMinus[$2]; } + | '!' expr { $$ = Expr\BooleanNot[$2]; } + | '~' expr { $$ = Expr\BitwiseNot[$2]; } + | expr T_IS_IDENTICAL expr { $$ = Expr\BinaryOp\Identical [$1, $3]; } + | expr T_IS_NOT_IDENTICAL expr { $$ = Expr\BinaryOp\NotIdentical [$1, $3]; } + | expr T_IS_EQUAL expr { $$ = Expr\BinaryOp\Equal [$1, $3]; } + | expr T_IS_NOT_EQUAL expr { $$ = Expr\BinaryOp\NotEqual [$1, $3]; } + | expr T_SPACESHIP expr { $$ = Expr\BinaryOp\Spaceship [$1, $3]; } + | expr '<' expr { $$ = Expr\BinaryOp\Smaller [$1, $3]; } + | expr T_IS_SMALLER_OR_EQUAL expr { $$ = Expr\BinaryOp\SmallerOrEqual[$1, $3]; } + | expr '>' expr { $$ = Expr\BinaryOp\Greater [$1, $3]; } + | expr T_IS_GREATER_OR_EQUAL expr { $$ = Expr\BinaryOp\GreaterOrEqual[$1, $3]; } + | expr T_INSTANCEOF class_name_reference { $$ = Expr\Instanceof_[$1, $3]; } + | '(' expr ')' { $$ = $2; } + | expr '?' expr ':' expr { $$ = Expr\Ternary[$1, $3, $5]; } + | expr '?' ':' expr { $$ = Expr\Ternary[$1, null, $4]; } + | expr T_COALESCE expr { $$ = Expr\BinaryOp\Coalesce[$1, $3]; } + | T_ISSET '(' variables_list ')' { $$ = Expr\Isset_[$3]; } + | T_EMPTY '(' expr ')' { $$ = Expr\Empty_[$3]; } + | T_INCLUDE expr { $$ = Expr\Include_[$2, Expr\Include_::TYPE_INCLUDE]; } + | T_INCLUDE_ONCE expr { $$ = Expr\Include_[$2, Expr\Include_::TYPE_INCLUDE_ONCE]; } + | T_EVAL '(' expr ')' { $$ = Expr\Eval_[$3]; } + | T_REQUIRE expr { $$ = Expr\Include_[$2, Expr\Include_::TYPE_REQUIRE]; } + | T_REQUIRE_ONCE expr { $$ = Expr\Include_[$2, Expr\Include_::TYPE_REQUIRE_ONCE]; } + | T_INT_CAST expr { $$ = Expr\Cast\Int_ [$2]; } + | T_DOUBLE_CAST expr { $$ = Expr\Cast\Double [$2]; } + | T_STRING_CAST expr { $$ = Expr\Cast\String_ [$2]; } + | T_ARRAY_CAST expr { $$ = Expr\Cast\Array_ [$2]; } + | T_OBJECT_CAST expr { $$ = Expr\Cast\Object_ [$2]; } + | T_BOOL_CAST expr { $$ = Expr\Cast\Bool_ [$2]; } + | T_UNSET_CAST expr { $$ = Expr\Cast\Unset_ [$2]; } + | T_EXIT exit_expr + { $attrs = attributes(); + $attrs['kind'] = strtolower($1) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE; + $$ = new Expr\Exit_($2, $attrs); } + | '@' expr { $$ = Expr\ErrorSuppress[$2]; } + | scalar { $$ = $1; } + | '`' backticks_expr '`' { $$ = Expr\ShellExec[$2]; } + | T_PRINT expr { $$ = Expr\Print_[$2]; } + | T_YIELD { $$ = Expr\Yield_[null, null]; } + | T_YIELD expr { $$ = Expr\Yield_[$2, null]; } + | T_YIELD expr T_DOUBLE_ARROW expr { $$ = Expr\Yield_[$4, $2]; } + | T_YIELD_FROM expr { $$ = Expr\YieldFrom[$2]; } + | T_FUNCTION optional_ref '(' parameter_list ')' lexical_vars optional_return_type + '{' inner_statement_list '}' + { $$ = Expr\Closure[['static' => false, 'byRef' => $2, 'params' => $4, 'uses' => $6, 'returnType' => $7, 'stmts' => $9]]; } + | T_STATIC T_FUNCTION optional_ref '(' parameter_list ')' lexical_vars optional_return_type + '{' inner_statement_list '}' + { $$ = Expr\Closure[['static' => true, 'byRef' => $3, 'params' => $5, 'uses' => $7, 'returnType' => $8, 'stmts' => $10]]; } +; + +anonymous_class: + T_CLASS ctor_arguments extends_from implements_list '{' class_statement_list '}' + { $$ = array(Stmt\Class_[null, ['type' => 0, 'extends' => $3, 'implements' => $4, 'stmts' => $6]], $2); + $this->checkClass($$[0], -1); } + +new_expr: + T_NEW class_name_reference ctor_arguments { $$ = Expr\New_[$2, $3]; } + | T_NEW anonymous_class + { list($class, $ctorArgs) = $2; $$ = Expr\New_[$class, $ctorArgs]; } +; + +lexical_vars: + /* empty */ { $$ = array(); } + | T_USE '(' lexical_var_list ')' { $$ = $3; } +; + +lexical_var_list: + non_empty_lexical_var_list no_comma { $$ = $1; } +; + +non_empty_lexical_var_list: + lexical_var { init($1); } + | non_empty_lexical_var_list ',' lexical_var { push($1, $3); } +; + +lexical_var: + optional_ref T_VARIABLE { $$ = Expr\ClosureUse[parseVar($2), $1]; } +; + +function_call: + name argument_list { $$ = Expr\FuncCall[$1, $2]; } + | callable_expr argument_list { $$ = Expr\FuncCall[$1, $2]; } + | class_name_or_var T_PAAMAYIM_NEKUDOTAYIM member_name argument_list + { $$ = Expr\StaticCall[$1, $3, $4]; } +; + +class_name: + T_STATIC { $$ = Name[$1]; } + | name { $$ = $1; } +; + +name: + namespace_name_parts { $$ = Name[$1]; } + | T_NS_SEPARATOR namespace_name_parts { $$ = Name\FullyQualified[$2]; } + | T_NAMESPACE T_NS_SEPARATOR namespace_name_parts { $$ = Name\Relative[$3]; } +; + +class_name_reference: + class_name { $$ = $1; } + | new_variable { $$ = $1; } + | error { $$ = Expr\Error[]; $this->errorState = 2; } +; + +class_name_or_var: + class_name { $$ = $1; } + | dereferencable { $$ = $1; } +; + +exit_expr: + /* empty */ { $$ = null; } + | '(' optional_expr ')' { $$ = $2; } +; + +backticks_expr: + /* empty */ { $$ = array(); } + | T_ENCAPSED_AND_WHITESPACE + { $$ = array(Scalar\EncapsedStringPart[Scalar\String_::parseEscapeSequences($1, '`')]); } + | encaps_list { parseEncapsed($1, '`', true); $$ = $1; } +; + +ctor_arguments: + /* empty */ { $$ = array(); } + | argument_list { $$ = $1; } +; + +constant: + name { $$ = Expr\ConstFetch[$1]; } + | class_name_or_var T_PAAMAYIM_NEKUDOTAYIM identifier + { $$ = Expr\ClassConstFetch[$1, $3]; } + /* We interpret and isolated FOO:: as an unfinished class constant fetch. It could also be + an unfinished static property fetch or unfinished scoped call. */ + | class_name_or_var T_PAAMAYIM_NEKUDOTAYIM error + { $$ = Expr\ClassConstFetch[$1, new Expr\Error(stackAttributes(#3))]; $this->errorState = 2; } +; + +array_short_syntax: + '[' array_pair_list ']' + { $attrs = attributes(); $attrs['kind'] = Expr\Array_::KIND_SHORT; + $$ = new Expr\Array_($2, $attrs); } +; + +dereferencable_scalar: + T_ARRAY '(' array_pair_list ')' + { $attrs = attributes(); $attrs['kind'] = Expr\Array_::KIND_LONG; + $$ = new Expr\Array_($3, $attrs); } + | array_short_syntax { $$ = $1; } + | T_CONSTANT_ENCAPSED_STRING + { $attrs = attributes(); $attrs['kind'] = strKind($1); + $$ = new Scalar\String_(Scalar\String_::parse($1), $attrs); } +; + +scalar: + T_LNUMBER { $$ = $this->parseLNumber($1, attributes()); } + | T_DNUMBER { $$ = Scalar\DNumber[Scalar\DNumber::parse($1)]; } + | T_LINE { $$ = Scalar\MagicConst\Line[]; } + | T_FILE { $$ = Scalar\MagicConst\File[]; } + | T_DIR { $$ = Scalar\MagicConst\Dir[]; } + | T_CLASS_C { $$ = Scalar\MagicConst\Class_[]; } + | T_TRAIT_C { $$ = Scalar\MagicConst\Trait_[]; } + | T_METHOD_C { $$ = Scalar\MagicConst\Method[]; } + | T_FUNC_C { $$ = Scalar\MagicConst\Function_[]; } + | T_NS_C { $$ = Scalar\MagicConst\Namespace_[]; } + | dereferencable_scalar { $$ = $1; } + | constant { $$ = $1; } + | T_START_HEREDOC T_ENCAPSED_AND_WHITESPACE T_END_HEREDOC + { $attrs = attributes(); setDocStringAttrs($attrs, $1); + $$ = new Scalar\String_(Scalar\String_::parseDocString($1, $2), $attrs); } + | T_START_HEREDOC T_END_HEREDOC + { $attrs = attributes(); setDocStringAttrs($attrs, $1); + $$ = new Scalar\String_('', $attrs); } + | '"' encaps_list '"' + { $attrs = attributes(); $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; + parseEncapsed($2, '"', true); $$ = new Scalar\Encapsed($2, $attrs); } + | T_START_HEREDOC encaps_list T_END_HEREDOC + { $attrs = attributes(); setDocStringAttrs($attrs, $1); + parseEncapsedDoc($2, true); $$ = new Scalar\Encapsed($2, $attrs); } +; + +optional_expr: + /* empty */ { $$ = null; } + | expr { $$ = $1; } +; + +dereferencable: + variable { $$ = $1; } + | '(' expr ')' { $$ = $2; } + | dereferencable_scalar { $$ = $1; } +; + +callable_expr: + callable_variable { $$ = $1; } + | '(' expr ')' { $$ = $2; } + | dereferencable_scalar { $$ = $1; } +; + +callable_variable: + simple_variable { $$ = Expr\Variable[$1]; } + | dereferencable '[' optional_expr ']' { $$ = Expr\ArrayDimFetch[$1, $3]; } + | constant '[' optional_expr ']' { $$ = Expr\ArrayDimFetch[$1, $3]; } + | dereferencable '{' expr '}' { $$ = Expr\ArrayDimFetch[$1, $3]; } + | function_call { $$ = $1; } + | dereferencable T_OBJECT_OPERATOR property_name argument_list + { $$ = Expr\MethodCall[$1, $3, $4]; } +; + +variable: + callable_variable { $$ = $1; } + | static_member { $$ = $1; } + | dereferencable T_OBJECT_OPERATOR property_name { $$ = Expr\PropertyFetch[$1, $3]; } +; + +simple_variable: + T_VARIABLE { $$ = parseVar($1); } + | '$' '{' expr '}' { $$ = $3; } + | '$' simple_variable { $$ = Expr\Variable[$2]; } + | '$' error { $$ = Expr\Error[]; $this->errorState = 2; } +; + +static_member: + class_name_or_var T_PAAMAYIM_NEKUDOTAYIM simple_variable + { $$ = Expr\StaticPropertyFetch[$1, $3]; } +; + +new_variable: + simple_variable { $$ = Expr\Variable[$1]; } + | new_variable '[' optional_expr ']' { $$ = Expr\ArrayDimFetch[$1, $3]; } + | new_variable '{' expr '}' { $$ = Expr\ArrayDimFetch[$1, $3]; } + | new_variable T_OBJECT_OPERATOR property_name { $$ = Expr\PropertyFetch[$1, $3]; } + | class_name T_PAAMAYIM_NEKUDOTAYIM simple_variable { $$ = Expr\StaticPropertyFetch[$1, $3]; } + | new_variable T_PAAMAYIM_NEKUDOTAYIM simple_variable { $$ = Expr\StaticPropertyFetch[$1, $3]; } +; + +member_name: + identifier { $$ = $1; } + | '{' expr '}' { $$ = $2; } + | simple_variable { $$ = Expr\Variable[$1]; } +; + +property_name: + T_STRING { $$ = $1; } + | '{' expr '}' { $$ = $2; } + | simple_variable { $$ = Expr\Variable[$1]; } + | error { $$ = Expr\Error[]; $this->errorState = 2; } +; + +list_expr: + T_LIST '(' list_expr_elements ')' { $$ = Expr\List_[$3]; } +; + +list_expr_elements: + list_expr_elements ',' list_expr_element { push($1, $3); } + | list_expr_element { init($1); } +; + +list_expr_element: + variable { $$ = Expr\ArrayItem[$1, null, false]; } + | list_expr { $$ = Expr\ArrayItem[$1, null, false]; } + | expr T_DOUBLE_ARROW variable { $$ = Expr\ArrayItem[$3, $1, false]; } + | expr T_DOUBLE_ARROW list_expr { $$ = Expr\ArrayItem[$3, $1, false]; } + | /* empty */ { $$ = null; } +; + +array_pair_list: + inner_array_pair_list + { $$ = $1; $end = count($$)-1; if ($$[$end] === null) unset($$[$end]); } +; + +inner_array_pair_list: + inner_array_pair_list ',' array_pair { push($1, $3); } + | array_pair { init($1); } +; + +array_pair: + expr T_DOUBLE_ARROW expr { $$ = Expr\ArrayItem[$3, $1, false]; } + | expr { $$ = Expr\ArrayItem[$1, null, false]; } + | expr T_DOUBLE_ARROW '&' variable { $$ = Expr\ArrayItem[$4, $1, true]; } + | '&' variable { $$ = Expr\ArrayItem[$2, null, true]; } + | /* empty */ { $$ = null; } +; + +encaps_list: + encaps_list encaps_var { push($1, $2); } + | encaps_list encaps_string_part { push($1, $2); } + | encaps_var { init($1); } + | encaps_string_part encaps_var { init($1, $2); } +; + +encaps_string_part: + T_ENCAPSED_AND_WHITESPACE { $$ = Scalar\EncapsedStringPart[$1]; } +; + +encaps_base_var: + T_VARIABLE { $$ = Expr\Variable[parseVar($1)]; } +; + +encaps_var: + encaps_base_var { $$ = $1; } + | encaps_base_var '[' encaps_var_offset ']' { $$ = Expr\ArrayDimFetch[$1, $3]; } + | encaps_base_var T_OBJECT_OPERATOR T_STRING { $$ = Expr\PropertyFetch[$1, $3]; } + | T_DOLLAR_OPEN_CURLY_BRACES expr '}' { $$ = Expr\Variable[$2]; } + | T_DOLLAR_OPEN_CURLY_BRACES T_STRING_VARNAME '}' { $$ = Expr\Variable[$2]; } + | T_DOLLAR_OPEN_CURLY_BRACES T_STRING_VARNAME '[' expr ']' '}' + { $$ = Expr\ArrayDimFetch[Expr\Variable[$2], $4]; } + | T_CURLY_OPEN variable '}' { $$ = $2; } +; + +encaps_var_offset: + T_STRING { $$ = Scalar\String_[$1]; } + | T_NUM_STRING { $$ = $this->parseNumString($1, attributes()); } + | '-' T_NUM_STRING { $$ = $this->parseNumString('-' . $2, attributes()); } + | T_VARIABLE { $$ = Expr\Variable[parseVar($1)]; } +; + +%% diff --git a/vendor/nikic/php-parser/grammar/rebuildParsers.php b/vendor/nikic/php-parser/grammar/rebuildParsers.php new file mode 100644 index 0000000..0959981 --- /dev/null +++ b/vendor/nikic/php-parser/grammar/rebuildParsers.php @@ -0,0 +1,263 @@ + 'Php5', + __DIR__ . '/php7.y' => 'Php7', +]; + +$tokensFile = __DIR__ . '/tokens.y'; +$tokensTemplate = __DIR__ . '/tokens.template'; +$skeletonFile = __DIR__ . '/parser.template'; +$tmpGrammarFile = __DIR__ . '/tmp_parser.phpy'; +$tmpResultFile = __DIR__ . '/tmp_parser.php'; +$resultDir = __DIR__ . '/../lib/PhpParser/Parser'; +$tokensResultsFile = $resultDir . '/Tokens.php'; + +// check for kmyacc.exe binary in this directory, otherwise fall back to global name +$kmyacc = __DIR__ . '/kmyacc.exe'; +if (!file_exists($kmyacc)) { + $kmyacc = 'kmyacc'; +} + +$options = array_flip($argv); +$optionDebug = isset($options['--debug']); +$optionKeepTmpGrammar = isset($options['--keep-tmp-grammar']); + +/////////////////////////////// +/// Utility regex constants /// +/////////////////////////////// + +const LIB = '(?(DEFINE) + (?\'[^\\\\\']*+(?:\\\\.[^\\\\\']*+)*+\') + (?"[^\\\\"]*+(?:\\\\.[^\\\\"]*+)*+") + (?(?&singleQuotedString)|(?&doubleQuotedString)) + (?/\*[^*]*+(?:\*(?!/)[^*]*+)*+\*/) + (?\{[^\'"/{}]*+(?:(?:(?&string)|(?&comment)|(?&code)|/)[^\'"/{}]*+)*+}) +)'; + +const PARAMS = '\[(?[^[\]]*+(?:\[(?¶ms)\][^[\]]*+)*+)\]'; +const ARGS = '\((?[^()]*+(?:\((?&args)\)[^()]*+)*+)\)'; + +/////////////////// +/// Main script /// +/////////////////// + +$tokens = file_get_contents($tokensFile); + +foreach ($grammarFileToName as $grammarFile => $name) { + echo "Building temporary $name grammar file.\n"; + + $grammarCode = file_get_contents($grammarFile); + $grammarCode = str_replace('%tokens', $tokens, $grammarCode); + + $grammarCode = resolveNodes($grammarCode); + $grammarCode = resolveMacros($grammarCode); + $grammarCode = resolveStackAccess($grammarCode); + + file_put_contents($tmpGrammarFile, $grammarCode); + + $additionalArgs = $optionDebug ? '-t -v' : ''; + + echo "Building $name parser.\n"; + $output = trim(shell_exec("$kmyacc $additionalArgs -l -m $skeletonFile -p $name $tmpGrammarFile 2>&1")); + echo "Output: \"$output\"\n"; + + $resultCode = file_get_contents($tmpResultFile); + $resultCode = removeTrailingWhitespace($resultCode); + + ensureDirExists($resultDir); + file_put_contents("$resultDir/$name.php", $resultCode); + unlink($tmpResultFile); + + echo "Building token definition.\n"; + $output = trim(shell_exec("$kmyacc -l -m $tokensTemplate $tmpGrammarFile 2>&1")); + assert($output === ''); + rename($tmpResultFile, $tokensResultsFile); + + if (!$optionKeepTmpGrammar) { + unlink($tmpGrammarFile); + } +} + +/////////////////////////////// +/// Preprocessing functions /// +/////////////////////////////// + +function resolveNodes($code) { + return preg_replace_callback( + '~\b(?[A-Z][a-zA-Z_\\\\]++)\s*' . PARAMS . '~', + function($matches) { + // recurse + $matches['params'] = resolveNodes($matches['params']); + + $params = magicSplit( + '(?:' . PARAMS . '|' . ARGS . ')(*SKIP)(*FAIL)|,', + $matches['params'] + ); + + $paramCode = ''; + foreach ($params as $param) { + $paramCode .= $param . ', '; + } + + return 'new ' . $matches['name'] . '(' . $paramCode . 'attributes())'; + }, + $code + ); +} + +function resolveMacros($code) { + return preg_replace_callback( + '~\b(?)(?!array\()(?[a-z][A-Za-z]++)' . ARGS . '~', + function($matches) { + // recurse + $matches['args'] = resolveMacros($matches['args']); + + $name = $matches['name']; + $args = magicSplit( + '(?:' . PARAMS . '|' . ARGS . ')(*SKIP)(*FAIL)|,', + $matches['args'] + ); + + if ('attributes' == $name) { + assertArgs(0, $args, $name); + return '$this->startAttributeStack[#1] + $this->endAttributes'; + } + + if ('stackAttributes' == $name) { + assertArgs(1, $args, $name); + return '$this->startAttributeStack[' . $args[0] . ']' + . ' + $this->endAttributeStack[' . $args[0] . ']'; + } + + if ('init' == $name) { + return '$$ = array(' . implode(', ', $args) . ')'; + } + + if ('push' == $name) { + assertArgs(2, $args, $name); + + return $args[0] . '[] = ' . $args[1] . '; $$ = ' . $args[0]; + } + + if ('pushNormalizing' == $name) { + assertArgs(2, $args, $name); + + return 'if (is_array(' . $args[1] . ')) { $$ = array_merge(' . $args[0] . ', ' . $args[1] . '); }' + . ' else { ' . $args[0] . '[] = ' . $args[1] . '; $$ = ' . $args[0] . '; }'; + } + + if ('toArray' == $name) { + assertArgs(1, $args, $name); + + return 'is_array(' . $args[0] . ') ? ' . $args[0] . ' : array(' . $args[0] . ')'; + } + + if ('parseVar' == $name) { + assertArgs(1, $args, $name); + + return 'substr(' . $args[0] . ', 1)'; + } + + if ('parseEncapsed' == $name) { + assertArgs(3, $args, $name); + + return 'foreach (' . $args[0] . ' as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) {' + . ' $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, ' . $args[1] . ', ' . $args[2] . '); } }'; + } + + if ('parseEncapsedDoc' == $name) { + assertArgs(2, $args, $name); + + return 'foreach (' . $args[0] . ' as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) {' + . ' $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, null, ' . $args[1] . '); } }' + . ' $s->value = preg_replace(\'~(\r\n|\n|\r)\z~\', \'\', $s->value);' + . ' if (\'\' === $s->value) array_pop(' . $args[0] . ');'; + } + + if ('makeNop' == $name) { + assertArgs(2, $args, $name); + + return '$startAttributes = ' . $args[1] . ';' + . ' if (isset($startAttributes[\'comments\']))' + . ' { ' . $args[0] . ' = new Stmt\Nop([\'comments\' => $startAttributes[\'comments\']]); }' + . ' else { ' . $args[0] . ' = null; }'; + } + + if ('strKind' == $name) { + assertArgs(1, $args, $name); + + return '(' . $args[0] . '[0] === "\'" || (' . $args[0] . '[1] === "\'" && ' + . '(' . $args[0] . '[0] === \'b\' || ' . $args[0] . '[0] === \'B\')) ' + . '? Scalar\String_::KIND_SINGLE_QUOTED : Scalar\String_::KIND_DOUBLE_QUOTED)'; + } + + if ('setDocStringAttrs' == $name) { + assertArgs(2, $args, $name); + + return $args[0] . '[\'kind\'] = strpos(' . $args[1] . ', "\'") === false ' + . '? Scalar\String_::KIND_HEREDOC : Scalar\String_::KIND_NOWDOC; ' + . 'preg_match(\'/\A[bB]?<<<[ \t]*[\\\'"]?([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)[\\\'"]?(?:\r\n|\n|\r)\z/\', ' . $args[1] . ', $matches); ' + . $args[0] . '[\'docLabel\'] = $matches[1];'; + } + + if ('prependLeadingComments' == $name) { + assertArgs(1, $args, $name); + + return '$attrs = $this->startAttributeStack[#1]; $stmts = ' . $args[0] . '; ' + . 'if (!empty($attrs[\'comments\']) && isset($stmts[0])) {' + . '$stmts[0]->setAttribute(\'comments\', ' + . 'array_merge($attrs[\'comments\'], $stmts[0]->getAttribute(\'comments\', []))); }'; + } + + return $matches[0]; + }, + $code + ); +} + +function assertArgs($num, $args, $name) { + if ($num != count($args)) { + die('Wrong argument count for ' . $name . '().'); + } +} + +function resolveStackAccess($code) { + $code = preg_replace('/\$\d+/', '$this->semStack[$0]', $code); + $code = preg_replace('/#(\d+)/', '$$1', $code); + return $code; +} + +function removeTrailingWhitespace($code) { + $lines = explode("\n", $code); + $lines = array_map('rtrim', $lines); + return implode("\n", $lines); +} + +function ensureDirExists($dir) { + if (!is_dir($dir)) { + mkdir($dir, 0777, true); + } +} + +////////////////////////////// +/// Regex helper functions /// +////////////////////////////// + +function regex($regex) { + return '~' . LIB . '(?:' . str_replace('~', '\~', $regex) . ')~'; +} + +function magicSplit($regex, $string) { + $pieces = preg_split(regex('(?:(?&string)|(?&comment)|(?&code))(*SKIP)(*FAIL)|' . $regex), $string); + + foreach ($pieces as &$piece) { + $piece = trim($piece); + } + + if ($pieces === ['']) { + return []; + } + + return $pieces; +} diff --git a/vendor/nikic/php-parser/grammar/tokens.template b/vendor/nikic/php-parser/grammar/tokens.template new file mode 100644 index 0000000..ba4e490 --- /dev/null +++ b/vendor/nikic/php-parser/grammar/tokens.template @@ -0,0 +1,17 @@ +semValue +#semval($,%t) $this->semValue +#semval(%n) $this->stackPos-(%l-%n) +#semval(%n,%t) $this->stackPos-(%l-%n) + +namespace PhpParser\Parser; +#include; + +/* GENERATED file based on grammar/tokens.y */ +final class Tokens +{ +#tokenval + const %s = %n; +#endtokenval +} diff --git a/vendor/nikic/php-parser/grammar/tokens.y b/vendor/nikic/php-parser/grammar/tokens.y new file mode 100644 index 0000000..2b54f80 --- /dev/null +++ b/vendor/nikic/php-parser/grammar/tokens.y @@ -0,0 +1,113 @@ +/* We currently rely on the token ID mapping to be the same between PHP 5 and PHP 7 - so the same lexer can be used for + * both. This is enforced by sharing this token file. */ + +%left T_INCLUDE T_INCLUDE_ONCE T_EVAL T_REQUIRE T_REQUIRE_ONCE +%left ',' +%left T_LOGICAL_OR +%left T_LOGICAL_XOR +%left T_LOGICAL_AND +%right T_PRINT +%right T_YIELD +%right T_DOUBLE_ARROW +%right T_YIELD_FROM +%left '=' T_PLUS_EQUAL T_MINUS_EQUAL T_MUL_EQUAL T_DIV_EQUAL T_CONCAT_EQUAL T_MOD_EQUAL T_AND_EQUAL T_OR_EQUAL T_XOR_EQUAL T_SL_EQUAL T_SR_EQUAL T_POW_EQUAL +%left '?' ':' +%right T_COALESCE +%left T_BOOLEAN_OR +%left T_BOOLEAN_AND +%left '|' +%left '^' +%left '&' +%nonassoc T_IS_EQUAL T_IS_NOT_EQUAL T_IS_IDENTICAL T_IS_NOT_IDENTICAL T_SPACESHIP +%nonassoc '<' T_IS_SMALLER_OR_EQUAL '>' T_IS_GREATER_OR_EQUAL +%left T_SL T_SR +%left '+' '-' '.' +%left '*' '/' '%' +%right '!' +%nonassoc T_INSTANCEOF +%right '~' T_INC T_DEC T_INT_CAST T_DOUBLE_CAST T_STRING_CAST T_ARRAY_CAST T_OBJECT_CAST T_BOOL_CAST T_UNSET_CAST '@' +%right T_POW +%right '[' +%nonassoc T_NEW T_CLONE +%token T_EXIT +%token T_IF +%left T_ELSEIF +%left T_ELSE +%left T_ENDIF +%token T_LNUMBER +%token T_DNUMBER +%token T_STRING +%token T_STRING_VARNAME +%token T_VARIABLE +%token T_NUM_STRING +%token T_INLINE_HTML +%token T_CHARACTER +%token T_BAD_CHARACTER +%token T_ENCAPSED_AND_WHITESPACE +%token T_CONSTANT_ENCAPSED_STRING +%token T_ECHO +%token T_DO +%token T_WHILE +%token T_ENDWHILE +%token T_FOR +%token T_ENDFOR +%token T_FOREACH +%token T_ENDFOREACH +%token T_DECLARE +%token T_ENDDECLARE +%token T_AS +%token T_SWITCH +%token T_ENDSWITCH +%token T_CASE +%token T_DEFAULT +%token T_BREAK +%token T_CONTINUE +%token T_GOTO +%token T_FUNCTION +%token T_CONST +%token T_RETURN +%token T_TRY +%token T_CATCH +%token T_FINALLY +%token T_THROW +%token T_USE +%token T_INSTEADOF +%token T_GLOBAL +%right T_STATIC T_ABSTRACT T_FINAL T_PRIVATE T_PROTECTED T_PUBLIC +%token T_VAR +%token T_UNSET +%token T_ISSET +%token T_EMPTY +%token T_HALT_COMPILER +%token T_CLASS +%token T_TRAIT +%token T_INTERFACE +%token T_EXTENDS +%token T_IMPLEMENTS +%token T_OBJECT_OPERATOR +%token T_DOUBLE_ARROW +%token T_LIST +%token T_ARRAY +%token T_CALLABLE +%token T_CLASS_C +%token T_TRAIT_C +%token T_METHOD_C +%token T_FUNC_C +%token T_LINE +%token T_FILE +%token T_COMMENT +%token T_DOC_COMMENT +%token T_OPEN_TAG +%token T_OPEN_TAG_WITH_ECHO +%token T_CLOSE_TAG +%token T_WHITESPACE +%token T_START_HEREDOC +%token T_END_HEREDOC +%token T_DOLLAR_OPEN_CURLY_BRACES +%token T_CURLY_OPEN +%token T_PAAMAYIM_NEKUDOTAYIM +%token T_NAMESPACE +%token T_NS_C +%token T_DIR +%token T_NS_SEPARATOR +%token T_ELLIPSIS diff --git a/vendor/nikic/php-parser/lib/PhpParser/Autoloader.php b/vendor/nikic/php-parser/lib/PhpParser/Autoloader.php new file mode 100644 index 0000000..809a06e --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Autoloader.php @@ -0,0 +1,40 @@ +name = $name; + } + + /** + * Extends a class. + * + * @param Name|string $class Name of class to extend + * + * @return $this The builder instance (for fluid interface) + */ + public function extend($class) { + $this->extends = $this->normalizeName($class); + + return $this; + } + + /** + * Implements one or more interfaces. + * + * @param Name|string ...$interfaces Names of interfaces to implement + * + * @return $this The builder instance (for fluid interface) + */ + public function implement() { + foreach (func_get_args() as $interface) { + $this->implements[] = $this->normalizeName($interface); + } + + return $this; + } + + /** + * Makes the class abstract. + * + * @return $this The builder instance (for fluid interface) + */ + public function makeAbstract() { + $this->setModifier(Stmt\Class_::MODIFIER_ABSTRACT); + + return $this; + } + + /** + * Makes the class final. + * + * @return $this The builder instance (for fluid interface) + */ + public function makeFinal() { + $this->setModifier(Stmt\Class_::MODIFIER_FINAL); + + return $this; + } + + /** + * Adds a statement. + * + * @param Stmt|PhpParser\Builder $stmt The statement to add + * + * @return $this The builder instance (for fluid interface) + */ + public function addStmt($stmt) { + $stmt = $this->normalizeNode($stmt); + + $targets = array( + 'Stmt_TraitUse' => &$this->uses, + 'Stmt_ClassConst' => &$this->constants, + 'Stmt_Property' => &$this->properties, + 'Stmt_ClassMethod' => &$this->methods, + ); + + $type = $stmt->getType(); + if (!isset($targets[$type])) { + throw new \LogicException(sprintf('Unexpected node of type "%s"', $type)); + } + + $targets[$type][] = $stmt; + + return $this; + } + + /** + * Returns the built class node. + * + * @return Stmt\Class_ The built class node + */ + public function getNode() { + return new Stmt\Class_($this->name, array( + 'flags' => $this->flags, + 'extends' => $this->extends, + 'implements' => $this->implements, + 'stmts' => array_merge($this->uses, $this->constants, $this->properties, $this->methods), + ), $this->attributes); + } +} \ No newline at end of file diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Declaration.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Declaration.php new file mode 100644 index 0000000..30a1937 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Declaration.php @@ -0,0 +1,42 @@ +addStmt($stmt); + } + + return $this; + } + + /** + * Sets doc comment for the declaration. + * + * @param PhpParser\Comment\Doc|string $docComment Doc comment to set + * + * @return $this The builder instance (for fluid interface) + */ + public function setDocComment($docComment) { + $this->attributes['comments'] = array( + $this->normalizeDocComment($docComment) + ); + + return $this; + } +} \ No newline at end of file diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php new file mode 100644 index 0000000..28a2ea6 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php @@ -0,0 +1,75 @@ +returnByRef = true; + + return $this; + } + + /** + * Adds a parameter. + * + * @param Node\Param|Param $param The parameter to add + * + * @return $this The builder instance (for fluid interface) + */ + public function addParam($param) { + $param = $this->normalizeNode($param); + + if (!$param instanceof Node\Param) { + throw new \LogicException(sprintf('Expected parameter node, got "%s"', $param->getType())); + } + + $this->params[] = $param; + + return $this; + } + + /** + * Adds multiple parameters. + * + * @param array $params The parameters to add + * + * @return $this The builder instance (for fluid interface) + */ + public function addParams(array $params) { + foreach ($params as $param) { + $this->addParam($param); + } + + return $this; + } + + /** + * Sets the return type for PHP 7. + * + * @param string|Node\Name|Node\NullableType $type One of array, callable, string, int, float, bool, iterable, + * or a class/interface name. + * + * @return $this The builder instance (for fluid interface) + */ + public function setReturnType($type) + { + $this->returnType = $this->normalizeType($type); + + return $this; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Function_.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Function_.php new file mode 100644 index 0000000..228bdfa --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Function_.php @@ -0,0 +1,49 @@ +name = $name; + } + + /** + * Adds a statement. + * + * @param Node|PhpParser\Builder $stmt The statement to add + * + * @return $this The builder instance (for fluid interface) + */ + public function addStmt($stmt) { + $this->stmts[] = $this->normalizeNode($stmt); + + return $this; + } + + /** + * Returns the built function node. + * + * @return Stmt\Function_ The built function node + */ + public function getNode() { + return new Stmt\Function_($this->name, array( + 'byRef' => $this->returnByRef, + 'params' => $this->params, + 'returnType' => $this->returnType, + 'stmts' => $this->stmts, + ), $this->attributes); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Interface_.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Interface_.php new file mode 100644 index 0000000..8ebb292 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Interface_.php @@ -0,0 +1,80 @@ +name = $name; + } + + /** + * Extends one or more interfaces. + * + * @param Name|string ...$interfaces Names of interfaces to extend + * + * @return $this The builder instance (for fluid interface) + */ + public function extend() { + foreach (func_get_args() as $interface) { + $this->extends[] = $this->normalizeName($interface); + } + + return $this; + } + + /** + * Adds a statement. + * + * @param Stmt|PhpParser\Builder $stmt The statement to add + * + * @return $this The builder instance (for fluid interface) + */ + public function addStmt($stmt) { + $stmt = $this->normalizeNode($stmt); + + $type = $stmt->getType(); + switch ($type) { + case 'Stmt_ClassConst': + $this->constants[] = $stmt; + break; + + case 'Stmt_ClassMethod': + // we erase all statements in the body of an interface method + $stmt->stmts = null; + $this->methods[] = $stmt; + break; + + default: + throw new \LogicException(sprintf('Unexpected node of type "%s"', $type)); + } + + return $this; + } + + /** + * Returns the built interface node. + * + * @return Stmt\Interface_ The built interface node + */ + public function getNode() { + return new Stmt\Interface_($this->name, array( + 'extends' => $this->extends, + 'stmts' => array_merge($this->constants, $this->methods), + ), $this->attributes); + } +} \ No newline at end of file diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Method.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Method.php new file mode 100644 index 0000000..1ed75ee --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Method.php @@ -0,0 +1,128 @@ +name = $name; + } + + /** + * Makes the method public. + * + * @return $this The builder instance (for fluid interface) + */ + public function makePublic() { + $this->setModifier(Stmt\Class_::MODIFIER_PUBLIC); + + return $this; + } + + /** + * Makes the method protected. + * + * @return $this The builder instance (for fluid interface) + */ + public function makeProtected() { + $this->setModifier(Stmt\Class_::MODIFIER_PROTECTED); + + return $this; + } + + /** + * Makes the method private. + * + * @return $this The builder instance (for fluid interface) + */ + public function makePrivate() { + $this->setModifier(Stmt\Class_::MODIFIER_PRIVATE); + + return $this; + } + + /** + * Makes the method static. + * + * @return $this The builder instance (for fluid interface) + */ + public function makeStatic() { + $this->setModifier(Stmt\Class_::MODIFIER_STATIC); + + return $this; + } + + /** + * Makes the method abstract. + * + * @return $this The builder instance (for fluid interface) + */ + public function makeAbstract() { + if (!empty($this->stmts)) { + throw new \LogicException('Cannot make method with statements abstract'); + } + + $this->setModifier(Stmt\Class_::MODIFIER_ABSTRACT); + $this->stmts = null; // abstract methods don't have statements + + return $this; + } + + /** + * Makes the method final. + * + * @return $this The builder instance (for fluid interface) + */ + public function makeFinal() { + $this->setModifier(Stmt\Class_::MODIFIER_FINAL); + + return $this; + } + + /** + * Adds a statement. + * + * @param Node|PhpParser\Builder $stmt The statement to add + * + * @return $this The builder instance (for fluid interface) + */ + public function addStmt($stmt) { + if (null === $this->stmts) { + throw new \LogicException('Cannot add statements to an abstract method'); + } + + $this->stmts[] = $this->normalizeNode($stmt); + + return $this; + } + + /** + * Returns the built method node. + * + * @return Stmt\ClassMethod The built method node + */ + public function getNode() { + return new Stmt\ClassMethod($this->name, array( + 'flags' => $this->flags, + 'byRef' => $this->returnByRef, + 'params' => $this->params, + 'returnType' => $this->returnType, + 'stmts' => $this->stmts, + ), $this->attributes); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Namespace_.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Namespace_.php new file mode 100644 index 0000000..432fcc7 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Namespace_.php @@ -0,0 +1,59 @@ +name = null !== $name ? $this->normalizeName($name) : null; + } + + /** + * Adds a statement. + * + * @param Node|PhpParser\Builder $stmt The statement to add + * + * @return $this The builder instance (for fluid interface) + */ + public function addStmt($stmt) { + $this->stmts[] = $this->normalizeNode($stmt); + + return $this; + } + + /** + * Adds multiple statements. + * + * @param array $stmts The statements to add + * + * @return $this The builder instance (for fluid interface) + */ + public function addStmts(array $stmts) { + foreach ($stmts as $stmt) { + $this->addStmt($stmt); + } + + return $this; + } + + /** + * Returns the built node. + * + * @return Node The built node + */ + public function getNode() { + return new Stmt\Namespace_($this->name, $this->stmts); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Param.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Param.php new file mode 100644 index 0000000..3e6e0f7 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Param.php @@ -0,0 +1,78 @@ +name = $name; + } + + /** + * Sets default value for the parameter. + * + * @param mixed $value Default value to use + * + * @return $this The builder instance (for fluid interface) + */ + public function setDefault($value) { + $this->default = $this->normalizeValue($value); + + return $this; + } + + /** + * Sets type hint for the parameter. + * + * @param string|Node\Name|Node\NullableType $type Type hint to use + * + * @return $this The builder instance (for fluid interface) + */ + public function setTypeHint($type) { + $this->type = $this->normalizeType($type); + if ($this->type === 'void') { + throw new \LogicException('Parameter type cannot be void'); + } + + return $this; + } + + /** + * Make the parameter accept the value by reference. + * + * @return $this The builder instance (for fluid interface) + */ + public function makeByRef() { + $this->byRef = true; + + return $this; + } + + /** + * Returns the built parameter node. + * + * @return Node\Param The built parameter node + */ + public function getNode() { + return new Node\Param( + $this->name, $this->default, $this->type, $this->byRef + ); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Property.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Property.php new file mode 100644 index 0000000..053c851 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Property.php @@ -0,0 +1,111 @@ +name = $name; + } + + /** + * Makes the property public. + * + * @return $this The builder instance (for fluid interface) + */ + public function makePublic() { + $this->setModifier(Stmt\Class_::MODIFIER_PUBLIC); + + return $this; + } + + /** + * Makes the property protected. + * + * @return $this The builder instance (for fluid interface) + */ + public function makeProtected() { + $this->setModifier(Stmt\Class_::MODIFIER_PROTECTED); + + return $this; + } + + /** + * Makes the property private. + * + * @return $this The builder instance (for fluid interface) + */ + public function makePrivate() { + $this->setModifier(Stmt\Class_::MODIFIER_PRIVATE); + + return $this; + } + + /** + * Makes the property static. + * + * @return $this The builder instance (for fluid interface) + */ + public function makeStatic() { + $this->setModifier(Stmt\Class_::MODIFIER_STATIC); + + return $this; + } + + /** + * Sets default value for the property. + * + * @param mixed $value Default value to use + * + * @return $this The builder instance (for fluid interface) + */ + public function setDefault($value) { + $this->default = $this->normalizeValue($value); + + return $this; + } + + /** + * Sets doc comment for the property. + * + * @param PhpParser\Comment\Doc|string $docComment Doc comment to set + * + * @return $this The builder instance (for fluid interface) + */ + public function setDocComment($docComment) { + $this->attributes = array( + 'comments' => array($this->normalizeDocComment($docComment)) + ); + + return $this; + } + + /** + * Returns the built class node. + * + * @return Stmt\Property The built property node + */ + public function getNode() { + return new Stmt\Property( + $this->flags !== 0 ? $this->flags : Stmt\Class_::MODIFIER_PUBLIC, + array( + new Stmt\PropertyProperty($this->name, $this->default) + ), + $this->attributes + ); + } +} \ No newline at end of file diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Trait_.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Trait_.php new file mode 100644 index 0000000..153437d --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Trait_.php @@ -0,0 +1,56 @@ +name = $name; + } + + /** + * Adds a statement. + * + * @param Stmt|PhpParser\Builder $stmt The statement to add + * + * @return $this The builder instance (for fluid interface) + */ + public function addStmt($stmt) { + $stmt = $this->normalizeNode($stmt); + + if ($stmt instanceof Stmt\Property) { + $this->properties[] = $stmt; + } else if ($stmt instanceof Stmt\ClassMethod) { + $this->methods[] = $stmt; + } else { + throw new \LogicException(sprintf('Unexpected node of type "%s"', $stmt->getType())); + } + + return $this; + } + + /** + * Returns the built trait node. + * + * @return Stmt\Trait_ The built interface node + */ + public function getNode() { + return new Stmt\Trait_( + $this->name, array( + 'stmts' => array_merge($this->properties, $this->methods) + ), $this->attributes + ); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Use_.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Use_.php new file mode 100644 index 0000000..f6d3a85 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Use_.php @@ -0,0 +1,58 @@ +name = $this->normalizeName($name); + $this->type = $type; + } + + /** + * Sets alias for used name. + * + * @param string $alias Alias to use (last component of full name by default) + * + * @return $this The builder instance (for fluid interface) + */ + protected function as_($alias) { + $this->alias = $alias; + return $this; + } + public function __call($name, $args) { + if (method_exists($this, $name . '_')) { + return call_user_func_array(array($this, $name . '_'), $args); + } + + throw new \LogicException(sprintf('Method "%s" does not exist', $name)); + } + + /** + * Returns the built node. + * + * @return Node The built node + */ + public function getNode() { + $alias = null !== $this->alias ? $this->alias : $this->name->getLast(); + return new Stmt\Use_(array( + new Stmt\UseUse($this->name, $alias) + ), $this->type); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/BuilderAbstract.php b/vendor/nikic/php-parser/lib/PhpParser/BuilderAbstract.php new file mode 100644 index 0000000..1e0dc48 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/BuilderAbstract.php @@ -0,0 +1,175 @@ +getNode(); + } elseif ($node instanceof Node) { + return $node; + } + + throw new \LogicException('Expected node or builder object'); + } + + /** + * Normalizes a name: Converts plain string names to PhpParser\Node\Name. + * + * @param Name|string $name The name to normalize + * + * @return Name The normalized name + */ + protected function normalizeName($name) { + if ($name instanceof Name) { + return $name; + } elseif (is_string($name)) { + if (!$name) { + throw new \LogicException('Name cannot be empty'); + } + + if ($name[0] == '\\') { + return new Name\FullyQualified(substr($name, 1)); + } elseif (0 === strpos($name, 'namespace\\')) { + return new Name\Relative(substr($name, strlen('namespace\\'))); + } else { + return new Name($name); + } + } + + throw new \LogicException('Name must be a string or an instance of PhpParser\Node\Name'); + } + + /** + * Normalizes a type: Converts plain-text type names into proper AST representation. + * + * In particular, builtin types are left as strings, custom types become Names and nullables + * are wrapped in NullableType nodes. + * + * @param Name|string|NullableType $type The type to normalize + * + * @return Name|string|NullableType The normalized type + */ + protected function normalizeType($type) { + if (!is_string($type)) { + if (!$type instanceof Name && !$type instanceof NullableType) { + throw new \LogicException( + 'Type must be a string, or an instance of Name or NullableType'); + } + return $type; + } + + $nullable = false; + if (strlen($type) > 0 && $type[0] === '?') { + $nullable = true; + $type = substr($type, 1); + } + + $builtinTypes = array( + 'array', 'callable', 'string', 'int', 'float', 'bool', 'iterable', 'void' + ); + + $lowerType = strtolower($type); + if (in_array($lowerType, $builtinTypes)) { + $type = $lowerType; + } else { + $type = $this->normalizeName($type); + } + + if ($nullable && $type === 'void') { + throw new \LogicException('void type cannot be nullable'); + } + + return $nullable ? new Node\NullableType($type) : $type; + } + + /** + * Normalizes a value: Converts nulls, booleans, integers, + * floats, strings and arrays into their respective nodes + * + * @param mixed $value The value to normalize + * + * @return Expr The normalized value + */ + protected function normalizeValue($value) { + if ($value instanceof Node) { + return $value; + } elseif (is_null($value)) { + return new Expr\ConstFetch( + new Name('null') + ); + } elseif (is_bool($value)) { + return new Expr\ConstFetch( + new Name($value ? 'true' : 'false') + ); + } elseif (is_int($value)) { + return new Scalar\LNumber($value); + } elseif (is_float($value)) { + return new Scalar\DNumber($value); + } elseif (is_string($value)) { + return new Scalar\String_($value); + } elseif (is_array($value)) { + $items = array(); + $lastKey = -1; + foreach ($value as $itemKey => $itemValue) { + // for consecutive, numeric keys don't generate keys + if (null !== $lastKey && ++$lastKey === $itemKey) { + $items[] = new Expr\ArrayItem( + $this->normalizeValue($itemValue) + ); + } else { + $lastKey = null; + $items[] = new Expr\ArrayItem( + $this->normalizeValue($itemValue), + $this->normalizeValue($itemKey) + ); + } + } + + return new Expr\Array_($items); + } else { + throw new \LogicException('Invalid value'); + } + } + + /** + * Normalizes a doc comment: Converts plain strings to PhpParser\Comment\Doc. + * + * @param Comment\Doc|string $docComment The doc comment to normalize + * + * @return Comment\Doc The normalized doc comment + */ + protected function normalizeDocComment($docComment) { + if ($docComment instanceof Comment\Doc) { + return $docComment; + } else if (is_string($docComment)) { + return new Comment\Doc($docComment); + } else { + throw new \LogicException('Doc comment must be a string or an instance of PhpParser\Comment\Doc'); + } + } + + /** + * Sets a modifier in the $this->type property. + * + * @param int $modifier Modifier to set + */ + protected function setModifier($modifier) { + Stmt\Class_::verifyModifier($this->flags, $modifier); + $this->flags |= $modifier; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/BuilderFactory.php b/vendor/nikic/php-parser/lib/PhpParser/BuilderFactory.php new file mode 100644 index 0000000..42c7f61 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/BuilderFactory.php @@ -0,0 +1,127 @@ +text = $text; + $this->line = $startLine; + $this->filePos = $startFilePos; + } + + /** + * Gets the comment text. + * + * @return string The comment text (including comment delimiters like /*) + */ + public function getText() { + return $this->text; + } + + /** + * Gets the line number the comment started on. + * + * @return int Line number + */ + public function getLine() { + return $this->line; + } + + /** + * Gets the file offset the comment started on. + * + * @return int File offset + */ + public function getFilePos() { + return $this->filePos; + } + + /** + * Gets the comment text. + * + * @return string The comment text (including comment delimiters like /*) + */ + public function __toString() { + return $this->text; + } + + /** + * Gets the reformatted comment text. + * + * "Reformatted" here means that we try to clean up the whitespace at the + * starts of the lines. This is necessary because we receive the comments + * without trailing whitespace on the first line, but with trailing whitespace + * on all subsequent lines. + * + * @return mixed|string + */ + public function getReformattedText() { + $text = trim($this->text); + $newlinePos = strpos($text, "\n"); + if (false === $newlinePos) { + // Single line comments don't need further processing + return $text; + } elseif (preg_match('((*BSR_ANYCRLF)(*ANYCRLF)^.*(?:\R\s+\*.*)+$)', $text)) { + // Multi line comment of the type + // + // /* + // * Some text. + // * Some more text. + // */ + // + // is handled by replacing the whitespace sequences before the * by a single space + return preg_replace('(^\s+\*)m', ' *', $this->text); + } elseif (preg_match('(^/\*\*?\s*[\r\n])', $text) && preg_match('(\n(\s*)\*/$)', $text, $matches)) { + // Multi line comment of the type + // + // /* + // Some text. + // Some more text. + // */ + // + // is handled by removing the whitespace sequence on the line before the closing + // */ on all lines. So if the last line is " */", then " " is removed at the + // start of all lines. + return preg_replace('(^' . preg_quote($matches[1]) . ')m', '', $text); + } elseif (preg_match('(^/\*\*?\s*(?!\s))', $text, $matches)) { + // Multi line comment of the type + // + // /* Some text. + // Some more text. + // Indented text. + // Even more text. */ + // + // is handled by removing the difference between the shortest whitespace prefix on all + // lines and the length of the "/* " opening sequence. + $prefixLen = $this->getShortestWhitespacePrefixLen(substr($text, $newlinePos + 1)); + $removeLen = $prefixLen - strlen($matches[0]); + return preg_replace('(^\s{' . $removeLen . '})m', '', $text); + } + + // No idea how to format this comment, so simply return as is + return $text; + } + + private function getShortestWhitespacePrefixLen($str) { + $lines = explode("\n", $str); + $shortestPrefixLen = INF; + foreach ($lines as $line) { + preg_match('(^\s*)', $line, $matches); + $prefixLen = strlen($matches[0]); + if ($prefixLen < $shortestPrefixLen) { + $shortestPrefixLen = $prefixLen; + } + } + return $shortestPrefixLen; + } + + public function jsonSerialize() { + // Technically not a node, but we make it look like one anyway + $type = $this instanceof Comment\Doc ? 'Comment_Doc' : 'Comment'; + return [ + 'nodeType' => $type, + 'text' => $this->text, + 'line' => $this->line, + 'filePos' => $this->filePos, + ]; + } +} \ No newline at end of file diff --git a/vendor/nikic/php-parser/lib/PhpParser/Comment/Doc.php b/vendor/nikic/php-parser/lib/PhpParser/Comment/Doc.php new file mode 100644 index 0000000..24fc6c9 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Comment/Doc.php @@ -0,0 +1,7 @@ +rawMessage = (string) $message; + if (is_array($attributes)) { + $this->attributes = $attributes; + } else { + $this->attributes = array('startLine' => $attributes); + } + $this->updateMessage(); + } + + /** + * Gets the error message + * + * @return string Error message + */ + public function getRawMessage() { + return $this->rawMessage; + } + + /** + * Gets the line the error starts in. + * + * @return int Error start line + */ + public function getStartLine() { + return isset($this->attributes['startLine']) ? $this->attributes['startLine'] : -1; + } + + /** + * Gets the line the error ends in. + * + * @return int Error end line + */ + public function getEndLine() { + return isset($this->attributes['endLine']) ? $this->attributes['endLine'] : -1; + } + + + /** + * Gets the attributes of the node/token the error occurred at. + * + * @return array + */ + public function getAttributes() { + return $this->attributes; + } + + /** + * Sets the attributes of the node/token the error occured at. + * + * @param array $attributes + */ + public function setAttributes(array $attributes) { + $this->attributes = $attributes; + $this->updateMessage(); + } + + /** + * Sets the line of the PHP file the error occurred in. + * + * @param string $message Error message + */ + public function setRawMessage($message) { + $this->rawMessage = (string) $message; + $this->updateMessage(); + } + + /** + * Sets the line the error starts in. + * + * @param int $line Error start line + */ + public function setStartLine($line) { + $this->attributes['startLine'] = (int) $line; + $this->updateMessage(); + } + + /** + * Returns whether the error has start and end column information. + * + * For column information enable the startFilePos and endFilePos in the lexer options. + * + * @return bool + */ + public function hasColumnInfo() { + return isset($this->attributes['startFilePos']) && isset($this->attributes['endFilePos']); + } + + /** + * Gets the start column (1-based) into the line where the error started. + * + * @param string $code Source code of the file + * @return int + */ + public function getStartColumn($code) { + if (!$this->hasColumnInfo()) { + throw new \RuntimeException('Error does not have column information'); + } + + return $this->toColumn($code, $this->attributes['startFilePos']); + } + + /** + * Gets the end column (1-based) into the line where the error ended. + * + * @param string $code Source code of the file + * @return int + */ + public function getEndColumn($code) { + if (!$this->hasColumnInfo()) { + throw new \RuntimeException('Error does not have column information'); + } + + return $this->toColumn($code, $this->attributes['endFilePos']); + } + + public function getMessageWithColumnInfo($code) { + return sprintf( + '%s from %d:%d to %d:%d', $this->getRawMessage(), + $this->getStartLine(), $this->getStartColumn($code), + $this->getEndLine(), $this->getEndColumn($code) + ); + } + + private function toColumn($code, $pos) { + if ($pos > strlen($code)) { + throw new \RuntimeException('Invalid position information'); + } + + $lineStartPos = strrpos($code, "\n", $pos - strlen($code)); + if (false === $lineStartPos) { + $lineStartPos = -1; + } + + return $pos - $lineStartPos; + } + + /** + * Updates the exception message after a change to rawMessage or rawLine. + */ + protected function updateMessage() { + $this->message = $this->rawMessage; + + if (-1 === $this->getStartLine()) { + $this->message .= ' on unknown line'; + } else { + $this->message .= ' on line ' . $this->getStartLine(); + } + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler.php b/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler.php new file mode 100644 index 0000000..fa2c2f8 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler.php @@ -0,0 +1,13 @@ +errors[] = $error; + } + + /** + * Get collected errors. + * + * @return Error[] + */ + public function getErrors() { + return $this->errors; + } + + /** + * Check whether there are any errors. + * + * @return bool + */ + public function hasErrors() { + return !empty($this->errors); + } + + /** + * Reset/clear collected errors. + */ + public function clearErrors() { + $this->errors = []; + } +} \ No newline at end of file diff --git a/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler/Throwing.php b/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler/Throwing.php new file mode 100644 index 0000000..c5a76dd --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler/Throwing.php @@ -0,0 +1,18 @@ +tokenMap = $this->createTokenMap(); + + // map of tokens to drop while lexing (the map is only used for isset lookup, + // that's why the value is simply set to 1; the value is never actually used.) + $this->dropTokens = array_fill_keys( + array(T_WHITESPACE, T_OPEN_TAG, T_COMMENT, T_DOC_COMMENT), 1 + ); + + // the usedAttributes member is a map of the used attribute names to a dummy + // value (here "true") + $options += array( + 'usedAttributes' => array('comments', 'startLine', 'endLine'), + ); + $this->usedAttributes = array_fill_keys($options['usedAttributes'], true); + } + + /** + * Initializes the lexer for lexing the provided source code. + * + * This function does not throw if lexing errors occur. Instead, errors may be retrieved using + * the getErrors() method. + * + * @param string $code The source code to lex + * @param ErrorHandler|null $errorHandler Error handler to use for lexing errors. Defaults to + * ErrorHandler\Throwing + */ + public function startLexing($code, ErrorHandler $errorHandler = null) { + if (null === $errorHandler) { + $errorHandler = new ErrorHandler\Throwing(); + } + + $this->code = $code; // keep the code around for __halt_compiler() handling + $this->pos = -1; + $this->line = 1; + $this->filePos = 0; + + // If inline HTML occurs without preceding code, treat it as if it had a leading newline. + // This ensures proper composability, because having a newline is the "safe" assumption. + $this->prevCloseTagHasNewline = true; + + $scream = ini_set('xdebug.scream', '0'); + + $this->resetErrors(); + $this->tokens = @token_get_all($code); + $this->handleErrors($errorHandler); + + if (false !== $scream) { + ini_set('xdebug.scream', $scream); + } + } + + protected function resetErrors() { + if (function_exists('error_clear_last')) { + error_clear_last(); + } else { + // set error_get_last() to defined state by forcing an undefined variable error + set_error_handler(function() { return false; }, 0); + @$undefinedVariable; + restore_error_handler(); + } + } + + private function handleInvalidCharacterRange($start, $end, $line, ErrorHandler $errorHandler) { + for ($i = $start; $i < $end; $i++) { + $chr = $this->code[$i]; + if ($chr === 'b' || $chr === 'B') { + // HHVM does not treat b" tokens correctly, so ignore these + continue; + } + + if ($chr === "\0") { + // PHP cuts error message after null byte, so need special case + $errorMsg = 'Unexpected null byte'; + } else { + $errorMsg = sprintf( + 'Unexpected character "%s" (ASCII %d)', $chr, ord($chr) + ); + } + + $errorHandler->handleError(new Error($errorMsg, [ + 'startLine' => $line, + 'endLine' => $line, + 'startFilePos' => $i, + 'endFilePos' => $i, + ])); + } + } + + private function isUnterminatedComment($token) { + return ($token[0] === T_COMMENT || $token[0] === T_DOC_COMMENT) + && substr($token[1], 0, 2) === '/*' + && substr($token[1], -2) !== '*/'; + } + + private function errorMayHaveOccurred() { + if (defined('HHVM_VERSION')) { + // In HHVM token_get_all() does not throw warnings, so we need to conservatively + // assume that an error occurred + return true; + } + + $error = error_get_last(); + return null !== $error + && false === strpos($error['message'], 'Undefined variable'); + } + + protected function handleErrors(ErrorHandler $errorHandler) { + if (!$this->errorMayHaveOccurred()) { + return; + } + + // PHP's error handling for token_get_all() is rather bad, so if we want detailed + // error information we need to compute it ourselves. Invalid character errors are + // detected by finding "gaps" in the token array. Unterminated comments are detected + // by checking if a trailing comment has a "*/" at the end. + + $filePos = 0; + $line = 1; + foreach ($this->tokens as $i => $token) { + $tokenValue = \is_string($token) ? $token : $token[1]; + $tokenLen = \strlen($tokenValue); + + if (substr($this->code, $filePos, $tokenLen) !== $tokenValue) { + // Something is missing, must be an invalid character + $nextFilePos = strpos($this->code, $tokenValue, $filePos); + $this->handleInvalidCharacterRange( + $filePos, $nextFilePos, $line, $errorHandler); + $filePos = $nextFilePos; + } + + $filePos += $tokenLen; + $line += substr_count($tokenValue, "\n"); + } + + if ($filePos !== \strlen($this->code)) { + if (substr($this->code, $filePos, 2) === '/*') { + // Unlike PHP, HHVM will drop unterminated comments entirely + $comment = substr($this->code, $filePos); + $errorHandler->handleError(new Error('Unterminated comment', [ + 'startLine' => $line, + 'endLine' => $line + substr_count($comment, "\n"), + 'startFilePos' => $filePos, + 'endFilePos' => $filePos + \strlen($comment), + ])); + + // Emulate the PHP behavior + $isDocComment = isset($comment[3]) && $comment[3] === '*'; + $this->tokens[] = [$isDocComment ? T_DOC_COMMENT : T_COMMENT, $comment, $line]; + } else { + // Invalid characters at the end of the input + $this->handleInvalidCharacterRange( + $filePos, \strlen($this->code), $line, $errorHandler); + } + return; + } + + // Check for unterminated comment + $lastToken = $this->tokens[count($this->tokens) - 1]; + if ($this->isUnterminatedComment($lastToken)) { + $errorHandler->handleError(new Error('Unterminated comment', [ + 'startLine' => $line - substr_count($lastToken[1], "\n"), + 'endLine' => $line, + 'startFilePos' => $filePos - \strlen($lastToken[1]), + 'endFilePos' => $filePos, + ])); + } + } + + /** + * Fetches the next token. + * + * The available attributes are determined by the 'usedAttributes' option, which can + * be specified in the constructor. The following attributes are supported: + * + * * 'comments' => Array of PhpParser\Comment or PhpParser\Comment\Doc instances, + * representing all comments that occurred between the previous + * non-discarded token and the current one. + * * 'startLine' => Line in which the node starts. + * * 'endLine' => Line in which the node ends. + * * 'startTokenPos' => Offset into the token array of the first token in the node. + * * 'endTokenPos' => Offset into the token array of the last token in the node. + * * 'startFilePos' => Offset into the code string of the first character that is part of the node. + * * 'endFilePos' => Offset into the code string of the last character that is part of the node. + * + * @param mixed $value Variable to store token content in + * @param mixed $startAttributes Variable to store start attributes in + * @param mixed $endAttributes Variable to store end attributes in + * + * @return int Token id + */ + public function getNextToken(&$value = null, &$startAttributes = null, &$endAttributes = null) { + $startAttributes = array(); + $endAttributes = array(); + + while (1) { + if (isset($this->tokens[++$this->pos])) { + $token = $this->tokens[$this->pos]; + } else { + // EOF token with ID 0 + $token = "\0"; + } + + if (isset($this->usedAttributes['startLine'])) { + $startAttributes['startLine'] = $this->line; + } + if (isset($this->usedAttributes['startTokenPos'])) { + $startAttributes['startTokenPos'] = $this->pos; + } + if (isset($this->usedAttributes['startFilePos'])) { + $startAttributes['startFilePos'] = $this->filePos; + } + + if (\is_string($token)) { + $value = $token; + if (isset($token[1])) { + // bug in token_get_all + $this->filePos += 2; + $id = ord('"'); + } else { + $this->filePos += 1; + $id = ord($token); + } + } elseif (!isset($this->dropTokens[$token[0]])) { + $value = $token[1]; + $id = $this->tokenMap[$token[0]]; + if (T_CLOSE_TAG === $token[0]) { + $this->prevCloseTagHasNewline = false !== strpos($token[1], "\n"); + } else if (T_INLINE_HTML === $token[0]) { + $startAttributes['hasLeadingNewline'] = $this->prevCloseTagHasNewline; + } + + $this->line += substr_count($value, "\n"); + $this->filePos += \strlen($value); + } else { + if (T_COMMENT === $token[0] || T_DOC_COMMENT === $token[0]) { + if (isset($this->usedAttributes['comments'])) { + $comment = T_DOC_COMMENT === $token[0] + ? new Comment\Doc($token[1], $this->line, $this->filePos) + : new Comment($token[1], $this->line, $this->filePos); + $startAttributes['comments'][] = $comment; + } + } + + $this->line += substr_count($token[1], "\n"); + $this->filePos += \strlen($token[1]); + continue; + } + + if (isset($this->usedAttributes['endLine'])) { + $endAttributes['endLine'] = $this->line; + } + if (isset($this->usedAttributes['endTokenPos'])) { + $endAttributes['endTokenPos'] = $this->pos; + } + if (isset($this->usedAttributes['endFilePos'])) { + $endAttributes['endFilePos'] = $this->filePos - 1; + } + + return $id; + } + + throw new \RuntimeException('Reached end of lexer loop'); + } + + /** + * Returns the token array for current code. + * + * The token array is in the same format as provided by the + * token_get_all() function and does not discard tokens (i.e. + * whitespace and comments are included). The token position + * attributes are against this token array. + * + * @return array Array of tokens in token_get_all() format + */ + public function getTokens() { + return $this->tokens; + } + + /** + * Handles __halt_compiler() by returning the text after it. + * + * @return string Remaining text + */ + public function handleHaltCompiler() { + // text after T_HALT_COMPILER, still including (); + $textAfter = substr($this->code, $this->filePos); + + // ensure that it is followed by (); + // this simplifies the situation, by not allowing any comments + // in between of the tokens. + if (!preg_match('~^\s*\(\s*\)\s*(?:;|\?>\r?\n?)~', $textAfter, $matches)) { + throw new Error('__HALT_COMPILER must be followed by "();"'); + } + + // prevent the lexer from returning any further tokens + $this->pos = count($this->tokens); + + // return with (); removed + return (string) substr($textAfter, strlen($matches[0])); // (string) converts false to '' + } + + /** + * Creates the token map. + * + * The token map maps the PHP internal token identifiers + * to the identifiers used by the Parser. Additionally it + * maps T_OPEN_TAG_WITH_ECHO to T_ECHO and T_CLOSE_TAG to ';'. + * + * @return array The token map + */ + protected function createTokenMap() { + $tokenMap = array(); + + // 256 is the minimum possible token number, as everything below + // it is an ASCII value + for ($i = 256; $i < 1000; ++$i) { + if (T_DOUBLE_COLON === $i) { + // T_DOUBLE_COLON is equivalent to T_PAAMAYIM_NEKUDOTAYIM + $tokenMap[$i] = Tokens::T_PAAMAYIM_NEKUDOTAYIM; + } elseif(T_OPEN_TAG_WITH_ECHO === $i) { + // T_OPEN_TAG_WITH_ECHO with dropped T_OPEN_TAG results in T_ECHO + $tokenMap[$i] = Tokens::T_ECHO; + } elseif(T_CLOSE_TAG === $i) { + // T_CLOSE_TAG is equivalent to ';' + $tokenMap[$i] = ord(';'); + } elseif ('UNKNOWN' !== $name = token_name($i)) { + if ('T_HASHBANG' === $name) { + // HHVM uses a special token for #! hashbang lines + $tokenMap[$i] = Tokens::T_INLINE_HTML; + } else if (defined($name = 'PhpParser\Parser\Tokens::' . $name)) { + // Other tokens can be mapped directly + $tokenMap[$i] = constant($name); + } + } + } + + // HHVM uses a special token for numbers that overflow to double + if (defined('T_ONUMBER')) { + $tokenMap[T_ONUMBER] = Tokens::T_DNUMBER; + } + // HHVM also has a separate token for the __COMPILER_HALT_OFFSET__ constant + if (defined('T_COMPILER_HALT_OFFSET')) { + $tokenMap[T_COMPILER_HALT_OFFSET] = Tokens::T_STRING; + } + + return $tokenMap; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php new file mode 100644 index 0000000..739a328 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php @@ -0,0 +1,174 @@ +newKeywords = array(); + foreach ($newKeywordsPerVersion as $version => $newKeywords) { + if (version_compare(PHP_VERSION, $version, '>=')) { + break; + } + + $this->newKeywords += $newKeywords; + } + + if (version_compare(PHP_VERSION, self::PHP_7_0, '>=')) { + return; + } + $this->tokenMap[self::T_COALESCE] = Tokens::T_COALESCE; + $this->tokenMap[self::T_SPACESHIP] = Tokens::T_SPACESHIP; + $this->tokenMap[self::T_YIELD_FROM] = Tokens::T_YIELD_FROM; + + if (version_compare(PHP_VERSION, self::PHP_5_6, '>=')) { + return; + } + $this->tokenMap[self::T_ELLIPSIS] = Tokens::T_ELLIPSIS; + $this->tokenMap[self::T_POW] = Tokens::T_POW; + $this->tokenMap[self::T_POW_EQUAL] = Tokens::T_POW_EQUAL; + } + + public function startLexing($code, ErrorHandler $errorHandler = null) { + $this->inObjectAccess = false; + + parent::startLexing($code, $errorHandler); + if ($this->requiresEmulation($code)) { + $this->emulateTokens(); + } + } + + /* + * Checks if the code is potentially using features that require emulation. + */ + protected function requiresEmulation($code) { + if (version_compare(PHP_VERSION, self::PHP_7_0, '>=')) { + return false; + } + + if (preg_match('(\?\?|<=>|yield[ \n\r\t]+from)', $code)) { + return true; + } + + if (version_compare(PHP_VERSION, self::PHP_5_6, '>=')) { + return false; + } + + return preg_match('(\.\.\.|(?tokens); $i < $c; ++$i) { + $replace = null; + if (isset($this->tokens[$i + 1])) { + if ($this->tokens[$i] === '?' && $this->tokens[$i + 1] === '?') { + array_splice($this->tokens, $i, 2, array( + array(self::T_COALESCE, '??', $line) + )); + $c--; + continue; + } + if ($this->tokens[$i][0] === T_IS_SMALLER_OR_EQUAL + && $this->tokens[$i + 1] === '>' + ) { + array_splice($this->tokens, $i, 2, array( + array(self::T_SPACESHIP, '<=>', $line) + )); + $c--; + continue; + } + if ($this->tokens[$i] === '*' && $this->tokens[$i + 1] === '*') { + array_splice($this->tokens, $i, 2, array( + array(self::T_POW, '**', $line) + )); + $c--; + continue; + } + if ($this->tokens[$i] === '*' && $this->tokens[$i + 1][0] === T_MUL_EQUAL) { + array_splice($this->tokens, $i, 2, array( + array(self::T_POW_EQUAL, '**=', $line) + )); + $c--; + continue; + } + } + + if (isset($this->tokens[$i + 2])) { + if ($this->tokens[$i][0] === T_YIELD && $this->tokens[$i + 1][0] === T_WHITESPACE + && $this->tokens[$i + 2][0] === T_STRING + && !strcasecmp($this->tokens[$i + 2][1], 'from') + ) { + array_splice($this->tokens, $i, 3, array( + array( + self::T_YIELD_FROM, + $this->tokens[$i][1] . $this->tokens[$i + 1][1] . $this->tokens[$i + 2][1], + $line + ) + )); + $c -= 2; + $line += substr_count($this->tokens[$i][1], "\n"); + continue; + } + if ($this->tokens[$i] === '.' && $this->tokens[$i + 1] === '.' + && $this->tokens[$i + 2] === '.' + ) { + array_splice($this->tokens, $i, 3, array( + array(self::T_ELLIPSIS, '...', $line) + )); + $c -= 2; + continue; + } + } + + if (\is_array($this->tokens[$i])) { + $line += substr_count($this->tokens[$i][1], "\n"); + } + } + } + + public function getNextToken(&$value = null, &$startAttributes = null, &$endAttributes = null) { + $token = parent::getNextToken($value, $startAttributes, $endAttributes); + + // replace new keywords by their respective tokens. This is not done + // if we currently are in an object access (e.g. in $obj->namespace + // "namespace" stays a T_STRING tokens and isn't converted to T_NAMESPACE) + if (Tokens::T_STRING === $token && !$this->inObjectAccess) { + if (isset($this->newKeywords[strtolower($value)])) { + return $this->newKeywords[strtolower($value)]; + } + } else { + // keep track of whether we currently are in an object access (after ->) + $this->inObjectAccess = Tokens::T_OBJECT_OPERATOR === $token; + } + + return $token; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node.php b/vendor/nikic/php-parser/lib/PhpParser/Node.php new file mode 100644 index 0000000..9da9245 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node.php @@ -0,0 +1,86 @@ +value = $value; + $this->byRef = $byRef; + $this->unpack = $unpack; + } + + public function getSubNodeNames() { + return array('value', 'byRef', 'unpack'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Const_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Const_.php new file mode 100644 index 0000000..26322d4 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Const_.php @@ -0,0 +1,30 @@ +name = $name; + $this->value = $value; + } + + public function getSubNodeNames() { + return array('name', 'value'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr.php new file mode 100644 index 0000000..2dae5bf --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr.php @@ -0,0 +1,9 @@ +var = $var; + $this->dim = $dim; + } + + public function getSubNodeNames() { + return array('var', 'dim'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php new file mode 100644 index 0000000..de73ef4 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php @@ -0,0 +1,34 @@ +key = $key; + $this->value = $value; + $this->byRef = $byRef; + } + + public function getSubNodeNames() { + return array('key', 'value', 'byRef'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Array_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Array_.php new file mode 100644 index 0000000..9151f27 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Array_.php @@ -0,0 +1,30 @@ +items = $items; + } + + public function getSubNodeNames() { + return array('items'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php new file mode 100644 index 0000000..1f280ff --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php @@ -0,0 +1,30 @@ +var = $var; + $this->expr = $expr; + } + + public function getSubNodeNames() { + return array('var', 'expr'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php new file mode 100644 index 0000000..83540a0 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php @@ -0,0 +1,30 @@ +var = $var; + $this->expr = $expr; + } + + public function getSubNodeNames() { + return array('var', 'expr'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php new file mode 100644 index 0000000..9e3ed82 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php @@ -0,0 +1,9 @@ +var = $var; + $this->expr = $expr; + } + + public function getSubNodeNames() { + return array('var', 'expr'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp.php new file mode 100644 index 0000000..6f87e23 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp.php @@ -0,0 +1,30 @@ +left = $left; + $this->right = $right; + } + + public function getSubNodeNames() { + return array('left', 'right'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php new file mode 100644 index 0000000..bd6c5c1 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php @@ -0,0 +1,9 @@ +expr = $expr; + } + + public function getSubNodeNames() { + return array('expr'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php new file mode 100644 index 0000000..8f543b8 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php @@ -0,0 +1,26 @@ +expr = $expr; + } + + public function getSubNodeNames() { + return array('expr'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast.php new file mode 100644 index 0000000..bf850dc --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast.php @@ -0,0 +1,26 @@ +expr = $expr; + } + + public function getSubNodeNames() { + return array('expr'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Array_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Array_.php new file mode 100644 index 0000000..08b3a38 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Array_.php @@ -0,0 +1,9 @@ +class = $class; + $this->name = $name; + } + + public function getSubNodeNames() { + return array('class', 'name'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php new file mode 100644 index 0000000..198ec4d --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php @@ -0,0 +1,26 @@ +expr = $expr; + } + + public function getSubNodeNames() { + return array('expr'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php new file mode 100644 index 0000000..5d37655 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php @@ -0,0 +1,65 @@ + false : Whether the closure is static + * 'byRef' => false : Whether to return by reference + * 'params' => array(): Parameters + * 'uses' => array(): use()s + * 'returnType' => null : Return type + * 'stmts' => array(): Statements + * @param array $attributes Additional attributes + */ + public function __construct(array $subNodes = array(), array $attributes = array()) { + parent::__construct($attributes); + $this->static = isset($subNodes['static']) ? $subNodes['static'] : false; + $this->byRef = isset($subNodes['byRef']) ? $subNodes['byRef'] : false; + $this->params = isset($subNodes['params']) ? $subNodes['params'] : array(); + $this->uses = isset($subNodes['uses']) ? $subNodes['uses'] : array(); + $this->returnType = isset($subNodes['returnType']) ? $subNodes['returnType'] : null; + $this->stmts = isset($subNodes['stmts']) ? $subNodes['stmts'] : array(); + } + + public function getSubNodeNames() { + return array('static', 'byRef', 'params', 'uses', 'returnType', 'stmts'); + } + + public function returnsByRef() { + return $this->byRef; + } + + public function getParams() { + return $this->params; + } + + public function getReturnType() { + return $this->returnType; + } + + public function getStmts() { + return $this->stmts; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php new file mode 100644 index 0000000..f4d0202 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php @@ -0,0 +1,30 @@ +var = $var; + $this->byRef = $byRef; + } + + public function getSubNodeNames() { + return array('var', 'byRef'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ConstFetch.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ConstFetch.php new file mode 100644 index 0000000..98e51d5 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ConstFetch.php @@ -0,0 +1,27 @@ +name = $name; + } + + public function getSubNodeNames() { + return array('name'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php new file mode 100644 index 0000000..0c0509e --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php @@ -0,0 +1,26 @@ +expr = $expr; + } + + public function getSubNodeNames() { + return array('expr'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php new file mode 100644 index 0000000..5ab8fd4 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php @@ -0,0 +1,27 @@ +expr = $expr; + } + + public function getSubNodeNames() { + return array('expr'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Eval_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Eval_.php new file mode 100644 index 0000000..eadffd0 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Eval_.php @@ -0,0 +1,26 @@ +expr = $expr; + } + + public function getSubNodeNames() { + return array('expr'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Exit_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Exit_.php new file mode 100644 index 0000000..b0b94cf --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Exit_.php @@ -0,0 +1,30 @@ +expr = $expr; + } + + public function getSubNodeNames() { + return array('expr'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php new file mode 100644 index 0000000..60d0050 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php @@ -0,0 +1,31 @@ +name = $name; + $this->args = $args; + } + + public function getSubNodeNames() { + return array('name', 'args'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Include_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Include_.php new file mode 100644 index 0000000..b27f3af --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Include_.php @@ -0,0 +1,35 @@ +expr = $expr; + $this->type = $type; + } + + public function getSubNodeNames() { + return array('expr', 'type'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Instanceof_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Instanceof_.php new file mode 100644 index 0000000..69573d8 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Instanceof_.php @@ -0,0 +1,31 @@ +expr = $expr; + $this->class = $class; + } + + public function getSubNodeNames() { + return array('expr', 'class'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Isset_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Isset_.php new file mode 100644 index 0000000..4ec1d02 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Isset_.php @@ -0,0 +1,26 @@ +vars = $vars; + } + + public function getSubNodeNames() { + return array('vars'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/List_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/List_.php new file mode 100644 index 0000000..30f3dc1 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/List_.php @@ -0,0 +1,26 @@ +items = $items; + } + + public function getSubNodeNames() { + return array('items'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php new file mode 100644 index 0000000..a6cdd07 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php @@ -0,0 +1,35 @@ +var = $var; + $this->name = $name; + $this->args = $args; + } + + public function getSubNodeNames() { + return array('var', 'name', 'args'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php new file mode 100644 index 0000000..a8c8779 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php @@ -0,0 +1,31 @@ +class = $class; + $this->args = $args; + } + + public function getSubNodeNames() { + return array('class', 'args'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostDec.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostDec.php new file mode 100644 index 0000000..06ce547 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostDec.php @@ -0,0 +1,26 @@ +var = $var; + } + + public function getSubNodeNames() { + return array('var'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostInc.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostInc.php new file mode 100644 index 0000000..54865ba --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostInc.php @@ -0,0 +1,26 @@ +var = $var; + } + + public function getSubNodeNames() { + return array('var'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreDec.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreDec.php new file mode 100644 index 0000000..db30f51 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreDec.php @@ -0,0 +1,26 @@ +var = $var; + } + + public function getSubNodeNames() { + return array('var'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreInc.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreInc.php new file mode 100644 index 0000000..0635602 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreInc.php @@ -0,0 +1,26 @@ +var = $var; + } + + public function getSubNodeNames() { + return array('var'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Print_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Print_.php new file mode 100644 index 0000000..0666ab8 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Print_.php @@ -0,0 +1,26 @@ +expr = $expr; + } + + public function getSubNodeNames() { + return array('expr'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PropertyFetch.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PropertyFetch.php new file mode 100644 index 0000000..adcf21c --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PropertyFetch.php @@ -0,0 +1,30 @@ +var = $var; + $this->name = $name; + } + + public function getSubNodeNames() { + return array('var', 'name'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ShellExec.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ShellExec.php new file mode 100644 index 0000000..9516a32 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ShellExec.php @@ -0,0 +1,26 @@ +parts = $parts; + } + + public function getSubNodeNames() { + return array('parts'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php new file mode 100644 index 0000000..5118f34 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php @@ -0,0 +1,35 @@ +class = $class; + $this->name = $name; + $this->args = $args; + } + + public function getSubNodeNames() { + return array('class', 'name', 'args'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.php new file mode 100644 index 0000000..477a69d --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.php @@ -0,0 +1,31 @@ +class = $class; + $this->name = $name; + } + + public function getSubNodeNames() { + return array('class', 'name'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Ternary.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Ternary.php new file mode 100644 index 0000000..5730139 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Ternary.php @@ -0,0 +1,34 @@ +cond = $cond; + $this->if = $if; + $this->else = $else; + } + + public function getSubNodeNames() { + return array('cond', 'if', 'else'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryMinus.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryMinus.php new file mode 100644 index 0000000..94635d6 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryMinus.php @@ -0,0 +1,26 @@ +expr = $expr; + } + + public function getSubNodeNames() { + return array('expr'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryPlus.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryPlus.php new file mode 100644 index 0000000..6514120 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryPlus.php @@ -0,0 +1,26 @@ +expr = $expr; + } + + public function getSubNodeNames() { + return array('expr'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Variable.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Variable.php new file mode 100644 index 0000000..3ae3ecd --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Variable.php @@ -0,0 +1,26 @@ +name = $name; + } + + public function getSubNodeNames() { + return array('name'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/YieldFrom.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/YieldFrom.php new file mode 100644 index 0000000..993c82c --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/YieldFrom.php @@ -0,0 +1,26 @@ +expr = $expr; + } + + public function getSubNodeNames() { + return array('expr'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php new file mode 100644 index 0000000..f3ca88e --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php @@ -0,0 +1,30 @@ +key = $key; + $this->value = $value; + } + + public function getSubNodeNames() { + return array('key', 'value'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php b/vendor/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php new file mode 100644 index 0000000..8256945 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php @@ -0,0 +1,36 @@ +parts = self::prepareName($name); + } + + public function getSubNodeNames() { + return array('parts'); + } + + /** + * Gets the first part of the name, i.e. everything before the first namespace separator. + * + * @return string First part of the name + */ + public function getFirst() { + return $this->parts[0]; + } + + /** + * Gets the last part of the name, i.e. everything after the last namespace separator. + * + * @return string Last part of the name + */ + public function getLast() { + return $this->parts[count($this->parts) - 1]; + } + + /** + * Checks whether the name is unqualified. (E.g. Name) + * + * @return bool Whether the name is unqualified + */ + public function isUnqualified() { + return 1 == count($this->parts); + } + + /** + * Checks whether the name is qualified. (E.g. Name\Name) + * + * @return bool Whether the name is qualified + */ + public function isQualified() { + return 1 < count($this->parts); + } + + /** + * Checks whether the name is fully qualified. (E.g. \Name) + * + * @return bool Whether the name is fully qualified + */ + public function isFullyQualified() { + return false; + } + + /** + * Checks whether the name is explicitly relative to the current namespace. (E.g. namespace\Name) + * + * @return bool Whether the name is relative + */ + public function isRelative() { + return false; + } + + /** + * Returns a string representation of the name by imploding the namespace parts with the + * namespace separator. + * + * @return string String representation + */ + public function toString() { + return implode('\\', $this->parts); + } + + /** + * Returns a string representation of the name by imploding the namespace parts with the + * namespace separator. + * + * @return string String representation + */ + public function __toString() { + return implode('\\', $this->parts); + } + + /** + * Gets a slice of a name (similar to array_slice). + * + * This method returns a new instance of the same type as the original and with the same + * attributes. + * + * If the slice is empty, null is returned. The null value will be correctly handled in + * concatenations using concat(). + * + * Offset and length have the same meaning as in array_slice(). + * + * @param int $offset Offset to start the slice at (may be negative) + * @param int|null $length Length of the slice (may be negative) + * + * @return static|null Sliced name + */ + public function slice($offset, $length = null) { + $numParts = count($this->parts); + + $realOffset = $offset < 0 ? $offset + $numParts : $offset; + if ($realOffset < 0 || $realOffset > $numParts) { + throw new \OutOfBoundsException(sprintf('Offset %d is out of bounds', $offset)); + } + + if (null === $length) { + $realLength = $numParts - $realOffset; + } else { + $realLength = $length < 0 ? $length + $numParts - $realOffset : $length; + if ($realLength < 0 || $realLength > $numParts) { + throw new \OutOfBoundsException(sprintf('Length %d is out of bounds', $length)); + } + } + + if ($realLength === 0) { + // Empty slice is represented as null + return null; + } + + return new static(array_slice($this->parts, $realOffset, $realLength), $this->attributes); + } + + /** + * Concatenate two names, yielding a new Name instance. + * + * The type of the generated instance depends on which class this method is called on, for + * example Name\FullyQualified::concat() will yield a Name\FullyQualified instance. + * + * If one of the arguments is null, a new instance of the other name will be returned. If both + * arguments are null, null will be returned. As such, writing + * Name::concat($namespace, $shortName) + * where $namespace is a Name node or null will work as expected. + * + * @param string|array|self|null $name1 The first name + * @param string|array|self|null $name2 The second name + * @param array $attributes Attributes to assign to concatenated name + * + * @return static|null Concatenated name + */ + public static function concat($name1, $name2, array $attributes = []) { + if (null === $name1 && null === $name2) { + return null; + } elseif (null === $name1) { + return new static(self::prepareName($name2), $attributes); + } else if (null === $name2) { + return new static(self::prepareName($name1), $attributes); + } else { + return new static( + array_merge(self::prepareName($name1), self::prepareName($name2)), $attributes + ); + } + } + + /** + * Prepares a (string, array or Name node) name for use in name changing methods by converting + * it to an array. + * + * @param string|array|self $name Name to prepare + * + * @return array Prepared name + */ + private static function prepareName($name) { + if (\is_string($name)) { + return explode('\\', $name); + } elseif (\is_array($name)) { + return $name; + } elseif ($name instanceof self) { + return $name->parts; + } + + throw new \InvalidArgumentException( + 'Expected string, array of parts or Name instance' + ); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Name/FullyQualified.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Name/FullyQualified.php new file mode 100644 index 0000000..97cc111 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Name/FullyQualified.php @@ -0,0 +1,42 @@ +type = $type; + } + + public function getSubNodeNames() { + return array('type'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Param.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Param.php new file mode 100644 index 0000000..b35ee4e --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Param.php @@ -0,0 +1,42 @@ +type = $type; + $this->byRef = $byRef; + $this->variadic = $variadic; + $this->name = $name; + $this->default = $default; + } + + public function getSubNodeNames() { + return array('type', 'byRef', 'variadic', 'name', 'default'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar.php new file mode 100644 index 0000000..0117753 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar.php @@ -0,0 +1,7 @@ +value = $value; + } + + public function getSubNodeNames() { + return array('value'); + } + + /** + * @internal + * + * Parses a DNUMBER token like PHP would. + * + * @param string $str A string number + * + * @return float The parsed number + */ + public static function parse($str) { + // if string contains any of .eE just cast it to float + if (false !== strpbrk($str, '.eE')) { + return (float) $str; + } + + // otherwise it's an integer notation that overflowed into a float + // if it starts with 0 it's one of the special integer notations + if ('0' === $str[0]) { + // hex + if ('x' === $str[1] || 'X' === $str[1]) { + return hexdec($str); + } + + // bin + if ('b' === $str[1] || 'B' === $str[1]) { + return bindec($str); + } + + // oct + // substr($str, 0, strcspn($str, '89')) cuts the string at the first invalid digit (8 or 9) + // so that only the digits before that are used + return octdec(substr($str, 0, strcspn($str, '89'))); + } + + // dec + return (float) $str; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/Encapsed.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/Encapsed.php new file mode 100644 index 0000000..4f9b433 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/Encapsed.php @@ -0,0 +1,27 @@ +parts = $parts; + } + + public function getSubNodeNames() { + return array('parts'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/EncapsedStringPart.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/EncapsedStringPart.php new file mode 100644 index 0000000..50cb1af --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/EncapsedStringPart.php @@ -0,0 +1,26 @@ +value = $value; + } + + public function getSubNodeNames() { + return array('value'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php new file mode 100644 index 0000000..3559b98 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php @@ -0,0 +1,67 @@ +value = $value; + } + + public function getSubNodeNames() { + return array('value'); + } + + /** + * Constructs an LNumber node from a string number literal. + * + * @param string $str String number literal (decimal, octal, hex or binary) + * @param array $attributes Additional attributes + * @param bool $allowInvalidOctal Whether to allow invalid octal numbers (PHP 5) + * + * @return LNumber The constructed LNumber, including kind attribute + */ + public static function fromString($str, array $attributes = array(), $allowInvalidOctal = false) { + if ('0' !== $str[0] || '0' === $str) { + $attributes['kind'] = LNumber::KIND_DEC; + return new LNumber((int) $str, $attributes); + } + + if ('x' === $str[1] || 'X' === $str[1]) { + $attributes['kind'] = LNumber::KIND_HEX; + return new LNumber(hexdec($str), $attributes); + } + + if ('b' === $str[1] || 'B' === $str[1]) { + $attributes['kind'] = LNumber::KIND_BIN; + return new LNumber(bindec($str), $attributes); + } + + if (!$allowInvalidOctal && strpbrk($str, '89')) { + throw new Error('Invalid numeric literal', $attributes); + } + + // use intval instead of octdec to get proper cutting behavior with malformed numbers + $attributes['kind'] = LNumber::KIND_OCT; + return new LNumber(intval($str, 8), $attributes); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst.php new file mode 100644 index 0000000..a50d68f --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst.php @@ -0,0 +1,28 @@ + '\\', + '$' => '$', + 'n' => "\n", + 'r' => "\r", + 't' => "\t", + 'f' => "\f", + 'v' => "\v", + 'e' => "\x1B", + ); + + /** + * Constructs a string scalar node. + * + * @param string $value Value of the string + * @param array $attributes Additional attributes + */ + public function __construct($value, array $attributes = array()) { + parent::__construct($attributes); + $this->value = $value; + } + + public function getSubNodeNames() { + return array('value'); + } + + /** + * @internal + * + * Parses a string token. + * + * @param string $str String token content + * @param bool $parseUnicodeEscape Whether to parse PHP 7 \u escapes + * + * @return string The parsed string + */ + public static function parse($str, $parseUnicodeEscape = true) { + $bLength = 0; + if ('b' === $str[0] || 'B' === $str[0]) { + $bLength = 1; + } + + if ('\'' === $str[$bLength]) { + return str_replace( + array('\\\\', '\\\''), + array( '\\', '\''), + substr($str, $bLength + 1, -1) + ); + } else { + return self::parseEscapeSequences( + substr($str, $bLength + 1, -1), '"', $parseUnicodeEscape + ); + } + } + + /** + * @internal + * + * Parses escape sequences in strings (all string types apart from single quoted). + * + * @param string $str String without quotes + * @param null|string $quote Quote type + * @param bool $parseUnicodeEscape Whether to parse PHP 7 \u escapes + * + * @return string String with escape sequences parsed + */ + public static function parseEscapeSequences($str, $quote, $parseUnicodeEscape = true) { + if (null !== $quote) { + $str = str_replace('\\' . $quote, $quote, $str); + } + + $extra = ''; + if ($parseUnicodeEscape) { + $extra = '|u\{([0-9a-fA-F]+)\}'; + } + + return preg_replace_callback( + '~\\\\([\\\\$nrtfve]|[xX][0-9a-fA-F]{1,2}|[0-7]{1,3}' . $extra . ')~', + function($matches) { + $str = $matches[1]; + + if (isset(self::$replacements[$str])) { + return self::$replacements[$str]; + } elseif ('x' === $str[0] || 'X' === $str[0]) { + return chr(hexdec($str)); + } elseif ('u' === $str[0]) { + return self::codePointToUtf8(hexdec($matches[2])); + } else { + return chr(octdec($str)); + } + }, + $str + ); + } + + private static function codePointToUtf8($num) { + if ($num <= 0x7F) { + return chr($num); + } + if ($num <= 0x7FF) { + return chr(($num>>6) + 0xC0) . chr(($num&0x3F) + 0x80); + } + if ($num <= 0xFFFF) { + return chr(($num>>12) + 0xE0) . chr((($num>>6)&0x3F) + 0x80) . chr(($num&0x3F) + 0x80); + } + if ($num <= 0x1FFFFF) { + return chr(($num>>18) + 0xF0) . chr((($num>>12)&0x3F) + 0x80) + . chr((($num>>6)&0x3F) + 0x80) . chr(($num&0x3F) + 0x80); + } + throw new Error('Invalid UTF-8 codepoint escape sequence: Codepoint too large'); + } + + /** + * @internal + * + * Parses a constant doc string. + * + * @param string $startToken Doc string start token content (<<num = $num; + } + + public function getSubNodeNames() { + return array('num'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php new file mode 100644 index 0000000..03f892c --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php @@ -0,0 +1,30 @@ +cond = $cond; + $this->stmts = $stmts; + } + + public function getSubNodeNames() { + return array('cond', 'stmts'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php new file mode 100644 index 0000000..58337ad --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php @@ -0,0 +1,34 @@ +types = $types; + $this->var = $var; + $this->stmts = $stmts; + } + + public function getSubNodeNames() { + return array('types', 'var', 'stmts'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassConst.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassConst.php new file mode 100644 index 0000000..5e566fc --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassConst.php @@ -0,0 +1,47 @@ +flags = $flags; + $this->consts = $consts; + } + + public function getSubNodeNames() { + return array('flags', 'consts'); + } + + public function isPublic() { + return ($this->flags & Class_::MODIFIER_PUBLIC) !== 0 + || ($this->flags & Class_::VISIBILITY_MODIFER_MASK) === 0; + } + + public function isProtected() { + return (bool) ($this->flags & Class_::MODIFIER_PROTECTED); + } + + public function isPrivate() { + return (bool) ($this->flags & Class_::MODIFIER_PRIVATE); + } + + public function isStatic() { + return (bool) ($this->flags & Class_::MODIFIER_STATIC); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php new file mode 100644 index 0000000..f905335 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php @@ -0,0 +1,44 @@ +stmts as $stmt) { + if ($stmt instanceof ClassMethod) { + $methods[] = $stmt; + } + } + return $methods; + } + + /** + * Gets method with the given name defined directly in this class/interface/trait. + * + * @param string $name Name of the method (compared case-insensitively) + * + * @return ClassMethod|null Method node or null if the method does not exist + */ + public function getMethod($name) { + $lowerName = strtolower($name); + foreach ($this->stmts as $stmt) { + if ($stmt instanceof ClassMethod && $lowerName === strtolower($stmt->name)) { + return $stmt; + } + } + return null; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php new file mode 100644 index 0000000..6391c41 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php @@ -0,0 +1,94 @@ + MODIFIER_PUBLIC: Flags + * 'byRef' => false : Whether to return by reference + * 'params' => array() : Parameters + * 'returnType' => null : Return type + * 'stmts' => array() : Statements + * @param array $attributes Additional attributes + */ + public function __construct($name, array $subNodes = array(), array $attributes = array()) { + parent::__construct($attributes); + $this->flags = isset($subNodes['flags']) ? $subNodes['flags'] + : (isset($subNodes['type']) ? $subNodes['type'] : 0); + $this->type = $this->flags; + $this->byRef = isset($subNodes['byRef']) ? $subNodes['byRef'] : false; + $this->name = $name; + $this->params = isset($subNodes['params']) ? $subNodes['params'] : array(); + $this->returnType = isset($subNodes['returnType']) ? $subNodes['returnType'] : null; + $this->stmts = array_key_exists('stmts', $subNodes) ? $subNodes['stmts'] : array(); + } + + public function getSubNodeNames() { + return array('flags', 'byRef', 'name', 'params', 'returnType', 'stmts'); + } + + public function returnsByRef() { + return $this->byRef; + } + + public function getParams() { + return $this->params; + } + + public function getReturnType() { + return $this->returnType; + } + + public function getStmts() { + return $this->stmts; + } + + public function isPublic() { + return ($this->flags & Class_::MODIFIER_PUBLIC) !== 0 + || ($this->flags & Class_::VISIBILITY_MODIFER_MASK) === 0; + } + + public function isProtected() { + return (bool) ($this->flags & Class_::MODIFIER_PROTECTED); + } + + public function isPrivate() { + return (bool) ($this->flags & Class_::MODIFIER_PRIVATE); + } + + public function isAbstract() { + return (bool) ($this->flags & Class_::MODIFIER_ABSTRACT); + } + + public function isFinal() { + return (bool) ($this->flags & Class_::MODIFIER_FINAL); + } + + public function isStatic() { + return (bool) ($this->flags & Class_::MODIFIER_STATIC); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php new file mode 100644 index 0000000..7e624da --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php @@ -0,0 +1,97 @@ + true, + 'parent' => true, + 'static' => true, + ); + + /** + * Constructs a class node. + * + * @param string|null $name Name + * @param array $subNodes Array of the following optional subnodes: + * 'flags' => 0 : Flags + * 'extends' => null : Name of extended class + * 'implements' => array(): Names of implemented interfaces + * 'stmts' => array(): Statements + * @param array $attributes Additional attributes + */ + public function __construct($name, array $subNodes = array(), array $attributes = array()) { + parent::__construct($attributes); + $this->flags = isset($subNodes['flags']) ? $subNodes['flags'] + : (isset($subNodes['type']) ? $subNodes['type'] : 0); + $this->type = $this->flags; + $this->name = $name; + $this->extends = isset($subNodes['extends']) ? $subNodes['extends'] : null; + $this->implements = isset($subNodes['implements']) ? $subNodes['implements'] : array(); + $this->stmts = isset($subNodes['stmts']) ? $subNodes['stmts'] : array(); + } + + public function getSubNodeNames() { + return array('flags', 'name', 'extends', 'implements', 'stmts'); + } + + public function isAbstract() { + return (bool) ($this->flags & self::MODIFIER_ABSTRACT); + } + + public function isFinal() { + return (bool) ($this->flags & self::MODIFIER_FINAL); + } + + public function isAnonymous() { + return null === $this->name; + } + + /** + * @internal + */ + public static function verifyModifier($a, $b) { + if ($a & self::VISIBILITY_MODIFER_MASK && $b & self::VISIBILITY_MODIFER_MASK) { + throw new Error('Multiple access type modifiers are not allowed'); + } + + if ($a & self::MODIFIER_ABSTRACT && $b & self::MODIFIER_ABSTRACT) { + throw new Error('Multiple abstract modifiers are not allowed'); + } + + if ($a & self::MODIFIER_STATIC && $b & self::MODIFIER_STATIC) { + throw new Error('Multiple static modifiers are not allowed'); + } + + if ($a & self::MODIFIER_FINAL && $b & self::MODIFIER_FINAL) { + throw new Error('Multiple final modifiers are not allowed'); + } + + if ($a & 48 && $b & 48) { + throw new Error('Cannot use the final modifier on an abstract class member'); + } + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php new file mode 100644 index 0000000..8b2eecd --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php @@ -0,0 +1,26 @@ +consts = $consts; + } + + public function getSubNodeNames() { + return array('consts'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php new file mode 100644 index 0000000..f78e19a --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php @@ -0,0 +1,26 @@ +num = $num; + } + + public function getSubNodeNames() { + return array('num'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php new file mode 100644 index 0000000..829dbaf --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php @@ -0,0 +1,30 @@ +value pair node. + * + * @param string $key Key + * @param Node\Expr $value Value + * @param array $attributes Additional attributes + */ + public function __construct($key, Node\Expr $value, array $attributes = array()) { + parent::__construct($attributes); + $this->key = $key; + $this->value = $value; + } + + public function getSubNodeNames() { + return array('key', 'value'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Declare_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Declare_.php new file mode 100644 index 0000000..32739f3 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Declare_.php @@ -0,0 +1,30 @@ +declares = $declares; + $this->stmts = $stmts; + } + + public function getSubNodeNames() { + return array('declares', 'stmts'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php new file mode 100644 index 0000000..dd4c6c8 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php @@ -0,0 +1,30 @@ +cond = $cond; + $this->stmts = $stmts; + } + + public function getSubNodeNames() { + return array('cond', 'stmts'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php new file mode 100644 index 0000000..11e1070 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php @@ -0,0 +1,26 @@ +exprs = $exprs; + } + + public function getSubNodeNames() { + return array('exprs'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ElseIf_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ElseIf_.php new file mode 100644 index 0000000..608878f --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ElseIf_.php @@ -0,0 +1,30 @@ +cond = $cond; + $this->stmts = $stmts; + } + + public function getSubNodeNames() { + return array('cond', 'stmts'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Else_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Else_.php new file mode 100644 index 0000000..c91a148 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Else_.php @@ -0,0 +1,26 @@ +stmts = $stmts; + } + + public function getSubNodeNames() { + return array('stmts'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Finally_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Finally_.php new file mode 100644 index 0000000..0e3eabb --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Finally_.php @@ -0,0 +1,26 @@ +stmts = $stmts; + } + + public function getSubNodeNames() { + return array('stmts'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/For_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/For_.php new file mode 100644 index 0000000..2ca88a3 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/For_.php @@ -0,0 +1,39 @@ + array(): Init expressions + * 'cond' => array(): Loop conditions + * 'loop' => array(): Loop expressions + * 'stmts' => array(): Statements + * @param array $attributes Additional attributes + */ + public function __construct(array $subNodes = array(), array $attributes = array()) { + parent::__construct($attributes); + $this->init = isset($subNodes['init']) ? $subNodes['init'] : array(); + $this->cond = isset($subNodes['cond']) ? $subNodes['cond'] : array(); + $this->loop = isset($subNodes['loop']) ? $subNodes['loop'] : array(); + $this->stmts = isset($subNodes['stmts']) ? $subNodes['stmts'] : array(); + } + + public function getSubNodeNames() { + return array('init', 'cond', 'loop', 'stmts'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Foreach_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Foreach_.php new file mode 100644 index 0000000..d2c6432 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Foreach_.php @@ -0,0 +1,43 @@ + null : Variable to assign key to + * 'byRef' => false : Whether to assign value by reference + * 'stmts' => array(): Statements + * @param array $attributes Additional attributes + */ + public function __construct(Node\Expr $expr, Node\Expr $valueVar, array $subNodes = array(), array $attributes = array()) { + parent::__construct($attributes); + $this->expr = $expr; + $this->keyVar = isset($subNodes['keyVar']) ? $subNodes['keyVar'] : null; + $this->byRef = isset($subNodes['byRef']) ? $subNodes['byRef'] : false; + $this->valueVar = $valueVar; + $this->stmts = isset($subNodes['stmts']) ? $subNodes['stmts'] : array(); + } + + public function getSubNodeNames() { + return array('expr', 'keyVar', 'byRef', 'valueVar', 'stmts'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php new file mode 100644 index 0000000..4c1f48d --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php @@ -0,0 +1,60 @@ + false : Whether to return by reference + * 'params' => array(): Parameters + * 'returnType' => null : Return type + * 'stmts' => array(): Statements + * @param array $attributes Additional attributes + */ + public function __construct($name, array $subNodes = array(), array $attributes = array()) { + parent::__construct($attributes); + $this->byRef = isset($subNodes['byRef']) ? $subNodes['byRef'] : false; + $this->name = $name; + $this->params = isset($subNodes['params']) ? $subNodes['params'] : array(); + $this->returnType = isset($subNodes['returnType']) ? $subNodes['returnType'] : null; + $this->stmts = isset($subNodes['stmts']) ? $subNodes['stmts'] : array(); + } + + public function getSubNodeNames() { + return array('byRef', 'name', 'params', 'returnType', 'stmts'); + } + + public function returnsByRef() { + return $this->byRef; + } + + public function getParams() { + return $this->params; + } + + public function getReturnType() { + return $this->returnType; + } + + public function getStmts() { + return $this->stmts; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Global_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Global_.php new file mode 100644 index 0000000..29fbc48 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Global_.php @@ -0,0 +1,26 @@ +vars = $vars; + } + + public function getSubNodeNames() { + return array('vars'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Goto_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Goto_.php new file mode 100644 index 0000000..b087fe0 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Goto_.php @@ -0,0 +1,26 @@ +name = $name; + } + + public function getSubNodeNames() { + return array('name'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/GroupUse.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/GroupUse.php new file mode 100644 index 0000000..30837dd --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/GroupUse.php @@ -0,0 +1,35 @@ +type = $type; + $this->prefix = $prefix; + $this->uses = $uses; + } + + public function getSubNodeNames() { + return array('type', 'prefix', 'uses'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/HaltCompiler.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/HaltCompiler.php new file mode 100644 index 0000000..c33ec9f --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/HaltCompiler.php @@ -0,0 +1,26 @@ +remaining = $remaining; + } + + public function getSubNodeNames() { + return array('remaining'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php new file mode 100644 index 0000000..98bda35 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php @@ -0,0 +1,39 @@ + array(): Statements + * 'elseifs' => array(): Elseif clauses + * 'else' => null : Else clause + * @param array $attributes Additional attributes + */ + public function __construct(Node\Expr $cond, array $subNodes = array(), array $attributes = array()) { + parent::__construct($attributes); + $this->cond = $cond; + $this->stmts = isset($subNodes['stmts']) ? $subNodes['stmts'] : array(); + $this->elseifs = isset($subNodes['elseifs']) ? $subNodes['elseifs'] : array(); + $this->else = isset($subNodes['else']) ? $subNodes['else'] : null; + } + + public function getSubNodeNames() { + return array('cond', 'stmts', 'elseifs', 'else'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/InlineHTML.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/InlineHTML.php new file mode 100644 index 0000000..accebe6 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/InlineHTML.php @@ -0,0 +1,26 @@ +value = $value; + } + + public function getSubNodeNames() { + return array('value'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php new file mode 100644 index 0000000..efb5891 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php @@ -0,0 +1,31 @@ + array(): Name of extended interfaces + * 'stmts' => array(): Statements + * @param array $attributes Additional attributes + */ + public function __construct($name, array $subNodes = array(), array $attributes = array()) { + parent::__construct($attributes); + $this->name = $name; + $this->extends = isset($subNodes['extends']) ? $subNodes['extends'] : array(); + $this->stmts = isset($subNodes['stmts']) ? $subNodes['stmts'] : array(); + } + + public function getSubNodeNames() { + return array('name', 'extends', 'stmts'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Label.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Label.php new file mode 100644 index 0000000..edd0ee9 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Label.php @@ -0,0 +1,26 @@ +name = $name; + } + + public function getSubNodeNames() { + return array('name'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php new file mode 100644 index 0000000..8b2d48e --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php @@ -0,0 +1,30 @@ +name = $name; + $this->stmts = $stmts; + } + + public function getSubNodeNames() { + return array('name', 'stmts'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Nop.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Nop.php new file mode 100644 index 0000000..270dd09 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Nop.php @@ -0,0 +1,13 @@ +flags = $flags; + $this->type = $flags; + $this->props = $props; + } + + public function getSubNodeNames() { + return array('flags', 'props'); + } + + public function isPublic() { + return ($this->flags & Class_::MODIFIER_PUBLIC) !== 0 + || ($this->flags & Class_::VISIBILITY_MODIFER_MASK) === 0; + } + + public function isProtected() { + return (bool) ($this->flags & Class_::MODIFIER_PROTECTED); + } + + public function isPrivate() { + return (bool) ($this->flags & Class_::MODIFIER_PRIVATE); + } + + public function isStatic() { + return (bool) ($this->flags & Class_::MODIFIER_STATIC); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php new file mode 100644 index 0000000..b2d29dc --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php @@ -0,0 +1,30 @@ +name = $name; + $this->default = $default; + } + + public function getSubNodeNames() { + return array('name', 'default'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Return_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Return_.php new file mode 100644 index 0000000..b642841 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Return_.php @@ -0,0 +1,26 @@ +expr = $expr; + } + + public function getSubNodeNames() { + return array('expr'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php new file mode 100644 index 0000000..4bc5dd2 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php @@ -0,0 +1,30 @@ +name = $name; + $this->default = $default; + } + + public function getSubNodeNames() { + return array('name', 'default'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Static_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Static_.php new file mode 100644 index 0000000..37cc0b3 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Static_.php @@ -0,0 +1,26 @@ +vars = $vars; + } + + public function getSubNodeNames() { + return array('vars'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php new file mode 100644 index 0000000..72d667b --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php @@ -0,0 +1,30 @@ +cond = $cond; + $this->cases = $cases; + } + + public function getSubNodeNames() { + return array('cond', 'cases'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Throw_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Throw_.php new file mode 100644 index 0000000..f8ff6aa --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Throw_.php @@ -0,0 +1,26 @@ +expr = $expr; + } + + public function getSubNodeNames() { + return array('expr'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php new file mode 100644 index 0000000..a29874b --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php @@ -0,0 +1,31 @@ +traits = $traits; + $this->adaptations = $adaptations; + } + + public function getSubNodeNames() { + return array('traits', 'adaptations'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php new file mode 100644 index 0000000..c6038c8 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php @@ -0,0 +1,13 @@ +trait = $trait; + $this->method = $method; + $this->newModifier = $newModifier; + $this->newName = $newName; + } + + public function getSubNodeNames() { + return array('trait', 'method', 'newModifier', 'newName'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php new file mode 100644 index 0000000..1f6bc1f --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php @@ -0,0 +1,30 @@ +trait = $trait; + $this->method = $method; + $this->insteadof = $insteadof; + } + + public function getSubNodeNames() { + return array('trait', 'method', 'insteadof'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php new file mode 100644 index 0000000..eed5844 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php @@ -0,0 +1,26 @@ + array(): Statements + * @param array $attributes Additional attributes + */ + public function __construct($name, array $subNodes = array(), array $attributes = array()) { + parent::__construct($attributes); + $this->name = $name; + $this->stmts = isset($subNodes['stmts']) ? $subNodes['stmts'] : array(); + } + + public function getSubNodeNames() { + return array('name', 'stmts'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php new file mode 100644 index 0000000..0ff36cc --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php @@ -0,0 +1,34 @@ +stmts = $stmts; + $this->catches = $catches; + $this->finally = $finally; + } + + public function getSubNodeNames() { + return array('stmts', 'catches', 'finally'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php new file mode 100644 index 0000000..0f00fe9 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php @@ -0,0 +1,26 @@ +vars = $vars; + } + + public function getSubNodeNames() { + return array('vars'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/UseUse.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/UseUse.php new file mode 100644 index 0000000..2de8432 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/UseUse.php @@ -0,0 +1,38 @@ +getLast(); + } + + parent::__construct($attributes); + $this->type = $type; + $this->name = $name; + $this->alias = $alias; + } + + public function getSubNodeNames() { + return array('type', 'name', 'alias'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Use_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Use_.php new file mode 100644 index 0000000..6c89ebb --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Use_.php @@ -0,0 +1,43 @@ +type = $type; + $this->uses = $uses; + } + + public function getSubNodeNames() { + return array('type', 'uses'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php new file mode 100644 index 0000000..afad1b2 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php @@ -0,0 +1,30 @@ +cond = $cond; + $this->stmts = $stmts; + } + + public function getSubNodeNames() { + return array('cond', 'stmts'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeAbstract.php b/vendor/nikic/php-parser/lib/PhpParser/NodeAbstract.php new file mode 100644 index 0000000..62a96da --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/NodeAbstract.php @@ -0,0 +1,111 @@ +attributes = $attributes; + } + + /** + * Gets the type of the node. + * + * @return string Type of the node + */ + public function getType() { + return strtr(substr(rtrim(get_class($this), '_'), 15), '\\', '_'); + } + + /** + * Gets line the node started in. + * + * @return int Line + */ + public function getLine() { + return $this->getAttribute('startLine', -1); + } + + /** + * Sets line the node started in. + * + * @param int $line Line + */ + public function setLine($line) { + $this->setAttribute('startLine', (int) $line); + } + + /** + * Gets the doc comment of the node. + * + * The doc comment has to be the last comment associated with the node. + * + * @return null|Comment\Doc Doc comment object or null + */ + public function getDocComment() { + $comments = $this->getAttribute('comments'); + if (!$comments) { + return null; + } + + $lastComment = $comments[count($comments) - 1]; + if (!$lastComment instanceof Comment\Doc) { + return null; + } + + return $lastComment; + } + + /** + * Sets the doc comment of the node. + * + * This will either replace an existing doc comment or add it to the comments array. + * + * @param Comment\Doc $docComment Doc comment to set + */ + public function setDocComment(Comment\Doc $docComment) { + $comments = $this->getAttribute('comments', []); + + $numComments = count($comments); + if ($numComments > 0 && $comments[$numComments - 1] instanceof Comment\Doc) { + // Replace existing doc comment + $comments[$numComments - 1] = $docComment; + } else { + // Append new comment + $comments[] = $docComment; + } + + $this->setAttribute('comments', $comments); + } + + public function setAttribute($key, $value) { + $this->attributes[$key] = $value; + } + + public function hasAttribute($key) { + return array_key_exists($key, $this->attributes); + } + + public function &getAttribute($key, $default = null) { + if (!array_key_exists($key, $this->attributes)) { + return $default; + } else { + return $this->attributes[$key]; + } + } + + public function getAttributes() { + return $this->attributes; + } + + public function jsonSerialize() { + return ['nodeType' => $this->getType()] + get_object_vars($this); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeDumper.php b/vendor/nikic/php-parser/lib/PhpParser/NodeDumper.php new file mode 100644 index 0000000..9946eb8 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/NodeDumper.php @@ -0,0 +1,196 @@ +dumpComments = !empty($options['dumpComments']); + $this->dumpPositions = !empty($options['dumpPositions']); + } + + /** + * Dumps a node or array. + * + * @param array|Node $node Node or array to dump + * @param string|null $code Code corresponding to dumped AST. This only needs to be passed if + * the dumpPositions option is enabled and the dumping of node offsets + * is desired. + * + * @return string Dumped value + */ + public function dump($node, $code = null) { + $this->code = $code; + return $this->dumpRecursive($node); + } + + protected function dumpRecursive($node) { + if ($node instanceof Node) { + $r = $node->getType(); + if ($this->dumpPositions && null !== $p = $this->dumpPosition($node)) { + $r .= $p; + } + $r .= '('; + + foreach ($node->getSubNodeNames() as $key) { + $r .= "\n " . $key . ': '; + + $value = $node->$key; + if (null === $value) { + $r .= 'null'; + } elseif (false === $value) { + $r .= 'false'; + } elseif (true === $value) { + $r .= 'true'; + } elseif (is_scalar($value)) { + if ('flags' === $key || 'newModifier' === $key) { + $r .= $this->dumpFlags($value); + } else if ('type' === $key && $node instanceof Include_) { + $r .= $this->dumpIncludeType($value); + } else if ('type' === $key + && ($node instanceof Use_ || $node instanceof UseUse || $node instanceof GroupUse)) { + $r .= $this->dumpUseType($value); + } else { + $r .= $value; + } + } else { + $r .= str_replace("\n", "\n ", $this->dumpRecursive($value)); + } + } + + if ($this->dumpComments && $comments = $node->getAttribute('comments')) { + $r .= "\n comments: " . str_replace("\n", "\n ", $this->dumpRecursive($comments)); + } + } elseif (is_array($node)) { + $r = 'array('; + + foreach ($node as $key => $value) { + $r .= "\n " . $key . ': '; + + if (null === $value) { + $r .= 'null'; + } elseif (false === $value) { + $r .= 'false'; + } elseif (true === $value) { + $r .= 'true'; + } elseif (is_scalar($value)) { + $r .= $value; + } else { + $r .= str_replace("\n", "\n ", $this->dumpRecursive($value)); + } + } + } elseif ($node instanceof Comment) { + return $node->getReformattedText(); + } else { + throw new \InvalidArgumentException('Can only dump nodes and arrays.'); + } + + return $r . "\n)"; + } + + protected function dumpFlags($flags) { + $strs = []; + if ($flags & Class_::MODIFIER_PUBLIC) { + $strs[] = 'MODIFIER_PUBLIC'; + } + if ($flags & Class_::MODIFIER_PROTECTED) { + $strs[] = 'MODIFIER_PROTECTED'; + } + if ($flags & Class_::MODIFIER_PRIVATE) { + $strs[] = 'MODIFIER_PRIVATE'; + } + if ($flags & Class_::MODIFIER_ABSTRACT) { + $strs[] = 'MODIFIER_ABSTRACT'; + } + if ($flags & Class_::MODIFIER_STATIC) { + $strs[] = 'MODIFIER_STATIC'; + } + if ($flags & Class_::MODIFIER_FINAL) { + $strs[] = 'MODIFIER_FINAL'; + } + + if ($strs) { + return implode(' | ', $strs) . ' (' . $flags . ')'; + } else { + return $flags; + } + } + + protected function dumpIncludeType($type) { + $map = [ + Include_::TYPE_INCLUDE => 'TYPE_INCLUDE', + Include_::TYPE_INCLUDE_ONCE => 'TYPE_INCLUDE_ONCE', + Include_::TYPE_REQUIRE => 'TYPE_REQUIRE', + Include_::TYPE_REQUIRE_ONCE => 'TYPE_REQURE_ONCE', + ]; + + if (!isset($map[$type])) { + return $type; + } + return $map[$type] . ' (' . $type . ')'; + } + + protected function dumpUseType($type) { + $map = [ + Use_::TYPE_UNKNOWN => 'TYPE_UNKNOWN', + Use_::TYPE_NORMAL => 'TYPE_NORMAL', + Use_::TYPE_FUNCTION => 'TYPE_FUNCTION', + Use_::TYPE_CONSTANT => 'TYPE_CONSTANT', + ]; + + if (!isset($map[$type])) { + return $type; + } + return $map[$type] . ' (' . $type . ')'; + } + + protected function dumpPosition(Node $node) { + if (!$node->hasAttribute('startLine') || !$node->hasAttribute('endLine')) { + return null; + } + + $start = $node->getAttribute('startLine'); + $end = $node->getAttribute('endLine'); + if ($node->hasAttribute('startFilePos') && $node->hasAttribute('endFilePos') + && null !== $this->code + ) { + $start .= ':' . $this->toColumn($this->code, $node->getAttribute('startFilePos')); + $end .= ':' . $this->toColumn($this->code, $node->getAttribute('endFilePos')); + } + return "[$start - $end]"; + } + + // Copied from Error class + private function toColumn($code, $pos) { + if ($pos > strlen($code)) { + throw new \RuntimeException('Invalid position information'); + } + + $lineStartPos = strrpos($code, "\n", $pos - strlen($code)); + if (false === $lineStartPos) { + $lineStartPos = -1; + } + + return $pos - $lineStartPos; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php b/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php new file mode 100644 index 0000000..cce43d9 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php @@ -0,0 +1,204 @@ +visitors = array(); + } + + /** + * Adds a visitor. + * + * @param NodeVisitor $visitor Visitor to add + */ + public function addVisitor(NodeVisitor $visitor) { + $this->visitors[] = $visitor; + } + + /** + * Removes an added visitor. + * + * @param NodeVisitor $visitor + */ + public function removeVisitor(NodeVisitor $visitor) { + foreach ($this->visitors as $index => $storedVisitor) { + if ($storedVisitor === $visitor) { + unset($this->visitors[$index]); + break; + } + } + } + + /** + * Traverses an array of nodes using the registered visitors. + * + * @param Node[] $nodes Array of nodes + * + * @return Node[] Traversed array of nodes + */ + public function traverse(array $nodes) { + $this->stopTraversal = false; + + foreach ($this->visitors as $visitor) { + if (null !== $return = $visitor->beforeTraverse($nodes)) { + $nodes = $return; + } + } + + $nodes = $this->traverseArray($nodes); + + foreach ($this->visitors as $visitor) { + if (null !== $return = $visitor->afterTraverse($nodes)) { + $nodes = $return; + } + } + + return $nodes; + } + + protected function traverseNode(Node $node) { + foreach ($node->getSubNodeNames() as $name) { + $subNode =& $node->$name; + + if (is_array($subNode)) { + $subNode = $this->traverseArray($subNode); + if ($this->stopTraversal) { + break; + } + } elseif ($subNode instanceof Node) { + $traverseChildren = true; + foreach ($this->visitors as $visitor) { + $return = $visitor->enterNode($subNode); + if (self::DONT_TRAVERSE_CHILDREN === $return) { + $traverseChildren = false; + } else if (self::STOP_TRAVERSAL === $return) { + $this->stopTraversal = true; + break 2; + } else if (null !== $return) { + $subNode = $return; + } + } + + if ($traverseChildren) { + $subNode = $this->traverseNode($subNode); + if ($this->stopTraversal) { + break; + } + } + + foreach ($this->visitors as $visitor) { + $return = $visitor->leaveNode($subNode); + if (self::STOP_TRAVERSAL === $return) { + $this->stopTraversal = true; + break 2; + } else if (null !== $return) { + if (is_array($return)) { + throw new \LogicException( + 'leaveNode() may only return an array ' . + 'if the parent structure is an array' + ); + } + $subNode = $return; + } + } + } + } + + return $node; + } + + protected function traverseArray(array $nodes) { + $doNodes = array(); + + foreach ($nodes as $i => &$node) { + if (is_array($node)) { + $node = $this->traverseArray($node); + if ($this->stopTraversal) { + break; + } + } elseif ($node instanceof Node) { + $traverseChildren = true; + foreach ($this->visitors as $visitor) { + $return = $visitor->enterNode($node); + if (self::DONT_TRAVERSE_CHILDREN === $return) { + $traverseChildren = false; + } else if (self::STOP_TRAVERSAL === $return) { + $this->stopTraversal = true; + break 2; + } else if (null !== $return) { + $node = $return; + } + } + + if ($traverseChildren) { + $node = $this->traverseNode($node); + if ($this->stopTraversal) { + break; + } + } + + foreach ($this->visitors as $visitor) { + $return = $visitor->leaveNode($node); + + if (self::REMOVE_NODE === $return) { + $doNodes[] = array($i, array()); + break; + } else if (self::STOP_TRAVERSAL === $return) { + $this->stopTraversal = true; + break 2; + } elseif (is_array($return)) { + $doNodes[] = array($i, $return); + break; + } elseif (null !== $return) { + $node = $return; + } + } + } + } + + if (!empty($doNodes)) { + while (list($i, $replace) = array_pop($doNodes)) { + array_splice($nodes, $i, 1, $replace); + } + } + + return $nodes; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeTraverserInterface.php b/vendor/nikic/php-parser/lib/PhpParser/NodeTraverserInterface.php new file mode 100644 index 0000000..0f88e46 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/NodeTraverserInterface.php @@ -0,0 +1,30 @@ + $node stays as-is + * * NodeTraverser::DONT_TRAVERSE_CHILDREN + * => Children of $node are not traversed. $node stays as-is + * * NodeTraverser::STOP_TRAVERSAL + * => Traversal is aborted. $node stays as-is + * * otherwise + * => $node is set to the return value + * + * @param Node $node Node + * + * @return null|int|Node Node + */ + public function enterNode(Node $node); + + /** + * Called when leaving a node. + * + * Return value semantics: + * * null + * => $node stays as-is + * * NodeTraverser::REMOVE_NODE + * => $node is removed from the parent array + * * NodeTraverser::STOP_TRAVERSAL + * => Traversal is aborted. $node stays as-is + * * array (of Nodes) + * => The return value is merged into the parent array (at the position of the $node) + * * otherwise + * => $node is set to the return value + * + * @param Node $node Node + * + * @return null|false|int|Node|Node[] Node + */ + public function leaveNode(Node $node); + + /** + * Called once after traversal. + * + * Return value semantics: + * * null: $nodes stays as-is + * * otherwise: $nodes is set to the return value + * + * @param Node[] $nodes Array of nodes + * + * @return null|Node[] Array of nodes + */ + public function afterTraverse(array $nodes); +} \ No newline at end of file diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php new file mode 100644 index 0000000..d56812b --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php @@ -0,0 +1,272 @@ + [aliasName => originalName]] */ + protected $aliases; + + /** @var ErrorHandler Error handler */ + protected $errorHandler; + + /** @var bool Whether to preserve original names */ + protected $preserveOriginalNames; + + /** + * Constructs a name resolution visitor. + * + * Options: If "preserveOriginalNames" is enabled, an "originalName" attribute will be added to + * all name nodes that underwent resolution. + * + * @param ErrorHandler|null $errorHandler Error handler + * @param array $options Options + */ + public function __construct(ErrorHandler $errorHandler = null, array $options = []) { + $this->errorHandler = $errorHandler ?: new ErrorHandler\Throwing; + $this->preserveOriginalNames = !empty($options['preserveOriginalNames']); + } + + public function beforeTraverse(array $nodes) { + $this->resetState(); + } + + public function enterNode(Node $node) { + if ($node instanceof Stmt\Namespace_) { + $this->resetState($node->name); + } elseif ($node instanceof Stmt\Use_) { + foreach ($node->uses as $use) { + $this->addAlias($use, $node->type, null); + } + } elseif ($node instanceof Stmt\GroupUse) { + foreach ($node->uses as $use) { + $this->addAlias($use, $node->type, $node->prefix); + } + } elseif ($node instanceof Stmt\Class_) { + if (null !== $node->extends) { + $node->extends = $this->resolveClassName($node->extends); + } + + foreach ($node->implements as &$interface) { + $interface = $this->resolveClassName($interface); + } + + if (null !== $node->name) { + $this->addNamespacedName($node); + } + } elseif ($node instanceof Stmt\Interface_) { + foreach ($node->extends as &$interface) { + $interface = $this->resolveClassName($interface); + } + + $this->addNamespacedName($node); + } elseif ($node instanceof Stmt\Trait_) { + $this->addNamespacedName($node); + } elseif ($node instanceof Stmt\Function_) { + $this->addNamespacedName($node); + $this->resolveSignature($node); + } elseif ($node instanceof Stmt\ClassMethod + || $node instanceof Expr\Closure + ) { + $this->resolveSignature($node); + } elseif ($node instanceof Stmt\Const_) { + foreach ($node->consts as $const) { + $this->addNamespacedName($const); + } + } elseif ($node instanceof Expr\StaticCall + || $node instanceof Expr\StaticPropertyFetch + || $node instanceof Expr\ClassConstFetch + || $node instanceof Expr\New_ + || $node instanceof Expr\Instanceof_ + ) { + if ($node->class instanceof Name) { + $node->class = $this->resolveClassName($node->class); + } + } elseif ($node instanceof Stmt\Catch_) { + foreach ($node->types as &$type) { + $type = $this->resolveClassName($type); + } + } elseif ($node instanceof Expr\FuncCall) { + if ($node->name instanceof Name) { + $node->name = $this->resolveOtherName($node->name, Stmt\Use_::TYPE_FUNCTION); + } + } elseif ($node instanceof Expr\ConstFetch) { + $node->name = $this->resolveOtherName($node->name, Stmt\Use_::TYPE_CONSTANT); + } elseif ($node instanceof Stmt\TraitUse) { + foreach ($node->traits as &$trait) { + $trait = $this->resolveClassName($trait); + } + + foreach ($node->adaptations as $adaptation) { + if (null !== $adaptation->trait) { + $adaptation->trait = $this->resolveClassName($adaptation->trait); + } + + if ($adaptation instanceof Stmt\TraitUseAdaptation\Precedence) { + foreach ($adaptation->insteadof as &$insteadof) { + $insteadof = $this->resolveClassName($insteadof); + } + } + } + } + } + + protected function resetState(Name $namespace = null) { + $this->namespace = $namespace; + $this->aliases = array( + Stmt\Use_::TYPE_NORMAL => array(), + Stmt\Use_::TYPE_FUNCTION => array(), + Stmt\Use_::TYPE_CONSTANT => array(), + ); + } + + protected function addAlias(Stmt\UseUse $use, $type, Name $prefix = null) { + // Add prefix for group uses + $name = $prefix ? Name::concat($prefix, $use->name) : $use->name; + // Type is determined either by individual element or whole use declaration + $type |= $use->type; + + // Constant names are case sensitive, everything else case insensitive + if ($type === Stmt\Use_::TYPE_CONSTANT) { + $aliasName = $use->alias; + } else { + $aliasName = strtolower($use->alias); + } + + if (isset($this->aliases[$type][$aliasName])) { + $typeStringMap = array( + Stmt\Use_::TYPE_NORMAL => '', + Stmt\Use_::TYPE_FUNCTION => 'function ', + Stmt\Use_::TYPE_CONSTANT => 'const ', + ); + + $this->errorHandler->handleError(new Error( + sprintf( + 'Cannot use %s%s as %s because the name is already in use', + $typeStringMap[$type], $name, $use->alias + ), + $use->getAttributes() + )); + return; + } + + $this->aliases[$type][$aliasName] = $name; + } + + /** @param Stmt\Function_|Stmt\ClassMethod|Expr\Closure $node */ + private function resolveSignature($node) { + foreach ($node->params as $param) { + $param->type = $this->resolveType($param->type); + } + $node->returnType = $this->resolveType($node->returnType); + } + + private function resolveType($node) { + if ($node instanceof Node\NullableType) { + $node->type = $this->resolveType($node->type); + return $node; + } + if ($node instanceof Name) { + return $this->resolveClassName($node); + } + return $node; + } + + protected function resolveClassName(Name $name) { + if ($this->preserveOriginalNames) { + // Save the original name + $originalName = $name; + $name = clone $originalName; + $name->setAttribute('originalName', $originalName); + } + + // don't resolve special class names + if (in_array(strtolower($name->toString()), array('self', 'parent', 'static'))) { + if (!$name->isUnqualified()) { + $this->errorHandler->handleError(new Error( + sprintf("'\\%s' is an invalid class name", $name->toString()), + $name->getAttributes() + )); + } + return $name; + } + + // fully qualified names are already resolved + if ($name->isFullyQualified()) { + return $name; + } + + $aliasName = strtolower($name->getFirst()); + if (!$name->isRelative() && isset($this->aliases[Stmt\Use_::TYPE_NORMAL][$aliasName])) { + // resolve aliases (for non-relative names) + $alias = $this->aliases[Stmt\Use_::TYPE_NORMAL][$aliasName]; + return FullyQualified::concat($alias, $name->slice(1), $name->getAttributes()); + } + + // if no alias exists prepend current namespace + return FullyQualified::concat($this->namespace, $name, $name->getAttributes()); + } + + protected function resolveOtherName(Name $name, $type) { + if ($this->preserveOriginalNames) { + // Save the original name + $originalName = $name; + $name = clone $originalName; + $name->setAttribute('originalName', $originalName); + } + + // fully qualified names are already resolved + if ($name->isFullyQualified()) { + return $name; + } + + // resolve aliases for qualified names + $aliasName = strtolower($name->getFirst()); + if ($name->isQualified() && isset($this->aliases[Stmt\Use_::TYPE_NORMAL][$aliasName])) { + $alias = $this->aliases[Stmt\Use_::TYPE_NORMAL][$aliasName]; + return FullyQualified::concat($alias, $name->slice(1), $name->getAttributes()); + } + + if ($name->isUnqualified()) { + if ($type === Stmt\Use_::TYPE_CONSTANT) { + // constant aliases are case-sensitive, function aliases case-insensitive + $aliasName = $name->getFirst(); + } + + if (isset($this->aliases[$type][$aliasName])) { + // resolve unqualified aliases + return new FullyQualified($this->aliases[$type][$aliasName], $name->getAttributes()); + } + + if (null === $this->namespace) { + // outside of a namespace unaliased unqualified is same as fully qualified + return new FullyQualified($name, $name->getAttributes()); + } + + // unqualified names inside a namespace cannot be resolved at compile-time + // add the namespaced version of the name as an attribute + $name->setAttribute('namespacedName', + FullyQualified::concat($this->namespace, $name, $name->getAttributes())); + return $name; + } + + // if no alias exists prepend current namespace + return FullyQualified::concat($this->namespace, $name, $name->getAttributes()); + } + + protected function addNamespacedName(Node $node) { + $node->namespacedName = Name::concat($this->namespace, $node->name); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitorAbstract.php b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitorAbstract.php new file mode 100644 index 0000000..3e1743a --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitorAbstract.php @@ -0,0 +1,14 @@ +parsers = $parsers; + } + + public function parse($code, ErrorHandler $errorHandler = null) { + if (null === $errorHandler) { + $errorHandler = new ErrorHandler\Throwing; + } + + list($firstStmts, $firstError) = $this->tryParse($this->parsers[0], $errorHandler, $code); + if ($firstError === null) { + return $firstStmts; + } + + for ($i = 1, $c = count($this->parsers); $i < $c; ++$i) { + list($stmts, $error) = $this->tryParse($this->parsers[$i], $errorHandler, $code); + if ($error === null) { + return $stmts; + } + } + + throw $firstError; + } + + private function tryParse(Parser $parser, ErrorHandler $errorHandler, $code) { + $stmts = null; + $error = null; + try { + $stmts = $parser->parse($code, $errorHandler); + } catch (Error $error) {} + return [$stmts, $error]; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Parser/Php5.php b/vendor/nikic/php-parser/lib/PhpParser/Parser/Php5.php new file mode 100644 index 0000000..4837b08 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Parser/Php5.php @@ -0,0 +1,3128 @@ +'", + "T_IS_GREATER_OR_EQUAL", + "T_SL", + "T_SR", + "'+'", + "'-'", + "'.'", + "'*'", + "'/'", + "'%'", + "'!'", + "T_INSTANCEOF", + "'~'", + "T_INC", + "T_DEC", + "T_INT_CAST", + "T_DOUBLE_CAST", + "T_STRING_CAST", + "T_ARRAY_CAST", + "T_OBJECT_CAST", + "T_BOOL_CAST", + "T_UNSET_CAST", + "'@'", + "T_POW", + "'['", + "T_NEW", + "T_CLONE", + "T_EXIT", + "T_IF", + "T_ELSEIF", + "T_ELSE", + "T_ENDIF", + "T_LNUMBER", + "T_DNUMBER", + "T_STRING", + "T_STRING_VARNAME", + "T_VARIABLE", + "T_NUM_STRING", + "T_INLINE_HTML", + "T_ENCAPSED_AND_WHITESPACE", + "T_CONSTANT_ENCAPSED_STRING", + "T_ECHO", + "T_DO", + "T_WHILE", + "T_ENDWHILE", + "T_FOR", + "T_ENDFOR", + "T_FOREACH", + "T_ENDFOREACH", + "T_DECLARE", + "T_ENDDECLARE", + "T_AS", + "T_SWITCH", + "T_ENDSWITCH", + "T_CASE", + "T_DEFAULT", + "T_BREAK", + "T_CONTINUE", + "T_GOTO", + "T_FUNCTION", + "T_CONST", + "T_RETURN", + "T_TRY", + "T_CATCH", + "T_FINALLY", + "T_THROW", + "T_USE", + "T_INSTEADOF", + "T_GLOBAL", + "T_STATIC", + "T_ABSTRACT", + "T_FINAL", + "T_PRIVATE", + "T_PROTECTED", + "T_PUBLIC", + "T_VAR", + "T_UNSET", + "T_ISSET", + "T_EMPTY", + "T_HALT_COMPILER", + "T_CLASS", + "T_TRAIT", + "T_INTERFACE", + "T_EXTENDS", + "T_IMPLEMENTS", + "T_OBJECT_OPERATOR", + "T_LIST", + "T_ARRAY", + "T_CALLABLE", + "T_CLASS_C", + "T_TRAIT_C", + "T_METHOD_C", + "T_FUNC_C", + "T_LINE", + "T_FILE", + "T_START_HEREDOC", + "T_END_HEREDOC", + "T_DOLLAR_OPEN_CURLY_BRACES", + "T_CURLY_OPEN", + "T_PAAMAYIM_NEKUDOTAYIM", + "T_NAMESPACE", + "T_NS_C", + "T_DIR", + "T_NS_SEPARATOR", + "T_ELLIPSIS", + "';'", + "'{'", + "'}'", + "'('", + "')'", + "'$'", + "'`'", + "']'", + "'\"'" + ); + + protected $tokenToSymbol = array( + 0, 157, 157, 157, 157, 157, 157, 157, 157, 157, + 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, + 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, + 157, 157, 157, 53, 156, 157, 153, 52, 35, 157, + 151, 152, 50, 47, 7, 48, 49, 51, 157, 157, + 157, 157, 157, 157, 157, 157, 157, 157, 29, 148, + 41, 15, 43, 28, 65, 157, 157, 157, 157, 157, + 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, + 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, + 157, 67, 157, 155, 34, 157, 154, 157, 157, 157, + 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, + 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, + 157, 157, 157, 149, 33, 150, 55, 157, 157, 157, + 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, + 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, + 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, + 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, + 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, + 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, + 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, + 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, + 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, + 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, + 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, + 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, + 157, 157, 157, 157, 157, 157, 1, 2, 3, 4, + 5, 6, 8, 9, 10, 11, 12, 13, 14, 16, + 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, + 27, 30, 31, 32, 36, 37, 38, 39, 40, 42, + 44, 45, 46, 54, 56, 57, 58, 59, 60, 61, + 62, 63, 64, 66, 68, 69, 70, 71, 72, 73, + 74, 75, 76, 77, 78, 79, 80, 81, 157, 157, + 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, + 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, + 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 157, 157, 157, 157, + 157, 157, 138, 139, 140, 141, 142, 143, 144, 145, + 146, 147 + ); + + protected $action = array( + 672, 673, 674, 675, 676,-32766, 677, 678, 679, 715, + 716, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 0, 225, 226, 227, 228, 229, 230, 231, 232, 233, + 234, 235, 236,-32766,-32766,-32766,-32766,-32766,-32766,-32766, + -32766,-32767,-32767,-32767,-32767, 441, 237, 238,-32766,-32766, + -32766,-32766, 680,-32766, 1036,-32766,-32766,-32766,-32766,-32766, + -32766,-32767,-32767,-32767,-32767,-32767, 681, 682, 683, 684, + 685, 686, 687, 909, 329, 747,-32766,-32766,-32766,-32766, + -32766, 282, 688, 689, 690, 691, 692, 693, 694, 695, + 696, 697, 698, 718, 719, 720, 721, 722, 710, 711, + 712, 713, 714, 699, 700, 701, 702, 703, 704, 705, + 741, 742, 743, 744, 745, 746, 706, 707, 708, 709, + 739, 730, 728, 729, 725, 726, 1178, 717, 723, 724, + 731, 732, 734, 733, 735, 736, 52, 53, 420, 54, + 55, 727, 738, 737, 23, 56, 57, 284, 58,-32766, + -32766,-32766,-32766,-32766,-32766,-32766,-32766,-32766, 7,-32767, + -32767,-32767,-32767, 50, 325,-32766, 585, 945, 946, 947, + 944, 943, 942, 937, 1213, 27, 1215, 1214, 763, 764, + 821, 59, 60,-32766,-32766,-32766, 809, 61, 1172, 62, + 291, 292, 63, 64, 65, 66, 67, 68, 69, 70, + 334, 24, 299, 71, 413,-32766,-32766,-32766, 1185, 1087, + 1088, 749, 633, 1178, 213, 214, 215, 464,-32766,-32766, + -32766, 822, 407, 1099, 311,-32766, 1186,-32766,-32766,-32766, + -32766,-32766,-32766, 1036, 200, -269, 428,-32766,-32766,-32766, + -32766,-32766,-32766,-32766,-32766, 120, 491, 945, 946, 947, + 944, 943, 942, 306, 473, 474, 293, 623, 125,-32766, + 893, 894, 339, 477, 478,-32766, 1093, 1094, 1095, 1096, + 1090, 1091, 307, 492,-32766, 440, 425, 492, 1097, 1092, + 425, 121, -220, 869, 1182, 39, 280, 334, 321, 900, + 322, 421, -122, -122, -122, -4, 822, 463, 99, 100, + 101, 811, 301, 119, 38, 19, 422, -122, 465, -122, + 466, -122, 467, -122, 102, 423, -122, -122, -122, 28, + 29, 468, 424, 624, 30, 469, 425, 812, 72, 297, + 923, 349, 350, 470, 471,-32766,-32766,-32766, 419, 472, + 1036, 447, 793, 840, 475, 476,-32767,-32767,-32767,-32767, + 94, 95, 96, 97, 98,-32766, 126,-32766,-32766,-32766, + -32766, 1137, 213, 214, 215, 295, 421, 239, 824, 638, + -122, 1036, 463, 893, 894, 1205, 811, 1036, 1204, 38, + 19, 422, 200, 465, 356, 466, 492, 467, 127, 425, + 423, 213, 214, 215, 28, 29, 468, 424, 414, 30, + 469, 1036, 870, 72, 320, 822, 349, 350, 470, 471, + 34, 200, 214, 215, 472, 460, 762, 755, 840, 475, + 476, 213, 214, 215, 295, -216, 76, 77, 78, 46, + 298, 200, 412, 653, 338, 438, 31, 294, 333, 8, + 348, 200, 241, 824, 638, -4, 32, 332, 79, 80, + 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, + 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, + 101, 1210, 301, 204, 822, 421, 805, 124,-32766,-32766, + -32766, 463, 899, 1054, 102, 811, 18, 206, 38, 19, + 422, 518, 465, 1172, 466, 546, 467, 47,-32766, 423, + -32766,-32766, 647, 28, 29, 468, 822, 801, 30, 469, + 415, 116, 72, 803, 49, 349, 350,-32766,-32766,-32766, + -32766,-32766,-32766, 472, 477, 808, 234, 235, 236, 213, + 214, 215, 1036, 215, 644, 1138, 124,-32766,-32766,-32766, + -32766,-32766, 237, 238, 421, 231, 232, 233, 1099, 200, + 463, 200, 824, 638, 811, 439, 918, 38, 19, 422, + 1036, 465, 242, 466, 749, 467, 1178, 339, 423, 96, + 97, 98, 28, 29, 468, 822, 421, 30, 469, 117, + 919, 72, 463, 283, 349, 350, 811, 244, 1036, 38, + 19, 422, 472, 465, 243, 466, 118, 467, 377, 1064, + 423, 1036, 207, 642, 28, 29, 468, 822, 129, 30, + 469, 296, 576, 72,-32766,-32766, 349, 350, 123, 205, + 492, 824, 638, 425, 472, 115,-32766,-32766,-32766, 434, + 492, 200, 640, 425, 820, 641,-32766,-32766, 429,-32766, + 334, 237, 238, 454, 591, 421,-32766, 130, 357, 449, + 20, 463, 128, 856, 638, 811, 763, 764, 38, 19, + 422, 313, 465, 646, 466, 650, 467, 599, 600, 423, + 833, 301, 605, 28, 29, 468, 822, 421, 30, 469, + 756, 643, 72, 463, 299, 349, 350, 811, 922, 666, + 38, 19, 422, 472, 465, 102, 466, 51, 467, 934, + 656, 423, 512, 433, 48, 28, 29, 468, 41, 42, + 30, 469, 43, 44, 72, 45, 435, 349, 350, 1057, + 750, 1208, 824, 638, 776, 472, 749, 33, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, + 534, 533, 517, 513, 524, 437, 421, 602, 516, 622, + 612, 619, 463, 582, 824, 638, 811, 595,-32766, 38, + 19, 422, 632, 465, 579, 466, 240, 467, 975, 977, + 423, 609, 1144, 279, 28, 29, 468, 12, -80, 30, + 469, 537, 432, 72, 208, 209, 349, 350, 458, 1098, + 210, 596, 211, 328, 472, 326, 11, 842, 323, 393, + 4, 385, 408, 303, 202, 1034, 0, 0, 324, 208, + 209, 841, 1087, 1088, 0, 210,-32766, 211, -497, -498, + 1089, 312, 310, 824, 638, 477, 0, 0, 0, 202, + 0, -398, 0, 0, 9, 0, 0, 1087, 1088, 3, + -497,-32766, -406, 370, -407, 1089, 835, 639, 0, 384, + 372, 409, 526, 434, 0, 0, 864, 857, 863, 872, + 0, 813, 798, 819, 807, 761, 661, 565, 760, 1093, + 1094, 1095, 1096, 1090, 1091, 383, 37, 36, 759, 926, + 810, 1097, 1092, 854, 852, 302, 806, 929, 212, 818, + -32766, 930, 565, 928, 1093, 1094, 1095, 1096, 1090, 1091, + 383, 927, 796, 804, 660, 802, 1097, 1092, 649, 651, + 75, 0, 652, 212, 654,-32766, 655, 658, 663, 664, + 665, 405, 122, 330, 331, 406, 0, 1211, 757, 758, + 839, 838, 766, 453, 1209, 1179, 1177, 1163, 1175, 1078, + 911, 1183, 1173, 829, 836, 1038, 1039, 827, 935, 1212, + 765, 837, 794, 662, 1050, 768, 767, 861, 862, 0, + 304, 290, 289, 25, 26, 281, 203, 74, 305, 336, + 411, 417, 35, 73,-32766, 40, 22, 0, 1015, 569, + -217, 1016, 1103, 1080, 901, 1040, 1044, 1041, 629, 559, + 461, 457, 455, 450, 378, 16, 15, 14, -216, 0, + 0, -416, 0, 1045, 603, 1157, 1104, 1207, 1077, 1174, + 1158, 1162, 1176, 1063, 1048, 1049, 1046, 1047, 0, 1143 + ); + + protected $actionCheck = array( + 2, 3, 4, 5, 6, 8, 8, 9, 10, 11, + 12, 31, 32, 33, 34, 35, 36, 37, 38, 39, + 0, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 8, 9, 10, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 7, 66, 67, 31, 32, + 33, 34, 54, 28, 12, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 68, 69, 70, 71, + 72, 73, 74, 79, 7, 77, 31, 32, 33, 34, + 35, 7, 84, 85, 86, 87, 88, 89, 90, 91, + 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, + 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 126, 127, 79, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 2, 3, 4, 5, + 6, 143, 144, 145, 7, 11, 12, 153, 14, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 103, 41, + 42, 43, 44, 67, 109, 79, 82, 112, 113, 114, + 115, 116, 117, 118, 77, 7, 79, 80, 102, 103, + 1, 47, 48, 8, 9, 10, 148, 53, 79, 55, + 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, + 153, 67, 68, 69, 70, 8, 9, 10, 1, 75, + 76, 77, 77, 79, 8, 9, 10, 83, 8, 9, + 10, 1, 146, 139, 128, 28, 152, 30, 31, 32, + 33, 34, 35, 12, 28, 79, 102, 151, 28, 153, + 30, 31, 32, 33, 34, 149, 112, 112, 113, 114, + 115, 116, 117, 7, 120, 121, 35, 77, 149, 103, + 130, 131, 153, 129, 130, 109, 132, 133, 134, 135, + 136, 137, 138, 143, 118, 7, 146, 143, 144, 145, + 146, 7, 152, 29, 77, 151, 13, 153, 154, 152, + 156, 71, 72, 73, 74, 0, 1, 77, 50, 51, + 52, 81, 54, 13, 84, 85, 86, 87, 88, 89, + 90, 91, 92, 93, 66, 95, 96, 97, 98, 99, + 100, 101, 102, 143, 104, 105, 146, 148, 108, 7, + 150, 111, 112, 113, 114, 8, 9, 10, 7, 119, + 12, 7, 122, 123, 124, 125, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 28, 149, 30, 31, 32, + 33, 155, 8, 9, 10, 35, 71, 13, 148, 149, + 150, 12, 77, 130, 131, 79, 81, 12, 82, 84, + 85, 86, 28, 88, 7, 90, 143, 92, 67, 146, + 95, 8, 9, 10, 99, 100, 101, 102, 103, 104, + 105, 12, 148, 108, 109, 1, 111, 112, 113, 114, + 13, 28, 9, 10, 119, 7, 148, 122, 123, 124, + 125, 8, 9, 10, 35, 152, 8, 9, 10, 67, + 35, 28, 7, 29, 67, 29, 140, 141, 143, 7, + 7, 28, 29, 148, 149, 150, 28, 7, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 150, 54, 7, 1, 71, 148, 147, 8, 9, + 10, 77, 152, 152, 66, 81, 152, 15, 84, 85, + 86, 82, 88, 79, 90, 128, 92, 67, 28, 95, + 30, 31, 29, 99, 100, 101, 1, 148, 104, 105, + 123, 149, 108, 148, 67, 111, 112, 8, 9, 10, + 31, 32, 33, 119, 129, 148, 50, 51, 52, 8, + 9, 10, 12, 10, 29, 152, 147, 28, 151, 30, + 31, 32, 66, 67, 71, 47, 48, 49, 139, 28, + 77, 28, 148, 149, 81, 149, 148, 84, 85, 86, + 12, 88, 15, 90, 77, 92, 79, 153, 95, 47, + 48, 49, 99, 100, 101, 1, 71, 104, 105, 149, + 148, 108, 77, 35, 111, 112, 81, 15, 12, 84, + 85, 86, 119, 88, 15, 90, 149, 92, 78, 112, + 95, 12, 15, 29, 99, 100, 101, 1, 149, 104, + 105, 35, 153, 108, 31, 32, 111, 112, 29, 15, + 143, 148, 149, 146, 119, 15, 8, 9, 10, 146, + 143, 28, 149, 146, 29, 29, 8, 9, 151, 31, + 153, 66, 67, 72, 73, 71, 28, 97, 98, 72, + 73, 77, 29, 148, 149, 81, 102, 103, 84, 85, + 86, 29, 88, 29, 90, 29, 92, 106, 107, 95, + 35, 54, 74, 99, 100, 101, 1, 71, 104, 105, + 148, 149, 108, 77, 68, 111, 112, 81, 148, 149, + 84, 85, 86, 119, 88, 66, 90, 67, 92, 148, + 149, 95, 77, 77, 67, 99, 100, 101, 67, 67, + 104, 105, 67, 67, 108, 67, 77, 111, 112, 79, + 77, 77, 148, 149, 77, 119, 77, 15, 16, 17, + 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, + 77, 77, 77, 77, 82, 86, 71, 79, 79, 79, + 79, 91, 77, 96, 148, 149, 81, 96, 82, 84, + 85, 86, 89, 88, 87, 90, 29, 92, 56, 57, + 95, 93, 139, 94, 99, 100, 101, 94, 94, 104, + 105, 94, 102, 108, 47, 48, 111, 112, 102, 139, + 53, 109, 55, 126, 119, 110, 142, 123, 126, 146, + 142, 146, 146, 151, 67, 154, -1, -1, 127, 47, + 48, 123, 75, 76, -1, 53, 79, 55, 128, 128, + 83, 128, 128, 148, 149, 129, -1, -1, -1, 67, + -1, 142, -1, -1, 142, -1, -1, 75, 76, 142, + 128, 79, 142, 142, 142, 83, 147, 149, -1, 146, + 146, 146, 146, 146, -1, -1, 148, 148, 148, 148, + -1, 148, 148, 148, 148, 148, 148, 130, 148, 132, + 133, 134, 135, 136, 137, 138, 148, 148, 148, 148, + 148, 144, 145, 148, 148, 151, 148, 148, 151, 148, + 153, 148, 130, 148, 132, 133, 134, 135, 136, 137, + 138, 148, 148, 148, 148, 148, 144, 145, 149, 149, + 149, -1, 149, 151, 149, 153, 149, 149, 149, 149, + 149, 149, 149, 149, 149, 149, -1, 150, 150, 150, + 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, + 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, + 150, 150, 150, 150, 150, 150, 150, 150, 150, -1, + 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, + 151, 151, 151, 151, 151, 151, 151, -1, 152, 152, + 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, + 152, 152, 152, 152, 152, 152, 152, 152, 152, -1, + -1, 154, -1, 155, 155, 155, 155, 155, 155, 155, + 155, 155, 155, 155, 155, 155, 155, 155, -1, 156 + ); + + protected $actionBase = array( + 0, 220, 295, 109, 109, 180, 745, -2, -2, -2, + -2, -2, 135, 574, 473, 404, 473, 606, 505, 675, + 675, 675, 330, 389, 221, 221, 831, 221, 359, 365, + 328, 520, 589, 548, 576, 42, 42, 42, 42, 134, + 134, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 254, 179, 290, 397, 757, 755, 738, 741, 833, + 679, 829, 784, 785, 623, 786, 787, 788, 789, 790, + 783, 791, 849, 792, 418, 418, 418, 418, 418, 418, + 418, 418, 418, 418, 418, -3, 354, 383, 413, 206, + 628, 521, 521, 521, 521, 521, 521, 521, 175, 175, + 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, + 175, 175, 175, 175, 175, 403, 618, 618, 618, 523, + 737, 603, 762, 762, 762, 762, 762, 762, 762, 762, + 762, 762, 762, 762, 762, 762, 762, 762, 762, 762, + 762, 762, 762, 762, 762, 762, 762, 762, 762, 762, + 762, 762, 762, 762, 762, 762, 762, 762, 762, 762, + 762, 762, 762, 762, 762, 470, -20, -20, 509, 608, + 327, 583, 210, 489, 197, 25, 25, 25, 25, 25, + 17, 45, 5, 5, 5, 5, 712, 305, 305, 305, + 305, 118, 118, 118, 118, 780, 781, 801, 804, 395, + 395, 696, 696, 616, 773, 522, 522, 498, 498, 487, + 487, 487, 487, 487, 487, 487, 487, 487, 487, 387, + 156, 823, 130, 130, 130, 130, 243, 409, 633, 863, + 207, 207, 207, 243, 248, 248, 248, 476, 476, 476, + 76, 662, 296, 86, 86, 86, 86, 296, 86, 86, + 554, 554, 554, 483, 761, 676, 477, 430, 97, 459, + 657, 807, 661, 808, 540, 702, 96, 656, 705, -6, + 680, 577, 571, 561, 689, 406, -6, 254, 551, 447, + 617, 732, 663, 268, 730, 377, 38, 367, 532, 362, + 414, 334, 774, 720, 827, 826, 74, 321, 691, 617, + 617, 617, 137, 84, 775, 772, 362, 273, 575, 575, + 575, 575, 806, 776, 575, 575, 575, 575, 805, 800, + 432, 408, 782, 331, 731, 649, 649, 649, 649, 649, + 649, 635, 649, 813, 666, 825, 825, 664, 668, 635, + 824, 824, 824, 824, 635, 649, 825, 825, 635, 616, + 825, 168, 635, 672, 649, 667, 667, 824, 756, 718, + 666, 669, 681, 825, 825, 825, 681, 664, 635, 824, + 682, 699, 466, 825, 824, 632, 632, 682, 635, 632, + 668, 632, 20, 605, 641, 821, 822, 820, 625, 698, + 688, 674, 811, 810, 816, 665, 626, 814, 812, 706, + 717, 716, 639, 610, 642, 645, 646, 648, 697, 637, + 694, 680, 707, 629, 629, 629, 690, 658, 690, 629, + 629, 629, 629, 629, 629, 629, 629, 848, 700, 701, + 693, 659, 715, 604, 704, 687, 472, 768, 650, 706, + 706, 802, 835, 842, 847, 651, 643, 734, 837, 690, + 862, 729, 274, 587, 652, 803, 703, 647, 655, 690, + 809, 690, 769, 690, 834, 799, 644, 706, 779, 629, + 832, 861, 860, 859, 858, 857, 856, 855, 854, 630, + 853, 714, 677, 841, 246, 815, 689, 692, 653, 713, + 67, 852, 778, 690, 690, 770, 761, 690, 771, 711, + 728, 845, 710, 840, 851, 650, 839, 690, 686, 850, + 67, 634, 598, 828, 678, 708, 819, 671, 830, 818, + 759, 547, 579, 777, 636, 754, 844, 843, 846, 709, + 760, 763, 572, 660, 640, 670, 793, 765, 817, 735, + 794, 795, 836, 684, 707, 654, 685, 683, 673, 767, + 796, 838, 736, 739, 743, 797, 753, 798, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 134, 134, + -2, -2, -2, -2, 0, 0, 0, 0, 0, -2, + 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, + 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, + 134, 134, 134, 134, 134, 134, 0, 0, 134, 134, + 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, + 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, + 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, + 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, + 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, + 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, + 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, + 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, + 134, 134, 134, 134, 134, 134, 134, 134, 418, 418, + 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, + 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, + 418, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 418, -20, -20, -20, -20, 418, -20, -20, + -20, -20, -20, -20, -20, 418, 418, 418, 418, 418, + 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, + 418, 418, -20, 418, 418, 418, -20, 487, -20, 487, + 487, 487, 487, 487, 487, 487, 487, 487, 487, 487, + 487, 487, 487, 487, 487, 487, 487, 487, 487, 487, + 487, 487, 487, 487, 487, 487, 487, 487, 487, 487, + 487, 487, 487, 487, 487, 487, 487, 487, 487, 487, + 487, 487, 418, 0, 0, 418, -20, 418, -20, 418, + -20, 418, 418, 418, 418, 418, 418, -20, -20, -20, + -20, -20, -20, 0, 248, 248, 248, 248, -20, -20, + -20, -20, 55, 55, 55, 55, 487, 487, 487, 487, + 487, 487, 248, 248, 476, 476, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 487, 55, 487, 649, + 649, 649, 649, 649, 296, 296, 296, 47, 47, 47, + 649, 0, 0, 0, 0, 0, 0, 649, 296, 0, + 487, 487, 487, 487, 0, 487, 487, 649, 649, 649, + 649, 47, 296, 649, 825, 0, 47, 550, 550, 550, + 550, 67, 362, 0, 649, 649, 0, 669, 0, 0, + 0, 825, 0, 0, 0, 0, 0, 629, 274, 734, + 0, 433, 0, 0, 0, 0, 0, 0, 0, 643, + 433, 322, 322, 0, 0, 630, 629, 629, 629, 0, + 0, 643, 643, 0, 0, 0, 0, 0, 0, 440, + 643, 0, 0, 0, 0, 440, 425, 0, 0, 425, + 0, 67 + ); + + protected $actionDefault = array( + 3,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767, 525, 525,32767, 481,32767,32767, + 32767,32767,32767,32767,32767, 287, 287, 287,32767,32767, + 32767, 513, 513, 513, 513, 513, 513, 513, 513, 513, + 513, 513,32767,32767,32767,32767,32767, 369,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767, 375, 530,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767, 350, 351, 353, 354, 286, 514, + 237, 376, 529, 285, 239, 314, 485,32767,32767,32767, + 316, 116, 248, 193, 484, 119, 284, 224, 368, 370, + 315, 291, 296, 297, 298, 299, 300, 301, 302, 303, + 304, 305, 306, 307, 290, 441, 347, 346, 345, 443, + 32767, 442, 478, 478, 481,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767, 312, 469, 468, 313, 439, + 317, 440, 319, 444, 318, 335, 336, 333, 334, 337, + 446, 445, 462, 463, 460, 461, 289, 338, 339, 340, + 341, 464, 465, 466, 467, 271, 271, 271, 271,32767, + 32767, 524, 524,32767,32767, 326, 327, 453, 454,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 272,32767, 228, 228, 228, 228, 228,32767,32767,32767, + 32767,32767,32767,32767, 321, 322, 320, 448, 449, 447, + 32767, 415,32767,32767,32767,32767,32767, 417,32767,32767, + 32767,32767,32767,32767,32767,32767,32767, 486,32767,32767, + 32767,32767,32767,32767,32767, 499, 404,32767,32767,32767, + 397, 212, 214, 161, 472,32767,32767,32767,32767, 504, + 331,32767,32767,32767,32767,32767,32767, 539,32767, 499, + 32767,32767,32767,32767,32767,32767,32767,32767, 344, 323, + 324, 325,32767,32767,32767,32767, 503, 497, 456, 457, + 458, 459,32767,32767, 450, 451, 452, 455,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767, 165,32767, 412,32767, 418, 418,32767,32767, 165, + 32767,32767,32767,32767, 165,32767, 502, 501, 165,32767, + 398, 480, 165, 178,32767, 176, 176,32767, 198, 198, + 32767,32767, 180, 473, 492,32767, 180,32767, 165,32767, + 386, 167, 480,32767,32767, 230, 230, 386, 165, 230, + 32767, 230,32767, 82, 422,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767, 399, + 32767,32767,32767,32767, 365, 366, 475, 488,32767, 489, + 32767, 397,32767, 329, 330, 332, 309,32767, 311, 355, + 356, 357, 358, 359, 360, 361, 363,32767, 402,32767, + 405,32767,32767,32767, 84, 108, 247,32767, 537, 84, + 400,32767,32767, 294, 537,32767,32767,32767,32767, 532, + 32767,32767, 288,32767,32767,32767, 84,32767, 84, 243, + 32767, 163,32767, 522,32767, 497,32767, 401,32767, 328, + 32767,32767,32767,32767,32767,32767,32767,32767,32767, 498, + 32767,32767,32767,32767, 219,32767, 435,32767, 84,32767, + 179,32767,32767, 292, 238,32767,32767, 531,32767,32767, + 32767,32767,32767,32767,32767,32767,32767, 164,32767,32767, + 181,32767,32767, 497,32767,32767,32767,32767,32767,32767, + 32767,32767, 283,32767,32767,32767,32767,32767, 497,32767, + 32767,32767, 223,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767, 82, 60,32767, 265,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767, 121, 121, + 3, 121, 121, 3, 121, 121, 121, 121, 121, 121, + 121, 121, 121, 121, 121, 121, 121, 206, 250, 209, + 198, 198, 158, 250, 250, 250, 257 + ); + + protected $goto = array( + 160, 160, 134, 134, 139, 134, 135, 136, 137, 142, + 144, 181, 162, 158, 158, 158, 158, 139, 139, 159, + 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, + 154, 155, 156, 157, 178, 133, 179, 493, 494, 360, + 495, 499, 500, 501, 502, 503, 504, 505, 506, 962, + 138, 140, 141, 143, 165, 170, 180, 196, 245, 248, + 250, 252, 254, 255, 256, 257, 258, 259, 267, 268, + 269, 270, 285, 286, 314, 315, 316, 379, 380, 381, + 549, 182, 183, 184, 185, 186, 187, 188, 189, 190, + 191, 192, 193, 194, 145, 146, 147, 161, 148, 163, + 149, 197, 164, 150, 151, 152, 198, 153, 131, 625, + 567, 754, 567, 567, 567, 567, 567, 567, 567, 567, + 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, + 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, + 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, + 567, 567, 567, 567, 567, 1100, 753, 1100, 1100, 1100, + 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, + 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, + 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, + 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, + 523, 784, 497, 497, 497, 497, 497, 497, 6, 508, + 634, 508, 497, 497, 497, 497, 497, 497, 497, 497, + 497, 497, 509, 550, 509, 580, 606, 522, 885, 885, + 1190, 1190, 815, 849, 849, 849, 849, 168, 844, 850, + 522, 522, 171, 172, 173, 388, 389, 390, 391, 167, + 195, 199, 201, 249, 251, 253, 260, 261, 262, 263, + 264, 265, 271, 272, 273, 274, 287, 288, 317, 318, + 319, 394, 395, 396, 397, 169, 174, 246, 247, 175, + 176, 177, 387, 608, 543, 543, 573, 539, 583, 586, + 631, 855, 541, 541, 496, 498, 529, 545, 574, 577, + 587, 593, 341, 1169, 566, 1169, 566, 566, 566, 566, + 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, + 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, + 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, + 566, 566, 566, 566, 566, 566, 566, 566, 566, 514, + 443, 445, 933, 636, 327, 309, 1101, 618, 931, 519, + 519, 519, 519, 777, 551, 552, 553, 554, 555, 556, + 557, 558, 560, 589, 903, 611, 538, 519, 617, 548, + 358, 544, 572, 430, 430, 430, 430, 430, 430, 1194, + 777, 777, 361, 430, 430, 430, 430, 430, 430, 430, + 430, 430, 430, 1065, 1161, 1065, 892, 892, 892, 892, + 892, 1168, 598, 1168, 590, 344, 404, 892, 369, 369, + 369, 1058, 1184, 1184, 1184, 1076, 1075, 1065, 1065, 1065, + 1065, 1149, 1065, 1065, 519, 519, 536, 568, 519, 519, + 615, 519, 369, 510, 960, 510, 1167, 386, 770, 770, + 778, 778, 778, 780, 520, 769, 276, 277, 278, 535, + 607, 659, 562, 547, 594, 868, 882, 613, 867, 616, + 878, 620, 621, 628, 630, 635, 637, 1081, 375, 1201, + 1201, 1187, 1009, 889, 1019, 17, 13, 355, 790, 752, + 1200, 1200, 898, 1061, 1062, 362, 941, 1058, 1201, 527, + 871, 561, 851, 540, 657, 347, 511, 880, 875, 1200, + 1059, 1160, 1059, 21, 398, 373, 773, 1203, 604, 451, + 1060, 771, 907, 342, 343, 368, 645, 402, 446, 10, + 1056, 1051, 912, 781, 578, 1146, 859, 459, 949, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 528 + ); + + protected $gotoCheck = array( + 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, + 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, + 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, + 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, + 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, + 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, + 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, + 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, + 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, + 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, + 39, 39, 39, 39, 39, 39, 39, 39, 39, 53, + 63, 12, 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 119, 11, 119, 119, 119, + 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, + 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, + 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, + 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, + 94, 25, 110, 110, 110, 110, 110, 110, 91, 63, + 5, 63, 110, 110, 110, 110, 110, 110, 110, 110, + 110, 110, 110, 40, 110, 36, 36, 40, 71, 71, + 71, 71, 46, 63, 63, 63, 63, 23, 63, 63, + 40, 40, 23, 23, 23, 23, 23, 23, 23, 23, + 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, + 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, + 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, + 23, 23, 47, 47, 47, 47, 47, 47, 56, 56, + 56, 29, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 66, 111, 53, 111, 53, 53, 53, 53, + 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, + 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, + 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, + 53, 53, 53, 53, 53, 53, 53, 53, 53, 8, + 7, 7, 7, 7, 118, 118, 7, 7, 7, 8, + 8, 8, 8, 19, 103, 103, 103, 103, 103, 103, + 103, 103, 103, 103, 78, 57, 8, 8, 57, 2, + 57, 102, 2, 53, 53, 53, 53, 53, 53, 132, + 19, 19, 43, 53, 53, 53, 53, 53, 53, 53, + 53, 53, 53, 53, 76, 53, 53, 53, 53, 53, + 53, 112, 120, 112, 64, 64, 64, 53, 116, 116, + 116, 76, 112, 112, 112, 117, 117, 53, 53, 53, + 53, 124, 53, 53, 8, 8, 8, 8, 8, 8, + 53, 8, 116, 115, 94, 115, 112, 116, 19, 19, + 19, 19, 19, 19, 8, 19, 61, 61, 61, 28, + 45, 28, 28, 8, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 30, 44, 134, + 134, 130, 95, 73, 30, 30, 30, 30, 10, 10, + 133, 133, 75, 76, 76, 54, 91, 76, 134, 54, + 10, 30, 10, 54, 10, 14, 10, 10, 10, 133, + 76, 76, 76, 30, 18, 13, 21, 133, 30, 54, + 76, 20, 79, 66, 66, 9, 68, 17, 59, 54, + 108, 106, 80, 22, 60, 123, 65, 101, 93, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 94 + ); + + protected $gotoBase = array( + 0, 0, -261, 0, 0, 198, 0, 347, 29, 192, + 487, 154, 109, 168, 185, 0, 0, 121, 183, 43, + 173, 184, 93, 37, 0, 193, 0, 0, -180, 273, + 64, 0, 0, 0, 0, 0, 189, 0, 0, -22, + 201, 0, 0, 354, 188, 180, 216, 3, 0, 0, + 0, 0, 0, 104, 71, 0, -15, -81, 0, 92, + 88, -207, 0, -90, 90, 89, -137, 0, 169, 0, + 0, -51, 0, 177, 0, 179, 67, 0, 351, 166, + 91, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 196, 0, 78, 161, 181, 0, 0, 0, 0, + 0, 80, 356, 322, 0, 0, 115, 0, 111, 0, + -77, 4, 112, 0, 0, 144, 108, 114, 33, -45, + 209, 0, 0, 83, 227, 0, 0, 0, 0, 0, + 199, 0, 362, 182, 171, 0, 0 + ); + + protected $gotoDefault = array( + -32768, 462, 668, 2, 669, 740, 748, 601, 479, 515, + 853, 791, 792, 364, 410, 480, 363, 399, 392, 779, + 772, 774, 782, 166, 400, 785, 1, 787, 521, 823, + 1010, 351, 795, 352, 592, 797, 531, 799, 800, 132, + 481, 365, 366, 532, 374, 581, 814, 266, 371, 816, + 353, 817, 826, 354, 614, 597, 563, 610, 482, 442, + 575, 275, 542, 1073, 570, 858, 340, 866, 648, 874, + 877, 483, 564, 888, 448, 896, 1086, 382, 902, 908, + 913, 916, 418, 401, 588, 920, 921, 5, 925, 626, + 627, 940, 300, 948, 961, 416, 1029, 1031, 484, 485, + 525, 456, 507, 530, 486, 1052, 436, 403, 1055, 487, + 488, 426, 427, 1070, 346, 1154, 345, 444, 308, 1141, + 584, 1105, 452, 1193, 1150, 337, 489, 490, 359, 376, + 1188, 431, 1195, 1202, 335, 367, 571 + ); + + protected $ruleToNonTerminal = array( + 0, 1, 3, 3, 2, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, + 7, 7, 8, 8, 9, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 14, 14, 15, 15, + 15, 15, 17, 17, 13, 13, 18, 18, 19, 19, + 20, 20, 21, 21, 16, 16, 22, 24, 24, 25, + 26, 26, 28, 27, 27, 27, 27, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 10, 10, 50, 50, + 52, 51, 51, 44, 44, 54, 54, 55, 55, 11, + 12, 12, 12, 58, 58, 58, 59, 59, 62, 62, + 60, 60, 64, 64, 37, 37, 46, 46, 49, 49, + 49, 48, 48, 65, 38, 38, 38, 38, 66, 66, + 67, 67, 68, 68, 35, 35, 31, 31, 69, 33, + 33, 70, 32, 32, 34, 34, 45, 45, 45, 56, + 56, 72, 72, 73, 73, 75, 75, 75, 74, 74, + 57, 57, 76, 76, 76, 77, 77, 78, 78, 78, + 41, 41, 79, 79, 79, 42, 42, 80, 80, 61, + 61, 81, 81, 81, 81, 86, 86, 87, 87, 88, + 88, 88, 88, 88, 89, 90, 90, 85, 85, 82, + 82, 84, 84, 92, 92, 91, 91, 91, 91, 91, + 91, 83, 83, 93, 93, 43, 43, 36, 36, 39, + 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, + 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, + 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, + 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, + 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, + 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, + 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, + 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, + 39, 39, 39, 30, 30, 40, 40, 98, 98, 99, + 99, 99, 99, 105, 94, 94, 101, 101, 107, 107, + 108, 109, 109, 109, 109, 109, 109, 63, 63, 53, + 53, 53, 95, 95, 113, 113, 110, 110, 114, 114, + 114, 114, 96, 96, 96, 100, 100, 100, 106, 106, + 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, + 119, 119, 119, 23, 23, 23, 23, 23, 23, 121, + 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, + 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, + 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, + 121, 121, 104, 104, 97, 97, 97, 97, 120, 120, + 123, 123, 122, 122, 124, 124, 47, 47, 47, 47, + 126, 126, 125, 125, 125, 125, 125, 127, 127, 112, + 112, 115, 115, 111, 111, 128, 128, 128, 128, 116, + 116, 116, 116, 103, 103, 117, 117, 117, 117, 71, + 129, 129, 130, 130, 130, 102, 102, 131, 131, 132, + 132, 132, 132, 118, 118, 118, 118, 134, 135, 133, + 133, 133, 133, 133, 133, 133, 136, 136, 136 + ); + + protected $ruleToLength = array( + 1, 1, 2, 0, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 3, 1, 1, 1, 1, 1, 3, + 5, 4, 3, 4, 2, 3, 1, 1, 7, 8, + 6, 7, 3, 1, 3, 1, 3, 1, 1, 3, + 1, 2, 1, 2, 3, 1, 3, 3, 1, 3, + 2, 0, 1, 1, 1, 1, 1, 3, 5, 8, + 3, 5, 9, 3, 2, 3, 2, 3, 2, 3, + 2, 3, 3, 3, 1, 2, 5, 7, 9, 5, + 6, 3, 3, 2, 2, 1, 1, 1, 0, 2, + 8, 0, 4, 1, 3, 0, 1, 0, 1, 10, + 7, 6, 5, 1, 2, 2, 0, 2, 0, 2, + 0, 2, 1, 3, 1, 4, 1, 4, 1, 1, + 4, 1, 3, 3, 3, 4, 4, 5, 0, 2, + 4, 3, 1, 1, 1, 4, 0, 2, 3, 0, + 2, 4, 0, 2, 0, 3, 1, 2, 1, 1, + 0, 1, 3, 4, 6, 1, 1, 1, 0, 1, + 0, 2, 2, 3, 3, 1, 3, 1, 2, 2, + 3, 1, 1, 2, 4, 3, 1, 1, 3, 2, + 0, 3, 3, 9, 3, 1, 3, 0, 2, 4, + 5, 4, 4, 4, 3, 1, 1, 1, 3, 1, + 1, 0, 1, 1, 2, 1, 1, 1, 1, 1, + 1, 1, 3, 1, 3, 3, 1, 0, 1, 1, + 3, 3, 4, 4, 1, 2, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, + 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, + 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 1, 3, 5, 4, 3, 4, 4, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 1, 1, 1, 3, 2, 1, + 2, 10, 11, 3, 3, 2, 4, 4, 3, 4, + 4, 4, 4, 7, 3, 2, 0, 4, 1, 3, + 2, 2, 4, 6, 2, 2, 4, 1, 1, 1, + 2, 3, 1, 1, 1, 1, 1, 1, 3, 3, + 4, 4, 0, 2, 1, 0, 1, 1, 0, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 3, 2, 1, 3, 1, 4, 3, 1, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, + 3, 3, 3, 3, 3, 3, 3, 3, 5, 4, + 4, 3, 1, 3, 1, 1, 3, 3, 0, 2, + 0, 1, 3, 1, 3, 1, 1, 1, 1, 1, + 6, 4, 3, 4, 2, 4, 4, 1, 3, 1, + 2, 1, 1, 4, 1, 3, 6, 4, 4, 4, + 4, 1, 4, 0, 1, 1, 3, 1, 1, 4, + 3, 1, 1, 1, 0, 0, 2, 3, 1, 3, + 1, 4, 2, 2, 2, 1, 2, 1, 1, 1, + 4, 3, 3, 3, 6, 3, 1, 1, 1 + ); + + protected function reduceRule0() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule1() { + $this->semValue = $this->handleNamespaces($this->semStack[$this->stackPos-(1-1)]); + } + + protected function reduceRule2() { + if (is_array($this->semStack[$this->stackPos-(2-2)])) { $this->semValue = array_merge($this->semStack[$this->stackPos-(2-1)], $this->semStack[$this->stackPos-(2-2)]); } else { $this->semStack[$this->stackPos-(2-1)][] = $this->semStack[$this->stackPos-(2-2)]; $this->semValue = $this->semStack[$this->stackPos-(2-1)]; }; + } + + protected function reduceRule3() { + $this->semValue = array(); + } + + protected function reduceRule4() { + $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop(['comments' => $startAttributes['comments']]); } else { $nop = null; }; + if ($nop !== null) { $this->semStack[$this->stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule5() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule6() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule7() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule8() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule9() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule10() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule11() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule12() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule13() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule14() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule15() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule16() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule17() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule18() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule19() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule20() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule21() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule22() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule23() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule24() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule25() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule26() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule27() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule28() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule29() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule30() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule31() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule32() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule33() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule34() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule35() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule36() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule37() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule38() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule39() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule40() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule41() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule42() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule43() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule44() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule45() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule46() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule47() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule48() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule49() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule50() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule51() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule52() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule53() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule54() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule55() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule56() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule57() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule58() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule59() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule60() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule61() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule62() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule63() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule64() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule65() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule66() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule67() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule68() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule69() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule70() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule71() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule72() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule73() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule74() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule75() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule76() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule77() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule78() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule79() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule80() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule81() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule82() { + $this->semValue = array($this->semStack[$this->stackPos-(1-1)]); + } + + protected function reduceRule83() { + $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)]; + } + + protected function reduceRule84() { + $this->semValue = new Name($this->semStack[$this->stackPos-(1-1)], $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); + } + + protected function reduceRule85() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule86() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule87() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule88() { + $this->semValue = new Stmt\HaltCompiler($this->lexer->handleHaltCompiler(), $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); + } + + protected function reduceRule89() { + $this->semValue = new Stmt\Namespace_($this->semStack[$this->stackPos-(3-2)], null, $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); $this->checkNamespace($this->semValue); + } + + protected function reduceRule90() { + $this->semValue = new Stmt\Namespace_($this->semStack[$this->stackPos-(5-2)], $this->semStack[$this->stackPos-(5-4)], $this->startAttributeStack[$this->stackPos-(5-1)] + $this->endAttributes); $this->checkNamespace($this->semValue); + } + + protected function reduceRule91() { + $this->semValue = new Stmt\Namespace_(null, $this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); $this->checkNamespace($this->semValue); + } + + protected function reduceRule92() { + $this->semValue = new Stmt\Use_($this->semStack[$this->stackPos-(3-2)], Stmt\Use_::TYPE_NORMAL, $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule93() { + $this->semValue = new Stmt\Use_($this->semStack[$this->stackPos-(4-3)], $this->semStack[$this->stackPos-(4-2)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); + } + + protected function reduceRule94() { + $this->semValue = $this->semStack[$this->stackPos-(2-1)]; + } + + protected function reduceRule95() { + $this->semValue = new Stmt\Const_($this->semStack[$this->stackPos-(3-2)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule96() { + $this->semValue = Stmt\Use_::TYPE_FUNCTION; + } + + protected function reduceRule97() { + $this->semValue = Stmt\Use_::TYPE_CONSTANT; + } + + protected function reduceRule98() { + $this->semValue = new Stmt\GroupUse(new Name($this->semStack[$this->stackPos-(7-3)], $this->startAttributeStack[$this->stackPos-(7-3)] + $this->endAttributeStack[$this->stackPos-(7-3)]), $this->semStack[$this->stackPos-(7-6)], $this->semStack[$this->stackPos-(7-2)], $this->startAttributeStack[$this->stackPos-(7-1)] + $this->endAttributes); + } + + protected function reduceRule99() { + $this->semValue = new Stmt\GroupUse(new Name($this->semStack[$this->stackPos-(8-4)], $this->startAttributeStack[$this->stackPos-(8-4)] + $this->endAttributeStack[$this->stackPos-(8-4)]), $this->semStack[$this->stackPos-(8-7)], $this->semStack[$this->stackPos-(8-2)], $this->startAttributeStack[$this->stackPos-(8-1)] + $this->endAttributes); + } + + protected function reduceRule100() { + $this->semValue = new Stmt\GroupUse(new Name($this->semStack[$this->stackPos-(6-2)], $this->startAttributeStack[$this->stackPos-(6-2)] + $this->endAttributeStack[$this->stackPos-(6-2)]), $this->semStack[$this->stackPos-(6-5)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$this->stackPos-(6-1)] + $this->endAttributes); + } + + protected function reduceRule101() { + $this->semValue = new Stmt\GroupUse(new Name($this->semStack[$this->stackPos-(7-3)], $this->startAttributeStack[$this->stackPos-(7-3)] + $this->endAttributeStack[$this->stackPos-(7-3)]), $this->semStack[$this->stackPos-(7-6)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$this->stackPos-(7-1)] + $this->endAttributes); + } + + protected function reduceRule102() { + $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)]; + } + + protected function reduceRule103() { + $this->semValue = array($this->semStack[$this->stackPos-(1-1)]); + } + + protected function reduceRule104() { + $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)]; + } + + protected function reduceRule105() { + $this->semValue = array($this->semStack[$this->stackPos-(1-1)]); + } + + protected function reduceRule106() { + $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)]; + } + + protected function reduceRule107() { + $this->semValue = array($this->semStack[$this->stackPos-(1-1)]); + } + + protected function reduceRule108() { + $this->semValue = new Stmt\UseUse($this->semStack[$this->stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $this->stackPos-(1-1)); + } + + protected function reduceRule109() { + $this->semValue = new Stmt\UseUse($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $this->stackPos-(3-3)); + } + + protected function reduceRule110() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule111() { + $this->semValue = $this->semStack[$this->stackPos-(2-2)]; + } + + protected function reduceRule112() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; $this->semValue->type = Stmt\Use_::TYPE_NORMAL; + } + + protected function reduceRule113() { + $this->semValue = $this->semStack[$this->stackPos-(2-2)]; $this->semValue->type = $this->semStack[$this->stackPos-(2-1)]; + } + + protected function reduceRule114() { + $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)]; + } + + protected function reduceRule115() { + $this->semValue = array($this->semStack[$this->stackPos-(1-1)]); + } + + protected function reduceRule116() { + $this->semValue = new Node\Const_($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule117() { + $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)]; + } + + protected function reduceRule118() { + $this->semValue = array($this->semStack[$this->stackPos-(1-1)]); + } + + protected function reduceRule119() { + $this->semValue = new Node\Const_($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule120() { + if (is_array($this->semStack[$this->stackPos-(2-2)])) { $this->semValue = array_merge($this->semStack[$this->stackPos-(2-1)], $this->semStack[$this->stackPos-(2-2)]); } else { $this->semStack[$this->stackPos-(2-1)][] = $this->semStack[$this->stackPos-(2-2)]; $this->semValue = $this->semStack[$this->stackPos-(2-1)]; }; + } + + protected function reduceRule121() { + $this->semValue = array(); + } + + protected function reduceRule122() { + $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop(['comments' => $startAttributes['comments']]); } else { $nop = null; }; + if ($nop !== null) { $this->semStack[$this->stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule123() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule124() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule125() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule126() { + throw new Error('__HALT_COMPILER() can only be used from the outermost scope', $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); + } + + protected function reduceRule127() { + $this->semValue = $this->semStack[$this->stackPos-(3-2)]; $attrs = $this->startAttributeStack[$this->stackPos-(3-1)]; $stmts = $this->semValue; if (!empty($attrs['comments']) && isset($stmts[0])) {$stmts[0]->setAttribute('comments', array_merge($attrs['comments'], $stmts[0]->getAttribute('comments', []))); }; + } + + protected function reduceRule128() { + $this->semValue = new Stmt\If_($this->semStack[$this->stackPos-(5-2)], ['stmts' => is_array($this->semStack[$this->stackPos-(5-3)]) ? $this->semStack[$this->stackPos-(5-3)] : array($this->semStack[$this->stackPos-(5-3)]), 'elseifs' => $this->semStack[$this->stackPos-(5-4)], 'else' => $this->semStack[$this->stackPos-(5-5)]], $this->startAttributeStack[$this->stackPos-(5-1)] + $this->endAttributes); + } + + protected function reduceRule129() { + $this->semValue = new Stmt\If_($this->semStack[$this->stackPos-(8-2)], ['stmts' => $this->semStack[$this->stackPos-(8-4)], 'elseifs' => $this->semStack[$this->stackPos-(8-5)], 'else' => $this->semStack[$this->stackPos-(8-6)]], $this->startAttributeStack[$this->stackPos-(8-1)] + $this->endAttributes); + } + + protected function reduceRule130() { + $this->semValue = new Stmt\While_($this->semStack[$this->stackPos-(3-2)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule131() { + $this->semValue = new Stmt\Do_($this->semStack[$this->stackPos-(5-4)], is_array($this->semStack[$this->stackPos-(5-2)]) ? $this->semStack[$this->stackPos-(5-2)] : array($this->semStack[$this->stackPos-(5-2)]), $this->startAttributeStack[$this->stackPos-(5-1)] + $this->endAttributes); + } + + protected function reduceRule132() { + $this->semValue = new Stmt\For_(['init' => $this->semStack[$this->stackPos-(9-3)], 'cond' => $this->semStack[$this->stackPos-(9-5)], 'loop' => $this->semStack[$this->stackPos-(9-7)], 'stmts' => $this->semStack[$this->stackPos-(9-9)]], $this->startAttributeStack[$this->stackPos-(9-1)] + $this->endAttributes); + } + + protected function reduceRule133() { + $this->semValue = new Stmt\Switch_($this->semStack[$this->stackPos-(3-2)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule134() { + $this->semValue = new Stmt\Break_(null, $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule135() { + $this->semValue = new Stmt\Break_($this->semStack[$this->stackPos-(3-2)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule136() { + $this->semValue = new Stmt\Continue_(null, $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule137() { + $this->semValue = new Stmt\Continue_($this->semStack[$this->stackPos-(3-2)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule138() { + $this->semValue = new Stmt\Return_(null, $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule139() { + $this->semValue = new Stmt\Return_($this->semStack[$this->stackPos-(3-2)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule140() { + $this->semValue = $this->semStack[$this->stackPos-(2-1)]; + } + + protected function reduceRule141() { + $this->semValue = new Stmt\Global_($this->semStack[$this->stackPos-(3-2)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule142() { + $this->semValue = new Stmt\Static_($this->semStack[$this->stackPos-(3-2)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule143() { + $this->semValue = new Stmt\Echo_($this->semStack[$this->stackPos-(3-2)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule144() { + $this->semValue = new Stmt\InlineHTML($this->semStack[$this->stackPos-(1-1)], $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); + } + + protected function reduceRule145() { + $this->semValue = $this->semStack[$this->stackPos-(2-1)]; + } + + protected function reduceRule146() { + $this->semValue = new Stmt\Unset_($this->semStack[$this->stackPos-(5-3)], $this->startAttributeStack[$this->stackPos-(5-1)] + $this->endAttributes); + } + + protected function reduceRule147() { + $this->semValue = new Stmt\Foreach_($this->semStack[$this->stackPos-(7-3)], $this->semStack[$this->stackPos-(7-5)][0], ['keyVar' => null, 'byRef' => $this->semStack[$this->stackPos-(7-5)][1], 'stmts' => $this->semStack[$this->stackPos-(7-7)]], $this->startAttributeStack[$this->stackPos-(7-1)] + $this->endAttributes); + } + + protected function reduceRule148() { + $this->semValue = new Stmt\Foreach_($this->semStack[$this->stackPos-(9-3)], $this->semStack[$this->stackPos-(9-7)][0], ['keyVar' => $this->semStack[$this->stackPos-(9-5)], 'byRef' => $this->semStack[$this->stackPos-(9-7)][1], 'stmts' => $this->semStack[$this->stackPos-(9-9)]], $this->startAttributeStack[$this->stackPos-(9-1)] + $this->endAttributes); + } + + protected function reduceRule149() { + $this->semValue = new Stmt\Declare_($this->semStack[$this->stackPos-(5-3)], $this->semStack[$this->stackPos-(5-5)], $this->startAttributeStack[$this->stackPos-(5-1)] + $this->endAttributes); + } + + protected function reduceRule150() { + $this->semValue = new Stmt\TryCatch($this->semStack[$this->stackPos-(6-3)], $this->semStack[$this->stackPos-(6-5)], $this->semStack[$this->stackPos-(6-6)], $this->startAttributeStack[$this->stackPos-(6-1)] + $this->endAttributes); $this->checkTryCatch($this->semValue); + } + + protected function reduceRule151() { + $this->semValue = new Stmt\Throw_($this->semStack[$this->stackPos-(3-2)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule152() { + $this->semValue = new Stmt\Goto_($this->semStack[$this->stackPos-(3-2)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule153() { + $this->semValue = new Stmt\Label($this->semStack[$this->stackPos-(2-1)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule154() { + $this->semValue = $this->semStack[$this->stackPos-(2-1)]; + } + + protected function reduceRule155() { + $this->semValue = array(); /* means: no statement */ + } + + protected function reduceRule156() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule157() { + $startAttributes = $this->startAttributeStack[$this->stackPos-(1-1)]; if (isset($startAttributes['comments'])) { $this->semValue = new Stmt\Nop(['comments' => $startAttributes['comments']]); } else { $this->semValue = null; }; + if ($this->semValue === null) $this->semValue = array(); /* means: no statement */ + } + + protected function reduceRule158() { + $this->semValue = array(); + } + + protected function reduceRule159() { + $this->semStack[$this->stackPos-(2-1)][] = $this->semStack[$this->stackPos-(2-2)]; $this->semValue = $this->semStack[$this->stackPos-(2-1)]; + } + + protected function reduceRule160() { + $this->semValue = new Stmt\Catch_(array($this->semStack[$this->stackPos-(8-3)]), substr($this->semStack[$this->stackPos-(8-4)], 1), $this->semStack[$this->stackPos-(8-7)], $this->startAttributeStack[$this->stackPos-(8-1)] + $this->endAttributes); + } + + protected function reduceRule161() { + $this->semValue = null; + } + + protected function reduceRule162() { + $this->semValue = new Stmt\Finally_($this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); + } + + protected function reduceRule163() { + $this->semValue = array($this->semStack[$this->stackPos-(1-1)]); + } + + protected function reduceRule164() { + $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)]; + } + + protected function reduceRule165() { + $this->semValue = false; + } + + protected function reduceRule166() { + $this->semValue = true; + } + + protected function reduceRule167() { + $this->semValue = false; + } + + protected function reduceRule168() { + $this->semValue = true; + } + + protected function reduceRule169() { + $this->semValue = new Stmt\Function_($this->semStack[$this->stackPos-(10-3)], ['byRef' => $this->semStack[$this->stackPos-(10-2)], 'params' => $this->semStack[$this->stackPos-(10-5)], 'returnType' => $this->semStack[$this->stackPos-(10-7)], 'stmts' => $this->semStack[$this->stackPos-(10-9)]], $this->startAttributeStack[$this->stackPos-(10-1)] + $this->endAttributes); + } + + protected function reduceRule170() { + $this->semValue = new Stmt\Class_($this->semStack[$this->stackPos-(7-2)], ['type' => $this->semStack[$this->stackPos-(7-1)], 'extends' => $this->semStack[$this->stackPos-(7-3)], 'implements' => $this->semStack[$this->stackPos-(7-4)], 'stmts' => $this->semStack[$this->stackPos-(7-6)]], $this->startAttributeStack[$this->stackPos-(7-1)] + $this->endAttributes); + $this->checkClass($this->semValue, $this->stackPos-(7-2)); + } + + protected function reduceRule171() { + $this->semValue = new Stmt\Interface_($this->semStack[$this->stackPos-(6-2)], ['extends' => $this->semStack[$this->stackPos-(6-3)], 'stmts' => $this->semStack[$this->stackPos-(6-5)]], $this->startAttributeStack[$this->stackPos-(6-1)] + $this->endAttributes); + $this->checkInterface($this->semValue, $this->stackPos-(6-2)); + } + + protected function reduceRule172() { + $this->semValue = new Stmt\Trait_($this->semStack[$this->stackPos-(5-2)], ['stmts' => $this->semStack[$this->stackPos-(5-4)]], $this->startAttributeStack[$this->stackPos-(5-1)] + $this->endAttributes); + } + + protected function reduceRule173() { + $this->semValue = 0; + } + + protected function reduceRule174() { + $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT; + } + + protected function reduceRule175() { + $this->semValue = Stmt\Class_::MODIFIER_FINAL; + } + + protected function reduceRule176() { + $this->semValue = null; + } + + protected function reduceRule177() { + $this->semValue = $this->semStack[$this->stackPos-(2-2)]; + } + + protected function reduceRule178() { + $this->semValue = array(); + } + + protected function reduceRule179() { + $this->semValue = $this->semStack[$this->stackPos-(2-2)]; + } + + protected function reduceRule180() { + $this->semValue = array(); + } + + protected function reduceRule181() { + $this->semValue = $this->semStack[$this->stackPos-(2-2)]; + } + + protected function reduceRule182() { + $this->semValue = array($this->semStack[$this->stackPos-(1-1)]); + } + + protected function reduceRule183() { + $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)]; + } + + protected function reduceRule184() { + $this->semValue = is_array($this->semStack[$this->stackPos-(1-1)]) ? $this->semStack[$this->stackPos-(1-1)] : array($this->semStack[$this->stackPos-(1-1)]); + } + + protected function reduceRule185() { + $this->semValue = $this->semStack[$this->stackPos-(4-2)]; + } + + protected function reduceRule186() { + $this->semValue = is_array($this->semStack[$this->stackPos-(1-1)]) ? $this->semStack[$this->stackPos-(1-1)] : array($this->semStack[$this->stackPos-(1-1)]); + } + + protected function reduceRule187() { + $this->semValue = $this->semStack[$this->stackPos-(4-2)]; + } + + protected function reduceRule188() { + $this->semValue = is_array($this->semStack[$this->stackPos-(1-1)]) ? $this->semStack[$this->stackPos-(1-1)] : array($this->semStack[$this->stackPos-(1-1)]); + } + + protected function reduceRule189() { + $this->semValue = null; + } + + protected function reduceRule190() { + $this->semValue = $this->semStack[$this->stackPos-(4-2)]; + } + + protected function reduceRule191() { + $this->semValue = array($this->semStack[$this->stackPos-(1-1)]); + } + + protected function reduceRule192() { + $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)]; + } + + protected function reduceRule193() { + $this->semValue = new Stmt\DeclareDeclare($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule194() { + $this->semValue = $this->semStack[$this->stackPos-(3-2)]; + } + + protected function reduceRule195() { + $this->semValue = $this->semStack[$this->stackPos-(4-3)]; + } + + protected function reduceRule196() { + $this->semValue = $this->semStack[$this->stackPos-(4-2)]; + } + + protected function reduceRule197() { + $this->semValue = $this->semStack[$this->stackPos-(5-3)]; + } + + protected function reduceRule198() { + $this->semValue = array(); + } + + protected function reduceRule199() { + $this->semStack[$this->stackPos-(2-1)][] = $this->semStack[$this->stackPos-(2-2)]; $this->semValue = $this->semStack[$this->stackPos-(2-1)]; + } + + protected function reduceRule200() { + $this->semValue = new Stmt\Case_($this->semStack[$this->stackPos-(4-2)], $this->semStack[$this->stackPos-(4-4)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); + } + + protected function reduceRule201() { + $this->semValue = new Stmt\Case_(null, $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule202() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule203() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule204() { + $this->semValue = is_array($this->semStack[$this->stackPos-(1-1)]) ? $this->semStack[$this->stackPos-(1-1)] : array($this->semStack[$this->stackPos-(1-1)]); + } + + protected function reduceRule205() { + $this->semValue = $this->semStack[$this->stackPos-(4-2)]; + } + + protected function reduceRule206() { + $this->semValue = array(); + } + + protected function reduceRule207() { + $this->semStack[$this->stackPos-(2-1)][] = $this->semStack[$this->stackPos-(2-2)]; $this->semValue = $this->semStack[$this->stackPos-(2-1)]; + } + + protected function reduceRule208() { + $this->semValue = new Stmt\ElseIf_($this->semStack[$this->stackPos-(3-2)], is_array($this->semStack[$this->stackPos-(3-3)]) ? $this->semStack[$this->stackPos-(3-3)] : array($this->semStack[$this->stackPos-(3-3)]), $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule209() { + $this->semValue = array(); + } + + protected function reduceRule210() { + $this->semStack[$this->stackPos-(2-1)][] = $this->semStack[$this->stackPos-(2-2)]; $this->semValue = $this->semStack[$this->stackPos-(2-1)]; + } + + protected function reduceRule211() { + $this->semValue = new Stmt\ElseIf_($this->semStack[$this->stackPos-(4-2)], $this->semStack[$this->stackPos-(4-4)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); + } + + protected function reduceRule212() { + $this->semValue = null; + } + + protected function reduceRule213() { + $this->semValue = new Stmt\Else_(is_array($this->semStack[$this->stackPos-(2-2)]) ? $this->semStack[$this->stackPos-(2-2)] : array($this->semStack[$this->stackPos-(2-2)]), $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule214() { + $this->semValue = null; + } + + protected function reduceRule215() { + $this->semValue = new Stmt\Else_($this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule216() { + $this->semValue = array($this->semStack[$this->stackPos-(1-1)], false); + } + + protected function reduceRule217() { + $this->semValue = array($this->semStack[$this->stackPos-(2-2)], true); + } + + protected function reduceRule218() { + $this->semValue = array($this->semStack[$this->stackPos-(1-1)], false); + } + + protected function reduceRule219() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule220() { + $this->semValue = array(); + } + + protected function reduceRule221() { + $this->semValue = array($this->semStack[$this->stackPos-(1-1)]); + } + + protected function reduceRule222() { + $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)]; + } + + protected function reduceRule223() { + $this->semValue = new Node\Param(substr($this->semStack[$this->stackPos-(4-4)], 1), null, $this->semStack[$this->stackPos-(4-1)], $this->semStack[$this->stackPos-(4-2)], $this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); $this->checkParam($this->semValue); + } + + protected function reduceRule224() { + $this->semValue = new Node\Param(substr($this->semStack[$this->stackPos-(6-4)], 1), $this->semStack[$this->stackPos-(6-6)], $this->semStack[$this->stackPos-(6-1)], $this->semStack[$this->stackPos-(6-2)], $this->semStack[$this->stackPos-(6-3)], $this->startAttributeStack[$this->stackPos-(6-1)] + $this->endAttributes); $this->checkParam($this->semValue); + } + + protected function reduceRule225() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule226() { + $this->semValue = 'array'; + } + + protected function reduceRule227() { + $this->semValue = 'callable'; + } + + protected function reduceRule228() { + $this->semValue = null; + } + + protected function reduceRule229() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule230() { + $this->semValue = null; + } + + protected function reduceRule231() { + $this->semValue = $this->semStack[$this->stackPos-(2-2)]; + } + + protected function reduceRule232() { + $this->semValue = array(); + } + + protected function reduceRule233() { + $this->semValue = $this->semStack[$this->stackPos-(3-2)]; + } + + protected function reduceRule234() { + $this->semValue = array(new Node\Arg($this->semStack[$this->stackPos-(3-2)], false, false, $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes)); + } + + protected function reduceRule235() { + $this->semValue = array($this->semStack[$this->stackPos-(1-1)]); + } + + protected function reduceRule236() { + $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)]; + } + + protected function reduceRule237() { + $this->semValue = new Node\Arg($this->semStack[$this->stackPos-(1-1)], false, false, $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); + } + + protected function reduceRule238() { + $this->semValue = new Node\Arg($this->semStack[$this->stackPos-(2-2)], true, false, $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule239() { + $this->semValue = new Node\Arg($this->semStack[$this->stackPos-(2-2)], false, true, $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule240() { + $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)]; + } + + protected function reduceRule241() { + $this->semValue = array($this->semStack[$this->stackPos-(1-1)]); + } + + protected function reduceRule242() { + $this->semValue = new Expr\Variable(substr($this->semStack[$this->stackPos-(1-1)], 1), $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); + } + + protected function reduceRule243() { + $this->semValue = new Expr\Variable($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule244() { + $this->semValue = new Expr\Variable($this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); + } + + protected function reduceRule245() { + $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)]; + } + + protected function reduceRule246() { + $this->semValue = array($this->semStack[$this->stackPos-(1-1)]); + } + + protected function reduceRule247() { + $this->semValue = new Stmt\StaticVar(substr($this->semStack[$this->stackPos-(1-1)], 1), null, $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); + } + + protected function reduceRule248() { + $this->semValue = new Stmt\StaticVar(substr($this->semStack[$this->stackPos-(3-1)], 1), $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule249() { + $this->semStack[$this->stackPos-(2-1)][] = $this->semStack[$this->stackPos-(2-2)]; $this->semValue = $this->semStack[$this->stackPos-(2-1)]; + } + + protected function reduceRule250() { + $this->semValue = array(); + } + + protected function reduceRule251() { + $this->semValue = new Stmt\Property($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-2)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); $this->checkProperty($this->semValue, $this->stackPos-(3-1)); + } + + protected function reduceRule252() { + $this->semValue = new Stmt\ClassConst($this->semStack[$this->stackPos-(3-2)], 0, $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule253() { + $this->semValue = new Stmt\ClassMethod($this->semStack[$this->stackPos-(9-4)], ['type' => $this->semStack[$this->stackPos-(9-1)], 'byRef' => $this->semStack[$this->stackPos-(9-3)], 'params' => $this->semStack[$this->stackPos-(9-6)], 'returnType' => $this->semStack[$this->stackPos-(9-8)], 'stmts' => $this->semStack[$this->stackPos-(9-9)]], $this->startAttributeStack[$this->stackPos-(9-1)] + $this->endAttributes); + $this->checkClassMethod($this->semValue, $this->stackPos-(9-1)); + } + + protected function reduceRule254() { + $this->semValue = new Stmt\TraitUse($this->semStack[$this->stackPos-(3-2)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule255() { + $this->semValue = array(); + } + + protected function reduceRule256() { + $this->semValue = $this->semStack[$this->stackPos-(3-2)]; + } + + protected function reduceRule257() { + $this->semValue = array(); + } + + protected function reduceRule258() { + $this->semStack[$this->stackPos-(2-1)][] = $this->semStack[$this->stackPos-(2-2)]; $this->semValue = $this->semStack[$this->stackPos-(2-1)]; + } + + protected function reduceRule259() { + $this->semValue = new Stmt\TraitUseAdaptation\Precedence($this->semStack[$this->stackPos-(4-1)][0], $this->semStack[$this->stackPos-(4-1)][1], $this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); + } + + protected function reduceRule260() { + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$this->stackPos-(5-1)][0], $this->semStack[$this->stackPos-(5-1)][1], $this->semStack[$this->stackPos-(5-3)], $this->semStack[$this->stackPos-(5-4)], $this->startAttributeStack[$this->stackPos-(5-1)] + $this->endAttributes); + } + + protected function reduceRule261() { + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$this->stackPos-(4-1)][0], $this->semStack[$this->stackPos-(4-1)][1], $this->semStack[$this->stackPos-(4-3)], null, $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); + } + + protected function reduceRule262() { + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$this->stackPos-(4-1)][0], $this->semStack[$this->stackPos-(4-1)][1], null, $this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); + } + + protected function reduceRule263() { + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$this->stackPos-(4-1)][0], $this->semStack[$this->stackPos-(4-1)][1], null, $this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); + } + + protected function reduceRule264() { + $this->semValue = array($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)]); + } + + protected function reduceRule265() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule266() { + $this->semValue = array(null, $this->semStack[$this->stackPos-(1-1)]); + } + + protected function reduceRule267() { + $this->semValue = null; + } + + protected function reduceRule268() { + $this->semValue = $this->semStack[$this->stackPos-(3-2)]; + } + + protected function reduceRule269() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule270() { + $this->semValue = 0; + } + + protected function reduceRule271() { + $this->semValue = 0; + } + + protected function reduceRule272() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule273() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule274() { + $this->checkModifier($this->semStack[$this->stackPos-(2-1)], $this->semStack[$this->stackPos-(2-2)], $this->stackPos-(2-2)); $this->semValue = $this->semStack[$this->stackPos-(2-1)] | $this->semStack[$this->stackPos-(2-2)]; + } + + protected function reduceRule275() { + $this->semValue = Stmt\Class_::MODIFIER_PUBLIC; + } + + protected function reduceRule276() { + $this->semValue = Stmt\Class_::MODIFIER_PROTECTED; + } + + protected function reduceRule277() { + $this->semValue = Stmt\Class_::MODIFIER_PRIVATE; + } + + protected function reduceRule278() { + $this->semValue = Stmt\Class_::MODIFIER_STATIC; + } + + protected function reduceRule279() { + $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT; + } + + protected function reduceRule280() { + $this->semValue = Stmt\Class_::MODIFIER_FINAL; + } + + protected function reduceRule281() { + $this->semValue = array($this->semStack[$this->stackPos-(1-1)]); + } + + protected function reduceRule282() { + $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)]; + } + + protected function reduceRule283() { + $this->semValue = new Stmt\PropertyProperty(substr($this->semStack[$this->stackPos-(1-1)], 1), null, $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); + } + + protected function reduceRule284() { + $this->semValue = new Stmt\PropertyProperty(substr($this->semStack[$this->stackPos-(3-1)], 1), $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule285() { + $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)]; + } + + protected function reduceRule286() { + $this->semValue = array($this->semStack[$this->stackPos-(1-1)]); + } + + protected function reduceRule287() { + $this->semValue = array(); + } + + protected function reduceRule288() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule289() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule290() { + $this->semValue = new Expr\Assign($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule291() { + $this->semValue = new Expr\Assign($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule292() { + $this->semValue = new Expr\AssignRef($this->semStack[$this->stackPos-(4-1)], $this->semStack[$this->stackPos-(4-4)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); + } + + protected function reduceRule293() { + $this->semValue = new Expr\AssignRef($this->semStack[$this->stackPos-(4-1)], $this->semStack[$this->stackPos-(4-4)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); + } + + protected function reduceRule294() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule295() { + $this->semValue = new Expr\Clone_($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule296() { + $this->semValue = new Expr\AssignOp\Plus($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule297() { + $this->semValue = new Expr\AssignOp\Minus($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule298() { + $this->semValue = new Expr\AssignOp\Mul($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule299() { + $this->semValue = new Expr\AssignOp\Div($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule300() { + $this->semValue = new Expr\AssignOp\Concat($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule301() { + $this->semValue = new Expr\AssignOp\Mod($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule302() { + $this->semValue = new Expr\AssignOp\BitwiseAnd($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule303() { + $this->semValue = new Expr\AssignOp\BitwiseOr($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule304() { + $this->semValue = new Expr\AssignOp\BitwiseXor($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule305() { + $this->semValue = new Expr\AssignOp\ShiftLeft($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule306() { + $this->semValue = new Expr\AssignOp\ShiftRight($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule307() { + $this->semValue = new Expr\AssignOp\Pow($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule308() { + $this->semValue = new Expr\PostInc($this->semStack[$this->stackPos-(2-1)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule309() { + $this->semValue = new Expr\PreInc($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule310() { + $this->semValue = new Expr\PostDec($this->semStack[$this->stackPos-(2-1)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule311() { + $this->semValue = new Expr\PreDec($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule312() { + $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule313() { + $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule314() { + $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule315() { + $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule316() { + $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule317() { + $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule318() { + $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule319() { + $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule320() { + $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule321() { + $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule322() { + $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule323() { + $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule324() { + $this->semValue = new Expr\BinaryOp\Div($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule325() { + $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule326() { + $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule327() { + $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule328() { + $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule329() { + $this->semValue = new Expr\UnaryPlus($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule330() { + $this->semValue = new Expr\UnaryMinus($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule331() { + $this->semValue = new Expr\BooleanNot($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule332() { + $this->semValue = new Expr\BitwiseNot($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule333() { + $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule334() { + $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule335() { + $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule336() { + $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule337() { + $this->semValue = new Expr\BinaryOp\Spaceship($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule338() { + $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule339() { + $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule340() { + $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule341() { + $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule342() { + $this->semValue = new Expr\Instanceof_($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule343() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule344() { + $this->semValue = $this->semStack[$this->stackPos-(3-2)]; + } + + protected function reduceRule345() { + $this->semValue = new Expr\Ternary($this->semStack[$this->stackPos-(5-1)], $this->semStack[$this->stackPos-(5-3)], $this->semStack[$this->stackPos-(5-5)], $this->startAttributeStack[$this->stackPos-(5-1)] + $this->endAttributes); + } + + protected function reduceRule346() { + $this->semValue = new Expr\Ternary($this->semStack[$this->stackPos-(4-1)], null, $this->semStack[$this->stackPos-(4-4)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); + } + + protected function reduceRule347() { + $this->semValue = new Expr\BinaryOp\Coalesce($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule348() { + $this->semValue = new Expr\Isset_($this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); + } + + protected function reduceRule349() { + $this->semValue = new Expr\Empty_($this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); + } + + protected function reduceRule350() { + $this->semValue = new Expr\Include_($this->semStack[$this->stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule351() { + $this->semValue = new Expr\Include_($this->semStack[$this->stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule352() { + $this->semValue = new Expr\Eval_($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule353() { + $this->semValue = new Expr\Include_($this->semStack[$this->stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule354() { + $this->semValue = new Expr\Include_($this->semStack[$this->stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule355() { + $this->semValue = new Expr\Cast\Int_($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule356() { + $this->semValue = new Expr\Cast\Double($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule357() { + $this->semValue = new Expr\Cast\String_($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule358() { + $this->semValue = new Expr\Cast\Array_($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule359() { + $this->semValue = new Expr\Cast\Object_($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule360() { + $this->semValue = new Expr\Cast\Bool_($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule361() { + $this->semValue = new Expr\Cast\Unset_($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule362() { + $attrs = $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes; + $attrs['kind'] = strtolower($this->semStack[$this->stackPos-(2-1)]) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE; + $this->semValue = new Expr\Exit_($this->semStack[$this->stackPos-(2-2)], $attrs); + } + + protected function reduceRule363() { + $this->semValue = new Expr\ErrorSuppress($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule364() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule365() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule366() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule367() { + $this->semValue = new Expr\ShellExec($this->semStack[$this->stackPos-(3-2)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule368() { + $this->semValue = new Expr\Print_($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule369() { + $this->semValue = new Expr\Yield_(null, null, $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); + } + + protected function reduceRule370() { + $this->semValue = new Expr\YieldFrom($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule371() { + $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$this->stackPos-(10-2)], 'params' => $this->semStack[$this->stackPos-(10-4)], 'uses' => $this->semStack[$this->stackPos-(10-6)], 'returnType' => $this->semStack[$this->stackPos-(10-7)], 'stmts' => $this->semStack[$this->stackPos-(10-9)]], $this->startAttributeStack[$this->stackPos-(10-1)] + $this->endAttributes); + } + + protected function reduceRule372() { + $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$this->stackPos-(11-3)], 'params' => $this->semStack[$this->stackPos-(11-5)], 'uses' => $this->semStack[$this->stackPos-(11-7)], 'returnType' => $this->semStack[$this->stackPos-(11-8)], 'stmts' => $this->semStack[$this->stackPos-(11-10)]], $this->startAttributeStack[$this->stackPos-(11-1)] + $this->endAttributes); + } + + protected function reduceRule373() { + $this->semValue = $this->semStack[$this->stackPos-(3-2)]; + } + + protected function reduceRule374() { + $this->semValue = $this->semStack[$this->stackPos-(3-2)]; + } + + protected function reduceRule375() { + $this->semValue = new Expr\Yield_($this->semStack[$this->stackPos-(2-2)], null, $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule376() { + $this->semValue = new Expr\Yield_($this->semStack[$this->stackPos-(4-4)], $this->semStack[$this->stackPos-(4-2)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); + } + + protected function reduceRule377() { + $attrs = $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_LONG; + $this->semValue = new Expr\Array_($this->semStack[$this->stackPos-(4-3)], $attrs); + } + + protected function reduceRule378() { + $attrs = $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_SHORT; + $this->semValue = new Expr\Array_($this->semStack[$this->stackPos-(3-2)], $attrs); + } + + protected function reduceRule379() { + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$this->stackPos-(4-1)], $this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); + } + + protected function reduceRule380() { + $attrs = $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes; $attrs['kind'] = ($this->semStack[$this->stackPos-(4-1)][0] === "'" || ($this->semStack[$this->stackPos-(4-1)][1] === "'" && ($this->semStack[$this->stackPos-(4-1)][0] === 'b' || $this->semStack[$this->stackPos-(4-1)][0] === 'B')) ? Scalar\String_::KIND_SINGLE_QUOTED : Scalar\String_::KIND_DOUBLE_QUOTED); + $this->semValue = new Expr\ArrayDimFetch(new Scalar\String_(Scalar\String_::parse($this->semStack[$this->stackPos-(4-1)]), $attrs), $this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); + } + + protected function reduceRule381() { + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$this->stackPos-(4-1)], $this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); + } + + protected function reduceRule382() { + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$this->stackPos-(4-1)], $this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); + } + + protected function reduceRule383() { + $this->semValue = array(new Stmt\Class_(null, ['type' => 0, 'extends' => $this->semStack[$this->stackPos-(7-3)], 'implements' => $this->semStack[$this->stackPos-(7-4)], 'stmts' => $this->semStack[$this->stackPos-(7-6)]], $this->startAttributeStack[$this->stackPos-(7-1)] + $this->endAttributes), $this->semStack[$this->stackPos-(7-2)]); + $this->checkClass($this->semValue[0], -1); + } + + protected function reduceRule384() { + $this->semValue = new Expr\New_($this->semStack[$this->stackPos-(3-2)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule385() { + list($class, $ctorArgs) = $this->semStack[$this->stackPos-(2-2)]; $this->semValue = new Expr\New_($class, $ctorArgs, $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule386() { + $this->semValue = array(); + } + + protected function reduceRule387() { + $this->semValue = $this->semStack[$this->stackPos-(4-3)]; + } + + protected function reduceRule388() { + $this->semValue = array($this->semStack[$this->stackPos-(1-1)]); + } + + protected function reduceRule389() { + $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)]; + } + + protected function reduceRule390() { + $this->semValue = new Expr\ClosureUse(substr($this->semStack[$this->stackPos-(2-2)], 1), $this->semStack[$this->stackPos-(2-1)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule391() { + $this->semValue = new Expr\FuncCall($this->semStack[$this->stackPos-(2-1)], $this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule392() { + $this->semValue = new Expr\StaticCall($this->semStack[$this->stackPos-(4-1)], $this->semStack[$this->stackPos-(4-3)], $this->semStack[$this->stackPos-(4-4)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); + } + + protected function reduceRule393() { + $this->semValue = new Expr\StaticCall($this->semStack[$this->stackPos-(6-1)], $this->semStack[$this->stackPos-(6-4)], $this->semStack[$this->stackPos-(6-6)], $this->startAttributeStack[$this->stackPos-(6-1)] + $this->endAttributes); + } + + protected function reduceRule394() { + + if ($this->semStack[$this->stackPos-(2-1)] instanceof Node\Expr\StaticPropertyFetch) { + $this->semValue = new Expr\StaticCall($this->semStack[$this->stackPos-(2-1)]->class, new Expr\Variable($this->semStack[$this->stackPos-(2-1)]->name, $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes), $this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } elseif ($this->semStack[$this->stackPos-(2-1)] instanceof Node\Expr\ArrayDimFetch) { + $tmp = $this->semStack[$this->stackPos-(2-1)]; + while ($tmp->var instanceof Node\Expr\ArrayDimFetch) { + $tmp = $tmp->var; + } + + $this->semValue = new Expr\StaticCall($tmp->var->class, $this->semStack[$this->stackPos-(2-1)], $this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + $tmp->var = new Expr\Variable($tmp->var->name, $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } else { + throw new \Exception; + } + + } + + protected function reduceRule395() { + $this->semValue = new Expr\FuncCall($this->semStack[$this->stackPos-(2-1)], $this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule396() { + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$this->stackPos-(4-1)], $this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); + } + + protected function reduceRule397() { + $this->semValue = new Name($this->semStack[$this->stackPos-(1-1)], $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); + } + + protected function reduceRule398() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule399() { + $this->semValue = new Name($this->semStack[$this->stackPos-(1-1)], $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); + } + + protected function reduceRule400() { + $this->semValue = new Name\FullyQualified($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule401() { + $this->semValue = new Name\Relative($this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule402() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule403() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule404() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule405() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule406() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule407() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule408() { + $this->semValue = new Expr\PropertyFetch($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule409() { + $this->semValue = new Expr\PropertyFetch($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule410() { + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$this->stackPos-(4-1)], $this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); + } + + protected function reduceRule411() { + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$this->stackPos-(4-1)], $this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); + } + + protected function reduceRule412() { + $this->semValue = null; + } + + protected function reduceRule413() { + $this->semValue = null; + } + + protected function reduceRule414() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule415() { + $this->semValue = array(); + } + + protected function reduceRule416() { + $this->semValue = array(new Scalar\EncapsedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$this->stackPos-(1-1)], '`', false), $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes)); + } + + protected function reduceRule417() { + foreach ($this->semStack[$this->stackPos-(1-1)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', false); } }; $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule418() { + $this->semValue = array(); + } + + protected function reduceRule419() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule420() { + $this->semValue = $this->parseLNumber($this->semStack[$this->stackPos-(1-1)], $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes, true); + } + + protected function reduceRule421() { + $this->semValue = new Scalar\DNumber(Scalar\DNumber::parse($this->semStack[$this->stackPos-(1-1)]), $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); + } + + protected function reduceRule422() { + $attrs = $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes; $attrs['kind'] = ($this->semStack[$this->stackPos-(1-1)][0] === "'" || ($this->semStack[$this->stackPos-(1-1)][1] === "'" && ($this->semStack[$this->stackPos-(1-1)][0] === 'b' || $this->semStack[$this->stackPos-(1-1)][0] === 'B')) ? Scalar\String_::KIND_SINGLE_QUOTED : Scalar\String_::KIND_DOUBLE_QUOTED); + $this->semValue = new Scalar\String_(Scalar\String_::parse($this->semStack[$this->stackPos-(1-1)], false), $attrs); + } + + protected function reduceRule423() { + $this->semValue = new Scalar\MagicConst\Line($this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); + } + + protected function reduceRule424() { + $this->semValue = new Scalar\MagicConst\File($this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); + } + + protected function reduceRule425() { + $this->semValue = new Scalar\MagicConst\Dir($this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); + } + + protected function reduceRule426() { + $this->semValue = new Scalar\MagicConst\Class_($this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); + } + + protected function reduceRule427() { + $this->semValue = new Scalar\MagicConst\Trait_($this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); + } + + protected function reduceRule428() { + $this->semValue = new Scalar\MagicConst\Method($this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); + } + + protected function reduceRule429() { + $this->semValue = new Scalar\MagicConst\Function_($this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); + } + + protected function reduceRule430() { + $this->semValue = new Scalar\MagicConst\Namespace_($this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); + } + + protected function reduceRule431() { + $attrs = $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = strpos($this->semStack[$this->stackPos-(3-1)], "'") === false ? Scalar\String_::KIND_HEREDOC : Scalar\String_::KIND_NOWDOC; preg_match('/\A[bB]?<<<[ \t]*[\'"]?([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)[\'"]?(?:\r\n|\n|\r)\z/', $this->semStack[$this->stackPos-(3-1)], $matches); $attrs['docLabel'] = $matches[1];; + $this->semValue = new Scalar\String_(Scalar\String_::parseDocString($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-2)], false), $attrs); + } + + protected function reduceRule432() { + $attrs = $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes; $attrs['kind'] = strpos($this->semStack[$this->stackPos-(2-1)], "'") === false ? Scalar\String_::KIND_HEREDOC : Scalar\String_::KIND_NOWDOC; preg_match('/\A[bB]?<<<[ \t]*[\'"]?([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)[\'"]?(?:\r\n|\n|\r)\z/', $this->semStack[$this->stackPos-(2-1)], $matches); $attrs['docLabel'] = $matches[1];; + $this->semValue = new Scalar\String_('', $attrs); + } + + protected function reduceRule433() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule434() { + $this->semValue = new Expr\ClassConstFetch($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule435() { + $this->semValue = new Expr\ConstFetch($this->semStack[$this->stackPos-(1-1)], $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); + } + + protected function reduceRule436() { + $this->semValue = new Expr\Array_($this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); + } + + protected function reduceRule437() { + $this->semValue = new Expr\Array_($this->semStack[$this->stackPos-(3-2)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule438() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule439() { + $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule440() { + $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule441() { + $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule442() { + $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule443() { + $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule444() { + $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule445() { + $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule446() { + $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule447() { + $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule448() { + $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule449() { + $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule450() { + $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule451() { + $this->semValue = new Expr\BinaryOp\Div($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule452() { + $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule453() { + $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule454() { + $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule455() { + $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule456() { + $this->semValue = new Expr\UnaryPlus($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule457() { + $this->semValue = new Expr\UnaryMinus($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule458() { + $this->semValue = new Expr\BooleanNot($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule459() { + $this->semValue = new Expr\BitwiseNot($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule460() { + $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule461() { + $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule462() { + $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule463() { + $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule464() { + $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule465() { + $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule466() { + $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule467() { + $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule468() { + $this->semValue = new Expr\Ternary($this->semStack[$this->stackPos-(5-1)], $this->semStack[$this->stackPos-(5-3)], $this->semStack[$this->stackPos-(5-5)], $this->startAttributeStack[$this->stackPos-(5-1)] + $this->endAttributes); + } + + protected function reduceRule469() { + $this->semValue = new Expr\Ternary($this->semStack[$this->stackPos-(4-1)], null, $this->semStack[$this->stackPos-(4-4)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); + } + + protected function reduceRule470() { + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$this->stackPos-(4-1)], $this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); + } + + protected function reduceRule471() { + $this->semValue = $this->semStack[$this->stackPos-(3-2)]; + } + + protected function reduceRule472() { + $this->semValue = new Expr\ConstFetch($this->semStack[$this->stackPos-(1-1)], $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); + } + + protected function reduceRule473() { + $this->semValue = new Expr\ClassConstFetch($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule474() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule475() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule476() { + $attrs = $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; + foreach ($this->semStack[$this->stackPos-(3-2)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', true); } }; $this->semValue = new Scalar\Encapsed($this->semStack[$this->stackPos-(3-2)], $attrs); + } + + protected function reduceRule477() { + $attrs = $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = strpos($this->semStack[$this->stackPos-(3-1)], "'") === false ? Scalar\String_::KIND_HEREDOC : Scalar\String_::KIND_NOWDOC; preg_match('/\A[bB]?<<<[ \t]*[\'"]?([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)[\'"]?(?:\r\n|\n|\r)\z/', $this->semStack[$this->stackPos-(3-1)], $matches); $attrs['docLabel'] = $matches[1];; + foreach ($this->semStack[$this->stackPos-(3-2)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, null, true); } } $s->value = preg_replace('~(\r\n|\n|\r)\z~', '', $s->value); if ('' === $s->value) array_pop($this->semStack[$this->stackPos-(3-2)]);; $this->semValue = new Scalar\Encapsed($this->semStack[$this->stackPos-(3-2)], $attrs); + } + + protected function reduceRule478() { + $this->semValue = array(); + } + + protected function reduceRule479() { + $this->semValue = $this->semStack[$this->stackPos-(2-1)]; + } + + protected function reduceRule480() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule481() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule482() { + $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)]; + } + + protected function reduceRule483() { + $this->semValue = array($this->semStack[$this->stackPos-(1-1)]); + } + + protected function reduceRule484() { + $this->semValue = new Expr\ArrayItem($this->semStack[$this->stackPos-(3-3)], $this->semStack[$this->stackPos-(3-1)], false, $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule485() { + $this->semValue = new Expr\ArrayItem($this->semStack[$this->stackPos-(1-1)], null, false, $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); + } + + protected function reduceRule486() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule487() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule488() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule489() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule490() { + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$this->stackPos-(6-2)], $this->semStack[$this->stackPos-(6-5)], $this->startAttributeStack[$this->stackPos-(6-1)] + $this->endAttributes); + } + + protected function reduceRule491() { + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$this->stackPos-(4-1)], $this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); + } + + protected function reduceRule492() { + $this->semValue = new Expr\PropertyFetch($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule493() { + $this->semValue = new Expr\MethodCall($this->semStack[$this->stackPos-(4-1)], $this->semStack[$this->stackPos-(4-3)], $this->semStack[$this->stackPos-(4-4)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); + } + + protected function reduceRule494() { + $this->semValue = new Expr\FuncCall($this->semStack[$this->stackPos-(2-1)], $this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule495() { + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$this->stackPos-(4-1)], $this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); + } + + protected function reduceRule496() { + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$this->stackPos-(4-1)], $this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); + } + + protected function reduceRule497() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule498() { + $this->semValue = $this->semStack[$this->stackPos-(3-2)]; + } + + protected function reduceRule499() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule500() { + $this->semValue = new Expr\Variable($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule501() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule502() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule503() { + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$this->stackPos-(4-1)], $this->semStack[$this->stackPos-(4-4)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); + } + + protected function reduceRule504() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule505() { + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$this->stackPos-(3-1)], substr($this->semStack[$this->stackPos-(3-3)], 1), $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule506() { + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$this->stackPos-(6-1)], $this->semStack[$this->stackPos-(6-5)], $this->startAttributeStack[$this->stackPos-(6-1)] + $this->endAttributes); + } + + protected function reduceRule507() { + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$this->stackPos-(4-1)], $this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); + } + + protected function reduceRule508() { + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$this->stackPos-(4-1)], $this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); + } + + protected function reduceRule509() { + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$this->stackPos-(4-1)], $this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); + } + + protected function reduceRule510() { + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$this->stackPos-(4-1)], $this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); + } + + protected function reduceRule511() { + $this->semValue = new Expr\Variable(substr($this->semStack[$this->stackPos-(1-1)], 1), $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); + } + + protected function reduceRule512() { + $this->semValue = new Expr\Variable($this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); + } + + protected function reduceRule513() { + $this->semValue = null; + } + + protected function reduceRule514() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule515() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule516() { + $this->semValue = $this->semStack[$this->stackPos-(3-2)]; + } + + protected function reduceRule517() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule518() { + $this->semValue = new Expr\Error($this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; + } + + protected function reduceRule519() { + $this->semValue = new Expr\List_($this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); + } + + protected function reduceRule520() { + $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)]; + } + + protected function reduceRule521() { + $this->semValue = array($this->semStack[$this->stackPos-(1-1)]); + } + + protected function reduceRule522() { + $this->semValue = new Expr\ArrayItem($this->semStack[$this->stackPos-(1-1)], null, false, $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); + } + + protected function reduceRule523() { + $this->semValue = new Expr\ArrayItem($this->semStack[$this->stackPos-(1-1)], null, false, $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); + } + + protected function reduceRule524() { + $this->semValue = null; + } + + protected function reduceRule525() { + $this->semValue = array(); + } + + protected function reduceRule526() { + $this->semValue = $this->semStack[$this->stackPos-(2-1)]; + } + + protected function reduceRule527() { + $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)]; + } + + protected function reduceRule528() { + $this->semValue = array($this->semStack[$this->stackPos-(1-1)]); + } + + protected function reduceRule529() { + $this->semValue = new Expr\ArrayItem($this->semStack[$this->stackPos-(3-3)], $this->semStack[$this->stackPos-(3-1)], false, $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule530() { + $this->semValue = new Expr\ArrayItem($this->semStack[$this->stackPos-(1-1)], null, false, $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); + } + + protected function reduceRule531() { + $this->semValue = new Expr\ArrayItem($this->semStack[$this->stackPos-(4-4)], $this->semStack[$this->stackPos-(4-1)], true, $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); + } + + protected function reduceRule532() { + $this->semValue = new Expr\ArrayItem($this->semStack[$this->stackPos-(2-2)], null, true, $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule533() { + $this->semStack[$this->stackPos-(2-1)][] = $this->semStack[$this->stackPos-(2-2)]; $this->semValue = $this->semStack[$this->stackPos-(2-1)]; + } + + protected function reduceRule534() { + $this->semStack[$this->stackPos-(2-1)][] = $this->semStack[$this->stackPos-(2-2)]; $this->semValue = $this->semStack[$this->stackPos-(2-1)]; + } + + protected function reduceRule535() { + $this->semValue = array($this->semStack[$this->stackPos-(1-1)]); + } + + protected function reduceRule536() { + $this->semValue = array($this->semStack[$this->stackPos-(2-1)], $this->semStack[$this->stackPos-(2-2)]); + } + + protected function reduceRule537() { + $this->semValue = new Scalar\EncapsedStringPart($this->semStack[$this->stackPos-(1-1)], $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); + } + + protected function reduceRule538() { + $this->semValue = new Expr\Variable(substr($this->semStack[$this->stackPos-(1-1)], 1), $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); + } + + protected function reduceRule539() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule540() { + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$this->stackPos-(4-1)], $this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); + } + + protected function reduceRule541() { + $this->semValue = new Expr\PropertyFetch($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule542() { + $this->semValue = new Expr\Variable($this->semStack[$this->stackPos-(3-2)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule543() { + $this->semValue = new Expr\Variable($this->semStack[$this->stackPos-(3-2)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule544() { + $this->semValue = new Expr\ArrayDimFetch(new Expr\Variable($this->semStack[$this->stackPos-(6-2)], $this->startAttributeStack[$this->stackPos-(6-1)] + $this->endAttributes), $this->semStack[$this->stackPos-(6-4)], $this->startAttributeStack[$this->stackPos-(6-1)] + $this->endAttributes); + } + + protected function reduceRule545() { + $this->semValue = $this->semStack[$this->stackPos-(3-2)]; + } + + protected function reduceRule546() { + $this->semValue = new Scalar\String_($this->semStack[$this->stackPos-(1-1)], $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); + } + + protected function reduceRule547() { + $this->semValue = $this->parseNumString($this->semStack[$this->stackPos-(1-1)], $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); + } + + protected function reduceRule548() { + $this->semValue = new Expr\Variable(substr($this->semStack[$this->stackPos-(1-1)], 1), $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Parser/Php7.php b/vendor/nikic/php-parser/lib/PhpParser/Parser/Php7.php new file mode 100644 index 0000000..b7a63c3 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Parser/Php7.php @@ -0,0 +1,2847 @@ +'", + "T_IS_GREATER_OR_EQUAL", + "T_SL", + "T_SR", + "'+'", + "'-'", + "'.'", + "'*'", + "'/'", + "'%'", + "'!'", + "T_INSTANCEOF", + "'~'", + "T_INC", + "T_DEC", + "T_INT_CAST", + "T_DOUBLE_CAST", + "T_STRING_CAST", + "T_ARRAY_CAST", + "T_OBJECT_CAST", + "T_BOOL_CAST", + "T_UNSET_CAST", + "'@'", + "T_POW", + "'['", + "T_NEW", + "T_CLONE", + "T_EXIT", + "T_IF", + "T_ELSEIF", + "T_ELSE", + "T_ENDIF", + "T_LNUMBER", + "T_DNUMBER", + "T_STRING", + "T_STRING_VARNAME", + "T_VARIABLE", + "T_NUM_STRING", + "T_INLINE_HTML", + "T_ENCAPSED_AND_WHITESPACE", + "T_CONSTANT_ENCAPSED_STRING", + "T_ECHO", + "T_DO", + "T_WHILE", + "T_ENDWHILE", + "T_FOR", + "T_ENDFOR", + "T_FOREACH", + "T_ENDFOREACH", + "T_DECLARE", + "T_ENDDECLARE", + "T_AS", + "T_SWITCH", + "T_ENDSWITCH", + "T_CASE", + "T_DEFAULT", + "T_BREAK", + "T_CONTINUE", + "T_GOTO", + "T_FUNCTION", + "T_CONST", + "T_RETURN", + "T_TRY", + "T_CATCH", + "T_FINALLY", + "T_THROW", + "T_USE", + "T_INSTEADOF", + "T_GLOBAL", + "T_STATIC", + "T_ABSTRACT", + "T_FINAL", + "T_PRIVATE", + "T_PROTECTED", + "T_PUBLIC", + "T_VAR", + "T_UNSET", + "T_ISSET", + "T_EMPTY", + "T_HALT_COMPILER", + "T_CLASS", + "T_TRAIT", + "T_INTERFACE", + "T_EXTENDS", + "T_IMPLEMENTS", + "T_OBJECT_OPERATOR", + "T_LIST", + "T_ARRAY", + "T_CALLABLE", + "T_CLASS_C", + "T_TRAIT_C", + "T_METHOD_C", + "T_FUNC_C", + "T_LINE", + "T_FILE", + "T_START_HEREDOC", + "T_END_HEREDOC", + "T_DOLLAR_OPEN_CURLY_BRACES", + "T_CURLY_OPEN", + "T_PAAMAYIM_NEKUDOTAYIM", + "T_NAMESPACE", + "T_NS_C", + "T_DIR", + "T_NS_SEPARATOR", + "T_ELLIPSIS", + "';'", + "'{'", + "'}'", + "'('", + "')'", + "'`'", + "']'", + "'\"'", + "'$'" + ); + + protected $tokenToSymbol = array( + 0, 157, 157, 157, 157, 157, 157, 157, 157, 157, + 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, + 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, + 157, 157, 157, 53, 155, 157, 156, 52, 35, 157, + 151, 152, 50, 47, 7, 48, 49, 51, 157, 157, + 157, 157, 157, 157, 157, 157, 157, 157, 29, 148, + 41, 15, 43, 28, 65, 157, 157, 157, 157, 157, + 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, + 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, + 157, 67, 157, 154, 34, 157, 153, 157, 157, 157, + 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, + 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, + 157, 157, 157, 149, 33, 150, 55, 157, 157, 157, + 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, + 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, + 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, + 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, + 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, + 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, + 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, + 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, + 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, + 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, + 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, + 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, + 157, 157, 157, 157, 157, 157, 1, 2, 3, 4, + 5, 6, 8, 9, 10, 11, 12, 13, 14, 16, + 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, + 27, 30, 31, 32, 36, 37, 38, 39, 40, 42, + 44, 45, 46, 54, 56, 57, 58, 59, 60, 61, + 62, 63, 64, 66, 68, 69, 70, 71, 72, 73, + 74, 75, 76, 77, 78, 79, 80, 81, 157, 157, + 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, + 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, + 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 157, 157, 157, 157, + 157, 157, 138, 139, 140, 141, 142, 143, 144, 145, + 146, 147 + ); + + protected $action = array( + 581, 582, 583, 584, 585, 0, 586, 587, 588, 624, + 625, 477, 27, 99, 100, 101, 102, 103, 104, 105, + 106, 107, 108, 109, 110,-32766,-32766,-32766, 95, 96, + 97, 361, 239, 263, -280,-32766,-32766,-32766, -486, -485, + 1077, 542, 1080, 1078, 98,-32766, 272,-32766,-32766,-32766, + -32766,-32766, 589, 897, 899,-32766,-32766,-32766,-32766,-32766, + -32766,-32766,-32766, 240,-32766, 662, 590, 591, 592, 593, + 594, 595, 596,-32766, 289, 656, 865, 866, 867, 864, + 863, 862, 597, 598, 599, 600, 601, 602, 603, 604, + 605, 606, 607, 627, 628, 629, 630, 631, 619, 620, + 621, 622, 623, 608, 609, 610, 611, 612, 613, 614, + 650, 651, 652, 653, 654, 655, 615, 616, 617, 618, + 648, 639, 637, 638, 634, 635, 215, 626, 632, 633, + 640, 641, 643, 642, 644, 645, 42, 43, 390, 44, + 45, 636, 647, 646, 224, 46, 47, 980, 48,-32767, + -32767,-32767,-32767, 90, 91, 92, 93, 94, 258, 440, + 22, 865, 866, 867, 864, 863, 862, 857,-32766,-32766, + -32766, 1069, 1030, 1030, 1068, 1047, 996, 293, -441, 246, + 287, 49, 50, -486, -485, -486, -485, 51,-32766, 52, + 219, 220, 53, 54, 55, 56, 57, 58, 59, 60, + 125, 22, 232, 61, 345, 973,-32766,-32766,-32766, 997, + 998, 658, 661, 1030, 28, -475, 1010, 996,-32766,-32766, + -32766, 735, 407, 408, 246, 1030,-32766, 246,-32766,-32766, + -32766,-32766, 25, 222, 373, 385, 349, 226,-32766, -441, + -32766,-32766,-32766, 1033, 65, 342, 416, 216, 41, 264, + 264, 1044, 7, -441, 403, 404, 120, 21, 973, 24, + -441, 820, -444, 407, 408, -225, 1002, 1003, 1004, 1005, + 999, 1000, 243, 116, -440, -439, 265, 417, 1006, 1001, + 347, 814, 815, 1074, 992, 63, 369, 255, 362, 260, + 264, 391, -131, -131, -131, -4, 735, 392, 658, 224, + -439, 725, 264, -88, 32, 17, 393, -131, 394, -131, + 395, -131, 396, -131, 128, 397, -131, -131, -131, 34, + 35, 398, 346, 122, 36, 399, 814, 815, 62, 814, + 815, 286, 288, 400, 401, -440, -439, 465, -249, 402, + 38, 40, 711, 756, 405, 406, -170, 22, -230, -440, + -439,-32766,-32766,-32766, 374, -171, -440, -439, -443, 1030, + -475, -439, 1030, 996, 417, -477, 391, 347, 737, 547, + -131,-32766, 392,-32766,-32766, -439, 725, 676, 677, 32, + 17, 393, -439, 394, 276, 395, 357, 396, 787, 549, + 397, 71, 973, 1048, 34, 35, 398, 346, 335, 36, + 399, 247, 248, 62, 254, 735, 286, 288, 400, 401, + 408, 120, 131, 530, 402, 980, 306, 668, 756, 405, + 406, 337, 113, 115,-32766,-32766, 72, 73, 74, 242, + 529, 65, 121, 553, 502, 18, 264, 126, 274, 264, + -32766,-32766,-32766, 737, 547, -4, 26, 749, 75, 76, + 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, + 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, + 97, 111, 239, 118, 735, 391, 92, 93, 94, 531, + 112, 392, 347, -249, 98, 725, 843, 124, 32, 17, + 393, -170, 394, 1030, 395, 130, 396, 515, 516, 397, + -171, 117, 554, 34, 35, 398, 735, 788, 36, 399, + -477, 734, 62, 383, 6, 286, 288,-32766,-32766,-32766, + 127, 311, 114, 402, 676, 677, 973, 495, 496, 814, + 815, 854, 565, 119, 552, 842, 575, 343, 223, 564, + 559, 221, 225, 239, 391, 98, 658, 439, 39, 525, + 392, 659, 773, 547, 725, 435, 969, 32, 17, 393, + 358, 394, 356, 395, 299, 396, 319, 692, 397, 1072, + 264, 451, 34, 35, 398, 735, 391, 36, 399, 453, + 511, 62, 392, 449, 286, 288, 725, 499, 540, 32, + 17, 393, 402, 394, 438, 395, 1079, 396, 354, 444, + 397,-32766, 493, 551, 34, 35, 398, 735, 503, 36, + 399, 526, -80, 62, 757, 507, 286, 288, 214, 456, + 10, 737, 547, 519, 402, 508, 973, 257, 15, 0, + 338, 0, 0, 259, 1009, 560, 758, 1012, 262, 0, + 0, 0, 0, 0, 0, 391, 0, 0, 0, 0, + 0, 392, 0, 737, 547, 725, 227, 256, 32, 17, + 393, 0, 394, 0, 395, 0, 396, 0, 0, 397, + 3, 0, 9, 34, 35, 398, 735, 391, 36, 399, + 305, -398, 62, 392, 751, 286, 288, 725, 22, 339, + 32, 17, 393, 402, 394, 327, 395, 324, 396, 316, + 1030, 397, 323, 357, 996, 34, 35, 398, 446, 771, + 36, 399, 31, 573, 62, 574, 716, 286, 288, 838, + 848, 790, 737, 547, 30, 402, 847, 850, 849, 846, + 769, 774, 714, 973, 782, 839, 781, 19, 548, 333, + 550, 555, 557, 558, 270, 271, 391, 332, 571, 570, + 407, 408, 392, 568, 737, 547, 725, 566, 563, 32, + 17, 393, 562, 394, 755, 395, 754, 396, 753, 961, + 397, -442, 65, 855, 34, 35, 398, 264, 742, 36, + 399, 960, 959, 62, 752, 744, 286, 288,-32766,-32766, + -32766, 679, 1075, 678, 402, 681, 680, 670, 671, 780, + 567, 712, 1076, 779, 1045, 1042, 1037, 1024,-32766, 1031, + -32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767, + -32767, 1073, 250, 737, 547, -465, 953, -444, -443, 20, + 23, 29, 33, 37, 64, 336, 334, 273, 238, 237, + 236, 235, 218, 217, 132, 129, 123, 70, 69, 68, + 67, 66, -467, 0, 308, 473, 937, 489, 539, -228, + 940, 11, 965, 821, 994, 936, 984, 536, 388, -88, + 381, 378, 375, 309, 16, 14, 13, 12, -225, -226, + 0, -410, 0, 993, 501, 1071, 1036, 1023, 1022, 0, + 1011 + ); + + protected $actionCheck = array( + 2, 3, 4, 5, 6, 0, 8, 9, 10, 11, + 12, 48, 15, 16, 17, 18, 19, 20, 21, 22, + 23, 24, 25, 26, 27, 8, 9, 10, 50, 51, + 52, 7, 54, 7, 79, 8, 9, 10, 7, 7, + 77, 77, 79, 80, 66, 28, 7, 30, 31, 32, + 33, 34, 54, 56, 57, 28, 8, 30, 31, 32, + 33, 34, 35, 7, 109, 1, 68, 69, 70, 71, + 72, 73, 74, 118, 7, 77, 112, 113, 114, 115, + 116, 117, 84, 85, 86, 87, 88, 89, 90, 91, + 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, + 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 126, 127, 13, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 2, 3, 4, 5, + 6, 143, 144, 145, 35, 11, 12, 1, 14, 41, + 42, 43, 44, 45, 46, 47, 48, 49, 109, 82, + 67, 112, 113, 114, 115, 116, 117, 118, 8, 9, + 10, 79, 79, 79, 82, 1, 83, 7, 67, 28, + 7, 47, 48, 152, 152, 154, 154, 53, 28, 55, + 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, + 67, 67, 68, 69, 70, 112, 8, 9, 10, 75, + 76, 77, 148, 79, 13, 7, 139, 83, 8, 9, + 10, 1, 129, 130, 28, 79, 28, 28, 30, 31, + 32, 33, 140, 141, 29, 7, 102, 7, 28, 128, + 30, 31, 32, 1, 151, 7, 112, 13, 7, 156, + 156, 77, 7, 142, 120, 121, 147, 7, 112, 7, + 149, 152, 151, 129, 130, 152, 132, 133, 134, 135, + 136, 137, 138, 7, 67, 67, 67, 143, 144, 145, + 146, 130, 131, 150, 1, 151, 7, 153, 7, 155, + 156, 71, 72, 73, 74, 0, 1, 77, 77, 35, + 67, 81, 156, 152, 84, 85, 86, 87, 88, 89, + 90, 91, 92, 93, 15, 95, 96, 97, 98, 99, + 100, 101, 102, 149, 104, 105, 130, 131, 108, 130, + 131, 111, 112, 113, 114, 128, 128, 128, 7, 119, + 67, 67, 122, 123, 124, 125, 7, 67, 152, 142, + 142, 8, 9, 10, 149, 7, 149, 149, 151, 79, + 152, 128, 79, 83, 143, 7, 71, 146, 148, 149, + 150, 28, 77, 30, 31, 142, 81, 102, 103, 84, + 85, 86, 149, 88, 33, 90, 146, 92, 29, 149, + 95, 149, 112, 152, 99, 100, 101, 102, 103, 104, + 105, 128, 128, 108, 109, 1, 111, 112, 113, 114, + 130, 147, 15, 77, 119, 1, 142, 122, 123, 124, + 125, 146, 149, 149, 8, 9, 8, 9, 10, 29, + 79, 151, 149, 29, 72, 73, 156, 29, 143, 156, + 8, 9, 10, 148, 149, 150, 28, 35, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 15, 54, 15, 1, 71, 47, 48, 49, 143, + 15, 77, 146, 152, 66, 81, 150, 15, 84, 85, + 86, 152, 88, 79, 90, 15, 92, 72, 73, 95, + 152, 15, 29, 99, 100, 101, 1, 148, 104, 105, + 152, 29, 108, 102, 103, 111, 112, 8, 9, 10, + 97, 98, 13, 119, 102, 103, 112, 106, 107, 130, + 131, 148, 149, 29, 29, 148, 149, 123, 35, 29, + 29, 35, 35, 54, 71, 66, 77, 77, 67, 74, + 77, 77, 148, 149, 81, 77, 79, 84, 85, 86, + 77, 88, 77, 90, 77, 92, 78, 77, 95, 77, + 156, 77, 99, 100, 101, 1, 71, 104, 105, 77, + 79, 108, 77, 86, 111, 112, 81, 79, 89, 84, + 85, 86, 119, 88, 79, 90, 80, 92, 102, 82, + 95, 82, 109, 29, 99, 100, 101, 1, 87, 104, + 105, 91, 94, 108, 123, 93, 111, 112, 94, 94, + 94, 148, 149, 96, 119, 96, 112, 127, 152, -1, + 146, -1, -1, 110, 139, 29, 123, 139, 126, -1, + -1, -1, -1, -1, -1, 71, -1, -1, -1, -1, + -1, 77, -1, 148, 149, 81, 35, 126, 84, 85, + 86, -1, 88, -1, 90, -1, 92, -1, -1, 95, + 142, -1, 142, 99, 100, 101, 1, 71, 104, 105, + 142, 142, 108, 77, 147, 111, 112, 81, 67, 146, + 84, 85, 86, 119, 88, 146, 90, 146, 92, 146, + 79, 95, 146, 146, 83, 99, 100, 101, 146, 148, + 104, 105, 148, 148, 108, 148, 148, 111, 112, 148, + 148, 148, 148, 149, 148, 119, 148, 148, 148, 148, + 148, 148, 148, 112, 148, 148, 148, 152, 149, 149, + 149, 149, 149, 149, 149, 149, 71, 149, 149, 149, + 129, 130, 77, 149, 148, 149, 81, 149, 149, 84, + 85, 86, 149, 88, 150, 90, 150, 92, 150, 150, + 95, 151, 151, 150, 99, 100, 101, 156, 150, 104, + 105, 150, 150, 108, 150, 150, 111, 112, 8, 9, + 10, 150, 150, 150, 119, 150, 150, 150, 150, 150, + 150, 150, 150, 150, 150, 150, 150, 150, 28, 150, + 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, + 40, 150, 152, 148, 149, 151, 153, 151, 151, 151, + 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, + 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, + 151, 151, 151, -1, 152, 152, 152, 152, 152, 152, + 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, + 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, + -1, 153, -1, 154, 154, 154, 154, 154, 154, -1, + 155 + ); + + protected $actionBase = array( + 0, 220, 295, 283, 336, 572, -2, -2, -2, -2, + -36, 505, 473, 606, 473, 574, 404, 675, 675, 675, + 109, 264, 506, 506, 506, 488, 504, 503, 507, 134, + 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, + 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, + 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, + 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, + 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, + 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, + 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, + 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, + 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, + 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, + 134, 134, 134, 64, 64, 359, 201, 670, 708, 703, + 476, 709, 524, 702, 704, 234, 671, 659, 408, 657, + 656, 655, 654, 705, 730, 585, 706, 418, 418, 418, + 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, + 418, 418, 418, 48, 509, 416, 432, 432, 432, 432, + 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, + 432, 432, 432, 432, 432, 160, 160, 160, 343, 210, + 208, 198, 17, 233, 27, 780, 780, 780, 780, 780, + 108, 108, 108, 108, 621, 621, 93, 280, 280, 280, + 280, 280, 280, 280, 280, 280, 280, 280, 614, 616, + 618, 619, 414, 429, 429, 196, 196, 196, 196, 146, + 151, -45, 199, 77, 498, 735, 399, 174, 174, 111, + 207, -22, -22, -22, 275, 517, 514, 514, 514, 514, + 92, 92, 514, 514, 242, -37, 233, 233, 274, 233, + 422, 422, 422, 221, 240, 519, 221, 591, 529, 653, + 527, 649, 273, 31, 32, 484, 94, 543, 496, 94, + 421, 362, 425, 717, 64, 539, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 94, 94, 64, 205, 64, + 387, 359, 383, 489, 502, 209, 595, 339, 241, 133, + 489, 489, 489, 596, 598, 331, 113, 590, 348, 411, + 358, 351, 469, 469, 412, 478, 494, 469, 469, 469, + 469, 508, 469, 678, 678, 682, 412, 469, 678, 412, + 266, 24, 173, 67, 412, 281, 531, 469, 512, 512, + 279, 478, 515, 230, 250, 500, 678, 678, 500, 494, + 56, 412, 26, 565, 567, 493, 537, 39, 400, 400, + 238, 493, 228, 412, 400, 508, 245, 170, 400, 5, + 683, 700, 482, 699, 680, 698, 684, 697, 487, 589, + 491, 513, 692, 691, 696, 470, 485, 681, 679, 562, + 483, 456, 465, 528, 481, 620, 496, 557, 479, 479, + 479, 481, 676, 479, 479, 479, 479, 479, 479, 479, + 479, 729, 252, 538, 497, 486, 553, 525, 458, 608, + 495, 562, 562, 651, 728, 673, 474, 690, 714, 695, + 576, 472, 722, 689, 650, 556, 490, 551, 688, 721, + 713, 604, 456, 712, 652, 492, 562, 648, 479, 674, + 701, 734, 733, 677, 732, 720, 549, 516, 731, 647, + 711, 600, 599, 564, 725, 707, 719, 646, 718, 568, + 521, 727, 522, 685, 501, 686, 592, 645, 643, 299, + 571, 642, 694, 573, 724, 723, 726, 583, 588, 593, + 594, 480, 641, 397, 587, 693, 511, 475, 520, 586, + 477, 710, 635, 613, 687, 584, 561, 634, 632, 715, + 518, 557, 530, 523, 526, 499, 609, 631, 716, 510, + 582, 581, 580, 579, 628, 578, 623, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 134, 134, -2, + -2, -2, 0, 0, 0, 0, -2, 134, 134, 134, + 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, + 134, 134, 134, 134, 134, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 418, + 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, + 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, + 418, 418, 418, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 418, + 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, + 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, + 418, 418, 418, 418, 418, 418, -3, 418, 418, -3, + 418, 418, 418, 418, 418, 418, -22, -22, -22, -22, + 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, + 221, 221, 221, 221, 49, 49, 49, 49, 221, -22, + -22, 221, 221, 221, 221, 221, 221, 49, 221, 92, + 92, 92, 221, 94, 94, 0, 0, 0, 0, 0, + 469, 92, 221, 221, 221, 221, 0, 0, 221, 221, + 94, 0, 0, 0, 0, 0, 469, 469, 469, 0, + 469, 92, 0, 64, 423, 423, 423, 423, 0, 0, + 0, 469, 0, 469, 515, 0, 0, 0, 0, 412, + 0, 678, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 479, + 690, 0, 474, 0, 0, 0, 479, 479, 479, 474, + 474, 0, 0, 474 + ); + + protected $actionDefault = array( + 3,32767,32767,32767,32767,32767,32767, 88,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767, 88, 487, 487, 487,32767,32767,32767,32767, 300, + 300, 300,32767, 479, 437, 437, 437, 437, 437, 437, + 437, 479,32767,32767,32767,32767,32767, 379,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 88,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 484,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767, 362, 363, 365, + 366, 299, 438, 248, 483, 298, 124, 259, 250, 202, + 296, 234, 128, 327, 380, 329, 378, 382, 328, 305, + 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, + 319, 320, 303, 304, 381, 359, 358, 357, 325, 326, + 302, 330, 332, 302, 331, 348, 349, 346, 347, 350, + 351, 352, 353, 354,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 88,32767, 282, 282, + 282, 282,32767, 339, 340, 240, 240, 240, 240,32767, + 240, 283,32767,32767,32767,32767,32767,32767,32767, 431, + 356, 334, 335, 333,32767, 409,32767,32767,32767,32767, + 32767, 411,32767, 88,32767,32767, 322, 324, 403, 306, + 32767,32767, 88,32767,32767,32767,32767,32767,32767,32767, + 32767,32767, 406, 439, 439,32767,32767, 88, 397, 88, + 167, 221, 223, 172,32767, 414,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767, 344,32767, 494,32767, 439,32767,32767, + 336, 337, 338,32767,32767, 439, 439,32767, 439,32767, + 439,32767,32767,32767, 172,32767,32767,32767,32767,32767, + 32767,32767, 88, 412, 412, 407, 172,32767,32767, 172, + 87, 87, 87, 87, 172, 87, 185,32767, 183, 183, + 87, 88, 88, 87, 87, 187,32767, 453, 187, 88, + 87, 172, 87, 207, 207, 388, 174, 87, 242, 242, + 87, 388, 87, 172, 242, 88, 87, 87, 242,32767, + 32767,32767, 82,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767, 399, + 32767,32767, 419,32767, 432, 451, 397,32767, 342, 343, + 345,32767, 441, 367, 368, 369, 370, 371, 372, 373, + 375,32767, 480, 402,32767,32767, 84, 115, 258,32767, + 492, 84, 400,32767, 492,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767, 84,32767, 84,32767,32767, + 32767,32767, 476,32767, 439,32767, 401,32767, 341, 415, + 458,32767,32767, 440,32767,32767, 84,32767,32767,32767, + 32767,32767,32767,32767,32767, 419,32767,32767,32767,32767, + 32767, 439,32767,32767,32767,32767,32767,32767,32767, 295, + 32767,32767,32767,32767,32767,32767, 439,32767,32767,32767, + 32767, 233,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 82, 60,32767, 276,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767, 130, 130, 3, + 3, 130, 130, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 261, 162, 261, 215, + 261, 261, 218, 207, 207, 268 + ); + + protected $goto = array( + 163, 163, 136, 136, 136, 146, 148, 179, 164, 161, + 161, 161, 161, 145, 162, 162, 162, 162, 162, 162, + 162, 145, 157, 158, 159, 160, 176, 174, 177, 418, + 419, 313, 420, 423, 424, 425, 426, 427, 428, 429, + 430, 884, 134, 137, 138, 139, 140, 141, 142, 143, + 144, 147, 173, 175, 178, 195, 198, 199, 201, 202, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, + 233, 234, 251, 252, 253, 320, 321, 322, 468, 180, + 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, + 191, 192, 193, 149, 194, 150, 165, 166, 167, 196, + 168, 151, 152, 153, 169, 154, 197, 135, 170, 155, + 171, 172, 156, 532, 200, 436, 732, 279, 469, 853, + 545, 5, 200, 524, 851, 470, 667, 708, 665, 261, + 462, 441, 441, 441, 245, 441, 666, 789, 462, 768, + 702, 569, 433, 434, 798, 793, 457, 454, 441, 433, + 572, 490, 492, 518, 522, 786, 527, 528, 800, 535, + 785, 537, 544, 796, 546, 543, 766, 766, 766, 766, + 483, 504, 760, 767, 1065, 1065, 697, 685, 827, 314, + 831, 510, 447, 467, 479, 775, 523, 458, 745, 480, + 312, 1065, 729, 441, 441, 805, 772, 765, 455, 476, + 441, 441, 688, 441, 376, 682, 823, 868, 442, 463, + 1049, 701, 966, 486, 488, 538, 8, 1057, 466, 421, + 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, + 421, 421, 421, 422, 422, 422, 422, 422, 422, 422, + 422, 422, 422, 422, 422, 422, 422, 298, 301, 448, + 471, 472, 474, 229, 296, 230, 231, 970, 505, 669, + 485, 485, 995, 995, 995, 995, 995, 995, 995, 995, + 995, 995, 995, 995, 460, 931, 674, 808, 724, 719, + 720, 733, 675, 721, 672, 722, 723, 819, 812, 673, + 689, 727, 764, 310, 541, 326, 506, 330, 317, 317, + 266, 267, 283, 464, 269, 325, 284, 328, 491, 693, + 971, 803, 803, 1054, 1038, 285, 280, 281, 497, 1064, + 1064, 686, 277, 307, 556, 512, 368, 967, 972, 1026, + 828, 962, 698, 482, 832, 777, 1064, 384, 870, 0, + 693, 974, 693, 0, 813, 813, 813, 813, 974, 813, + 1067, 813, 861, 0, 1035, 813, 0, 0, 0, 0, + 0, 1035, 0, 0, 0, 974, 974, 974, 974, 1046, + 1046, 974, 974, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 740, 0, 0, 741, 1032, 684, 684, 0, + 0, 0, 694, 694, 694, 696, 0, 683, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 830, 0, + 0, 830, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1039, 1040 + ); + + protected $gotoCheck = array( + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 59, 52, 8, 10, 75, 7, 7, + 7, 105, 52, 7, 7, 92, 14, 12, 12, 127, + 80, 8, 8, 8, 127, 8, 13, 12, 80, 12, + 32, 12, 70, 12, 12, 12, 8, 35, 8, 70, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 5, 70, 70, 70, 70, + 42, 42, 70, 70, 139, 139, 11, 11, 11, 61, + 11, 64, 61, 2, 2, 11, 64, 61, 11, 11, + 64, 139, 51, 8, 8, 11, 36, 11, 8, 8, + 8, 8, 11, 8, 61, 11, 89, 11, 8, 129, + 135, 11, 11, 63, 63, 63, 61, 137, 8, 128, + 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, + 128, 128, 128, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 45, 45, 45, + 45, 45, 45, 68, 48, 68, 68, 87, 50, 10, + 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, + 81, 81, 81, 81, 49, 111, 10, 83, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 85, 86, 10, + 26, 10, 71, 71, 71, 52, 52, 52, 52, 52, + 52, 52, 52, 52, 52, 52, 52, 52, 52, 22, + 87, 80, 80, 80, 132, 16, 75, 75, 20, 138, + 138, 24, 9, 15, 77, 19, 66, 120, 87, 87, + 91, 117, 28, 67, 94, 74, 138, 115, 108, -1, + 22, 59, 22, -1, 59, 59, 59, 59, 59, 59, + 138, 59, 105, -1, 92, 59, -1, -1, -1, -1, + -1, 92, -1, -1, -1, 59, 59, 59, 59, 92, + 92, 59, 59, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 59, -1, -1, 59, 92, 22, 22, -1, + -1, -1, 22, 22, 22, 22, -1, 22, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 92, -1, + -1, 92, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 92, 92 + ); + + protected $gotoBase = array( + 0, 0, -366, 0, 0, 155, 0, 115, -139, 48, + -18, -175, 126, 134, 124, 38, 61, 0, 0, -8, + 47, 0, 55, 0, 34, 0, 18, 0, -29, -20, + 0, 0, 133, 0, 0, -401, 180, 0, 0, 0, + 0, 0, 140, 0, 0, 212, 0, 0, 222, 56, + 43, 178, 81, 0, 0, 0, 0, 0, 0, 109, + 0, -167, 0, -23, -198, 0, -33, -35, -315, 0, + -90, 35, 0, 0, -34, -257, 0, 13, 0, 0, + 97, 46, 0, 37, 0, 45, 42, -38, 0, 185, + 0, 41, 122, 0, -28, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 111, 0, 0, -47, 0, + 0, 36, 0, 0, 0, -44, 0, -13, 0, 0, + -7, 0, 0, 0, 0, 0, 0, -126, 5, 186, + 19, 0, 66, 0, 0, 169, 0, 193, 75, -70, + 0, 0 + ); + + protected $gotoDefault = array( + -32768, 389, 577, 2, 578, 649, 657, 513, 409, 437, + 726, 873, 770, 709, 710, 302, 340, 294, 300, 498, + 487, 380, 695, 352, 687, 377, 690, 351, 699, 133, + 514, 386, 703, 1, 705, 443, 736, 291, 713, 292, + 517, 715, 450, 717, 718, 297, 303, 304, 877, 459, + 484, 728, 203, 452, 730, 290, 731, 739, 331, 295, + 363, 520, 494, 475, 509, 410, 365, 481, 228, 461, + 981, 762, 372, 360, 776, 278, 784, 561, 792, 795, + 411, 412, 370, 807, 371, 817, 811, 989, 364, 822, + 353, 829, 1021, 355, 833, 836, 341, 500, 329, 840, + 841, 4, 845, 533, 534, 860, 241, 382, 869, 350, + 883, 344, 950, 952, 445, 379, 963, 359, 521, 387, + 968, 1025, 348, 413, 366, 268, 282, 244, 414, 431, + 249, 415, 367, 1028, 318, 1050, 432, 1058, 1066, 275, + 315, 478 + ); + + protected $ruleToNonTerminal = array( + 0, 1, 3, 3, 2, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, + 7, 7, 8, 8, 9, 10, 10, 11, 11, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 16, 16, 17, 17, 17, 17, 19, 21, 21, 15, + 23, 23, 20, 25, 25, 22, 22, 24, 24, 26, + 26, 18, 27, 27, 28, 30, 31, 31, 32, 33, + 33, 35, 34, 34, 34, 34, 36, 36, 36, 36, + 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, + 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, + 12, 12, 55, 55, 58, 58, 57, 56, 56, 49, + 60, 60, 61, 61, 62, 62, 13, 14, 14, 14, + 65, 65, 65, 66, 66, 69, 69, 67, 67, 71, + 72, 72, 43, 43, 51, 51, 54, 54, 54, 53, + 73, 73, 74, 44, 44, 44, 44, 75, 75, 76, + 76, 77, 77, 41, 41, 37, 37, 78, 39, 39, + 79, 38, 38, 40, 40, 50, 50, 50, 50, 63, + 63, 82, 82, 83, 83, 85, 85, 86, 86, 86, + 84, 84, 64, 64, 87, 87, 88, 88, 89, 89, + 89, 46, 90, 90, 91, 47, 93, 93, 94, 94, + 68, 68, 95, 95, 95, 95, 100, 100, 101, 101, + 102, 102, 102, 102, 102, 103, 104, 104, 99, 99, + 96, 96, 98, 98, 106, 106, 105, 105, 105, 105, + 105, 105, 97, 107, 107, 108, 108, 48, 109, 109, + 42, 42, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 116, 110, 110, 115, 115, + 118, 119, 119, 120, 121, 121, 121, 70, 70, 59, + 59, 59, 111, 111, 111, 123, 123, 112, 112, 114, + 114, 114, 117, 117, 128, 128, 128, 81, 130, 130, + 130, 113, 113, 113, 113, 113, 113, 113, 113, 113, + 113, 113, 113, 113, 113, 113, 113, 45, 45, 126, + 126, 126, 122, 122, 122, 131, 131, 131, 131, 131, + 131, 52, 52, 52, 92, 92, 92, 92, 133, 125, + 125, 125, 125, 125, 125, 124, 124, 124, 132, 132, + 132, 132, 80, 134, 134, 135, 135, 135, 135, 135, + 129, 136, 136, 137, 137, 137, 137, 137, 127, 127, + 127, 127, 139, 140, 138, 138, 138, 138, 138, 138, + 138, 141, 141, 141, 141 + ); + + protected $ruleToLength = array( + 1, 1, 2, 0, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 3, 1, 1, 1, 0, 1, 1, + 1, 1, 1, 3, 5, 4, 3, 4, 2, 3, + 1, 1, 7, 8, 6, 7, 2, 3, 1, 2, + 3, 1, 2, 3, 1, 1, 3, 1, 2, 1, + 2, 2, 3, 1, 3, 2, 3, 1, 3, 2, + 0, 1, 1, 1, 1, 1, 3, 7, 10, 5, + 7, 9, 5, 3, 3, 3, 3, 3, 3, 1, + 2, 5, 7, 9, 5, 6, 3, 3, 2, 1, + 1, 1, 0, 2, 1, 3, 8, 0, 4, 2, + 1, 3, 0, 1, 0, 1, 10, 7, 6, 5, + 1, 2, 2, 0, 2, 0, 2, 0, 2, 2, + 1, 3, 1, 4, 1, 4, 1, 1, 4, 2, + 1, 3, 3, 3, 4, 4, 5, 0, 2, 4, + 3, 1, 1, 1, 4, 0, 2, 5, 0, 2, + 6, 0, 2, 0, 3, 1, 2, 1, 1, 2, + 0, 1, 3, 4, 6, 1, 2, 1, 1, 1, + 0, 1, 0, 2, 2, 4, 1, 3, 1, 2, + 2, 2, 3, 1, 1, 2, 3, 1, 1, 3, + 2, 0, 3, 4, 9, 3, 1, 3, 0, 2, + 4, 5, 4, 4, 4, 3, 1, 1, 1, 3, + 1, 1, 0, 1, 1, 2, 1, 1, 1, 1, + 1, 1, 2, 1, 3, 1, 3, 2, 3, 1, + 0, 1, 1, 3, 3, 3, 4, 1, 2, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 2, 2, 2, 2, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 2, 2, 2, 2, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 5, 4, 3, + 4, 4, 2, 2, 4, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 3, 2, 1, + 2, 4, 2, 10, 11, 7, 3, 2, 0, 4, + 2, 1, 3, 2, 2, 2, 4, 1, 1, 1, + 2, 3, 1, 1, 1, 1, 1, 0, 3, 0, + 1, 1, 0, 1, 1, 3, 3, 3, 4, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 3, 2, 3, 3, 0, 1, 1, + 3, 1, 1, 3, 1, 1, 4, 4, 4, 1, + 4, 1, 1, 3, 1, 4, 2, 2, 3, 1, + 4, 4, 3, 3, 3, 1, 3, 1, 1, 3, + 1, 1, 4, 3, 1, 1, 1, 3, 3, 0, + 1, 3, 1, 3, 1, 4, 2, 0, 2, 2, + 1, 2, 1, 1, 1, 4, 3, 3, 3, 6, + 3, 1, 1, 2, 1 + ); + + protected function reduceRule0() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule1() { + $this->semValue = $this->handleNamespaces($this->semStack[$this->stackPos-(1-1)]); + } + + protected function reduceRule2() { + if (is_array($this->semStack[$this->stackPos-(2-2)])) { $this->semValue = array_merge($this->semStack[$this->stackPos-(2-1)], $this->semStack[$this->stackPos-(2-2)]); } else { $this->semStack[$this->stackPos-(2-1)][] = $this->semStack[$this->stackPos-(2-2)]; $this->semValue = $this->semStack[$this->stackPos-(2-1)]; }; + } + + protected function reduceRule3() { + $this->semValue = array(); + } + + protected function reduceRule4() { + $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop(['comments' => $startAttributes['comments']]); } else { $nop = null; }; + if ($nop !== null) { $this->semStack[$this->stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule5() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule6() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule7() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule8() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule9() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule10() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule11() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule12() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule13() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule14() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule15() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule16() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule17() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule18() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule19() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule20() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule21() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule22() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule23() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule24() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule25() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule26() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule27() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule28() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule29() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule30() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule31() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule32() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule33() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule34() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule35() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule36() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule37() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule38() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule39() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule40() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule41() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule42() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule43() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule44() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule45() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule46() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule47() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule48() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule49() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule50() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule51() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule52() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule53() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule54() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule55() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule56() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule57() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule58() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule59() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule60() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule61() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule62() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule63() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule64() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule65() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule66() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule67() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule68() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule69() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule70() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule71() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule72() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule73() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule74() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule75() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule76() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule77() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule78() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule79() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule80() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule81() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule82() { + $this->semValue = array($this->semStack[$this->stackPos-(1-1)]); + } + + protected function reduceRule83() { + $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)]; + } + + protected function reduceRule84() { + $this->semValue = new Name($this->semStack[$this->stackPos-(1-1)], $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); + } + + protected function reduceRule85() { + /* nothing */ + } + + protected function reduceRule86() { + /* nothing */ + } + + protected function reduceRule87() { + /* nothing */ + } + + protected function reduceRule88() { + $this->emitError(new Error('A trailing comma is not allowed here', $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes)); + } + + protected function reduceRule89() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule90() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule91() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule92() { + $this->semValue = new Stmt\HaltCompiler($this->lexer->handleHaltCompiler(), $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); + } + + protected function reduceRule93() { + $this->semValue = new Stmt\Namespace_($this->semStack[$this->stackPos-(3-2)], null, $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); $this->checkNamespace($this->semValue); + } + + protected function reduceRule94() { + $this->semValue = new Stmt\Namespace_($this->semStack[$this->stackPos-(5-2)], $this->semStack[$this->stackPos-(5-4)], $this->startAttributeStack[$this->stackPos-(5-1)] + $this->endAttributes); $this->checkNamespace($this->semValue); + } + + protected function reduceRule95() { + $this->semValue = new Stmt\Namespace_(null, $this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); $this->checkNamespace($this->semValue); + } + + protected function reduceRule96() { + $this->semValue = new Stmt\Use_($this->semStack[$this->stackPos-(3-2)], Stmt\Use_::TYPE_NORMAL, $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule97() { + $this->semValue = new Stmt\Use_($this->semStack[$this->stackPos-(4-3)], $this->semStack[$this->stackPos-(4-2)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); + } + + protected function reduceRule98() { + $this->semValue = $this->semStack[$this->stackPos-(2-1)]; + } + + protected function reduceRule99() { + $this->semValue = new Stmt\Const_($this->semStack[$this->stackPos-(3-2)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule100() { + $this->semValue = Stmt\Use_::TYPE_FUNCTION; + } + + protected function reduceRule101() { + $this->semValue = Stmt\Use_::TYPE_CONSTANT; + } + + protected function reduceRule102() { + $this->semValue = new Stmt\GroupUse(new Name($this->semStack[$this->stackPos-(7-3)], $this->startAttributeStack[$this->stackPos-(7-3)] + $this->endAttributeStack[$this->stackPos-(7-3)]), $this->semStack[$this->stackPos-(7-6)], $this->semStack[$this->stackPos-(7-2)], $this->startAttributeStack[$this->stackPos-(7-1)] + $this->endAttributes); + } + + protected function reduceRule103() { + $this->semValue = new Stmt\GroupUse(new Name($this->semStack[$this->stackPos-(8-4)], $this->startAttributeStack[$this->stackPos-(8-4)] + $this->endAttributeStack[$this->stackPos-(8-4)]), $this->semStack[$this->stackPos-(8-7)], $this->semStack[$this->stackPos-(8-2)], $this->startAttributeStack[$this->stackPos-(8-1)] + $this->endAttributes); + } + + protected function reduceRule104() { + $this->semValue = new Stmt\GroupUse(new Name($this->semStack[$this->stackPos-(6-2)], $this->startAttributeStack[$this->stackPos-(6-2)] + $this->endAttributeStack[$this->stackPos-(6-2)]), $this->semStack[$this->stackPos-(6-5)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$this->stackPos-(6-1)] + $this->endAttributes); + } + + protected function reduceRule105() { + $this->semValue = new Stmt\GroupUse(new Name($this->semStack[$this->stackPos-(7-3)], $this->startAttributeStack[$this->stackPos-(7-3)] + $this->endAttributeStack[$this->stackPos-(7-3)]), $this->semStack[$this->stackPos-(7-6)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$this->stackPos-(7-1)] + $this->endAttributes); + } + + protected function reduceRule106() { + $this->semValue = $this->semStack[$this->stackPos-(2-1)]; + } + + protected function reduceRule107() { + $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)]; + } + + protected function reduceRule108() { + $this->semValue = array($this->semStack[$this->stackPos-(1-1)]); + } + + protected function reduceRule109() { + $this->semValue = $this->semStack[$this->stackPos-(2-1)]; + } + + protected function reduceRule110() { + $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)]; + } + + protected function reduceRule111() { + $this->semValue = array($this->semStack[$this->stackPos-(1-1)]); + } + + protected function reduceRule112() { + $this->semValue = $this->semStack[$this->stackPos-(2-1)]; + } + + protected function reduceRule113() { + $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)]; + } + + protected function reduceRule114() { + $this->semValue = array($this->semStack[$this->stackPos-(1-1)]); + } + + protected function reduceRule115() { + $this->semValue = new Stmt\UseUse($this->semStack[$this->stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $this->stackPos-(1-1)); + } + + protected function reduceRule116() { + $this->semValue = new Stmt\UseUse($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $this->stackPos-(3-3)); + } + + protected function reduceRule117() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule118() { + $this->semValue = $this->semStack[$this->stackPos-(2-2)]; + } + + protected function reduceRule119() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; $this->semValue->type = Stmt\Use_::TYPE_NORMAL; + } + + protected function reduceRule120() { + $this->semValue = $this->semStack[$this->stackPos-(2-2)]; $this->semValue->type = $this->semStack[$this->stackPos-(2-1)]; + } + + protected function reduceRule121() { + $this->semValue = $this->semStack[$this->stackPos-(2-1)]; + } + + protected function reduceRule122() { + $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)]; + } + + protected function reduceRule123() { + $this->semValue = array($this->semStack[$this->stackPos-(1-1)]); + } + + protected function reduceRule124() { + $this->semValue = new Node\Const_($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule125() { + $this->semValue = $this->semStack[$this->stackPos-(2-1)]; + } + + protected function reduceRule126() { + $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)]; + } + + protected function reduceRule127() { + $this->semValue = array($this->semStack[$this->stackPos-(1-1)]); + } + + protected function reduceRule128() { + $this->semValue = new Node\Const_($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule129() { + if (is_array($this->semStack[$this->stackPos-(2-2)])) { $this->semValue = array_merge($this->semStack[$this->stackPos-(2-1)], $this->semStack[$this->stackPos-(2-2)]); } else { $this->semStack[$this->stackPos-(2-1)][] = $this->semStack[$this->stackPos-(2-2)]; $this->semValue = $this->semStack[$this->stackPos-(2-1)]; }; + } + + protected function reduceRule130() { + $this->semValue = array(); + } + + protected function reduceRule131() { + $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop(['comments' => $startAttributes['comments']]); } else { $nop = null; }; + if ($nop !== null) { $this->semStack[$this->stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule132() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule133() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule134() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule135() { + throw new Error('__HALT_COMPILER() can only be used from the outermost scope', $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); + } + + protected function reduceRule136() { + $this->semValue = $this->semStack[$this->stackPos-(3-2)]; $attrs = $this->startAttributeStack[$this->stackPos-(3-1)]; $stmts = $this->semValue; if (!empty($attrs['comments']) && isset($stmts[0])) {$stmts[0]->setAttribute('comments', array_merge($attrs['comments'], $stmts[0]->getAttribute('comments', []))); }; + } + + protected function reduceRule137() { + $this->semValue = new Stmt\If_($this->semStack[$this->stackPos-(7-3)], ['stmts' => is_array($this->semStack[$this->stackPos-(7-5)]) ? $this->semStack[$this->stackPos-(7-5)] : array($this->semStack[$this->stackPos-(7-5)]), 'elseifs' => $this->semStack[$this->stackPos-(7-6)], 'else' => $this->semStack[$this->stackPos-(7-7)]], $this->startAttributeStack[$this->stackPos-(7-1)] + $this->endAttributes); + } + + protected function reduceRule138() { + $this->semValue = new Stmt\If_($this->semStack[$this->stackPos-(10-3)], ['stmts' => $this->semStack[$this->stackPos-(10-6)], 'elseifs' => $this->semStack[$this->stackPos-(10-7)], 'else' => $this->semStack[$this->stackPos-(10-8)]], $this->startAttributeStack[$this->stackPos-(10-1)] + $this->endAttributes); + } + + protected function reduceRule139() { + $this->semValue = new Stmt\While_($this->semStack[$this->stackPos-(5-3)], $this->semStack[$this->stackPos-(5-5)], $this->startAttributeStack[$this->stackPos-(5-1)] + $this->endAttributes); + } + + protected function reduceRule140() { + $this->semValue = new Stmt\Do_($this->semStack[$this->stackPos-(7-5)], is_array($this->semStack[$this->stackPos-(7-2)]) ? $this->semStack[$this->stackPos-(7-2)] : array($this->semStack[$this->stackPos-(7-2)]), $this->startAttributeStack[$this->stackPos-(7-1)] + $this->endAttributes); + } + + protected function reduceRule141() { + $this->semValue = new Stmt\For_(['init' => $this->semStack[$this->stackPos-(9-3)], 'cond' => $this->semStack[$this->stackPos-(9-5)], 'loop' => $this->semStack[$this->stackPos-(9-7)], 'stmts' => $this->semStack[$this->stackPos-(9-9)]], $this->startAttributeStack[$this->stackPos-(9-1)] + $this->endAttributes); + } + + protected function reduceRule142() { + $this->semValue = new Stmt\Switch_($this->semStack[$this->stackPos-(5-3)], $this->semStack[$this->stackPos-(5-5)], $this->startAttributeStack[$this->stackPos-(5-1)] + $this->endAttributes); + } + + protected function reduceRule143() { + $this->semValue = new Stmt\Break_($this->semStack[$this->stackPos-(3-2)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule144() { + $this->semValue = new Stmt\Continue_($this->semStack[$this->stackPos-(3-2)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule145() { + $this->semValue = new Stmt\Return_($this->semStack[$this->stackPos-(3-2)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule146() { + $this->semValue = new Stmt\Global_($this->semStack[$this->stackPos-(3-2)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule147() { + $this->semValue = new Stmt\Static_($this->semStack[$this->stackPos-(3-2)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule148() { + $this->semValue = new Stmt\Echo_($this->semStack[$this->stackPos-(3-2)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule149() { + $this->semValue = new Stmt\InlineHTML($this->semStack[$this->stackPos-(1-1)], $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); + } + + protected function reduceRule150() { + $this->semValue = $this->semStack[$this->stackPos-(2-1)]; + } + + protected function reduceRule151() { + $this->semValue = new Stmt\Unset_($this->semStack[$this->stackPos-(5-3)], $this->startAttributeStack[$this->stackPos-(5-1)] + $this->endAttributes); + } + + protected function reduceRule152() { + $this->semValue = new Stmt\Foreach_($this->semStack[$this->stackPos-(7-3)], $this->semStack[$this->stackPos-(7-5)][0], ['keyVar' => null, 'byRef' => $this->semStack[$this->stackPos-(7-5)][1], 'stmts' => $this->semStack[$this->stackPos-(7-7)]], $this->startAttributeStack[$this->stackPos-(7-1)] + $this->endAttributes); + } + + protected function reduceRule153() { + $this->semValue = new Stmt\Foreach_($this->semStack[$this->stackPos-(9-3)], $this->semStack[$this->stackPos-(9-7)][0], ['keyVar' => $this->semStack[$this->stackPos-(9-5)], 'byRef' => $this->semStack[$this->stackPos-(9-7)][1], 'stmts' => $this->semStack[$this->stackPos-(9-9)]], $this->startAttributeStack[$this->stackPos-(9-1)] + $this->endAttributes); + } + + protected function reduceRule154() { + $this->semValue = new Stmt\Declare_($this->semStack[$this->stackPos-(5-3)], $this->semStack[$this->stackPos-(5-5)], $this->startAttributeStack[$this->stackPos-(5-1)] + $this->endAttributes); + } + + protected function reduceRule155() { + $this->semValue = new Stmt\TryCatch($this->semStack[$this->stackPos-(6-3)], $this->semStack[$this->stackPos-(6-5)], $this->semStack[$this->stackPos-(6-6)], $this->startAttributeStack[$this->stackPos-(6-1)] + $this->endAttributes); $this->checkTryCatch($this->semValue); + } + + protected function reduceRule156() { + $this->semValue = new Stmt\Throw_($this->semStack[$this->stackPos-(3-2)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule157() { + $this->semValue = new Stmt\Goto_($this->semStack[$this->stackPos-(3-2)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule158() { + $this->semValue = new Stmt\Label($this->semStack[$this->stackPos-(2-1)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule159() { + $this->semValue = array(); /* means: no statement */ + } + + protected function reduceRule160() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule161() { + $startAttributes = $this->startAttributeStack[$this->stackPos-(1-1)]; if (isset($startAttributes['comments'])) { $this->semValue = new Stmt\Nop(['comments' => $startAttributes['comments']]); } else { $this->semValue = null; }; + if ($this->semValue === null) $this->semValue = array(); /* means: no statement */ + } + + protected function reduceRule162() { + $this->semValue = array(); + } + + protected function reduceRule163() { + $this->semStack[$this->stackPos-(2-1)][] = $this->semStack[$this->stackPos-(2-2)]; $this->semValue = $this->semStack[$this->stackPos-(2-1)]; + } + + protected function reduceRule164() { + $this->semValue = array($this->semStack[$this->stackPos-(1-1)]); + } + + protected function reduceRule165() { + $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)]; + } + + protected function reduceRule166() { + $this->semValue = new Stmt\Catch_($this->semStack[$this->stackPos-(8-3)], substr($this->semStack[$this->stackPos-(8-4)], 1), $this->semStack[$this->stackPos-(8-7)], $this->startAttributeStack[$this->stackPos-(8-1)] + $this->endAttributes); + } + + protected function reduceRule167() { + $this->semValue = null; + } + + protected function reduceRule168() { + $this->semValue = new Stmt\Finally_($this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); + } + + protected function reduceRule169() { + $this->semValue = $this->semStack[$this->stackPos-(2-1)]; + } + + protected function reduceRule170() { + $this->semValue = array($this->semStack[$this->stackPos-(1-1)]); + } + + protected function reduceRule171() { + $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)]; + } + + protected function reduceRule172() { + $this->semValue = false; + } + + protected function reduceRule173() { + $this->semValue = true; + } + + protected function reduceRule174() { + $this->semValue = false; + } + + protected function reduceRule175() { + $this->semValue = true; + } + + protected function reduceRule176() { + $this->semValue = new Stmt\Function_($this->semStack[$this->stackPos-(10-3)], ['byRef' => $this->semStack[$this->stackPos-(10-2)], 'params' => $this->semStack[$this->stackPos-(10-5)], 'returnType' => $this->semStack[$this->stackPos-(10-7)], 'stmts' => $this->semStack[$this->stackPos-(10-9)]], $this->startAttributeStack[$this->stackPos-(10-1)] + $this->endAttributes); + } + + protected function reduceRule177() { + $this->semValue = new Stmt\Class_($this->semStack[$this->stackPos-(7-2)], ['type' => $this->semStack[$this->stackPos-(7-1)], 'extends' => $this->semStack[$this->stackPos-(7-3)], 'implements' => $this->semStack[$this->stackPos-(7-4)], 'stmts' => $this->semStack[$this->stackPos-(7-6)]], $this->startAttributeStack[$this->stackPos-(7-1)] + $this->endAttributes); + $this->checkClass($this->semValue, $this->stackPos-(7-2)); + } + + protected function reduceRule178() { + $this->semValue = new Stmt\Interface_($this->semStack[$this->stackPos-(6-2)], ['extends' => $this->semStack[$this->stackPos-(6-3)], 'stmts' => $this->semStack[$this->stackPos-(6-5)]], $this->startAttributeStack[$this->stackPos-(6-1)] + $this->endAttributes); + $this->checkInterface($this->semValue, $this->stackPos-(6-2)); + } + + protected function reduceRule179() { + $this->semValue = new Stmt\Trait_($this->semStack[$this->stackPos-(5-2)], ['stmts' => $this->semStack[$this->stackPos-(5-4)]], $this->startAttributeStack[$this->stackPos-(5-1)] + $this->endAttributes); + } + + protected function reduceRule180() { + $this->semValue = 0; + } + + protected function reduceRule181() { + $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT; + } + + protected function reduceRule182() { + $this->semValue = Stmt\Class_::MODIFIER_FINAL; + } + + protected function reduceRule183() { + $this->semValue = null; + } + + protected function reduceRule184() { + $this->semValue = $this->semStack[$this->stackPos-(2-2)]; + } + + protected function reduceRule185() { + $this->semValue = array(); + } + + protected function reduceRule186() { + $this->semValue = $this->semStack[$this->stackPos-(2-2)]; + } + + protected function reduceRule187() { + $this->semValue = array(); + } + + protected function reduceRule188() { + $this->semValue = $this->semStack[$this->stackPos-(2-2)]; + } + + protected function reduceRule189() { + $this->semValue = $this->semStack[$this->stackPos-(2-1)]; + } + + protected function reduceRule190() { + $this->semValue = array($this->semStack[$this->stackPos-(1-1)]); + } + + protected function reduceRule191() { + $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)]; + } + + protected function reduceRule192() { + $this->semValue = is_array($this->semStack[$this->stackPos-(1-1)]) ? $this->semStack[$this->stackPos-(1-1)] : array($this->semStack[$this->stackPos-(1-1)]); + } + + protected function reduceRule193() { + $this->semValue = $this->semStack[$this->stackPos-(4-2)]; + } + + protected function reduceRule194() { + $this->semValue = is_array($this->semStack[$this->stackPos-(1-1)]) ? $this->semStack[$this->stackPos-(1-1)] : array($this->semStack[$this->stackPos-(1-1)]); + } + + protected function reduceRule195() { + $this->semValue = $this->semStack[$this->stackPos-(4-2)]; + } + + protected function reduceRule196() { + $this->semValue = is_array($this->semStack[$this->stackPos-(1-1)]) ? $this->semStack[$this->stackPos-(1-1)] : array($this->semStack[$this->stackPos-(1-1)]); + } + + protected function reduceRule197() { + $this->semValue = null; + } + + protected function reduceRule198() { + $this->semValue = $this->semStack[$this->stackPos-(4-2)]; + } + + protected function reduceRule199() { + $this->semValue = $this->semStack[$this->stackPos-(2-1)]; + } + + protected function reduceRule200() { + $this->semValue = array($this->semStack[$this->stackPos-(1-1)]); + } + + protected function reduceRule201() { + $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)]; + } + + protected function reduceRule202() { + $this->semValue = new Stmt\DeclareDeclare($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule203() { + $this->semValue = $this->semStack[$this->stackPos-(3-2)]; + } + + protected function reduceRule204() { + $this->semValue = $this->semStack[$this->stackPos-(4-3)]; + } + + protected function reduceRule205() { + $this->semValue = $this->semStack[$this->stackPos-(4-2)]; + } + + protected function reduceRule206() { + $this->semValue = $this->semStack[$this->stackPos-(5-3)]; + } + + protected function reduceRule207() { + $this->semValue = array(); + } + + protected function reduceRule208() { + $this->semStack[$this->stackPos-(2-1)][] = $this->semStack[$this->stackPos-(2-2)]; $this->semValue = $this->semStack[$this->stackPos-(2-1)]; + } + + protected function reduceRule209() { + $this->semValue = new Stmt\Case_($this->semStack[$this->stackPos-(4-2)], $this->semStack[$this->stackPos-(4-4)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); + } + + protected function reduceRule210() { + $this->semValue = new Stmt\Case_(null, $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule211() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule212() { + $this->semValue = $this->semStack[$this->stackPos]; + } + + protected function reduceRule213() { + $this->semValue = is_array($this->semStack[$this->stackPos-(1-1)]) ? $this->semStack[$this->stackPos-(1-1)] : array($this->semStack[$this->stackPos-(1-1)]); + } + + protected function reduceRule214() { + $this->semValue = $this->semStack[$this->stackPos-(4-2)]; + } + + protected function reduceRule215() { + $this->semValue = array(); + } + + protected function reduceRule216() { + $this->semStack[$this->stackPos-(2-1)][] = $this->semStack[$this->stackPos-(2-2)]; $this->semValue = $this->semStack[$this->stackPos-(2-1)]; + } + + protected function reduceRule217() { + $this->semValue = new Stmt\ElseIf_($this->semStack[$this->stackPos-(5-3)], is_array($this->semStack[$this->stackPos-(5-5)]) ? $this->semStack[$this->stackPos-(5-5)] : array($this->semStack[$this->stackPos-(5-5)]), $this->startAttributeStack[$this->stackPos-(5-1)] + $this->endAttributes); + } + + protected function reduceRule218() { + $this->semValue = array(); + } + + protected function reduceRule219() { + $this->semStack[$this->stackPos-(2-1)][] = $this->semStack[$this->stackPos-(2-2)]; $this->semValue = $this->semStack[$this->stackPos-(2-1)]; + } + + protected function reduceRule220() { + $this->semValue = new Stmt\ElseIf_($this->semStack[$this->stackPos-(6-3)], $this->semStack[$this->stackPos-(6-6)], $this->startAttributeStack[$this->stackPos-(6-1)] + $this->endAttributes); + } + + protected function reduceRule221() { + $this->semValue = null; + } + + protected function reduceRule222() { + $this->semValue = new Stmt\Else_(is_array($this->semStack[$this->stackPos-(2-2)]) ? $this->semStack[$this->stackPos-(2-2)] : array($this->semStack[$this->stackPos-(2-2)]), $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule223() { + $this->semValue = null; + } + + protected function reduceRule224() { + $this->semValue = new Stmt\Else_($this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule225() { + $this->semValue = array($this->semStack[$this->stackPos-(1-1)], false); + } + + protected function reduceRule226() { + $this->semValue = array($this->semStack[$this->stackPos-(2-2)], true); + } + + protected function reduceRule227() { + $this->semValue = array($this->semStack[$this->stackPos-(1-1)], false); + } + + protected function reduceRule228() { + $this->semValue = array($this->semStack[$this->stackPos-(1-1)], false); + } + + protected function reduceRule229() { + $this->semValue = $this->semStack[$this->stackPos-(2-1)]; + } + + protected function reduceRule230() { + $this->semValue = array(); + } + + protected function reduceRule231() { + $this->semValue = array($this->semStack[$this->stackPos-(1-1)]); + } + + protected function reduceRule232() { + $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)]; + } + + protected function reduceRule233() { + $this->semValue = new Node\Param(substr($this->semStack[$this->stackPos-(4-4)], 1), null, $this->semStack[$this->stackPos-(4-1)], $this->semStack[$this->stackPos-(4-2)], $this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); $this->checkParam($this->semValue); + } + + protected function reduceRule234() { + $this->semValue = new Node\Param(substr($this->semStack[$this->stackPos-(6-4)], 1), $this->semStack[$this->stackPos-(6-6)], $this->semStack[$this->stackPos-(6-1)], $this->semStack[$this->stackPos-(6-2)], $this->semStack[$this->stackPos-(6-3)], $this->startAttributeStack[$this->stackPos-(6-1)] + $this->endAttributes); $this->checkParam($this->semValue); + } + + protected function reduceRule235() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule236() { + $this->semValue = new Node\NullableType($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule237() { + $this->semValue = $this->handleBuiltinTypes($this->semStack[$this->stackPos-(1-1)]); + } + + protected function reduceRule238() { + $this->semValue = 'array'; + } + + protected function reduceRule239() { + $this->semValue = 'callable'; + } + + protected function reduceRule240() { + $this->semValue = null; + } + + protected function reduceRule241() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule242() { + $this->semValue = null; + } + + protected function reduceRule243() { + $this->semValue = $this->semStack[$this->stackPos-(2-2)]; + } + + protected function reduceRule244() { + $this->semValue = array(); + } + + protected function reduceRule245() { + $this->semValue = $this->semStack[$this->stackPos-(4-2)]; + } + + protected function reduceRule246() { + $this->semValue = array($this->semStack[$this->stackPos-(1-1)]); + } + + protected function reduceRule247() { + $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)]; + } + + protected function reduceRule248() { + $this->semValue = new Node\Arg($this->semStack[$this->stackPos-(1-1)], false, false, $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); + } + + protected function reduceRule249() { + $this->semValue = new Node\Arg($this->semStack[$this->stackPos-(2-2)], true, false, $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule250() { + $this->semValue = new Node\Arg($this->semStack[$this->stackPos-(2-2)], false, true, $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule251() { + $this->semValue = $this->semStack[$this->stackPos-(2-1)]; + } + + protected function reduceRule252() { + $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)]; + } + + protected function reduceRule253() { + $this->semValue = array($this->semStack[$this->stackPos-(1-1)]); + } + + protected function reduceRule254() { + $this->semValue = new Expr\Variable($this->semStack[$this->stackPos-(1-1)], $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); + } + + protected function reduceRule255() { + $this->semValue = $this->semStack[$this->stackPos-(2-1)]; + } + + protected function reduceRule256() { + $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)]; + } + + protected function reduceRule257() { + $this->semValue = array($this->semStack[$this->stackPos-(1-1)]); + } + + protected function reduceRule258() { + $this->semValue = new Stmt\StaticVar(substr($this->semStack[$this->stackPos-(1-1)], 1), null, $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); + } + + protected function reduceRule259() { + $this->semValue = new Stmt\StaticVar(substr($this->semStack[$this->stackPos-(3-1)], 1), $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule260() { + $this->semStack[$this->stackPos-(2-1)][] = $this->semStack[$this->stackPos-(2-2)]; $this->semValue = $this->semStack[$this->stackPos-(2-1)]; + } + + protected function reduceRule261() { + $this->semValue = array(); + } + + protected function reduceRule262() { + $this->semValue = new Stmt\Property($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-2)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); $this->checkProperty($this->semValue, $this->stackPos-(3-1)); + } + + protected function reduceRule263() { + $this->semValue = new Stmt\ClassConst($this->semStack[$this->stackPos-(4-3)], $this->semStack[$this->stackPos-(4-1)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); $this->checkClassConst($this->semValue, $this->stackPos-(4-1)); + } + + protected function reduceRule264() { + $this->semValue = new Stmt\ClassMethod($this->semStack[$this->stackPos-(9-4)], ['type' => $this->semStack[$this->stackPos-(9-1)], 'byRef' => $this->semStack[$this->stackPos-(9-3)], 'params' => $this->semStack[$this->stackPos-(9-6)], 'returnType' => $this->semStack[$this->stackPos-(9-8)], 'stmts' => $this->semStack[$this->stackPos-(9-9)]], $this->startAttributeStack[$this->stackPos-(9-1)] + $this->endAttributes); + $this->checkClassMethod($this->semValue, $this->stackPos-(9-1)); + } + + protected function reduceRule265() { + $this->semValue = new Stmt\TraitUse($this->semStack[$this->stackPos-(3-2)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule266() { + $this->semValue = array(); + } + + protected function reduceRule267() { + $this->semValue = $this->semStack[$this->stackPos-(3-2)]; + } + + protected function reduceRule268() { + $this->semValue = array(); + } + + protected function reduceRule269() { + $this->semStack[$this->stackPos-(2-1)][] = $this->semStack[$this->stackPos-(2-2)]; $this->semValue = $this->semStack[$this->stackPos-(2-1)]; + } + + protected function reduceRule270() { + $this->semValue = new Stmt\TraitUseAdaptation\Precedence($this->semStack[$this->stackPos-(4-1)][0], $this->semStack[$this->stackPos-(4-1)][1], $this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); + } + + protected function reduceRule271() { + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$this->stackPos-(5-1)][0], $this->semStack[$this->stackPos-(5-1)][1], $this->semStack[$this->stackPos-(5-3)], $this->semStack[$this->stackPos-(5-4)], $this->startAttributeStack[$this->stackPos-(5-1)] + $this->endAttributes); + } + + protected function reduceRule272() { + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$this->stackPos-(4-1)][0], $this->semStack[$this->stackPos-(4-1)][1], $this->semStack[$this->stackPos-(4-3)], null, $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); + } + + protected function reduceRule273() { + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$this->stackPos-(4-1)][0], $this->semStack[$this->stackPos-(4-1)][1], null, $this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); + } + + protected function reduceRule274() { + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$this->stackPos-(4-1)][0], $this->semStack[$this->stackPos-(4-1)][1], null, $this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); + } + + protected function reduceRule275() { + $this->semValue = array($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)]); + } + + protected function reduceRule276() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule277() { + $this->semValue = array(null, $this->semStack[$this->stackPos-(1-1)]); + } + + protected function reduceRule278() { + $this->semValue = null; + } + + protected function reduceRule279() { + $this->semValue = $this->semStack[$this->stackPos-(3-2)]; + } + + protected function reduceRule280() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule281() { + $this->semValue = 0; + } + + protected function reduceRule282() { + $this->semValue = 0; + } + + protected function reduceRule283() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule284() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule285() { + $this->checkModifier($this->semStack[$this->stackPos-(2-1)], $this->semStack[$this->stackPos-(2-2)], $this->stackPos-(2-2)); $this->semValue = $this->semStack[$this->stackPos-(2-1)] | $this->semStack[$this->stackPos-(2-2)]; + } + + protected function reduceRule286() { + $this->semValue = Stmt\Class_::MODIFIER_PUBLIC; + } + + protected function reduceRule287() { + $this->semValue = Stmt\Class_::MODIFIER_PROTECTED; + } + + protected function reduceRule288() { + $this->semValue = Stmt\Class_::MODIFIER_PRIVATE; + } + + protected function reduceRule289() { + $this->semValue = Stmt\Class_::MODIFIER_STATIC; + } + + protected function reduceRule290() { + $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT; + } + + protected function reduceRule291() { + $this->semValue = Stmt\Class_::MODIFIER_FINAL; + } + + protected function reduceRule292() { + $this->semValue = $this->semStack[$this->stackPos-(2-1)]; + } + + protected function reduceRule293() { + $this->semValue = array($this->semStack[$this->stackPos-(1-1)]); + } + + protected function reduceRule294() { + $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)]; + } + + protected function reduceRule295() { + $this->semValue = new Stmt\PropertyProperty(substr($this->semStack[$this->stackPos-(1-1)], 1), null, $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); + } + + protected function reduceRule296() { + $this->semValue = new Stmt\PropertyProperty(substr($this->semStack[$this->stackPos-(3-1)], 1), $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule297() { + $this->semValue = $this->semStack[$this->stackPos-(2-1)]; + } + + protected function reduceRule298() { + $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)]; + } + + protected function reduceRule299() { + $this->semValue = array($this->semStack[$this->stackPos-(1-1)]); + } + + protected function reduceRule300() { + $this->semValue = array(); + } + + protected function reduceRule301() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule302() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule303() { + $this->semValue = new Expr\Assign($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule304() { + $this->semValue = new Expr\Assign($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule305() { + $this->semValue = new Expr\Assign($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule306() { + $this->semValue = new Expr\AssignRef($this->semStack[$this->stackPos-(4-1)], $this->semStack[$this->stackPos-(4-4)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); + } + + protected function reduceRule307() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule308() { + $this->semValue = new Expr\Clone_($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule309() { + $this->semValue = new Expr\AssignOp\Plus($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule310() { + $this->semValue = new Expr\AssignOp\Minus($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule311() { + $this->semValue = new Expr\AssignOp\Mul($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule312() { + $this->semValue = new Expr\AssignOp\Div($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule313() { + $this->semValue = new Expr\AssignOp\Concat($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule314() { + $this->semValue = new Expr\AssignOp\Mod($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule315() { + $this->semValue = new Expr\AssignOp\BitwiseAnd($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule316() { + $this->semValue = new Expr\AssignOp\BitwiseOr($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule317() { + $this->semValue = new Expr\AssignOp\BitwiseXor($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule318() { + $this->semValue = new Expr\AssignOp\ShiftLeft($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule319() { + $this->semValue = new Expr\AssignOp\ShiftRight($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule320() { + $this->semValue = new Expr\AssignOp\Pow($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule321() { + $this->semValue = new Expr\PostInc($this->semStack[$this->stackPos-(2-1)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule322() { + $this->semValue = new Expr\PreInc($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule323() { + $this->semValue = new Expr\PostDec($this->semStack[$this->stackPos-(2-1)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule324() { + $this->semValue = new Expr\PreDec($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule325() { + $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule326() { + $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule327() { + $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule328() { + $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule329() { + $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule330() { + $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule331() { + $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule332() { + $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule333() { + $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule334() { + $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule335() { + $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule336() { + $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule337() { + $this->semValue = new Expr\BinaryOp\Div($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule338() { + $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule339() { + $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule340() { + $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule341() { + $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule342() { + $this->semValue = new Expr\UnaryPlus($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule343() { + $this->semValue = new Expr\UnaryMinus($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule344() { + $this->semValue = new Expr\BooleanNot($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule345() { + $this->semValue = new Expr\BitwiseNot($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule346() { + $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule347() { + $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule348() { + $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule349() { + $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule350() { + $this->semValue = new Expr\BinaryOp\Spaceship($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule351() { + $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule352() { + $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule353() { + $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule354() { + $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule355() { + $this->semValue = new Expr\Instanceof_($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule356() { + $this->semValue = $this->semStack[$this->stackPos-(3-2)]; + } + + protected function reduceRule357() { + $this->semValue = new Expr\Ternary($this->semStack[$this->stackPos-(5-1)], $this->semStack[$this->stackPos-(5-3)], $this->semStack[$this->stackPos-(5-5)], $this->startAttributeStack[$this->stackPos-(5-1)] + $this->endAttributes); + } + + protected function reduceRule358() { + $this->semValue = new Expr\Ternary($this->semStack[$this->stackPos-(4-1)], null, $this->semStack[$this->stackPos-(4-4)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); + } + + protected function reduceRule359() { + $this->semValue = new Expr\BinaryOp\Coalesce($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule360() { + $this->semValue = new Expr\Isset_($this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); + } + + protected function reduceRule361() { + $this->semValue = new Expr\Empty_($this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); + } + + protected function reduceRule362() { + $this->semValue = new Expr\Include_($this->semStack[$this->stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule363() { + $this->semValue = new Expr\Include_($this->semStack[$this->stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule364() { + $this->semValue = new Expr\Eval_($this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); + } + + protected function reduceRule365() { + $this->semValue = new Expr\Include_($this->semStack[$this->stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule366() { + $this->semValue = new Expr\Include_($this->semStack[$this->stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule367() { + $this->semValue = new Expr\Cast\Int_($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule368() { + $this->semValue = new Expr\Cast\Double($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule369() { + $this->semValue = new Expr\Cast\String_($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule370() { + $this->semValue = new Expr\Cast\Array_($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule371() { + $this->semValue = new Expr\Cast\Object_($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule372() { + $this->semValue = new Expr\Cast\Bool_($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule373() { + $this->semValue = new Expr\Cast\Unset_($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule374() { + $attrs = $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes; + $attrs['kind'] = strtolower($this->semStack[$this->stackPos-(2-1)]) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE; + $this->semValue = new Expr\Exit_($this->semStack[$this->stackPos-(2-2)], $attrs); + } + + protected function reduceRule375() { + $this->semValue = new Expr\ErrorSuppress($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule376() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule377() { + $this->semValue = new Expr\ShellExec($this->semStack[$this->stackPos-(3-2)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule378() { + $this->semValue = new Expr\Print_($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule379() { + $this->semValue = new Expr\Yield_(null, null, $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); + } + + protected function reduceRule380() { + $this->semValue = new Expr\Yield_($this->semStack[$this->stackPos-(2-2)], null, $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule381() { + $this->semValue = new Expr\Yield_($this->semStack[$this->stackPos-(4-4)], $this->semStack[$this->stackPos-(4-2)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); + } + + protected function reduceRule382() { + $this->semValue = new Expr\YieldFrom($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule383() { + $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$this->stackPos-(10-2)], 'params' => $this->semStack[$this->stackPos-(10-4)], 'uses' => $this->semStack[$this->stackPos-(10-6)], 'returnType' => $this->semStack[$this->stackPos-(10-7)], 'stmts' => $this->semStack[$this->stackPos-(10-9)]], $this->startAttributeStack[$this->stackPos-(10-1)] + $this->endAttributes); + } + + protected function reduceRule384() { + $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$this->stackPos-(11-3)], 'params' => $this->semStack[$this->stackPos-(11-5)], 'uses' => $this->semStack[$this->stackPos-(11-7)], 'returnType' => $this->semStack[$this->stackPos-(11-8)], 'stmts' => $this->semStack[$this->stackPos-(11-10)]], $this->startAttributeStack[$this->stackPos-(11-1)] + $this->endAttributes); + } + + protected function reduceRule385() { + $this->semValue = array(new Stmt\Class_(null, ['type' => 0, 'extends' => $this->semStack[$this->stackPos-(7-3)], 'implements' => $this->semStack[$this->stackPos-(7-4)], 'stmts' => $this->semStack[$this->stackPos-(7-6)]], $this->startAttributeStack[$this->stackPos-(7-1)] + $this->endAttributes), $this->semStack[$this->stackPos-(7-2)]); + $this->checkClass($this->semValue[0], -1); + } + + protected function reduceRule386() { + $this->semValue = new Expr\New_($this->semStack[$this->stackPos-(3-2)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule387() { + list($class, $ctorArgs) = $this->semStack[$this->stackPos-(2-2)]; $this->semValue = new Expr\New_($class, $ctorArgs, $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule388() { + $this->semValue = array(); + } + + protected function reduceRule389() { + $this->semValue = $this->semStack[$this->stackPos-(4-3)]; + } + + protected function reduceRule390() { + $this->semValue = $this->semStack[$this->stackPos-(2-1)]; + } + + protected function reduceRule391() { + $this->semValue = array($this->semStack[$this->stackPos-(1-1)]); + } + + protected function reduceRule392() { + $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)]; + } + + protected function reduceRule393() { + $this->semValue = new Expr\ClosureUse(substr($this->semStack[$this->stackPos-(2-2)], 1), $this->semStack[$this->stackPos-(2-1)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule394() { + $this->semValue = new Expr\FuncCall($this->semStack[$this->stackPos-(2-1)], $this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule395() { + $this->semValue = new Expr\FuncCall($this->semStack[$this->stackPos-(2-1)], $this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule396() { + $this->semValue = new Expr\StaticCall($this->semStack[$this->stackPos-(4-1)], $this->semStack[$this->stackPos-(4-3)], $this->semStack[$this->stackPos-(4-4)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); + } + + protected function reduceRule397() { + $this->semValue = new Name($this->semStack[$this->stackPos-(1-1)], $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); + } + + protected function reduceRule398() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule399() { + $this->semValue = new Name($this->semStack[$this->stackPos-(1-1)], $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); + } + + protected function reduceRule400() { + $this->semValue = new Name\FullyQualified($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule401() { + $this->semValue = new Name\Relative($this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule402() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule403() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule404() { + $this->semValue = new Expr\Error($this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; + } + + protected function reduceRule405() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule406() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule407() { + $this->semValue = null; + } + + protected function reduceRule408() { + $this->semValue = $this->semStack[$this->stackPos-(3-2)]; + } + + protected function reduceRule409() { + $this->semValue = array(); + } + + protected function reduceRule410() { + $this->semValue = array(new Scalar\EncapsedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$this->stackPos-(1-1)], '`'), $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes)); + } + + protected function reduceRule411() { + foreach ($this->semStack[$this->stackPos-(1-1)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', true); } }; $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule412() { + $this->semValue = array(); + } + + protected function reduceRule413() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule414() { + $this->semValue = new Expr\ConstFetch($this->semStack[$this->stackPos-(1-1)], $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); + } + + protected function reduceRule415() { + $this->semValue = new Expr\ClassConstFetch($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule416() { + $this->semValue = new Expr\ClassConstFetch($this->semStack[$this->stackPos-(3-1)], new Expr\Error($this->startAttributeStack[$this->stackPos-(3-3)] + $this->endAttributeStack[$this->stackPos-(3-3)]), $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); $this->errorState = 2; + } + + protected function reduceRule417() { + $attrs = $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_SHORT; + $this->semValue = new Expr\Array_($this->semStack[$this->stackPos-(3-2)], $attrs); + } + + protected function reduceRule418() { + $attrs = $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_LONG; + $this->semValue = new Expr\Array_($this->semStack[$this->stackPos-(4-3)], $attrs); + } + + protected function reduceRule419() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule420() { + $attrs = $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes; $attrs['kind'] = ($this->semStack[$this->stackPos-(1-1)][0] === "'" || ($this->semStack[$this->stackPos-(1-1)][1] === "'" && ($this->semStack[$this->stackPos-(1-1)][0] === 'b' || $this->semStack[$this->stackPos-(1-1)][0] === 'B')) ? Scalar\String_::KIND_SINGLE_QUOTED : Scalar\String_::KIND_DOUBLE_QUOTED); + $this->semValue = new Scalar\String_(Scalar\String_::parse($this->semStack[$this->stackPos-(1-1)]), $attrs); + } + + protected function reduceRule421() { + $this->semValue = $this->parseLNumber($this->semStack[$this->stackPos-(1-1)], $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); + } + + protected function reduceRule422() { + $this->semValue = new Scalar\DNumber(Scalar\DNumber::parse($this->semStack[$this->stackPos-(1-1)]), $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); + } + + protected function reduceRule423() { + $this->semValue = new Scalar\MagicConst\Line($this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); + } + + protected function reduceRule424() { + $this->semValue = new Scalar\MagicConst\File($this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); + } + + protected function reduceRule425() { + $this->semValue = new Scalar\MagicConst\Dir($this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); + } + + protected function reduceRule426() { + $this->semValue = new Scalar\MagicConst\Class_($this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); + } + + protected function reduceRule427() { + $this->semValue = new Scalar\MagicConst\Trait_($this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); + } + + protected function reduceRule428() { + $this->semValue = new Scalar\MagicConst\Method($this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); + } + + protected function reduceRule429() { + $this->semValue = new Scalar\MagicConst\Function_($this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); + } + + protected function reduceRule430() { + $this->semValue = new Scalar\MagicConst\Namespace_($this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); + } + + protected function reduceRule431() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule432() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule433() { + $attrs = $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = strpos($this->semStack[$this->stackPos-(3-1)], "'") === false ? Scalar\String_::KIND_HEREDOC : Scalar\String_::KIND_NOWDOC; preg_match('/\A[bB]?<<<[ \t]*[\'"]?([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)[\'"]?(?:\r\n|\n|\r)\z/', $this->semStack[$this->stackPos-(3-1)], $matches); $attrs['docLabel'] = $matches[1];; + $this->semValue = new Scalar\String_(Scalar\String_::parseDocString($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-2)]), $attrs); + } + + protected function reduceRule434() { + $attrs = $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes; $attrs['kind'] = strpos($this->semStack[$this->stackPos-(2-1)], "'") === false ? Scalar\String_::KIND_HEREDOC : Scalar\String_::KIND_NOWDOC; preg_match('/\A[bB]?<<<[ \t]*[\'"]?([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)[\'"]?(?:\r\n|\n|\r)\z/', $this->semStack[$this->stackPos-(2-1)], $matches); $attrs['docLabel'] = $matches[1];; + $this->semValue = new Scalar\String_('', $attrs); + } + + protected function reduceRule435() { + $attrs = $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; + foreach ($this->semStack[$this->stackPos-(3-2)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', true); } }; $this->semValue = new Scalar\Encapsed($this->semStack[$this->stackPos-(3-2)], $attrs); + } + + protected function reduceRule436() { + $attrs = $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = strpos($this->semStack[$this->stackPos-(3-1)], "'") === false ? Scalar\String_::KIND_HEREDOC : Scalar\String_::KIND_NOWDOC; preg_match('/\A[bB]?<<<[ \t]*[\'"]?([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)[\'"]?(?:\r\n|\n|\r)\z/', $this->semStack[$this->stackPos-(3-1)], $matches); $attrs['docLabel'] = $matches[1];; + foreach ($this->semStack[$this->stackPos-(3-2)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, null, true); } } $s->value = preg_replace('~(\r\n|\n|\r)\z~', '', $s->value); if ('' === $s->value) array_pop($this->semStack[$this->stackPos-(3-2)]);; $this->semValue = new Scalar\Encapsed($this->semStack[$this->stackPos-(3-2)], $attrs); + } + + protected function reduceRule437() { + $this->semValue = null; + } + + protected function reduceRule438() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule439() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule440() { + $this->semValue = $this->semStack[$this->stackPos-(3-2)]; + } + + protected function reduceRule441() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule442() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule443() { + $this->semValue = $this->semStack[$this->stackPos-(3-2)]; + } + + protected function reduceRule444() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule445() { + $this->semValue = new Expr\Variable($this->semStack[$this->stackPos-(1-1)], $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); + } + + protected function reduceRule446() { + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$this->stackPos-(4-1)], $this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); + } + + protected function reduceRule447() { + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$this->stackPos-(4-1)], $this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); + } + + protected function reduceRule448() { + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$this->stackPos-(4-1)], $this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); + } + + protected function reduceRule449() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule450() { + $this->semValue = new Expr\MethodCall($this->semStack[$this->stackPos-(4-1)], $this->semStack[$this->stackPos-(4-3)], $this->semStack[$this->stackPos-(4-4)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); + } + + protected function reduceRule451() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule452() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule453() { + $this->semValue = new Expr\PropertyFetch($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule454() { + $this->semValue = substr($this->semStack[$this->stackPos-(1-1)], 1); + } + + protected function reduceRule455() { + $this->semValue = $this->semStack[$this->stackPos-(4-3)]; + } + + protected function reduceRule456() { + $this->semValue = new Expr\Variable($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule457() { + $this->semValue = new Expr\Error($this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); $this->errorState = 2; + } + + protected function reduceRule458() { + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule459() { + $this->semValue = new Expr\Variable($this->semStack[$this->stackPos-(1-1)], $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); + } + + protected function reduceRule460() { + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$this->stackPos-(4-1)], $this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); + } + + protected function reduceRule461() { + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$this->stackPos-(4-1)], $this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); + } + + protected function reduceRule462() { + $this->semValue = new Expr\PropertyFetch($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule463() { + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule464() { + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule465() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule466() { + $this->semValue = $this->semStack[$this->stackPos-(3-2)]; + } + + protected function reduceRule467() { + $this->semValue = new Expr\Variable($this->semStack[$this->stackPos-(1-1)], $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); + } + + protected function reduceRule468() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule469() { + $this->semValue = $this->semStack[$this->stackPos-(3-2)]; + } + + protected function reduceRule470() { + $this->semValue = new Expr\Variable($this->semStack[$this->stackPos-(1-1)], $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); + } + + protected function reduceRule471() { + $this->semValue = new Expr\Error($this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; + } + + protected function reduceRule472() { + $this->semValue = new Expr\List_($this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); + } + + protected function reduceRule473() { + $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)]; + } + + protected function reduceRule474() { + $this->semValue = array($this->semStack[$this->stackPos-(1-1)]); + } + + protected function reduceRule475() { + $this->semValue = new Expr\ArrayItem($this->semStack[$this->stackPos-(1-1)], null, false, $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); + } + + protected function reduceRule476() { + $this->semValue = new Expr\ArrayItem($this->semStack[$this->stackPos-(1-1)], null, false, $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); + } + + protected function reduceRule477() { + $this->semValue = new Expr\ArrayItem($this->semStack[$this->stackPos-(3-3)], $this->semStack[$this->stackPos-(3-1)], false, $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule478() { + $this->semValue = new Expr\ArrayItem($this->semStack[$this->stackPos-(3-3)], $this->semStack[$this->stackPos-(3-1)], false, $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule479() { + $this->semValue = null; + } + + protected function reduceRule480() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; $end = count($this->semValue)-1; if ($this->semValue[$end] === null) unset($this->semValue[$end]); + } + + protected function reduceRule481() { + $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)]; + } + + protected function reduceRule482() { + $this->semValue = array($this->semStack[$this->stackPos-(1-1)]); + } + + protected function reduceRule483() { + $this->semValue = new Expr\ArrayItem($this->semStack[$this->stackPos-(3-3)], $this->semStack[$this->stackPos-(3-1)], false, $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule484() { + $this->semValue = new Expr\ArrayItem($this->semStack[$this->stackPos-(1-1)], null, false, $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); + } + + protected function reduceRule485() { + $this->semValue = new Expr\ArrayItem($this->semStack[$this->stackPos-(4-4)], $this->semStack[$this->stackPos-(4-1)], true, $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); + } + + protected function reduceRule486() { + $this->semValue = new Expr\ArrayItem($this->semStack[$this->stackPos-(2-2)], null, true, $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule487() { + $this->semValue = null; + } + + protected function reduceRule488() { + $this->semStack[$this->stackPos-(2-1)][] = $this->semStack[$this->stackPos-(2-2)]; $this->semValue = $this->semStack[$this->stackPos-(2-1)]; + } + + protected function reduceRule489() { + $this->semStack[$this->stackPos-(2-1)][] = $this->semStack[$this->stackPos-(2-2)]; $this->semValue = $this->semStack[$this->stackPos-(2-1)]; + } + + protected function reduceRule490() { + $this->semValue = array($this->semStack[$this->stackPos-(1-1)]); + } + + protected function reduceRule491() { + $this->semValue = array($this->semStack[$this->stackPos-(2-1)], $this->semStack[$this->stackPos-(2-2)]); + } + + protected function reduceRule492() { + $this->semValue = new Scalar\EncapsedStringPart($this->semStack[$this->stackPos-(1-1)], $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); + } + + protected function reduceRule493() { + $this->semValue = new Expr\Variable(substr($this->semStack[$this->stackPos-(1-1)], 1), $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); + } + + protected function reduceRule494() { + $this->semValue = $this->semStack[$this->stackPos-(1-1)]; + } + + protected function reduceRule495() { + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$this->stackPos-(4-1)], $this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); + } + + protected function reduceRule496() { + $this->semValue = new Expr\PropertyFetch($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule497() { + $this->semValue = new Expr\Variable($this->semStack[$this->stackPos-(3-2)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule498() { + $this->semValue = new Expr\Variable($this->semStack[$this->stackPos-(3-2)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); + } + + protected function reduceRule499() { + $this->semValue = new Expr\ArrayDimFetch(new Expr\Variable($this->semStack[$this->stackPos-(6-2)], $this->startAttributeStack[$this->stackPos-(6-1)] + $this->endAttributes), $this->semStack[$this->stackPos-(6-4)], $this->startAttributeStack[$this->stackPos-(6-1)] + $this->endAttributes); + } + + protected function reduceRule500() { + $this->semValue = $this->semStack[$this->stackPos-(3-2)]; + } + + protected function reduceRule501() { + $this->semValue = new Scalar\String_($this->semStack[$this->stackPos-(1-1)], $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); + } + + protected function reduceRule502() { + $this->semValue = $this->parseNumString($this->semStack[$this->stackPos-(1-1)], $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); + } + + protected function reduceRule503() { + $this->semValue = $this->parseNumString('-' . $this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); + } + + protected function reduceRule504() { + $this->semValue = new Expr\Variable(substr($this->semStack[$this->stackPos-(1-1)], 1), $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Parser/Tokens.php b/vendor/nikic/php-parser/lib/PhpParser/Parser/Tokens.php new file mode 100644 index 0000000..861663f --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Parser/Tokens.php @@ -0,0 +1,144 @@ +lexer = $lexer; + $this->errors = array(); + + if (isset($options['throwOnError'])) { + throw new \LogicException( + '"throwOnError" is no longer supported, use "errorHandler" instead'); + } + } + + /** + * Parses PHP code into a node tree. + * + * If a non-throwing error handler is used, the parser will continue parsing after an error + * occurred and attempt to build a partial AST. + * + * @param string $code The source code to parse + * @param ErrorHandler|null $errorHandler Error handler to use for lexer/parser errors, defaults + * to ErrorHandler\Throwing. + * + * @return Node[]|null Array of statements (or null if the 'throwOnError' option is disabled and the parser was + * unable to recover from an error). + */ + public function parse($code, ErrorHandler $errorHandler = null) { + $this->errorHandler = $errorHandler ?: new ErrorHandler\Throwing; + + // Initialize the lexer + $this->lexer->startLexing($code, $this->errorHandler); + + // We start off with no lookahead-token + $symbol = self::SYMBOL_NONE; + + // The attributes for a node are taken from the first and last token of the node. + // From the first token only the startAttributes are taken and from the last only + // the endAttributes. Both are merged using the array union operator (+). + $startAttributes = '*POISON'; + $endAttributes = '*POISON'; + $this->endAttributes = $endAttributes; + + // Keep stack of start and end attributes + $this->startAttributeStack = array(); + $this->endAttributeStack = array($endAttributes); + + // Start off in the initial state and keep a stack of previous states + $state = 0; + $stateStack = array($state); + + // Semantic value stack (contains values of tokens and semantic action results) + $this->semStack = array(); + + // Current position in the stack(s) + $this->stackPos = 0; + + $this->errorState = 0; + + for (;;) { + //$this->traceNewState($state, $symbol); + + if ($this->actionBase[$state] == 0) { + $rule = $this->actionDefault[$state]; + } else { + if ($symbol === self::SYMBOL_NONE) { + // Fetch the next token id from the lexer and fetch additional info by-ref. + // The end attributes are fetched into a temporary variable and only set once the token is really + // shifted (not during read). Otherwise you would sometimes get off-by-one errors, when a rule is + // reduced after a token was read but not yet shifted. + $tokenId = $this->lexer->getNextToken($tokenValue, $startAttributes, $endAttributes); + + // map the lexer token id to the internally used symbols + $symbol = $tokenId >= 0 && $tokenId < $this->tokenToSymbolMapSize + ? $this->tokenToSymbol[$tokenId] + : $this->invalidSymbol; + + if ($symbol === $this->invalidSymbol) { + throw new \RangeException(sprintf( + 'The lexer returned an invalid token (id=%d, value=%s)', + $tokenId, $tokenValue + )); + } + + // This is necessary to assign some meaningful attributes to /* empty */ productions. They'll get + // the attributes of the next token, even though they don't contain it themselves. + $this->startAttributeStack[$this->stackPos+1] = $startAttributes; + $this->endAttributeStack[$this->stackPos+1] = $endAttributes; + $this->lookaheadStartAttributes = $startAttributes; + + //$this->traceRead($symbol); + } + + $idx = $this->actionBase[$state] + $symbol; + if ((($idx >= 0 && $idx < $this->actionTableSize && $this->actionCheck[$idx] == $symbol) + || ($state < $this->YY2TBLSTATE + && ($idx = $this->actionBase[$state + $this->YYNLSTATES] + $symbol) >= 0 + && $idx < $this->actionTableSize && $this->actionCheck[$idx] == $symbol)) + && ($action = $this->action[$idx]) != $this->defaultAction) { + /* + * >= YYNLSTATES: shift and reduce + * > 0: shift + * = 0: accept + * < 0: reduce + * = -YYUNEXPECTED: error + */ + if ($action > 0) { + /* shift */ + //$this->traceShift($symbol); + + ++$this->stackPos; + $stateStack[$this->stackPos] = $state = $action; + $this->semStack[$this->stackPos] = $tokenValue; + $this->startAttributeStack[$this->stackPos] = $startAttributes; + $this->endAttributeStack[$this->stackPos] = $endAttributes; + $this->endAttributes = $endAttributes; + $symbol = self::SYMBOL_NONE; + + if ($this->errorState) { + --$this->errorState; + } + + if ($action < $this->YYNLSTATES) { + continue; + } + + /* $yyn >= YYNLSTATES means shift-and-reduce */ + $rule = $action - $this->YYNLSTATES; + } else { + $rule = -$action; + } + } else { + $rule = $this->actionDefault[$state]; + } + } + + for (;;) { + if ($rule === 0) { + /* accept */ + //$this->traceAccept(); + return $this->semValue; + } elseif ($rule !== $this->unexpectedTokenRule) { + /* reduce */ + //$this->traceReduce($rule); + + try { + $this->{'reduceRule' . $rule}(); + } catch (Error $e) { + if (-1 === $e->getStartLine() && isset($startAttributes['startLine'])) { + $e->setStartLine($startAttributes['startLine']); + } + + $this->emitError($e); + // Can't recover from this type of error + return null; + } + + /* Goto - shift nonterminal */ + $lastEndAttributes = $this->endAttributeStack[$this->stackPos]; + $this->stackPos -= $this->ruleToLength[$rule]; + $nonTerminal = $this->ruleToNonTerminal[$rule]; + $idx = $this->gotoBase[$nonTerminal] + $stateStack[$this->stackPos]; + if ($idx >= 0 && $idx < $this->gotoTableSize && $this->gotoCheck[$idx] == $nonTerminal) { + $state = $this->goto[$idx]; + } else { + $state = $this->gotoDefault[$nonTerminal]; + } + + ++$this->stackPos; + $stateStack[$this->stackPos] = $state; + $this->semStack[$this->stackPos] = $this->semValue; + $this->endAttributeStack[$this->stackPos] = $lastEndAttributes; + } else { + /* error */ + switch ($this->errorState) { + case 0: + $msg = $this->getErrorMessage($symbol, $state); + $this->emitError(new Error($msg, $startAttributes + $endAttributes)); + // Break missing intentionally + case 1: + case 2: + $this->errorState = 3; + + // Pop until error-expecting state uncovered + while (!( + (($idx = $this->actionBase[$state] + $this->errorSymbol) >= 0 + && $idx < $this->actionTableSize && $this->actionCheck[$idx] == $this->errorSymbol) + || ($state < $this->YY2TBLSTATE + && ($idx = $this->actionBase[$state + $this->YYNLSTATES] + $this->errorSymbol) >= 0 + && $idx < $this->actionTableSize && $this->actionCheck[$idx] == $this->errorSymbol) + ) || ($action = $this->action[$idx]) == $this->defaultAction) { // Not totally sure about this + if ($this->stackPos <= 0) { + // Could not recover from error + return null; + } + $state = $stateStack[--$this->stackPos]; + //$this->tracePop($state); + } + + //$this->traceShift($this->errorSymbol); + ++$this->stackPos; + $stateStack[$this->stackPos] = $state = $action; + + // We treat the error symbol as being empty, so we reset the end attributes + // to the end attributes of the last non-error symbol + $this->endAttributeStack[$this->stackPos] = $this->endAttributeStack[$this->stackPos - 1]; + $this->endAttributes = $this->endAttributeStack[$this->stackPos - 1]; + break; + + case 3: + if ($symbol === 0) { + // Reached EOF without recovering from error + return null; + } + + //$this->traceDiscard($symbol); + $symbol = self::SYMBOL_NONE; + break 2; + } + } + + if ($state < $this->YYNLSTATES) { + break; + } + + /* >= YYNLSTATES means shift-and-reduce */ + $rule = $state - $this->YYNLSTATES; + } + } + + throw new \RuntimeException('Reached end of parser loop'); + } + + protected function emitError(Error $error) { + $this->errorHandler->handleError($error); + } + + protected function getErrorMessage($symbol, $state) { + $expectedString = ''; + if ($expected = $this->getExpectedTokens($state)) { + $expectedString = ', expecting ' . implode(' or ', $expected); + } + + return 'Syntax error, unexpected ' . $this->symbolToName[$symbol] . $expectedString; + } + + protected function getExpectedTokens($state) { + $expected = array(); + + $base = $this->actionBase[$state]; + foreach ($this->symbolToName as $symbol => $name) { + $idx = $base + $symbol; + if ($idx >= 0 && $idx < $this->actionTableSize && $this->actionCheck[$idx] === $symbol + || $state < $this->YY2TBLSTATE + && ($idx = $this->actionBase[$state + $this->YYNLSTATES] + $symbol) >= 0 + && $idx < $this->actionTableSize && $this->actionCheck[$idx] === $symbol + ) { + if ($this->action[$idx] != $this->unexpectedTokenRule + && $this->action[$idx] != $this->defaultAction + && $symbol != $this->errorSymbol + ) { + if (count($expected) == 4) { + /* Too many expected tokens */ + return array(); + } + + $expected[] = $name; + } + } + } + + return $expected; + } + + /* + * Tracing functions used for debugging the parser. + */ + + /* + protected function traceNewState($state, $symbol) { + echo '% State ' . $state + . ', Lookahead ' . ($symbol == self::SYMBOL_NONE ? '--none--' : $this->symbolToName[$symbol]) . "\n"; + } + + protected function traceRead($symbol) { + echo '% Reading ' . $this->symbolToName[$symbol] . "\n"; + } + + protected function traceShift($symbol) { + echo '% Shift ' . $this->symbolToName[$symbol] . "\n"; + } + + protected function traceAccept() { + echo "% Accepted.\n"; + } + + protected function traceReduce($n) { + echo '% Reduce by (' . $n . ') ' . $this->productions[$n] . "\n"; + } + + protected function tracePop($state) { + echo '% Recovering, uncovered state ' . $state . "\n"; + } + + protected function traceDiscard($symbol) { + echo '% Discard ' . $this->symbolToName[$symbol] . "\n"; + } + */ + + /* + * Helper functions invoked by semantic actions + */ + + /** + * Moves statements of semicolon-style namespaces into $ns->stmts and checks various error conditions. + * + * @param Node[] $stmts + * @return Node[] + */ + protected function handleNamespaces(array $stmts) { + $hasErrored = false; + $style = $this->getNamespacingStyle($stmts); + if (null === $style) { + // not namespaced, nothing to do + return $stmts; + } elseif ('brace' === $style) { + // For braced namespaces we only have to check that there are no invalid statements between the namespaces + $afterFirstNamespace = false; + foreach ($stmts as $stmt) { + if ($stmt instanceof Node\Stmt\Namespace_) { + $afterFirstNamespace = true; + } elseif (!$stmt instanceof Node\Stmt\HaltCompiler + && $afterFirstNamespace && !$hasErrored) { + $this->emitError(new Error( + 'No code may exist outside of namespace {}', $stmt->getAttributes())); + $hasErrored = true; // Avoid one error for every statement + } + } + return $stmts; + } else { + // For semicolon namespaces we have to move the statements after a namespace declaration into ->stmts + $resultStmts = array(); + $targetStmts =& $resultStmts; + foreach ($stmts as $stmt) { + if ($stmt instanceof Node\Stmt\Namespace_) { + if ($stmt->stmts === null) { + $stmt->stmts = array(); + $targetStmts =& $stmt->stmts; + $resultStmts[] = $stmt; + } else { + // This handles the invalid case of mixed style namespaces + $resultStmts[] = $stmt; + $targetStmts =& $resultStmts; + } + } elseif ($stmt instanceof Node\Stmt\HaltCompiler) { + // __halt_compiler() is not moved into the namespace + $resultStmts[] = $stmt; + } else { + $targetStmts[] = $stmt; + } + } + return $resultStmts; + } + } + + private function getNamespacingStyle(array $stmts) { + $style = null; + $hasNotAllowedStmts = false; + foreach ($stmts as $i => $stmt) { + if ($stmt instanceof Node\Stmt\Namespace_) { + $currentStyle = null === $stmt->stmts ? 'semicolon' : 'brace'; + if (null === $style) { + $style = $currentStyle; + if ($hasNotAllowedStmts) { + $this->emitError(new Error( + 'Namespace declaration statement has to be the very first statement in the script', + $stmt->getLine() // Avoid marking the entire namespace as an error + )); + } + } elseif ($style !== $currentStyle) { + $this->emitError(new Error( + 'Cannot mix bracketed namespace declarations with unbracketed namespace declarations', + $stmt->getLine() // Avoid marking the entire namespace as an error + )); + // Treat like semicolon style for namespace normalization + return 'semicolon'; + } + continue; + } + + /* declare(), __halt_compiler() and nops can be used before a namespace declaration */ + if ($stmt instanceof Node\Stmt\Declare_ + || $stmt instanceof Node\Stmt\HaltCompiler + || $stmt instanceof Node\Stmt\Nop) { + continue; + } + + /* There may be a hashbang line at the very start of the file */ + if ($i == 0 && $stmt instanceof Node\Stmt\InlineHTML && preg_match('/\A#!.*\r?\n\z/', $stmt->value)) { + continue; + } + + /* Everything else if forbidden before namespace declarations */ + $hasNotAllowedStmts = true; + } + return $style; + } + + protected function handleBuiltinTypes(Name $name) { + $scalarTypes = [ + 'bool' => true, + 'int' => true, + 'float' => true, + 'string' => true, + 'iterable' => true, + 'void' => true, + ]; + + if (!$name->isUnqualified()) { + return $name; + } + + $lowerName = strtolower($name->toString()); + return isset($scalarTypes[$lowerName]) ? $lowerName : $name; + } + + protected static $specialNames = array( + 'self' => true, + 'parent' => true, + 'static' => true, + ); + + protected function getAttributesAt($pos) { + return $this->startAttributeStack[$pos] + $this->endAttributeStack[$pos]; + } + + protected function parseLNumber($str, $attributes, $allowInvalidOctal = false) { + try { + return LNumber::fromString($str, $attributes, $allowInvalidOctal); + } catch (Error $error) { + $this->emitError($error); + // Use dummy value + return new LNumber(0, $attributes); + } + } + + protected function parseNumString($str, $attributes) { + if (!preg_match('/^(?:0|-?[1-9][0-9]*)$/', $str)) { + return new String_($str, $attributes); + } + + $num = +$str; + if (!is_int($num)) { + return new String_($str, $attributes); + } + + return new LNumber($num, $attributes); + } + + protected function checkModifier($a, $b, $modifierPos) { + // Jumping through some hoops here because verifyModifier() is also used elsewhere + try { + Class_::verifyModifier($a, $b); + } catch (Error $error) { + $error->setAttributes($this->getAttributesAt($modifierPos)); + $this->emitError($error); + } + } + + protected function checkParam(Param $node) { + if ($node->variadic && null !== $node->default) { + $this->emitError(new Error( + 'Variadic parameter cannot have a default value', + $node->default->getAttributes() + )); + } + } + + protected function checkTryCatch(TryCatch $node) { + if (empty($node->catches) && null === $node->finally) { + $this->emitError(new Error( + 'Cannot use try without catch or finally', $node->getAttributes() + )); + } + } + + protected function checkNamespace(Namespace_ $node) { + if (isset(self::$specialNames[strtolower($node->name)])) { + $this->emitError(new Error( + sprintf('Cannot use \'%s\' as namespace name', $node->name), + $node->name->getAttributes() + )); + } + + if (null !== $node->stmts) { + foreach ($node->stmts as $stmt) { + if ($stmt instanceof Namespace_) { + $this->emitError(new Error( + 'Namespace declarations cannot be nested', $stmt->getAttributes() + )); + } + } + } + } + + protected function checkClass(Class_ $node, $namePos) { + if (null !== $node->name && isset(self::$specialNames[strtolower($node->name)])) { + $this->emitError(new Error( + sprintf('Cannot use \'%s\' as class name as it is reserved', $node->name), + $this->getAttributesAt($namePos) + )); + } + + if (isset(self::$specialNames[strtolower($node->extends)])) { + $this->emitError(new Error( + sprintf('Cannot use \'%s\' as class name as it is reserved', $node->extends), + $node->extends->getAttributes() + )); + } + + foreach ($node->implements as $interface) { + if (isset(self::$specialNames[strtolower($interface)])) { + $this->emitError(new Error( + sprintf('Cannot use \'%s\' as interface name as it is reserved', $interface), + $interface->getAttributes() + )); + } + } + } + + protected function checkInterface(Interface_ $node, $namePos) { + if (null !== $node->name && isset(self::$specialNames[strtolower($node->name)])) { + $this->emitError(new Error( + sprintf('Cannot use \'%s\' as class name as it is reserved', $node->name), + $this->getAttributesAt($namePos) + )); + } + + foreach ($node->extends as $interface) { + if (isset(self::$specialNames[strtolower($interface)])) { + $this->emitError(new Error( + sprintf('Cannot use \'%s\' as interface name as it is reserved', $interface), + $interface->getAttributes() + )); + } + } + } + + protected function checkClassMethod(ClassMethod $node, $modifierPos) { + if ($node->flags & Class_::MODIFIER_STATIC) { + switch (strtolower($node->name)) { + case '__construct': + $this->emitError(new Error( + sprintf('Constructor %s() cannot be static', $node->name), + $this->getAttributesAt($modifierPos))); + break; + case '__destruct': + $this->emitError(new Error( + sprintf('Destructor %s() cannot be static', $node->name), + $this->getAttributesAt($modifierPos))); + break; + case '__clone': + $this->emitError(new Error( + sprintf('Clone method %s() cannot be static', $node->name), + $this->getAttributesAt($modifierPos))); + break; + } + } + } + + protected function checkClassConst(ClassConst $node, $modifierPos) { + if ($node->flags & Class_::MODIFIER_STATIC) { + $this->emitError(new Error( + "Cannot use 'static' as constant modifier", + $this->getAttributesAt($modifierPos))); + } + if ($node->flags & Class_::MODIFIER_ABSTRACT) { + $this->emitError(new Error( + "Cannot use 'abstract' as constant modifier", + $this->getAttributesAt($modifierPos))); + } + if ($node->flags & Class_::MODIFIER_FINAL) { + $this->emitError(new Error( + "Cannot use 'final' as constant modifier", + $this->getAttributesAt($modifierPos))); + } + } + + protected function checkProperty(Property $node, $modifierPos) { + if ($node->flags & Class_::MODIFIER_ABSTRACT) { + $this->emitError(new Error('Properties cannot be declared abstract', + $this->getAttributesAt($modifierPos))); + } + + if ($node->flags & Class_::MODIFIER_FINAL) { + $this->emitError(new Error('Properties cannot be declared final', + $this->getAttributesAt($modifierPos))); + } + } + + protected function checkUseUse(UseUse $node, $namePos) { + if ('self' == strtolower($node->alias) || 'parent' == strtolower($node->alias)) { + $this->emitError(new Error( + sprintf( + 'Cannot use %s as %s because \'%2$s\' is a special class name', + $node->name, $node->alias + ), + $this->getAttributesAt($namePos) + )); + } + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/ParserFactory.php b/vendor/nikic/php-parser/lib/PhpParser/ParserFactory.php new file mode 100644 index 0000000..28b9070 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/ParserFactory.php @@ -0,0 +1,43 @@ +type ? $this->pType($node->type) . ' ' : '') + . ($node->byRef ? '&' : '') + . ($node->variadic ? '...' : '') + . '$' . $node->name + . ($node->default ? ' = ' . $this->p($node->default) : ''); + } + + protected function pArg(Node\Arg $node) { + return ($node->byRef ? '&' : '') . ($node->unpack ? '...' : '') . $this->p($node->value); + } + + protected function pConst(Node\Const_ $node) { + return $node->name . ' = ' . $this->p($node->value); + } + + protected function pNullableType(Node\NullableType $node) { + return '?' . $this->pType($node->type); + } + + // Names + + protected function pName(Name $node) { + return implode('\\', $node->parts); + } + + protected function pName_FullyQualified(Name\FullyQualified $node) { + return '\\' . implode('\\', $node->parts); + } + + protected function pName_Relative(Name\Relative $node) { + return 'namespace\\' . implode('\\', $node->parts); + } + + // Magic Constants + + protected function pScalar_MagicConst_Class(MagicConst\Class_ $node) { + return '__CLASS__'; + } + + protected function pScalar_MagicConst_Dir(MagicConst\Dir $node) { + return '__DIR__'; + } + + protected function pScalar_MagicConst_File(MagicConst\File $node) { + return '__FILE__'; + } + + protected function pScalar_MagicConst_Function(MagicConst\Function_ $node) { + return '__FUNCTION__'; + } + + protected function pScalar_MagicConst_Line(MagicConst\Line $node) { + return '__LINE__'; + } + + protected function pScalar_MagicConst_Method(MagicConst\Method $node) { + return '__METHOD__'; + } + + protected function pScalar_MagicConst_Namespace(MagicConst\Namespace_ $node) { + return '__NAMESPACE__'; + } + + protected function pScalar_MagicConst_Trait(MagicConst\Trait_ $node) { + return '__TRAIT__'; + } + + // Scalars + + protected function pScalar_String(Scalar\String_ $node) { + $kind = $node->getAttribute('kind', Scalar\String_::KIND_SINGLE_QUOTED); + switch ($kind) { + case Scalar\String_::KIND_NOWDOC: + $label = $node->getAttribute('docLabel'); + if ($label && !$this->containsEndLabel($node->value, $label)) { + if ($node->value === '') { + return $this->pNoIndent("<<<'$label'\n$label") . $this->docStringEndToken; + } + + return $this->pNoIndent("<<<'$label'\n$node->value\n$label") + . $this->docStringEndToken; + } + /* break missing intentionally */ + case Scalar\String_::KIND_SINGLE_QUOTED: + return '\'' . $this->pNoIndent(addcslashes($node->value, '\'\\')) . '\''; + case Scalar\String_::KIND_HEREDOC: + $label = $node->getAttribute('docLabel'); + if ($label && !$this->containsEndLabel($node->value, $label)) { + if ($node->value === '') { + return $this->pNoIndent("<<<$label\n$label") . $this->docStringEndToken; + } + + $escaped = $this->escapeString($node->value, null); + return $this->pNoIndent("<<<$label\n" . $escaped ."\n$label") + . $this->docStringEndToken; + } + /* break missing intentionally */ + case Scalar\String_::KIND_DOUBLE_QUOTED: + return '"' . $this->escapeString($node->value, '"') . '"'; + } + throw new \Exception('Invalid string kind'); + } + + protected function pScalar_Encapsed(Scalar\Encapsed $node) { + if ($node->getAttribute('kind') === Scalar\String_::KIND_HEREDOC) { + $label = $node->getAttribute('docLabel'); + if ($label && !$this->encapsedContainsEndLabel($node->parts, $label)) { + if (count($node->parts) === 1 + && $node->parts[0] instanceof Scalar\EncapsedStringPart + && $node->parts[0]->value === '' + ) { + return $this->pNoIndent("<<<$label\n$label") . $this->docStringEndToken; + } + + return $this->pNoIndent( + "<<<$label\n" . $this->pEncapsList($node->parts, null) . "\n$label" + ) . $this->docStringEndToken; + } + } + return '"' . $this->pEncapsList($node->parts, '"') . '"'; + } + + protected function pScalar_LNumber(Scalar\LNumber $node) { + if ($node->value === -\PHP_INT_MAX-1) { + // PHP_INT_MIN cannot be represented as a literal, + // because the sign is not part of the literal + return '(-' . \PHP_INT_MAX . '-1)'; + } + + $kind = $node->getAttribute('kind', Scalar\LNumber::KIND_DEC); + if (Scalar\LNumber::KIND_DEC === $kind) { + return (string) $node->value; + } + + $sign = $node->value < 0 ? '-' : ''; + $str = (string) $node->value; + switch ($kind) { + case Scalar\LNumber::KIND_BIN: + return $sign . '0b' . base_convert($str, 10, 2); + case Scalar\LNumber::KIND_OCT: + return $sign . '0' . base_convert($str, 10, 8); + case Scalar\LNumber::KIND_HEX: + return $sign . '0x' . base_convert($str, 10, 16); + } + throw new \Exception('Invalid number kind'); + } + + protected function pScalar_DNumber(Scalar\DNumber $node) { + if (!is_finite($node->value)) { + if ($node->value === \INF) { + return '\INF'; + } elseif ($node->value === -\INF) { + return '-\INF'; + } else { + return '\NAN'; + } + } + + // Try to find a short full-precision representation + $stringValue = sprintf('%.16G', $node->value); + if ($node->value !== (double) $stringValue) { + $stringValue = sprintf('%.17G', $node->value); + } + + // ensure that number is really printed as float + return preg_match('/^-?[0-9]+$/', $stringValue) ? $stringValue . '.0' : $stringValue; + } + + // Assignments + + protected function pExpr_Assign(Expr\Assign $node) { + return $this->pInfixOp('Expr_Assign', $node->var, ' = ', $node->expr); + } + + protected function pExpr_AssignRef(Expr\AssignRef $node) { + return $this->pInfixOp('Expr_AssignRef', $node->var, ' =& ', $node->expr); + } + + protected function pExpr_AssignOp_Plus(AssignOp\Plus $node) { + return $this->pInfixOp('Expr_AssignOp_Plus', $node->var, ' += ', $node->expr); + } + + protected function pExpr_AssignOp_Minus(AssignOp\Minus $node) { + return $this->pInfixOp('Expr_AssignOp_Minus', $node->var, ' -= ', $node->expr); + } + + protected function pExpr_AssignOp_Mul(AssignOp\Mul $node) { + return $this->pInfixOp('Expr_AssignOp_Mul', $node->var, ' *= ', $node->expr); + } + + protected function pExpr_AssignOp_Div(AssignOp\Div $node) { + return $this->pInfixOp('Expr_AssignOp_Div', $node->var, ' /= ', $node->expr); + } + + protected function pExpr_AssignOp_Concat(AssignOp\Concat $node) { + return $this->pInfixOp('Expr_AssignOp_Concat', $node->var, ' .= ', $node->expr); + } + + protected function pExpr_AssignOp_Mod(AssignOp\Mod $node) { + return $this->pInfixOp('Expr_AssignOp_Mod', $node->var, ' %= ', $node->expr); + } + + protected function pExpr_AssignOp_BitwiseAnd(AssignOp\BitwiseAnd $node) { + return $this->pInfixOp('Expr_AssignOp_BitwiseAnd', $node->var, ' &= ', $node->expr); + } + + protected function pExpr_AssignOp_BitwiseOr(AssignOp\BitwiseOr $node) { + return $this->pInfixOp('Expr_AssignOp_BitwiseOr', $node->var, ' |= ', $node->expr); + } + + protected function pExpr_AssignOp_BitwiseXor(AssignOp\BitwiseXor $node) { + return $this->pInfixOp('Expr_AssignOp_BitwiseXor', $node->var, ' ^= ', $node->expr); + } + + protected function pExpr_AssignOp_ShiftLeft(AssignOp\ShiftLeft $node) { + return $this->pInfixOp('Expr_AssignOp_ShiftLeft', $node->var, ' <<= ', $node->expr); + } + + protected function pExpr_AssignOp_ShiftRight(AssignOp\ShiftRight $node) { + return $this->pInfixOp('Expr_AssignOp_ShiftRight', $node->var, ' >>= ', $node->expr); + } + + protected function pExpr_AssignOp_Pow(AssignOp\Pow $node) { + return $this->pInfixOp('Expr_AssignOp_Pow', $node->var, ' **= ', $node->expr); + } + + // Binary expressions + + protected function pExpr_BinaryOp_Plus(BinaryOp\Plus $node) { + return $this->pInfixOp('Expr_BinaryOp_Plus', $node->left, ' + ', $node->right); + } + + protected function pExpr_BinaryOp_Minus(BinaryOp\Minus $node) { + return $this->pInfixOp('Expr_BinaryOp_Minus', $node->left, ' - ', $node->right); + } + + protected function pExpr_BinaryOp_Mul(BinaryOp\Mul $node) { + return $this->pInfixOp('Expr_BinaryOp_Mul', $node->left, ' * ', $node->right); + } + + protected function pExpr_BinaryOp_Div(BinaryOp\Div $node) { + return $this->pInfixOp('Expr_BinaryOp_Div', $node->left, ' / ', $node->right); + } + + protected function pExpr_BinaryOp_Concat(BinaryOp\Concat $node) { + return $this->pInfixOp('Expr_BinaryOp_Concat', $node->left, ' . ', $node->right); + } + + protected function pExpr_BinaryOp_Mod(BinaryOp\Mod $node) { + return $this->pInfixOp('Expr_BinaryOp_Mod', $node->left, ' % ', $node->right); + } + + protected function pExpr_BinaryOp_BooleanAnd(BinaryOp\BooleanAnd $node) { + return $this->pInfixOp('Expr_BinaryOp_BooleanAnd', $node->left, ' && ', $node->right); + } + + protected function pExpr_BinaryOp_BooleanOr(BinaryOp\BooleanOr $node) { + return $this->pInfixOp('Expr_BinaryOp_BooleanOr', $node->left, ' || ', $node->right); + } + + protected function pExpr_BinaryOp_BitwiseAnd(BinaryOp\BitwiseAnd $node) { + return $this->pInfixOp('Expr_BinaryOp_BitwiseAnd', $node->left, ' & ', $node->right); + } + + protected function pExpr_BinaryOp_BitwiseOr(BinaryOp\BitwiseOr $node) { + return $this->pInfixOp('Expr_BinaryOp_BitwiseOr', $node->left, ' | ', $node->right); + } + + protected function pExpr_BinaryOp_BitwiseXor(BinaryOp\BitwiseXor $node) { + return $this->pInfixOp('Expr_BinaryOp_BitwiseXor', $node->left, ' ^ ', $node->right); + } + + protected function pExpr_BinaryOp_ShiftLeft(BinaryOp\ShiftLeft $node) { + return $this->pInfixOp('Expr_BinaryOp_ShiftLeft', $node->left, ' << ', $node->right); + } + + protected function pExpr_BinaryOp_ShiftRight(BinaryOp\ShiftRight $node) { + return $this->pInfixOp('Expr_BinaryOp_ShiftRight', $node->left, ' >> ', $node->right); + } + + protected function pExpr_BinaryOp_Pow(BinaryOp\Pow $node) { + return $this->pInfixOp('Expr_BinaryOp_Pow', $node->left, ' ** ', $node->right); + } + + protected function pExpr_BinaryOp_LogicalAnd(BinaryOp\LogicalAnd $node) { + return $this->pInfixOp('Expr_BinaryOp_LogicalAnd', $node->left, ' and ', $node->right); + } + + protected function pExpr_BinaryOp_LogicalOr(BinaryOp\LogicalOr $node) { + return $this->pInfixOp('Expr_BinaryOp_LogicalOr', $node->left, ' or ', $node->right); + } + + protected function pExpr_BinaryOp_LogicalXor(BinaryOp\LogicalXor $node) { + return $this->pInfixOp('Expr_BinaryOp_LogicalXor', $node->left, ' xor ', $node->right); + } + + protected function pExpr_BinaryOp_Equal(BinaryOp\Equal $node) { + return $this->pInfixOp('Expr_BinaryOp_Equal', $node->left, ' == ', $node->right); + } + + protected function pExpr_BinaryOp_NotEqual(BinaryOp\NotEqual $node) { + return $this->pInfixOp('Expr_BinaryOp_NotEqual', $node->left, ' != ', $node->right); + } + + protected function pExpr_BinaryOp_Identical(BinaryOp\Identical $node) { + return $this->pInfixOp('Expr_BinaryOp_Identical', $node->left, ' === ', $node->right); + } + + protected function pExpr_BinaryOp_NotIdentical(BinaryOp\NotIdentical $node) { + return $this->pInfixOp('Expr_BinaryOp_NotIdentical', $node->left, ' !== ', $node->right); + } + + protected function pExpr_BinaryOp_Spaceship(BinaryOp\Spaceship $node) { + return $this->pInfixOp('Expr_BinaryOp_Spaceship', $node->left, ' <=> ', $node->right); + } + + protected function pExpr_BinaryOp_Greater(BinaryOp\Greater $node) { + return $this->pInfixOp('Expr_BinaryOp_Greater', $node->left, ' > ', $node->right); + } + + protected function pExpr_BinaryOp_GreaterOrEqual(BinaryOp\GreaterOrEqual $node) { + return $this->pInfixOp('Expr_BinaryOp_GreaterOrEqual', $node->left, ' >= ', $node->right); + } + + protected function pExpr_BinaryOp_Smaller(BinaryOp\Smaller $node) { + return $this->pInfixOp('Expr_BinaryOp_Smaller', $node->left, ' < ', $node->right); + } + + protected function pExpr_BinaryOp_SmallerOrEqual(BinaryOp\SmallerOrEqual $node) { + return $this->pInfixOp('Expr_BinaryOp_SmallerOrEqual', $node->left, ' <= ', $node->right); + } + + protected function pExpr_BinaryOp_Coalesce(BinaryOp\Coalesce $node) { + return $this->pInfixOp('Expr_BinaryOp_Coalesce', $node->left, ' ?? ', $node->right); + } + + protected function pExpr_Instanceof(Expr\Instanceof_ $node) { + return $this->pInfixOp('Expr_Instanceof', $node->expr, ' instanceof ', $node->class); + } + + // Unary expressions + + protected function pExpr_BooleanNot(Expr\BooleanNot $node) { + return $this->pPrefixOp('Expr_BooleanNot', '!', $node->expr); + } + + protected function pExpr_BitwiseNot(Expr\BitwiseNot $node) { + return $this->pPrefixOp('Expr_BitwiseNot', '~', $node->expr); + } + + protected function pExpr_UnaryMinus(Expr\UnaryMinus $node) { + return $this->pPrefixOp('Expr_UnaryMinus', '-', $node->expr); + } + + protected function pExpr_UnaryPlus(Expr\UnaryPlus $node) { + return $this->pPrefixOp('Expr_UnaryPlus', '+', $node->expr); + } + + protected function pExpr_PreInc(Expr\PreInc $node) { + return $this->pPrefixOp('Expr_PreInc', '++', $node->var); + } + + protected function pExpr_PreDec(Expr\PreDec $node) { + return $this->pPrefixOp('Expr_PreDec', '--', $node->var); + } + + protected function pExpr_PostInc(Expr\PostInc $node) { + return $this->pPostfixOp('Expr_PostInc', $node->var, '++'); + } + + protected function pExpr_PostDec(Expr\PostDec $node) { + return $this->pPostfixOp('Expr_PostDec', $node->var, '--'); + } + + protected function pExpr_ErrorSuppress(Expr\ErrorSuppress $node) { + return $this->pPrefixOp('Expr_ErrorSuppress', '@', $node->expr); + } + + protected function pExpr_YieldFrom(Expr\YieldFrom $node) { + return $this->pPrefixOp('Expr_YieldFrom', 'yield from ', $node->expr); + } + + protected function pExpr_Print(Expr\Print_ $node) { + return $this->pPrefixOp('Expr_Print', 'print ', $node->expr); + } + + // Casts + + protected function pExpr_Cast_Int(Cast\Int_ $node) { + return $this->pPrefixOp('Expr_Cast_Int', '(int) ', $node->expr); + } + + protected function pExpr_Cast_Double(Cast\Double $node) { + return $this->pPrefixOp('Expr_Cast_Double', '(double) ', $node->expr); + } + + protected function pExpr_Cast_String(Cast\String_ $node) { + return $this->pPrefixOp('Expr_Cast_String', '(string) ', $node->expr); + } + + protected function pExpr_Cast_Array(Cast\Array_ $node) { + return $this->pPrefixOp('Expr_Cast_Array', '(array) ', $node->expr); + } + + protected function pExpr_Cast_Object(Cast\Object_ $node) { + return $this->pPrefixOp('Expr_Cast_Object', '(object) ', $node->expr); + } + + protected function pExpr_Cast_Bool(Cast\Bool_ $node) { + return $this->pPrefixOp('Expr_Cast_Bool', '(bool) ', $node->expr); + } + + protected function pExpr_Cast_Unset(Cast\Unset_ $node) { + return $this->pPrefixOp('Expr_Cast_Unset', '(unset) ', $node->expr); + } + + // Function calls and similar constructs + + protected function pExpr_FuncCall(Expr\FuncCall $node) { + return $this->pCallLhs($node->name) + . '(' . $this->pCommaSeparated($node->args) . ')'; + } + + protected function pExpr_MethodCall(Expr\MethodCall $node) { + return $this->pDereferenceLhs($node->var) . '->' . $this->pObjectProperty($node->name) + . '(' . $this->pCommaSeparated($node->args) . ')'; + } + + protected function pExpr_StaticCall(Expr\StaticCall $node) { + return $this->pDereferenceLhs($node->class) . '::' + . ($node->name instanceof Expr + ? ($node->name instanceof Expr\Variable + ? $this->p($node->name) + : '{' . $this->p($node->name) . '}') + : $node->name) + . '(' . $this->pCommaSeparated($node->args) . ')'; + } + + protected function pExpr_Empty(Expr\Empty_ $node) { + return 'empty(' . $this->p($node->expr) . ')'; + } + + protected function pExpr_Isset(Expr\Isset_ $node) { + return 'isset(' . $this->pCommaSeparated($node->vars) . ')'; + } + + protected function pExpr_Eval(Expr\Eval_ $node) { + return 'eval(' . $this->p($node->expr) . ')'; + } + + protected function pExpr_Include(Expr\Include_ $node) { + static $map = array( + Expr\Include_::TYPE_INCLUDE => 'include', + Expr\Include_::TYPE_INCLUDE_ONCE => 'include_once', + Expr\Include_::TYPE_REQUIRE => 'require', + Expr\Include_::TYPE_REQUIRE_ONCE => 'require_once', + ); + + return $map[$node->type] . ' ' . $this->p($node->expr); + } + + protected function pExpr_List(Expr\List_ $node) { + return 'list(' . $this->pCommaSeparated($node->items) . ')'; + } + + // Other + + protected function pExpr_Error(Expr\Error $node) { + throw new \LogicException('Cannot pretty-print AST with Error nodes'); + } + + protected function pExpr_Variable(Expr\Variable $node) { + if ($node->name instanceof Expr) { + return '${' . $this->p($node->name) . '}'; + } else { + return '$' . $node->name; + } + } + + protected function pExpr_Array(Expr\Array_ $node) { + $syntax = $node->getAttribute('kind', + $this->options['shortArraySyntax'] ? Expr\Array_::KIND_SHORT : Expr\Array_::KIND_LONG); + if ($syntax === Expr\Array_::KIND_SHORT) { + return '[' . $this->pCommaSeparated($node->items) . ']'; + } else { + return 'array(' . $this->pCommaSeparated($node->items) . ')'; + } + } + + protected function pExpr_ArrayItem(Expr\ArrayItem $node) { + return (null !== $node->key ? $this->p($node->key) . ' => ' : '') + . ($node->byRef ? '&' : '') . $this->p($node->value); + } + + protected function pExpr_ArrayDimFetch(Expr\ArrayDimFetch $node) { + return $this->pDereferenceLhs($node->var) + . '[' . (null !== $node->dim ? $this->p($node->dim) : '') . ']'; + } + + protected function pExpr_ConstFetch(Expr\ConstFetch $node) { + return $this->p($node->name); + } + + protected function pExpr_ClassConstFetch(Expr\ClassConstFetch $node) { + return $this->p($node->class) . '::' + . (is_string($node->name) ? $node->name : $this->p($node->name)); + } + + protected function pExpr_PropertyFetch(Expr\PropertyFetch $node) { + return $this->pDereferenceLhs($node->var) . '->' . $this->pObjectProperty($node->name); + } + + protected function pExpr_StaticPropertyFetch(Expr\StaticPropertyFetch $node) { + return $this->pDereferenceLhs($node->class) . '::$' . $this->pObjectProperty($node->name); + } + + protected function pExpr_ShellExec(Expr\ShellExec $node) { + return '`' . $this->pEncapsList($node->parts, '`') . '`'; + } + + protected function pExpr_Closure(Expr\Closure $node) { + return ($node->static ? 'static ' : '') + . 'function ' . ($node->byRef ? '&' : '') + . '(' . $this->pCommaSeparated($node->params) . ')' + . (!empty($node->uses) ? ' use(' . $this->pCommaSeparated($node->uses) . ')': '') + . (null !== $node->returnType ? ' : ' . $this->pType($node->returnType) : '') + . ' {' . $this->pStmts($node->stmts) . "\n" . '}'; + } + + protected function pExpr_ClosureUse(Expr\ClosureUse $node) { + return ($node->byRef ? '&' : '') . '$' . $node->var; + } + + protected function pExpr_New(Expr\New_ $node) { + if ($node->class instanceof Stmt\Class_) { + $args = $node->args ? '(' . $this->pCommaSeparated($node->args) . ')' : ''; + return 'new ' . $this->pClassCommon($node->class, $args); + } + return 'new ' . $this->p($node->class) . '(' . $this->pCommaSeparated($node->args) . ')'; + } + + protected function pExpr_Clone(Expr\Clone_ $node) { + return 'clone ' . $this->p($node->expr); + } + + protected function pExpr_Ternary(Expr\Ternary $node) { + // a bit of cheating: we treat the ternary as a binary op where the ?...: part is the operator. + // this is okay because the part between ? and : never needs parentheses. + return $this->pInfixOp('Expr_Ternary', + $node->cond, ' ?' . (null !== $node->if ? ' ' . $this->p($node->if) . ' ' : '') . ': ', $node->else + ); + } + + protected function pExpr_Exit(Expr\Exit_ $node) { + $kind = $node->getAttribute('kind', Expr\Exit_::KIND_DIE); + return ($kind === Expr\Exit_::KIND_EXIT ? 'exit' : 'die') + . (null !== $node->expr ? '(' . $this->p($node->expr) . ')' : ''); + } + + protected function pExpr_Yield(Expr\Yield_ $node) { + if ($node->value === null) { + return 'yield'; + } else { + // this is a bit ugly, but currently there is no way to detect whether the parentheses are necessary + return '(yield ' + . ($node->key !== null ? $this->p($node->key) . ' => ' : '') + . $this->p($node->value) + . ')'; + } + } + + // Declarations + + protected function pStmt_Namespace(Stmt\Namespace_ $node) { + if ($this->canUseSemicolonNamespaces) { + return 'namespace ' . $this->p($node->name) . ';' . "\n" . $this->pStmts($node->stmts, false); + } else { + return 'namespace' . (null !== $node->name ? ' ' . $this->p($node->name) : '') + . ' {' . $this->pStmts($node->stmts) . "\n" . '}'; + } + } + + protected function pStmt_Use(Stmt\Use_ $node) { + return 'use ' . $this->pUseType($node->type) + . $this->pCommaSeparated($node->uses) . ';'; + } + + protected function pStmt_GroupUse(Stmt\GroupUse $node) { + return 'use ' . $this->pUseType($node->type) . $this->pName($node->prefix) + . '\{' . $this->pCommaSeparated($node->uses) . '};'; + } + + protected function pStmt_UseUse(Stmt\UseUse $node) { + return $this->pUseType($node->type) . $this->p($node->name) + . ($node->name->getLast() !== $node->alias ? ' as ' . $node->alias : ''); + } + + protected function pUseType($type) { + return $type === Stmt\Use_::TYPE_FUNCTION ? 'function ' + : ($type === Stmt\Use_::TYPE_CONSTANT ? 'const ' : ''); + } + + protected function pStmt_Interface(Stmt\Interface_ $node) { + return 'interface ' . $node->name + . (!empty($node->extends) ? ' extends ' . $this->pCommaSeparated($node->extends) : '') + . "\n" . '{' . $this->pStmts($node->stmts) . "\n" . '}'; + } + + protected function pStmt_Class(Stmt\Class_ $node) { + return $this->pClassCommon($node, ' ' . $node->name); + } + + protected function pStmt_Trait(Stmt\Trait_ $node) { + return 'trait ' . $node->name + . "\n" . '{' . $this->pStmts($node->stmts) . "\n" . '}'; + } + + protected function pStmt_TraitUse(Stmt\TraitUse $node) { + return 'use ' . $this->pCommaSeparated($node->traits) + . (empty($node->adaptations) + ? ';' + : ' {' . $this->pStmts($node->adaptations) . "\n" . '}'); + } + + protected function pStmt_TraitUseAdaptation_Precedence(Stmt\TraitUseAdaptation\Precedence $node) { + return $this->p($node->trait) . '::' . $node->method + . ' insteadof ' . $this->pCommaSeparated($node->insteadof) . ';'; + } + + protected function pStmt_TraitUseAdaptation_Alias(Stmt\TraitUseAdaptation\Alias $node) { + return (null !== $node->trait ? $this->p($node->trait) . '::' : '') + . $node->method . ' as' + . (null !== $node->newModifier ? ' ' . rtrim($this->pModifiers($node->newModifier), ' ') : '') + . (null !== $node->newName ? ' ' . $node->newName : '') + . ';'; + } + + protected function pStmt_Property(Stmt\Property $node) { + return (0 === $node->flags ? 'var ' : $this->pModifiers($node->flags)) . $this->pCommaSeparated($node->props) . ';'; + } + + protected function pStmt_PropertyProperty(Stmt\PropertyProperty $node) { + return '$' . $node->name + . (null !== $node->default ? ' = ' . $this->p($node->default) : ''); + } + + protected function pStmt_ClassMethod(Stmt\ClassMethod $node) { + return $this->pModifiers($node->flags) + . 'function ' . ($node->byRef ? '&' : '') . $node->name + . '(' . $this->pCommaSeparated($node->params) . ')' + . (null !== $node->returnType ? ' : ' . $this->pType($node->returnType) : '') + . (null !== $node->stmts + ? "\n" . '{' . $this->pStmts($node->stmts) . "\n" . '}' + : ';'); + } + + protected function pStmt_ClassConst(Stmt\ClassConst $node) { + return $this->pModifiers($node->flags) + . 'const ' . $this->pCommaSeparated($node->consts) . ';'; + } + + protected function pStmt_Function(Stmt\Function_ $node) { + return 'function ' . ($node->byRef ? '&' : '') . $node->name + . '(' . $this->pCommaSeparated($node->params) . ')' + . (null !== $node->returnType ? ' : ' . $this->pType($node->returnType) : '') + . "\n" . '{' . $this->pStmts($node->stmts) . "\n" . '}'; + } + + protected function pStmt_Const(Stmt\Const_ $node) { + return 'const ' . $this->pCommaSeparated($node->consts) . ';'; + } + + protected function pStmt_Declare(Stmt\Declare_ $node) { + return 'declare (' . $this->pCommaSeparated($node->declares) . ')' + . (null !== $node->stmts ? ' {' . $this->pStmts($node->stmts) . "\n" . '}' : ';'); + } + + protected function pStmt_DeclareDeclare(Stmt\DeclareDeclare $node) { + return $node->key . '=' . $this->p($node->value); + } + + // Control flow + + protected function pStmt_If(Stmt\If_ $node) { + return 'if (' . $this->p($node->cond) . ') {' + . $this->pStmts($node->stmts) . "\n" . '}' + . $this->pImplode($node->elseifs) + . (null !== $node->else ? $this->p($node->else) : ''); + } + + protected function pStmt_ElseIf(Stmt\ElseIf_ $node) { + return ' elseif (' . $this->p($node->cond) . ') {' + . $this->pStmts($node->stmts) . "\n" . '}'; + } + + protected function pStmt_Else(Stmt\Else_ $node) { + return ' else {' . $this->pStmts($node->stmts) . "\n" . '}'; + } + + protected function pStmt_For(Stmt\For_ $node) { + return 'for (' + . $this->pCommaSeparated($node->init) . ';' . (!empty($node->cond) ? ' ' : '') + . $this->pCommaSeparated($node->cond) . ';' . (!empty($node->loop) ? ' ' : '') + . $this->pCommaSeparated($node->loop) + . ') {' . $this->pStmts($node->stmts) . "\n" . '}'; + } + + protected function pStmt_Foreach(Stmt\Foreach_ $node) { + return 'foreach (' . $this->p($node->expr) . ' as ' + . (null !== $node->keyVar ? $this->p($node->keyVar) . ' => ' : '') + . ($node->byRef ? '&' : '') . $this->p($node->valueVar) . ') {' + . $this->pStmts($node->stmts) . "\n" . '}'; + } + + protected function pStmt_While(Stmt\While_ $node) { + return 'while (' . $this->p($node->cond) . ') {' + . $this->pStmts($node->stmts) . "\n" . '}'; + } + + protected function pStmt_Do(Stmt\Do_ $node) { + return 'do {' . $this->pStmts($node->stmts) . "\n" + . '} while (' . $this->p($node->cond) . ');'; + } + + protected function pStmt_Switch(Stmt\Switch_ $node) { + return 'switch (' . $this->p($node->cond) . ') {' + . $this->pStmts($node->cases) . "\n" . '}'; + } + + protected function pStmt_Case(Stmt\Case_ $node) { + return (null !== $node->cond ? 'case ' . $this->p($node->cond) : 'default') . ':' + . $this->pStmts($node->stmts); + } + + protected function pStmt_TryCatch(Stmt\TryCatch $node) { + return 'try {' . $this->pStmts($node->stmts) . "\n" . '}' + . $this->pImplode($node->catches) + . ($node->finally !== null ? $this->p($node->finally) : ''); + } + + protected function pStmt_Catch(Stmt\Catch_ $node) { + return ' catch (' . $this->pImplode($node->types, '|') . ' $' . $node->var . ') {' + . $this->pStmts($node->stmts) . "\n" . '}'; + } + + protected function pStmt_Finally(Stmt\Finally_ $node) { + return ' finally {' . $this->pStmts($node->stmts) . "\n" . '}'; + } + + protected function pStmt_Break(Stmt\Break_ $node) { + return 'break' . ($node->num !== null ? ' ' . $this->p($node->num) : '') . ';'; + } + + protected function pStmt_Continue(Stmt\Continue_ $node) { + return 'continue' . ($node->num !== null ? ' ' . $this->p($node->num) : '') . ';'; + } + + protected function pStmt_Return(Stmt\Return_ $node) { + return 'return' . (null !== $node->expr ? ' ' . $this->p($node->expr) : '') . ';'; + } + + protected function pStmt_Throw(Stmt\Throw_ $node) { + return 'throw ' . $this->p($node->expr) . ';'; + } + + protected function pStmt_Label(Stmt\Label $node) { + return $node->name . ':'; + } + + protected function pStmt_Goto(Stmt\Goto_ $node) { + return 'goto ' . $node->name . ';'; + } + + // Other + + protected function pStmt_Echo(Stmt\Echo_ $node) { + return 'echo ' . $this->pCommaSeparated($node->exprs) . ';'; + } + + protected function pStmt_Static(Stmt\Static_ $node) { + return 'static ' . $this->pCommaSeparated($node->vars) . ';'; + } + + protected function pStmt_Global(Stmt\Global_ $node) { + return 'global ' . $this->pCommaSeparated($node->vars) . ';'; + } + + protected function pStmt_StaticVar(Stmt\StaticVar $node) { + return '$' . $node->name + . (null !== $node->default ? ' = ' . $this->p($node->default) : ''); + } + + protected function pStmt_Unset(Stmt\Unset_ $node) { + return 'unset(' . $this->pCommaSeparated($node->vars) . ');'; + } + + protected function pStmt_InlineHTML(Stmt\InlineHTML $node) { + $newline = $node->getAttribute('hasLeadingNewline', true) ? "\n" : ''; + return '?>' . $this->pNoIndent($newline . $node->value) . 'remaining; + } + + protected function pStmt_Nop(Stmt\Nop $node) { + return ''; + } + + // Helpers + + protected function pType($node) { + return is_string($node) ? $node : $this->p($node); + } + + protected function pClassCommon(Stmt\Class_ $node, $afterClassToken) { + return $this->pModifiers($node->flags) + . 'class' . $afterClassToken + . (null !== $node->extends ? ' extends ' . $this->p($node->extends) : '') + . (!empty($node->implements) ? ' implements ' . $this->pCommaSeparated($node->implements) : '') + . "\n" . '{' . $this->pStmts($node->stmts) . "\n" . '}'; + } + + protected function pObjectProperty($node) { + if ($node instanceof Expr) { + return '{' . $this->p($node) . '}'; + } else { + return $node; + } + } + + protected function pModifiers($modifiers) { + return ($modifiers & Stmt\Class_::MODIFIER_PUBLIC ? 'public ' : '') + . ($modifiers & Stmt\Class_::MODIFIER_PROTECTED ? 'protected ' : '') + . ($modifiers & Stmt\Class_::MODIFIER_PRIVATE ? 'private ' : '') + . ($modifiers & Stmt\Class_::MODIFIER_STATIC ? 'static ' : '') + . ($modifiers & Stmt\Class_::MODIFIER_ABSTRACT ? 'abstract ' : '') + . ($modifiers & Stmt\Class_::MODIFIER_FINAL ? 'final ' : ''); + } + + protected function pEncapsList(array $encapsList, $quote) { + $return = ''; + foreach ($encapsList as $element) { + if ($element instanceof Scalar\EncapsedStringPart) { + $return .= $this->escapeString($element->value, $quote); + } else { + $return .= '{' . $this->p($element) . '}'; + } + } + + return $return; + } + + protected function escapeString($string, $quote) { + if (null === $quote) { + // For doc strings, don't escape newlines + $escaped = addcslashes($string, "\t\f\v$\\"); + } else { + $escaped = addcslashes($string, "\n\r\t\f\v$" . $quote . "\\"); + } + + // Escape other control characters + return preg_replace_callback('/([\0-\10\16-\37])(?=([0-7]?))/', function ($matches) { + $oct = decoct(ord($matches[1])); + if ($matches[2] !== '') { + // If there is a trailing digit, use the full three character form + return '\\' . str_pad($oct, 3, '0', STR_PAD_LEFT); + } + return '\\' . $oct; + }, $escaped); + } + + protected function containsEndLabel($string, $label, $atStart = true, $atEnd = true) { + $start = $atStart ? '(?:^|[\r\n])' : '[\r\n]'; + $end = $atEnd ? '(?:$|[;\r\n])' : '[;\r\n]'; + return false !== strpos($string, $label) + && preg_match('/' . $start . $label . $end . '/', $string); + } + + protected function encapsedContainsEndLabel(array $parts, $label) { + foreach ($parts as $i => $part) { + $atStart = $i === 0; + $atEnd = $i === count($parts) - 1; + if ($part instanceof Scalar\EncapsedStringPart + && $this->containsEndLabel($part->value, $label, $atStart, $atEnd) + ) { + return true; + } + } + return false; + } + + protected function pDereferenceLhs(Node $node) { + if ($node instanceof Expr\Variable + || $node instanceof Name + || $node instanceof Expr\ArrayDimFetch + || $node instanceof Expr\PropertyFetch + || $node instanceof Expr\StaticPropertyFetch + || $node instanceof Expr\FuncCall + || $node instanceof Expr\MethodCall + || $node instanceof Expr\StaticCall + || $node instanceof Expr\Array_ + || $node instanceof Scalar\String_ + || $node instanceof Expr\ConstFetch + || $node instanceof Expr\ClassConstFetch + ) { + return $this->p($node); + } else { + return '(' . $this->p($node) . ')'; + } + } + + protected function pCallLhs(Node $node) { + if ($node instanceof Name + || $node instanceof Expr\Variable + || $node instanceof Expr\ArrayDimFetch + || $node instanceof Expr\FuncCall + || $node instanceof Expr\MethodCall + || $node instanceof Expr\StaticCall + || $node instanceof Expr\Array_ + ) { + return $this->p($node); + } else { + return '(' . $this->p($node) . ')'; + } + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php b/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php new file mode 100644 index 0000000..5bc3966 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php @@ -0,0 +1,316 @@ + array( 0, 1), + 'Expr_BitwiseNot' => array( 10, 1), + 'Expr_PreInc' => array( 10, 1), + 'Expr_PreDec' => array( 10, 1), + 'Expr_PostInc' => array( 10, -1), + 'Expr_PostDec' => array( 10, -1), + 'Expr_UnaryPlus' => array( 10, 1), + 'Expr_UnaryMinus' => array( 10, 1), + 'Expr_Cast_Int' => array( 10, 1), + 'Expr_Cast_Double' => array( 10, 1), + 'Expr_Cast_String' => array( 10, 1), + 'Expr_Cast_Array' => array( 10, 1), + 'Expr_Cast_Object' => array( 10, 1), + 'Expr_Cast_Bool' => array( 10, 1), + 'Expr_Cast_Unset' => array( 10, 1), + 'Expr_ErrorSuppress' => array( 10, 1), + 'Expr_Instanceof' => array( 20, 0), + 'Expr_BooleanNot' => array( 30, 1), + 'Expr_BinaryOp_Mul' => array( 40, -1), + 'Expr_BinaryOp_Div' => array( 40, -1), + 'Expr_BinaryOp_Mod' => array( 40, -1), + 'Expr_BinaryOp_Plus' => array( 50, -1), + 'Expr_BinaryOp_Minus' => array( 50, -1), + 'Expr_BinaryOp_Concat' => array( 50, -1), + 'Expr_BinaryOp_ShiftLeft' => array( 60, -1), + 'Expr_BinaryOp_ShiftRight' => array( 60, -1), + 'Expr_BinaryOp_Smaller' => array( 70, 0), + 'Expr_BinaryOp_SmallerOrEqual' => array( 70, 0), + 'Expr_BinaryOp_Greater' => array( 70, 0), + 'Expr_BinaryOp_GreaterOrEqual' => array( 70, 0), + 'Expr_BinaryOp_Equal' => array( 80, 0), + 'Expr_BinaryOp_NotEqual' => array( 80, 0), + 'Expr_BinaryOp_Identical' => array( 80, 0), + 'Expr_BinaryOp_NotIdentical' => array( 80, 0), + 'Expr_BinaryOp_Spaceship' => array( 80, 0), + 'Expr_BinaryOp_BitwiseAnd' => array( 90, -1), + 'Expr_BinaryOp_BitwiseXor' => array(100, -1), + 'Expr_BinaryOp_BitwiseOr' => array(110, -1), + 'Expr_BinaryOp_BooleanAnd' => array(120, -1), + 'Expr_BinaryOp_BooleanOr' => array(130, -1), + 'Expr_BinaryOp_Coalesce' => array(140, 1), + 'Expr_Ternary' => array(150, -1), + // parser uses %left for assignments, but they really behave as %right + 'Expr_Assign' => array(160, 1), + 'Expr_AssignRef' => array(160, 1), + 'Expr_AssignOp_Plus' => array(160, 1), + 'Expr_AssignOp_Minus' => array(160, 1), + 'Expr_AssignOp_Mul' => array(160, 1), + 'Expr_AssignOp_Div' => array(160, 1), + 'Expr_AssignOp_Concat' => array(160, 1), + 'Expr_AssignOp_Mod' => array(160, 1), + 'Expr_AssignOp_BitwiseAnd' => array(160, 1), + 'Expr_AssignOp_BitwiseOr' => array(160, 1), + 'Expr_AssignOp_BitwiseXor' => array(160, 1), + 'Expr_AssignOp_ShiftLeft' => array(160, 1), + 'Expr_AssignOp_ShiftRight' => array(160, 1), + 'Expr_AssignOp_Pow' => array(160, 1), + 'Expr_YieldFrom' => array(165, 1), + 'Expr_Print' => array(168, 1), + 'Expr_BinaryOp_LogicalAnd' => array(170, -1), + 'Expr_BinaryOp_LogicalXor' => array(180, -1), + 'Expr_BinaryOp_LogicalOr' => array(190, -1), + 'Expr_Include' => array(200, -1), + ); + + protected $noIndentToken; + protected $docStringEndToken; + protected $canUseSemicolonNamespaces; + protected $options; + + /** + * Creates a pretty printer instance using the given options. + * + * Supported options: + * * bool $shortArraySyntax = false: Whether to use [] instead of array() as the default array + * syntax, if the node does not specify a format. + * + * @param array $options Dictionary of formatting options + */ + public function __construct(array $options = []) { + $this->noIndentToken = '_NO_INDENT_' . mt_rand(); + $this->docStringEndToken = '_DOC_STRING_END_' . mt_rand(); + + $defaultOptions = ['shortArraySyntax' => false]; + $this->options = $options + $defaultOptions; + } + + /** + * Pretty prints an array of statements. + * + * @param Node[] $stmts Array of statements + * + * @return string Pretty printed statements + */ + public function prettyPrint(array $stmts) { + $this->preprocessNodes($stmts); + + return ltrim($this->handleMagicTokens($this->pStmts($stmts, false))); + } + + /** + * Pretty prints an expression. + * + * @param Expr $node Expression node + * + * @return string Pretty printed node + */ + public function prettyPrintExpr(Expr $node) { + return $this->handleMagicTokens($this->p($node)); + } + + /** + * Pretty prints a file of statements (includes the opening prettyPrint($stmts); + + if ($stmts[0] instanceof Stmt\InlineHTML) { + $p = preg_replace('/^<\?php\s+\?>\n?/', '', $p); + } + if ($stmts[count($stmts) - 1] instanceof Stmt\InlineHTML) { + $p = preg_replace('/<\?php$/', '', rtrim($p)); + } + + return $p; + } + + /** + * Preprocesses the top-level nodes to initialize pretty printer state. + * + * @param Node[] $nodes Array of nodes + */ + protected function preprocessNodes(array $nodes) { + /* We can use semicolon-namespaces unless there is a global namespace declaration */ + $this->canUseSemicolonNamespaces = true; + foreach ($nodes as $node) { + if ($node instanceof Stmt\Namespace_ && null === $node->name) { + $this->canUseSemicolonNamespaces = false; + } + } + } + + protected function handleMagicTokens($str) { + // Drop no-indent tokens + $str = str_replace($this->noIndentToken, '', $str); + + // Replace doc-string-end tokens with nothing or a newline + $str = str_replace($this->docStringEndToken . ";\n", ";\n", $str); + $str = str_replace($this->docStringEndToken, "\n", $str); + + return $str; + } + + /** + * Pretty prints an array of nodes (statements) and indents them optionally. + * + * @param Node[] $nodes Array of nodes + * @param bool $indent Whether to indent the printed nodes + * + * @return string Pretty printed statements + */ + protected function pStmts(array $nodes, $indent = true) { + $result = ''; + foreach ($nodes as $node) { + $comments = $node->getAttribute('comments', array()); + if ($comments) { + $result .= "\n" . $this->pComments($comments); + if ($node instanceof Stmt\Nop) { + continue; + } + } + + $result .= "\n" . $this->p($node) . ($node instanceof Expr ? ';' : ''); + } + + if ($indent) { + return preg_replace('~\n(?!$|' . $this->noIndentToken . ')~', "\n ", $result); + } else { + return $result; + } + } + + /** + * Pretty prints a node. + * + * @param Node $node Node to be pretty printed + * + * @return string Pretty printed node + */ + protected function p(Node $node) { + return $this->{'p' . $node->getType()}($node); + } + + protected function pInfixOp($type, Node $leftNode, $operatorString, Node $rightNode) { + list($precedence, $associativity) = $this->precedenceMap[$type]; + + return $this->pPrec($leftNode, $precedence, $associativity, -1) + . $operatorString + . $this->pPrec($rightNode, $precedence, $associativity, 1); + } + + protected function pPrefixOp($type, $operatorString, Node $node) { + list($precedence, $associativity) = $this->precedenceMap[$type]; + return $operatorString . $this->pPrec($node, $precedence, $associativity, 1); + } + + protected function pPostfixOp($type, Node $node, $operatorString) { + list($precedence, $associativity) = $this->precedenceMap[$type]; + return $this->pPrec($node, $precedence, $associativity, -1) . $operatorString; + } + + /** + * Prints an expression node with the least amount of parentheses necessary to preserve the meaning. + * + * @param Node $node Node to pretty print + * @param int $parentPrecedence Precedence of the parent operator + * @param int $parentAssociativity Associativity of parent operator + * (-1 is left, 0 is nonassoc, 1 is right) + * @param int $childPosition Position of the node relative to the operator + * (-1 is left, 1 is right) + * + * @return string The pretty printed node + */ + protected function pPrec(Node $node, $parentPrecedence, $parentAssociativity, $childPosition) { + $type = $node->getType(); + if (isset($this->precedenceMap[$type])) { + $childPrecedence = $this->precedenceMap[$type][0]; + if ($childPrecedence > $parentPrecedence + || ($parentPrecedence == $childPrecedence && $parentAssociativity != $childPosition) + ) { + return '(' . $this->p($node) . ')'; + } + } + + return $this->p($node); + } + + /** + * Pretty prints an array of nodes and implodes the printed values. + * + * @param Node[] $nodes Array of Nodes to be printed + * @param string $glue Character to implode with + * + * @return string Imploded pretty printed nodes + */ + protected function pImplode(array $nodes, $glue = '') { + $pNodes = array(); + foreach ($nodes as $node) { + if (null === $node) { + $pNodes[] = ''; + } else { + $pNodes[] = $this->p($node); + } + } + + return implode($glue, $pNodes); + } + + /** + * Pretty prints an array of nodes and implodes the printed values with commas. + * + * @param Node[] $nodes Array of Nodes to be printed + * + * @return string Comma separated pretty printed nodes + */ + protected function pCommaSeparated(array $nodes) { + return $this->pImplode($nodes, ', '); + } + + /** + * Signals the pretty printer that a string shall not be indented. + * + * @param string $string Not to be indented string + * + * @return string String marked with $this->noIndentToken's. + */ + protected function pNoIndent($string) { + return str_replace("\n", "\n" . $this->noIndentToken, $string); + } + + /** + * Prints reformatted text of the passed comments. + * + * @param Comment[] $comments List of comments + * + * @return string Reformatted text of comments + */ + protected function pComments(array $comments) { + $formattedComments = []; + + foreach ($comments as $comment) { + $formattedComments[] = $comment->getReformattedText(); + } + + return implode("\n", $formattedComments); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Serializer.php b/vendor/nikic/php-parser/lib/PhpParser/Serializer.php new file mode 100644 index 0000000..1dd7906 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Serializer.php @@ -0,0 +1,18 @@ +writer = new XMLWriter; + $this->writer->openMemory(); + $this->writer->setIndent(true); + } + + public function serialize(array $nodes) { + $this->writer->flush(); + $this->writer->startDocument('1.0', 'UTF-8'); + + $this->writer->startElement('AST'); + $this->writer->writeAttribute('xmlns:node', 'http://nikic.github.com/PHPParser/XML/node'); + $this->writer->writeAttribute('xmlns:subNode', 'http://nikic.github.com/PHPParser/XML/subNode'); + $this->writer->writeAttribute('xmlns:attribute', 'http://nikic.github.com/PHPParser/XML/attribute'); + $this->writer->writeAttribute('xmlns:scalar', 'http://nikic.github.com/PHPParser/XML/scalar'); + + $this->_serialize($nodes); + + $this->writer->endElement(); + + return $this->writer->outputMemory(); + } + + protected function _serialize($node) { + if ($node instanceof Node) { + $this->writer->startElement('node:' . $node->getType()); + + foreach ($node->getAttributes() as $name => $value) { + $this->writer->startElement('attribute:' . $name); + $this->_serialize($value); + $this->writer->endElement(); + } + + foreach ($node as $name => $subNode) { + $this->writer->startElement('subNode:' . $name); + $this->_serialize($subNode); + $this->writer->endElement(); + } + + $this->writer->endElement(); + } elseif ($node instanceof Comment) { + $this->writer->startElement('comment'); + $this->writer->writeAttribute('isDocComment', $node instanceof Comment\Doc ? 'true' : 'false'); + $this->writer->writeAttribute('line', (string) $node->getLine()); + $this->writer->text($node->getText()); + $this->writer->endElement(); + } elseif (is_array($node)) { + $this->writer->startElement('scalar:array'); + foreach ($node as $subNode) { + $this->_serialize($subNode); + } + $this->writer->endElement(); + } elseif (is_string($node)) { + $this->writer->writeElement('scalar:string', $node); + } elseif (is_int($node)) { + $this->writer->writeElement('scalar:int', (string) $node); + } elseif (is_float($node)) { + // TODO Higher precision conversion? + $this->writer->writeElement('scalar:float', (string) $node); + } elseif (true === $node) { + $this->writer->writeElement('scalar:true'); + } elseif (false === $node) { + $this->writer->writeElement('scalar:false'); + } elseif (null === $node) { + $this->writer->writeElement('scalar:null'); + } else { + throw new \InvalidArgumentException('Unexpected node type'); + } + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Unserializer.php b/vendor/nikic/php-parser/lib/PhpParser/Unserializer.php new file mode 100644 index 0000000..9c221a1 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Unserializer.php @@ -0,0 +1,18 @@ +reader = new XMLReader; + } + + public function unserialize($string) { + $this->reader->XML($string); + + $this->reader->read(); + if ('AST' !== $this->reader->name) { + throw new DomainException('AST root element not found'); + } + + return $this->read($this->reader->depth); + } + + protected function read($depthLimit, $throw = true, &$nodeFound = null) { + $nodeFound = true; + while ($this->reader->read() && $depthLimit < $this->reader->depth) { + if (XMLReader::ELEMENT !== $this->reader->nodeType) { + continue; + } + + if ('node' === $this->reader->prefix) { + return $this->readNode(); + } elseif ('scalar' === $this->reader->prefix) { + return $this->readScalar(); + } elseif ('comment' === $this->reader->name) { + return $this->readComment(); + } else { + throw new DomainException(sprintf('Unexpected node of type "%s"', $this->reader->name)); + } + } + + $nodeFound = false; + if ($throw) { + throw new DomainException('Expected node or scalar'); + } + } + + protected function readNode() { + $className = $this->getClassNameFromType($this->reader->localName); + + // create the node without calling it's constructor + $node = unserialize( + sprintf( + "O:%d:\"%s\":1:{s:13:\"\0*\0attributes\";a:0:{}}", + strlen($className), $className + ) + ); + + $depthLimit = $this->reader->depth; + while ($this->reader->read() && $depthLimit < $this->reader->depth) { + if (XMLReader::ELEMENT !== $this->reader->nodeType) { + continue; + } + + $type = $this->reader->prefix; + if ('subNode' !== $type && 'attribute' !== $type) { + throw new DomainException( + sprintf('Expected sub node or attribute, got node of type "%s"', $this->reader->name) + ); + } + + $name = $this->reader->localName; + $value = $this->read($this->reader->depth); + + if ('subNode' === $type) { + $node->$name = $value; + } else { + $node->setAttribute($name, $value); + } + } + + return $node; + } + + protected function readScalar() { + switch ($name = $this->reader->localName) { + case 'array': + $depth = $this->reader->depth; + $array = array(); + while (true) { + $node = $this->read($depth, false, $nodeFound); + if (!$nodeFound) { + break; + } + $array[] = $node; + } + return $array; + case 'string': + return $this->reader->readString(); + case 'int': + return $this->parseInt($this->reader->readString()); + case 'float': + $text = $this->reader->readString(); + if (false === $float = filter_var($text, FILTER_VALIDATE_FLOAT)) { + throw new DomainException(sprintf('"%s" is not a valid float', $text)); + } + return $float; + case 'true': + case 'false': + case 'null': + if (!$this->reader->isEmptyElement) { + throw new DomainException(sprintf('"%s" scalar must be empty', $name)); + } + return constant($name); + default: + throw new DomainException(sprintf('Unknown scalar type "%s"', $name)); + } + } + + private function parseInt($text) { + if (false === $int = filter_var($text, FILTER_VALIDATE_INT)) { + throw new DomainException(sprintf('"%s" is not a valid integer', $text)); + } + return $int; + } + + protected function readComment() { + $className = $this->reader->getAttribute('isDocComment') === 'true' + ? 'PhpParser\Comment\Doc' + : 'PhpParser\Comment' + ; + return new $className( + $this->reader->readString(), + $this->parseInt($this->reader->getAttribute('line')) + ); + } + + protected function getClassNameFromType($type) { + $className = 'PhpParser\\Node\\' . strtr($type, '_', '\\'); + if (!class_exists($className)) { + $className .= '_'; + } + if (!class_exists($className)) { + throw new DomainException(sprintf('Unknown node type "%s"', $type)); + } + return $className; + } +} diff --git a/vendor/nikic/php-parser/lib/bootstrap.php b/vendor/nikic/php-parser/lib/bootstrap.php new file mode 100644 index 0000000..b0f5178 --- /dev/null +++ b/vendor/nikic/php-parser/lib/bootstrap.php @@ -0,0 +1,6 @@ + + + + + + ./test/ + + + + + + ./lib/PhpParser/ + + + diff --git a/vendor/nikic/php-parser/test/PhpParser/AutoloaderTest.php b/vendor/nikic/php-parser/test/PhpParser/AutoloaderTest.php new file mode 100644 index 0000000..8eeded8 --- /dev/null +++ b/vendor/nikic/php-parser/test/PhpParser/AutoloaderTest.php @@ -0,0 +1,15 @@ +assertTrue(class_exists('PhpParser\NodeVisitorAbstract')); + $this->assertFalse(class_exists('PHPParser_NodeVisitor_NameResolver')); + + $this->assertFalse(class_exists('PhpParser\FooBar')); + $this->assertFalse(class_exists('PHPParser_FooBar')); + } +} diff --git a/vendor/nikic/php-parser/test/PhpParser/Builder/ClassTest.php b/vendor/nikic/php-parser/test/PhpParser/Builder/ClassTest.php new file mode 100644 index 0000000..0f74182 --- /dev/null +++ b/vendor/nikic/php-parser/test/PhpParser/Builder/ClassTest.php @@ -0,0 +1,161 @@ +createClassBuilder('SomeLogger') + ->extend('BaseLogger') + ->implement('Namespaced\Logger', new Name('SomeInterface')) + ->implement('\Fully\Qualified', 'namespace\NamespaceRelative') + ->getNode() + ; + + $this->assertEquals( + new Stmt\Class_('SomeLogger', array( + 'extends' => new Name('BaseLogger'), + 'implements' => array( + new Name('Namespaced\Logger'), + new Name('SomeInterface'), + new Name\FullyQualified('Fully\Qualified'), + new Name\Relative('NamespaceRelative'), + ), + )), + $node + ); + } + + public function testAbstract() { + $node = $this->createClassBuilder('Test') + ->makeAbstract() + ->getNode() + ; + + $this->assertEquals( + new Stmt\Class_('Test', array( + 'flags' => Stmt\Class_::MODIFIER_ABSTRACT + )), + $node + ); + } + + public function testFinal() { + $node = $this->createClassBuilder('Test') + ->makeFinal() + ->getNode() + ; + + $this->assertEquals( + new Stmt\Class_('Test', array( + 'flags' => Stmt\Class_::MODIFIER_FINAL + )), + $node + ); + } + + public function testStatementOrder() { + $method = new Stmt\ClassMethod('testMethod'); + $property = new Stmt\Property( + Stmt\Class_::MODIFIER_PUBLIC, + array(new Stmt\PropertyProperty('testProperty')) + ); + $const = new Stmt\ClassConst(array( + new Node\Const_('TEST_CONST', new Node\Scalar\String_('ABC')) + )); + $use = new Stmt\TraitUse(array(new Name('SomeTrait'))); + + $node = $this->createClassBuilder('Test') + ->addStmt($method) + ->addStmt($property) + ->addStmts(array($const, $use)) + ->getNode() + ; + + $this->assertEquals( + new Stmt\Class_('Test', array( + 'stmts' => array($use, $const, $property, $method) + )), + $node + ); + } + + public function testDocComment() { + $docComment = <<<'DOC' +/** + * Test + */ +DOC; + $class = $this->createClassBuilder('Test') + ->setDocComment($docComment) + ->getNode(); + + $this->assertEquals( + new Stmt\Class_('Test', array(), array( + 'comments' => array( + new Comment\Doc($docComment) + ) + )), + $class + ); + + $class = $this->createClassBuilder('Test') + ->setDocComment(new Comment\Doc($docComment)) + ->getNode(); + + $this->assertEquals( + new Stmt\Class_('Test', array(), array( + 'comments' => array( + new Comment\Doc($docComment) + ) + )), + $class + ); + } + + /** + * @expectedException \LogicException + * @expectedExceptionMessage Unexpected node of type "Stmt_Echo" + */ + public function testInvalidStmtError() { + $this->createClassBuilder('Test') + ->addStmt(new Stmt\Echo_(array())) + ; + } + + /** + * @expectedException \LogicException + * @expectedExceptionMessage Doc comment must be a string or an instance of PhpParser\Comment\Doc + */ + public function testInvalidDocComment() { + $this->createClassBuilder('Test') + ->setDocComment(new Comment('Test')); + } + + /** + * @expectedException \LogicException + * @expectedExceptionMessage Name cannot be empty + */ + public function testEmptyName() { + $this->createClassBuilder('Test') + ->extend(''); + } + + /** + * @expectedException \LogicException + * @expectedExceptionMessage Name must be a string or an instance of PhpParser\Node\Name + */ + public function testInvalidName() { + $this->createClassBuilder('Test') + ->extend(array('Foo')); + } +} diff --git a/vendor/nikic/php-parser/test/PhpParser/Builder/FunctionTest.php b/vendor/nikic/php-parser/test/PhpParser/Builder/FunctionTest.php new file mode 100644 index 0000000..f6a9381 --- /dev/null +++ b/vendor/nikic/php-parser/test/PhpParser/Builder/FunctionTest.php @@ -0,0 +1,106 @@ +createFunctionBuilder('test') + ->makeReturnByRef() + ->getNode() + ; + + $this->assertEquals( + new Stmt\Function_('test', array( + 'byRef' => true + )), + $node + ); + } + + public function testParams() { + $param1 = new Node\Param('test1'); + $param2 = new Node\Param('test2'); + $param3 = new Node\Param('test3'); + + $node = $this->createFunctionBuilder('test') + ->addParam($param1) + ->addParams(array($param2, $param3)) + ->getNode() + ; + + $this->assertEquals( + new Stmt\Function_('test', array( + 'params' => array($param1, $param2, $param3) + )), + $node + ); + } + + public function testStmts() { + $stmt1 = new Print_(new String_('test1')); + $stmt2 = new Print_(new String_('test2')); + $stmt3 = new Print_(new String_('test3')); + + $node = $this->createFunctionBuilder('test') + ->addStmt($stmt1) + ->addStmts(array($stmt2, $stmt3)) + ->getNode() + ; + + $this->assertEquals( + new Stmt\Function_('test', array( + 'stmts' => array($stmt1, $stmt2, $stmt3) + )), + $node + ); + } + + public function testDocComment() { + $node = $this->createFunctionBuilder('test') + ->setDocComment('/** Test */') + ->getNode(); + + $this->assertEquals(new Stmt\Function_('test', array(), array( + 'comments' => array(new Comment\Doc('/** Test */')) + )), $node); + } + + public function testReturnType() { + $node = $this->createFunctionBuilder('test') + ->setReturnType('void') + ->getNode(); + + $this->assertEquals(new Stmt\Function_('test', array( + 'returnType' => 'void' + ), array()), $node); + } + + /** + * @expectedException \LogicException + * @expectedExceptionMessage void type cannot be nullable + */ + public function testInvalidNullableVoidType() { + $this->createFunctionBuilder('test')->setReturnType('?void'); + } + + /** + * @expectedException \LogicException + * @expectedExceptionMessage Expected parameter node, got "Name" + */ + public function testInvalidParamError() { + $this->createFunctionBuilder('test') + ->addParam(new Node\Name('foo')) + ; + } +} diff --git a/vendor/nikic/php-parser/test/PhpParser/Builder/InterfaceTest.php b/vendor/nikic/php-parser/test/PhpParser/Builder/InterfaceTest.php new file mode 100644 index 0000000..72c5866 --- /dev/null +++ b/vendor/nikic/php-parser/test/PhpParser/Builder/InterfaceTest.php @@ -0,0 +1,105 @@ +builder = new Interface_('Contract'); + } + + private function dump($node) { + $pp = new \PhpParser\PrettyPrinter\Standard; + return $pp->prettyPrint(array($node)); + } + + public function testEmpty() { + $contract = $this->builder->getNode(); + $this->assertInstanceOf('PhpParser\Node\Stmt\Interface_', $contract); + $this->assertSame('Contract', $contract->name); + } + + public function testExtending() { + $contract = $this->builder->extend('Space\Root1', 'Root2')->getNode(); + $this->assertEquals( + new Stmt\Interface_('Contract', array( + 'extends' => array( + new Node\Name('Space\Root1'), + new Node\Name('Root2') + ), + )), $contract + ); + } + + public function testAddMethod() { + $method = new Stmt\ClassMethod('doSomething'); + $contract = $this->builder->addStmt($method)->getNode(); + $this->assertSame(array($method), $contract->stmts); + } + + public function testAddConst() { + $const = new Stmt\ClassConst(array( + new Node\Const_('SPEED_OF_LIGHT', new DNumber(299792458.0)) + )); + $contract = $this->builder->addStmt($const)->getNode(); + $this->assertSame(299792458.0, $contract->stmts[0]->consts[0]->value->value); + } + + public function testOrder() { + $const = new Stmt\ClassConst(array( + new Node\Const_('SPEED_OF_LIGHT', new DNumber(299792458)) + )); + $method = new Stmt\ClassMethod('doSomething'); + $contract = $this->builder + ->addStmt($method) + ->addStmt($const) + ->getNode() + ; + + $this->assertInstanceOf('PhpParser\Node\Stmt\ClassConst', $contract->stmts[0]); + $this->assertInstanceOf('PhpParser\Node\Stmt\ClassMethod', $contract->stmts[1]); + } + + public function testDocComment() { + $node = $this->builder + ->setDocComment('/** Test */') + ->getNode(); + + $this->assertEquals(new Stmt\Interface_('Contract', array(), array( + 'comments' => array(new Comment\Doc('/** Test */')) + )), $node); + } + + /** + * @expectedException \LogicException + * @expectedExceptionMessage Unexpected node of type "Stmt_PropertyProperty" + */ + public function testInvalidStmtError() { + $this->builder->addStmt(new Stmt\PropertyProperty('invalid')); + } + + public function testFullFunctional() { + $const = new Stmt\ClassConst(array( + new Node\Const_('SPEED_OF_LIGHT', new DNumber(299792458)) + )); + $method = new Stmt\ClassMethod('doSomething'); + $contract = $this->builder + ->addStmt($method) + ->addStmt($const) + ->getNode() + ; + + eval($this->dump($contract)); + + $this->assertTrue(interface_exists('Contract', false)); + } +} + diff --git a/vendor/nikic/php-parser/test/PhpParser/Builder/MethodTest.php b/vendor/nikic/php-parser/test/PhpParser/Builder/MethodTest.php new file mode 100644 index 0000000..21c5617 --- /dev/null +++ b/vendor/nikic/php-parser/test/PhpParser/Builder/MethodTest.php @@ -0,0 +1,163 @@ +createMethodBuilder('test') + ->makePublic() + ->makeAbstract() + ->makeStatic() + ->getNode() + ; + + $this->assertEquals( + new Stmt\ClassMethod('test', array( + 'flags' => Stmt\Class_::MODIFIER_PUBLIC + | Stmt\Class_::MODIFIER_ABSTRACT + | Stmt\Class_::MODIFIER_STATIC, + 'stmts' => null, + )), + $node + ); + + $node = $this->createMethodBuilder('test') + ->makeProtected() + ->makeFinal() + ->getNode() + ; + + $this->assertEquals( + new Stmt\ClassMethod('test', array( + 'flags' => Stmt\Class_::MODIFIER_PROTECTED + | Stmt\Class_::MODIFIER_FINAL + )), + $node + ); + + $node = $this->createMethodBuilder('test') + ->makePrivate() + ->getNode() + ; + + $this->assertEquals( + new Stmt\ClassMethod('test', array( + 'type' => Stmt\Class_::MODIFIER_PRIVATE + )), + $node + ); + } + + public function testReturnByRef() { + $node = $this->createMethodBuilder('test') + ->makeReturnByRef() + ->getNode() + ; + + $this->assertEquals( + new Stmt\ClassMethod('test', array( + 'byRef' => true + )), + $node + ); + } + + public function testParams() { + $param1 = new Node\Param('test1'); + $param2 = new Node\Param('test2'); + $param3 = new Node\Param('test3'); + + $node = $this->createMethodBuilder('test') + ->addParam($param1) + ->addParams(array($param2, $param3)) + ->getNode() + ; + + $this->assertEquals( + new Stmt\ClassMethod('test', array( + 'params' => array($param1, $param2, $param3) + )), + $node + ); + } + + public function testStmts() { + $stmt1 = new Print_(new String_('test1')); + $stmt2 = new Print_(new String_('test2')); + $stmt3 = new Print_(new String_('test3')); + + $node = $this->createMethodBuilder('test') + ->addStmt($stmt1) + ->addStmts(array($stmt2, $stmt3)) + ->getNode() + ; + + $this->assertEquals( + new Stmt\ClassMethod('test', array( + 'stmts' => array($stmt1, $stmt2, $stmt3) + )), + $node + ); + } + public function testDocComment() { + $node = $this->createMethodBuilder('test') + ->setDocComment('/** Test */') + ->getNode(); + + $this->assertEquals(new Stmt\ClassMethod('test', array(), array( + 'comments' => array(new Comment\Doc('/** Test */')) + )), $node); + } + + public function testReturnType() { + $node = $this->createMethodBuilder('test') + ->setReturnType('bool') + ->getNode(); + $this->assertEquals(new Stmt\ClassMethod('test', array( + 'returnType' => 'bool' + ), array()), $node); + } + + /** + * @expectedException \LogicException + * @expectedExceptionMessage Cannot add statements to an abstract method + */ + public function testAddStmtToAbstractMethodError() { + $this->createMethodBuilder('test') + ->makeAbstract() + ->addStmt(new Print_(new String_('test'))) + ; + } + + /** + * @expectedException \LogicException + * @expectedExceptionMessage Cannot make method with statements abstract + */ + public function testMakeMethodWithStmtsAbstractError() { + $this->createMethodBuilder('test') + ->addStmt(new Print_(new String_('test'))) + ->makeAbstract() + ; + } + + /** + * @expectedException \LogicException + * @expectedExceptionMessage Expected parameter node, got "Name" + */ + public function testInvalidParamError() { + $this->createMethodBuilder('test') + ->addParam(new Node\Name('foo')) + ; + } +} diff --git a/vendor/nikic/php-parser/test/PhpParser/Builder/NamespaceTest.php b/vendor/nikic/php-parser/test/PhpParser/Builder/NamespaceTest.php new file mode 100644 index 0000000..54e8c93 --- /dev/null +++ b/vendor/nikic/php-parser/test/PhpParser/Builder/NamespaceTest.php @@ -0,0 +1,41 @@ +createNamespaceBuilder('Name\Space') + ->addStmt($stmt1) + ->addStmts(array($stmt2, $stmt3)) + ->getNode() + ; + $this->assertEquals($expected, $node); + + $node = $this->createNamespaceBuilder(new Node\Name(array('Name', 'Space'))) + ->addStmts(array($stmt1, $stmt2)) + ->addStmt($stmt3) + ->getNode() + ; + $this->assertEquals($expected, $node); + + $node = $this->createNamespaceBuilder(null)->getNode(); + $this->assertNull($node->name); + $this->assertEmpty($node->stmts); + } +} diff --git a/vendor/nikic/php-parser/test/PhpParser/Builder/ParamTest.php b/vendor/nikic/php-parser/test/PhpParser/Builder/ParamTest.php new file mode 100644 index 0000000..9b87c2f --- /dev/null +++ b/vendor/nikic/php-parser/test/PhpParser/Builder/ParamTest.php @@ -0,0 +1,158 @@ +createParamBuilder('test') + ->setDefault($value) + ->getNode() + ; + + $this->assertEquals($expectedValueNode, $node->default); + } + + public function provideTestDefaultValues() { + return array( + array( + null, + new Expr\ConstFetch(new Node\Name('null')) + ), + array( + true, + new Expr\ConstFetch(new Node\Name('true')) + ), + array( + false, + new Expr\ConstFetch(new Node\Name('false')) + ), + array( + 31415, + new Scalar\LNumber(31415) + ), + array( + 3.1415, + new Scalar\DNumber(3.1415) + ), + array( + 'Hallo World', + new Scalar\String_('Hallo World') + ), + array( + array(1, 2, 3), + new Expr\Array_(array( + new Expr\ArrayItem(new Scalar\LNumber(1)), + new Expr\ArrayItem(new Scalar\LNumber(2)), + new Expr\ArrayItem(new Scalar\LNumber(3)), + )) + ), + array( + array('foo' => 'bar', 'bar' => 'foo'), + new Expr\Array_(array( + new Expr\ArrayItem( + new Scalar\String_('bar'), + new Scalar\String_('foo') + ), + new Expr\ArrayItem( + new Scalar\String_('foo'), + new Scalar\String_('bar') + ), + )) + ), + array( + new Scalar\MagicConst\Dir, + new Scalar\MagicConst\Dir + ) + ); + } + + /** + * @dataProvider provideTestTypeHints + */ + public function testTypeHints($typeHint, $expectedType) { + $node = $this->createParamBuilder('test') + ->setTypeHint($typeHint) + ->getNode() + ; + $type = $node->type; + + /* Manually implement comparison to avoid __toString stupidity */ + if ($expectedType instanceof Node\NullableType) { + $this->assertInstanceOf(get_class($expectedType), $type); + $expectedType = $expectedType->type; + $type = $type->type; + } + + if ($expectedType instanceof Node\Name) { + $this->assertInstanceOf(get_class($expectedType), $type); + $this->assertEquals($expectedType, $type); + } else { + $this->assertSame($expectedType, $type); + } + } + + public function provideTestTypeHints() { + return array( + array('array', 'array'), + array('callable', 'callable'), + array('bool', 'bool'), + array('int', 'int'), + array('float', 'float'), + array('string', 'string'), + array('iterable', 'iterable'), + array('Array', 'array'), + array('CALLABLE', 'callable'), + array('Some\Class', new Node\Name('Some\Class')), + array('\Foo', new Node\Name\FullyQualified('Foo')), + array('self', new Node\Name('self')), + array('?array', new Node\NullableType('array')), + array('?Some\Class', new Node\NullableType(new Node\Name('Some\Class'))), + array(new Node\Name('Some\Class'), new Node\Name('Some\Class')), + array(new Node\NullableType('int'), new Node\NullableType('int')), + array( + new Node\NullableType(new Node\Name('Some\Class')), + new Node\NullableType(new Node\Name('Some\Class')) + ), + ); + } + + /** + * @expectedException \LogicException + * @expectedExceptionMessage Parameter type cannot be void + */ + public function testVoidTypeError() { + $this->createParamBuilder('test')->setTypeHint('void'); + } + + /** + * @expectedException \LogicException + * @expectedExceptionMessage Type must be a string, or an instance of Name or NullableType + */ + public function testInvalidTypeError() { + $this->createParamBuilder('test')->setTypeHint(new \stdClass); + } + + public function testByRef() { + $node = $this->createParamBuilder('test') + ->makeByRef() + ->getNode() + ; + + $this->assertEquals( + new Node\Param('test', null, null, true), + $node + ); + } +} diff --git a/vendor/nikic/php-parser/test/PhpParser/Builder/PropertyTest.php b/vendor/nikic/php-parser/test/PhpParser/Builder/PropertyTest.php new file mode 100644 index 0000000..de8f4ce --- /dev/null +++ b/vendor/nikic/php-parser/test/PhpParser/Builder/PropertyTest.php @@ -0,0 +1,147 @@ +createPropertyBuilder('test') + ->makePrivate() + ->makeStatic() + ->getNode() + ; + + $this->assertEquals( + new Stmt\Property( + Stmt\Class_::MODIFIER_PRIVATE + | Stmt\Class_::MODIFIER_STATIC, + array( + new Stmt\PropertyProperty('test') + ) + ), + $node + ); + + $node = $this->createPropertyBuilder('test') + ->makeProtected() + ->getNode() + ; + + $this->assertEquals( + new Stmt\Property( + Stmt\Class_::MODIFIER_PROTECTED, + array( + new Stmt\PropertyProperty('test') + ) + ), + $node + ); + + $node = $this->createPropertyBuilder('test') + ->makePublic() + ->getNode() + ; + + $this->assertEquals( + new Stmt\Property( + Stmt\Class_::MODIFIER_PUBLIC, + array( + new Stmt\PropertyProperty('test') + ) + ), + $node + ); + } + + public function testDocComment() { + $node = $this->createPropertyBuilder('test') + ->setDocComment('/** Test */') + ->getNode(); + + $this->assertEquals(new Stmt\Property( + Stmt\Class_::MODIFIER_PUBLIC, + array( + new Stmt\PropertyProperty('test') + ), + array( + 'comments' => array(new Comment\Doc('/** Test */')) + ) + ), $node); + } + + /** + * @dataProvider provideTestDefaultValues + */ + public function testDefaultValues($value, $expectedValueNode) { + $node = $this->createPropertyBuilder('test') + ->setDefault($value) + ->getNode() + ; + + $this->assertEquals($expectedValueNode, $node->props[0]->default); + } + + public function provideTestDefaultValues() { + return array( + array( + null, + new Expr\ConstFetch(new Name('null')) + ), + array( + true, + new Expr\ConstFetch(new Name('true')) + ), + array( + false, + new Expr\ConstFetch(new Name('false')) + ), + array( + 31415, + new Scalar\LNumber(31415) + ), + array( + 3.1415, + new Scalar\DNumber(3.1415) + ), + array( + 'Hallo World', + new Scalar\String_('Hallo World') + ), + array( + array(1, 2, 3), + new Expr\Array_(array( + new Expr\ArrayItem(new Scalar\LNumber(1)), + new Expr\ArrayItem(new Scalar\LNumber(2)), + new Expr\ArrayItem(new Scalar\LNumber(3)), + )) + ), + array( + array('foo' => 'bar', 'bar' => 'foo'), + new Expr\Array_(array( + new Expr\ArrayItem( + new Scalar\String_('bar'), + new Scalar\String_('foo') + ), + new Expr\ArrayItem( + new Scalar\String_('foo'), + new Scalar\String_('bar') + ), + )) + ), + array( + new Scalar\MagicConst\Dir, + new Scalar\MagicConst\Dir + ) + ); + } +} diff --git a/vendor/nikic/php-parser/test/PhpParser/Builder/TraitTest.php b/vendor/nikic/php-parser/test/PhpParser/Builder/TraitTest.php new file mode 100644 index 0000000..fffccb7 --- /dev/null +++ b/vendor/nikic/php-parser/test/PhpParser/Builder/TraitTest.php @@ -0,0 +1,45 @@ +createTraitBuilder('TestTrait') + ->setDocComment('/** Nice trait */') + ->addStmt($method1) + ->addStmts(array($method2, $method3)) + ->addStmt($prop) + ->getNode(); + $this->assertEquals(new Stmt\Trait_('TestTrait', array( + 'stmts' => array($prop, $method1, $method2, $method3) + ), array( + 'comments' => array( + new Comment\Doc('/** Nice trait */') + ) + )), $trait); + } + + /** + * @expectedException \LogicException + * @expectedExceptionMessage Unexpected node of type "Stmt_Echo" + */ + public function testInvalidStmtError() { + $this->createTraitBuilder('Test') + ->addStmt(new Stmt\Echo_(array())) + ; + } +} diff --git a/vendor/nikic/php-parser/test/PhpParser/Builder/UseTest.php b/vendor/nikic/php-parser/test/PhpParser/Builder/UseTest.php new file mode 100644 index 0000000..adaeb3a --- /dev/null +++ b/vendor/nikic/php-parser/test/PhpParser/Builder/UseTest.php @@ -0,0 +1,35 @@ +createUseBuilder('Foo\Bar')->getNode(); + $this->assertEquals(new Stmt\Use_(array( + new Stmt\UseUse(new Name('Foo\Bar'), 'Bar') + )), $node); + + $node = $this->createUseBuilder(new Name('Foo\Bar'))->as('XYZ')->getNode(); + $this->assertEquals(new Stmt\Use_(array( + new Stmt\UseUse(new Name('Foo\Bar'), 'XYZ') + )), $node); + + $node = $this->createUseBuilder('foo\bar', Stmt\Use_::TYPE_FUNCTION)->as('foo')->getNode(); + $this->assertEquals(new Stmt\Use_(array( + new Stmt\UseUse(new Name('foo\bar'), 'foo') + ), Stmt\Use_::TYPE_FUNCTION), $node); + } + + public function testNonExistingMethod() { + $this->setExpectedException('LogicException', 'Method "foo" does not exist'); + $builder = $this->createUseBuilder('Test'); + $builder->foo(); + } +} diff --git a/vendor/nikic/php-parser/test/PhpParser/BuilderFactoryTest.php b/vendor/nikic/php-parser/test/PhpParser/BuilderFactoryTest.php new file mode 100644 index 0000000..1c3ef18 --- /dev/null +++ b/vendor/nikic/php-parser/test/PhpParser/BuilderFactoryTest.php @@ -0,0 +1,108 @@ +assertInstanceOf($className, $factory->$methodName('test')); + } + + public function provideTestFactory() { + return array( + array('namespace', 'PhpParser\Builder\Namespace_'), + array('class', 'PhpParser\Builder\Class_'), + array('interface', 'PhpParser\Builder\Interface_'), + array('trait', 'PhpParser\Builder\Trait_'), + array('method', 'PhpParser\Builder\Method'), + array('function', 'PhpParser\Builder\Function_'), + array('property', 'PhpParser\Builder\Property'), + array('param', 'PhpParser\Builder\Param'), + array('use', 'PhpParser\Builder\Use_'), + ); + } + + public function testNonExistingMethod() { + $this->setExpectedException('LogicException', 'Method "foo" does not exist'); + $factory = new BuilderFactory(); + $factory->foo(); + } + + public function testIntegration() { + $factory = new BuilderFactory; + $node = $factory->namespace('Name\Space') + ->addStmt($factory->use('Foo\Bar\SomeOtherClass')) + ->addStmt($factory->use('Foo\Bar')->as('A')) + ->addStmt($factory + ->class('SomeClass') + ->extend('SomeOtherClass') + ->implement('A\Few', '\Interfaces') + ->makeAbstract() + + ->addStmt($factory->method('firstMethod')) + + ->addStmt($factory->method('someMethod') + ->makePublic() + ->makeAbstract() + ->addParam($factory->param('someParam')->setTypeHint('SomeClass')) + ->setDocComment('/** + * This method does something. + * + * @param SomeClass And takes a parameter + */')) + + ->addStmt($factory->method('anotherMethod') + ->makeProtected() + ->addParam($factory->param('someParam')->setDefault('test')) + ->addStmt(new Expr\Print_(new Expr\Variable('someParam')))) + + ->addStmt($factory->property('someProperty')->makeProtected()) + ->addStmt($factory->property('anotherProperty') + ->makePrivate() + ->setDefault(array(1, 2, 3)))) + ->getNode() + ; + + $expected = <<<'EOC' +prettyPrintFile($stmts); + + $this->assertEquals( + str_replace("\r\n", "\n", $expected), + str_replace("\r\n", "\n", $generated) + ); + } +} diff --git a/vendor/nikic/php-parser/test/PhpParser/CodeParsingTest.php b/vendor/nikic/php-parser/test/PhpParser/CodeParsingTest.php new file mode 100644 index 0000000..1a4a9ad --- /dev/null +++ b/vendor/nikic/php-parser/test/PhpParser/CodeParsingTest.php @@ -0,0 +1,70 @@ + array( + 'startLine', 'endLine', 'startFilePos', 'endFilePos', 'comments' + ))); + $parser5 = new Parser\Php5($lexer); + $parser7 = new Parser\Php7($lexer); + + $dumpPositions = isset($modes['positions']); + $output5 = $this->getParseOutput($parser5, $code, $dumpPositions); + $output7 = $this->getParseOutput($parser7, $code, $dumpPositions); + + if (isset($modes['php5'])) { + $this->assertSame($expected, $output5, $name); + $this->assertNotSame($expected, $output7, $name); + } else if (isset($modes['php7'])) { + $this->assertNotSame($expected, $output5, $name); + $this->assertSame($expected, $output7, $name); + } else { + $this->assertSame($expected, $output5, $name); + $this->assertSame($expected, $output7, $name); + } + } + + private function getParseOutput(Parser $parser, $code, $dumpPositions) { + $errors = new ErrorHandler\Collecting; + $stmts = $parser->parse($code, $errors); + + $output = ''; + foreach ($errors->getErrors() as $error) { + $output .= $this->formatErrorMessage($error, $code) . "\n"; + } + + if (null !== $stmts) { + $dumper = new NodeDumper(['dumpComments' => true, 'dumpPositions' => $dumpPositions]); + $output .= $dumper->dump($stmts, $code); + } + + return canonicalize($output); + } + + public function provideTestParse() { + return $this->getTests(__DIR__ . '/../code/parser', 'test'); + } + + private function formatErrorMessage(Error $e, $code) { + if ($e->hasColumnInfo()) { + return $e->getMessageWithColumnInfo($code); + } else { + return $e->getMessage(); + } + } +} diff --git a/vendor/nikic/php-parser/test/PhpParser/CodeTestAbstract.php b/vendor/nikic/php-parser/test/PhpParser/CodeTestAbstract.php new file mode 100644 index 0000000..369ee41 --- /dev/null +++ b/vendor/nikic/php-parser/test/PhpParser/CodeTestAbstract.php @@ -0,0 +1,61 @@ +getPathname(); + $fileContents = file_get_contents($fileName); + $fileContents = canonicalize($fileContents); + + // evaluate @@{expr}@@ expressions + $fileContents = preg_replace_callback( + '/@@\{(.*?)\}@@/', + function($matches) { + return eval('return ' . $matches[1] . ';'); + }, + $fileContents + ); + + // parse sections + $parts = preg_split("/\n-----(?:\n|$)/", $fileContents); + + // first part is the name + $name = array_shift($parts) . ' (' . $fileName . ')'; + $shortName = ltrim(str_replace($directory, '', $fileName), '/\\'); + + // multiple sections possible with always two forming a pair + $chunks = array_chunk($parts, 2); + foreach ($chunks as $i => $chunk) { + $dataSetName = $shortName . (count($chunks) > 1 ? '#' . $i : ''); + list($expected, $mode) = $this->extractMode($chunk[1]); + $tests[$dataSetName] = array($name, $chunk[0], $expected, $mode); + } + } + + return $tests; + } + + private function extractMode($expected) { + $firstNewLine = strpos($expected, "\n"); + if (false === $firstNewLine) { + $firstNewLine = strlen($expected); + } + + $firstLine = substr($expected, 0, $firstNewLine); + if (0 !== strpos($firstLine, '!!')) { + return [$expected, null]; + } + + $expected = (string) substr($expected, $firstNewLine + 1); + return [$expected, substr($firstLine, 2)]; + } +} diff --git a/vendor/nikic/php-parser/test/PhpParser/CommentTest.php b/vendor/nikic/php-parser/test/PhpParser/CommentTest.php new file mode 100644 index 0000000..081dd57 --- /dev/null +++ b/vendor/nikic/php-parser/test/PhpParser/CommentTest.php @@ -0,0 +1,73 @@ +assertSame('/* Some comment */', $comment->getText()); + $this->assertSame('/* Some comment */', (string) $comment); + $this->assertSame(1, $comment->getLine()); + $this->assertSame(10, $comment->getFilePos()); + } + + /** + * @dataProvider provideTestReformatting + */ + public function testReformatting($commentText, $reformattedText) { + $comment = new Comment($commentText); + $this->assertSame($reformattedText, $comment->getReformattedText()); + } + + public function provideTestReformatting() { + return array( + array('// Some text' . "\n", '// Some text'), + array('/* Some text */', '/* Some text */'), + array( + '/** + * Some text. + * Some more text. + */', + '/** + * Some text. + * Some more text. + */' + ), + array( + '/* + Some text. + Some more text. + */', + '/* + Some text. + Some more text. +*/' + ), + array( + '/* Some text. + More text. + Even more text. */', + '/* Some text. + More text. + Even more text. */' + ), + array( + '/* Some text. + More text. + Indented text. */', + '/* Some text. + More text. + Indented text. */', + ), + // invalid comment -> no reformatting + array( + 'hallo + world', + 'hallo + world', + ), + ); + } +} \ No newline at end of file diff --git a/vendor/nikic/php-parser/test/PhpParser/ErrorHandler/CollectingTest.php b/vendor/nikic/php-parser/test/PhpParser/ErrorHandler/CollectingTest.php new file mode 100644 index 0000000..3742981 --- /dev/null +++ b/vendor/nikic/php-parser/test/PhpParser/ErrorHandler/CollectingTest.php @@ -0,0 +1,22 @@ +assertFalse($errorHandler->hasErrors()); + $this->assertEmpty($errorHandler->getErrors()); + + $errorHandler->handleError($e1 = new Error('Test 1')); + $errorHandler->handleError($e2 = new Error('Test 2')); + $this->assertTrue($errorHandler->hasErrors()); + $this->assertSame([$e1, $e2], $errorHandler->getErrors()); + + $errorHandler->clearErrors(); + $this->assertFalse($errorHandler->hasErrors()); + $this->assertEmpty($errorHandler->getErrors()); + } +} \ No newline at end of file diff --git a/vendor/nikic/php-parser/test/PhpParser/ErrorHandler/ThrowingTest.php b/vendor/nikic/php-parser/test/PhpParser/ErrorHandler/ThrowingTest.php new file mode 100644 index 0000000..d7df7c2 --- /dev/null +++ b/vendor/nikic/php-parser/test/PhpParser/ErrorHandler/ThrowingTest.php @@ -0,0 +1,16 @@ +handleError(new Error('Test')); + } +} \ No newline at end of file diff --git a/vendor/nikic/php-parser/test/PhpParser/ErrorTest.php b/vendor/nikic/php-parser/test/PhpParser/ErrorTest.php new file mode 100644 index 0000000..59e880c --- /dev/null +++ b/vendor/nikic/php-parser/test/PhpParser/ErrorTest.php @@ -0,0 +1,106 @@ + 10, + 'endLine' => 11, + ); + $error = new Error('Some error', $attributes); + + $this->assertSame('Some error', $error->getRawMessage()); + $this->assertSame($attributes, $error->getAttributes()); + $this->assertSame(10, $error->getStartLine()); + $this->assertSame(11, $error->getEndLine()); + $this->assertSame('Some error on line 10', $error->getMessage()); + + return $error; + } + + /** + * @depends testConstruct + */ + public function testSetMessageAndLine(Error $error) { + $error->setRawMessage('Some other error'); + $this->assertSame('Some other error', $error->getRawMessage()); + + $error->setStartLine(15); + $this->assertSame(15, $error->getStartLine()); + $this->assertSame('Some other error on line 15', $error->getMessage()); + } + + public function testUnknownLine() { + $error = new Error('Some error'); + + $this->assertSame(-1, $error->getStartLine()); + $this->assertSame(-1, $error->getEndLine()); + $this->assertSame('Some error on unknown line', $error->getMessage()); + } + + /** @dataProvider provideTestColumnInfo */ + public function testColumnInfo($code, $startPos, $endPos, $startColumn, $endColumn) { + $error = new Error('Some error', array( + 'startFilePos' => $startPos, + 'endFilePos' => $endPos, + )); + + $this->assertSame(true, $error->hasColumnInfo()); + $this->assertSame($startColumn, $error->getStartColumn($code)); + $this->assertSame($endColumn, $error->getEndColumn($code)); + + } + + public function provideTestColumnInfo() { + return array( + // Error at "bar" + array("assertSame(false, $error->hasColumnInfo()); + try { + $error->getStartColumn(''); + $this->fail('Expected RuntimeException'); + } catch (\RuntimeException $e) { + $this->assertSame('Error does not have column information', $e->getMessage()); + } + try { + $error->getEndColumn(''); + $this->fail('Expected RuntimeException'); + } catch (\RuntimeException $e) { + $this->assertSame('Error does not have column information', $e->getMessage()); + } + } + + /** + * @expectedException \RuntimeException + * @expectedExceptionMessage Invalid position information + */ + public function testInvalidPosInfo() { + $error = new Error('Some error', array( + 'startFilePos' => 10, + 'endFilePos' => 11, + )); + $error->getStartColumn('code'); + } +} diff --git a/vendor/nikic/php-parser/test/PhpParser/Lexer/EmulativeTest.php b/vendor/nikic/php-parser/test/PhpParser/Lexer/EmulativeTest.php new file mode 100644 index 0000000..f1fe618 --- /dev/null +++ b/vendor/nikic/php-parser/test/PhpParser/Lexer/EmulativeTest.php @@ -0,0 +1,133 @@ +getLexer(); + $lexer->startLexing('assertSame($expectedToken, $lexer->getNextToken()); + $this->assertSame(0, $lexer->getNextToken()); + } + + /** + * @dataProvider provideTestReplaceKeywords + */ + public function testNoReplaceKeywordsAfterObjectOperator($keyword) { + $lexer = $this->getLexer(); + $lexer->startLexing('' . $keyword); + + $this->assertSame(Tokens::T_OBJECT_OPERATOR, $lexer->getNextToken()); + $this->assertSame(Tokens::T_STRING, $lexer->getNextToken()); + $this->assertSame(0, $lexer->getNextToken()); + } + + public function provideTestReplaceKeywords() { + return array( + // PHP 5.5 + array('finally', Tokens::T_FINALLY), + array('yield', Tokens::T_YIELD), + + // PHP 5.4 + array('callable', Tokens::T_CALLABLE), + array('insteadof', Tokens::T_INSTEADOF), + array('trait', Tokens::T_TRAIT), + array('__TRAIT__', Tokens::T_TRAIT_C), + + // PHP 5.3 + array('__DIR__', Tokens::T_DIR), + array('goto', Tokens::T_GOTO), + array('namespace', Tokens::T_NAMESPACE), + array('__NAMESPACE__', Tokens::T_NS_C), + ); + } + + /** + * @dataProvider provideTestLexNewFeatures + */ + public function testLexNewFeatures($code, array $expectedTokens) { + $lexer = $this->getLexer(); + $lexer->startLexing('assertSame($expectedTokenType, $lexer->getNextToken($text)); + $this->assertSame($expectedTokenText, $text); + } + $this->assertSame(0, $lexer->getNextToken()); + } + + /** + * @dataProvider provideTestLexNewFeatures + */ + public function testLeaveStuffAloneInStrings($code) { + $stringifiedToken = '"' . addcslashes($code, '"\\') . '"'; + + $lexer = $this->getLexer(); + $lexer->startLexing('assertSame(Tokens::T_CONSTANT_ENCAPSED_STRING, $lexer->getNextToken($text)); + $this->assertSame($stringifiedToken, $text); + $this->assertSame(0, $lexer->getNextToken()); + } + + public function provideTestLexNewFeatures() { + return array( + array('yield from', array( + array(Tokens::T_YIELD_FROM, 'yield from'), + )), + array("yield\r\nfrom", array( + array(Tokens::T_YIELD_FROM, "yield\r\nfrom"), + )), + array('...', array( + array(Tokens::T_ELLIPSIS, '...'), + )), + array('**', array( + array(Tokens::T_POW, '**'), + )), + array('**=', array( + array(Tokens::T_POW_EQUAL, '**='), + )), + array('??', array( + array(Tokens::T_COALESCE, '??'), + )), + array('<=>', array( + array(Tokens::T_SPACESHIP, '<=>'), + )), + array('0b1010110', array( + array(Tokens::T_LNUMBER, '0b1010110'), + )), + array('0b1011010101001010110101010010101011010101010101101011001110111100', array( + array(Tokens::T_DNUMBER, '0b1011010101001010110101010010101011010101010101101011001110111100'), + )), + array('\\', array( + array(Tokens::T_NS_SEPARATOR, '\\'), + )), + array("<<<'NOWDOC'\nNOWDOC;\n", array( + array(Tokens::T_START_HEREDOC, "<<<'NOWDOC'\n"), + array(Tokens::T_END_HEREDOC, 'NOWDOC'), + array(ord(';'), ';'), + )), + array("<<<'NOWDOC'\nFoobar\nNOWDOC;\n", array( + array(Tokens::T_START_HEREDOC, "<<<'NOWDOC'\n"), + array(Tokens::T_ENCAPSED_AND_WHITESPACE, "Foobar\n"), + array(Tokens::T_END_HEREDOC, 'NOWDOC'), + array(ord(';'), ';'), + )), + ); + } +} diff --git a/vendor/nikic/php-parser/test/PhpParser/LexerTest.php b/vendor/nikic/php-parser/test/PhpParser/LexerTest.php new file mode 100644 index 0000000..d2f570e --- /dev/null +++ b/vendor/nikic/php-parser/test/PhpParser/LexerTest.php @@ -0,0 +1,259 @@ +markTestSkipped('HHVM does not throw warnings from token_get_all()'); + } + + $errorHandler = new ErrorHandler\Collecting(); + $lexer = $this->getLexer(['usedAttributes' => [ + 'comments', 'startLine', 'endLine', 'startFilePos', 'endFilePos' + ]]); + $lexer->startLexing($code, $errorHandler); + $errors = $errorHandler->getErrors(); + + $this->assertSame(count($messages), count($errors)); + for ($i = 0; $i < count($messages); $i++) { + $this->assertSame($messages[$i], $errors[$i]->getMessageWithColumnInfo($code)); + } + } + + public function provideTestError() { + return array( + array("getLexer($options); + $lexer->startLexing($code); + while ($id = $lexer->getNextToken($value, $startAttributes, $endAttributes)) { + $token = array_shift($tokens); + + $this->assertSame($token[0], $id); + $this->assertSame($token[1], $value); + $this->assertEquals($token[2], $startAttributes); + $this->assertEquals($token[3], $endAttributes); + } + } + + public function provideTestLex() { + return array( + // tests conversion of closing PHP tag and drop of whitespace and opening tags + array( + 'plaintext', + array(), + array( + array( + Tokens::T_STRING, 'tokens', + array('startLine' => 1), array('endLine' => 1) + ), + array( + ord(';'), '?>', + array('startLine' => 1), array('endLine' => 1) + ), + array( + Tokens::T_INLINE_HTML, 'plaintext', + array('startLine' => 1, 'hasLeadingNewline' => false), + array('endLine' => 1) + ), + ) + ), + // tests line numbers + array( + ' 2), array('endLine' => 2) + ), + array( + Tokens::T_STRING, 'token', + array('startLine' => 2), array('endLine' => 2) + ), + array( + ord('$'), '$', + array( + 'startLine' => 3, + 'comments' => array( + new Comment\Doc('/** doc' . "\n" . 'comment */', 2, 14), + ) + ), + array('endLine' => 3) + ), + ) + ), + // tests comment extraction + array( + ' 2, + 'comments' => array( + new Comment('/* comment */', 1, 6), + new Comment('// comment' . "\n", 1, 20), + new Comment\Doc('/** docComment 1 */', 2, 31), + new Comment\Doc('/** docComment 2 */', 2, 50), + ), + ), + array('endLine' => 2) + ), + ) + ), + // tests differing start and end line + array( + ' 1), array('endLine' => 2) + ), + ) + ), + // tests exact file offsets + array( + ' array('startFilePos', 'endFilePos')), + array( + array( + Tokens::T_CONSTANT_ENCAPSED_STRING, '"a"', + array('startFilePos' => 6), array('endFilePos' => 8) + ), + array( + ord(';'), ';', + array('startFilePos' => 9), array('endFilePos' => 9) + ), + array( + Tokens::T_CONSTANT_ENCAPSED_STRING, '"b"', + array('startFilePos' => 18), array('endFilePos' => 20) + ), + array( + ord(';'), ';', + array('startFilePos' => 21), array('endFilePos' => 21) + ), + ) + ), + // tests token offsets + array( + ' array('startTokenPos', 'endTokenPos')), + array( + array( + Tokens::T_CONSTANT_ENCAPSED_STRING, '"a"', + array('startTokenPos' => 1), array('endTokenPos' => 1) + ), + array( + ord(';'), ';', + array('startTokenPos' => 2), array('endTokenPos' => 2) + ), + array( + Tokens::T_CONSTANT_ENCAPSED_STRING, '"b"', + array('startTokenPos' => 5), array('endTokenPos' => 5) + ), + array( + ord(';'), ';', + array('startTokenPos' => 6), array('endTokenPos' => 6) + ), + ) + ), + // tests all attributes being disabled + array( + ' array()), + array( + array( + Tokens::T_VARIABLE, '$bar', + array(), array() + ), + array( + ord(';'), ';', + array(), array() + ) + ) + ) + ); + } + + /** + * @dataProvider provideTestHaltCompiler + */ + public function testHandleHaltCompiler($code, $remaining) { + $lexer = $this->getLexer(); + $lexer->startLexing($code); + + while (Tokens::T_HALT_COMPILER !== $lexer->getNextToken()); + + $this->assertSame($remaining, $lexer->handleHaltCompiler()); + $this->assertSame(0, $lexer->getNextToken()); + } + + public function provideTestHaltCompiler() { + return array( + array('Remaining Text', 'Remaining Text'), + //array('getLexer(); + $lexer->startLexing('getNextToken()); + $lexer->handleHaltCompiler(); + } + + public function testGetTokens() { + $code = 'getLexer(); + $lexer->startLexing($code); + $this->assertSame($expectedTokens, $lexer->getTokens()); + } +} diff --git a/vendor/nikic/php-parser/test/PhpParser/Node/NameTest.php b/vendor/nikic/php-parser/test/PhpParser/Node/NameTest.php new file mode 100644 index 0000000..76a89c3 --- /dev/null +++ b/vendor/nikic/php-parser/test/PhpParser/Node/NameTest.php @@ -0,0 +1,134 @@ +assertSame(array('foo', 'bar'), $name->parts); + + $name = new Name('foo\bar'); + $this->assertSame(array('foo', 'bar'), $name->parts); + + $name = new Name($name); + $this->assertSame(array('foo', 'bar'), $name->parts); + } + + public function testGet() { + $name = new Name('foo'); + $this->assertSame('foo', $name->getFirst()); + $this->assertSame('foo', $name->getLast()); + + $name = new Name('foo\bar'); + $this->assertSame('foo', $name->getFirst()); + $this->assertSame('bar', $name->getLast()); + } + + public function testToString() { + $name = new Name('foo\bar'); + + $this->assertSame('foo\bar', (string) $name); + $this->assertSame('foo\bar', $name->toString()); + } + + public function testSlice() { + $name = new Name('foo\bar\baz'); + $this->assertEquals(new Name('foo\bar\baz'), $name->slice(0)); + $this->assertEquals(new Name('bar\baz'), $name->slice(1)); + $this->assertNull($name->slice(3)); + $this->assertEquals(new Name('foo\bar\baz'), $name->slice(-3)); + $this->assertEquals(new Name('bar\baz'), $name->slice(-2)); + $this->assertEquals(new Name('foo\bar'), $name->slice(0, -1)); + $this->assertNull($name->slice(0, -3)); + $this->assertEquals(new Name('bar'), $name->slice(1, -1)); + $this->assertNull($name->slice(1, -2)); + $this->assertEquals(new Name('bar'), $name->slice(-2, 1)); + $this->assertEquals(new Name('bar'), $name->slice(-2, -1)); + $this->assertNull($name->slice(-2, -2)); + } + + /** + * @expectedException \OutOfBoundsException + * @expectedExceptionMessage Offset 4 is out of bounds + */ + public function testSliceOffsetTooLarge() { + (new Name('foo\bar\baz'))->slice(4); + } + + /** + * @expectedException \OutOfBoundsException + * @expectedExceptionMessage Offset -4 is out of bounds + */ + public function testSliceOffsetTooSmall() { + (new Name('foo\bar\baz'))->slice(-4); + } + + /** + * @expectedException \OutOfBoundsException + * @expectedExceptionMessage Length 4 is out of bounds + */ + public function testSliceLengthTooLarge() { + (new Name('foo\bar\baz'))->slice(0, 4); + } + + /** + * @expectedException \OutOfBoundsException + * @expectedExceptionMessage Length -4 is out of bounds + */ + public function testSliceLengthTooSmall() { + (new Name('foo\bar\baz'))->slice(0, -4); + } + + public function testConcat() { + $this->assertEquals(new Name('foo\bar\baz'), Name::concat('foo', 'bar\baz')); + $this->assertEquals( + new Name\FullyQualified('foo\bar'), + Name\FullyQualified::concat(['foo'], new Name('bar')) + ); + + $attributes = ['foo' => 'bar']; + $this->assertEquals( + new Name\Relative('foo\bar\baz', $attributes), + Name\Relative::concat(new Name\FullyQualified('foo\bar'), 'baz', $attributes) + ); + + $this->assertEquals(new Name('foo'), Name::concat(null, 'foo')); + $this->assertEquals(new Name('foo'), Name::concat('foo', null)); + $this->assertNull(Name::concat(null, null)); + } + + public function testIs() { + $name = new Name('foo'); + $this->assertTrue ($name->isUnqualified()); + $this->assertFalse($name->isQualified()); + $this->assertFalse($name->isFullyQualified()); + $this->assertFalse($name->isRelative()); + + $name = new Name('foo\bar'); + $this->assertFalse($name->isUnqualified()); + $this->assertTrue ($name->isQualified()); + $this->assertFalse($name->isFullyQualified()); + $this->assertFalse($name->isRelative()); + + $name = new Name\FullyQualified('foo'); + $this->assertFalse($name->isUnqualified()); + $this->assertFalse($name->isQualified()); + $this->assertTrue ($name->isFullyQualified()); + $this->assertFalse($name->isRelative()); + + $name = new Name\Relative('foo'); + $this->assertFalse($name->isUnqualified()); + $this->assertFalse($name->isQualified()); + $this->assertFalse($name->isFullyQualified()); + $this->assertTrue ($name->isRelative()); + } + + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage Expected string, array of parts or Name instance + */ + public function testInvalidArg() { + Name::concat('foo', new \stdClass); + } +} \ No newline at end of file diff --git a/vendor/nikic/php-parser/test/PhpParser/Node/Scalar/MagicConstTest.php b/vendor/nikic/php-parser/test/PhpParser/Node/Scalar/MagicConstTest.php new file mode 100644 index 0000000..3141f56 --- /dev/null +++ b/vendor/nikic/php-parser/test/PhpParser/Node/Scalar/MagicConstTest.php @@ -0,0 +1,25 @@ +assertSame($name, $magicConst->getName()); + } + + public function provideTestGetName() { + return array( + array(new MagicConst\Class_, '__CLASS__'), + array(new MagicConst\Dir, '__DIR__'), + array(new MagicConst\File, '__FILE__'), + array(new MagicConst\Function_, '__FUNCTION__'), + array(new MagicConst\Line, '__LINE__'), + array(new MagicConst\Method, '__METHOD__'), + array(new MagicConst\Namespace_, '__NAMESPACE__'), + array(new MagicConst\Trait_, '__TRAIT__'), + ); + } +} \ No newline at end of file diff --git a/vendor/nikic/php-parser/test/PhpParser/Node/Scalar/StringTest.php b/vendor/nikic/php-parser/test/PhpParser/Node/Scalar/StringTest.php new file mode 100644 index 0000000..be39035 --- /dev/null +++ b/vendor/nikic/php-parser/test/PhpParser/Node/Scalar/StringTest.php @@ -0,0 +1,61 @@ +assertSame( + $expected, + String_::parseEscapeSequences($string, $quote) + ); + } + + /** + * @dataProvider provideTestParse + */ + public function testCreate($expected, $string) { + $this->assertSame( + $expected, + String_::parse($string) + ); + } + + public function provideTestParseEscapeSequences() { + return array( + array('"', '\\"', '"'), + array('\\"', '\\"', '`'), + array('\\"\\`', '\\"\\`', null), + array("\\\$\n\r\t\f\v", '\\\\\$\n\r\t\f\v', null), + array("\x1B", '\e', null), + array(chr(255), '\xFF', null), + array(chr(255), '\377', null), + array(chr(0), '\400', null), + array("\0", '\0', null), + array('\xFF', '\\\\xFF', null), + ); + } + + public function provideTestParse() { + $tests = array( + array('A', '\'A\''), + array('A', 'b\'A\''), + array('A', '"A"'), + array('A', 'b"A"'), + array('\\', '\'\\\\\''), + array('\'', '\'\\\'\''), + ); + + foreach ($this->provideTestParseEscapeSequences() as $i => $test) { + // skip second and third tests, they aren't for double quotes + if ($i != 1 && $i != 2) { + $tests[] = array($test[0], '"' . $test[1] . '"'); + } + } + + return $tests; + } +} diff --git a/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/ClassConstTest.php b/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/ClassConstTest.php new file mode 100644 index 0000000..610972c --- /dev/null +++ b/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/ClassConstTest.php @@ -0,0 +1,35 @@ +assertTrue($node->{'is' . $modifier}()); + } + + public function testNoModifiers() { + $node = new ClassConst(array(), 0); + + $this->assertTrue($node->isPublic()); + $this->assertFalse($node->isProtected()); + $this->assertFalse($node->isPrivate()); + $this->assertFalse($node->isStatic()); + } + + public function provideModifiers() { + return array( + array('public'), + array('protected'), + array('private'), + ); + } +} \ No newline at end of file diff --git a/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/ClassMethodTest.php b/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/ClassMethodTest.php new file mode 100644 index 0000000..fa8aed8 --- /dev/null +++ b/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/ClassMethodTest.php @@ -0,0 +1,63 @@ + constant('PhpParser\Node\Stmt\Class_::MODIFIER_' . strtoupper($modifier)) + )); + + $this->assertTrue($node->{'is' . $modifier}()); + } + + public function testNoModifiers() { + $node = new ClassMethod('foo', array('type' => 0)); + + $this->assertTrue($node->isPublic()); + $this->assertFalse($node->isProtected()); + $this->assertFalse($node->isPrivate()); + $this->assertFalse($node->isAbstract()); + $this->assertFalse($node->isFinal()); + $this->assertFalse($node->isStatic()); + } + + public function provideModifiers() { + return array( + array('public'), + array('protected'), + array('private'), + array('abstract'), + array('final'), + array('static'), + ); + } + + /** + * Checks that implicit public modifier detection for method is working + * + * @dataProvider implicitPublicModifiers + * + * @param integer $modifier Node type modifier + */ + public function testImplicitPublic($modifier) + { + $node = new ClassMethod('foo', array( + 'type' => constant('PhpParser\Node\Stmt\Class_::MODIFIER_' . strtoupper($modifier)) + )); + + $this->assertTrue($node->isPublic(), 'Node should be implicitly public'); + } + + public function implicitPublicModifiers() { + return array( + array('abstract'), + array('final'), + array('static'), + ); + } +} diff --git a/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/ClassTest.php b/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/ClassTest.php new file mode 100644 index 0000000..75d49e3 --- /dev/null +++ b/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/ClassTest.php @@ -0,0 +1,66 @@ + Class_::MODIFIER_ABSTRACT)); + $this->assertTrue($class->isAbstract()); + + $class = new Class_('Foo'); + $this->assertFalse($class->isAbstract()); + } + + public function testIsFinal() { + $class = new Class_('Foo', array('type' => Class_::MODIFIER_FINAL)); + $this->assertTrue($class->isFinal()); + + $class = new Class_('Foo'); + $this->assertFalse($class->isFinal()); + } + + public function testGetMethods() { + $methods = array( + new ClassMethod('foo'), + new ClassMethod('bar'), + new ClassMethod('fooBar'), + ); + $class = new Class_('Foo', array( + 'stmts' => array( + new TraitUse(array()), + $methods[0], + new ClassConst(array()), + $methods[1], + new Property(0, array()), + $methods[2], + ) + )); + + $this->assertSame($methods, $class->getMethods()); + } + + public function testGetMethod() { + $methodConstruct = new ClassMethod('__CONSTRUCT'); + $methodTest = new ClassMethod('test'); + $class = new Class_('Foo', array( + 'stmts' => array( + new ClassConst(array()), + $methodConstruct, + new Property(0, array()), + $methodTest, + ) + )); + + $this->assertSame($methodConstruct, $class->getMethod('__construct')); + $this->assertSame($methodTest, $class->getMethod('test')); + $this->assertNull($class->getMethod('nonExisting')); + } + + public function testDeprecatedTypeNode() { + $class = new Class_('Foo', array('type' => Class_::MODIFIER_ABSTRACT)); + $this->assertTrue($class->isAbstract()); + $this->assertSame(Class_::MODIFIER_ABSTRACT, $class->flags); + $this->assertSame(Class_::MODIFIER_ABSTRACT, $class->type); + } +} diff --git a/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/InterfaceTest.php b/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/InterfaceTest.php new file mode 100644 index 0000000..c499058 --- /dev/null +++ b/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/InterfaceTest.php @@ -0,0 +1,26 @@ + array( + new Node\Stmt\ClassConst(array(new Node\Const_('C1', new Node\Scalar\String_('C1')))), + $methods[0], + new Node\Stmt\ClassConst(array(new Node\Const_('C2', new Node\Scalar\String_('C2')))), + $methods[1], + new Node\Stmt\ClassConst(array(new Node\Const_('C3', new Node\Scalar\String_('C3')))), + ) + )); + + $this->assertSame($methods, $interface->getMethods()); + } +} diff --git a/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/PropertyTest.php b/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/PropertyTest.php new file mode 100644 index 0000000..bcfc0c6 --- /dev/null +++ b/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/PropertyTest.php @@ -0,0 +1,44 @@ +assertTrue($node->{'is' . $modifier}()); + } + + public function testNoModifiers() { + $node = new Property(0, array()); + + $this->assertTrue($node->isPublic()); + $this->assertFalse($node->isProtected()); + $this->assertFalse($node->isPrivate()); + $this->assertFalse($node->isStatic()); + } + + public function testStaticImplicitlyPublic() { + $node = new Property(Class_::MODIFIER_STATIC, array()); + $this->assertTrue($node->isPublic()); + $this->assertFalse($node->isProtected()); + $this->assertFalse($node->isPrivate()); + $this->assertTrue($node->isStatic()); + } + + public function provideModifiers() { + return array( + array('public'), + array('protected'), + array('private'), + array('static'), + ); + } +} diff --git a/vendor/nikic/php-parser/test/PhpParser/NodeAbstractTest.php b/vendor/nikic/php-parser/test/PhpParser/NodeAbstractTest.php new file mode 100644 index 0000000..7fd0a39 --- /dev/null +++ b/vendor/nikic/php-parser/test/PhpParser/NodeAbstractTest.php @@ -0,0 +1,274 @@ +subNode1 = $subNode1; + $this->subNode2 = $subNode2; + } + + public function getSubNodeNames() { + return array('subNode1', 'subNode2'); + } + + // This method is only overwritten because the node is located in an unusual namespace + public function getType() { + return 'Dummy'; + } +} + +class NodeAbstractTest extends \PHPUnit_Framework_TestCase +{ + public function provideNodes() { + $attributes = array( + 'startLine' => 10, + 'comments' => array( + new Comment('// Comment' . "\n"), + new Comment\Doc('/** doc comment */'), + ), + ); + + $node = new DummyNode('value1', 'value2', $attributes); + $node->notSubNode = 'value3'; + + return array( + array($attributes, $node), + ); + } + + /** + * @dataProvider provideNodes + */ + public function testConstruct(array $attributes, Node $node) { + $this->assertSame('Dummy', $node->getType()); + $this->assertSame(array('subNode1', 'subNode2'), $node->getSubNodeNames()); + $this->assertSame(10, $node->getLine()); + $this->assertSame('/** doc comment */', $node->getDocComment()->getText()); + $this->assertSame('value1', $node->subNode1); + $this->assertSame('value2', $node->subNode2); + $this->assertTrue(isset($node->subNode1)); + $this->assertTrue(isset($node->subNode2)); + $this->assertFalse(isset($node->subNode3)); + $this->assertSame($attributes, $node->getAttributes()); + + return $node; + } + + /** + * @dataProvider provideNodes + */ + public function testGetDocComment(array $attributes, Node $node) { + $this->assertSame('/** doc comment */', $node->getDocComment()->getText()); + array_pop($node->getAttribute('comments')); // remove doc comment + $this->assertNull($node->getDocComment()); + array_pop($node->getAttribute('comments')); // remove comment + $this->assertNull($node->getDocComment()); + } + + public function testSetDocComment() { + $node = new DummyNode(null, null, []); + + // Add doc comment to node without comments + $docComment = new Comment\Doc('/** doc */'); + $node->setDocComment($docComment); + $this->assertSame($docComment, $node->getDocComment()); + + // Replace it + $docComment = new Comment\Doc('/** doc 2 */'); + $node->setDocComment($docComment); + $this->assertSame($docComment, $node->getDocComment()); + + // Add docmment to node with other comments + $c1 = new Comment('/* foo */'); + $c2 = new Comment('/* bar */'); + $docComment = new Comment\Doc('/** baz */'); + $node->setAttribute('comments', [$c1, $c2]); + $node->setDocComment($docComment); + $this->assertSame([$c1, $c2, $docComment], $node->getAttribute('comments')); + } + + /** + * @dataProvider provideNodes + */ + public function testChange(array $attributes, Node $node) { + // change of line + $node->setLine(15); + $this->assertSame(15, $node->getLine()); + + // direct modification + $node->subNode = 'newValue'; + $this->assertSame('newValue', $node->subNode); + + // indirect modification + $subNode =& $node->subNode; + $subNode = 'newNewValue'; + $this->assertSame('newNewValue', $node->subNode); + + // removal + unset($node->subNode); + $this->assertFalse(isset($node->subNode)); + } + + /** + * @dataProvider provideNodes + */ + public function testIteration(array $attributes, Node $node) { + // Iteration is simple object iteration over properties, + // not over subnodes + $i = 0; + foreach ($node as $key => $value) { + if ($i === 0) { + $this->assertSame('subNode1', $key); + $this->assertSame('value1', $value); + } else if ($i === 1) { + $this->assertSame('subNode2', $key); + $this->assertSame('value2', $value); + } else if ($i === 2) { + $this->assertSame('notSubNode', $key); + $this->assertSame('value3', $value); + } else { + throw new \Exception; + } + $i++; + } + $this->assertSame(3, $i); + } + + public function testAttributes() { + /** @var $node Node */ + $node = $this->getMockForAbstractClass('PhpParser\NodeAbstract'); + + $this->assertEmpty($node->getAttributes()); + + $node->setAttribute('key', 'value'); + $this->assertTrue($node->hasAttribute('key')); + $this->assertSame('value', $node->getAttribute('key')); + + $this->assertFalse($node->hasAttribute('doesNotExist')); + $this->assertNull($node->getAttribute('doesNotExist')); + $this->assertSame('default', $node->getAttribute('doesNotExist', 'default')); + + $node->setAttribute('null', null); + $this->assertTrue($node->hasAttribute('null')); + $this->assertNull($node->getAttribute('null')); + $this->assertNull($node->getAttribute('null', 'default')); + + $this->assertSame( + array( + 'key' => 'value', + 'null' => null, + ), + $node->getAttributes() + ); + } + + public function testJsonSerialization() { + $code = <<<'PHP' +parse(canonicalize($code)); + $json = json_encode($stmts, JSON_PRETTY_PRINT); + $this->assertEquals(canonicalize($expected), canonicalize($json)); + } +} diff --git a/vendor/nikic/php-parser/test/PhpParser/NodeDumperTest.php b/vendor/nikic/php-parser/test/PhpParser/NodeDumperTest.php new file mode 100644 index 0000000..9bb65a7 --- /dev/null +++ b/vendor/nikic/php-parser/test/PhpParser/NodeDumperTest.php @@ -0,0 +1,105 @@ +assertSame($this->canonicalize($dump), $this->canonicalize($dumper->dump($node))); + } + + public function provideTestDump() { + return array( + array( + array(), +'array( +)' + ), + array( + array('Foo', 'Bar', 'Key' => 'FooBar'), +'array( + 0: Foo + 1: Bar + Key: FooBar +)' + ), + array( + new Node\Name(array('Hallo', 'World')), +'Name( + parts: array( + 0: Hallo + 1: World + ) +)' + ), + array( + new Node\Expr\Array_(array( + new Node\Expr\ArrayItem(new Node\Scalar\String_('Foo')) + )), +'Expr_Array( + items: array( + 0: Expr_ArrayItem( + key: null + value: Scalar_String( + value: Foo + ) + byRef: false + ) + ) +)' + ), + ); + } + + public function testDumpWithPositions() { + $parser = (new ParserFactory)->create( + ParserFactory::ONLY_PHP7, + new Lexer(['usedAttributes' => ['startLine', 'endLine', 'startFilePos', 'endFilePos']]) + ); + $dumper = new NodeDumper(['dumpPositions' => true]); + + $code = "parse($code); + $dump = $dumper->dump($stmts, $code); + + $this->assertSame($this->canonicalize($expected), $this->canonicalize($dump)); + } + + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage Can only dump nodes and arrays. + */ + public function testError() { + $dumper = new NodeDumper; + $dumper->dump(new \stdClass); + } +} diff --git a/vendor/nikic/php-parser/test/PhpParser/NodeTraverserTest.php b/vendor/nikic/php-parser/test/PhpParser/NodeTraverserTest.php new file mode 100644 index 0000000..f4bade0 --- /dev/null +++ b/vendor/nikic/php-parser/test/PhpParser/NodeTraverserTest.php @@ -0,0 +1,267 @@ +getMockBuilder('PhpParser\NodeVisitor')->getMock(); + + $visitor->expects($this->at(0))->method('beforeTraverse')->with($stmts); + $visitor->expects($this->at(1))->method('enterNode')->with($echoNode); + $visitor->expects($this->at(2))->method('enterNode')->with($str1Node); + $visitor->expects($this->at(3))->method('leaveNode')->with($str1Node); + $visitor->expects($this->at(4))->method('enterNode')->with($str2Node); + $visitor->expects($this->at(5))->method('leaveNode')->with($str2Node); + $visitor->expects($this->at(6))->method('leaveNode')->with($echoNode); + $visitor->expects($this->at(7))->method('afterTraverse')->with($stmts); + + $traverser = new NodeTraverser; + $traverser->addVisitor($visitor); + + $this->assertEquals($stmts, $traverser->traverse($stmts)); + } + + public function testModifying() { + $str1Node = new String_('Foo'); + $str2Node = new String_('Bar'); + $printNode = new Expr\Print_($str1Node); + + // first visitor changes the node, second verifies the change + $visitor1 = $this->getMockBuilder('PhpParser\NodeVisitor')->getMock(); + $visitor2 = $this->getMockBuilder('PhpParser\NodeVisitor')->getMock(); + + // replace empty statements with string1 node + $visitor1->expects($this->at(0))->method('beforeTraverse')->with(array()) + ->will($this->returnValue(array($str1Node))); + $visitor2->expects($this->at(0))->method('beforeTraverse')->with(array($str1Node)); + + // replace string1 node with print node + $visitor1->expects($this->at(1))->method('enterNode')->with($str1Node) + ->will($this->returnValue($printNode)); + $visitor2->expects($this->at(1))->method('enterNode')->with($printNode); + + // replace string1 node with string2 node + $visitor1->expects($this->at(2))->method('enterNode')->with($str1Node) + ->will($this->returnValue($str2Node)); + $visitor2->expects($this->at(2))->method('enterNode')->with($str2Node); + + // replace string2 node with string1 node again + $visitor1->expects($this->at(3))->method('leaveNode')->with($str2Node) + ->will($this->returnValue($str1Node)); + $visitor2->expects($this->at(3))->method('leaveNode')->with($str1Node); + + // replace print node with string1 node again + $visitor1->expects($this->at(4))->method('leaveNode')->with($printNode) + ->will($this->returnValue($str1Node)); + $visitor2->expects($this->at(4))->method('leaveNode')->with($str1Node); + + // replace string1 node with empty statements again + $visitor1->expects($this->at(5))->method('afterTraverse')->with(array($str1Node)) + ->will($this->returnValue(array())); + $visitor2->expects($this->at(5))->method('afterTraverse')->with(array()); + + $traverser = new NodeTraverser; + $traverser->addVisitor($visitor1); + $traverser->addVisitor($visitor2); + + // as all operations are reversed we end where we start + $this->assertEquals(array(), $traverser->traverse(array())); + } + + public function testRemove() { + $str1Node = new String_('Foo'); + $str2Node = new String_('Bar'); + + $visitor = $this->getMockBuilder('PhpParser\NodeVisitor')->getMock(); + + // remove the string1 node, leave the string2 node + $visitor->expects($this->at(2))->method('leaveNode')->with($str1Node) + ->will($this->returnValue(false)); + + $traverser = new NodeTraverser; + $traverser->addVisitor($visitor); + + $this->assertEquals(array($str2Node), $traverser->traverse(array($str1Node, $str2Node))); + } + + public function testMerge() { + $strStart = new String_('Start'); + $strMiddle = new String_('End'); + $strEnd = new String_('Middle'); + $strR1 = new String_('Replacement 1'); + $strR2 = new String_('Replacement 2'); + + $visitor = $this->getMockBuilder('PhpParser\NodeVisitor')->getMock(); + + // replace strMiddle with strR1 and strR2 by merge + $visitor->expects($this->at(4))->method('leaveNode')->with($strMiddle) + ->will($this->returnValue(array($strR1, $strR2))); + + $traverser = new NodeTraverser; + $traverser->addVisitor($visitor); + + $this->assertEquals( + array($strStart, $strR1, $strR2, $strEnd), + $traverser->traverse(array($strStart, $strMiddle, $strEnd)) + ); + } + + public function testDeepArray() { + $strNode = new String_('Foo'); + $stmts = array(array(array($strNode))); + + $visitor = $this->getMockBuilder('PhpParser\NodeVisitor')->getMock(); + $visitor->expects($this->at(1))->method('enterNode')->with($strNode); + + $traverser = new NodeTraverser; + $traverser->addVisitor($visitor); + + $this->assertEquals($stmts, $traverser->traverse($stmts)); + } + + public function testDontTraverseChildren() { + $strNode = new String_('str'); + $printNode = new Expr\Print_($strNode); + $varNode = new Expr\Variable('foo'); + $mulNode = new Expr\BinaryOp\Mul($varNode, $varNode); + $negNode = new Expr\UnaryMinus($mulNode); + $stmts = array($printNode, $negNode); + + $visitor1 = $this->getMockBuilder('PhpParser\NodeVisitor')->getMock(); + $visitor2 = $this->getMockBuilder('PhpParser\NodeVisitor')->getMock(); + + $visitor1->expects($this->at(1))->method('enterNode')->with($printNode) + ->will($this->returnValue(NodeTraverser::DONT_TRAVERSE_CHILDREN)); + $visitor2->expects($this->at(1))->method('enterNode')->with($printNode); + + $visitor1->expects($this->at(2))->method('leaveNode')->with($printNode); + $visitor2->expects($this->at(2))->method('leaveNode')->with($printNode); + + $visitor1->expects($this->at(3))->method('enterNode')->with($negNode); + $visitor2->expects($this->at(3))->method('enterNode')->with($negNode); + + $visitor1->expects($this->at(4))->method('enterNode')->with($mulNode); + $visitor2->expects($this->at(4))->method('enterNode')->with($mulNode) + ->will($this->returnValue(NodeTraverser::DONT_TRAVERSE_CHILDREN)); + + $visitor1->expects($this->at(5))->method('leaveNode')->with($mulNode); + $visitor2->expects($this->at(5))->method('leaveNode')->with($mulNode); + + $visitor1->expects($this->at(6))->method('leaveNode')->with($negNode); + $visitor2->expects($this->at(6))->method('leaveNode')->with($negNode); + + $traverser = new NodeTraverser; + $traverser->addVisitor($visitor1); + $traverser->addVisitor($visitor2); + + $this->assertEquals($stmts, $traverser->traverse($stmts)); + } + + public function testStopTraversal() { + $varNode1 = new Expr\Variable('a'); + $varNode2 = new Expr\Variable('b'); + $varNode3 = new Expr\Variable('c'); + $mulNode = new Expr\BinaryOp\Mul($varNode1, $varNode2); + $printNode = new Expr\Print_($varNode3); + $stmts = [$mulNode, $printNode]; + + // From enterNode() with array parent + $visitor = $this->getMockBuilder('PhpParser\NodeVisitor')->getMock(); + $visitor->expects($this->at(1))->method('enterNode')->with($mulNode) + ->will($this->returnValue(NodeTraverser::STOP_TRAVERSAL)); + $visitor->expects($this->at(2))->method('afterTraversal'); + $traverser = new NodeTraverser; + $traverser->addVisitor($visitor); + $this->assertEquals($stmts, $traverser->traverse($stmts)); + + // From enterNode with Node parent + $visitor = $this->getMockBuilder('PhpParser\NodeVisitor')->getMock(); + $visitor->expects($this->at(2))->method('enterNode')->with($varNode1) + ->will($this->returnValue(NodeTraverser::STOP_TRAVERSAL)); + $visitor->expects($this->at(3))->method('afterTraversal'); + $traverser = new NodeTraverser; + $traverser->addVisitor($visitor); + $this->assertEquals($stmts, $traverser->traverse($stmts)); + + // From leaveNode with Node parent + $visitor = $this->getMockBuilder('PhpParser\NodeVisitor')->getMock(); + $visitor->expects($this->at(3))->method('leaveNode')->with($varNode1) + ->will($this->returnValue(NodeTraverser::STOP_TRAVERSAL)); + $visitor->expects($this->at(4))->method('afterTraversal'); + $traverser = new NodeTraverser; + $traverser->addVisitor($visitor); + $this->assertEquals($stmts, $traverser->traverse($stmts)); + + // From leaveNode with array parent + $visitor = $this->getMockBuilder('PhpParser\NodeVisitor')->getMock(); + $visitor->expects($this->at(6))->method('leaveNode')->with($mulNode) + ->will($this->returnValue(NodeTraverser::STOP_TRAVERSAL)); + $visitor->expects($this->at(7))->method('afterTraversal'); + $traverser = new NodeTraverser; + $traverser->addVisitor($visitor); + $this->assertEquals($stmts, $traverser->traverse($stmts)); + + // Check that pending array modifications are still carried out + $visitor = $this->getMockBuilder('PhpParser\NodeVisitor')->getMock(); + $visitor->expects($this->at(6))->method('leaveNode')->with($mulNode) + ->will($this->returnValue(NodeTraverser::REMOVE_NODE)); + $visitor->expects($this->at(7))->method('enterNode')->with($printNode) + ->will($this->returnValue(NodeTraverser::STOP_TRAVERSAL)); + $visitor->expects($this->at(8))->method('afterTraversal'); + $traverser = new NodeTraverser; + $traverser->addVisitor($visitor); + $this->assertEquals([$printNode], $traverser->traverse($stmts)); + + } + + public function testRemovingVisitor() { + $visitor1 = $this->getMockBuilder('PhpParser\NodeVisitor')->getMock(); + $visitor2 = $this->getMockBuilder('PhpParser\NodeVisitor')->getMock(); + $visitor3 = $this->getMockBuilder('PhpParser\NodeVisitor')->getMock(); + + $traverser = new NodeTraverser; + $traverser->addVisitor($visitor1); + $traverser->addVisitor($visitor2); + $traverser->addVisitor($visitor3); + + $preExpected = array($visitor1, $visitor2, $visitor3); + $this->assertAttributeSame($preExpected, 'visitors', $traverser, 'The appropriate visitors have not been added'); + + $traverser->removeVisitor($visitor2); + + $postExpected = array(0 => $visitor1, 2 => $visitor3); + $this->assertAttributeSame($postExpected, 'visitors', $traverser, 'The appropriate visitors are not present after removal'); + } + + public function testNoCloneNodes() { + $stmts = array(new Node\Stmt\Echo_(array(new String_('Foo'), new String_('Bar')))); + + $traverser = new NodeTraverser; + + $this->assertSame($stmts, $traverser->traverse($stmts)); + } + + /** + * @expectedException \LogicException + * @expectedExceptionMessage leaveNode() may only return an array if the parent structure is an array + */ + public function testReplaceByArrayOnlyAllowedIfParentIsArray() { + $stmts = array(new Node\Expr\UnaryMinus(new Node\Scalar\LNumber(42))); + + $visitor = $this->getMockBuilder('PhpParser\NodeVisitor')->getMock(); + $visitor->method('leaveNode')->willReturn(array(new Node\Scalar\DNumber(42.0))); + + $traverser = new NodeTraverser(); + $traverser->addVisitor($visitor); + $traverser->traverse($stmts); + } +} diff --git a/vendor/nikic/php-parser/test/PhpParser/NodeVisitor/NameResolverTest.php b/vendor/nikic/php-parser/test/PhpParser/NodeVisitor/NameResolverTest.php new file mode 100644 index 0000000..0313374 --- /dev/null +++ b/vendor/nikic/php-parser/test/PhpParser/NodeVisitor/NameResolverTest.php @@ -0,0 +1,468 @@ +addVisitor(new NameResolver); + + $stmts = $parser->parse($code); + $stmts = $traverser->traverse($stmts); + + $this->assertSame( + $this->canonicalize($expectedCode), + $prettyPrinter->prettyPrint($stmts) + ); + } + + /** + * @covers PhpParser\NodeVisitor\NameResolver + */ + public function testResolveLocations() { + $code = <<<'EOC' +addVisitor(new NameResolver); + + $stmts = $parser->parse($code); + $stmts = $traverser->traverse($stmts); + + $this->assertSame( + $this->canonicalize($expectedCode), + $prettyPrinter->prettyPrint($stmts) + ); + } + + public function testNoResolveSpecialName() { + $stmts = array(new Node\Expr\New_(new Name('self'))); + + $traverser = new PhpParser\NodeTraverser; + $traverser->addVisitor(new NameResolver); + + $this->assertEquals($stmts, $traverser->traverse($stmts)); + } + + public function testAddDeclarationNamespacedName() { + $nsStmts = array( + new Stmt\Class_('A'), + new Stmt\Interface_('B'), + new Stmt\Function_('C'), + new Stmt\Const_(array( + new Node\Const_('D', new Node\Scalar\LNumber(42)) + )), + new Stmt\Trait_('E'), + new Expr\New_(new Stmt\Class_(null)), + ); + + $traverser = new PhpParser\NodeTraverser; + $traverser->addVisitor(new NameResolver); + + $stmts = $traverser->traverse([new Stmt\Namespace_(new Name('NS'), $nsStmts)]); + $this->assertSame('NS\\A', (string) $stmts[0]->stmts[0]->namespacedName); + $this->assertSame('NS\\B', (string) $stmts[0]->stmts[1]->namespacedName); + $this->assertSame('NS\\C', (string) $stmts[0]->stmts[2]->namespacedName); + $this->assertSame('NS\\D', (string) $stmts[0]->stmts[3]->consts[0]->namespacedName); + $this->assertSame('NS\\E', (string) $stmts[0]->stmts[4]->namespacedName); + $this->assertObjectNotHasAttribute('namespacedName', $stmts[0]->stmts[5]->class); + + $stmts = $traverser->traverse([new Stmt\Namespace_(null, $nsStmts)]); + $this->assertSame('A', (string) $stmts[0]->stmts[0]->namespacedName); + $this->assertSame('B', (string) $stmts[0]->stmts[1]->namespacedName); + $this->assertSame('C', (string) $stmts[0]->stmts[2]->namespacedName); + $this->assertSame('D', (string) $stmts[0]->stmts[3]->consts[0]->namespacedName); + $this->assertSame('E', (string) $stmts[0]->stmts[4]->namespacedName); + $this->assertObjectNotHasAttribute('namespacedName', $stmts[0]->stmts[5]->class); + } + + public function testAddRuntimeResolvedNamespacedName() { + $stmts = array( + new Stmt\Namespace_(new Name('NS'), array( + new Expr\FuncCall(new Name('foo')), + new Expr\ConstFetch(new Name('FOO')), + )), + new Stmt\Namespace_(null, array( + new Expr\FuncCall(new Name('foo')), + new Expr\ConstFetch(new Name('FOO')), + )), + ); + + $traverser = new PhpParser\NodeTraverser; + $traverser->addVisitor(new NameResolver); + $stmts = $traverser->traverse($stmts); + + $this->assertSame('NS\\foo', (string) $stmts[0]->stmts[0]->name->getAttribute('namespacedName')); + $this->assertSame('NS\\FOO', (string) $stmts[0]->stmts[1]->name->getAttribute('namespacedName')); + + $this->assertFalse($stmts[1]->stmts[0]->name->hasAttribute('namespacedName')); + $this->assertFalse($stmts[1]->stmts[1]->name->hasAttribute('namespacedName')); + } + + /** + * @dataProvider provideTestError + */ + public function testError(Node $stmt, $errorMsg) { + $this->setExpectedException('PhpParser\Error', $errorMsg); + + $traverser = new PhpParser\NodeTraverser; + $traverser->addVisitor(new NameResolver); + $traverser->traverse(array($stmt)); + } + + public function provideTestError() { + return array( + array( + new Stmt\Use_(array( + new Stmt\UseUse(new Name('A\B'), 'B', 0, array('startLine' => 1)), + new Stmt\UseUse(new Name('C\D'), 'B', 0, array('startLine' => 2)), + ), Stmt\Use_::TYPE_NORMAL), + 'Cannot use C\D as B because the name is already in use on line 2' + ), + array( + new Stmt\Use_(array( + new Stmt\UseUse(new Name('a\b'), 'b', 0, array('startLine' => 1)), + new Stmt\UseUse(new Name('c\d'), 'B', 0, array('startLine' => 2)), + ), Stmt\Use_::TYPE_FUNCTION), + 'Cannot use function c\d as B because the name is already in use on line 2' + ), + array( + new Stmt\Use_(array( + new Stmt\UseUse(new Name('A\B'), 'B', 0, array('startLine' => 1)), + new Stmt\UseUse(new Name('C\D'), 'B', 0, array('startLine' => 2)), + ), Stmt\Use_::TYPE_CONSTANT), + 'Cannot use const C\D as B because the name is already in use on line 2' + ), + array( + new Expr\New_(new Name\FullyQualified('self', array('startLine' => 3))), + "'\\self' is an invalid class name on line 3" + ), + array( + new Expr\New_(new Name\Relative('self', array('startLine' => 3))), + "'\\self' is an invalid class name on line 3" + ), + array( + new Expr\New_(new Name\FullyQualified('PARENT', array('startLine' => 3))), + "'\\PARENT' is an invalid class name on line 3" + ), + array( + new Expr\New_(new Name\Relative('STATIC', array('startLine' => 3))), + "'\\STATIC' is an invalid class name on line 3" + ), + ); + } + + public function testClassNameIsCaseInsensitive() + { + $source = <<<'EOC' +parse($source); + + $traverser = new PhpParser\NodeTraverser; + $traverser->addVisitor(new NameResolver); + + $stmts = $traverser->traverse($stmts); + $stmt = $stmts[0]; + + $this->assertSame(array('Bar', 'Baz'), $stmt->stmts[1]->expr->class->parts); + } + + public function testSpecialClassNamesAreCaseInsensitive() { + $source = <<<'EOC' +parse($source); + + $traverser = new PhpParser\NodeTraverser; + $traverser->addVisitor(new NameResolver); + + $stmts = $traverser->traverse($stmts); + $classStmt = $stmts[0]; + $methodStmt = $classStmt->stmts[0]->stmts[0]; + + $this->assertSame('SELF', (string)$methodStmt->stmts[0]->class); + $this->assertSame('PARENT', (string)$methodStmt->stmts[1]->class); + $this->assertSame('STATIC', (string)$methodStmt->stmts[2]->class); + } + + public function testAddOriginalNames() { + $traverser = new PhpParser\NodeTraverser; + $traverser->addVisitor(new NameResolver(null, ['preserveOriginalNames' => true])); + + $n1 = new Name('Bar'); + $n2 = new Name('bar'); + $origStmts = [ + new Stmt\Namespace_(new Name('Foo'), [ + new Expr\ClassConstFetch($n1, 'FOO'), + new Expr\FuncCall($n2), + ]) + ]; + + $stmts = $traverser->traverse($origStmts); + + $this->assertSame($n1, $stmts[0]->stmts[0]->class->getAttribute('originalName')); + $this->assertSame($n2, $stmts[0]->stmts[1]->name->getAttribute('originalName')); + } +} diff --git a/vendor/nikic/php-parser/test/PhpParser/Parser/MultipleTest.php b/vendor/nikic/php-parser/test/PhpParser/Parser/MultipleTest.php new file mode 100644 index 0000000..01d3b60 --- /dev/null +++ b/vendor/nikic/php-parser/test/PhpParser/Parser/MultipleTest.php @@ -0,0 +1,94 @@ + []]); + return new Multiple([new Php7($lexer), new Php5($lexer)]); + } + + private function getPrefer5() { + $lexer = new Lexer(['usedAttributes' => []]); + return new Multiple([new Php5($lexer), new Php7($lexer)]); + } + + /** @dataProvider provideTestParse */ + public function testParse($code, Multiple $parser, $expected) { + $this->assertEquals($expected, $parser->parse($code)); + } + + public function provideTestParse() { + return [ + [ + // PHP 7 only code + 'getPrefer5(), + [ + new Stmt\Class_('Test', ['stmts' => [ + new Stmt\ClassMethod('function') + ]]), + ] + ], + [ + // PHP 5 only code + 'b;', + $this->getPrefer7(), + [ + new Stmt\Global_([ + new Expr\Variable(new Expr\PropertyFetch(new Expr\Variable('a'), 'b')) + ]) + ] + ], + [ + // Different meaning (PHP 5) + 'getPrefer5(), + [ + new Expr\Variable( + new Expr\ArrayDimFetch(new Expr\Variable('a'), LNumber::fromString('0')) + ) + ] + ], + [ + // Different meaning (PHP 7) + 'getPrefer7(), + [ + new Expr\ArrayDimFetch( + new Expr\Variable(new Expr\Variable('a')), LNumber::fromString('0') + ) + ] + ], + ]; + } + + public function testThrownError() { + $this->setExpectedException('PhpParser\Error', 'FAIL A'); + + $parserA = $this->getMockBuilder('PhpParser\Parser')->getMock(); + $parserA->expects($this->at(0)) + ->method('parse')->will($this->throwException(new Error('FAIL A'))); + + $parserB = $this->getMockBuilder('PhpParser\Parser')->getMock(); + $parserB->expects($this->at(0)) + ->method('parse')->will($this->throwException(new Error('FAIL B'))); + + $parser = new Multiple([$parserA, $parserB]); + $parser->parse('dummy'); + } +} \ No newline at end of file diff --git a/vendor/nikic/php-parser/test/PhpParser/Parser/Php5Test.php b/vendor/nikic/php-parser/test/PhpParser/Parser/Php5Test.php new file mode 100644 index 0000000..58c4e61 --- /dev/null +++ b/vendor/nikic/php-parser/test/PhpParser/Parser/Php5Test.php @@ -0,0 +1,14 @@ +assertInstanceOf($expected, (new ParserFactory)->create($kind, $lexer)); + } + + public function provideTestCreate() { + $lexer = new Lexer(); + return [ + [ + ParserFactory::PREFER_PHP7, $lexer, + 'PhpParser\Parser\Multiple' + ], + [ + ParserFactory::PREFER_PHP5, null, + 'PhpParser\Parser\Multiple' + ], + [ + ParserFactory::ONLY_PHP7, null, + 'PhpParser\Parser\Php7' + ], + [ + ParserFactory::ONLY_PHP5, $lexer, + 'PhpParser\Parser\Php5' + ] + ]; + } +} \ No newline at end of file diff --git a/vendor/nikic/php-parser/test/PhpParser/ParserTest.php b/vendor/nikic/php-parser/test/PhpParser/ParserTest.php new file mode 100644 index 0000000..1295ae0 --- /dev/null +++ b/vendor/nikic/php-parser/test/PhpParser/ParserTest.php @@ -0,0 +1,181 @@ +getParser(new Lexer()); + $parser->parse('getParser(new Lexer()); + $parser->parse('getParser(new Lexer()); + $parser->parse(' array( + 'comments', 'startLine', 'endLine', + 'startTokenPos', 'endTokenPos', + ) + )); + + $code = <<<'EOC' +getParser($lexer); + $stmts = $parser->parse($code); + + /** @var \PhpParser\Node\Stmt\Function_ $fn */ + $fn = $stmts[0]; + $this->assertInstanceOf('PhpParser\Node\Stmt\Function_', $fn); + $this->assertEquals(array( + 'comments' => array( + new Comment\Doc('/** Doc comment */', 2, 6), + ), + 'startLine' => 3, + 'endLine' => 7, + 'startTokenPos' => 3, + 'endTokenPos' => 21, + ), $fn->getAttributes()); + + $param = $fn->params[0]; + $this->assertInstanceOf('PhpParser\Node\Param', $param); + $this->assertEquals(array( + 'startLine' => 3, + 'endLine' => 3, + 'startTokenPos' => 7, + 'endTokenPos' => 7, + ), $param->getAttributes()); + + /** @var \PhpParser\Node\Stmt\Echo_ $echo */ + $echo = $fn->stmts[0]; + $this->assertInstanceOf('PhpParser\Node\Stmt\Echo_', $echo); + $this->assertEquals(array( + 'comments' => array( + new Comment("// Line\n", 4, 49), + new Comment("// Comments\n", 5, 61), + ), + 'startLine' => 6, + 'endLine' => 6, + 'startTokenPos' => 16, + 'endTokenPos' => 19, + ), $echo->getAttributes()); + + /** @var \PhpParser\Node\Expr\Variable $var */ + $var = $echo->exprs[0]; + $this->assertInstanceOf('PhpParser\Node\Expr\Variable', $var); + $this->assertEquals(array( + 'startLine' => 6, + 'endLine' => 6, + 'startTokenPos' => 18, + 'endTokenPos' => 18, + ), $var->getAttributes()); + } + + /** + * @expectedException \RangeException + * @expectedExceptionMessage The lexer returned an invalid token (id=999, value=foobar) + */ + public function testInvalidToken() { + $lexer = new InvalidTokenLexer; + $parser = $this->getParser($lexer); + $parser->parse('dummy'); + } + + /** + * @dataProvider provideTestExtraAttributes + */ + public function testExtraAttributes($code, $expectedAttributes) { + $parser = $this->getParser(new Lexer); + $stmts = $parser->parse("getAttributes(); + foreach ($expectedAttributes as $name => $value) { + $this->assertSame($value, $attributes[$name]); + } + } + + public function provideTestExtraAttributes() { + return array( + array('0', ['kind' => Scalar\LNumber::KIND_DEC]), + array('9', ['kind' => Scalar\LNumber::KIND_DEC]), + array('07', ['kind' => Scalar\LNumber::KIND_OCT]), + array('0xf', ['kind' => Scalar\LNumber::KIND_HEX]), + array('0XF', ['kind' => Scalar\LNumber::KIND_HEX]), + array('0b1', ['kind' => Scalar\LNumber::KIND_BIN]), + array('0B1', ['kind' => Scalar\LNumber::KIND_BIN]), + array('[]', ['kind' => Expr\Array_::KIND_SHORT]), + array('array()', ['kind' => Expr\Array_::KIND_LONG]), + array("'foo'", ['kind' => String_::KIND_SINGLE_QUOTED]), + array("b'foo'", ['kind' => String_::KIND_SINGLE_QUOTED]), + array("B'foo'", ['kind' => String_::KIND_SINGLE_QUOTED]), + array('"foo"', ['kind' => String_::KIND_DOUBLE_QUOTED]), + array('b"foo"', ['kind' => String_::KIND_DOUBLE_QUOTED]), + array('B"foo"', ['kind' => String_::KIND_DOUBLE_QUOTED]), + array('"foo$bar"', ['kind' => String_::KIND_DOUBLE_QUOTED]), + array('b"foo$bar"', ['kind' => String_::KIND_DOUBLE_QUOTED]), + array('B"foo$bar"', ['kind' => String_::KIND_DOUBLE_QUOTED]), + array("<<<'STR'\nSTR\n", ['kind' => String_::KIND_NOWDOC, 'docLabel' => 'STR']), + array("<< String_::KIND_HEREDOC, 'docLabel' => 'STR']), + array("<<<\"STR\"\nSTR\n", ['kind' => String_::KIND_HEREDOC, 'docLabel' => 'STR']), + array("b<<<'STR'\nSTR\n", ['kind' => String_::KIND_NOWDOC, 'docLabel' => 'STR']), + array("B<<<'STR'\nSTR\n", ['kind' => String_::KIND_NOWDOC, 'docLabel' => 'STR']), + array("<<< \t 'STR'\nSTR\n", ['kind' => String_::KIND_NOWDOC, 'docLabel' => 'STR']), + // HHVM doesn't support this due to a lexer bug + // (https://github.com/facebook/hhvm/issues/6970) + // array("<<<'\xff'\n\xff\n", ['kind' => String_::KIND_NOWDOC, 'docLabel' => "\xff"]), + array("<<<\"STR\"\n\$a\nSTR\n", ['kind' => String_::KIND_HEREDOC, 'docLabel' => 'STR']), + array("b<<<\"STR\"\n\$a\nSTR\n", ['kind' => String_::KIND_HEREDOC, 'docLabel' => 'STR']), + array("B<<<\"STR\"\n\$a\nSTR\n", ['kind' => String_::KIND_HEREDOC, 'docLabel' => 'STR']), + array("<<< \t \"STR\"\n\$a\nSTR\n", ['kind' => String_::KIND_HEREDOC, 'docLabel' => 'STR']), + array("die", ['kind' => Expr\Exit_::KIND_DIE]), + array("die('done')", ['kind' => Expr\Exit_::KIND_DIE]), + array("exit", ['kind' => Expr\Exit_::KIND_EXIT]), + array("exit(1)", ['kind' => Expr\Exit_::KIND_EXIT]), + array("?>Foo", ['hasLeadingNewline' => false]), + array("?>\nFoo", ['hasLeadingNewline' => true]), + ); + } +} + +class InvalidTokenLexer extends Lexer { + public function getNextToken(&$value = null, &$startAttributes = null, &$endAttributes = null) { + $value = 'foobar'; + return 999; + } +} diff --git a/vendor/nikic/php-parser/test/PhpParser/PrettyPrinterTest.php b/vendor/nikic/php-parser/test/PhpParser/PrettyPrinterTest.php new file mode 100644 index 0000000..908c18b --- /dev/null +++ b/vendor/nikic/php-parser/test/PhpParser/PrettyPrinterTest.php @@ -0,0 +1,207 @@ +parseModeLine($modeLine); + $prettyPrinter = new Standard($options); + + try { + $output5 = canonicalize($prettyPrinter->$method($parser5->parse($code))); + } catch (Error $e) { + $output5 = null; + if ('php7' !== $version) { + throw $e; + } + } + + try { + $output7 = canonicalize($prettyPrinter->$method($parser7->parse($code))); + } catch (Error $e) { + $output7 = null; + if ('php5' !== $version) { + throw $e; + } + } + + if ('php5' === $version) { + $this->assertSame($expected, $output5, $name); + $this->assertNotSame($expected, $output7, $name); + } else if ('php7' === $version) { + $this->assertSame($expected, $output7, $name); + $this->assertNotSame($expected, $output5, $name); + } else { + $this->assertSame($expected, $output5, $name); + $this->assertSame($expected, $output7, $name); + } + } + + /** + * @dataProvider provideTestPrettyPrint + * @covers PhpParser\PrettyPrinter\Standard + */ + public function testPrettyPrint($name, $code, $expected, $mode) { + $this->doTestPrettyPrintMethod('prettyPrint', $name, $code, $expected, $mode); + } + + /** + * @dataProvider provideTestPrettyPrintFile + * @covers PhpParser\PrettyPrinter\Standard + */ + public function testPrettyPrintFile($name, $code, $expected, $mode) { + $this->doTestPrettyPrintMethod('prettyPrintFile', $name, $code, $expected, $mode); + } + + public function provideTestPrettyPrint() { + return $this->getTests(__DIR__ . '/../code/prettyPrinter', 'test'); + } + + public function provideTestPrettyPrintFile() { + return $this->getTests(__DIR__ . '/../code/prettyPrinter', 'file-test'); + } + + public function testPrettyPrintExpr() { + $prettyPrinter = new Standard; + $expr = new Expr\BinaryOp\Mul( + new Expr\BinaryOp\Plus(new Expr\Variable('a'), new Expr\Variable('b')), + new Expr\Variable('c') + ); + $this->assertEquals('($a + $b) * $c', $prettyPrinter->prettyPrintExpr($expr)); + + $expr = new Expr\Closure(array( + 'stmts' => array(new Stmt\Return_(new String_("a\nb"))) + )); + $this->assertEquals("function () {\n return 'a\nb';\n}", $prettyPrinter->prettyPrintExpr($expr)); + } + + public function testCommentBeforeInlineHTML() { + $prettyPrinter = new PrettyPrinter\Standard; + $comment = new Comment\Doc("/**\n * This is a comment\n */"); + $stmts = [new Stmt\InlineHTML('Hello World!', ['comments' => [$comment]])]; + $expected = "\nHello World!"; + $this->assertSame($expected, $prettyPrinter->prettyPrintFile($stmts)); + } + + private function parseModeLine($modeLine) { + $parts = explode(' ', $modeLine, 2); + $version = isset($parts[0]) ? $parts[0] : 'both'; + $options = isset($parts[1]) ? json_decode($parts[1], true) : []; + return [$version, $options]; + } + + public function testArraySyntaxDefault() { + $prettyPrinter = new Standard(['shortArraySyntax' => true]); + $expr = new Expr\Array_([ + new Expr\ArrayItem(new String_('val'), new String_('key')) + ]); + $expected = "['key' => 'val']"; + $this->assertSame($expected, $prettyPrinter->prettyPrintExpr($expr)); + } + + /** + * @dataProvider provideTestKindAttributes + */ + public function testKindAttributes($node, $expected) { + $prttyPrinter = new PrettyPrinter\Standard; + $result = $prttyPrinter->prettyPrintExpr($node); + $this->assertSame($expected, $result); + } + + public function provideTestKindAttributes() { + $nowdoc = ['kind' => String_::KIND_NOWDOC, 'docLabel' => 'STR']; + $heredoc = ['kind' => String_::KIND_HEREDOC, 'docLabel' => 'STR']; + return [ + // Defaults to single quoted + [new String_('foo'), "'foo'"], + // Explicit single/double quoted + [new String_('foo', ['kind' => String_::KIND_SINGLE_QUOTED]), "'foo'"], + [new String_('foo', ['kind' => String_::KIND_DOUBLE_QUOTED]), '"foo"'], + // Fallback from doc string if no label + [new String_('foo', ['kind' => String_::KIND_NOWDOC]), "'foo'"], + [new String_('foo', ['kind' => String_::KIND_HEREDOC]), '"foo"'], + // Fallback if string contains label + [new String_("A\nB\nC", ['kind' => String_::KIND_NOWDOC, 'docLabel' => 'A']), "'A\nB\nC'"], + [new String_("A\nB\nC", ['kind' => String_::KIND_NOWDOC, 'docLabel' => 'B']), "'A\nB\nC'"], + [new String_("A\nB\nC", ['kind' => String_::KIND_NOWDOC, 'docLabel' => 'C']), "'A\nB\nC'"], + [new String_("STR;", ['kind' => String_::KIND_NOWDOC, 'docLabel' => 'STR']), "'STR;'"], + // Doc string if label not contained (or not in ending position) + [new String_("foo", $nowdoc), "<<<'STR'\nfoo\nSTR\n"], + [new String_("foo", $heredoc), "<<prettyPrintExpr($node); + $this->assertSame($expected, $result); + } + + public function provideTestUnnaturalLiterals() { + return [ + [new LNumber(-1), '-1'], + [new LNumber(-PHP_INT_MAX - 1), '(-' . PHP_INT_MAX . '-1)'], + [new LNumber(-1, ['kind' => LNumber::KIND_BIN]), '-0b1'], + [new LNumber(-1, ['kind' => LNumber::KIND_OCT]), '-01'], + [new LNumber(-1, ['kind' => LNumber::KIND_HEX]), '-0x1'], + [new DNumber(\INF), '\INF'], + [new DNumber(-\INF), '-\INF'], + [new DNumber(-\NAN), '\NAN'], + ]; + } + + /** + * @expectedException \LogicException + * @expectedExceptionMessage Cannot pretty-print AST with Error nodes + */ + public function testPrettyPrintWithError() { + $stmts = [new Expr\PropertyFetch(new Expr\Variable('a'), new Expr\Error())]; + $prettyPrinter = new PrettyPrinter\Standard; + $prettyPrinter->prettyPrint($stmts); + } + + /** + * @expectedException \LogicException + * @expectedExceptionMessage Cannot pretty-print AST with Error nodes + */ + public function testPrettyPrintWithErrorInClassConstFetch() { + $stmts = [new Expr\ClassConstFetch(new Name('Foo'), new Expr\Error())]; + $prettyPrinter = new PrettyPrinter\Standard; + $prettyPrinter->prettyPrint($stmts); + } +} diff --git a/vendor/nikic/php-parser/test/PhpParser/Serializer/XMLTest.php b/vendor/nikic/php-parser/test/PhpParser/Serializer/XMLTest.php new file mode 100644 index 0000000..e1186f4 --- /dev/null +++ b/vendor/nikic/php-parser/test/PhpParser/Serializer/XMLTest.php @@ -0,0 +1,172 @@ + + */ + public function testSerialize() { + $code = << + + + + + 4 + + + + // comment + + /** doc comment */ + + + + 6 + + + + + + functionName + + + + + + 4 + + + 4 + + + + + + + + + + + + a + + + + + 4 + + + 4 + + + 10 + + + 0 + + + + + + + 4 + + + 4 + + + + + + + + + + + + b + + + + + 4 + + + 4 + + + 1 + + + + + + + + + + + + + + 5 + + + 5 + + + + + + 5 + + + 5 + + + 1 + + + Foo + + + + + + + + + + +XML; + + $parser = new PhpParser\Parser\Php7(new PhpParser\Lexer); + $serializer = new XML; + + $code = str_replace("\r\n", "\n", $code); + $stmts = $parser->parse($code); + $this->assertXmlStringEqualsXmlString($xml, $serializer->serialize($stmts)); + } + + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage Unexpected node type + */ + public function testError() { + $serializer = new XML; + $serializer->serialize(array(new \stdClass)); + } +} diff --git a/vendor/nikic/php-parser/test/PhpParser/Unserializer/XMLTest.php b/vendor/nikic/php-parser/test/PhpParser/Unserializer/XMLTest.php new file mode 100644 index 0000000..3bc86db --- /dev/null +++ b/vendor/nikic/php-parser/test/PhpParser/Unserializer/XMLTest.php @@ -0,0 +1,150 @@ + + + + + 1 + + + + // comment + + /** doc comment */ + + + + Test + + + +XML; + + $unserializer = new XML; + $this->assertEquals( + new Scalar\String_('Test', array( + 'startLine' => 1, + 'comments' => array( + new Comment('// comment' . "\n", 2), + new Comment\Doc('/** doc comment */', 3), + ), + )), + $unserializer->unserialize($xml) + ); + } + + public function testEmptyNode() { + $xml = << + + + +XML; + + $unserializer = new XML; + + $this->assertEquals( + new Scalar\MagicConst\Class_, + $unserializer->unserialize($xml) + ); + } + + public function testScalars() { + $xml = << + + + + + test + + + 1 + 1 + 1.5 + + + + + +XML; + $result = array( + array(), array(), + 'test', '', '', + 1, + 1, 1.5, + true, false, null + ); + + $unserializer = new XML; + $this->assertEquals($result, $unserializer->unserialize($xml)); + } + + /** + * @expectedException \DomainException + * @expectedExceptionMessage AST root element not found + */ + public function testWrongRootElementError() { + $xml = << + +XML; + + $unserializer = new XML; + $unserializer->unserialize($xml); + } + + /** + * @dataProvider provideTestErrors + */ + public function testErrors($xml, $errorMsg) { + $this->setExpectedException('DomainException', $errorMsg); + + $xml = << + + $xml + +XML; + + $unserializer = new XML; + $unserializer->unserialize($xml); + } + + public function provideTestErrors() { + return array( + array('test', '"true" scalar must be empty'), + array('test', '"false" scalar must be empty'), + array('test', '"null" scalar must be empty'), + array('bar', 'Unknown scalar type "foo"'), + array('x', '"x" is not a valid int'), + array('x', '"x" is not a valid float'), + array('', 'Expected node or scalar'), + array('test', 'Unexpected node of type "foo:bar"'), + array( + 'test', + 'Expected sub node or attribute, got node of type "foo:bar"' + ), + array( + '', + 'Expected node or scalar' + ), + array( + '', + 'Unknown node type "Foo"' + ), + ); + } +} diff --git a/vendor/nikic/php-parser/test/bootstrap.php b/vendor/nikic/php-parser/test/bootstrap.php new file mode 100644 index 0000000..9526b64 --- /dev/null +++ b/vendor/nikic/php-parser/test/bootstrap.php @@ -0,0 +1,20 @@ + +----- +array( + 0: Stmt_Nop( + comments: array( + 0: /** doc */ + 1: /* foobar */ + 2: // foo + 3: // bar + ) + ) +) +----- + +; +----- +!!positions +Syntax error, unexpected ';', expecting T_STRING or T_VARIABLE or '{' or '$' from 3:1 to 3:1 +array( + 0: Expr_PropertyFetch[2:1 - 2:6]( + var: Expr_Variable[2:1 - 2:4]( + name: foo + ) + name: Expr_Error[3:1 - 2:6]( + ) + ) +) +----- + +} +----- +!!positions +Syntax error, unexpected '}', expecting T_STRING or T_VARIABLE or '{' or '$' from 4:1 to 4:1 +array( + 0: Stmt_Function[2:1 - 4:1]( + byRef: false + name: foo + params: array( + ) + returnType: null + stmts: array( + 0: Expr_PropertyFetch[3:5 - 3:10]( + var: Expr_Variable[3:5 - 3:8]( + name: bar + ) + name: Expr_Error[4:1 - 3:10]( + ) + ) + ) + ) +) +----- + 'd', 'e' => &$f); + +// short array syntax +[]; +[1, 2, 3]; +['a' => 'b']; +----- +array( + 0: Expr_Array( + items: array( + ) + ) + 1: Expr_Array( + items: array( + 0: Expr_ArrayItem( + key: null + value: Scalar_String( + value: a + ) + byRef: false + ) + ) + ) + 2: Expr_Array( + items: array( + 0: Expr_ArrayItem( + key: null + value: Scalar_String( + value: a + ) + byRef: false + ) + ) + ) + 3: Expr_Array( + items: array( + 0: Expr_ArrayItem( + key: null + value: Scalar_String( + value: a + ) + byRef: false + ) + 1: Expr_ArrayItem( + key: null + value: Scalar_String( + value: b + ) + byRef: false + ) + ) + ) + 4: Expr_Array( + items: array( + 0: Expr_ArrayItem( + key: null + value: Scalar_String( + value: a + ) + byRef: false + ) + 1: Expr_ArrayItem( + key: null + value: Expr_Variable( + name: b + ) + byRef: true + ) + 2: Expr_ArrayItem( + key: Scalar_String( + value: c + ) + value: Scalar_String( + value: d + ) + byRef: false + ) + 3: Expr_ArrayItem( + key: Scalar_String( + value: e + ) + value: Expr_Variable( + name: f + ) + byRef: true + ) + ) + ) + 5: Expr_Array( + items: array( + ) + comments: array( + 0: // short array syntax + ) + ) + 6: Expr_Array( + items: array( + 0: Expr_ArrayItem( + key: null + value: Scalar_LNumber( + value: 1 + ) + byRef: false + ) + 1: Expr_ArrayItem( + key: null + value: Scalar_LNumber( + value: 2 + ) + byRef: false + ) + 2: Expr_ArrayItem( + key: null + value: Scalar_LNumber( + value: 3 + ) + byRef: false + ) + ) + ) + 7: Expr_Array( + items: array( + 0: Expr_ArrayItem( + key: Scalar_String( + value: a + ) + value: Scalar_String( + value: b + ) + byRef: false + ) + ) + ) +) \ No newline at end of file diff --git a/vendor/nikic/php-parser/test/code/parser/expr/arrayDestructuring.test b/vendor/nikic/php-parser/test/code/parser/expr/arrayDestructuring.test new file mode 100644 index 0000000..4ca76b2 --- /dev/null +++ b/vendor/nikic/php-parser/test/code/parser/expr/arrayDestructuring.test @@ -0,0 +1,144 @@ +Array destructuring +----- + $b, 'b' => $a] = $baz; +----- +!!php7 +array( + 0: Expr_Assign( + var: Expr_Array( + items: array( + 0: Expr_ArrayItem( + key: null + value: Expr_Variable( + name: a + ) + byRef: false + ) + 1: Expr_ArrayItem( + key: null + value: Expr_Variable( + name: b + ) + byRef: false + ) + ) + ) + expr: Expr_Array( + items: array( + 0: Expr_ArrayItem( + key: null + value: Expr_Variable( + name: c + ) + byRef: false + ) + 1: Expr_ArrayItem( + key: null + value: Expr_Variable( + name: d + ) + byRef: false + ) + ) + ) + ) + 1: Expr_Assign( + var: Expr_Array( + items: array( + 0: null + 1: Expr_ArrayItem( + key: null + value: Expr_Variable( + name: a + ) + byRef: false + ) + 2: null + 3: null + 4: Expr_ArrayItem( + key: null + value: Expr_Variable( + name: b + ) + byRef: false + ) + 5: null + ) + ) + expr: Expr_Variable( + name: foo + ) + ) + 2: Expr_Assign( + var: Expr_Array( + items: array( + 0: null + 1: Expr_ArrayItem( + key: null + value: Expr_Array( + items: array( + 0: Expr_ArrayItem( + key: null + value: Expr_Array( + items: array( + 0: Expr_ArrayItem( + key: null + value: Expr_Variable( + name: a + ) + byRef: false + ) + ) + ) + byRef: false + ) + ) + ) + byRef: false + ) + 2: Expr_ArrayItem( + key: null + value: Expr_Variable( + name: b + ) + byRef: false + ) + ) + ) + expr: Expr_Variable( + name: bar + ) + ) + 3: Expr_Assign( + var: Expr_Array( + items: array( + 0: Expr_ArrayItem( + key: Scalar_String( + value: a + ) + value: Expr_Variable( + name: b + ) + byRef: false + ) + 1: Expr_ArrayItem( + key: Scalar_String( + value: b + ) + value: Expr_Variable( + name: a + ) + byRef: false + ) + ) + ) + expr: Expr_Variable( + name: baz + ) + ) +) \ No newline at end of file diff --git a/vendor/nikic/php-parser/test/code/parser/expr/assign.test b/vendor/nikic/php-parser/test/code/parser/expr/assign.test new file mode 100644 index 0000000..1d6b187 --- /dev/null +++ b/vendor/nikic/php-parser/test/code/parser/expr/assign.test @@ -0,0 +1,301 @@ +Assignments +----- +>= $b; +$a **= $b; + +// chained assign +$a = $b *= $c **= $d; + +// by ref assign +$a =& $b; + +// list() assign +list($a) = $b; +list($a, , $b) = $c; +list($a, list(, $c), $d) = $e; + +// inc/dec +++$a; +$a++; +--$a; +$a--; +----- +array( + 0: Expr_Assign( + var: Expr_Variable( + name: a + comments: array( + 0: // simple assign + ) + ) + expr: Expr_Variable( + name: b + ) + comments: array( + 0: // simple assign + ) + ) + 1: Expr_AssignOp_BitwiseAnd( + var: Expr_Variable( + name: a + comments: array( + 0: // combined assign + ) + ) + expr: Expr_Variable( + name: b + ) + comments: array( + 0: // combined assign + ) + ) + 2: Expr_AssignOp_BitwiseOr( + var: Expr_Variable( + name: a + ) + expr: Expr_Variable( + name: b + ) + ) + 3: Expr_AssignOp_BitwiseXor( + var: Expr_Variable( + name: a + ) + expr: Expr_Variable( + name: b + ) + ) + 4: Expr_AssignOp_Concat( + var: Expr_Variable( + name: a + ) + expr: Expr_Variable( + name: b + ) + ) + 5: Expr_AssignOp_Div( + var: Expr_Variable( + name: a + ) + expr: Expr_Variable( + name: b + ) + ) + 6: Expr_AssignOp_Minus( + var: Expr_Variable( + name: a + ) + expr: Expr_Variable( + name: b + ) + ) + 7: Expr_AssignOp_Mod( + var: Expr_Variable( + name: a + ) + expr: Expr_Variable( + name: b + ) + ) + 8: Expr_AssignOp_Mul( + var: Expr_Variable( + name: a + ) + expr: Expr_Variable( + name: b + ) + ) + 9: Expr_AssignOp_Plus( + var: Expr_Variable( + name: a + ) + expr: Expr_Variable( + name: b + ) + ) + 10: Expr_AssignOp_ShiftLeft( + var: Expr_Variable( + name: a + ) + expr: Expr_Variable( + name: b + ) + ) + 11: Expr_AssignOp_ShiftRight( + var: Expr_Variable( + name: a + ) + expr: Expr_Variable( + name: b + ) + ) + 12: Expr_AssignOp_Pow( + var: Expr_Variable( + name: a + ) + expr: Expr_Variable( + name: b + ) + ) + 13: Expr_Assign( + var: Expr_Variable( + name: a + comments: array( + 0: // chained assign + ) + ) + expr: Expr_AssignOp_Mul( + var: Expr_Variable( + name: b + ) + expr: Expr_AssignOp_Pow( + var: Expr_Variable( + name: c + ) + expr: Expr_Variable( + name: d + ) + ) + ) + comments: array( + 0: // chained assign + ) + ) + 14: Expr_AssignRef( + var: Expr_Variable( + name: a + comments: array( + 0: // by ref assign + ) + ) + expr: Expr_Variable( + name: b + ) + comments: array( + 0: // by ref assign + ) + ) + 15: Expr_Assign( + var: Expr_List( + items: array( + 0: Expr_ArrayItem( + key: null + value: Expr_Variable( + name: a + ) + byRef: false + ) + ) + comments: array( + 0: // list() assign + ) + ) + expr: Expr_Variable( + name: b + ) + comments: array( + 0: // list() assign + ) + ) + 16: Expr_Assign( + var: Expr_List( + items: array( + 0: Expr_ArrayItem( + key: null + value: Expr_Variable( + name: a + ) + byRef: false + ) + 1: null + 2: Expr_ArrayItem( + key: null + value: Expr_Variable( + name: b + ) + byRef: false + ) + ) + ) + expr: Expr_Variable( + name: c + ) + ) + 17: Expr_Assign( + var: Expr_List( + items: array( + 0: Expr_ArrayItem( + key: null + value: Expr_Variable( + name: a + ) + byRef: false + ) + 1: Expr_ArrayItem( + key: null + value: Expr_List( + items: array( + 0: null + 1: Expr_ArrayItem( + key: null + value: Expr_Variable( + name: c + ) + byRef: false + ) + ) + ) + byRef: false + ) + 2: Expr_ArrayItem( + key: null + value: Expr_Variable( + name: d + ) + byRef: false + ) + ) + ) + expr: Expr_Variable( + name: e + ) + ) + 18: Expr_PreInc( + var: Expr_Variable( + name: a + ) + comments: array( + 0: // inc/dec + ) + ) + 19: Expr_PostInc( + var: Expr_Variable( + name: a + ) + ) + 20: Expr_PreDec( + var: Expr_Variable( + name: a + ) + ) + 21: Expr_PostDec( + var: Expr_Variable( + name: a + ) + ) +) \ No newline at end of file diff --git a/vendor/nikic/php-parser/test/code/parser/expr/assignNewByRef.test b/vendor/nikic/php-parser/test/code/parser/expr/assignNewByRef.test new file mode 100644 index 0000000..10e1317 --- /dev/null +++ b/vendor/nikic/php-parser/test/code/parser/expr/assignNewByRef.test @@ -0,0 +1,39 @@ +Assigning new by reference (PHP 5 only) +----- + $b; +$a >= $b; +$a == $b; +$a === $b; +$a != $b; +$a !== $b; +$a <=> $b; +$a instanceof B; +$a instanceof $b; +----- +array( + 0: Expr_BinaryOp_Smaller( + left: Expr_Variable( + name: a + ) + right: Expr_Variable( + name: b + ) + ) + 1: Expr_BinaryOp_SmallerOrEqual( + left: Expr_Variable( + name: a + ) + right: Expr_Variable( + name: b + ) + ) + 2: Expr_BinaryOp_Greater( + left: Expr_Variable( + name: a + ) + right: Expr_Variable( + name: b + ) + ) + 3: Expr_BinaryOp_GreaterOrEqual( + left: Expr_Variable( + name: a + ) + right: Expr_Variable( + name: b + ) + ) + 4: Expr_BinaryOp_Equal( + left: Expr_Variable( + name: a + ) + right: Expr_Variable( + name: b + ) + ) + 5: Expr_BinaryOp_Identical( + left: Expr_Variable( + name: a + ) + right: Expr_Variable( + name: b + ) + ) + 6: Expr_BinaryOp_NotEqual( + left: Expr_Variable( + name: a + ) + right: Expr_Variable( + name: b + ) + ) + 7: Expr_BinaryOp_NotIdentical( + left: Expr_Variable( + name: a + ) + right: Expr_Variable( + name: b + ) + ) + 8: Expr_BinaryOp_Spaceship( + left: Expr_Variable( + name: a + ) + right: Expr_Variable( + name: b + ) + ) + 9: Expr_Instanceof( + expr: Expr_Variable( + name: a + ) + class: Name( + parts: array( + 0: B + ) + ) + ) + 10: Expr_Instanceof( + expr: Expr_Variable( + name: a + ) + class: Expr_Variable( + name: b + ) + ) +) diff --git a/vendor/nikic/php-parser/test/code/parser/expr/constant_expr.test b/vendor/nikic/php-parser/test/code/parser/expr/constant_expr.test new file mode 100644 index 0000000..3e7a23e --- /dev/null +++ b/vendor/nikic/php-parser/test/code/parser/expr/constant_expr.test @@ -0,0 +1,621 @@ +Expressions in static scalar context +----- + 0; +const T_20 = 1 >= 0; +const T_21 = 1 === 1; +const T_22 = 1 !== 1; +const T_23 = 0 != "0"; +const T_24 = 1 == "1"; +const T_25 = 1 + 2 * 3; +const T_26 = "1" + 2 + "3"; +const T_27 = 2 ** 3; +const T_28 = [1, 2, 3][1]; +const T_29 = 12 - 13; +const T_30 = 12 ^ 13; +const T_31 = 12 & 13; +const T_32 = 12 | 13; +const T_33 = 12 % 3; +const T_34 = 100 >> 4; +const T_35 = !false; +----- +array( + 0: Stmt_Const( + consts: array( + 0: Const( + name: T_1 + value: Expr_BinaryOp_ShiftLeft( + left: Scalar_LNumber( + value: 1 + ) + right: Scalar_LNumber( + value: 1 + ) + ) + ) + ) + ) + 1: Stmt_Const( + consts: array( + 0: Const( + name: T_2 + value: Expr_BinaryOp_Div( + left: Scalar_LNumber( + value: 1 + ) + right: Scalar_LNumber( + value: 2 + ) + ) + ) + ) + ) + 2: Stmt_Const( + consts: array( + 0: Const( + name: T_3 + value: Expr_BinaryOp_Plus( + left: Scalar_DNumber( + value: 1.5 + ) + right: Scalar_DNumber( + value: 1.5 + ) + ) + ) + ) + ) + 3: Stmt_Const( + consts: array( + 0: Const( + name: T_4 + value: Expr_BinaryOp_Concat( + left: Scalar_String( + value: foo + ) + right: Scalar_String( + value: bar + ) + ) + ) + ) + ) + 4: Stmt_Const( + consts: array( + 0: Const( + name: T_5 + value: Expr_BinaryOp_Mul( + left: Expr_BinaryOp_Plus( + left: Scalar_DNumber( + value: 1.5 + ) + right: Scalar_DNumber( + value: 1.5 + ) + ) + right: Scalar_LNumber( + value: 2 + ) + ) + ) + ) + ) + 5: Stmt_Const( + consts: array( + 0: Const( + name: T_6 + value: Expr_BinaryOp_Concat( + left: Expr_BinaryOp_Concat( + left: Expr_BinaryOp_Concat( + left: Scalar_String( + value: foo + ) + right: Scalar_LNumber( + value: 2 + ) + ) + right: Scalar_LNumber( + value: 3 + ) + ) + right: Scalar_DNumber( + value: 4 + ) + ) + ) + ) + ) + 6: Stmt_Const( + consts: array( + 0: Const( + name: T_7 + value: Scalar_MagicConst_Line( + ) + ) + ) + ) + 7: Stmt_Const( + consts: array( + 0: Const( + name: T_8 + value: Scalar_String( + value: This is a test string + ) + ) + ) + ) + 8: Stmt_Const( + consts: array( + 0: Const( + name: T_9 + value: Expr_BitwiseNot( + expr: Expr_UnaryMinus( + expr: Scalar_LNumber( + value: 1 + ) + ) + ) + ) + ) + ) + 9: Stmt_Const( + consts: array( + 0: Const( + name: T_10 + value: Expr_BinaryOp_Plus( + left: Expr_Ternary( + cond: Expr_UnaryMinus( + expr: Scalar_LNumber( + value: 1 + ) + ) + if: null + else: Scalar_LNumber( + value: 1 + ) + ) + right: Expr_Ternary( + cond: Scalar_LNumber( + value: 0 + ) + if: Scalar_LNumber( + value: 2 + ) + else: Scalar_LNumber( + value: 3 + ) + ) + ) + ) + ) + ) + 10: Stmt_Const( + consts: array( + 0: Const( + name: T_11 + value: Expr_BinaryOp_BooleanAnd( + left: Scalar_LNumber( + value: 1 + ) + right: Scalar_LNumber( + value: 0 + ) + ) + ) + ) + ) + 11: Stmt_Const( + consts: array( + 0: Const( + name: T_12 + value: Expr_BinaryOp_LogicalAnd( + left: Scalar_LNumber( + value: 1 + ) + right: Scalar_LNumber( + value: 1 + ) + ) + ) + ) + ) + 12: Stmt_Const( + consts: array( + 0: Const( + name: T_13 + value: Expr_BinaryOp_BooleanOr( + left: Scalar_LNumber( + value: 0 + ) + right: Scalar_LNumber( + value: 0 + ) + ) + ) + ) + ) + 13: Stmt_Const( + consts: array( + 0: Const( + name: T_14 + value: Expr_BinaryOp_LogicalOr( + left: Scalar_LNumber( + value: 1 + ) + right: Scalar_LNumber( + value: 0 + ) + ) + ) + ) + ) + 14: Stmt_Const( + consts: array( + 0: Const( + name: T_15 + value: Expr_BinaryOp_LogicalXor( + left: Scalar_LNumber( + value: 1 + ) + right: Scalar_LNumber( + value: 1 + ) + ) + ) + ) + ) + 15: Stmt_Const( + consts: array( + 0: Const( + name: T_16 + value: Expr_BinaryOp_LogicalXor( + left: Scalar_LNumber( + value: 1 + ) + right: Scalar_LNumber( + value: 0 + ) + ) + ) + ) + ) + 16: Stmt_Const( + consts: array( + 0: Const( + name: T_17 + value: Expr_BinaryOp_Smaller( + left: Scalar_LNumber( + value: 1 + ) + right: Scalar_LNumber( + value: 0 + ) + ) + ) + ) + ) + 17: Stmt_Const( + consts: array( + 0: Const( + name: T_18 + value: Expr_BinaryOp_SmallerOrEqual( + left: Scalar_LNumber( + value: 0 + ) + right: Scalar_LNumber( + value: 0 + ) + ) + ) + ) + ) + 18: Stmt_Const( + consts: array( + 0: Const( + name: T_19 + value: Expr_BinaryOp_Greater( + left: Scalar_LNumber( + value: 1 + ) + right: Scalar_LNumber( + value: 0 + ) + ) + ) + ) + ) + 19: Stmt_Const( + consts: array( + 0: Const( + name: T_20 + value: Expr_BinaryOp_GreaterOrEqual( + left: Scalar_LNumber( + value: 1 + ) + right: Scalar_LNumber( + value: 0 + ) + ) + ) + ) + ) + 20: Stmt_Const( + consts: array( + 0: Const( + name: T_21 + value: Expr_BinaryOp_Identical( + left: Scalar_LNumber( + value: 1 + ) + right: Scalar_LNumber( + value: 1 + ) + ) + ) + ) + ) + 21: Stmt_Const( + consts: array( + 0: Const( + name: T_22 + value: Expr_BinaryOp_NotIdentical( + left: Scalar_LNumber( + value: 1 + ) + right: Scalar_LNumber( + value: 1 + ) + ) + ) + ) + ) + 22: Stmt_Const( + consts: array( + 0: Const( + name: T_23 + value: Expr_BinaryOp_NotEqual( + left: Scalar_LNumber( + value: 0 + ) + right: Scalar_String( + value: 0 + ) + ) + ) + ) + ) + 23: Stmt_Const( + consts: array( + 0: Const( + name: T_24 + value: Expr_BinaryOp_Equal( + left: Scalar_LNumber( + value: 1 + ) + right: Scalar_String( + value: 1 + ) + ) + ) + ) + ) + 24: Stmt_Const( + consts: array( + 0: Const( + name: T_25 + value: Expr_BinaryOp_Plus( + left: Scalar_LNumber( + value: 1 + ) + right: Expr_BinaryOp_Mul( + left: Scalar_LNumber( + value: 2 + ) + right: Scalar_LNumber( + value: 3 + ) + ) + ) + ) + ) + ) + 25: Stmt_Const( + consts: array( + 0: Const( + name: T_26 + value: Expr_BinaryOp_Plus( + left: Expr_BinaryOp_Plus( + left: Scalar_String( + value: 1 + ) + right: Scalar_LNumber( + value: 2 + ) + ) + right: Scalar_String( + value: 3 + ) + ) + ) + ) + ) + 26: Stmt_Const( + consts: array( + 0: Const( + name: T_27 + value: Expr_BinaryOp_Pow( + left: Scalar_LNumber( + value: 2 + ) + right: Scalar_LNumber( + value: 3 + ) + ) + ) + ) + ) + 27: Stmt_Const( + consts: array( + 0: Const( + name: T_28 + value: Expr_ArrayDimFetch( + var: Expr_Array( + items: array( + 0: Expr_ArrayItem( + key: null + value: Scalar_LNumber( + value: 1 + ) + byRef: false + ) + 1: Expr_ArrayItem( + key: null + value: Scalar_LNumber( + value: 2 + ) + byRef: false + ) + 2: Expr_ArrayItem( + key: null + value: Scalar_LNumber( + value: 3 + ) + byRef: false + ) + ) + ) + dim: Scalar_LNumber( + value: 1 + ) + ) + ) + ) + ) + 28: Stmt_Const( + consts: array( + 0: Const( + name: T_29 + value: Expr_BinaryOp_Minus( + left: Scalar_LNumber( + value: 12 + ) + right: Scalar_LNumber( + value: 13 + ) + ) + ) + ) + ) + 29: Stmt_Const( + consts: array( + 0: Const( + name: T_30 + value: Expr_BinaryOp_BitwiseXor( + left: Scalar_LNumber( + value: 12 + ) + right: Scalar_LNumber( + value: 13 + ) + ) + ) + ) + ) + 30: Stmt_Const( + consts: array( + 0: Const( + name: T_31 + value: Expr_BinaryOp_BitwiseAnd( + left: Scalar_LNumber( + value: 12 + ) + right: Scalar_LNumber( + value: 13 + ) + ) + ) + ) + ) + 31: Stmt_Const( + consts: array( + 0: Const( + name: T_32 + value: Expr_BinaryOp_BitwiseOr( + left: Scalar_LNumber( + value: 12 + ) + right: Scalar_LNumber( + value: 13 + ) + ) + ) + ) + ) + 32: Stmt_Const( + consts: array( + 0: Const( + name: T_33 + value: Expr_BinaryOp_Mod( + left: Scalar_LNumber( + value: 12 + ) + right: Scalar_LNumber( + value: 3 + ) + ) + ) + ) + ) + 33: Stmt_Const( + consts: array( + 0: Const( + name: T_34 + value: Expr_BinaryOp_ShiftRight( + left: Scalar_LNumber( + value: 100 + ) + right: Scalar_LNumber( + value: 4 + ) + ) + ) + ) + ) + 34: Stmt_Const( + consts: array( + 0: Const( + name: T_35 + value: Expr_BooleanNot( + expr: Expr_ConstFetch( + name: Name( + parts: array( + 0: false + ) + ) + ) + ) + ) + ) + ) +) \ No newline at end of file diff --git a/vendor/nikic/php-parser/test/code/parser/expr/errorSuppress.test b/vendor/nikic/php-parser/test/code/parser/expr/errorSuppress.test new file mode 100644 index 0000000..ce3fce9 --- /dev/null +++ b/vendor/nikic/php-parser/test/code/parser/expr/errorSuppress.test @@ -0,0 +1,12 @@ +Error suppression +----- +b['c'](); + +// array dereferencing +a()['b']; +----- +array( + 0: Expr_FuncCall( + name: Name( + parts: array( + 0: a + ) + comments: array( + 0: // function name variations + ) + ) + args: array( + ) + comments: array( + 0: // function name variations + ) + ) + 1: Expr_FuncCall( + name: Expr_Variable( + name: a + ) + args: array( + ) + ) + 2: Expr_FuncCall( + name: Expr_Variable( + name: Scalar_String( + value: a + ) + ) + args: array( + ) + ) + 3: Expr_FuncCall( + name: Expr_Variable( + name: Expr_Variable( + name: a + ) + ) + args: array( + ) + ) + 4: Expr_FuncCall( + name: Expr_Variable( + name: Expr_Variable( + name: Expr_Variable( + name: a + ) + ) + ) + args: array( + ) + ) + 5: Expr_FuncCall( + name: Expr_ArrayDimFetch( + var: Expr_Variable( + name: a + ) + dim: Scalar_String( + value: b + ) + ) + args: array( + ) + ) + 6: Expr_FuncCall( + name: Expr_ArrayDimFetch( + var: Expr_Variable( + name: a + ) + dim: Scalar_String( + value: b + ) + ) + args: array( + ) + ) + 7: Expr_FuncCall( + name: Expr_ArrayDimFetch( + var: Expr_PropertyFetch( + var: Expr_Variable( + name: a + ) + name: b + ) + dim: Scalar_String( + value: c + ) + ) + args: array( + ) + ) + 8: Expr_ArrayDimFetch( + var: Expr_FuncCall( + name: Name( + parts: array( + 0: a + ) + comments: array( + 0: // array dereferencing + ) + ) + args: array( + ) + comments: array( + 0: // array dereferencing + ) + ) + dim: Scalar_String( + value: b + ) + comments: array( + 0: // array dereferencing + ) + ) +) \ No newline at end of file diff --git a/vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/newDeref.test b/vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/newDeref.test new file mode 100644 index 0000000..5e36ff8 --- /dev/null +++ b/vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/newDeref.test @@ -0,0 +1,70 @@ +New expression dereferencing +----- +b; +(new A)->b(); +(new A)['b']; +(new A)['b']['c']; +----- +array( + 0: Expr_PropertyFetch( + var: Expr_New( + class: Name( + parts: array( + 0: A + ) + ) + args: array( + ) + ) + name: b + ) + 1: Expr_MethodCall( + var: Expr_New( + class: Name( + parts: array( + 0: A + ) + ) + args: array( + ) + ) + name: b + args: array( + ) + ) + 2: Expr_ArrayDimFetch( + var: Expr_New( + class: Name( + parts: array( + 0: A + ) + ) + args: array( + ) + ) + dim: Scalar_String( + value: b + ) + ) + 3: Expr_ArrayDimFetch( + var: Expr_ArrayDimFetch( + var: Expr_New( + class: Name( + parts: array( + 0: A + ) + ) + args: array( + ) + ) + dim: Scalar_String( + value: b + ) + ) + dim: Scalar_String( + value: c + ) + ) +) \ No newline at end of file diff --git a/vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/objectAccess.test b/vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/objectAccess.test new file mode 100644 index 0000000..584461b --- /dev/null +++ b/vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/objectAccess.test @@ -0,0 +1,145 @@ +Object access +----- +b; +$a->b['c']; +$a->b{'c'}; + +// method call variations +$a->b(); +$a->{'b'}(); +$a->$b(); +$a->$b['c'](); + +// array dereferencing +$a->b()['c']; +$a->b(){'c'}; // invalid PHP: drop Support? +----- +!!php5 +array( + 0: Expr_PropertyFetch( + var: Expr_Variable( + name: a + comments: array( + 0: // property fetch variations + ) + ) + name: b + comments: array( + 0: // property fetch variations + ) + ) + 1: Expr_ArrayDimFetch( + var: Expr_PropertyFetch( + var: Expr_Variable( + name: a + ) + name: b + ) + dim: Scalar_String( + value: c + ) + ) + 2: Expr_ArrayDimFetch( + var: Expr_PropertyFetch( + var: Expr_Variable( + name: a + ) + name: b + ) + dim: Scalar_String( + value: c + ) + ) + 3: Expr_MethodCall( + var: Expr_Variable( + name: a + comments: array( + 0: // method call variations + ) + ) + name: b + args: array( + ) + comments: array( + 0: // method call variations + ) + ) + 4: Expr_MethodCall( + var: Expr_Variable( + name: a + ) + name: Scalar_String( + value: b + ) + args: array( + ) + ) + 5: Expr_MethodCall( + var: Expr_Variable( + name: a + ) + name: Expr_Variable( + name: b + ) + args: array( + ) + ) + 6: Expr_MethodCall( + var: Expr_Variable( + name: a + ) + name: Expr_ArrayDimFetch( + var: Expr_Variable( + name: b + ) + dim: Scalar_String( + value: c + ) + ) + args: array( + ) + ) + 7: Expr_ArrayDimFetch( + var: Expr_MethodCall( + var: Expr_Variable( + name: a + comments: array( + 0: // array dereferencing + ) + ) + name: b + args: array( + ) + comments: array( + 0: // array dereferencing + ) + ) + dim: Scalar_String( + value: c + ) + comments: array( + 0: // array dereferencing + ) + ) + 8: Expr_ArrayDimFetch( + var: Expr_MethodCall( + var: Expr_Variable( + name: a + ) + name: b + args: array( + ) + ) + dim: Scalar_String( + value: c + ) + ) + 9: Stmt_Nop( + comments: array( + 0: // invalid PHP: drop Support? + ) + ) +) \ No newline at end of file diff --git a/vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/simpleArrayAccess.test b/vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/simpleArrayAccess.test new file mode 100644 index 0000000..ea3f9ef --- /dev/null +++ b/vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/simpleArrayAccess.test @@ -0,0 +1,62 @@ +Simple array access +----- + $b) = ['a' => 'b']; +list('a' => list($b => $c), 'd' => $e) = $x; +----- +!!php7 +array( + 0: Expr_Assign( + var: Expr_List( + items: array( + 0: Expr_ArrayItem( + key: Scalar_String( + value: a + ) + value: Expr_Variable( + name: b + ) + byRef: false + ) + ) + ) + expr: Expr_Array( + items: array( + 0: Expr_ArrayItem( + key: Scalar_String( + value: a + ) + value: Scalar_String( + value: b + ) + byRef: false + ) + ) + ) + ) + 1: Expr_Assign( + var: Expr_List( + items: array( + 0: Expr_ArrayItem( + key: Scalar_String( + value: a + ) + value: Expr_List( + items: array( + 0: Expr_ArrayItem( + key: Expr_Variable( + name: b + ) + value: Expr_Variable( + name: c + ) + byRef: false + ) + ) + ) + byRef: false + ) + 1: Expr_ArrayItem( + key: Scalar_String( + value: d + ) + value: Expr_Variable( + name: e + ) + byRef: false + ) + ) + ) + expr: Expr_Variable( + name: x + ) + ) +) \ No newline at end of file diff --git a/vendor/nikic/php-parser/test/code/parser/expr/logic.test b/vendor/nikic/php-parser/test/code/parser/expr/logic.test new file mode 100644 index 0000000..b3634e9 --- /dev/null +++ b/vendor/nikic/php-parser/test/code/parser/expr/logic.test @@ -0,0 +1,159 @@ +Logical operators +----- +> $b; +$a ** $b; + +// associativity +$a * $b * $c; +$a * ($b * $c); + +// precedence +$a + $b * $c; +($a + $b) * $c; + +// pow is special +$a ** $b ** $c; +($a ** $b) ** $c; +----- +array( + 0: Expr_BitwiseNot( + expr: Expr_Variable( + name: a + ) + comments: array( + 0: // unary ops + ) + ) + 1: Expr_UnaryPlus( + expr: Expr_Variable( + name: a + ) + ) + 2: Expr_UnaryMinus( + expr: Expr_Variable( + name: a + ) + ) + 3: Expr_BinaryOp_BitwiseAnd( + left: Expr_Variable( + name: a + comments: array( + 0: // binary ops + ) + ) + right: Expr_Variable( + name: b + ) + comments: array( + 0: // binary ops + ) + ) + 4: Expr_BinaryOp_BitwiseOr( + left: Expr_Variable( + name: a + ) + right: Expr_Variable( + name: b + ) + ) + 5: Expr_BinaryOp_BitwiseXor( + left: Expr_Variable( + name: a + ) + right: Expr_Variable( + name: b + ) + ) + 6: Expr_BinaryOp_Concat( + left: Expr_Variable( + name: a + ) + right: Expr_Variable( + name: b + ) + ) + 7: Expr_BinaryOp_Div( + left: Expr_Variable( + name: a + ) + right: Expr_Variable( + name: b + ) + ) + 8: Expr_BinaryOp_Minus( + left: Expr_Variable( + name: a + ) + right: Expr_Variable( + name: b + ) + ) + 9: Expr_BinaryOp_Mod( + left: Expr_Variable( + name: a + ) + right: Expr_Variable( + name: b + ) + ) + 10: Expr_BinaryOp_Mul( + left: Expr_Variable( + name: a + ) + right: Expr_Variable( + name: b + ) + ) + 11: Expr_BinaryOp_Plus( + left: Expr_Variable( + name: a + ) + right: Expr_Variable( + name: b + ) + ) + 12: Expr_BinaryOp_ShiftLeft( + left: Expr_Variable( + name: a + ) + right: Expr_Variable( + name: b + ) + ) + 13: Expr_BinaryOp_ShiftRight( + left: Expr_Variable( + name: a + ) + right: Expr_Variable( + name: b + ) + ) + 14: Expr_BinaryOp_Pow( + left: Expr_Variable( + name: a + ) + right: Expr_Variable( + name: b + ) + ) + 15: Expr_BinaryOp_Mul( + left: Expr_BinaryOp_Mul( + left: Expr_Variable( + name: a + comments: array( + 0: // associativity + ) + ) + right: Expr_Variable( + name: b + ) + comments: array( + 0: // associativity + ) + ) + right: Expr_Variable( + name: c + ) + comments: array( + 0: // associativity + ) + ) + 16: Expr_BinaryOp_Mul( + left: Expr_Variable( + name: a + ) + right: Expr_BinaryOp_Mul( + left: Expr_Variable( + name: b + ) + right: Expr_Variable( + name: c + ) + ) + ) + 17: Expr_BinaryOp_Plus( + left: Expr_Variable( + name: a + comments: array( + 0: // precedence + ) + ) + right: Expr_BinaryOp_Mul( + left: Expr_Variable( + name: b + ) + right: Expr_Variable( + name: c + ) + ) + comments: array( + 0: // precedence + ) + ) + 18: Expr_BinaryOp_Mul( + left: Expr_BinaryOp_Plus( + left: Expr_Variable( + name: a + ) + right: Expr_Variable( + name: b + ) + ) + right: Expr_Variable( + name: c + ) + ) + 19: Expr_BinaryOp_Pow( + left: Expr_Variable( + name: a + comments: array( + 0: // pow is special + ) + ) + right: Expr_BinaryOp_Pow( + left: Expr_Variable( + name: b + ) + right: Expr_Variable( + name: c + ) + ) + comments: array( + 0: // pow is special + ) + ) + 20: Expr_BinaryOp_Pow( + left: Expr_BinaryOp_Pow( + left: Expr_Variable( + name: a + ) + right: Expr_Variable( + name: b + ) + ) + right: Expr_Variable( + name: c + ) + ) +) \ No newline at end of file diff --git a/vendor/nikic/php-parser/test/code/parser/expr/new.test b/vendor/nikic/php-parser/test/code/parser/expr/new.test new file mode 100644 index 0000000..a132bbb --- /dev/null +++ b/vendor/nikic/php-parser/test/code/parser/expr/new.test @@ -0,0 +1,146 @@ +New +----- +b(); +new $a->b->c(); +new $a->b['c'](); +new $a->b{'c'}(); + +// test regression introduces by new dereferencing syntax +(new A); +----- +array( + 0: Expr_New( + class: Name( + parts: array( + 0: A + ) + ) + args: array( + ) + ) + 1: Expr_New( + class: Name( + parts: array( + 0: A + ) + ) + args: array( + 0: Arg( + value: Expr_Variable( + name: b + ) + byRef: false + unpack: false + ) + ) + ) + 2: Expr_New( + class: Expr_Variable( + name: a + ) + args: array( + ) + comments: array( + 0: // class name variations + ) + ) + 3: Expr_New( + class: Expr_ArrayDimFetch( + var: Expr_Variable( + name: a + ) + dim: Scalar_String( + value: b + ) + ) + args: array( + ) + ) + 4: Expr_New( + class: Expr_StaticPropertyFetch( + class: Name( + parts: array( + 0: A + ) + ) + name: b + ) + args: array( + ) + ) + 5: Expr_New( + class: Expr_PropertyFetch( + var: Expr_Variable( + name: a + ) + name: b + ) + args: array( + ) + comments: array( + 0: // DNCR object access + ) + ) + 6: Expr_New( + class: Expr_PropertyFetch( + var: Expr_PropertyFetch( + var: Expr_Variable( + name: a + ) + name: b + ) + name: c + ) + args: array( + ) + ) + 7: Expr_New( + class: Expr_ArrayDimFetch( + var: Expr_PropertyFetch( + var: Expr_Variable( + name: a + ) + name: b + ) + dim: Scalar_String( + value: c + ) + ) + args: array( + ) + ) + 8: Expr_New( + class: Expr_ArrayDimFetch( + var: Expr_PropertyFetch( + var: Expr_Variable( + name: a + ) + name: b + ) + dim: Scalar_String( + value: c + ) + ) + args: array( + ) + ) + 9: Expr_New( + class: Name( + parts: array( + 0: A + ) + ) + args: array( + ) + ) +) \ No newline at end of file diff --git a/vendor/nikic/php-parser/test/code/parser/expr/newWithoutClass.test b/vendor/nikic/php-parser/test/code/parser/expr/newWithoutClass.test new file mode 100644 index 0000000..ca7f498 --- /dev/null +++ b/vendor/nikic/php-parser/test/code/parser/expr/newWithoutClass.test @@ -0,0 +1,23 @@ +New without a class +----- +bar; +----- +!!php7 +Syntax error, unexpected T_OBJECT_OPERATOR, expecting ';' from 2:13 to 2:14 +array( + 0: Stmt_Global( + vars: array( + 0: Expr_Variable( + name: Expr_Variable( + name: foo + ) + ) + ) + ) + 1: Expr_ConstFetch( + name: Name( + parts: array( + 0: bar + ) + ) + ) +) \ No newline at end of file diff --git a/vendor/nikic/php-parser/test/code/parser/expr/uvs/indirectCall.test b/vendor/nikic/php-parser/test/code/parser/expr/uvs/indirectCall.test new file mode 100644 index 0000000..bb3e7fb --- /dev/null +++ b/vendor/nikic/php-parser/test/code/parser/expr/uvs/indirectCall.test @@ -0,0 +1,481 @@ +UVS indirect calls +----- + 'b']->a); +isset("str"->a); +----- +!!php7 +array( + 0: Expr_Isset( + vars: array( + 0: Expr_ArrayDimFetch( + var: Expr_BinaryOp_Plus( + left: Expr_Array( + items: array( + 0: Expr_ArrayItem( + key: null + value: Scalar_LNumber( + value: 0 + ) + byRef: false + ) + 1: Expr_ArrayItem( + key: null + value: Scalar_LNumber( + value: 1 + ) + byRef: false + ) + ) + ) + right: Expr_Array( + items: array( + ) + ) + ) + dim: Scalar_LNumber( + value: 0 + ) + ) + ) + ) + 1: Expr_Isset( + vars: array( + 0: Expr_PropertyFetch( + var: Expr_Array( + items: array( + 0: Expr_ArrayItem( + key: Scalar_String( + value: a + ) + value: Scalar_String( + value: b + ) + byRef: false + ) + ) + ) + name: a + ) + ) + ) + 2: Expr_Isset( + vars: array( + 0: Expr_PropertyFetch( + var: Scalar_String( + value: str + ) + name: a + ) + ) + ) +) diff --git a/vendor/nikic/php-parser/test/code/parser/expr/uvs/misc.test b/vendor/nikic/php-parser/test/code/parser/expr/uvs/misc.test new file mode 100644 index 0000000..2c5ba90 --- /dev/null +++ b/vendor/nikic/php-parser/test/code/parser/expr/uvs/misc.test @@ -0,0 +1,109 @@ +Uniform variable syntax in PHP 7 (misc) +----- +length(); +(clone $obj)->b[0](1); +[0, 1][0] = 1; +----- +!!php7 +array( + 0: Expr_ArrayDimFetch( + var: Expr_ClassConstFetch( + class: Name( + parts: array( + 0: A + ) + ) + name: A + ) + dim: Scalar_LNumber( + value: 0 + ) + ) + 1: Expr_ArrayDimFetch( + var: Expr_ArrayDimFetch( + var: Expr_ArrayDimFetch( + var: Expr_ClassConstFetch( + class: Name( + parts: array( + 0: A + ) + ) + name: A + ) + dim: Scalar_LNumber( + value: 0 + ) + ) + dim: Scalar_LNumber( + value: 1 + ) + ) + dim: Scalar_LNumber( + value: 2 + ) + ) + 2: Expr_MethodCall( + var: Scalar_String( + value: string + ) + name: length + args: array( + ) + ) + 3: Expr_FuncCall( + name: Expr_ArrayDimFetch( + var: Expr_PropertyFetch( + var: Expr_Clone( + expr: Expr_Variable( + name: obj + ) + ) + name: b + ) + dim: Scalar_LNumber( + value: 0 + ) + ) + args: array( + 0: Arg( + value: Scalar_LNumber( + value: 1 + ) + byRef: false + unpack: false + ) + ) + ) + 4: Expr_Assign( + var: Expr_ArrayDimFetch( + var: Expr_Array( + items: array( + 0: Expr_ArrayItem( + key: null + value: Scalar_LNumber( + value: 0 + ) + byRef: false + ) + 1: Expr_ArrayItem( + key: null + value: Scalar_LNumber( + value: 1 + ) + byRef: false + ) + ) + ) + dim: Scalar_LNumber( + value: 0 + ) + ) + expr: Scalar_LNumber( + value: 1 + ) + ) +) diff --git a/vendor/nikic/php-parser/test/code/parser/expr/uvs/new.test b/vendor/nikic/php-parser/test/code/parser/expr/uvs/new.test new file mode 100644 index 0000000..e5f92f9 --- /dev/null +++ b/vendor/nikic/php-parser/test/code/parser/expr/uvs/new.test @@ -0,0 +1,95 @@ +UVS new expressions +----- +className; +new Test::$className; +new $test::$className; +new $weird[0]->foo::$className; +----- +!!php7 +array( + 0: Expr_New( + class: Expr_Variable( + name: className + ) + args: array( + ) + ) + 1: Expr_New( + class: Expr_ArrayDimFetch( + var: Expr_Variable( + name: array + ) + dim: Scalar_String( + value: className + ) + ) + args: array( + ) + ) + 2: Expr_New( + class: Expr_ArrayDimFetch( + var: Expr_Variable( + name: array + ) + dim: Scalar_String( + value: className + ) + ) + args: array( + ) + ) + 3: Expr_New( + class: Expr_PropertyFetch( + var: Expr_Variable( + name: obj + ) + name: className + ) + args: array( + ) + ) + 4: Expr_New( + class: Expr_StaticPropertyFetch( + class: Name( + parts: array( + 0: Test + ) + ) + name: className + ) + args: array( + ) + ) + 5: Expr_New( + class: Expr_StaticPropertyFetch( + class: Expr_Variable( + name: test + ) + name: className + ) + args: array( + ) + ) + 6: Expr_New( + class: Expr_StaticPropertyFetch( + class: Expr_PropertyFetch( + var: Expr_ArrayDimFetch( + var: Expr_Variable( + name: weird + ) + dim: Scalar_LNumber( + value: 0 + ) + ) + name: foo + ) + name: className + ) + args: array( + ) + ) +) diff --git a/vendor/nikic/php-parser/test/code/parser/expr/uvs/staticProperty.test b/vendor/nikic/php-parser/test/code/parser/expr/uvs/staticProperty.test new file mode 100644 index 0000000..5fadfc4 --- /dev/null +++ b/vendor/nikic/php-parser/test/code/parser/expr/uvs/staticProperty.test @@ -0,0 +1,93 @@ +UVS static access +----- +c test +EOS; + +b<<B"; +"$A[B]"; +"$A[0]"; +"$A[1234]"; +"$A[9223372036854775808]"; +"$A[000]"; +"$A[0x0]"; +"$A[0b0]"; +"$A[$B]"; +"{$A}"; +"{$A['B']}"; +"${A}"; +"${A['B']}"; +"${$A}"; +"\{$A}"; +"\{ $A }"; +"\\{$A}"; +"\\{ $A }"; +"{$$A}[B]"; +"$$A[B]"; +"A $B C"; +b"$A"; +B"$A"; +----- +array( + 0: Scalar_Encapsed( + parts: array( + 0: Expr_Variable( + name: A + ) + ) + ) + 1: Scalar_Encapsed( + parts: array( + 0: Expr_PropertyFetch( + var: Expr_Variable( + name: A + ) + name: B + ) + ) + ) + 2: Scalar_Encapsed( + parts: array( + 0: Expr_ArrayDimFetch( + var: Expr_Variable( + name: A + ) + dim: Scalar_String( + value: B + ) + ) + ) + ) + 3: Scalar_Encapsed( + parts: array( + 0: Expr_ArrayDimFetch( + var: Expr_Variable( + name: A + ) + dim: Scalar_LNumber( + value: 0 + ) + ) + ) + ) + 4: Scalar_Encapsed( + parts: array( + 0: Expr_ArrayDimFetch( + var: Expr_Variable( + name: A + ) + dim: Scalar_LNumber( + value: 1234 + ) + ) + ) + ) + 5: Scalar_Encapsed( + parts: array( + 0: Expr_ArrayDimFetch( + var: Expr_Variable( + name: A + ) + dim: Scalar_String( + value: 9223372036854775808 + ) + ) + ) + ) + 6: Scalar_Encapsed( + parts: array( + 0: Expr_ArrayDimFetch( + var: Expr_Variable( + name: A + ) + dim: Scalar_String( + value: 000 + ) + ) + ) + ) + 7: Scalar_Encapsed( + parts: array( + 0: Expr_ArrayDimFetch( + var: Expr_Variable( + name: A + ) + dim: Scalar_String( + value: 0x0 + ) + ) + ) + ) + 8: Scalar_Encapsed( + parts: array( + 0: Expr_ArrayDimFetch( + var: Expr_Variable( + name: A + ) + dim: Scalar_String( + value: 0b0 + ) + ) + ) + ) + 9: Scalar_Encapsed( + parts: array( + 0: Expr_ArrayDimFetch( + var: Expr_Variable( + name: A + ) + dim: Expr_Variable( + name: B + ) + ) + ) + ) + 10: Scalar_Encapsed( + parts: array( + 0: Expr_Variable( + name: A + ) + ) + ) + 11: Scalar_Encapsed( + parts: array( + 0: Expr_ArrayDimFetch( + var: Expr_Variable( + name: A + ) + dim: Scalar_String( + value: B + ) + ) + ) + ) + 12: Scalar_Encapsed( + parts: array( + 0: Expr_Variable( + name: A + ) + ) + ) + 13: Scalar_Encapsed( + parts: array( + 0: Expr_ArrayDimFetch( + var: Expr_Variable( + name: A + ) + dim: Scalar_String( + value: B + ) + ) + ) + ) + 14: Scalar_Encapsed( + parts: array( + 0: Expr_Variable( + name: Expr_Variable( + name: A + ) + ) + ) + ) + 15: Scalar_Encapsed( + parts: array( + 0: Scalar_EncapsedStringPart( + value: \{ + ) + 1: Expr_Variable( + name: A + ) + 2: Scalar_EncapsedStringPart( + value: } + ) + ) + ) + 16: Scalar_Encapsed( + parts: array( + 0: Scalar_EncapsedStringPart( + value: \{ + ) + 1: Expr_Variable( + name: A + ) + 2: Scalar_EncapsedStringPart( + value: } + ) + ) + ) + 17: Scalar_Encapsed( + parts: array( + 0: Scalar_EncapsedStringPart( + value: \ + ) + 1: Expr_Variable( + name: A + ) + ) + ) + 18: Scalar_Encapsed( + parts: array( + 0: Scalar_EncapsedStringPart( + value: \{ + ) + 1: Expr_Variable( + name: A + ) + 2: Scalar_EncapsedStringPart( + value: } + ) + ) + ) + 19: Scalar_Encapsed( + parts: array( + 0: Expr_Variable( + name: Expr_Variable( + name: A + ) + ) + 1: Scalar_EncapsedStringPart( + value: [B] + ) + ) + ) + 20: Scalar_Encapsed( + parts: array( + 0: Scalar_EncapsedStringPart( + value: $ + ) + 1: Expr_ArrayDimFetch( + var: Expr_Variable( + name: A + ) + dim: Scalar_String( + value: B + ) + ) + ) + ) + 21: Scalar_Encapsed( + parts: array( + 0: Scalar_EncapsedStringPart( + value: A + ) + 1: Expr_Variable( + name: B + ) + 2: Scalar_EncapsedStringPart( + value: C + ) + ) + ) + 22: Scalar_Encapsed( + parts: array( + 0: Expr_Variable( + name: A + ) + ) + ) + 23: Scalar_Encapsed( + parts: array( + 0: Expr_Variable( + name: A + ) + ) + ) +) \ No newline at end of file diff --git a/vendor/nikic/php-parser/test/code/parser/scalar/float.test b/vendor/nikic/php-parser/test/code/parser/scalar/float.test new file mode 100644 index 0000000..a16028e --- /dev/null +++ b/vendor/nikic/php-parser/test/code/parser/scalar/float.test @@ -0,0 +1,74 @@ +Different float syntaxes +----- + float overflows +// (all are actually the same number, just in different representations) +18446744073709551615; +0xFFFFFFFFFFFFFFFF; +01777777777777777777777; +0177777777777777777777787; +0b1111111111111111111111111111111111111111111111111111111111111111; +----- +array( + 0: Scalar_DNumber( + value: 0 + ) + 1: Scalar_DNumber( + value: 0 + ) + 2: Scalar_DNumber( + value: 0 + ) + 3: Scalar_DNumber( + value: 0 + ) + 4: Scalar_DNumber( + value: 0 + ) + 5: Scalar_DNumber( + value: 0 + ) + 6: Scalar_DNumber( + value: 0 + ) + 7: Scalar_DNumber( + value: 302000000000 + ) + 8: Scalar_DNumber( + value: 3.002E+102 + ) + 9: Scalar_DNumber( + value: INF + ) + 10: Scalar_DNumber( + value: 1.844674407371E+19 + comments: array( + 0: // various integer -> float overflows + 1: // (all are actually the same number, just in different representations) + ) + ) + 11: Scalar_DNumber( + value: 1.844674407371E+19 + ) + 12: Scalar_DNumber( + value: 1.844674407371E+19 + ) + 13: Scalar_DNumber( + value: 1.844674407371E+19 + ) + 14: Scalar_DNumber( + value: 1.844674407371E+19 + ) +) \ No newline at end of file diff --git a/vendor/nikic/php-parser/test/code/parser/scalar/int.test b/vendor/nikic/php-parser/test/code/parser/scalar/int.test new file mode 100644 index 0000000..5a21267 --- /dev/null +++ b/vendor/nikic/php-parser/test/code/parser/scalar/int.test @@ -0,0 +1,43 @@ +Different integer syntaxes +----- +array(); +$t->public(); + +Test::list(); +Test::protected(); + +$t->class; +$t->private; + +Test::TRAIT; +Test::FINAL; + +class Foo { + use TraitA, TraitB { + TraitA::catch insteadof namespace\TraitB; + TraitA::list as foreach; + TraitB::throw as protected public; + TraitB::self as protected; + exit as die; + \TraitC::exit as bye; + namespace\TraitC::exit as byebye; + TraitA:: + // + /** doc comment */ + # + catch /* comment */ + // comment + # comment + insteadof TraitB; + } +} +----- +array( + 0: Stmt_Class( + flags: 0 + name: Test + extends: null + implements: array( + ) + stmts: array( + 0: Stmt_ClassMethod( + flags: 0 + byRef: false + name: array + params: array( + ) + returnType: null + stmts: array( + ) + ) + 1: Stmt_ClassMethod( + flags: 0 + byRef: false + name: public + params: array( + ) + returnType: null + stmts: array( + ) + ) + 2: Stmt_ClassMethod( + flags: MODIFIER_STATIC (8) + byRef: false + name: list + params: array( + ) + returnType: null + stmts: array( + ) + ) + 3: Stmt_ClassMethod( + flags: MODIFIER_STATIC (8) + byRef: false + name: protected + params: array( + ) + returnType: null + stmts: array( + ) + ) + 4: Stmt_Property( + flags: MODIFIER_PUBLIC (1) + props: array( + 0: Stmt_PropertyProperty( + name: class + default: null + ) + ) + ) + 5: Stmt_Property( + flags: MODIFIER_PUBLIC (1) + props: array( + 0: Stmt_PropertyProperty( + name: private + default: null + ) + ) + ) + 6: Stmt_ClassConst( + flags: 0 + consts: array( + 0: Const( + name: TRAIT + value: Scalar_LNumber( + value: 3 + ) + ) + 1: Const( + name: FINAL + value: Scalar_LNumber( + value: 4 + ) + ) + ) + ) + 7: Stmt_ClassConst( + flags: 0 + consts: array( + 0: Const( + name: __CLASS__ + value: Scalar_LNumber( + value: 1 + ) + ) + 1: Const( + name: __TRAIT__ + value: Scalar_LNumber( + value: 2 + ) + ) + 2: Const( + name: __FUNCTION__ + value: Scalar_LNumber( + value: 3 + ) + ) + 3: Const( + name: __METHOD__ + value: Scalar_LNumber( + value: 4 + ) + ) + 4: Const( + name: __LINE__ + value: Scalar_LNumber( + value: 5 + ) + ) + 5: Const( + name: __FILE__ + value: Scalar_LNumber( + value: 6 + ) + ) + 6: Const( + name: __DIR__ + value: Scalar_LNumber( + value: 7 + ) + ) + 7: Const( + name: __NAMESPACE__ + value: Scalar_LNumber( + value: 8 + ) + ) + ) + ) + ) + ) + 1: Expr_Assign( + var: Expr_Variable( + name: t + ) + expr: Expr_New( + class: Name( + parts: array( + 0: Test + ) + ) + args: array( + ) + ) + ) + 2: Expr_MethodCall( + var: Expr_Variable( + name: t + ) + name: array + args: array( + ) + ) + 3: Expr_MethodCall( + var: Expr_Variable( + name: t + ) + name: public + args: array( + ) + ) + 4: Expr_StaticCall( + class: Name( + parts: array( + 0: Test + ) + ) + name: list + args: array( + ) + ) + 5: Expr_StaticCall( + class: Name( + parts: array( + 0: Test + ) + ) + name: protected + args: array( + ) + ) + 6: Expr_PropertyFetch( + var: Expr_Variable( + name: t + ) + name: class + ) + 7: Expr_PropertyFetch( + var: Expr_Variable( + name: t + ) + name: private + ) + 8: Expr_ClassConstFetch( + class: Name( + parts: array( + 0: Test + ) + ) + name: TRAIT + ) + 9: Expr_ClassConstFetch( + class: Name( + parts: array( + 0: Test + ) + ) + name: FINAL + ) + 10: Stmt_Class( + flags: 0 + name: Foo + extends: null + implements: array( + ) + stmts: array( + 0: Stmt_TraitUse( + traits: array( + 0: Name( + parts: array( + 0: TraitA + ) + ) + 1: Name( + parts: array( + 0: TraitB + ) + ) + ) + adaptations: array( + 0: Stmt_TraitUseAdaptation_Precedence( + trait: Name( + parts: array( + 0: TraitA + ) + ) + method: catch + insteadof: array( + 0: Name_Relative( + parts: array( + 0: TraitB + ) + ) + ) + ) + 1: Stmt_TraitUseAdaptation_Alias( + trait: Name( + parts: array( + 0: TraitA + ) + ) + method: list + newModifier: null + newName: foreach + ) + 2: Stmt_TraitUseAdaptation_Alias( + trait: Name( + parts: array( + 0: TraitB + ) + ) + method: throw + newModifier: MODIFIER_PROTECTED (2) + newName: public + ) + 3: Stmt_TraitUseAdaptation_Alias( + trait: Name( + parts: array( + 0: TraitB + ) + ) + method: self + newModifier: MODIFIER_PROTECTED (2) + newName: null + ) + 4: Stmt_TraitUseAdaptation_Alias( + trait: null + method: exit + newModifier: null + newName: die + ) + 5: Stmt_TraitUseAdaptation_Alias( + trait: Name_FullyQualified( + parts: array( + 0: TraitC + ) + ) + method: exit + newModifier: null + newName: bye + ) + 6: Stmt_TraitUseAdaptation_Alias( + trait: Name_Relative( + parts: array( + 0: TraitC + ) + ) + method: exit + newModifier: null + newName: byebye + ) + 7: Stmt_TraitUseAdaptation_Precedence( + trait: Name( + parts: array( + 0: TraitA + ) + ) + method: catch + insteadof: array( + 0: Name( + parts: array( + 0: TraitB + ) + ) + ) + ) + ) + ) + ) + ) +) \ No newline at end of file diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/blocklessStatement.test b/vendor/nikic/php-parser/test/code/parser/stmt/blocklessStatement.test new file mode 100644 index 0000000..ae83dab --- /dev/null +++ b/vendor/nikic/php-parser/test/code/parser/stmt/blocklessStatement.test @@ -0,0 +1,112 @@ +Blockless statements for if/for/etc +----- + 'baz'] +) {} +----- +array( + 0: Stmt_Function( + byRef: false + name: a + params: array( + 0: Param( + type: null + byRef: false + variadic: false + name: b + default: Expr_ConstFetch( + name: Name( + parts: array( + 0: null + ) + ) + ) + ) + 1: Param( + type: null + byRef: false + variadic: false + name: c + default: Scalar_String( + value: foo + ) + ) + 2: Param( + type: null + byRef: false + variadic: false + name: d + default: Expr_ClassConstFetch( + class: Name( + parts: array( + 0: A + ) + ) + name: B + ) + ) + 3: Param( + type: null + byRef: false + variadic: false + name: f + default: Expr_UnaryPlus( + expr: Scalar_LNumber( + value: 1 + ) + ) + ) + 4: Param( + type: null + byRef: false + variadic: false + name: g + default: Expr_UnaryMinus( + expr: Scalar_DNumber( + value: 1 + ) + ) + ) + 5: Param( + type: null + byRef: false + variadic: false + name: h + default: Expr_Array( + items: array( + ) + ) + ) + 6: Param( + type: null + byRef: false + variadic: false + name: i + default: Expr_Array( + items: array( + ) + ) + ) + 7: Param( + type: null + byRef: false + variadic: false + name: j + default: Expr_Array( + items: array( + 0: Expr_ArrayItem( + key: null + value: Scalar_String( + value: foo + ) + byRef: false + ) + ) + ) + ) + 8: Param( + type: null + byRef: false + variadic: false + name: k + default: Expr_Array( + items: array( + 0: Expr_ArrayItem( + key: null + value: Scalar_String( + value: foo + ) + byRef: false + ) + 1: Expr_ArrayItem( + key: Scalar_String( + value: bar + ) + value: Scalar_String( + value: baz + ) + byRef: false + ) + ) + ) + ) + ) + returnType: null + stmts: array( + ) + ) +) diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/function/nullableTypes.test b/vendor/nikic/php-parser/test/code/parser/stmt/function/nullableTypes.test new file mode 100644 index 0000000..d96df4f --- /dev/null +++ b/vendor/nikic/php-parser/test/code/parser/stmt/function/nullableTypes.test @@ -0,0 +1,47 @@ +Nullable types +----- + $value; + + // expressions + $data = yield; + $data = (yield $value); + $data = (yield $key => $value); + + // yield in language constructs with their own parentheses + if (yield $foo); elseif (yield $foo); + if (yield $foo): elseif (yield $foo): endif; + while (yield $foo); + do {} while (yield $foo); + switch (yield $foo) {} + die(yield $foo); + + // yield in function calls + func(yield $foo); + $foo->func(yield $foo); + new Foo(yield $foo); + + yield from $foo; + yield from $foo and yield from $bar; + yield from $foo + $bar; +} +----- +array( + 0: Stmt_Function( + byRef: false + name: gen + params: array( + ) + returnType: null + stmts: array( + 0: Expr_Yield( + key: null + value: null + comments: array( + 0: // statements + ) + ) + 1: Expr_Yield( + key: null + value: Expr_Variable( + name: value + ) + ) + 2: Expr_Yield( + key: Expr_Variable( + name: key + ) + value: Expr_Variable( + name: value + ) + ) + 3: Expr_Assign( + var: Expr_Variable( + name: data + comments: array( + 0: // expressions + ) + ) + expr: Expr_Yield( + key: null + value: null + ) + comments: array( + 0: // expressions + ) + ) + 4: Expr_Assign( + var: Expr_Variable( + name: data + ) + expr: Expr_Yield( + key: null + value: Expr_Variable( + name: value + ) + ) + ) + 5: Expr_Assign( + var: Expr_Variable( + name: data + ) + expr: Expr_Yield( + key: Expr_Variable( + name: key + ) + value: Expr_Variable( + name: value + ) + ) + ) + 6: Stmt_If( + cond: Expr_Yield( + key: null + value: Expr_Variable( + name: foo + ) + ) + stmts: array( + ) + elseifs: array( + 0: Stmt_ElseIf( + cond: Expr_Yield( + key: null + value: Expr_Variable( + name: foo + ) + ) + stmts: array( + ) + ) + ) + else: null + comments: array( + 0: // yield in language constructs with their own parentheses + ) + ) + 7: Stmt_If( + cond: Expr_Yield( + key: null + value: Expr_Variable( + name: foo + ) + ) + stmts: array( + ) + elseifs: array( + 0: Stmt_ElseIf( + cond: Expr_Yield( + key: null + value: Expr_Variable( + name: foo + ) + ) + stmts: array( + ) + ) + ) + else: null + ) + 8: Stmt_While( + cond: Expr_Yield( + key: null + value: Expr_Variable( + name: foo + ) + ) + stmts: array( + ) + ) + 9: Stmt_Do( + cond: Expr_Yield( + key: null + value: Expr_Variable( + name: foo + ) + ) + stmts: array( + ) + ) + 10: Stmt_Switch( + cond: Expr_Yield( + key: null + value: Expr_Variable( + name: foo + ) + ) + cases: array( + ) + ) + 11: Expr_Exit( + expr: Expr_Yield( + key: null + value: Expr_Variable( + name: foo + ) + ) + ) + 12: Expr_FuncCall( + name: Name( + parts: array( + 0: func + ) + comments: array( + 0: // yield in function calls + ) + ) + args: array( + 0: Arg( + value: Expr_Yield( + key: null + value: Expr_Variable( + name: foo + ) + ) + byRef: false + unpack: false + ) + ) + comments: array( + 0: // yield in function calls + ) + ) + 13: Expr_MethodCall( + var: Expr_Variable( + name: foo + ) + name: func + args: array( + 0: Arg( + value: Expr_Yield( + key: null + value: Expr_Variable( + name: foo + ) + ) + byRef: false + unpack: false + ) + ) + ) + 14: Expr_New( + class: Name( + parts: array( + 0: Foo + ) + ) + args: array( + 0: Arg( + value: Expr_Yield( + key: null + value: Expr_Variable( + name: foo + ) + ) + byRef: false + unpack: false + ) + ) + ) + 15: Expr_YieldFrom( + expr: Expr_Variable( + name: foo + ) + ) + 16: Expr_BinaryOp_LogicalAnd( + left: Expr_YieldFrom( + expr: Expr_Variable( + name: foo + ) + ) + right: Expr_YieldFrom( + expr: Expr_Variable( + name: bar + ) + ) + ) + 17: Expr_YieldFrom( + expr: Expr_BinaryOp_Plus( + left: Expr_Variable( + name: foo + ) + right: Expr_Variable( + name: bar + ) + ) + ) + ) + ) +) \ No newline at end of file diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/generator/yieldPrecedence.test b/vendor/nikic/php-parser/test/code/parser/stmt/generator/yieldPrecedence.test new file mode 100644 index 0000000..ff0d4df --- /dev/null +++ b/vendor/nikic/php-parser/test/code/parser/stmt/generator/yieldPrecedence.test @@ -0,0 +1,230 @@ +Yield operator precedence +----- + "a" . "b"; + yield "k" => "a" or die; + var_dump([yield "k" => "a" . "b"]); + yield yield "k1" => yield "k2" => "a" . "b"; + yield yield "k1" => (yield "k2") => "a" . "b"; + var_dump([yield "k1" => yield "k2" => "a" . "b"]); + var_dump([yield "k1" => (yield "k2") => "a" . "b"]); +} +----- +!!php7 +array( + 0: Stmt_Function( + byRef: false + name: gen + params: array( + ) + returnType: null + stmts: array( + 0: Expr_Yield( + key: null + value: Expr_BinaryOp_Concat( + left: Scalar_String( + value: a + ) + right: Scalar_String( + value: b + ) + ) + ) + 1: Expr_BinaryOp_LogicalOr( + left: Expr_Yield( + key: null + value: Scalar_String( + value: a + ) + ) + right: Expr_Exit( + expr: null + ) + ) + 2: Expr_Yield( + key: Scalar_String( + value: k + ) + value: Expr_BinaryOp_Concat( + left: Scalar_String( + value: a + ) + right: Scalar_String( + value: b + ) + ) + ) + 3: Expr_BinaryOp_LogicalOr( + left: Expr_Yield( + key: Scalar_String( + value: k + ) + value: Scalar_String( + value: a + ) + ) + right: Expr_Exit( + expr: null + ) + ) + 4: Expr_FuncCall( + name: Name( + parts: array( + 0: var_dump + ) + ) + args: array( + 0: Arg( + value: Expr_Array( + items: array( + 0: Expr_ArrayItem( + key: null + value: Expr_Yield( + key: Scalar_String( + value: k + ) + value: Expr_BinaryOp_Concat( + left: Scalar_String( + value: a + ) + right: Scalar_String( + value: b + ) + ) + ) + byRef: false + ) + ) + ) + byRef: false + unpack: false + ) + ) + ) + 5: Expr_Yield( + key: null + value: Expr_Yield( + key: Scalar_String( + value: k1 + ) + value: Expr_Yield( + key: Scalar_String( + value: k2 + ) + value: Expr_BinaryOp_Concat( + left: Scalar_String( + value: a + ) + right: Scalar_String( + value: b + ) + ) + ) + ) + ) + 6: Expr_Yield( + key: Expr_Yield( + key: Scalar_String( + value: k1 + ) + value: Expr_Yield( + key: null + value: Scalar_String( + value: k2 + ) + ) + ) + value: Expr_BinaryOp_Concat( + left: Scalar_String( + value: a + ) + right: Scalar_String( + value: b + ) + ) + ) + 7: Expr_FuncCall( + name: Name( + parts: array( + 0: var_dump + ) + ) + args: array( + 0: Arg( + value: Expr_Array( + items: array( + 0: Expr_ArrayItem( + key: null + value: Expr_Yield( + key: Scalar_String( + value: k1 + ) + value: Expr_Yield( + key: Scalar_String( + value: k2 + ) + value: Expr_BinaryOp_Concat( + left: Scalar_String( + value: a + ) + right: Scalar_String( + value: b + ) + ) + ) + ) + byRef: false + ) + ) + ) + byRef: false + unpack: false + ) + ) + ) + 8: Expr_FuncCall( + name: Name( + parts: array( + 0: var_dump + ) + ) + args: array( + 0: Arg( + value: Expr_Array( + items: array( + 0: Expr_ArrayItem( + key: Expr_Yield( + key: Scalar_String( + value: k1 + ) + value: Expr_Yield( + key: null + value: Scalar_String( + value: k2 + ) + ) + ) + value: Expr_BinaryOp_Concat( + left: Scalar_String( + value: a + ) + right: Scalar_String( + value: b + ) + ) + byRef: false + ) + ) + ) + byRef: false + unpack: false + ) + ) + ) + ) + ) +) diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/generator/yieldUnaryPrecedence.test b/vendor/nikic/php-parser/test/code/parser/stmt/generator/yieldUnaryPrecedence.test new file mode 100644 index 0000000..13f9660 --- /dev/null +++ b/vendor/nikic/php-parser/test/code/parser/stmt/generator/yieldUnaryPrecedence.test @@ -0,0 +1,48 @@ +Yield with unary operator argument +----- + +Hallo World! +----- +array( + 0: Expr_Variable( + name: a + ) + 1: Stmt_HaltCompiler( + remaining: Hallo World! + ) +) +----- + +#!/usr/bin/env php +----- +array( + 0: Stmt_InlineHTML( + value: #!/usr/bin/env php + + ) + 1: Stmt_Echo( + exprs: array( + 0: Scalar_String( + value: foobar + ) + ) + ) + 2: Stmt_InlineHTML( + value: #!/usr/bin/env php + ) +) diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/if.test b/vendor/nikic/php-parser/test/code/parser/stmt/if.test new file mode 100644 index 0000000..e054c89 --- /dev/null +++ b/vendor/nikic/php-parser/test/code/parser/stmt/if.test @@ -0,0 +1,103 @@ +If/Elseif/Else +----- + +B + + $c) {} +foreach ($a as $b => &$c) {} +foreach ($a as list($a, $b)) {} +foreach ($a as $a => list($b, , $c)) {} + +// foreach on expression +foreach (array() as $b) {} + +// alternative syntax +foreach ($a as $b): +endforeach; +----- +array( + 0: Stmt_Foreach( + expr: Expr_Variable( + name: a + ) + keyVar: null + byRef: false + valueVar: Expr_Variable( + name: b + ) + stmts: array( + ) + comments: array( + 0: // foreach on variable + ) + ) + 1: Stmt_Foreach( + expr: Expr_Variable( + name: a + ) + keyVar: null + byRef: true + valueVar: Expr_Variable( + name: b + ) + stmts: array( + ) + ) + 2: Stmt_Foreach( + expr: Expr_Variable( + name: a + ) + keyVar: Expr_Variable( + name: b + ) + byRef: false + valueVar: Expr_Variable( + name: c + ) + stmts: array( + ) + ) + 3: Stmt_Foreach( + expr: Expr_Variable( + name: a + ) + keyVar: Expr_Variable( + name: b + ) + byRef: true + valueVar: Expr_Variable( + name: c + ) + stmts: array( + ) + ) + 4: Stmt_Foreach( + expr: Expr_Variable( + name: a + ) + keyVar: null + byRef: false + valueVar: Expr_List( + items: array( + 0: Expr_ArrayItem( + key: null + value: Expr_Variable( + name: a + ) + byRef: false + ) + 1: Expr_ArrayItem( + key: null + value: Expr_Variable( + name: b + ) + byRef: false + ) + ) + ) + stmts: array( + ) + ) + 5: Stmt_Foreach( + expr: Expr_Variable( + name: a + ) + keyVar: Expr_Variable( + name: a + ) + byRef: false + valueVar: Expr_List( + items: array( + 0: Expr_ArrayItem( + key: null + value: Expr_Variable( + name: b + ) + byRef: false + ) + 1: null + 2: Expr_ArrayItem( + key: null + value: Expr_Variable( + name: c + ) + byRef: false + ) + ) + ) + stmts: array( + ) + ) + 6: Stmt_Foreach( + expr: Expr_Array( + items: array( + ) + ) + keyVar: null + byRef: false + valueVar: Expr_Variable( + name: b + ) + stmts: array( + ) + comments: array( + 0: // foreach on expression + ) + ) + 7: Stmt_Foreach( + expr: Expr_Variable( + name: a + ) + keyVar: null + byRef: false + valueVar: Expr_Variable( + name: b + ) + stmts: array( + ) + comments: array( + 0: // alternative syntax + ) + ) +) \ No newline at end of file diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/loop/while.test b/vendor/nikic/php-parser/test/code/parser/stmt/loop/while.test new file mode 100644 index 0000000..65f6b23 --- /dev/null +++ b/vendor/nikic/php-parser/test/code/parser/stmt/loop/while.test @@ -0,0 +1,25 @@ +While loop +----- + +Hi! +----- +array( + 0: Stmt_Declare( + declares: array( + 0: Stmt_DeclareDeclare( + key: A + value: Scalar_String( + value: B + ) + ) + ) + stmts: null + ) + 1: Stmt_Namespace( + name: Name( + parts: array( + 0: B + ) + ) + stmts: array( + ) + ) + 2: Stmt_HaltCompiler( + remaining: Hi! + ) +) +----- +a = $a; + } +}; +----- +new class +{ +}; +new class extends A implements B, C +{ +}; +new class($a) extends A +{ + private $a; + public function __construct($a) + { + $this->a = $a; + } +}; diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/expr/arrayDestructuring.test b/vendor/nikic/php-parser/test/code/prettyPrinter/expr/arrayDestructuring.test new file mode 100644 index 0000000..bff1999 --- /dev/null +++ b/vendor/nikic/php-parser/test/code/prettyPrinter/expr/arrayDestructuring.test @@ -0,0 +1,14 @@ +Array destructuring +----- + $b, 'b' => $a] = $baz; +----- +!!php7 +[$a, $b] = [$c, $d]; +[, $a, , , $b, ] = $foo; +[, [[$a]], $b] = $bar; +['a' => $b, 'b' => $a] = $baz; \ No newline at end of file diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/expr/call.test b/vendor/nikic/php-parser/test/code/prettyPrinter/expr/call.test new file mode 100644 index 0000000..0ec8925 --- /dev/null +++ b/vendor/nikic/php-parser/test/code/prettyPrinter/expr/call.test @@ -0,0 +1,13 @@ +Calls +----- +d} +STR; + +call( + <<d} +STR; +call(<<> $b; +$a < $b; +$a <= $b; +$a > $b; +$a >= $b; +$a == $b; +$a != $b; +$a <> $b; +$a === $b; +$a !== $b; +$a <=> $b; +$a & $b; +$a ^ $b; +$a | $b; +$a && $b; +$a || $b; +$a ? $b : $c; +$a ?: $c; +$a ?? $c; + +$a = $b; +$a **= $b; +$a *= $b; +$a /= $b; +$a %= $b; +$a += $b; +$a -= $b; +$a .= $b; +$a <<= $b; +$a >>= $b; +$a &= $b; +$a ^= $b; +$a |= $b; +$a =& $b; + +$a and $b; +$a xor $b; +$a or $b; + +$a instanceof Foo; +$a instanceof $b; +----- +$a ** $b; +++$a; +--$a; +$a++; +$a--; +@$a; +~$a; +-$a; ++$a; +(int) $a; +(int) $a; +(double) $a; +(double) $a; +(double) $a; +(string) $a; +(string) $a; +(array) $a; +(object) $a; +(bool) $a; +(bool) $a; +(unset) $a; +$a * $b; +$a / $b; +$a % $b; +$a + $b; +$a - $b; +$a . $b; +$a << $b; +$a >> $b; +$a < $b; +$a <= $b; +$a > $b; +$a >= $b; +$a == $b; +$a != $b; +$a != $b; +$a === $b; +$a !== $b; +$a <=> $b; +$a & $b; +$a ^ $b; +$a | $b; +$a && $b; +$a || $b; +$a ? $b : $c; +$a ?: $c; +$a ?? $c; +$a = $b; +$a **= $b; +$a *= $b; +$a /= $b; +$a %= $b; +$a += $b; +$a -= $b; +$a .= $b; +$a <<= $b; +$a >>= $b; +$a &= $b; +$a ^= $b; +$a |= $b; +$a =& $b; +$a and $b; +$a xor $b; +$a or $b; +$a instanceof Foo; +$a instanceof $b; diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/expr/parentheses.test b/vendor/nikic/php-parser/test/code/prettyPrinter/expr/parentheses.test new file mode 100644 index 0000000..1f18b65 --- /dev/null +++ b/vendor/nikic/php-parser/test/code/prettyPrinter/expr/parentheses.test @@ -0,0 +1,77 @@ +Pretty printer generates least-parentheses output +----- + 0) > (1 < 0); +++$a + $b; +$a + $b++; + +$a ** $b ** $c; +($a ** $b) ** $c; +-1 ** 2; + +yield from $a and yield from $b; +yield from ($a and yield from $b); + +print ($a and print $b); + +// The following will currently add unnecessary parentheses, because the pretty printer is not aware that assignment +// and incdec only work on variables. +!$a = $b; +++$a ** $b; +$a ** $b++; +----- +echo 'abc' . 'cde' . 'fgh'; +echo 'abc' . ('cde' . 'fgh'); +echo 'abc' . 1 + 2 . 'fgh'; +echo 'abc' . (1 + 2) . 'fgh'; +echo 1 * 2 + 3 / 4 % 5 . 6; +echo 1 * (2 + 3) / (4 % (5 . 6)); +$a = $b = $c = $d = $f && true; +($a = $b = $c = $d = $f) && true; +$a = $b = $c = $d = $f and true; +$a = $b = $c = $d = ($f and true); +$a ? $b : $c ? $d : $e ? $f : $g; +$a ? $b : ($c ? $d : ($e ? $f : $g)); +$a ? $b ? $c : $d : $f; +$a ?? $b ?? $c; +($a ?? $b) ?? $c; +$a ?? ($b ? $c : $d); +$a || ($b ?? $c); +(1 > 0) > (1 < 0); +++$a + $b; +$a + $b++; +$a ** $b ** $c; +($a ** $b) ** $c; +-1 ** 2; +yield from $a and yield from $b; +yield from ($a and yield from $b); +print ($a and print $b); +// The following will currently add unnecessary parentheses, because the pretty printer is not aware that assignment +// and incdec only work on variables. +!($a = $b); +(++$a) ** $b; +$a ** ($b++); diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/expr/shortArraySyntax.test b/vendor/nikic/php-parser/test/code/prettyPrinter/expr/shortArraySyntax.test new file mode 100644 index 0000000..082c2e0 --- /dev/null +++ b/vendor/nikic/php-parser/test/code/prettyPrinter/expr/shortArraySyntax.test @@ -0,0 +1,11 @@ +Short array syntax +----- + 'b', 'c' => 'd']; +----- +[]; +array(1, 2, 3); +['a' => 'b', 'c' => 'd']; \ No newline at end of file diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/expr/stringEscaping.test b/vendor/nikic/php-parser/test/code/prettyPrinter/expr/stringEscaping.test new file mode 100644 index 0000000..02877ad --- /dev/null +++ b/vendor/nikic/php-parser/test/code/prettyPrinter/expr/stringEscaping.test @@ -0,0 +1,23 @@ +Escape sequences in double-quoted strings +----- +b)(); +(A::$b)(); +----- +!!php7 +(function () { +})(); +array('a', 'b')()(); +A::$b::$c; +$A::$b[$c](); +$A::{$b[$c]}(); +A::${$b}[$c](); +($a->b)(); +(A::$b)(); diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/expr/variables.test b/vendor/nikic/php-parser/test/code/prettyPrinter/expr/variables.test new file mode 100644 index 0000000..4e0fa2e --- /dev/null +++ b/vendor/nikic/php-parser/test/code/prettyPrinter/expr/variables.test @@ -0,0 +1,73 @@ +Variables +----- +b; +$a->b(); +$a->b($c); +$a->$b(); +$a->{$b}(); +$a->$b[$c](); +$$a->b; +$a[$b]; +$a[$b](); +$$a[$b]; +$a::B; +$a::$b; +$a::b(); +$a::b($c); +$a::$b(); +$a::$b[$c]; +$a::$b[$c]($d); +$a::{$b[$c]}($d); +$a::{$b->c}(); +A::$$b[$c](); +a(); +$a(); +$a()[$b]; +$a->b()[$c]; +$a::$b()[$c]; +(new A)->b; +(new A())->b(); +(new $$a)[$b]; +(new $a->b)->c; + +global $a, $$a, $$a[$b], $$a->b; +----- +!!php5 +$a; +${$a}; +${$a}; +$a->b; +$a->b(); +$a->b($c); +$a->{$b}(); +$a->{$b}(); +$a->{$b[$c]}(); +${$a}->b; +$a[$b]; +$a[$b](); +${$a[$b]}; +$a::B; +$a::$b; +$a::b(); +$a::b($c); +$a::$b(); +$a::$b[$c]; +$a::{$b[$c]}($d); +$a::{$b[$c]}($d); +$a::{$b->c}(); +A::${$b[$c]}(); +a(); +$a(); +$a()[$b]; +$a->b()[$c]; +$a::$b()[$c]; +(new A())->b; +(new A())->b(); +(new ${$a}())[$b]; +(new $a->b())->c; +global $a, ${$a}, ${$a[$b]}, ${$a->b}; diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/expr/yield.test b/vendor/nikic/php-parser/test/code/prettyPrinter/expr/yield.test new file mode 100644 index 0000000..12ab7de --- /dev/null +++ b/vendor/nikic/php-parser/test/code/prettyPrinter/expr/yield.test @@ -0,0 +1,46 @@ +Yield +----- + $b; + $a = yield; + $a = (yield $b); + $a = (yield $b => $c); +} +// TODO Get rid of parens for cases 2 and 3 +----- +function gen() +{ + yield; + (yield $a); + (yield $a => $b); + $a = yield; + $a = (yield $b); + $a = (yield $b => $c); +} +// TODO Get rid of parens for cases 2 and 3 +----- + $c; + yield from $a; + $a = yield from $b; +} +// TODO Get rid of parens for last case +----- +!!php7 +function gen() +{ + $a = (yield $b); + $a = (yield $b => $c); + yield from $a; + $a = (yield from $b); +} +// TODO Get rid of parens for last case \ No newline at end of file diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/inlineHTMLandPHPtest.file-test b/vendor/nikic/php-parser/test/code/prettyPrinter/inlineHTMLandPHPtest.file-test new file mode 100644 index 0000000..b33eb52 --- /dev/null +++ b/vendor/nikic/php-parser/test/code/prettyPrinter/inlineHTMLandPHPtest.file-test @@ -0,0 +1,58 @@ +File containing both inline HTML and PHP +----- +HTML + +HTML +----- + +HTML +----- +HTML + +HTML +----- +HTML + +HTML +----- +HTML + +HTML + +HTML +----- +HTML + +HTML + +HTML +----- +HTMLHTML +----- +HTMLHTML \ No newline at end of file diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/onlyInlineHTML.file-test b/vendor/nikic/php-parser/test/code/prettyPrinter/onlyInlineHTML.file-test new file mode 100644 index 0000000..e980719 --- /dev/null +++ b/vendor/nikic/php-parser/test/code/prettyPrinter/onlyInlineHTML.file-test @@ -0,0 +1,19 @@ +File containing only inline HTML +----- +Hallo World +Foo Bar +Bar Foo +World Hallo +----- +Hallo World +Foo Bar +Bar Foo +World Hallo +----- + + +Test +----- + + +Test \ No newline at end of file diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/onlyPHP.file-test b/vendor/nikic/php-parser/test/code/prettyPrinter/onlyPHP.file-test new file mode 100644 index 0000000..9550b10 --- /dev/null +++ b/vendor/nikic/php-parser/test/code/prettyPrinter/onlyPHP.file-test @@ -0,0 +1,16 @@ +File containing only PHP +----- +a = 'bar'; + echo 'test'; + } + + protected function baz() {} + public function foo() {} + abstract static function bar() {} +} + +trait Bar +{ + function test() + { + } +} +----- +class Foo extends Bar implements ABC, \DEF, namespace\GHI +{ + var $a = 'foo'; + private $b = 'bar'; + static $c = 'baz'; + function test() + { + $this->a = 'bar'; + echo 'test'; + } + protected function baz() + { + } + public function foo() + { + } + static abstract function bar() + { + } +} +trait Bar +{ + function test() + { + } +} \ No newline at end of file diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/class_const.test b/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/class_const.test new file mode 100644 index 0000000..e73ad43 --- /dev/null +++ b/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/class_const.test @@ -0,0 +1,20 @@ +Class constants +----- + $val) { + +} + +foreach ($arr as $key => &$val) { + +} +----- +foreach ($arr as $val) { +} +foreach ($arr as &$val) { +} +foreach ($arr as $key => $val) { +} +foreach ($arr as $key => &$val) { +} \ No newline at end of file diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/function_signatures.test b/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/function_signatures.test new file mode 100644 index 0000000..af1088a --- /dev/null +++ b/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/function_signatures.test @@ -0,0 +1,43 @@ +Function signatures +----- +parse($code); + $parseTime += microtime(true) - $startTime; + + $startTime = microtime(true); + $code = 'prettyPrint($stmts); + $ppTime += microtime(true) - $startTime; + + try { + $startTime = microtime(true); + $ppStmts = $parser->parse($code); + $reparseTime += microtime(true) - $startTime; + + $startTime = microtime(true); + $same = $nodeDumper->dump($stmts) == $nodeDumper->dump($ppStmts); + $compareTime += microtime(true) - $startTime; + + if (!$same) { + echo $file, ":\n Result of initial parse and parse after pretty print differ\n"; + if ($verbose) { + echo "Pretty printer output:\n=====\n$code\n=====\n\n"; + } + + ++$compareFail; + } + } catch (PhpParser\Error $e) { + echo $file, ":\n Parse of pretty print failed with message: {$e->getMessage()}\n"; + if ($verbose) { + echo "Pretty printer output:\n=====\n$code\n=====\n\n"; + } + + ++$ppFail; + } + } catch (PhpParser\Error $e) { + echo $file, ":\n Parse failed with message: {$e->getMessage()}\n"; + + ++$parseFail; + } +} + +if (0 === $parseFail && 0 === $ppFail && 0 === $compareFail) { + $exit = 0; + echo "\n\n", 'All tests passed.', "\n"; +} else { + $exit = 1; + echo "\n\n", '==========', "\n\n", 'There were: ', "\n"; + if (0 !== $parseFail) { + echo ' ', $parseFail, ' parse failures.', "\n"; + } + if (0 !== $ppFail) { + echo ' ', $ppFail, ' pretty print failures.', "\n"; + } + if (0 !== $compareFail) { + echo ' ', $compareFail, ' compare failures.', "\n"; + } +} + +echo "\n", + 'Tested files: ', $count, "\n", + "\n", + 'Reading files took: ', $readTime, "\n", + 'Parsing took: ', $parseTime, "\n", + 'Pretty printing took: ', $ppTime, "\n", + 'Reparsing took: ', $reparseTime, "\n", + 'Comparing took: ', $compareTime, "\n", + "\n", + 'Total time: ', microtime(true) - $totalStartTime, "\n", + 'Maximum memory usage: ', memory_get_peak_usage(true), "\n"; + +exit($exit); diff --git a/vendor/paragonie/random_compat/LICENSE b/vendor/paragonie/random_compat/LICENSE new file mode 100644 index 0000000..45c7017 --- /dev/null +++ b/vendor/paragonie/random_compat/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 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 +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/vendor/paragonie/random_compat/build-phar.sh b/vendor/paragonie/random_compat/build-phar.sh new file mode 100755 index 0000000..b4a5ba3 --- /dev/null +++ b/vendor/paragonie/random_compat/build-phar.sh @@ -0,0 +1,5 @@ +#!/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/vendor/paragonie/random_compat/composer.json b/vendor/paragonie/random_compat/composer.json new file mode 100644 index 0000000..1c5978c --- /dev/null +++ b/vendor/paragonie/random_compat/composer.json @@ -0,0 +1,37 @@ +{ + "name": "paragonie/random_compat", + "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", + "keywords": [ + "csprng", + "random", + "pseudorandom" + ], + "license": "MIT", + "type": "library", + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com" + } + ], + "support": { + "issues": "https://github.com/paragonie/random_compat/issues", + "email": "info@paragonie.com", + "source": "https://github.com/paragonie/random_compat" + }, + "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." + }, + "autoload": { + "files": [ + "lib/random.php" + ] + } +} diff --git a/vendor/paragonie/random_compat/dist/random_compat.phar.pubkey b/vendor/paragonie/random_compat/dist/random_compat.phar.pubkey new file mode 100644 index 0000000..eb50ebf --- /dev/null +++ b/vendor/paragonie/random_compat/dist/random_compat.phar.pubkey @@ -0,0 +1,5 @@ +-----BEGIN PUBLIC KEY----- +MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEEd+wCqJDrx5B4OldM0dQE0ZMX+lx1ZWm +pui0SUqD4G29L3NGsz9UhJ/0HjBdbnkhIK5xviT0X5vtjacF6ajgcCArbTB+ds+p ++h7Q084NuSuIpNb6YPfoUFgC/CL9kAoc +-----END PUBLIC KEY----- diff --git a/vendor/paragonie/random_compat/dist/random_compat.phar.pubkey.asc b/vendor/paragonie/random_compat/dist/random_compat.phar.pubkey.asc new file mode 100644 index 0000000..6a1d7f3 --- /dev/null +++ b/vendor/paragonie/random_compat/dist/random_compat.phar.pubkey.asc @@ -0,0 +1,11 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.22 (MingW32) + +iQEcBAABAgAGBQJWtW1hAAoJEGuXocKCZATaJf0H+wbZGgskK1dcRTsuVJl9IWip +QwGw/qIKI280SD6/ckoUMxKDCJiFuPR14zmqnS36k7N5UNPnpdTJTS8T11jttSpg +1LCmgpbEIpgaTah+cELDqFCav99fS+bEiAL5lWDAHBTE/XPjGVCqeehyPYref4IW +NDBIEsvnHPHPLsn6X5jq4+Yj5oUixgxaMPiR+bcO4Sh+RzOVB6i2D0upWfRXBFXA +NNnsg9/zjvoC7ZW73y9uSH+dPJTt/Vgfeiv52/v41XliyzbUyLalf02GNPY+9goV +JHG1ulEEBJOCiUD9cE1PUIJwHA/HqyhHIvV350YoEFiHl8iSwm7SiZu5kPjaq74= +=B6+8 +-----END PGP SIGNATURE----- diff --git a/vendor/paragonie/random_compat/lib/byte_safe_strings.php b/vendor/paragonie/random_compat/lib/byte_safe_strings.php new file mode 100644 index 0000000..3de86b2 --- /dev/null +++ b/vendor/paragonie/random_compat/lib/byte_safe_strings.php @@ -0,0 +1,181 @@ + RandomCompat_strlen($binary_string)) { + return ''; + } + + return (string) mb_substr($binary_string, $start, $length, '8bit'); + } + + } else { + + /** + * substr() implementation that isn't brittle to mbstring.func_overload + * + * This version just uses the default substr() + * + * @param string $binary_string + * @param int $start + * @param int $length (optional) + * + * @throws TypeError + * + * @return string + */ + function RandomCompat_substr($binary_string, $start, $length = null) + { + if (!is_string($binary_string)) { + throw new TypeError( + 'RandomCompat_substr(): First argument should be a string' + ); + } + + if (!is_int($start)) { + throw new TypeError( + 'RandomCompat_substr(): Second argument should be an integer' + ); + } + + if ($length !== null) { + if (!is_int($length)) { + throw new TypeError( + 'RandomCompat_substr(): Third argument should be an integer, or omitted' + ); + } + + return (string) substr($binary_string, $start, $length); + } + + return (string) substr($binary_string, $start); + } + } +} diff --git a/vendor/paragonie/random_compat/lib/cast_to_int.php b/vendor/paragonie/random_compat/lib/cast_to_int.php new file mode 100644 index 0000000..be7388d --- /dev/null +++ b/vendor/paragonie/random_compat/lib/cast_to_int.php @@ -0,0 +1,74 @@ + 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 + * + * @return float|int + * + * @throws TypeError + */ + function RandomCompat_intval($number, $fail_open = false) + { + if (is_int($number) || is_float($number)) { + $number += 0; + } elseif (is_numeric($number)) { + $number += 0; + } + + if ( + is_float($number) + && + $number > ~PHP_INT_MAX + && + $number < PHP_INT_MAX + ) { + $number = (int) $number; + } + + if (is_int($number)) { + return (int) $number; + } elseif (!$fail_open) { + throw new TypeError( + 'Expected an integer.' + ); + } + return $number; + } +} diff --git a/vendor/paragonie/random_compat/lib/error_polyfill.php b/vendor/paragonie/random_compat/lib/error_polyfill.php new file mode 100644 index 0000000..6a91990 --- /dev/null +++ b/vendor/paragonie/random_compat/lib/error_polyfill.php @@ -0,0 +1,49 @@ += 70000) { + return; +} + +if (!defined('RANDOM_COMPAT_READ_BUFFER')) { + define('RANDOM_COMPAT_READ_BUFFER', 8); +} + +$RandomCompatDIR = dirname(__FILE__); + +require_once $RandomCompatDIR . '/byte_safe_strings.php'; +require_once $RandomCompatDIR . '/cast_to_int.php'; +require_once $RandomCompatDIR . '/error_polyfill.php'; + +if (!is_callable('random_bytes')) { + /** + * PHP 5.2.0 - 5.6.x way to implement random_bytes() + * + * We use conditional statements here to define the function in accordance + * to the operating environment. It's a micro-optimization. + * + * In order of preference: + * 1. Use libsodium if available. + * 2. fread() /dev/urandom if available (never on Windows) + * 3. mcrypt_create_iv($bytes, MCRYPT_DEV_URANDOM) + * 4. COM('CAPICOM.Utilities.1')->GetRandom() + * + * See RATIONALE.md for our reasoning behind this particular order + */ + if (extension_loaded('libsodium')) { + // See random_bytes_libsodium.php + if (PHP_VERSION_ID >= 50300 && is_callable('\\Sodium\\randombytes_buf')) { + require_once $RandomCompatDIR . '/random_bytes_libsodium.php'; + } elseif (method_exists('Sodium', 'randombytes_buf')) { + require_once $RandomCompatDIR . '/random_bytes_libsodium_legacy.php'; + } + } + + /** + * Reading directly from /dev/urandom: + */ + if (DIRECTORY_SEPARATOR === '/') { + // DIRECTORY_SEPARATOR === '/' on Unix-like OSes -- this is a fast + // way to exclude Windows. + $RandomCompatUrandom = true; + $RandomCompat_basedir = ini_get('open_basedir'); + + if (!empty($RandomCompat_basedir)) { + $RandomCompat_open_basedir = explode( + PATH_SEPARATOR, + strtolower($RandomCompat_basedir) + ); + $RandomCompatUrandom = (array() !== array_intersect( + array('/dev', '/dev/', '/dev/urandom'), + $RandomCompat_open_basedir + )); + $RandomCompat_open_basedir = null; + } + + if ( + !is_callable('random_bytes') + && + $RandomCompatUrandom + && + @is_readable('/dev/urandom') + ) { + // Error suppression on is_readable() in case of an open_basedir + // or safe_mode failure. All we care about is whether or not we + // can read it at this point. If the PHP environment is going to + // panic over trying to see if the file can be read in the first + // place, that is not helpful to us here. + + // See random_bytes_dev_urandom.php + require_once $RandomCompatDIR . '/random_bytes_dev_urandom.php'; + } + // Unset variables after use + $RandomCompat_basedir = null; + } else { + $RandomCompatUrandom = false; + } + + /** + * mcrypt_create_iv() + * + * We only want to use mcypt_create_iv() if: + * + * - random_bytes() hasn't already been defined + * - the mcrypt extensions is loaded + * - One of these two conditions is true: + * - We're on Windows (DIRECTORY_SEPARATOR !== '/') + * - We're not on Windows and /dev/urandom is readabale + * (i.e. we're not in a chroot jail) + * - Special case: + * - If we're not on Windows, but the PHP version is between + * 5.6.10 and 5.6.12, we don't want to use mcrypt. It will + * hang indefinitely. This is bad. + * - If we're on Windows, we want to use PHP >= 5.3.7 or else + * we get insufficient entropy errors. + */ + if ( + !is_callable('random_bytes') + && + // Windows on PHP < 5.3.7 is broken, but non-Windows is not known to be. + (DIRECTORY_SEPARATOR === '/' || PHP_VERSION_ID >= 50307) + && + // Prevent this code from hanging indefinitely on non-Windows; + // see https://bugs.php.net/bug.php?id=69833 + ( + DIRECTORY_SEPARATOR !== '/' || + (PHP_VERSION_ID <= 50609 || PHP_VERSION_ID >= 50613) + ) + && + extension_loaded('mcrypt') + ) { + // See random_bytes_mcrypt.php + require_once $RandomCompatDIR . '/random_bytes_mcrypt.php'; + } + $RandomCompatUrandom = null; + + /** + * This is a Windows-specific fallback, for when the mcrypt extension + * isn't loaded. + */ + if ( + !is_callable('random_bytes') + && + extension_loaded('com_dotnet') + && + class_exists('COM') + ) { + $RandomCompat_disabled_classes = preg_split( + '#\s*,\s*#', + strtolower(ini_get('disable_classes')) + ); + + if (!in_array('com', $RandomCompat_disabled_classes)) { + try { + $RandomCompatCOMtest = new COM('CAPICOM.Utilities.1'); + if (method_exists($RandomCompatCOMtest, 'GetRandom')) { + // See random_bytes_com_dotnet.php + require_once $RandomCompatDIR . '/random_bytes_com_dotnet.php'; + } + } catch (com_exception $e) { + // Don't try to use it. + } + } + $RandomCompat_disabled_classes = null; + $RandomCompatCOMtest = null; + } + + /** + * throw new Exception + */ + if (!is_callable('random_bytes')) { + /** + * We don't have any more options, so let's throw an exception right now + * and hope the developer won't let it fail silently. + * + * @param mixed $length + * @return void + * @throws Exception + */ + function random_bytes($length) + { + unset($length); // Suppress "variable not used" warnings. + throw new Exception( + 'There is no suitable CSPRNG installed on your system' + ); + } + } +} + +if (!is_callable('random_int')) { + require_once $RandomCompatDIR . '/random_int.php'; +} + +$RandomCompatDIR = null; diff --git a/vendor/paragonie/random_compat/lib/random_bytes_com_dotnet.php b/vendor/paragonie/random_compat/lib/random_bytes_com_dotnet.php new file mode 100644 index 0000000..fc1926e --- /dev/null +++ b/vendor/paragonie/random_compat/lib/random_bytes_com_dotnet.php @@ -0,0 +1,88 @@ +GetRandom($bytes, 0)); + if (RandomCompat_strlen($buf) >= $bytes) { + /** + * Return our random entropy buffer here: + */ + return RandomCompat_substr($buf, 0, $bytes); + } + ++$execCount; + } while ($execCount < $bytes); + + /** + * If we reach here, PHP has failed us. + */ + throw new Exception( + 'Could not gather sufficient random data' + ); + } +} \ No newline at end of file diff --git a/vendor/paragonie/random_compat/lib/random_bytes_dev_urandom.php b/vendor/paragonie/random_compat/lib/random_bytes_dev_urandom.php new file mode 100644 index 0000000..df5b915 --- /dev/null +++ b/vendor/paragonie/random_compat/lib/random_bytes_dev_urandom.php @@ -0,0 +1,167 @@ + 0); + + /** + * Is our result valid? + */ + if (is_string($buf)) { + if (RandomCompat_strlen($buf) === $bytes) { + /** + * Return our random entropy buffer here: + */ + return $buf; + } + } + } + + /** + * If we reach here, PHP has failed us. + */ + throw new Exception( + 'Error reading from source device' + ); + } +} diff --git a/vendor/paragonie/random_compat/lib/random_bytes_libsodium.php b/vendor/paragonie/random_compat/lib/random_bytes_libsodium.php new file mode 100644 index 0000000..4af1a24 --- /dev/null +++ b/vendor/paragonie/random_compat/lib/random_bytes_libsodium.php @@ -0,0 +1,88 @@ + 2147483647) { + $buf = ''; + for ($i = 0; $i < $bytes; $i += 1073741824) { + $n = ($bytes - $i) > 1073741824 + ? 1073741824 + : $bytes - $i; + $buf .= \Sodium\randombytes_buf($n); + } + } else { + $buf = \Sodium\randombytes_buf($bytes); + } + + if ($buf !== false) { + if (RandomCompat_strlen($buf) === $bytes) { + return $buf; + } + } + + /** + * If we reach here, PHP has failed us. + */ + throw new Exception( + 'Could not gather sufficient random data' + ); + } +} diff --git a/vendor/paragonie/random_compat/lib/random_bytes_libsodium_legacy.php b/vendor/paragonie/random_compat/lib/random_bytes_libsodium_legacy.php new file mode 100644 index 0000000..02160b9 --- /dev/null +++ b/vendor/paragonie/random_compat/lib/random_bytes_libsodium_legacy.php @@ -0,0 +1,92 @@ + 2147483647) { + for ($i = 0; $i < $bytes; $i += 1073741824) { + $n = ($bytes - $i) > 1073741824 + ? 1073741824 + : $bytes - $i; + $buf .= Sodium::randombytes_buf($n); + } + } else { + $buf .= Sodium::randombytes_buf($bytes); + } + + if (is_string($buf)) { + if (RandomCompat_strlen($buf) === $bytes) { + return $buf; + } + } + + /** + * If we reach here, PHP has failed us. + */ + throw new Exception( + 'Could not gather sufficient random data' + ); + } +} diff --git a/vendor/paragonie/random_compat/lib/random_bytes_mcrypt.php b/vendor/paragonie/random_compat/lib/random_bytes_mcrypt.php new file mode 100644 index 0000000..aac9c01 --- /dev/null +++ b/vendor/paragonie/random_compat/lib/random_bytes_mcrypt.php @@ -0,0 +1,77 @@ + operators might accidentally let a float + * through. + */ + + try { + $min = RandomCompat_intval($min); + } catch (TypeError $ex) { + throw new TypeError( + 'random_int(): $min must be an integer' + ); + } + + try { + $max = RandomCompat_intval($max); + } catch (TypeError $ex) { + throw new TypeError( + 'random_int(): $max must be an integer' + ); + } + + /** + * Now that we've verified our weak typing system has given us an integer, + * let's validate the logic then we can move forward with generating random + * integers along a given range. + */ + if ($min > $max) { + throw new Error( + 'Minimum value must be less than or equal to the maximum value' + ); + } + + if ($max === $min) { + return $min; + } + + /** + * Initialize variables to 0 + * + * We want to store: + * $bytes => the number of random bytes we need + * $mask => an integer bitmask (for use with the &) operator + * so we can minimize the number of discards + */ + $attempts = $bits = $bytes = $mask = $valueShift = 0; + + /** + * At this point, $range is a positive number greater than 0. It might + * overflow, however, if $max - $min > PHP_INT_MAX. PHP will cast it to + * a float and we will lose some precision. + */ + $range = $max - $min; + + /** + * Test for integer overflow: + */ + if (!is_int($range)) { + + /** + * Still safely calculate wider ranges. + * Provided by @CodesInChaos, @oittaa + * + * @ref https://gist.github.com/CodesInChaos/03f9ea0b58e8b2b8d435 + * + * We use ~0 as a mask in this case because it generates all 1s + * + * @ref https://eval.in/400356 (32-bit) + * @ref http://3v4l.org/XX9r5 (64-bit) + */ + $bytes = PHP_INT_SIZE; + $mask = ~0; + + } else { + + /** + * $bits is effectively ceil(log($range, 2)) without dealing with + * type juggling + */ + while ($range > 0) { + if ($bits % 8 === 0) { + ++$bytes; + } + ++$bits; + $range >>= 1; + $mask = $mask << 1 | 1; + } + $valueShift = $min; + } + + $val = 0; + /** + * Now that we have our parameters set up, let's begin generating + * random integers until one falls between $min and $max + */ + do { + /** + * The rejection probability is at most 0.5, so this corresponds + * to a failure probability of 2^-128 for a working RNG + */ + if ($attempts > 128) { + throw new Exception( + 'random_int: RNG is broken - too many rejections' + ); + } + + /** + * Let's grab the necessary number of random bytes + */ + $randomByteString = random_bytes($bytes); + + /** + * Let's turn $randomByteString into an integer + * + * This uses bitwise operators (<< and |) to build an integer + * out of the values extracted from ord() + * + * Example: [9F] | [6D] | [32] | [0C] => + * 159 + 27904 + 3276800 + 201326592 => + * 204631455 + */ + $val &= 0; + for ($i = 0; $i < $bytes; ++$i) { + $val |= ord($randomByteString[$i]) << ($i * 8); + } + + /** + * Apply mask + */ + $val &= $mask; + $val += $valueShift; + + ++$attempts; + /** + * If $val overflows to a floating point number, + * ... or is larger than $max, + * ... or smaller than $min, + * then try again. + */ + } while (!is_int($val) || $val > $max || $val < $min); + + return (int)$val; + } +} diff --git a/vendor/paragonie/random_compat/other/build_phar.php b/vendor/paragonie/random_compat/other/build_phar.php new file mode 100644 index 0000000..70ef4b2 --- /dev/null +++ b/vendor/paragonie/random_compat/other/build_phar.php @@ -0,0 +1,57 @@ +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/vendor/paragonie/random_compat/psalm-autoload.php b/vendor/paragonie/random_compat/psalm-autoload.php new file mode 100644 index 0000000..d71d1b8 --- /dev/null +++ b/vendor/paragonie/random_compat/psalm-autoload.php @@ -0,0 +1,9 @@ + + + + + + + + + + + diff --git a/vendor/phpdocumentor/reflection-common/.gitignore b/vendor/phpdocumentor/reflection-common/.gitignore new file mode 100644 index 0000000..c56f671 --- /dev/null +++ b/vendor/phpdocumentor/reflection-common/.gitignore @@ -0,0 +1,4 @@ +composer.phar +vendor/ +build/ + diff --git a/vendor/phpdocumentor/reflection-common/LICENSE b/vendor/phpdocumentor/reflection-common/LICENSE new file mode 100644 index 0000000..ed6926c --- /dev/null +++ b/vendor/phpdocumentor/reflection-common/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 phpDocumentor + +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/vendor/phpdocumentor/reflection-common/README.md b/vendor/phpdocumentor/reflection-common/README.md new file mode 100644 index 0000000..52b12bc --- /dev/null +++ b/vendor/phpdocumentor/reflection-common/README.md @@ -0,0 +1 @@ +# ReflectionCommon diff --git a/vendor/phpdocumentor/reflection-common/composer.json b/vendor/phpdocumentor/reflection-common/composer.json new file mode 100644 index 0000000..90eee0f --- /dev/null +++ b/vendor/phpdocumentor/reflection-common/composer.json @@ -0,0 +1,29 @@ +{ + "name": "phpdocumentor/reflection-common", + "keywords": ["phpdoc", "phpDocumentor", "reflection", "static analysis", "FQSEN"], + "homepage": "http://www.phpdoc.org", + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "license": "MIT", + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "require": { + "php": ">=5.5" + }, + "autoload" : { + "psr-4" : { + "phpDocumentor\\Reflection\\": ["src"] + } + }, + "require-dev": { + "phpunit/phpunit": "^4.6" + }, + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + } +} diff --git a/vendor/phpdocumentor/reflection-common/composer.lock b/vendor/phpdocumentor/reflection-common/composer.lock new file mode 100644 index 0000000..e01dc3c --- /dev/null +++ b/vendor/phpdocumentor/reflection-common/composer.lock @@ -0,0 +1,974 @@ +{ + "_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/vendor/phpdocumentor/reflection-common/phpunit.xml.dist b/vendor/phpdocumentor/reflection-common/phpunit.xml.dist new file mode 100644 index 0000000..3181150 --- /dev/null +++ b/vendor/phpdocumentor/reflection-common/phpunit.xml.dist @@ -0,0 +1,26 @@ + + + + + + ./tests/unit/ + + + + + src + + + + + + + + diff --git a/vendor/phpdocumentor/reflection-common/src/Element.php b/vendor/phpdocumentor/reflection-common/src/Element.php new file mode 100644 index 0000000..712e30e --- /dev/null +++ b/vendor/phpdocumentor/reflection-common/src/Element.php @@ -0,0 +1,32 @@ + + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection; + +/** + * Interface for files processed by the ProjectFactory + */ +interface File +{ + /** + * Returns the content of the file as a string. + * + * @return string + */ + public function getContents(); + + /** + * Returns md5 hash of the file. + * + * @return string + */ + public function md5(); + + /** + * Returns an relative path to the file. + * + * @return string + */ + public function path(); +} diff --git a/vendor/phpdocumentor/reflection-common/src/Fqsen.php b/vendor/phpdocumentor/reflection-common/src/Fqsen.php new file mode 100644 index 0000000..c7be3f1 --- /dev/null +++ b/vendor/phpdocumentor/reflection-common/src/Fqsen.php @@ -0,0 +1,78 @@ +fqsen = $fqsen; + + if (isset($matches[2])) { + $this->name = $matches[2]; + } else { + $matches = explode('\\', $fqsen); + $this->name = trim(end($matches), '()'); + } + } + + /** + * converts this class to string. + * + * @return string + */ + public function __toString() + { + return $this->fqsen; + } + + /** + * Returns the name of the element without path. + * + * @return string + */ + public function getName() + { + return $this->name; + } +} diff --git a/vendor/phpdocumentor/reflection-common/src/Location.php b/vendor/phpdocumentor/reflection-common/src/Location.php new file mode 100644 index 0000000..5760321 --- /dev/null +++ b/vendor/phpdocumentor/reflection-common/src/Location.php @@ -0,0 +1,57 @@ + + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection; + +/** + * The location where an element occurs within a file. + */ +final class Location +{ + /** @var int */ + private $lineNumber = 0; + + /** @var int */ + private $columnNumber = 0; + + /** + * 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) + { + $this->lineNumber = $lineNumber; + $this->columnNumber = $columnNumber; + } + + /** + * Returns the line number that is covered by this location. + * + * @return integer + */ + public function getLineNumber() + { + return $this->lineNumber; + } + + /** + * Returns the column number (character position on a line) for this location object. + * + * @return integer + */ + public function getColumnNumber() + { + return $this->columnNumber; + } +} diff --git a/vendor/phpdocumentor/reflection-common/src/Project.php b/vendor/phpdocumentor/reflection-common/src/Project.php new file mode 100644 index 0000000..3ed1e39 --- /dev/null +++ b/vendor/phpdocumentor/reflection-common/src/Project.php @@ -0,0 +1,25 @@ +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/vendor/phpdocumentor/reflection-docblock/.gitignore b/vendor/phpdocumentor/reflection-docblock/.gitignore new file mode 100644 index 0000000..3ce5adb --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/.gitignore @@ -0,0 +1,2 @@ +.idea +vendor diff --git a/vendor/phpdocumentor/reflection-docblock/.scrutinizer.yml b/vendor/phpdocumentor/reflection-docblock/.scrutinizer.yml new file mode 100644 index 0000000..5061d52 --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/.scrutinizer.yml @@ -0,0 +1,32 @@ +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/vendor/phpdocumentor/reflection-docblock/.travis.yml b/vendor/phpdocumentor/reflection-docblock/.travis.yml new file mode 100644 index 0000000..920958d --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/.travis.yml @@ -0,0 +1,36 @@ +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/vendor/phpdocumentor/reflection-docblock/LICENSE b/vendor/phpdocumentor/reflection-docblock/LICENSE new file mode 100644 index 0000000..792e404 --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2010 Mike van Riel + +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/vendor/phpdocumentor/reflection-docblock/README.md b/vendor/phpdocumentor/reflection-docblock/README.md new file mode 100644 index 0000000..a1984a1 --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/README.md @@ -0,0 +1,69 @@ +The ReflectionDocBlock Component [![Build Status](https://secure.travis-ci.org/phpDocumentor/ReflectionDocBlock.png)](https://travis-ci.org/phpDocumentor/ReflectionDocBlock) +================================ + +Introduction +------------ + +The ReflectionDocBlock component of phpDocumentor provides a DocBlock parser +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) + +Usage +----- + +In order to parse the DocBlock one needs a DocBlockFactory that can be +instantiated using its `createInstance` factory method like this: + +```php +$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 +`getDocComment()` method, such as an object of type `ReflectionClass`, the +create method will read that if it exists. + +```php +$docComment = <<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. + +```php +// Should contain 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. +$description = $docblock->getDescription(); +``` + +> For more examples it would be best to review the scripts in the `/examples` +> folder. + diff --git a/vendor/phpdocumentor/reflection-docblock/composer.json b/vendor/phpdocumentor/reflection-docblock/composer.json new file mode 100644 index 0000000..85be2fd --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/composer.json @@ -0,0 +1,28 @@ +{ + "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", + "license": "MIT", + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "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"]} + }, + "require-dev": { + "mockery/mockery": "^0.9.4", + "phpunit/phpunit": "^4.4" + } +} diff --git a/vendor/phpdocumentor/reflection-docblock/composer.lock b/vendor/phpdocumentor/reflection-docblock/composer.lock new file mode 100644 index 0000000..b4da3c1 --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/composer.lock @@ -0,0 +1,1120 @@ +{ + "_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/vendor/phpdocumentor/reflection-docblock/examples/01-interpreting-a-simple-docblock.php b/vendor/phpdocumentor/reflection-docblock/examples/01-interpreting-a-simple-docblock.php new file mode 100644 index 0000000..6d67dea --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/examples/01-interpreting-a-simple-docblock.php @@ -0,0 +1,27 @@ +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/vendor/phpdocumentor/reflection-docblock/examples/02-interpreting-tags.php b/vendor/phpdocumentor/reflection-docblock/examples/02-interpreting-tags.php new file mode 100644 index 0000000..2399588 --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/examples/02-interpreting-tags.php @@ -0,0 +1,24 @@ +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/vendor/phpdocumentor/reflection-docblock/examples/03-reconstituting-a-docblock.php b/vendor/phpdocumentor/reflection-docblock/examples/03-reconstituting-a-docblock.php new file mode 100644 index 0000000..6bc10ba --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/examples/03-reconstituting-a-docblock.php @@ -0,0 +1,27 @@ +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/vendor/phpdocumentor/reflection-docblock/examples/04-adding-your-own-tag.php b/vendor/phpdocumentor/reflection-docblock/examples/04-adding-your-own-tag.php new file mode 100644 index 0000000..026d606 --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/examples/04-adding-your-own-tag.php @@ -0,0 +1,135 @@ + 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/vendor/phpdocumentor/reflection-docblock/examples/playing-with-descriptions/02-escaping.php b/vendor/phpdocumentor/reflection-docblock/examples/playing-with-descriptions/02-escaping.php new file mode 100644 index 0000000..5ec772f --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/examples/playing-with-descriptions/02-escaping.php @@ -0,0 +1,47 @@ +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/vendor/phpdocumentor/reflection-docblock/phpmd.xml.dist b/vendor/phpdocumentor/reflection-docblock/phpmd.xml.dist new file mode 100644 index 0000000..9abf85c --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/phpmd.xml.dist @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + 40 + + + diff --git a/vendor/phpdocumentor/reflection-docblock/phpunit.xml.dist b/vendor/phpdocumentor/reflection-docblock/phpunit.xml.dist new file mode 100644 index 0000000..3c2e9a3 --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/phpunit.xml.dist @@ -0,0 +1,33 @@ + + + + + + ./tests/unit + + + ./tests/integration + + + + + ./src/ + + + ./vendor/ + + + + + + diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock.php new file mode 100644 index 0000000..3991140 --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/src/DocBlock.php @@ -0,0 +1,220 @@ + + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection; + +use phpDocumentor\Reflection\DocBlock\Tag; +use Webmozart\Assert\Assert; + +final class DocBlock +{ + /** @var string The opening line for this docblock. */ + private $summary = ''; + + /** @var DocBlock\Description The actual description for this docblock. */ + private $description = null; + + /** @var Tag[] An array containing all the tags in this docblock; except inline. */ + private $tags = array(); + + /** @var Types\Context Information about the context of this DocBlock. */ + private $context = null; + + /** @var Location Information about the location of this DocBlock. */ + private $location = null; + + /** @var bool Is this DocBlock (the start of) a template? */ + private $isTemplateStart = false; + + /** @var bool Does this DocBlock signify the end of a DocBlock template? */ + private $isTemplateEnd = false; + + /** + * @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 + */ + public function __construct( + $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); + Assert::allIsInstanceOf($tags, Tag::class); + + $this->summary = $summary; + $this->description = $description ?: new DocBlock\Description(''); + foreach ($tags as $tag) { + $this->addTag($tag); + } + + $this->context = $context; + $this->location = $location; + + $this->isTemplateEnd = $isTemplateEnd; + $this->isTemplateStart = $isTemplateStart; + } + + /** + * @return string + */ + public function getSummary() + { + return $this->summary; + } + + /** + * @return DocBlock\Description + */ + public function getDescription() + { + return $this->description; + } + + /** + * Returns the current context. + * + * @return Types\Context + */ + public function getContext() + { + return $this->context; + } + + /** + * Returns the current location. + * + * @return Location + */ + public function getLocation() + { + return $this->location; + } + + /** + * Returns whether this DocBlock is the start of a Template section. + * + * A Docblock may serve as template for a series of subsequent DocBlocks. This is indicated by a special marker + * (`#@+`) that is appended directly after the opening `/**` of a DocBlock. + * + * An example of such an opening is: + * + * ``` + * /**#@+ + * * My DocBlock + * * / + * ``` + * + * The description and tags (not the summary!) are copied onto all subsequent DocBlocks and also applied to all + * 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() + { + return $this->isTemplateStart; + } + + /** + * 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() + { + return $this->isTemplateEnd; + } + + /** + * Returns the tags for this DocBlock. + * + * @return Tag[] + */ + public function getTags() + { + return $this->tags; + } + + /** + * Returns an array of tags matching the given name. If no tags are found + * an empty array is returned. + * + * @param string $name String to search by. + * + * @return Tag[] + */ + public function getTagsByName($name) + { + Assert::string($name); + + $result = array(); + + /** @var Tag $tag */ + foreach ($this->getTags() as $tag) { + if ($tag->getName() != $name) { + continue; + } + + $result[] = $tag; + } + + return $result; + } + + /** + * 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) + { + Assert::string($name); + + /** @var Tag $tag */ + foreach ($this->getTags() as $tag) { + if ($tag->getName() == $name) { + return true; + } + } + + return false; + } + + /** + * Adds a tag to this DocBlock. + * + * @param Tag $tag The tag to add. + * + * @return void + */ + private function addTag(Tag $tag) + { + $this->tags[] = $tag; + } +} diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Description.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Description.php new file mode 100644 index 0000000..d1d7fc6 --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Description.php @@ -0,0 +1,103 @@ + + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\DocBlock; + +use phpDocumentor\Reflection\DocBlock\Tags\Formatter; +use phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter; +use Webmozart\Assert\Assert; + +/** + * Object representing to description for a DocBlock. + * + * A Description object can consist of plain text but can also include tags. A Description Formatter can then combine + * a body template with sprintf-style placeholders together with formatted tags in order to reconstitute a complete + * description text using the format that you would prefer. + * + * Because parsing a Description text can be a verbose process this is handled by the {@see DescriptionFactory}. It is + * thus recommended to use that to create a Description object, like this: + * + * $description = $descriptionFactory->create('This is a {@see Description}', $context); + * + * The description factory will interpret the given body and create a body template and list of tags from them, and pass + * that onto the constructor if this class. + * + * > The $context variable is a class of type {@see \phpDocumentor\Reflection\Types\Context} and contains the namespace + * > and the namespace aliases that apply to this DocBlock. These are used by the Factory to resolve and expand partial + * > type names and FQSENs. + * + * If you do not want to use the DescriptionFactory you can pass a body template and tag listing like this: + * + * $description = new Description( + * 'This is a %1$s', + * [ new See(new Fqsen('\phpDocumentor\Reflection\DocBlock\Description')) ] + * ); + * + * It is generally recommended to use the Factory as that will also apply escaping rules, while the Description object + * is mainly responsible for rendering. + * + * @see DescriptionFactory to create a new Description. + * @see Description\Formatter for the formatting of the body and tags. + */ +class Description +{ + /** @var string */ + private $bodyTemplate; + + /** @var Tag[] */ + private $tags; + + /** + * 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 = []) + { + Assert::string($bodyTemplate); + + $this->bodyTemplate = $bodyTemplate; + $this->tags = $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) + { + if ($formatter === null) { + $formatter = new PassthroughFormatter(); + } + + $tags = []; + 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() + { + return $this->render(); + } +} diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/DescriptionFactory.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/DescriptionFactory.php new file mode 100644 index 0000000..f34d0f7 --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/DescriptionFactory.php @@ -0,0 +1,192 @@ + + * @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; + +/** + * Creates a new Description object given a body of text. + * + * Descriptions in phpDocumentor are somewhat complex entities as they can contain one or more tags inside their + * body that can be replaced with a readable output. The replacing is done by passing a Formatter object to the + * Description object's `render` method. + * + * In addition to the above does a Description support two types of escape sequences: + * + * 1. `{@}` to escape the `@` character to prevent it from being interpreted as part of a tag, i.e. `{{@}link}` + * 2. `{}` to escape the `}` character, this can be used if you want to use the `}` character in the description + * of an inline tag. + * + * If a body consists of multiple lines then this factory will also remove any superfluous whitespace at the beginning + * of each line while maintaining any indentation that is used. This will prevent formatting parsers from tripping + * over unexpected spaces as can be observed with tag descriptions. + */ +class DescriptionFactory +{ + /** @var TagFactory */ + private $tagFactory; + + /** + * Initializes this factory with the means to construct (inline) tags. + * + * @param TagFactory $tagFactory + */ + public function __construct(TagFactory $tagFactory) + { + $this->tagFactory = $tagFactory; + } + + /** + * Returns the parsed text of this description. + * + * @param string $contents + * @param TypeContext $context + * + * @return Description + */ + public function create($contents, TypeContext $context = null) + { + list($text, $tags) = $this->parse($this->lex($contents), $context); + + return new Description($text, $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) + { + $contents = $this->removeSuperfluousStartingWhitespace($contents); + + // performance optimalization; if there is no inline tag, don't bother splitting it up. + if (strpos($contents, '{@') === false) { + return [$contents]; + } + + return preg_split( + '/\{ + # "{@}" is not a valid inline tag. This ensures that we do not treat it as one, but treat it literally. + (?!@\}) + # We want to capture the whole tag line, but without the inline tag delimiters. + (\@ + # Match everything up to the next delimiter. + [^{}]* + # Nested inline tag content should not be captured, or it will appear in the result separately. + (?: + # Match nested inline tags. + (?: + # Because we did not catch the tag delimiters earlier, we must be explicit with them here. + # Notice that this also matches "{}", as a way to later introduce it as an escape sequence. + \{(?1)?\} + | + # Make sure we match hanging "{". + \{ + ) + # Match content after the nested inline tag. + [^{}]* + )* # If there are more inline tags, match them as well. We use "*" since there may not be any + # nested inline tags. + ) + \}/Sux', + $contents, + null, + 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. + * + * When a description has more than one line then it can happen that the second and subsequent lines have an + * additional indentation. This is commonly in use with tags like this: + * + * {@}since 1.1.0 This is an example + * description where we have an + * indentation in the second and + * subsequent lines. + * + * 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) + { + $lines = explode("\n", $contents); + + // if there is only one line then we don't have lines with superfluous whitespace and + // can use the contents as-is + if (count($lines) <= 1) { + return $contents; + } + + // determine how many whitespace characters need to be stripped + $startingSpaceCount = 9999999; + for ($i = 1; $i < count($lines); $i++) { + // lines with a no length do not count as they are not indented at all + if (strlen(trim($lines[$i])) === 0) { + continue; + } + + // determine the number of prefixing spaces by checking the difference in line length before and after + // an ltrim + $startingSpaceCount = min($startingSpaceCount, strlen($lines[$i]) - strlen(ltrim($lines[$i]))); + } + + // strip the number of spaces from each line + if ($startingSpaceCount > 0) { + for ($i = 1; $i < count($lines); $i++) { + $lines[$i] = substr($lines[$i], $startingSpaceCount); + } + } + + return implode("\n", $lines); + } + +} diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/ExampleFinder.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/ExampleFinder.php new file mode 100644 index 0000000..3cc5dab --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/ExampleFinder.php @@ -0,0 +1,170 @@ + + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection; + +use phpDocumentor\Reflection\DocBlock\Tags\Example; + +/** + * Class used to find an example file's location based on a given ExampleDescriptor. + */ +class ExampleFinder +{ + /** @var string */ + private $sourceDirectory = ''; + + /** @var string[] */ + private $exampleDirectories = array(); + + /** + * Attempts to find the example contents for the given descriptor. + * + * @param Example $example + * + * @return string + */ + public function find(Example $example) + { + $filename = $example->getFilePath(); + + $file = $this->getExampleFileContents($filename); + if (!$file) { + return "** File not found : {$filename} **"; + } + + return implode('', array_slice($file, $example->getStartingLine() - 1, $example->getLineCount())); + } + + /** + * Registers the project's root directory where an 'examples' folder can be expected. + * + * @param string $directory + * + * @return void + */ + public function setSourceDirectory($directory = '') + { + $this->sourceDirectory = $directory; + } + + /** + * Returns the project's root directory where an 'examples' folder can be expected. + * + * @return string + */ + public function getSourceDirectory() + { + return $this->sourceDirectory; + } + + /** + * Registers a series of directories that may contain examples. + * + * @param string[] $directories + */ + public function setExampleDirectories(array $directories) + { + $this->exampleDirectories = $directories; + } + + /** + * Returns a series of directories that may contain examples. + * + * @return string[] + */ + public function getExampleDirectories() + { + return $this->exampleDirectories; + } + + /** + * Attempts to find the requested example file and returns its contents or null if no file was found. + * + * This method will try several methods in search of the given example file, the first one it encounters is + * returned: + * + * 1. Iterates through all examples folders for the given filename + * 2. Checks the source folder for the given filename + * 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 + */ + private function getExampleFileContents($filename) + { + $normalizedPath = null; + + foreach ($this->exampleDirectories as $directory) { + $exampleFileFromConfig = $this->constructExamplePath($directory, $filename); + if (is_readable($exampleFileFromConfig)) { + $normalizedPath = $exampleFileFromConfig; + break; + } + } + + if (!$normalizedPath) { + if (is_readable($this->getExamplePathFromSource($filename))) { + $normalizedPath = $this->getExamplePathFromSource($filename); + } elseif (is_readable($this->getExamplePathFromExampleDirectory($filename))) { + $normalizedPath = $this->getExamplePathFromExampleDirectory($filename); + } elseif (is_readable($filename)) { + $normalizedPath = $filename; + } + } + + return $normalizedPath && is_readable($normalizedPath) ? file($normalizedPath) : null; + } + + /** + * Get example filepath based on the example directory inside your project. + * + * @param string $file + * + * @return string + */ + private function getExamplePathFromExampleDirectory($file) + { + 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) + { + return rtrim($directory, '\\/') . DIRECTORY_SEPARATOR . $file; + } + + /** + * Get example filepath based on sourcecode. + * + * @param string $file + * + * @return string + */ + private function getExamplePathFromSource($file) + { + return sprintf( + '%s%s%s', + trim($this->getSourceDirectory(), '\\/'), + DIRECTORY_SEPARATOR, + trim($file, '"') + ); + } +} diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Serializer.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Serializer.php new file mode 100644 index 0000000..7f1c89d --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Serializer.php @@ -0,0 +1,143 @@ + + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\DocBlock; + +use phpDocumentor\Reflection\DocBlock; +use Webmozart\Assert\Assert; + +/** + * Converts a DocBlock back from an object to a complete DocComment including Asterisks. + */ +class Serializer +{ + /** @var string The string to indent the comment with. */ + protected $indentString = ' '; + + /** @var int The number of times the indent string is repeated. */ + protected $indent = 0; + + /** @var bool Whether to indent the first line with the given indent amount and string. */ + protected $isFirstLineIndented = true; + + /** @var int|null The max length of a line. */ + protected $lineLength = null; + + /** + * 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. + */ + 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; + $this->isFirstLineIndented = $indentFirstLine; + $this->lineLength = $lineLength; + } + + /** + * Generate a DocBlock comment. + * + * @param DocBlock $docblock The DocBlock to serialize. + * + * @return string The serialized doc block. + */ + public function getDocComment(DocBlock $docblock) + { + $indent = str_repeat($this->indentString, $this->indent); + $firstIndent = $this->isFirstLineIndented ? $indent : ''; + // 3 === strlen(' * ') + $wrapLength = $this->lineLength ? $this->lineLength - strlen($indent) - 3 : null; + + $text = $this->removeTrailingSpaces( + $indent, + $this->addAsterisksForEachLine( + $indent, + $this->getSummaryAndDescriptionTextBlock($docblock, $wrapLength) + ) + ); + + $comment = "{$firstIndent}/**\n{$indent} * {$text}\n{$indent} *\n"; + $comment = $this->addTagBlock($docblock, $wrapLength, $indent, $comment); + $comment .= $indent . ' */'; + + return $comment; + } + + /** + * @param $indent + * @param $text + * @return mixed + */ + private function removeTrailingSpaces($indent, $text) + { + return str_replace("\n{$indent} * \n", "\n{$indent} *\n", $text); + } + + /** + * @param $indent + * @param $text + * @return mixed + */ + private function addAsterisksForEachLine($indent, $text) + { + return str_replace("\n", "\n{$indent} * ", $text); + } + + /** + * @param DocBlock $docblock + * @param $wrapLength + * @return string + */ + private function getSummaryAndDescriptionTextBlock(DocBlock $docblock, $wrapLength) + { + $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) + { + foreach ($docblock->getTags() as $tag) { + $formatter = new DocBlock\Tags\Formatter\PassthroughFormatter(); + $tagText = $formatter->format($tag); + if ($wrapLength !== null) { + $tagText = wordwrap($tagText, $wrapLength); + } + $tagText = str_replace("\n", "\n{$indent} * ", $tagText); + + $comment .= "{$indent} * {$tagText}\n"; + } + + return $comment; + } +} diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/StandardTagFactory.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/StandardTagFactory.php new file mode 100644 index 0000000..0a65646 --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/StandardTagFactory.php @@ -0,0 +1,314 @@ + + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\DocBlock; + +use phpDocumentor\Reflection\DocBlock\Tags\Factory\StaticMethod; +use phpDocumentor\Reflection\DocBlock\Tags\Generic; +use phpDocumentor\Reflection\FqsenResolver; +use phpDocumentor\Reflection\Types\Context as TypeContext; +use Webmozart\Assert\Assert; + +/** + * Creates a Tag object given the contents of a tag. + * + * This Factory is capable of determining the appropriate class for a tag and instantiate it using its `create` + * factory method. The `create` factory method of a Tag can have a variable number of arguments; this way you can + * pass the dependencies that you need to construct a tag object. + * + * > Important: each parameter in addition to the body variable for the `create` method must default to null, otherwise + * > it violates the constraint with the interface; it is recommended to use the {@see Assert::notNull()} method to + * > verify that a dependency is actually passed. + * + * This Factory also features a Service Locator component that is used to pass the right dependencies to the + * `create` method of a tag; each dependency should be registered as a service or as a parameter. + * + * When you want to use a Tag of your own with custom handling you need to call the `registerTagHandler` method, pass + * the name of the tag and a Fully Qualified Class Name pointing to a class that implements the Tag interface. + */ +final class StandardTagFactory implements TagFactory +{ + /** PCRE regular expression matching a tag name. */ + 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. + */ + private $tagHandlerMappings = [ + 'author' => '\phpDocumentor\Reflection\DocBlock\Tags\Author', + 'covers' => '\phpDocumentor\Reflection\DocBlock\Tags\Covers', + 'deprecated' => '\phpDocumentor\Reflection\DocBlock\Tags\Deprecated', + // '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' + ]; + + /** + * @var \ReflectionParameter[][] a lazy-loading cache containing parameters for each tagHandler that has been used. + */ + private $tagHandlerParameterCache = []; + + /** + * @var FqsenResolver + */ + private $fqsenResolver; + + /** + * @var mixed[] an array representing a simple Service Locator where we can store parameters and + * services that can be inserted into the Factory Methods of Tag Handlers. + */ + private $serviceLocator = []; + + /** + * Initialize this tag factory with the means to resolve an FQSEN and optionally a list of tag handlers. + * + * 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. + */ + public function __construct(FqsenResolver $fqsenResolver, array $tagHandlers = null) + { + $this->fqsenResolver = $fqsenResolver; + if ($tagHandlers !== null) { + $this->tagHandlerMappings = $tagHandlers; + } + + $this->addService($fqsenResolver, FqsenResolver::class); + } + + /** + * {@inheritDoc} + */ + public function create($tagLine, TypeContext $context = null) + { + if (! $context) { + $context = new TypeContext(''); + } + + list($tagName, $tagBody) = $this->extractTagParts($tagLine); + + return $this->createTag($tagBody, $tagName, $context); + } + + /** + * {@inheritDoc} + */ + public function addParameter($name, $value) + { + $this->serviceLocator[$name] = $value; + } + + /** + * {@inheritDoc} + */ + public function addService($service, $alias = null) + { + $this->serviceLocator[$alias ?: get_class($service)] = $service; + } + + /** + * {@inheritDoc} + */ + public function registerTagHandler($tagName, $handler) + { + Assert::stringNotEmpty($tagName); + Assert::stringNotEmpty($handler); + Assert::classExists($handler); + Assert::implementsInterface($handler, StaticMethod::class); + + if (strpos($tagName, '\\') && $tagName[0] !== '\\') { + throw new \InvalidArgumentException( + 'A namespaced tag must have a leading backslash as it must be fully qualified' + ); + } + + $this->tagHandlerMappings[$tagName] = $handler; + } + + /** + * Extracts all components for a tag. + * + * @param string $tagLine + * + * @return string[] + */ + private function extractTagParts($tagLine) + { + $matches = array(); + if (! preg_match('/^@(' . self::REGEX_TAGNAME . ')(?:\s*([^\s].*)|$)?/us', $tagLine, $matches)) { + throw new \InvalidArgumentException( + 'The tag "' . $tagLine . '" does not seem to be wellformed, please check it for errors' + ); + } + + if (count($matches) < 3) { + $matches[] = ''; + } + + return array_slice($matches, 1); + } + + /** + * 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) + { + $handlerClassName = $this->findHandlerClassName($name, $context); + $arguments = $this->getArgumentsForParametersFromWiring( + $this->fetchParametersForHandlerFactoryMethod($handlerClassName), + $this->getServiceLocatorWithDynamicParameters($context, $name, $body) + ) + ; + + return call_user_func_array([$handlerClassName, 'create'], $arguments); + } + + /** + * Determines the Fully Qualified Class Name of the Factory or Tag (containing a Factory Method `create`). + * + * @param string $tagName + * @param TypeContext $context + * + * @return string + */ + private function findHandlerClassName($tagName, TypeContext $context) + { + $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]; + // } + } + + return $handlerClassName; + } + + /** + * Retrieves the arguments that need to be passed to the Factory Method with the given Parameters. + * + * @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) + { + $arguments = []; + foreach ($parameters as $index => $parameter) { + $typeHint = $parameter->getClass() ? $parameter->getClass()->getName() : null; + if (isset($locator[$typeHint])) { + $arguments[] = $locator[$typeHint]; + continue; + } + + $parameterName = $parameter->getName(); + if (isset($locator[$parameterName])) { + $arguments[] = $locator[$parameterName]; + continue; + } + + $arguments[] = null; + } + + return $arguments; + } + + /** + * Retrieves a series of ReflectionParameter objects for the static 'create' method of the given + * tag handler class name. + * + * @param string $handlerClassName + * + * @return \ReflectionParameter[] + */ + private function fetchParametersForHandlerFactoryMethod($handlerClassName) + { + if (! isset($this->tagHandlerParameterCache[$handlerClassName])) { + $methodReflection = new \ReflectionMethod($handlerClassName, 'create'); + $this->tagHandlerParameterCache[$handlerClassName] = $methodReflection->getParameters(); + } + + return $this->tagHandlerParameterCache[$handlerClassName]; + } + + /** + * 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. + * + * @return mixed[] + */ + private function getServiceLocatorWithDynamicParameters(TypeContext $context, $tagName, $tagBody) + { + $locator = array_merge( + $this->serviceLocator, + [ + '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) + { + // 1. Contains a namespace separator + // 2. Contains parenthesis + // 3. Is present in a list of known annotations (make the algorithm smart by first checking is the last part + // of the annotation class name matches the found tag name + + return false; + } +} diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tag.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tag.php new file mode 100644 index 0000000..e765367 --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tag.php @@ -0,0 +1,26 @@ + + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\DocBlock; + +use phpDocumentor\Reflection\DocBlock\Tags\Formatter; + +interface Tag +{ + public function getName(); + + public static function create($body); + + public function render(Formatter $formatter = null); + + public function __toString(); +} diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/TagFactory.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/TagFactory.php new file mode 100644 index 0000000..3c1d113 --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/TagFactory.php @@ -0,0 +1,93 @@ + + * @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; + +interface TagFactory +{ + /** + * Adds a parameter to the service locator that can be injected in a tag's factory method. + * + * When calling a tag's "create" method we always check the signature for dependencies to inject. One way is to + * typehint a parameter in the signature so that we can use that interface or class name to inject a dependency + * (see {@see addService()} for more information on that). + * + * Another way is to check the name of the argument against the names in the Service Locator. With this method + * you can add a variable that will be inserted when a tag's create method is not typehinted and has a matching + * name. + * + * Be aware that there are two reserved names: + * + * - name, representing the name of the tag. + * - body, representing the complete body of the tag. + * + * 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 + */ + public function addParameter($name, $value); + + /** + * Registers a service with the Service Locator using the FQCN of the class or the alias, if provided. + * + * When calling a tag's "create" method we always check the signature for dependencies to inject. If a parameter + * has a typehint then the ServiceLocator is queried to see if a Service is registered for that typehint. + * + * 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); + + /** + * 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). + * + * @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. + * + * @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 + */ + public function registerTagHandler($tagName, $handler); +} diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Author.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Author.php new file mode 100644 index 0000000..41a2788 --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Author.php @@ -0,0 +1,100 @@ + + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\DocBlock\Tags; + +use Webmozart\Assert\Assert; + +/** + * Reflection class for an {@}author tag in a Docblock. + */ +final class Author extends BaseTag implements Factory\StaticMethod +{ + /** @var string register that this is the author tag. */ + protected $name = 'author'; + + /** @var string The name of the author */ + private $authorName = ''; + + /** @var string The email of the author */ + private $authorEmail = ''; + + /** + * Initializes this tag with the author name and e-mail. + * + * @param string $authorName + * @param string $authorEmail + */ + public function __construct($authorName, $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'); + } + + $this->authorName = $authorName; + $this->authorEmail = $authorEmail; + } + + /** + * Gets the author's name. + * + * @return string The author's name. + */ + public function getAuthorName() + { + return $this->authorName; + } + + /** + * Returns the author's email. + * + * @return string The author's email. + */ + public function getEmail() + { + return $this->authorEmail; + } + + /** + * Returns this tag in string form. + * + * @return string + */ + public function __toString() + { + return $this->authorName . '<' . $this->authorEmail . '>'; + } + + /** + * Attempts to create a new Author object based on †he tag body. + * + * @param string $body + * + * @return static + */ + public static function create($body) + { + Assert::string($body); + + $splitTagContent = preg_match('/^([^\<]*)(?:\<([^\>]*)\>)?$/u', $body, $matches); + if (!$splitTagContent) { + return null; + } + + $authorName = trim($matches[1]); + $email = isset($matches[2]) ? trim($matches[2]) : ''; + + return new static($authorName, $email); + } +} diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/BaseTag.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/BaseTag.php new file mode 100644 index 0000000..14bb717 --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/BaseTag.php @@ -0,0 +1,52 @@ + + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\DocBlock\Tags; + +use phpDocumentor\Reflection\DocBlock; +use phpDocumentor\Reflection\DocBlock\Description; + +/** + * Parses a tag definition for a DocBlock. + */ +abstract class BaseTag implements DocBlock\Tag +{ + /** @var string Name of the tag */ + protected $name = ''; + + /** @var Description|null Description of the tag. */ + protected $description; + + /** + * Gets the name of this tag. + * + * @return string The name of this tag. + */ + public function getName() + { + return $this->name; + } + + public function getDescription() + { + return $this->description; + } + + public function render(Formatter $formatter = null) + { + if ($formatter === null) { + $formatter = new Formatter\PassthroughFormatter(); + } + + return $formatter->format($this); + } +} diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Covers.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Covers.php new file mode 100644 index 0000000..31b4f82 --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Covers.php @@ -0,0 +1,84 @@ + + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\DocBlock\Tags; + +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 Webmozart\Assert\Assert; + +/** + * Reflection class for a @covers tag in a Docblock. + */ +final class Covers extends BaseTag implements Factory\StaticMethod +{ + protected $name = 'covers'; + + /** @var Fqsen */ + private $refers = null; + + /** + * Initializes this tag. + * + * @param Fqsen $refers + * @param Description $description + */ + public function __construct(Fqsen $refers, Description $description = null) + { + $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); + + $parts = preg_split('/\s+/Su', $body, 2); + + return new static( + $resolver->resolve($parts[0], $context), + $descriptionFactory->create(isset($parts[1]) ? $parts[1] : '', $context) + ); + } + + /** + * Returns the structural element this tag refers to. + * + * @return Fqsen + */ + public function getReference() + { + return $this->refers; + } + + /** + * Returns a string representation of this tag. + * + * @return string + */ + public function __toString() + { + return $this->refers . ($this->description ? ' ' . $this->description->render() : ''); + } +} diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Deprecated.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Deprecated.php new file mode 100644 index 0000000..7c1039f --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Deprecated.php @@ -0,0 +1,97 @@ + + * @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 Webmozart\Assert\Assert; + +/** + * Reflection class for a {@}deprecated tag in a Docblock. + */ +final class Deprecated extends BaseTag implements Factory\StaticMethod +{ + protected $name = 'deprecated'; + + /** + * PCRE regular expression matching a version vector. + * Assumes the "x" modifier. + */ + const REGEX_VECTOR = '(?: + # Normal release vectors. + \d\S* + | + # VCS version vectors. Per PHPCS, they are expected to + # follow the form of the VCS name, followed by ":", followed + # by the version vector itself. + # By convention, popular VCSes like CVS, SVN and GIT use "$" + # around the actual version vector. + [^\s\:]+\:\s*\$[^\$]+\$ + )'; + + /** @var string The version vector. */ + private $version = ''; + + public function __construct($version = null, Description $description = null) + { + Assert::nullOrStringNotEmpty($version); + + $this->version = $version; + $this->description = $description; + } + + /** + * @return static + */ + public static function create($body, DescriptionFactory $descriptionFactory = null, TypeContext $context = null) + { + Assert::nullOrString($body); + if (empty($body)) { + return new static(); + } + + $matches = []; + if (!preg_match('/^(' . self::REGEX_VECTOR . ')\s*(.+)?$/sux', $body, $matches)) { + return new static( + null, + null !== $descriptionFactory ? $descriptionFactory->create($body, $context) : null + ); + } + + return new static( + $matches[1], + $descriptionFactory->create(isset($matches[2]) ? $matches[2] : '', $context) + ); + } + + /** + * Gets the version section of the tag. + * + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * Returns a string representation for this tag. + * + * @return string + */ + public function __toString() + { + return $this->version . ($this->description ? ' ' . $this->description->render() : ''); + } +} diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Example.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Example.php new file mode 100644 index 0000000..571ef8d --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Example.php @@ -0,0 +1,158 @@ + + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\DocBlock\Tags; + +use phpDocumentor\Reflection\DocBlock\Tag; + +/** + * Reflection class for a {@}example tag in a Docblock. + */ +final class Example extends BaseTag +{ + /** + * @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; + + /** + * {@inheritdoc} + */ + public function getContent() + { + if (null === $this->description) { + $filePath = '"' . $this->filePath . '"'; + if ($this->isURI) { + $filePath = $this->isUriRelative($this->filePath) + ? str_replace('%2F', '/', rawurlencode($this->filePath)) + :$this->filePath; + } + + $this->description = $filePath . ' ' . parent::getContent(); + } + + return $this->description; + } + + /** + * {@inheritdoc} + */ + public static function create($body) + { + // File component: File path in quotes or File URI / Source information + if (! preg_match('/^(?:\"([^\"]+)\"|(\S+))(?:\s+(.*))?$/sux', $body, $matches)) { + return null; + } + + $filePath = null; + $fileUri = null; + if ('' !== $matches[1]) { + $filePath = $matches[1]; + } else { + $fileUri = $matches[2]; + } + + $startingLine = 1; + $lineCount = null; + $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]; + } + $description = $matches[3]; + } + + return new static($filePath, $fileUri, $startingLine, $lineCount, $description); + } + + /** + * Returns the file path. + * + * @return string Path to a file to use as an example. + * May also be an absolute URI. + */ + public function getFilePath() + { + 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; + } + + /** + * Returns a string representation for this tag. + * + * @return string + */ + public function __toString() + { + return $this->filePath . ($this->description ? ' ' . $this->description->render() : ''); + } + + /** + * 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) + { + return false === strpos($uri, ':'); + } +} diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Factory/StaticMethod.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Factory/StaticMethod.php new file mode 100644 index 0000000..98aea45 --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Factory/StaticMethod.php @@ -0,0 +1,18 @@ + + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\DocBlock\Tags\Factory; + +interface StaticMethod +{ + public static function create($body); +} diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Factory/Strategy.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Factory/Strategy.php new file mode 100644 index 0000000..b9ca0b8 --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Factory/Strategy.php @@ -0,0 +1,18 @@ + + * @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/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Formatter.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Formatter.php new file mode 100644 index 0000000..64b2c60 --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Formatter.php @@ -0,0 +1,27 @@ + + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\DocBlock\Tags; + +use phpDocumentor\Reflection\DocBlock\Tag; + +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); +} diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Formatter/PassthroughFormatter.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Formatter/PassthroughFormatter.php new file mode 100644 index 0000000..aa97572 --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Formatter/PassthroughFormatter.php @@ -0,0 +1,31 @@ + + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\DocBlock\Tags\Formatter; + +use phpDocumentor\Reflection\DocBlock\Tag; +use phpDocumentor\Reflection\DocBlock\Tags\Formatter; + +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) + { + return '@' . $tag->getName() . ' ' . (string)$tag; + } +} diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Generic.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Generic.php new file mode 100644 index 0000000..e4c53e0 --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Generic.php @@ -0,0 +1,91 @@ + + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\DocBlock\Tags; + +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; + +/** + * Parses a tag definition for a DocBlock. + */ +class Generic extends BaseTag implements Factory\StaticMethod +{ + /** + * Parses a tag and populates the member variables. + * + * @param string $name Name of the tag. + * @param Description $description The contents of the given tag. + */ + public function __construct($name, Description $description = null) + { + $this->validateTagName($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); + Assert::stringNotEmpty($name); + Assert::notNull($descriptionFactory); + + $description = $descriptionFactory && $body ? $descriptionFactory->create($body, $context) : null; + + return new static($name, $description); + } + + /** + * Returns the tag as a serialized string + * + * @return string + */ + public function __toString() + { + return ($this->description ? $this->description->render() : ''); + } + + /** + * Validates if the tag name matches the expected format, otherwise throws an exception. + * + * @param string $name + * + * @return void + */ + private function validateTagName($name) + { + 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/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Link.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Link.php new file mode 100644 index 0000000..9c0e367 --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Link.php @@ -0,0 +1,77 @@ + + * @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 + */ + +namespace phpDocumentor\Reflection\DocBlock\Tags; + +use phpDocumentor\Reflection\DocBlock\Description; +use phpDocumentor\Reflection\DocBlock\DescriptionFactory; +use phpDocumentor\Reflection\Types\Context as TypeContext; +use Webmozart\Assert\Assert; + +/** + * Reflection class for a @link tag in a Docblock. + */ +final class Link extends BaseTag implements Factory\StaticMethod +{ + protected $name = 'link'; + + /** @var string */ + private $link = ''; + + /** + * Initializes a link to a URL. + * + * @param string $link + * @param Description $description + */ + public function __construct($link, Description $description = null) + { + Assert::string($link); + + $this->link = $link; + $this->description = $description; + } + + /** + * {@inheritdoc} + */ + public static function create($body, DescriptionFactory $descriptionFactory = null, TypeContext $context = null) + { + Assert::string($body); + Assert::notNull($descriptionFactory); + + $parts = preg_split('/\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() + { + return $this->link; + } + + /** + * Returns a string representation for this tag. + * + * @return string + */ + public function __toString() + { + return $this->link . ($this->description ? ' ' . $this->description->render() : ''); + } +} diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Method.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Method.php new file mode 100644 index 0000000..d600aaa --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Method.php @@ -0,0 +1,230 @@ + + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\DocBlock\Tags; + +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\Void_; +use Webmozart\Assert\Assert; + +/** + * Reflection class for an {@}method in a Docblock. + */ +final class Method extends BaseTag implements Factory\StaticMethod +{ + protected $name = 'method'; + + /** @var string */ + private $methodName = ''; + + /** @var string[] */ + private $arguments = []; + + /** @var bool */ + private $isStatic = false; + + /** @var Type */ + private $returnType; + + public function __construct( + $methodName, + array $arguments = [], + Type $returnType = null, + $static = false, + Description $description = null + ) { + Assert::stringNotEmpty($methodName); + Assert::boolean($static); + + if ($returnType === null) { + $returnType = new Void_(); + } + + $this->methodName = $methodName; + $this->arguments = $this->filterArguments($arguments); + $this->returnType = $returnType; + $this->isStatic = $static; + $this->description = $description; + } + + /** + * {@inheritdoc} + */ + public static function create( + $body, + TypeResolver $typeResolver = null, + DescriptionFactory $descriptionFactory = null, + TypeContext $context = null + ) { + Assert::stringNotEmpty($body); + Assert::allNotNull([ $typeResolver, $descriptionFactory ]); + + // 1. none or more whitespace + // 2. optionally the keyword "static" followed by whitespace + // 3. optionally a word with underscores followed by whitespace : as + // type for the return value + // 4. then optionally a word with underscores followed by () and + // whitespace : as method name as used by phpDocumentor + // 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( + '/^ + # Static keyword + # Declares a static method ONLY if type is also present + (?: + (static) + \s+ + )? + # Return type + (?: + ( + (?:[\w\|_\\\\]+) + # array notation + (?:\[\])* + )? + \s+ + )? + # Legacy method name (not captured) + (?: + [\w_]+\(\)\s+ + )? + # Method name + ([\w\|_\\\\]+) + # Arguments + (?: + \(([^\)]*)\) + )? + \s* + # Description + (.*) + $/sux', + $body, + $matches + )) { + return null; + } + + list(, $static, $returnType, $methodName, $arguments, $description) = $matches; + + $static = $static === 'static'; + $returnType = $typeResolver->resolve($returnType, $context); + $description = $descriptionFactory->create($description, $context); + + if ('' !== $arguments) { + $arguments = explode(',', $arguments); + foreach($arguments as &$argument) { + $argument = explode(' ', self::stripRestArg(trim($argument)), 2); + if ($argument[0][0] === '$') { + $argumentName = substr($argument[0], 1); + $argumentType = new Void_(); + } else { + $argumentType = $typeResolver->resolve($argument[0], $context); + $argumentName = ''; + if (isset($argument[1])) { + $argument[1] = self::stripRestArg($argument[1]); + $argumentName = substr($argument[1], 1); + } + } + + $argument = [ 'name' => $argumentName, 'type' => $argumentType]; + } + } else { + $arguments = []; + } + + return new static($methodName, $arguments, $returnType, $static, $description); + } + + /** + * Retrieves the method name. + * + * @return string + */ + public function getMethodName() + { + return $this->methodName; + } + + /** + * @return string[] + */ + public function getArguments() + { + return $this->arguments; + } + + /** + * Checks whether the method tag describes a static method or not. + * + * @return bool TRUE if the method declaration is for a static method, FALSE otherwise. + */ + public function isStatic() + { + return $this->isStatic; + } + + /** + * @return Type + */ + public function getReturnType() + { + return $this->returnType; + } + + public function __toString() + { + $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() : ''); + } + + private function filterArguments($arguments) + { + foreach ($arguments as &$argument) { + if (is_string($argument)) { + $argument = [ 'name' => $argument ]; + } + if (! isset($argument['type'])) { + $argument['type'] = new Void_(); + } + $keys = array_keys($argument); + if ($keys !== [ 'name', 'type' ]) { + throw new \InvalidArgumentException( + 'Arguments can only have the "name" and "type" fields, found: ' . var_export($keys, true) + ); + } + } + + return $arguments; + } + + private static function stripRestArg($argument) + { + if (strpos($argument, '...') === 0) { + $argument = trim(substr($argument, 3)); + } + + return $argument; + } +} diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Param.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Param.php new file mode 100644 index 0000000..1a51dc0 --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Param.php @@ -0,0 +1,141 @@ + + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\DocBlock\Tags; + +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 Webmozart\Assert\Assert; + +/** + * Reflection class for the {@}param tag in a Docblock. + */ +final class Param extends BaseTag implements Factory\StaticMethod +{ + /** @var string */ + protected $name = 'param'; + + /** @var Type */ + private $type; + + /** @var string */ + private $variableName = ''; + + /** @var bool determines whether this is a variadic argument */ + private $isVariadic = false; + + /** + * @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); + + $this->variableName = $variableName; + $this->type = $type; + $this->isVariadic = $isVariadic; + $this->description = $description; + } + + /** + * {@inheritdoc} + */ + public static function create( + $body, + TypeResolver $typeResolver = null, + DescriptionFactory $descriptionFactory = null, + TypeContext $context = null + ) { + Assert::stringNotEmpty($body); + Assert::allNotNull([$typeResolver, $descriptionFactory]); + + $parts = preg_split('/(\s+)/Su', $body, 3, PREG_SPLIT_DELIM_CAPTURE); + $type = null; + $variableName = ''; + $isVariadic = 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 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) === '...$')) { + $variableName = array_shift($parts); + array_shift($parts); + + if (substr($variableName, 0, 3) === '...') { + $isVariadic = true; + $variableName = substr($variableName, 3); + } + + if (substr($variableName, 0, 1) === '$') { + $variableName = substr($variableName, 1); + } + } + + $description = $descriptionFactory->create(implode('', $parts), $context); + + return new static($variableName, $type, $isVariadic, $description); + } + + /** + * Returns the variable's name. + * + * @return string + */ + public function getVariableName() + { + 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() + { + return $this->isVariadic; + } + + /** + * Returns a string representation for this tag. + * + * @return string + */ + public function __toString() + { + return ($this->type ? $this->type . ' ' : '') + . ($this->isVariadic() ? '...' : '') + . '$' . $this->variableName + . ($this->description ? ' ' . $this->description : ''); + } +} diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Property.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Property.php new file mode 100644 index 0000000..3c59713 --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Property.php @@ -0,0 +1,118 @@ + + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\DocBlock\Tags; + +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 Webmozart\Assert\Assert; + +/** + * Reflection class for a {@}property tag in a Docblock. + */ +class Property extends BaseTag implements Factory\StaticMethod +{ + /** @var string */ + protected $name = 'property'; + + /** @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) + { + Assert::string($variableName); + + $this->variableName = $variableName; + $this->type = $type; + $this->description = $description; + } + + /** + * {@inheritdoc} + */ + public static function create( + $body, + TypeResolver $typeResolver = null, + DescriptionFactory $descriptionFactory = null, + TypeContext $context = null + ) { + Assert::stringNotEmpty($body); + Assert::allNotNull([$typeResolver, $descriptionFactory]); + + $parts = preg_split('/(\s+)/Su', $body, 3, 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 the next item starts with a $ or ...$ it must be the variable name + if (isset($parts[0]) && (strlen($parts[0]) > 0) && ($parts[0][0] == '$')) { + $variableName = array_shift($parts); + array_shift($parts); + + if (substr($variableName, 0, 1) === '$') { + $variableName = substr($variableName, 1); + } + } + + $description = $descriptionFactory->create(implode('', $parts), $context); + + return new static($variableName, $type, $description); + } + + /** + * Returns the variable's name. + * + * @return string + */ + public function getVariableName() + { + 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() + { + return ($this->type ? $this->type . ' ' : '') + . '$' . $this->variableName + . ($this->description ? ' ' . $this->description : ''); + } +} diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/PropertyRead.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/PropertyRead.php new file mode 100644 index 0000000..bf2b805 --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/PropertyRead.php @@ -0,0 +1,118 @@ + + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\DocBlock\Tags; + +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 Webmozart\Assert\Assert; + +/** + * Reflection class for a {@}property-read tag in a Docblock. + */ +class PropertyRead extends BaseTag implements Factory\StaticMethod +{ + /** @var string */ + protected $name = 'property-read'; + + /** @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) + { + Assert::string($variableName); + + $this->variableName = $variableName; + $this->type = $type; + $this->description = $description; + } + + /** + * {@inheritdoc} + */ + public static function create( + $body, + TypeResolver $typeResolver = null, + DescriptionFactory $descriptionFactory = null, + TypeContext $context = null + ) { + Assert::stringNotEmpty($body); + Assert::allNotNull([$typeResolver, $descriptionFactory]); + + $parts = preg_split('/(\s+)/Su', $body, 3, 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 the next item starts with a $ or ...$ it must be the variable name + if (isset($parts[0]) && (strlen($parts[0]) > 0) && ($parts[0][0] == '$')) { + $variableName = array_shift($parts); + array_shift($parts); + + if (substr($variableName, 0, 1) === '$') { + $variableName = substr($variableName, 1); + } + } + + $description = $descriptionFactory->create(implode('', $parts), $context); + + return new static($variableName, $type, $description); + } + + /** + * Returns the variable's name. + * + * @return string + */ + public function getVariableName() + { + 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() + { + return ($this->type ? $this->type . ' ' : '') + . '$' . $this->variableName + . ($this->description ? ' ' . $this->description : ''); + } +} diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/PropertyWrite.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/PropertyWrite.php new file mode 100644 index 0000000..db37e0f --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/PropertyWrite.php @@ -0,0 +1,118 @@ + + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\DocBlock\Tags; + +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 Webmozart\Assert\Assert; + +/** + * Reflection class for a {@}property-write tag in a Docblock. + */ +class PropertyWrite extends BaseTag implements Factory\StaticMethod +{ + /** @var string */ + protected $name = 'property-write'; + + /** @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) + { + Assert::string($variableName); + + $this->variableName = $variableName; + $this->type = $type; + $this->description = $description; + } + + /** + * {@inheritdoc} + */ + public static function create( + $body, + TypeResolver $typeResolver = null, + DescriptionFactory $descriptionFactory = null, + TypeContext $context = null + ) { + Assert::stringNotEmpty($body); + Assert::allNotNull([$typeResolver, $descriptionFactory]); + + $parts = preg_split('/(\s+)/Su', $body, 3, 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 the next item starts with a $ or ...$ it must be the variable name + if (isset($parts[0]) && (strlen($parts[0]) > 0) && ($parts[0][0] == '$')) { + $variableName = array_shift($parts); + array_shift($parts); + + if (substr($variableName, 0, 1) === '$') { + $variableName = substr($variableName, 1); + } + } + + $description = $descriptionFactory->create(implode('', $parts), $context); + + return new static($variableName, $type, $description); + } + + /** + * Returns the variable's name. + * + * @return string + */ + public function getVariableName() + { + 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() + { + return ($this->type ? $this->type . ' ' : '') + . '$' . $this->variableName + . ($this->description ? ' ' . $this->description : ''); + } +} diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Return_.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Return_.php new file mode 100644 index 0000000..09a5870 --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Return_.php @@ -0,0 +1,73 @@ + + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\DocBlock\Tags; + +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 Webmozart\Assert\Assert; + +/** + * Reflection class for a {@}return tag in a Docblock. + */ +final class Return_ extends BaseTag implements Factory\StaticMethod +{ + protected $name = 'return'; + + /** @var Type */ + private $type; + + public function __construct(Type $type, Description $description = null) + { + $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]); + + $parts = preg_split('/\s+/Su', $body, 2); + + $type = $typeResolver->resolve(isset($parts[0]) ? $parts[0] : '', $context); + $description = $descriptionFactory->create(isset($parts[1]) ? $parts[1] : '', $context); + + return new static($type, $description); + } + + /** + * Returns the type section of the variable. + * + * @return Type + */ + public function getType() + { + return $this->type; + } + + public function __toString() + { + return $this->type . ' ' . $this->description; + } +} diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/See.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/See.php new file mode 100644 index 0000000..64ee3d8 --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/See.php @@ -0,0 +1,81 @@ + + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\DocBlock\Tags; + +use phpDocumentor\Reflection\DocBlock\DescriptionFactory; +use phpDocumentor\Reflection\Fqsen; +use phpDocumentor\Reflection\FqsenResolver; +use phpDocumentor\Reflection\Types\Context as TypeContext; +use phpDocumentor\Reflection\DocBlock\Description; +use Webmozart\Assert\Assert; + +/** + * Reflection class for an {@}see tag in a Docblock. + */ +class See extends BaseTag implements Factory\StaticMethod +{ + protected $name = 'see'; + + /** @var Fqsen */ + protected $refers = null; + + /** + * Initializes this tag. + * + * @param Fqsen $refers + * @param Description $description + */ + 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]); + + $parts = preg_split('/\s+/Su', $body, 2); + $description = isset($parts[1]) ? $descriptionFactory->create($parts[1], $context) : null; + + return new static($resolver->resolve($parts[0], $context), $description); + } + + /** + * Returns the structural element this tag refers to. + * + * @return Fqsen + */ + public function getReference() + { + return $this->refers; + } + + /** + * Returns a string representation of this tag. + * + * @return string + */ + public function __toString() + { + return $this->refers . ($this->description ? ' ' . $this->description->render() : ''); + } +} diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Since.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Since.php new file mode 100644 index 0000000..3d002ed --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Since.php @@ -0,0 +1,94 @@ + + * @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 Webmozart\Assert\Assert; + +/** + * Reflection class for a {@}since tag in a Docblock. + */ +final class Since extends BaseTag implements Factory\StaticMethod +{ + protected $name = 'since'; + + /** + * PCRE regular expression matching a version vector. + * Assumes the "x" modifier. + */ + const REGEX_VECTOR = '(?: + # Normal release vectors. + \d\S* + | + # VCS version vectors. Per PHPCS, they are expected to + # follow the form of the VCS name, followed by ":", followed + # by the version vector itself. + # By convention, popular VCSes like CVS, SVN and GIT use "$" + # around the actual version vector. + [^\s\:]+\:\s*\$[^\$]+\$ + )'; + + /** @var string The version vector. */ + private $version = ''; + + public function __construct($version = null, Description $description = null) + { + Assert::nullOrStringNotEmpty($version); + + $this->version = $version; + $this->description = $description; + } + + /** + * @return static + */ + public static function create($body, DescriptionFactory $descriptionFactory = null, TypeContext $context = null) + { + Assert::nullOrString($body); + if (empty($body)) { + return new static(); + } + + $matches = []; + if (! preg_match('/^(' . self::REGEX_VECTOR . ')\s*(.+)?$/sux', $body, $matches)) { + return null; + } + + return new static( + $matches[1], + $descriptionFactory->create(isset($matches[2]) ? $matches[2] : '', $context) + ); + } + + /** + * Gets the version section of the tag. + * + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * Returns a string representation for this tag. + * + * @return string + */ + public function __toString() + { + return $this->version . ($this->description ? ' ' . $this->description->render() : ''); + } +} diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Source.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Source.php new file mode 100644 index 0000000..b0646b9 --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Source.php @@ -0,0 +1,96 @@ + + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\DocBlock\Tags; + +use phpDocumentor\Reflection\DocBlock\Description; +use phpDocumentor\Reflection\DocBlock\DescriptionFactory; +use phpDocumentor\Reflection\Types\Context as TypeContext; +use Webmozart\Assert\Assert; + +/** + * Reflection class for a {@}source tag in a Docblock. + */ +final class Source extends BaseTag implements Factory\StaticMethod +{ + /** @var string */ + protected $name = 'source'; + + /** @var int The starting line, relative to the structural element's location. */ + private $startingLine = 1; + + /** @var int|null The number of lines, relative to the starting line. NULL means "to the end". */ + private $lineCount = null; + + 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->description = $description; + } + + /** + * {@inheritdoc} + */ + public static function create($body, DescriptionFactory $descriptionFactory = null, TypeContext $context = null) + { + Assert::stringNotEmpty($body); + Assert::notNull($descriptionFactory); + + $startingLine = 1; + $lineCount = null; + $description = null; + + // Starting line / Number of lines / Description + if (preg_match('/^([1-9]\d*)\s*(?:((?1))\s+)?(.*)$/sux', $body, $matches)) { + $startingLine = (int)$matches[1]; + if (isset($matches[2]) && $matches[2] !== '') { + $lineCount = (int)$matches[2]; + } + $description = $matches[3]; + } + + return new static($startingLine, $lineCount, $descriptionFactory->create($description, $context)); + } + + /** + * Gets the starting line. + * + * @return int The starting line, relative to the structural element's + * location. + */ + public function getStartingLine() + { + return $this->startingLine; + } + + /** + * Returns the number of lines. + * + * @return int|null The number of lines, relative to the starting line. NULL + * means "to the end". + */ + public function getLineCount() + { + return $this->lineCount; + } + + public function __toString() + { + return $this->startingLine + . ($this->lineCount !== null ? ' ' . $this->lineCount : '') + . ($this->description ? ' ' . $this->description->render() : ''); + } +} diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Throws.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Throws.php new file mode 100644 index 0000000..349e773 --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Throws.php @@ -0,0 +1,72 @@ + + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\DocBlock\Tags; + +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 Webmozart\Assert\Assert; + +/** + * Reflection class for a {@}throws tag in a Docblock. + */ +final class Throws extends BaseTag implements Factory\StaticMethod +{ + protected $name = 'throws'; + + /** @var Type */ + private $type; + + public function __construct(Type $type, Description $description = null) + { + $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]); + + $parts = preg_split('/\s+/Su', $body, 2); + + $type = $typeResolver->resolve(isset($parts[0]) ? $parts[0] : '', $context); + $description = $descriptionFactory->create(isset($parts[1]) ? $parts[1] : '', $context); + + return new static($type, $description); + } + + /** + * Returns the type section of the variable. + * + * @return Type + */ + public function getType() + { + return $this->type; + } + + public function __toString() + { + return $this->type . ' ' . $this->description; + } +} diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Uses.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Uses.php new file mode 100644 index 0000000..00dc3e3 --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Uses.php @@ -0,0 +1,83 @@ + + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @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\FqsenResolver; +use phpDocumentor\Reflection\Types\Context as TypeContext; +use Webmozart\Assert\Assert; + +/** + * Reflection class for a {@}uses tag in a Docblock. + */ +final class Uses extends BaseTag implements Factory\StaticMethod +{ + protected $name = 'uses'; + + /** @var Fqsen */ + protected $refers = null; + + /** + * Initializes this tag. + * + * @param Fqsen $refers + * @param Description $description + */ + 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]); + + $parts = preg_split('/\s+/Su', $body, 2); + + return new static( + $resolver->resolve($parts[0], $context), + $descriptionFactory->create(isset($parts[1]) ? $parts[1] : '', $context) + ); + } + + /** + * Returns the structural element this tag refers to. + * + * @return Fqsen + */ + public function getReference() + { + return $this->refers; + } + + /** + * Returns a string representation of this tag. + * + * @return string + */ + public function __toString() + { + return $this->refers . ' ' . $this->description->render(); + } +} diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Var_.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Var_.php new file mode 100644 index 0000000..e23c694 --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Var_.php @@ -0,0 +1,118 @@ + + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\DocBlock\Tags; + +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 Webmozart\Assert\Assert; + +/** + * Reflection class for a {@}var tag in a Docblock. + */ +class Var_ extends BaseTag implements Factory\StaticMethod +{ + /** @var string */ + protected $name = 'var'; + + /** @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) + { + Assert::string($variableName); + + $this->variableName = $variableName; + $this->type = $type; + $this->description = $description; + } + + /** + * {@inheritdoc} + */ + public static function create( + $body, + TypeResolver $typeResolver = null, + DescriptionFactory $descriptionFactory = null, + TypeContext $context = null + ) { + Assert::stringNotEmpty($body); + Assert::allNotNull([$typeResolver, $descriptionFactory]); + + $parts = preg_split('/(\s+)/Su', $body, 3, 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 the next item starts with a $ or ...$ it must be the variable name + if (isset($parts[0]) && (strlen($parts[0]) > 0) && ($parts[0][0] == '$')) { + $variableName = array_shift($parts); + array_shift($parts); + + if (substr($variableName, 0, 1) === '$') { + $variableName = substr($variableName, 1); + } + } + + $description = $descriptionFactory->create(implode('', $parts), $context); + + return new static($variableName, $type, $description); + } + + /** + * Returns the variable's name. + * + * @return string + */ + public function getVariableName() + { + 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() + { + return ($this->type ? $this->type . ' ' : '') + . '$' . $this->variableName + . ($this->description ? ' ' . $this->description : ''); + } +} diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Version.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Version.php new file mode 100644 index 0000000..3e0e5be --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Version.php @@ -0,0 +1,94 @@ + + * @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 + */ + +namespace phpDocumentor\Reflection\DocBlock\Tags; + +use phpDocumentor\Reflection\Types\Context as TypeContext; +use phpDocumentor\Reflection\DocBlock\Description; +use phpDocumentor\Reflection\DocBlock\DescriptionFactory; +use Webmozart\Assert\Assert; + +/** + * Reflection class for a {@}version tag in a Docblock. + */ +final class Version extends BaseTag implements Factory\StaticMethod +{ + protected $name = 'version'; + + /** + * PCRE regular expression matching a version vector. + * Assumes the "x" modifier. + */ + const REGEX_VECTOR = '(?: + # Normal release vectors. + \d\S* + | + # VCS version vectors. Per PHPCS, they are expected to + # follow the form of the VCS name, followed by ":", followed + # by the version vector itself. + # By convention, popular VCSes like CVS, SVN and GIT use "$" + # around the actual version vector. + [^\s\:]+\:\s*\$[^\$]+\$ + )'; + + /** @var string The version vector. */ + private $version = ''; + + public function __construct($version = null, Description $description = null) + { + Assert::nullOrStringNotEmpty($version); + + $this->version = $version; + $this->description = $description; + } + + /** + * @return static + */ + public static function create($body, DescriptionFactory $descriptionFactory = null, TypeContext $context = null) + { + Assert::nullOrString($body); + if (empty($body)) { + return new static(); + } + + $matches = []; + if (!preg_match('/^(' . self::REGEX_VECTOR . ')\s*(.+)?$/sux', $body, $matches)) { + return null; + } + + return new static( + $matches[1], + $descriptionFactory->create(isset($matches[2]) ? $matches[2] : '', $context) + ); + } + + /** + * Gets the version section of the tag. + * + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * Returns a string representation for this tag. + * + * @return string + */ + public function __toString() + { + return $this->version . ($this->description ? ' ' . $this->description->render() : ''); + } +} diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlockFactory.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlockFactory.php new file mode 100644 index 0000000..9ec2455 --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/src/DocBlockFactory.php @@ -0,0 +1,277 @@ + + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection; + +use phpDocumentor\Reflection\DocBlock\DescriptionFactory; +use phpDocumentor\Reflection\DocBlock\StandardTagFactory; +use phpDocumentor\Reflection\DocBlock\Tag; +use phpDocumentor\Reflection\DocBlock\TagFactory; +use Webmozart\Assert\Assert; + +final class DocBlockFactory implements DocBlockFactoryInterface +{ + /** @var DocBlock\DescriptionFactory */ + private $descriptionFactory; + + /** @var DocBlock\TagFactory */ + private $tagFactory; + + /** + * 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; + } + + /** + * Factory method for easy instantiation. + * + * @param string[] $additionalTags + * + * @return DocBlockFactory + */ + public static function createInstance(array $additionalTags = []) + { + $fqsenResolver = new FqsenResolver(); + $tagFactory = new StandardTagFactory($fqsenResolver); + $descriptionFactory = new DescriptionFactory($tagFactory); + + $tagFactory->addService($descriptionFactory); + $tagFactory->addService(new TypeResolver($fqsenResolver)); + + $docBlockFactory = new self($descriptionFactory, $tagFactory); + foreach ($additionalTags as $tagName => $tagHandler) { + $docBlockFactory->registerTagHandler($tagName, $tagHandler); + } + + return $docBlockFactory; + } + + /** + * @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) + { + 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); + } + + $docblock = $docblock->getDocComment(); + } + + Assert::stringNotEmpty($docblock); + + if ($context === null) { + $context = new Types\Context(''); + } + + $parts = $this->splitDocBlock($this->stripDocComment($docblock)); + list($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; + }), + $context, + $location, + $templateMarker === '#@+', + $templateMarker === '#@-' + ); + } + + public function registerTagHandler($tagName, $handler) + { + $this->tagFactory->registerTagHandler($tagName, $handler); + } + + /** + * Strips the asterisks from the DocBlock comment. + * + * @param string $comment String containing the comment text. + * + * @return string + */ + private function stripDocComment($comment) + { + $comment = trim(preg_replace('#[ \t]*(?:\/\*\*|\*\/|\*)?[ \t]{0,1}(.*)?#u', '$1', $comment)); + + // reg ex above is not able to remove */ from a single line docblock + if (substr($comment, -2) == '*/') { + $comment = trim(substr($comment, 0, -2)); + } + + return str_replace(array("\r\n", "\r"), "\n", $comment); + } + + /** + * 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. + * @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. + */ + private function splitDocBlock($comment) + { + // 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); + } + + // clears all extra horizontal whitespace from the line endings to prevent parsing issues + $comment = preg_replace('/\h*$/Sum', '', $comment); + + /* + * Splits the docblock into a template marker, summary, description and tags section. + * + * - The template marker is empty, #@+ or #@- if the DocBlock starts with either of those (a newline may + * occur after it and will be stripped). + * - The short description is started from the first character until a dot is encountered followed by a + * newline OR two consecutive newlines (horizontal whitespace is taken into account to consider spacing + * errors). This is optional. + * - The long description, any character until a new line is encountered followed by an @ and word + * characters (a tag). This is optional. + * - Tags; the remaining characters + * + * Big thanks to RichardJ for contributing this Regular Expression + */ + preg_match( + '/ + \A + # 1. Extract the template marker + (?:(\#\@\+|\#\@\-)\n?)? + + # 2. Extract the summary + (?: + (?! @\pL ) # The summary may not start with an @ + ( + [^\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.]+ # Include anything else + )* + \.? + )? + ) + + # 3. Extract the description + (?: + \s* # Some form of whitespace _must_ precede a description because a summary must be there + (?! @\pL ) # The description may not start with an @ + ( + [^\n]+ + (?: \n+ + (?! [ \t]* @\pL ) # End description when an @ is found as first character on a new line + [^\n]+ # Include anything else + )* + ) + )? + + # 4. Extract the tags (anything that follows) + (\s+ [\s\S]*)? # everything that follows + /ux', + $comment, + $matches + ); + array_shift($matches); + + while (count($matches) < 4) { + $matches[] = ''; + } + + return $matches; + } + + /** + * Creates the tag objects. + * + * @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) + { + $tags = $this->filterTagBlock($tags); + if (!$tags) { + return []; + } + + $result = $this->splitTagBlockIntoTagLines($tags); + foreach ($result as $key => $tagLine) { + $result[$key] = $this->tagFactory->create(trim($tagLine), $context); + } + + return $result; + } + + /** + * @param string $tags + * + * @return string[] + */ + private function splitTagBlockIntoTagLines($tags) + { + $result = array(); + foreach (explode("\n", $tags) as $tag_line) { + if (isset($tag_line[0]) && ($tag_line[0] === '@')) { + $result[] = $tag_line; + } else { + $result[count($result) - 1] .= "\n" . $tag_line; + } + } + + return $result; + } + + /** + * @param $tags + * @return string + */ + private function filterTagBlock($tags) + { + $tags = trim($tags); + if (!$tags) { + return null; + } + + 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); + // @codeCoverageIgnoreEnd + } + + return $tags; + } +} diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlockFactoryInterface.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlockFactoryInterface.php new file mode 100644 index 0000000..b353342 --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/src/DocBlockFactoryInterface.php @@ -0,0 +1,23 @@ + + * @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/vendor/phpdocumentor/reflection-docblock/tests/integration/ReconstitutingADocBlockTest.php b/vendor/phpdocumentor/reflection-docblock/tests/integration/ReconstitutingADocBlockTest.php new file mode 100644 index 0000000..92ac22e --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/tests/integration/ReconstitutingADocBlockTest.php @@ -0,0 +1,35 @@ + + * @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/vendor/phpdocumentor/reflection-docblock/tests/integration/UsingTagsTest.php b/vendor/phpdocumentor/reflection-docblock/tests/integration/UsingTagsTest.php new file mode 100644 index 0000000..984811b --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/tests/integration/UsingTagsTest.php @@ -0,0 +1,39 @@ + + * @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/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/DescriptionFactoryTest.php b/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/DescriptionFactoryTest.php new file mode 100644 index 0000000..d3043f9 --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/DescriptionFactoryTest.php @@ -0,0 +1,174 @@ + + * @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/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/DescriptionTest.php b/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/DescriptionTest.php new file mode 100644 index 0000000..b5917a9 --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/DescriptionTest.php @@ -0,0 +1,75 @@ + + * @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/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/SerializerTest.php b/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/SerializerTest.php new file mode 100644 index 0000000..cb2b400 --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/SerializerTest.php @@ -0,0 +1,201 @@ + + * @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/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/StandardTagFactoryTest.php b/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/StandardTagFactoryTest.php new file mode 100644 index 0000000..0247da0 --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/StandardTagFactoryTest.php @@ -0,0 +1,361 @@ + + * @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/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/AuthorTest.php b/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/AuthorTest.php new file mode 100644 index 0000000..a54954f --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/AuthorTest.php @@ -0,0 +1,148 @@ + + * @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/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/CoversTest.php b/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/CoversTest.php new file mode 100644 index 0000000..a2b5e4b --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/CoversTest.php @@ -0,0 +1,155 @@ + + * @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/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/DeprecatedTest.php b/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/DeprecatedTest.php new file mode 100644 index 0000000..8be9ad7 --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/DeprecatedTest.php @@ -0,0 +1,166 @@ + + * @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/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/Formatter/PassthroughFormatterTest.php b/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/Formatter/PassthroughFormatterTest.php new file mode 100644 index 0000000..045a197 --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/Formatter/PassthroughFormatterTest.php @@ -0,0 +1,41 @@ + + * @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/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/GenericTest.php b/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/GenericTest.php new file mode 100644 index 0000000..02fa530 --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/GenericTest.php @@ -0,0 +1,146 @@ + + * @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/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/LinkTest.php b/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/LinkTest.php new file mode 100644 index 0000000..9940aec --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/LinkTest.php @@ -0,0 +1,158 @@ + + * @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/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/MethodTest.php b/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/MethodTest.php new file mode 100644 index 0000000..5d6e981 --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/MethodTest.php @@ -0,0 +1,437 @@ + + * @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/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/ParamTest.php b/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/ParamTest.php new file mode 100644 index 0000000..0c718ab --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/ParamTest.php @@ -0,0 +1,228 @@ + + * @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/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/PropertyReadTest.php b/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/PropertyReadTest.php new file mode 100644 index 0000000..c3fb770 --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/PropertyReadTest.php @@ -0,0 +1,201 @@ + + * @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/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/PropertyTest.php b/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/PropertyTest.php new file mode 100644 index 0000000..908dfb2 --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/PropertyTest.php @@ -0,0 +1,200 @@ + + * @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/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/PropertyWriteTest.php b/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/PropertyWriteTest.php new file mode 100644 index 0000000..5ea6524 --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/PropertyWriteTest.php @@ -0,0 +1,201 @@ + + * @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/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/ReturnTest.php b/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/ReturnTest.php new file mode 100644 index 0000000..2bc5439 --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/ReturnTest.php @@ -0,0 +1,170 @@ + + * @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/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/SeeTest.php b/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/SeeTest.php new file mode 100644 index 0000000..8d3e3e8 --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/SeeTest.php @@ -0,0 +1,173 @@ + + * @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/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/SinceTest.php b/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/SinceTest.php new file mode 100644 index 0000000..3f42db5 --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/SinceTest.php @@ -0,0 +1,166 @@ + + * @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/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/SourceTest.php b/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/SourceTest.php new file mode 100644 index 0000000..cbf01f6 --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/SourceTest.php @@ -0,0 +1,199 @@ + + * @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/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/ThrowsTest.php b/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/ThrowsTest.php new file mode 100644 index 0000000..657d6ca --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/ThrowsTest.php @@ -0,0 +1,170 @@ + + * @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/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/UsesTest.php b/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/UsesTest.php new file mode 100644 index 0000000..419f7e3 --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/UsesTest.php @@ -0,0 +1,174 @@ + + * @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/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/VarTest.php b/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/VarTest.php new file mode 100644 index 0000000..34f290a --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/VarTest.php @@ -0,0 +1,200 @@ + + * @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/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/VersionTest.php b/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/VersionTest.php new file mode 100644 index 0000000..5c487fd --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlock/Tags/VersionTest.php @@ -0,0 +1,166 @@ + + * @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/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlockFactoryTest.php b/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlockFactoryTest.php new file mode 100644 index 0000000..f1261b6 --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlockFactoryTest.php @@ -0,0 +1,290 @@ + + * @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/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlockTest.php b/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlockTest.php new file mode 100644 index 0000000..4a8d4de --- /dev/null +++ b/vendor/phpdocumentor/reflection-docblock/tests/unit/DocBlockTest.php @@ -0,0 +1,252 @@ + + * @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/vendor/phpdocumentor/type-resolver/.gitignore b/vendor/phpdocumentor/type-resolver/.gitignore new file mode 100644 index 0000000..82cfc4e --- /dev/null +++ b/vendor/phpdocumentor/type-resolver/.gitignore @@ -0,0 +1,3 @@ +.idea +composer.lock +vendor diff --git a/vendor/phpdocumentor/type-resolver/.scrutinizer.yml b/vendor/phpdocumentor/type-resolver/.scrutinizer.yml new file mode 100644 index 0000000..7d7372a --- /dev/null +++ b/vendor/phpdocumentor/type-resolver/.scrutinizer.yml @@ -0,0 +1,31 @@ +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/vendor/phpdocumentor/type-resolver/.travis.yml b/vendor/phpdocumentor/type-resolver/.travis.yml new file mode 100644 index 0000000..c882b14 --- /dev/null +++ b/vendor/phpdocumentor/type-resolver/.travis.yml @@ -0,0 +1,34 @@ +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/vendor/phpdocumentor/type-resolver/LICENSE b/vendor/phpdocumentor/type-resolver/LICENSE new file mode 100644 index 0000000..792e404 --- /dev/null +++ b/vendor/phpdocumentor/type-resolver/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2010 Mike van Riel + +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/vendor/phpdocumentor/type-resolver/README.md b/vendor/phpdocumentor/type-resolver/README.md new file mode 100644 index 0000000..ca8147b --- /dev/null +++ b/vendor/phpdocumentor/type-resolver/README.md @@ -0,0 +1,169 @@ +TypeResolver and FqsenResolver +============================== + +The specification on types in DocBlocks (PSR-5) describes various keywords and special constructs +but also how to statically resolve the partial name of a Class into a Fully Qualified Class Name (FQCN). + +PSR-5 also introduces an additional way to describe deeper elements than Classes, Interfaces and Traits +called the Fully Qualified Structural Element Name (FQSEN). Using this it is possible to refer to methods, +properties and class constants but also functions and global constants. + +This package provides two Resolvers that are capable of + +1. Returning a series of Value Object for given expression while resolving any partial class names, and +2. Returning an FQSEN object after resolving any partial Structural Element Names into Fully Qualified Structural + Element names. + +## Installing + +The easiest way to install this library is with [Composer](https://getcomposer.org) using the following command: + + $ composer require phpdocumentor/type-resolver + +## 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. + +## On Types and Element Names + +This component can be used in one of two ways + +1. To resolve a Type or +2. To resolve a Fully Qualified Structural Element Name + +The big difference between these two is in the number of things it can resolve. + +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 object or interface such as the TypeResolver class (`@var TypeResolver` + or `@var \phpDocumentor\Reflection\TypeResolver`) + + > please note that if you want to pass partial class names that additional steps are necessary, see the + > chapter `Resolving partial classes and FQSENs` for more information. + +Where the FqsenResolver can resolve: + +- Constant expressions (i.e. `@see \MyNamespace\MY_CONSTANT`) +- Function expressions (i.e. `@see \MyNamespace\myFunction()`) +- Class expressions (i.e. `@see \MyNamespace\MyClass`) +- Interface expressions (i.e. `@see \MyNamespace\MyInterface`) +- Trait expressions (i.e. `@see \MyNamespace\MyTrait`) +- Class constant expressions (i.e. `@see \MyNamespace\MyClass::MY_CONSTANT`) +- Property expressions (i.e. `@see \MyNamespace\MyClass::$myProperty`) +- Method expressions (i.e. `@see \MyNamespace\MyClass::myMethod()`) + +## 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: + + $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. + +## 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: + + $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`. + +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. + +For example, you have this file: + +```php + '\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. + + $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')); + +### 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. + +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); + +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. + +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); + +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/vendor/phpdocumentor/type-resolver/composer.json b/vendor/phpdocumentor/type-resolver/composer.json new file mode 100644 index 0000000..abaa965 --- /dev/null +++ b/vendor/phpdocumentor/type-resolver/composer.json @@ -0,0 +1,27 @@ +{ + "name": "phpdocumentor/type-resolver", + "type": "library", + "license": "MIT", + "authors": [ + {"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"]} + }, + "require-dev": { + "phpunit/phpunit": "^5.2||^4.8.24", + "mockery/mockery": "^0.9.4" + }, + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + } +} diff --git a/vendor/phpdocumentor/type-resolver/examples/01-resolving-simple-types.php b/vendor/phpdocumentor/type-resolver/examples/01-resolving-simple-types.php new file mode 100644 index 0000000..682b1d3 --- /dev/null +++ b/vendor/phpdocumentor/type-resolver/examples/01-resolving-simple-types.php @@ -0,0 +1,13 @@ +resolve('string|integer')); + +// Will return the string "string|int" +var_dump((string)$typeResolver->resolve('string|integer')); diff --git a/vendor/phpdocumentor/type-resolver/examples/02-resolving-classes.php b/vendor/phpdocumentor/type-resolver/examples/02-resolving-classes.php new file mode 100644 index 0000000..70aa5e4 --- /dev/null +++ b/vendor/phpdocumentor/type-resolver/examples/02-resolving-classes.php @@ -0,0 +1,12 @@ + 'Mockery' ]); +var_dump((string)$typeResolver->resolve('Types\Resolver|m\MockInterface', $context)); diff --git a/vendor/phpdocumentor/type-resolver/examples/03-resolving-all-elements.php b/vendor/phpdocumentor/type-resolver/examples/03-resolving-all-elements.php new file mode 100644 index 0000000..4f4282e --- /dev/null +++ b/vendor/phpdocumentor/type-resolver/examples/03-resolving-all-elements.php @@ -0,0 +1,17 @@ +resolve('Types\Resolver::resolveFqsen()', $context)); + +// Property named: \phpDocumentor\Types\Types\Resolver::$keyWords +var_dump((string)$fqsenResolver->resolve('Types\Resolver::$keyWords', $context)); diff --git a/vendor/phpdocumentor/type-resolver/examples/04-discovering-the-context-using-class-reflection.php b/vendor/phpdocumentor/type-resolver/examples/04-discovering-the-context-using-class-reflection.php new file mode 100644 index 0000000..957c97d --- /dev/null +++ b/vendor/phpdocumentor/type-resolver/examples/04-discovering-the-context-using-class-reflection.php @@ -0,0 +1,30 @@ +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/vendor/phpdocumentor/type-resolver/examples/05-discovering-the-context-using-method-reflection.php b/vendor/phpdocumentor/type-resolver/examples/05-discovering-the-context-using-method-reflection.php new file mode 100644 index 0000000..10c0c88 --- /dev/null +++ b/vendor/phpdocumentor/type-resolver/examples/05-discovering-the-context-using-method-reflection.php @@ -0,0 +1,30 @@ +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/vendor/phpdocumentor/type-resolver/examples/06-discovering-the-context-using-file-contents.php b/vendor/phpdocumentor/type-resolver/examples/06-discovering-the-context-using-file-contents.php new file mode 100644 index 0000000..a93728c --- /dev/null +++ b/vendor/phpdocumentor/type-resolver/examples/06-discovering-the-context-using-file-contents.php @@ -0,0 +1,22 @@ +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/vendor/phpdocumentor/type-resolver/examples/Classy.php b/vendor/phpdocumentor/type-resolver/examples/Classy.php new file mode 100644 index 0000000..0705266 --- /dev/null +++ b/vendor/phpdocumentor/type-resolver/examples/Classy.php @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + 40 + + + diff --git a/vendor/phpdocumentor/type-resolver/phpunit.xml.dist b/vendor/phpdocumentor/type-resolver/phpunit.xml.dist new file mode 100644 index 0000000..3246bef --- /dev/null +++ b/vendor/phpdocumentor/type-resolver/phpunit.xml.dist @@ -0,0 +1,31 @@ + + + + + + ./tests/unit + + + + + ./src/ + + + ./examples/ + ./vendor/ + + + + + + diff --git a/vendor/phpdocumentor/type-resolver/src/FqsenResolver.php b/vendor/phpdocumentor/type-resolver/src/FqsenResolver.php new file mode 100644 index 0000000..a0e0041 --- /dev/null +++ b/vendor/phpdocumentor/type-resolver/src/FqsenResolver.php @@ -0,0 +1,76 @@ + + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection; + +use phpDocumentor\Reflection\Types\Context; + +class FqsenResolver +{ + /** @var string Definition of the NAMESPACE operator in PHP */ + const OPERATOR_NAMESPACE = '\\'; + + public function resolve($fqsen, Context $context = null) + { + if ($context === null) { + $context = new Context(''); + } + + if ($this->isFqsen($fqsen)) { + return new Fqsen($fqsen); + } + + return $this->resolvePartialStructuralElementName($fqsen, $context); + } + + /** + * Tests whether the given type is a Fully Qualified Structural Element Name. + * + * @param string $type + * + * @return bool + */ + private function isFqsen($type) + { + return strpos($type, self::OPERATOR_NAMESPACE) === 0; + } + + /** + * 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 + */ + private function resolvePartialStructuralElementName($type, Context $context) + { + $typeParts = explode(self::OPERATOR_NAMESPACE, $type, 2); + + $namespaceAliases = $context->getNamespaceAliases(); + + // if the first segment is not an alias; prepend namespace name and return + if (!isset($namespaceAliases[$typeParts[0]])) { + $namespace = $context->getNamespace(); + if ('' !== $namespace) { + $namespace .= self::OPERATOR_NAMESPACE; + } + + return new Fqsen(self::OPERATOR_NAMESPACE . $namespace . $type); + } + + $typeParts[0] = $namespaceAliases[$typeParts[0]]; + + return new Fqsen(self::OPERATOR_NAMESPACE . implode(self::OPERATOR_NAMESPACE, $typeParts)); + } +} diff --git a/vendor/phpdocumentor/type-resolver/src/Type.php b/vendor/phpdocumentor/type-resolver/src/Type.php new file mode 100644 index 0000000..33ca559 --- /dev/null +++ b/vendor/phpdocumentor/type-resolver/src/Type.php @@ -0,0 +1,18 @@ + + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection; + +interface Type +{ + public function __toString(); +} diff --git a/vendor/phpdocumentor/type-resolver/src/TypeResolver.php b/vendor/phpdocumentor/type-resolver/src/TypeResolver.php new file mode 100644 index 0000000..3a68a4d --- /dev/null +++ b/vendor/phpdocumentor/type-resolver/src/TypeResolver.php @@ -0,0 +1,266 @@ + + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection; + +use phpDocumentor\Reflection\Types\Array_; +use phpDocumentor\Reflection\Types\Compound; +use phpDocumentor\Reflection\Types\Context; +use phpDocumentor\Reflection\Types\Object_; + +final class TypeResolver +{ + /** @var string Definition of the ARRAY operator for types */ + const OPERATOR_ARRAY = '[]'; + + /** @var string Definition of the NAMESPACE operator in PHP */ + 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 FqsenResolver */ + private $fqsenResolver; + + /** + * Initializes this TypeResolver with the means to create and resolve Fqsen objects. + * + * @param FqsenResolver $fqsenResolver + */ + public function __construct(FqsenResolver $fqsenResolver = null) + { + $this->fqsenResolver = $fqsenResolver ?: new FqsenResolver(); + } + + /** + * Analyzes the given type and returns the FQCN variant. + * + * When a type is provided this method checks whether it is not a keyword or + * Fully Qualified Class Name. If so it will use the given namespace and + * aliases to expand the type to a FQCN representation. + * + * 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. + * + * @return Type|null + */ + public function resolve($type, Context $context = null) + { + 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'); + } + + if ($context === null) { + $context = new Context(''); + } + + 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( + '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 + */ + public function addKeyword($keyword, $typeClassName) + { + if (!class_exists($typeClassName)) { + 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( + 'The class "' . $typeClassName . '" must implement the interface "phpDocumentor\Reflection\Type"' + ); + } + + $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 + */ + private function isKeyword($type) + { + return in_array(strtolower($type), array_keys($this->keywords), true); + } + + /** + * Detects whether the given type represents a relative structural element name. + * + * @param string $type A relative or absolute type as defined in the phpDocumentor documentation. + * + * @return bool + */ + private function isPartialStructuralElementName($type) + { + return ($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 + */ + private function isFqsen($type) + { + 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 + */ + private function resolveKeyword($type) + { + $className = $this->keywords[strtolower($type)]; + + return new $className(); + } + + /** + * Resolves the given FQSEN string into an FQSEN object. + * + * @param string $type + * + * @return Object_ + */ + private function resolveTypedObject($type, Context $context = null) + { + return new Object_($this->fqsenResolver->resolve($type, $context)); + } + + /** + * Resolves a compound type (i.e. `string|int`) into the appropriate Type objects or FQSEN. + * + * @param string $type + * @param Context $context + * + * @return Compound + */ + private function resolveCompoundType($type, Context $context) + { + $types = []; + + foreach (explode('|', $type) as $part) { + $types[] = $this->resolve($part, $context); + } + + return new Compound($types); + } +} diff --git a/vendor/phpdocumentor/type-resolver/src/Types/Array_.php b/vendor/phpdocumentor/type-resolver/src/Types/Array_.php new file mode 100644 index 0000000..45276c6 --- /dev/null +++ b/vendor/phpdocumentor/type-resolver/src/Types/Array_.php @@ -0,0 +1,87 @@ + + * @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'. + * 2. Types (`string[]`), where the value type is provided by preceding an opening and closing square bracket with a + * type name. + */ +final class Array_ implements Type +{ + /** @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/vendor/phpdocumentor/type-resolver/src/Types/Boolean.php b/vendor/phpdocumentor/type-resolver/src/Types/Boolean.php new file mode 100644 index 0000000..f82b19e --- /dev/null +++ b/vendor/phpdocumentor/type-resolver/src/Types/Boolean.php @@ -0,0 +1,31 @@ + + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\Types; + +use phpDocumentor\Reflection\Type; + +/** + * Value Object representing a Boolean type. + */ +final class Boolean implements Type +{ + /** + * Returns a rendered output of the Type as it would be used in a DocBlock. + * + * @return string + */ + public function __toString() + { + return 'bool'; + } +} diff --git a/vendor/phpdocumentor/type-resolver/src/Types/Callable_.php b/vendor/phpdocumentor/type-resolver/src/Types/Callable_.php new file mode 100644 index 0000000..68ebfbd --- /dev/null +++ b/vendor/phpdocumentor/type-resolver/src/Types/Callable_.php @@ -0,0 +1,31 @@ + + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\Types; + +use phpDocumentor\Reflection\Type; + +/** + * Value Object representing a Callable type. + */ +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() + { + return 'callable'; + } +} diff --git a/vendor/phpdocumentor/type-resolver/src/Types/Compound.php b/vendor/phpdocumentor/type-resolver/src/Types/Compound.php new file mode 100644 index 0000000..3e5ebb5 --- /dev/null +++ b/vendor/phpdocumentor/type-resolver/src/Types/Compound.php @@ -0,0 +1,82 @@ + + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\Types; + +use phpDocumentor\Reflection\Type; + +/** + * Value Object representing a Compound 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. + */ +final class Compound implements Type +{ + /** @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 + */ + 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); + } +} diff --git a/vendor/phpdocumentor/type-resolver/src/Types/Context.php b/vendor/phpdocumentor/type-resolver/src/Types/Context.php new file mode 100644 index 0000000..cc95342 --- /dev/null +++ b/vendor/phpdocumentor/type-resolver/src/Types/Context.php @@ -0,0 +1,84 @@ + + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\Types; + +/** + * Provides information about the Context in which the DocBlock occurs that receives this context. + * + * A DocBlock does not know of its own accord in which namespace it occurs and which namespace aliases are applicable + * for the block of code in which it is in. This information is however necessary to resolve Class names in tags since + * you can provide a short form or make use of namespace aliases. + * + * The phpDocumentor Reflection component knows how to create this class but if you use the DocBlock parser from your + * own application it is possible to generate a Context class using the ContextFactory; this will analyze the file in + * which an associated class resides for its namespace and imports. + * + * @see ContextFactory::createFromClassReflector() + * @see ContextFactory::createForNamespace() + */ +final class Context +{ + /** @var string The current namespace. */ + private $namespace = ''; + + /** @var array List of namespace aliases => Fully Qualified Namespace. */ + private $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. + */ + public function __construct($namespace, array $namespaceAliases = []) + { + $this->namespace = ('global' !== $namespace && 'default' !== $namespace) + ? trim((string)$namespace, '\\') + : ''; + + foreach ($namespaceAliases as $alias => $fqnn) { + if ($fqnn[0] === '\\') { + $fqnn = substr($fqnn, 1); + } + if ($fqnn[strlen($fqnn) - 1] === '\\') { + $fqnn = substr($fqnn, 0, -1); + } + + $namespaceAliases[$alias] = $fqnn; + } + + $this->namespaceAliases = $namespaceAliases; + } + + /** + * Returns the Qualified Namespace Name (thus without `\` in front) where the associated element is in. + * + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Returns a list of Qualified Namespace Names (thus without `\` in front) that are imported, the keys represent + * the alias for the imported Namespace. + * + * @return string[] + */ + public function getNamespaceAliases() + { + return $this->namespaceAliases; + } +} diff --git a/vendor/phpdocumentor/type-resolver/src/Types/ContextFactory.php b/vendor/phpdocumentor/type-resolver/src/Types/ContextFactory.php new file mode 100644 index 0000000..147df69 --- /dev/null +++ b/vendor/phpdocumentor/type-resolver/src/Types/ContextFactory.php @@ -0,0 +1,210 @@ + + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\Types; + +/** + * Convenience class to create a Context for DocBlocks when not using the Reflection Component of phpDocumentor. + * + * For a DocBlock to be able to resolve types that use partial namespace names or rely on namespace imports we need to + * provide a bit of context so that the DocBlock can read that and based on it decide how to resolve the types to + * Fully Qualified names. + * + * @see Context for more information. + */ +final class ContextFactory +{ + /** The literal used at the end of a use statement. */ + const T_LITERAL_END_OF_USE = ';'; + + /** The literal used between sets of use statements */ + 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) + { + if (method_exists($reflector, 'getDeclaringClass')) { + $reflector = $reflector->getDeclaringClass(); + } + + $fileName = $reflector->getFileName(); + $namespace = $reflector->getNamespaceName(); + + if (file_exists($fileName)) { + return $this->createForNamespace($namespace, file_get_contents($fileName)); + } + + return new Context($namespace, []); + } + + /** + * 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 + */ + public function createForNamespace($namespace, $fileContents) + { + $namespace = trim($namespace, '\\'); + $useStatements = []; + $currentNamespace = ''; + $tokens = new \ArrayIterator(token_get_all($fileContents)); + + while ($tokens->valid()) { + switch ($tokens->current()[0]) { + case T_NAMESPACE: + $currentNamespace = $this->parseNamespace($tokens); + break; + case T_CLASS: + // 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; + $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) { + if (!$firstBraceFound) { + $firstBraceFound = true; + } + $braceLevel++; + } + + if ($tokens->current() === '}') { + $braceLevel--; + } + $tokens->next(); + } + break; + case T_USE: + if ($currentNamespace === $namespace) { + $useStatements = array_merge($useStatements, $this->parseUseStatement($tokens)); + } + break; + } + $tokens->next(); + } + + return new Context($namespace, $useStatements); + } + + /** + * Deduce the name from tokens when we are at the T_NAMESPACE token. + * + * @param \ArrayIterator $tokens + * + * @return string + */ + private function parseNamespace(\ArrayIterator $tokens) + { + // 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) + ) { + $name .= $tokens->current()[1]; + $tokens->next(); + } + + return $name; + } + + /** + * Deduce the names of all imports when we are at the T_USE token. + * + * @param \ArrayIterator $tokens + * + * @return string[] + */ + private function parseUseStatement(\ArrayIterator $tokens) + { + $uses = []; + $continue = true; + + while ($continue) { + $this->skipToNextStringOrNamespaceSeparator($tokens); + + list($alias, $fqnn) = $this->extractUseStatement($tokens); + $uses[$alias] = $fqnn; + if ($tokens->current()[0] === self::T_LITERAL_END_OF_USE) { + $continue = false; + } + } + + return $uses; + } + + /** + * Fast-forwards the iterator as longs as we don't encounter a T_STRING or T_NS_SEPARATOR token. + * + * @param \ArrayIterator $tokens + * + * @return void + */ + private function skipToNextStringOrNamespaceSeparator(\ArrayIterator $tokens) + { + while ($tokens->valid() && ($tokens->current()[0] !== T_STRING) && ($tokens->current()[0] !== T_NS_SEPARATOR)) { + $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. + * + * @param \ArrayIterator $tokens + * + * @return string + */ + private function extractUseStatement(\ArrayIterator $tokens) + { + $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[] = ''; + } + if ($tokens->current()[0] === T_STRING || $tokens->current()[0] === T_NS_SEPARATOR) { + $result[count($result) - 1] .= $tokens->current()[1]; + } + $tokens->next(); + } + + if (count($result) == 1) { + $backslashPos = strrpos($result[0], '\\'); + + if (false !== $backslashPos) { + $result[] = substr($result[0], $backslashPos + 1); + } else { + $result[] = $result[0]; + } + } + + return array_reverse($result); + } +} diff --git a/vendor/phpdocumentor/type-resolver/src/Types/Float_.php b/vendor/phpdocumentor/type-resolver/src/Types/Float_.php new file mode 100644 index 0000000..e58d896 --- /dev/null +++ b/vendor/phpdocumentor/type-resolver/src/Types/Float_.php @@ -0,0 +1,31 @@ + + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\Types; + +use phpDocumentor\Reflection\Type; + +/** + * Value Object representing a Float. + */ +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() + { + return 'float'; + } +} diff --git a/vendor/phpdocumentor/type-resolver/src/Types/Integer.php b/vendor/phpdocumentor/type-resolver/src/Types/Integer.php new file mode 100644 index 0000000..be4555e --- /dev/null +++ b/vendor/phpdocumentor/type-resolver/src/Types/Integer.php @@ -0,0 +1,28 @@ + + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\Types; + +use phpDocumentor\Reflection\Type; + +final class Integer implements Type +{ + /** + * Returns a rendered output of the Type as it would be used in a DocBlock. + * + * @return string + */ + public function __toString() + { + return 'int'; + } +} diff --git a/vendor/phpdocumentor/type-resolver/src/Types/Mixed.php b/vendor/phpdocumentor/type-resolver/src/Types/Mixed.php new file mode 100644 index 0000000..79695f4 --- /dev/null +++ b/vendor/phpdocumentor/type-resolver/src/Types/Mixed.php @@ -0,0 +1,31 @@ + + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\Types; + +use phpDocumentor\Reflection\Type; + +/** + * Value Object representing an unknown, or mixed, 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() + { + return 'mixed'; + } +} diff --git a/vendor/phpdocumentor/type-resolver/src/Types/Null_.php b/vendor/phpdocumentor/type-resolver/src/Types/Null_.php new file mode 100644 index 0000000..203b422 --- /dev/null +++ b/vendor/phpdocumentor/type-resolver/src/Types/Null_.php @@ -0,0 +1,31 @@ + + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\Types; + +use phpDocumentor\Reflection\Type; + +/** + * Value Object representing a null value or type. + */ +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() + { + return 'null'; + } +} diff --git a/vendor/phpdocumentor/type-resolver/src/Types/Object_.php b/vendor/phpdocumentor/type-resolver/src/Types/Object_.php new file mode 100644 index 0000000..b337c71 --- /dev/null +++ b/vendor/phpdocumentor/type-resolver/src/Types/Object_.php @@ -0,0 +1,70 @@ + + * @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; + +/** + * 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. + */ +final class Object_ implements Type +{ + /** @var Fqsen|null */ + private $fqsen; + + /** + * Initializes this object with an optional FQSEN, if not provided this object is considered 'untyped'. + * + * @param Fqsen $fqsen + */ + public function __construct(Fqsen $fqsen = null) + { + 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 + ); + } + + $this->fqsen = $fqsen; + } + + /** + * Returns the FQSEN associated with this object. + * + * @return Fqsen|null + */ + public function getFqsen() + { + return $this->fqsen; + } + + /** + * Returns a rendered output of the Type as it would be used in a DocBlock. + * + * @return string + */ + public function __toString() + { + if ($this->fqsen) { + return (string)$this->fqsen; + } + + return 'object'; + } +} diff --git a/vendor/phpdocumentor/type-resolver/src/Types/Resource.php b/vendor/phpdocumentor/type-resolver/src/Types/Resource.php new file mode 100644 index 0000000..2c2526b --- /dev/null +++ b/vendor/phpdocumentor/type-resolver/src/Types/Resource.php @@ -0,0 +1,31 @@ + + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\Types; + +use phpDocumentor\Reflection\Type; + +/** + * Value Object representing the 'resource' 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() + { + return 'resource'; + } +} diff --git a/vendor/phpdocumentor/type-resolver/src/Types/Scalar.php b/vendor/phpdocumentor/type-resolver/src/Types/Scalar.php new file mode 100644 index 0000000..1e2a660 --- /dev/null +++ b/vendor/phpdocumentor/type-resolver/src/Types/Scalar.php @@ -0,0 +1,31 @@ + + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\Types; + +use phpDocumentor\Reflection\Type; + +/** + * Value Object representing the 'scalar' pseudo-type, which is either a string, integer, float or boolean. + */ +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() + { + return 'scalar'; + } +} diff --git a/vendor/phpdocumentor/type-resolver/src/Types/Self_.php b/vendor/phpdocumentor/type-resolver/src/Types/Self_.php new file mode 100644 index 0000000..1ba3fc5 --- /dev/null +++ b/vendor/phpdocumentor/type-resolver/src/Types/Self_.php @@ -0,0 +1,33 @@ + + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\Types; + +use phpDocumentor\Reflection\Type; + +/** + * Value Object representing the 'self' type. + * + * Self, as a Type, represents the class in which the associated element was defined. + */ +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() + { + return 'self'; + } +} diff --git a/vendor/phpdocumentor/type-resolver/src/Types/Static_.php b/vendor/phpdocumentor/type-resolver/src/Types/Static_.php new file mode 100644 index 0000000..9eb6729 --- /dev/null +++ b/vendor/phpdocumentor/type-resolver/src/Types/Static_.php @@ -0,0 +1,38 @@ + + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\Types; + +use phpDocumentor\Reflection\Type; + +/** + * Value Object representing the 'static' type. + * + * Self, as a Type, represents the class in which the associated element was called. This differs from self as self does + * not take inheritance into account but static means that the return type is always that of the class of the called + * element. + * + * See the documentation on late static binding in the PHP Documentation for more information on the difference between + * static and self. + */ +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() + { + return 'static'; + } +} diff --git a/vendor/phpdocumentor/type-resolver/src/Types/String_.php b/vendor/phpdocumentor/type-resolver/src/Types/String_.php new file mode 100644 index 0000000..8db5968 --- /dev/null +++ b/vendor/phpdocumentor/type-resolver/src/Types/String_.php @@ -0,0 +1,31 @@ + + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\Types; + +use phpDocumentor\Reflection\Type; + +/** + * Value Object representing the type 'string'. + */ +final class String_ implements Type +{ + /** + * Returns a rendered output of the Type as it would be used in a DocBlock. + * + * @return string + */ + public function __toString() + { + return 'string'; + } +} diff --git a/vendor/phpdocumentor/type-resolver/src/Types/This.php b/vendor/phpdocumentor/type-resolver/src/Types/This.php new file mode 100644 index 0000000..c098a93 --- /dev/null +++ b/vendor/phpdocumentor/type-resolver/src/Types/This.php @@ -0,0 +1,34 @@ + + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\Types; + +use phpDocumentor\Reflection\Type; + +/** + * Value Object representing the '$this' pseudo-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. + */ +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() + { + return '$this'; + } +} diff --git a/vendor/phpdocumentor/type-resolver/src/Types/Void_.php b/vendor/phpdocumentor/type-resolver/src/Types/Void_.php new file mode 100644 index 0000000..3d1be27 --- /dev/null +++ b/vendor/phpdocumentor/type-resolver/src/Types/Void_.php @@ -0,0 +1,34 @@ + + * @license http://www.opensource.org/licenses/mit-license.php MIT + * @link http://phpdoc.org + */ + +namespace phpDocumentor\Reflection\Types; + +use phpDocumentor\Reflection\Type; + +/** + * Value Object representing the pseudo-type 'void'. + * + * Void is generally only used when working with return types as it signifies that the method intentionally does not + * return any value. + */ +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() + { + return 'void'; + } +} diff --git a/vendor/phpdocumentor/type-resolver/tests/unit/TypeResolverTest.php b/vendor/phpdocumentor/type-resolver/tests/unit/TypeResolverTest.php new file mode 100644 index 0000000..f226f8e --- /dev/null +++ b/vendor/phpdocumentor/type-resolver/tests/unit/TypeResolverTest.php @@ -0,0 +1,395 @@ + + * @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/vendor/phpdocumentor/type-resolver/tests/unit/Types/ContextFactoryTest.php b/vendor/phpdocumentor/type-resolver/tests/unit/Types/ContextFactoryTest.php new file mode 100644 index 0000000..20d63c9 --- /dev/null +++ b/vendor/phpdocumentor/type-resolver/tests/unit/Types/ContextFactoryTest.php @@ -0,0 +1,188 @@ + + * @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/vendor/phpdocumentor/type-resolver/tests/unit/Types/ContextTest.php b/vendor/phpdocumentor/type-resolver/tests/unit/Types/ContextTest.php new file mode 100644 index 0000000..165f415 --- /dev/null +++ b/vendor/phpdocumentor/type-resolver/tests/unit/Types/ContextTest.php @@ -0,0 +1,61 @@ + + * @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/vendor/phpspec/prophecy/.gitignore b/vendor/phpspec/prophecy/.gitignore new file mode 100644 index 0000000..88ee1c1 --- /dev/null +++ b/vendor/phpspec/prophecy/.gitignore @@ -0,0 +1,5 @@ +*.tgz +*.phar +/composer.lock +/vendor +/phpunit.xml diff --git a/vendor/phpspec/prophecy/.travis.yml b/vendor/phpspec/prophecy/.travis.yml new file mode 100644 index 0000000..a277922 --- /dev/null +++ b/vendor/phpspec/prophecy/.travis.yml @@ -0,0 +1,39 @@ +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/vendor/phpspec/prophecy/CHANGES.md b/vendor/phpspec/prophecy/CHANGES.md new file mode 100644 index 0000000..996567a --- /dev/null +++ b/vendor/phpspec/prophecy/CHANGES.md @@ -0,0 +1,165 @@ +1.7.0 / 2017-03-02 +================== + +* Add full PHP 7.1 Support (thanks @prolic) +* Allow `sebastian/comparator ^2.0` (thanks @sebastianbergmann) +* Allow `sebastian/recursion-context ^3.0` (thanks @sebastianbergmann) +* Allow `\Error` instances in `ThrowPromise` (thanks @jameshalsall) +* Support `phpspec/phpspect ^3.2` (thanks @Sam-Burns) +* Fix failing builds (thanks @Sam-Burns) + +1.6.2 / 2016-11-21 +================== + +* Added support for detecting @method on interfaces that the class itself implements, or when the stubbed class is an interface itself (thanks @Seldaek) +* Added support for sebastian/recursion-context 2 (thanks @sebastianbergmann) +* Added testing on PHP 7.1 on Travis (thanks @danizord) +* Fixed the usage of the phpunit comparator (thanks @Anyqax) + +1.6.1 / 2016-06-07 +================== + + * Ignored empty method names in invalid `@method` phpdoc + * Fixed the mocking of SplFileObject + * Added compatibility with phpdocumentor/reflection-docblock 3 + +1.6.0 / 2016-02-15 +================== + + * Add Variadics support (thanks @pamil) + * Add ProphecyComparator for comparing objects that need revealing (thanks @jon-acker) + * Add ApproximateValueToken (thanks @dantleech) + * Add support for 'self' and 'parent' return type (thanks @bendavies) + * Add __invoke to allowed reflectable methods list (thanks @ftrrtf) + * Updated ExportUtil to reflect the latest changes by Sebastian (thanks @jakari) + * Specify the required php version for composer (thanks @jakzal) + * Exclude 'args' in the generated backtrace (thanks @oradwell) + * Fix code generation for scalar parameters (thanks @trowski) + * Fix missing sprintf in InvalidArgumentException __construct call (thanks @emmanuelballery) + * Fix phpdoc for magic methods (thanks @Tobion) + * Fix PhpDoc for interfaces usage (thanks @ImmRanneft) + * Prevent final methods from being manually extended (thanks @kamioftea) + * Enhance exception for invalid argument to ThrowPromise (thanks @Tobion) + +1.5.0 / 2015-04-27 +================== + + * Add support for PHP7 scalar type hints (thanks @trowski) + * Add support for PHP7 return types (thanks @trowski) + * Update internal test suite to support PHP7 + +1.4.1 / 2015-04-27 +================== + + * Fixed bug in closure-based argument tokens (#181) + +1.4.0 / 2015-03-27 +================== + + * Fixed errors in return type phpdocs (thanks @sobit) + * Fixed stringifying of hash containing one value (thanks @avant1) + * Improved clarity of method call expectation exception (thanks @dantleech) + * Add ability to specify which argument is returned in willReturnArgument (thanks @coderbyheart) + * Add more information to MethodNotFound exceptions (thanks @ciaranmcnulty) + * Support for mocking classes with methods that return references (thanks @edsonmedina) + * Improved object comparison (thanks @whatthejeff) + * Adopted '^' in composer dependencies (thanks @GrahamCampbell) + * Fixed non-typehinted arguments being treated as optional (thanks @whatthejeff) + * Magic methods are now filtered for keywords (thanks @seagoj) + * More readable errors for failure when expecting single calls (thanks @dantleech) + +1.3.1 / 2014-11-17 +================== + + * Fix the edge case when failed predictions weren't recorded for `getCheckedPredictions()` + +1.3.0 / 2014-11-14 +================== + + * Add a way to get checked predictions with `MethodProphecy::getCheckedPredictions()` + * Fix HHVM compatibility + * Remove dead code (thanks @stof) + * Add support for DirectoryIterators (thanks @shanethehat) + +1.2.0 / 2014-07-18 +================== + + * Added support for doubling magic methods documented in the class phpdoc (thanks @armetiz) + * Fixed a segfault appearing in some cases (thanks @dmoreaulf) + * Fixed the doubling of methods with typehints on non-existent classes (thanks @gquemener) + * Added support for internal classes using keywords as method names (thanks @milan) + * Added IdenticalValueToken and Argument::is (thanks @florianv) + * Removed the usage of scalar typehints in HHVM as HHVM 3 does not support them anymore in PHP code (thanks @whatthejeff) + +1.1.2 / 2014-01-24 +================== + + * Spy automatically promotes spied method call to an expected one + +1.1.1 / 2014-01-15 +================== + + * Added support for HHVM + +1.1.0 / 2014-01-01 +================== + + * Changed the generated class names to use a static counter instead of a random number + * Added a clss patch for ReflectionClass::newInstance to make its argument optional consistently (thanks @docteurklein) + * Fixed mirroring of classes with typehints on non-existent classes (thanks @docteurklein) + * Fixed the support of array callables in CallbackPromise and CallbackPrediction (thanks @ciaranmcnulty) + * Added support for properties in ObjectStateToken (thanks @adrienbrault) + * Added support for mocking classes with a final constructor (thanks @ciaranmcnulty) + * Added ArrayEveryEntryToken and Argument::withEveryEntry() (thanks @adrienbrault) + * Added an exception when trying to prophesize on a final method instead of ignoring silently (thanks @docteurklein) + * Added StringContainToken and Argument::containingString() (thanks @peterjmit) + * Added ``shouldNotHaveBeenCalled`` on the MethodProphecy (thanks @ciaranmcnulty) + * Fixed the comparison of objects in ExactValuetoken (thanks @sstok) + * Deprecated ``shouldNotBeenCalled`` in favor of ``shouldNotHaveBeenCalled`` + +1.0.4 / 2013-08-10 +================== + + * Better randomness for generated class names (thanks @sstok) + * Add support for interfaces into TypeToken and Argument::type() (thanks @sstok) + * Add support for old-style (method name === class name) constructors (thanks @l310 for report) + +1.0.3 / 2013-07-04 +================== + + * Support callable typehints (thanks @stof) + * Do not attempt to autoload arrays when generating code (thanks @MarcoDeBortoli) + * New ArrayEntryToken (thanks @kagux) + +1.0.2 / 2013-05-19 +================== + + * Logical `AND` token added (thanks @kagux) + * Logical `NOT` token added (thanks @kagux) + * Add support for setting custom constructor arguments + * Properly stringify hashes + * Record calls that throw exceptions + * Migrate spec suite to PhpSpec 2.0 + +1.0.1 / 2013-04-30 +================== + + * Fix broken UnexpectedCallException message + * Trim AggregateException message + +1.0.0 / 2013-04-29 +================== + + * Improve exception messages + +1.0.0-BETA2 / 2013-04-03 +======================== + + * Add more debug information to CallTimes and Call prediction exception messages + * Fix MethodNotFoundException wrong namespace (thanks @gunnarlium) + * Fix some typos in the exception messages (thanks @pborreli) + +1.0.0-BETA1 / 2013-03-25 +======================== + + * Initial release diff --git a/vendor/phpspec/prophecy/CONTRIBUTING.md b/vendor/phpspec/prophecy/CONTRIBUTING.md new file mode 100644 index 0000000..4a8169d --- /dev/null +++ b/vendor/phpspec/prophecy/CONTRIBUTING.md @@ -0,0 +1,22 @@ +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/vendor/phpspec/prophecy/LICENSE b/vendor/phpspec/prophecy/LICENSE new file mode 100644 index 0000000..c8b3647 --- /dev/null +++ b/vendor/phpspec/prophecy/LICENSE @@ -0,0 +1,23 @@ +Copyright (c) 2013 Konstantin Kudryashov + Marcello Duarte + +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/vendor/phpspec/prophecy/README.md b/vendor/phpspec/prophecy/README.md new file mode 100644 index 0000000..65ec16c --- /dev/null +++ b/vendor/phpspec/prophecy/README.md @@ -0,0 +1,391 @@ +# Prophecy + +[![Stable release](https://poser.pugx.org/phpspec/prophecy/version.svg)](https://packagist.org/packages/phpspec/prophecy) +[![Build Status](https://travis-ci.org/phpspec/prophecy.svg?branch=master)](https://travis-ci.org/phpspec/prophecy) + +Prophecy is a highly opinionated yet very powerful and flexible PHP object mocking +framework. Though initially it was created to fulfil phpspec2 needs, it is flexible +enough to be used inside any testing framework out there with minimal effort. + +## A simple example + +```php +prophet->prophesize('App\Security\Hasher'); + $user = new App\Entity\User($hasher->reveal()); + + $hasher->generateHash($user, 'qwerty')->willReturn('hashed_pass'); + + $user->setPassword('qwerty'); + + $this->assertEquals('hashed_pass', $user->getPassword()); + } + + protected function setup() + { + $this->prophet = new \Prophecy\Prophet; + } + + protected function tearDown() + { + $this->prophet->checkPredictions(); + } +} +``` + +## Installation + +### Prerequisites + +Prophecy requires PHP 5.3.3 or greater. + +### Setup through composer + +First, add Prophecy to the list of dependencies inside your `composer.json`: + +```json +{ + "require-dev": { + "phpspec/prophecy": "~1.0" + } +} +``` + +Then simply install it with composer: + +```bash +$> composer install --prefer-dist +``` + +You can read more about Composer on its [official webpage](http://getcomposer.org). + +## How to use it + +First of all, in Prophecy every word has a logical meaning, even the name of the library +itself (Prophecy). When you start feeling that, you'll become very fluid with this +tool. + +For example, Prophecy has been named that way because it concentrates on describing the future +behavior of objects with very limited knowledge about them. But as with any other prophecy, +those object prophecies can't create themselves - there should be a Prophet: + +```php +$prophet = new Prophecy\Prophet; +``` + +The Prophet creates prophecies by *prophesizing* them: + +```php +$prophecy = $prophet->prophesize(); +``` + +The result of the `prophesize()` method call is a new object of class `ObjectProphecy`. Yes, +that's your specific object prophecy, which describes how your object would behave +in the near future. But first, you need to specify which object you're talking about, +right? + +```php +$prophecy->willExtend('stdClass'); +$prophecy->willImplement('SessionHandlerInterface'); +``` + +There are 2 interesting calls - `willExtend` and `willImplement`. The first one tells +object prophecy that our object should extend specific class, the second one says that +it should implement some interface. Obviously, objects in PHP can implement multiple +interfaces, but extend only one parent class. + +### Dummies + +Ok, now we have our object prophecy. What can we do with it? First of all, we can get +our object *dummy* by revealing its prophecy: + +```php +$dummy = $prophecy->reveal(); +``` + +The `$dummy` variable now holds a special dummy object. Dummy objects are objects that extend +and/or implement preset classes/interfaces by overriding all their public methods. The key +point about dummies is that they do not hold any logic - they just do nothing. Any method +of the dummy will always return `null` and the dummy will never throw any exceptions. +Dummy is your friend if you don't care about the actual behavior of this double and just need +a token object to satisfy a method typehint. + +You need to understand one thing - a dummy is not a prophecy. Your object prophecy is still +assigned to `$prophecy` variable and in order to manipulate with your expectations, you +should work with it. `$dummy` is a dummy - a simple php object that tries to fulfil your +prophecy. + +### Stubs + +Ok, now we know how to create basic prophecies and reveal dummies from them. That's +awesome if we don't care about our _doubles_ (objects that reflect originals) +interactions. If we do, we need to use *stubs* or *mocks*. + +A stub is an object double, which doesn't have any expectations about the object behavior, +but when put in specific environment, behaves in specific way. Ok, I know, it's cryptic, +but bear with me for a minute. Simply put, a stub is a dummy, which depending on the called +method signature does different things (has logic). To create stubs in Prophecy: + +```php +$prophecy->read('123')->willReturn('value'); +``` + +Oh wow. We've just made an arbitrary call on the object prophecy? Yes, we did. And this +call returned us a new object instance of class `MethodProphecy`. Yep, that's a specific +method with arguments prophecy. Method prophecies give you the ability to create method +promises or predictions. We'll talk about method predictions later in the _Mocks_ section. + +#### Promises + +Promises are logical blocks, that represent your fictional methods in prophecy terms +and they are handled by the `MethodProphecy::will(PromiseInterface $promise)` method. +As a matter of fact, the call that we made earlier (`willReturn('value')`) is a simple +shortcut to: + +```php +$prophecy->read('123')->will(new Prophecy\Promise\ReturnPromise(array('value'))); +``` + +This promise will cause any call to our double's `read()` method with exactly one +argument - `'123'` to always return `'value'`. But that's only for this +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 +- `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 +`Prophecy\Promise\PromiseInterface`. + +#### Method prophecies idempotency + +Prophecy enforces same method prophecies and, as a consequence, same promises and +predictions for the same method calls with the same arguments. This means: + +```php +$methodProphecy1 = $prophecy->read('123'); +$methodProphecy2 = $prophecy->read('123'); +$methodProphecy3 = $prophecy->read('321'); + +$methodProphecy1 === $methodProphecy2; +$methodProphecy1 !== $methodProphecy3; +``` + +That's interesting, right? Now you might ask me how would you define more complex +behaviors where some method call changes behavior of others. In PHPUnit or Mockery +you do that by predicting how many times your method will be called. In Prophecy, +you'll use promises for that: + +```php +$user->getName()->willReturn(null); + +// For PHP 5.4 +$user->setName('everzet')->will(function () { + $this->getName()->willReturn('everzet'); +}); + +// For PHP 5.3 +$user->setName('everzet')->will(function ($args, $user) { + $user->getName()->willReturn('everzet'); +}); + +// Or +$user->setName('everzet')->will(function ($args) use ($user) { + $user->getName()->willReturn('everzet'); +}); +``` + +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. + +#### Arguments wildcarding + +The previous example is awesome (at least I hope it is for you), but that's not +optimal enough. We hardcoded `'everzet'` in our expectation. Isn't there a better +way? In fact there is, but it involves understanding what this `'everzet'` +actually is. + +You see, even if method arguments used during method prophecy creation look +like simple method arguments, in reality they are not. They are argument token +wildcards. As a matter of fact, `->setName('everzet')` looks like a simple call just +because Prophecy automatically transforms it under the hood into: + +```php +$user->setName(new Prophecy\Argument\Token\ExactValueToken('everzet')); +``` + +Those argument tokens are simple PHP classes, that implement +`Prophecy\Argument\Token\TokenInterface` and tell Prophecy how to compare real arguments +with your expectations. And yes, those classnames are damn big. That's why there's a +shortcut class `Prophecy\Argument`, which you can use to create tokens like that: + +```php +use Prophecy\Argument; + +$user->setName(Argument::exact('everzet')); +``` + +`ExactValueToken` is not very useful in our case as it forced us to hardcode the username. +That's why Prophecy comes bundled with a bunch of other tokens: + +- `IdenticalValueToken` or `Argument::is($value)` - checks that the argument is identical to a specific value +- `ExactValueToken` or `Argument::exact($value)` - checks that the argument matches a specific value +- `TypeToken` or `Argument::type($typeOrClass)` - checks that the argument matches a specific type or + classname +- `ObjectStateToken` or `Argument::which($method, $value)` - checks that the argument method returns + a specific value +- `CallbackToken` or `Argument::that(callback)` - checks that the argument matches a custom callback +- `AnyValueToken` or `Argument::any()` - matches any argument +- `AnyValuesToken` or `Argument::cetera()` - matches any arguments to the rest of the signature +- `StringContainsToken` or `Argument::containingString($value)` - checks that the argument contains a specific string value + +And you can add even more by implementing `TokenInterface` with your own custom classes. + +So, let's refactor our initial `{set,get}Name()` logic with argument tokens: + +```php +use Prophecy\Argument; + +$user->getName()->willReturn(null); + +// For PHP 5.4 +$user->setName(Argument::type('string'))->will(function ($args) { + $this->getName()->willReturn($args[0]); +}); + +// For PHP 5.3 +$user->setName(Argument::type('string'))->will(function ($args, $user) { + $user->getName()->willReturn($args[0]); +}); + +// Or +$user->setName(Argument::type('string'))->will(function ($args) use ($user) { + $user->getName()->willReturn($args[0]); +}); +``` + +That's it. Now our `{set,get}Name()` prophecy will work with any string argument provided to it. +We've just described how our stub object should behave, even though the original object could have +no behavior whatsoever. + +One last bit about arguments now. You might ask, what happens in case of: + +```php +use Prophecy\Argument; + +$user->getName()->willReturn(null); + +// For PHP 5.4 +$user->setName(Argument::type('string'))->will(function ($args) { + $this->getName()->willReturn($args[0]); +}); + +// For PHP 5.3 +$user->setName(Argument::type('string'))->will(function ($args, $user) { + $user->getName()->willReturn($args[0]); +}); + +// Or +$user->setName(Argument::type('string'))->will(function ($args) use ($user) { + $user->getName()->willReturn($args[0]); +}); + +$user->setName(Argument::any())->will(function () { +}); +``` + +Nothing. Your stub will continue behaving the way it did before. That's because of how +arguments wildcarding works. Every argument token type has a different score level, which +wildcard then uses to calculate the final arguments match score and use the method prophecy +promise that has the highest score. In this case, `Argument::type()` in case of success +scores `5` and `Argument::any()` scores `3`. So the type token wins, as does the first +`setName()` method prophecy and its promise. The simple rule of thumb - more precise token +always wins. + +#### Getting stub objects + +Ok, now we know how to define our prophecy method promises, let's get our stub from +it: + +```php +$stub = $prophecy->reveal(); +``` + +As you might see, the only difference between how we get dummies and stubs is that with +stubs we describe every object conversation instead of just agreeing with `null` returns +(object being *dummy*). As a matter of fact, after you define your first promise +(method call), Prophecy will force you to define all the communications - it throws +the `UnexpectedCallException` for any call you didn't describe with object prophecy before +calling it on a stub. + +### Mocks + +Now we know how to define doubles without behavior (dummies) and doubles with behavior, but +no expectations (stubs). What's left is doubles for which we have some expectations. These +are called mocks and in Prophecy they look almost exactly the same as stubs, except that +they define *predictions* instead of *promises* on method prophecies: + +```php +$entityManager->flush()->shouldBeCalled(); +``` + +#### Predictions + +The `shouldBeCalled()` method here assigns `CallPrediction` to our method prophecy. +Predictions are a delayed behavior check for your prophecies. You see, during the entire lifetime +of your doubles, Prophecy records every single call you're making against it inside your +code. After that, Prophecy can use this collected information to check if it matches defined +predictions. You can assign predictions to method prophecies using the +`MethodProphecy::should(PredictionInterface $prediction)` method. As a matter of fact, +the `shouldBeCalled()` method we used earlier is just a shortcut to: + +```php +$entityManager->flush()->should(new Prophecy\Prediction\CallPrediction()); +``` + +It checks if your method of interest (that matches both the method name and the arguments wildcard) +was called 1 or more times. If the prediction failed then it throws an exception. When does this +check happen? Whenever you call `checkPredictions()` on the main Prophet object: + +```php +$prophet->checkPredictions(); +``` + +In PHPUnit, you would want to put this call into the `tearDown()` method. If no predictions +are defined, it would do nothing. So it won't harm to call it after every test. + +There are plenty more predictions you can play with: + +- `CallPrediction` or `shouldBeCalled()` - checks that the method has been called 1 or more times +- `NoCallsPrediction` or `shouldNotBeCalled()` - checks that the method has not been called +- `CallTimesPrediction` or `shouldBeCalledTimes($count)` - checks that the method has been called + `$count` times +- `CallbackPrediction` or `should($callback)` - checks the method against your own custom callback + +Of course, you can always create your own custom prediction any time by implementing +`PredictionInterface`. + +### Spies + +The last bit of awesomeness in Prophecy is out-of-the-box spies support. As I said in the previous +section, Prophecy records every call made during the double's entire lifetime. This means +you don't need to record predictions in order to check them. You can also do it +manually by using the `MethodProphecy::shouldHave(PredictionInterface $prediction)` method: + +```php +$em = $prophet->prophesize('Doctrine\ORM\EntityManager'); + +$controller->createUser($em->reveal()); + +$em->flush()->shouldHaveBeenCalled(); +``` + +Such manipulation with doubles is called spying. And with Prophecy it just works. diff --git a/vendor/phpspec/prophecy/composer.json b/vendor/phpspec/prophecy/composer.json new file mode 100644 index 0000000..7918065 --- /dev/null +++ b/vendor/phpspec/prophecy/composer.json @@ -0,0 +1,50 @@ +{ + "name": "phpspec/prophecy", + "description": "Highly opinionated mocking framework for PHP 5.3+", + "keywords": ["Mock", "Stub", "Dummy", "Double", "Fake", "Spy"], + "homepage": "https://github.com/phpspec/prophecy", + "type": "library", + "license": "MIT", + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" + } + ], + + "require": { + "php": "^5.3|^7.0", + "phpdocumentor/reflection-docblock": "^2.0|^3.0.2", + "sebastian/comparator": "^1.1|^2.0", + "doctrine/instantiator": "^1.0.2", + "sebastian/recursion-context": "^1.0|^2.0|^3.0" + }, + + "require-dev": { + "phpspec/phpspec": "^2.5|^3.2", + "phpunit/phpunit": "^4.8 || ^5.6.5" + }, + + "autoload": { + "psr-0": { + "Prophecy\\": "src/" + } + }, + + "autoload-dev": { + "psr-4": { + "Fixtures\\Prophecy\\": "fixtures" + } + }, + + "extra": { + "branch-alias": { + "dev-master": "1.6.x-dev" + } + } +} diff --git a/vendor/phpspec/prophecy/fixtures/EmptyClass.php b/vendor/phpspec/prophecy/fixtures/EmptyClass.php new file mode 100644 index 0000000..4db3b50 --- /dev/null +++ b/vendor/phpspec/prophecy/fixtures/EmptyClass.php @@ -0,0 +1,7 @@ + + + + + + + + + + tests + + + + + + ./src/ + + + diff --git a/vendor/phpspec/prophecy/spec/Prophecy/Argument/ArgumentsWildcardSpec.php b/vendor/phpspec/prophecy/spec/Prophecy/Argument/ArgumentsWildcardSpec.php new file mode 100644 index 0000000..b82f1b8 --- /dev/null +++ b/vendor/phpspec/prophecy/spec/Prophecy/Argument/ArgumentsWildcardSpec.php @@ -0,0 +1,128 @@ +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/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/AnyValueTokenSpec.php b/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/AnyValueTokenSpec.php new file mode 100644 index 0000000..a43e923 --- /dev/null +++ b/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/AnyValueTokenSpec.php @@ -0,0 +1,28 @@ +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/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/AnyValuesTokenSpec.php b/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/AnyValuesTokenSpec.php new file mode 100644 index 0000000..c29076f --- /dev/null +++ b/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/AnyValuesTokenSpec.php @@ -0,0 +1,28 @@ +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/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ApproximateValueTokenSpec.php b/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ApproximateValueTokenSpec.php new file mode 100644 index 0000000..8799d6d --- /dev/null +++ b/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ApproximateValueTokenSpec.php @@ -0,0 +1,55 @@ +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/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ArrayCountTokenSpec.php b/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ArrayCountTokenSpec.php new file mode 100644 index 0000000..cc81fe0 --- /dev/null +++ b/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ArrayCountTokenSpec.php @@ -0,0 +1,58 @@ +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/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ArrayEntryTokenSpec.php b/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ArrayEntryTokenSpec.php new file mode 100644 index 0000000..632118a --- /dev/null +++ b/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ArrayEntryTokenSpec.php @@ -0,0 +1,202 @@ +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/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ArrayEveryEntryTokenSpec.php b/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ArrayEveryEntryTokenSpec.php new file mode 100644 index 0000000..e57ff8c --- /dev/null +++ b/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ArrayEveryEntryTokenSpec.php @@ -0,0 +1,96 @@ +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/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/CallbackTokenSpec.php b/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/CallbackTokenSpec.php new file mode 100644 index 0000000..4395bf0 --- /dev/null +++ b/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/CallbackTokenSpec.php @@ -0,0 +1,42 @@ +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/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ExactValueTokenSpec.php b/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ExactValueTokenSpec.php new file mode 100644 index 0000000..14322f8 --- /dev/null +++ b/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ExactValueTokenSpec.php @@ -0,0 +1,152 @@ +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/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/IdenticalValueTokenSpec.php b/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/IdenticalValueTokenSpec.php new file mode 100644 index 0000000..00c3a21 --- /dev/null +++ b/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/IdenticalValueTokenSpec.php @@ -0,0 +1,152 @@ +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/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/LogicalAndTokenSpec.php b/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/LogicalAndTokenSpec.php new file mode 100644 index 0000000..a79acf4 --- /dev/null +++ b/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/LogicalAndTokenSpec.php @@ -0,0 +1,69 @@ +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/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/LogicalNotTokenSpec.php b/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/LogicalNotTokenSpec.php new file mode 100644 index 0000000..c2cbbad --- /dev/null +++ b/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/LogicalNotTokenSpec.php @@ -0,0 +1,62 @@ +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/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ObjectStateTokenSpec.php b/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ObjectStateTokenSpec.php new file mode 100644 index 0000000..d71b22a --- /dev/null +++ b/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ObjectStateTokenSpec.php @@ -0,0 +1,89 @@ +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/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/StringContainsTokenSpec.php b/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/StringContainsTokenSpec.php new file mode 100644 index 0000000..c7fd265 --- /dev/null +++ b/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/StringContainsTokenSpec.php @@ -0,0 +1,49 @@ +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/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/TypeTokenSpec.php b/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/TypeTokenSpec.php new file mode 100644 index 0000000..2829f31 --- /dev/null +++ b/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/TypeTokenSpec.php @@ -0,0 +1,57 @@ +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/vendor/phpspec/prophecy/spec/Prophecy/ArgumentSpec.php b/vendor/phpspec/prophecy/spec/Prophecy/ArgumentSpec.php new file mode 100644 index 0000000..64232a4 --- /dev/null +++ b/vendor/phpspec/prophecy/spec/Prophecy/ArgumentSpec.php @@ -0,0 +1,107 @@ +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/vendor/phpspec/prophecy/spec/Prophecy/Call/CallCenterSpec.php b/vendor/phpspec/prophecy/spec/Prophecy/Call/CallCenterSpec.php new file mode 100644 index 0000000..83d61f1 --- /dev/null +++ b/vendor/phpspec/prophecy/spec/Prophecy/Call/CallCenterSpec.php @@ -0,0 +1,180 @@ +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/vendor/phpspec/prophecy/spec/Prophecy/Call/CallSpec.php b/vendor/phpspec/prophecy/spec/Prophecy/Call/CallSpec.php new file mode 100644 index 0000000..a622b49 --- /dev/null +++ b/vendor/phpspec/prophecy/spec/Prophecy/Call/CallSpec.php @@ -0,0 +1,51 @@ +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/vendor/phpspec/prophecy/spec/Prophecy/Comparator/ClosureComparatorSpec.php b/vendor/phpspec/prophecy/spec/Prophecy/Comparator/ClosureComparatorSpec.php new file mode 100644 index 0000000..c174e73 --- /dev/null +++ b/vendor/phpspec/prophecy/spec/Prophecy/Comparator/ClosureComparatorSpec.php @@ -0,0 +1,39 @@ +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/vendor/phpspec/prophecy/spec/Prophecy/Comparator/FactorySpec.php b/vendor/phpspec/prophecy/spec/Prophecy/Comparator/FactorySpec.php new file mode 100644 index 0000000..6b13336 --- /dev/null +++ b/vendor/phpspec/prophecy/spec/Prophecy/Comparator/FactorySpec.php @@ -0,0 +1,20 @@ +shouldHaveType('SebastianBergmann\Comparator\Factory'); + } + + function it_should_have_ClosureComparator_registered() + { + $comparator = $this->getInstance()->getComparatorFor(function(){}, function(){}); + $comparator->shouldHaveType('Prophecy\Comparator\ClosureComparator'); + } +} diff --git a/vendor/phpspec/prophecy/spec/Prophecy/Comparator/ProphecyComparatorSpec.php b/vendor/phpspec/prophecy/spec/Prophecy/Comparator/ProphecyComparatorSpec.php new file mode 100644 index 0000000..06bf6f1 --- /dev/null +++ b/vendor/phpspec/prophecy/spec/Prophecy/Comparator/ProphecyComparatorSpec.php @@ -0,0 +1,39 @@ +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/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/DisableConstructorPatchSpec.php b/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/DisableConstructorPatchSpec.php new file mode 100644 index 0000000..4fd28d7 --- /dev/null +++ b/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/DisableConstructorPatchSpec.php @@ -0,0 +1,54 @@ +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/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/HhvmExceptionPatchSpec.php b/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/HhvmExceptionPatchSpec.php new file mode 100644 index 0000000..9d04421 --- /dev/null +++ b/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/HhvmExceptionPatchSpec.php @@ -0,0 +1,34 @@ +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/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/KeywordPatchSpec.php b/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/KeywordPatchSpec.php new file mode 100644 index 0000000..1c454e6 --- /dev/null +++ b/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/KeywordPatchSpec.php @@ -0,0 +1,43 @@ +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/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/MagicCallPatchSpec.php b/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/MagicCallPatchSpec.php new file mode 100644 index 0000000..f7a5631 --- /dev/null +++ b/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/MagicCallPatchSpec.php @@ -0,0 +1,140 @@ +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/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/ProphecySubjectPatchSpec.php b/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/ProphecySubjectPatchSpec.php new file mode 100644 index 0000000..96f0e20 --- /dev/null +++ b/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/ProphecySubjectPatchSpec.php @@ -0,0 +1,79 @@ +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/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/ReflectionClassNewInstancePatchSpec.php b/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/ReflectionClassNewInstancePatchSpec.php new file mode 100644 index 0000000..effd61e --- /dev/null +++ b/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/ReflectionClassNewInstancePatchSpec.php @@ -0,0 +1,43 @@ +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/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/SplFileInfoPatchSpec.php b/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/SplFileInfoPatchSpec.php new file mode 100644 index 0000000..5bc3958 --- /dev/null +++ b/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/SplFileInfoPatchSpec.php @@ -0,0 +1,85 @@ +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/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/TraversablePatchSpec.php b/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/TraversablePatchSpec.php new file mode 100644 index 0000000..abce2f1 --- /dev/null +++ b/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/TraversablePatchSpec.php @@ -0,0 +1,50 @@ +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/vendor/phpspec/prophecy/spec/Prophecy/Doubler/DoublerSpec.php b/vendor/phpspec/prophecy/spec/Prophecy/Doubler/DoublerSpec.php new file mode 100644 index 0000000..b58b1a8 --- /dev/null +++ b/vendor/phpspec/prophecy/spec/Prophecy/Doubler/DoublerSpec.php @@ -0,0 +1,115 @@ +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/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/ClassCodeGeneratorSpec.php b/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/ClassCodeGeneratorSpec.php new file mode 100644 index 0000000..2e85b6c --- /dev/null +++ b/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/ClassCodeGeneratorSpec.php @@ -0,0 +1,362 @@ +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/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/ClassCreatorSpec.php b/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/ClassCreatorSpec.php new file mode 100644 index 0000000..e7cae23 --- /dev/null +++ b/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/ClassCreatorSpec.php @@ -0,0 +1,37 @@ +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/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/Node/ArgumentNodeSpec.php b/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/Node/ArgumentNodeSpec.php new file mode 100644 index 0000000..2c8d188 --- /dev/null +++ b/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/Node/ArgumentNodeSpec.php @@ -0,0 +1,92 @@ +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/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/Node/ClassNodeSpec.php b/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/Node/ClassNodeSpec.php new file mode 100644 index 0000000..16fc498 --- /dev/null +++ b/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/Node/ClassNodeSpec.php @@ -0,0 +1,185 @@ +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/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/Node/MethodNodeSpec.php b/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/Node/MethodNodeSpec.php new file mode 100644 index 0000000..14cfe8d --- /dev/null +++ b/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/Node/MethodNodeSpec.php @@ -0,0 +1,134 @@ +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/vendor/phpspec/prophecy/spec/Prophecy/Doubler/LazyDoubleSpec.php b/vendor/phpspec/prophecy/spec/Prophecy/Doubler/LazyDoubleSpec.php new file mode 100644 index 0000000..fdf1e96 --- /dev/null +++ b/vendor/phpspec/prophecy/spec/Prophecy/Doubler/LazyDoubleSpec.php @@ -0,0 +1,79 @@ +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/vendor/phpspec/prophecy/spec/Prophecy/Doubler/NameGeneratorSpec.php b/vendor/phpspec/prophecy/spec/Prophecy/Doubler/NameGeneratorSpec.php new file mode 100644 index 0000000..1e9b17f --- /dev/null +++ b/vendor/phpspec/prophecy/spec/Prophecy/Doubler/NameGeneratorSpec.php @@ -0,0 +1,60 @@ +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/vendor/phpspec/prophecy/spec/Prophecy/Exception/Call/UnexpectedCallExceptionSpec.php b/vendor/phpspec/prophecy/spec/Prophecy/Exception/Call/UnexpectedCallExceptionSpec.php new file mode 100644 index 0000000..5e2c635 --- /dev/null +++ b/vendor/phpspec/prophecy/spec/Prophecy/Exception/Call/UnexpectedCallExceptionSpec.php @@ -0,0 +1,30 @@ +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/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/ClassCreatorExceptionSpec.php b/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/ClassCreatorExceptionSpec.php new file mode 100644 index 0000000..da3aa58 --- /dev/null +++ b/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/ClassCreatorExceptionSpec.php @@ -0,0 +1,26 @@ +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/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/ClassMirrorExceptionSpec.php b/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/ClassMirrorExceptionSpec.php new file mode 100644 index 0000000..c4f547a --- /dev/null +++ b/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/ClassMirrorExceptionSpec.php @@ -0,0 +1,24 @@ +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/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/ClassNotFoundExceptionSpec.php b/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/ClassNotFoundExceptionSpec.php new file mode 100644 index 0000000..251512b --- /dev/null +++ b/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/ClassNotFoundExceptionSpec.php @@ -0,0 +1,25 @@ +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/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/DoubleExceptionSpec.php b/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/DoubleExceptionSpec.php new file mode 100644 index 0000000..6fe5a19 --- /dev/null +++ b/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/DoubleExceptionSpec.php @@ -0,0 +1,14 @@ +shouldBeAnInstanceOf('RuntimeException'); + $this->shouldBeAnInstanceOf('Prophecy\Exception\Doubler\DoublerException'); + } +} diff --git a/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/InterfaceNotFoundExceptionSpec.php b/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/InterfaceNotFoundExceptionSpec.php new file mode 100644 index 0000000..ad1a439 --- /dev/null +++ b/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/InterfaceNotFoundExceptionSpec.php @@ -0,0 +1,24 @@ +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/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/MethodNotExtendableExceptionSpec.php b/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/MethodNotExtendableExceptionSpec.php new file mode 100644 index 0000000..5028b02 --- /dev/null +++ b/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/MethodNotExtendableExceptionSpec.php @@ -0,0 +1,29 @@ +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/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/MethodNotFoundExceptionSpec.php b/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/MethodNotFoundExceptionSpec.php new file mode 100644 index 0000000..a889dd7 --- /dev/null +++ b/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/MethodNotFoundExceptionSpec.php @@ -0,0 +1,40 @@ +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/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/AggregateExceptionSpec.php b/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/AggregateExceptionSpec.php new file mode 100644 index 0000000..d78ea73 --- /dev/null +++ b/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/AggregateExceptionSpec.php @@ -0,0 +1,50 @@ +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/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/NoCallsExceptionSpec.php b/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/NoCallsExceptionSpec.php new file mode 100644 index 0000000..c2aa31d --- /dev/null +++ b/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/NoCallsExceptionSpec.php @@ -0,0 +1,27 @@ +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/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/UnexpectedCallsCountExceptionSpec.php b/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/UnexpectedCallsCountExceptionSpec.php new file mode 100644 index 0000000..e18932e --- /dev/null +++ b/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/UnexpectedCallsCountExceptionSpec.php @@ -0,0 +1,27 @@ +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/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/UnexpectedCallsExceptionSpec.php b/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/UnexpectedCallsExceptionSpec.php new file mode 100644 index 0000000..49d12d5 --- /dev/null +++ b/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/UnexpectedCallsExceptionSpec.php @@ -0,0 +1,33 @@ +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/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prophecy/MethodProphecyExceptionSpec.php b/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prophecy/MethodProphecyExceptionSpec.php new file mode 100644 index 0000000..d05c66a --- /dev/null +++ b/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prophecy/MethodProphecyExceptionSpec.php @@ -0,0 +1,28 @@ +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/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prophecy/ObjectProphecyExceptionSpec.php b/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prophecy/ObjectProphecyExceptionSpec.php new file mode 100644 index 0000000..91ffd5b --- /dev/null +++ b/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prophecy/ObjectProphecyExceptionSpec.php @@ -0,0 +1,24 @@ +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/vendor/phpspec/prophecy/spec/Prophecy/Prediction/CallPredictionSpec.php b/vendor/phpspec/prophecy/spec/Prophecy/Prediction/CallPredictionSpec.php new file mode 100644 index 0000000..4f03db2 --- /dev/null +++ b/vendor/phpspec/prophecy/spec/Prophecy/Prediction/CallPredictionSpec.php @@ -0,0 +1,42 @@ +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/vendor/phpspec/prophecy/spec/Prophecy/Prediction/CallTimesPredictionSpec.php b/vendor/phpspec/prophecy/spec/Prophecy/Prediction/CallTimesPredictionSpec.php new file mode 100644 index 0000000..52ce31c --- /dev/null +++ b/vendor/phpspec/prophecy/spec/Prophecy/Prediction/CallTimesPredictionSpec.php @@ -0,0 +1,50 @@ +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/vendor/phpspec/prophecy/spec/Prophecy/Prediction/CallbackPredictionSpec.php b/vendor/phpspec/prophecy/spec/Prophecy/Prediction/CallbackPredictionSpec.php new file mode 100644 index 0000000..6da95f0 --- /dev/null +++ b/vendor/phpspec/prophecy/spec/Prophecy/Prediction/CallbackPredictionSpec.php @@ -0,0 +1,34 @@ +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/vendor/phpspec/prophecy/spec/Prophecy/Prediction/NoCallsPredictionSpec.php b/vendor/phpspec/prophecy/spec/Prophecy/Prediction/NoCallsPredictionSpec.php new file mode 100644 index 0000000..b5fa28a --- /dev/null +++ b/vendor/phpspec/prophecy/spec/Prophecy/Prediction/NoCallsPredictionSpec.php @@ -0,0 +1,41 @@ +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/vendor/phpspec/prophecy/spec/Prophecy/Promise/CallbackPromiseSpec.php b/vendor/phpspec/prophecy/spec/Prophecy/Promise/CallbackPromiseSpec.php new file mode 100644 index 0000000..fb1dc62 --- /dev/null +++ b/vendor/phpspec/prophecy/spec/Prophecy/Promise/CallbackPromiseSpec.php @@ -0,0 +1,96 @@ +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/vendor/phpspec/prophecy/spec/Prophecy/Promise/ReturnArgumentPromiseSpec.php b/vendor/phpspec/prophecy/spec/Prophecy/Promise/ReturnArgumentPromiseSpec.php new file mode 100644 index 0000000..1cef3aa --- /dev/null +++ b/vendor/phpspec/prophecy/spec/Prophecy/Promise/ReturnArgumentPromiseSpec.php @@ -0,0 +1,31 @@ +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/vendor/phpspec/prophecy/spec/Prophecy/Promise/ReturnPromiseSpec.php b/vendor/phpspec/prophecy/spec/Prophecy/Promise/ReturnPromiseSpec.php new file mode 100644 index 0000000..bc6a991 --- /dev/null +++ b/vendor/phpspec/prophecy/spec/Prophecy/Promise/ReturnPromiseSpec.php @@ -0,0 +1,49 @@ +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/vendor/phpspec/prophecy/spec/Prophecy/Promise/ThrowPromiseSpec.php b/vendor/phpspec/prophecy/spec/Prophecy/Promise/ThrowPromiseSpec.php new file mode 100644 index 0000000..b5a10bc --- /dev/null +++ b/vendor/phpspec/prophecy/spec/Prophecy/Promise/ThrowPromiseSpec.php @@ -0,0 +1,92 @@ +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/vendor/phpspec/prophecy/spec/Prophecy/Prophecy/MethodProphecySpec.php b/vendor/phpspec/prophecy/spec/Prophecy/Prophecy/MethodProphecySpec.php new file mode 100644 index 0000000..969e644 --- /dev/null +++ b/vendor/phpspec/prophecy/spec/Prophecy/Prophecy/MethodProphecySpec.php @@ -0,0 +1,342 @@ +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/vendor/phpspec/prophecy/spec/Prophecy/Prophecy/ObjectProphecySpec.php b/vendor/phpspec/prophecy/spec/Prophecy/Prophecy/ObjectProphecySpec.php new file mode 100644 index 0000000..c6afb3e --- /dev/null +++ b/vendor/phpspec/prophecy/spec/Prophecy/Prophecy/ObjectProphecySpec.php @@ -0,0 +1,283 @@ +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/vendor/phpspec/prophecy/spec/Prophecy/Prophecy/RevealerSpec.php b/vendor/phpspec/prophecy/spec/Prophecy/Prophecy/RevealerSpec.php new file mode 100644 index 0000000..fcaa7ca --- /dev/null +++ b/vendor/phpspec/prophecy/spec/Prophecy/Prophecy/RevealerSpec.php @@ -0,0 +1,44 @@ +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/vendor/phpspec/prophecy/spec/Prophecy/ProphetSpec.php b/vendor/phpspec/prophecy/spec/Prophecy/ProphetSpec.php new file mode 100644 index 0000000..67f0275 --- /dev/null +++ b/vendor/phpspec/prophecy/spec/Prophecy/ProphetSpec.php @@ -0,0 +1,81 @@ +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/vendor/phpspec/prophecy/spec/Prophecy/Util/StringUtilSpec.php b/vendor/phpspec/prophecy/spec/Prophecy/Util/StringUtilSpec.php new file mode 100644 index 0000000..80573cf --- /dev/null +++ b/vendor/phpspec/prophecy/spec/Prophecy/Util/StringUtilSpec.php @@ -0,0 +1,91 @@ +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/vendor/phpspec/prophecy/src/Prophecy/Argument.php b/vendor/phpspec/prophecy/src/Prophecy/Argument.php new file mode 100644 index 0000000..fde6aa9 --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Argument.php @@ -0,0 +1,212 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy; + +use Prophecy\Argument\Token; + +/** + * Argument tokens shortcuts. + * + * @author Konstantin Kudryashov + */ +class Argument +{ + /** + * Checks that argument is exact value or object. + * + * @param mixed $value + * + * @return Token\ExactValueToken + */ + public static function exact($value) + { + return new Token\ExactValueToken($value); + } + + /** + * Checks that argument is of specific type or instance of specific class. + * + * @param string $type Type name (`integer`, `string`) or full class name + * + * @return Token\TypeToken + */ + public static function type($type) + { + return new Token\TypeToken($type); + } + + /** + * Checks that argument object has specific state. + * + * @param string $methodName + * @param mixed $value + * + * @return Token\ObjectStateToken + */ + public static function which($methodName, $value) + { + return new Token\ObjectStateToken($methodName, $value); + } + + /** + * Checks that argument matches provided callback. + * + * @param callable $callback + * + * @return Token\CallbackToken + */ + public static function that($callback) + { + return new Token\CallbackToken($callback); + } + + /** + * Matches any single value. + * + * @return Token\AnyValueToken + */ + public static function any() + { + return new Token\AnyValueToken; + } + + /** + * Matches all values to the rest of the signature. + * + * @return Token\AnyValuesToken + */ + public static function cetera() + { + return new Token\AnyValuesToken; + } + + /** + * Checks that argument matches all tokens + * + * @param mixed ... a list of tokens + * + * @return Token\LogicalAndToken + */ + public static function allOf() + { + return new Token\LogicalAndToken(func_get_args()); + } + + /** + * Checks that argument array or countable object has exact number of elements. + * + * @param integer $value array elements count + * + * @return Token\ArrayCountToken + */ + public static function size($value) + { + return new Token\ArrayCountToken($value); + } + + /** + * Checks that argument array contains (key, value) pair + * + * @param mixed $key exact value or token + * @param mixed $value exact value or token + * + * @return Token\ArrayEntryToken + */ + public static function withEntry($key, $value) + { + return new Token\ArrayEntryToken($key, $value); + } + + /** + * Checks that arguments array entries all match value + * + * @param mixed $value + * + * @return Token\ArrayEveryEntryToken + */ + public static function withEveryEntry($value) + { + return new Token\ArrayEveryEntryToken($value); + } + + /** + * Checks that argument array contains value + * + * @param mixed $value + * + * @return Token\ArrayEntryToken + */ + public static function containing($value) + { + return new Token\ArrayEntryToken(self::any(), $value); + } + + /** + * Checks that argument array has key + * + * @param mixed $key exact value or token + * + * @return Token\ArrayEntryToken + */ + public static function withKey($key) + { + return new Token\ArrayEntryToken($key, self::any()); + } + + /** + * Checks that argument does not match the value|token. + * + * @param mixed $value either exact value or argument token + * + * @return Token\LogicalNotToken + */ + public static function not($value) + { + return new Token\LogicalNotToken($value); + } + + /** + * @param string $value + * + * @return Token\StringContainsToken + */ + public static function containingString($value) + { + return new Token\StringContainsToken($value); + } + + /** + * Checks that argument is identical value. + * + * @param mixed $value + * + * @return Token\IdenticalValueToken + */ + public static function is($value) + { + return new Token\IdenticalValueToken($value); + } + + /** + * Check that argument is same value when rounding to the + * given precision. + * + * @param float $value + * @param float $precision + * + * @return Token\ApproximateValueToken + */ + public static function approximate($value, $precision = 0) + { + return new Token\ApproximateValueToken($value, $precision); + } +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Argument/ArgumentsWildcard.php b/vendor/phpspec/prophecy/src/Prophecy/Argument/ArgumentsWildcard.php new file mode 100644 index 0000000..a088f21 --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Argument/ArgumentsWildcard.php @@ -0,0 +1,101 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Argument; + +/** + * Arguments wildcarding. + * + * @author Konstantin Kudryashov + */ +class ArgumentsWildcard +{ + /** + * @var Token\TokenInterface[] + */ + private $tokens = array(); + private $string; + + /** + * Initializes wildcard. + * + * @param array $arguments Array of argument tokens or values + */ + public function __construct(array $arguments) + { + foreach ($arguments as $argument) { + if (!$argument instanceof Token\TokenInterface) { + $argument = new Token\ExactValueToken($argument); + } + + $this->tokens[] = $argument; + } + } + + /** + * Calculates wildcard match score for provided arguments. + * + * @param array $arguments + * + * @return false|int False OR integer score (higher - better) + */ + public function scoreArguments(array $arguments) + { + if (0 == count($arguments) && 0 == count($this->tokens)) { + return 1; + } + + $arguments = array_values($arguments); + $totalScore = 0; + foreach ($this->tokens as $i => $token) { + $argument = isset($arguments[$i]) ? $arguments[$i] : null; + if (1 >= $score = $token->scoreArgument($argument)) { + return false; + } + + $totalScore += $score; + + if (true === $token->isLast()) { + return $totalScore; + } + } + + if (count($arguments) > count($this->tokens)) { + return false; + } + + return $totalScore; + } + + /** + * Returns string representation for wildcard. + * + * @return string + */ + public function __toString() + { + if (null === $this->string) { + $this->string = implode(', ', array_map(function ($token) { + return (string) $token; + }, $this->tokens)); + } + + return $this->string; + } + + /** + * @return array + */ + public function getTokens() + { + return $this->tokens; + } +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/AnyValueToken.php b/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/AnyValueToken.php new file mode 100644 index 0000000..5098811 --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/AnyValueToken.php @@ -0,0 +1,52 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Argument\Token; + +/** + * Any single value token. + * + * @author Konstantin Kudryashov + */ +class AnyValueToken implements TokenInterface +{ + /** + * Always scores 3 for any argument. + * + * @param $argument + * + * @return int + */ + public function scoreArgument($argument) + { + return 3; + } + + /** + * Returns false. + * + * @return bool + */ + public function isLast() + { + return false; + } + + /** + * Returns string representation for token. + * + * @return string + */ + public function __toString() + { + return '*'; + } +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/AnyValuesToken.php b/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/AnyValuesToken.php new file mode 100644 index 0000000..f76b17b --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/AnyValuesToken.php @@ -0,0 +1,52 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Argument\Token; + +/** + * Any values token. + * + * @author Konstantin Kudryashov + */ +class AnyValuesToken implements TokenInterface +{ + /** + * Always scores 2 for any argument. + * + * @param $argument + * + * @return int + */ + public function scoreArgument($argument) + { + return 2; + } + + /** + * Returns true to stop wildcard from processing other tokens. + * + * @return bool + */ + public function isLast() + { + return true; + } + + /** + * Returns string representation for token. + * + * @return string + */ + public function __toString() + { + return '* [, ...]'; + } +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ApproximateValueToken.php b/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ApproximateValueToken.php new file mode 100644 index 0000000..d4918b1 --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ApproximateValueToken.php @@ -0,0 +1,55 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Argument\Token; + +/** + * Approximate value token + * + * @author Daniel Leech + */ +class ApproximateValueToken implements TokenInterface +{ + private $value; + private $precision; + + public function __construct($value, $precision = 0) + { + $this->value = $value; + $this->precision = $precision; + } + + /** + * {@inheritdoc} + */ + public function scoreArgument($argument) + { + return round($argument, $this->precision) === round($this->value, $this->precision) ? 10 : false; + } + + /** + * {@inheritdoc} + */ + public function isLast() + { + return false; + } + + /** + * Returns string representation for token. + * + * @return string + */ + public function __toString() + { + return sprintf('≅%s', round($this->value, $this->precision)); + } +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayCountToken.php b/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayCountToken.php new file mode 100644 index 0000000..96b4bef --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayCountToken.php @@ -0,0 +1,86 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Argument\Token; + +/** + * Array elements count token. + * + * @author Boris Mikhaylov + */ + +class ArrayCountToken implements TokenInterface +{ + private $count; + + /** + * @param integer $value + */ + public function __construct($value) + { + $this->count = $value; + } + + /** + * Scores 6 when argument has preset number of elements. + * + * @param $argument + * + * @return bool|int + */ + public function scoreArgument($argument) + { + return $this->isCountable($argument) && $this->hasProperCount($argument) ? 6 : false; + } + + /** + * Returns false. + * + * @return boolean + */ + public function isLast() + { + return false; + } + + /** + * Returns string representation for token. + * + * @return string + */ + public function __toString() + { + return sprintf('count(%s)', $this->count); + } + + /** + * Returns true if object is either array or instance of \Countable + * + * @param $argument + * @return bool + */ + private function isCountable($argument) + { + return (is_array($argument) || $argument instanceof \Countable); + } + + /** + * Returns true if $argument has expected number of elements + * + * @param array|\Countable $argument + * + * @return bool + */ + private function hasProperCount($argument) + { + return $this->count === count($argument); + } +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayEntryToken.php b/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayEntryToken.php new file mode 100644 index 0000000..0305fc7 --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayEntryToken.php @@ -0,0 +1,143 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Argument\Token; + +use Prophecy\Exception\InvalidArgumentException; + +/** + * Array entry token. + * + * @author Boris Mikhaylov + */ +class ArrayEntryToken implements TokenInterface +{ + /** @var \Prophecy\Argument\Token\TokenInterface */ + private $key; + /** @var \Prophecy\Argument\Token\TokenInterface */ + private $value; + + /** + * @param mixed $key exact value or token + * @param mixed $value exact value or token + */ + public function __construct($key, $value) + { + $this->key = $this->wrapIntoExactValueToken($key); + $this->value = $this->wrapIntoExactValueToken($value); + } + + /** + * Scores half of combined scores from key and value tokens for same entry. Capped at 8. + * If argument implements \ArrayAccess without \Traversable, then key token is restricted to ExactValueToken. + * + * @param array|\ArrayAccess|\Traversable $argument + * + * @throws \Prophecy\Exception\InvalidArgumentException + * @return bool|int + */ + public function scoreArgument($argument) + { + if ($argument instanceof \Traversable) { + $argument = iterator_to_array($argument); + } + + if ($argument instanceof \ArrayAccess) { + $argument = $this->convertArrayAccessToEntry($argument); + } + + if (!is_array($argument) || empty($argument)) { + return false; + } + + $keyScores = array_map(array($this->key,'scoreArgument'), array_keys($argument)); + $valueScores = array_map(array($this->value,'scoreArgument'), $argument); + $scoreEntry = function ($value, $key) { + return $value && $key ? min(8, ($key + $value) / 2) : false; + }; + + return max(array_map($scoreEntry, $valueScores, $keyScores)); + } + + /** + * Returns false. + * + * @return boolean + */ + public function isLast() + { + return false; + } + + /** + * Returns string representation for token. + * + * @return string + */ + public function __toString() + { + return sprintf('[..., %s => %s, ...]', $this->key, $this->value); + } + + /** + * Returns key + * + * @return TokenInterface + */ + public function getKey() + { + return $this->key; + } + + /** + * Returns value + * + * @return TokenInterface + */ + public function getValue() + { + return $this->value; + } + + /** + * Wraps non token $value into ExactValueToken + * + * @param $value + * @return TokenInterface + */ + private function wrapIntoExactValueToken($value) + { + return $value instanceof TokenInterface ? $value : new ExactValueToken($value); + } + + /** + * Converts instance of \ArrayAccess to key => value array entry + * + * @param \ArrayAccess $object + * + * @return array|null + * @throws \Prophecy\Exception\InvalidArgumentException + */ + private function convertArrayAccessToEntry(\ArrayAccess $object) + { + if (!$this->key instanceof ExactValueToken) { + throw new InvalidArgumentException(sprintf( + 'You can only use exact value tokens to match key of ArrayAccess object'.PHP_EOL. + 'But you used `%s`.', + $this->key + )); + } + + $key = $this->key->getValue(); + + return $object->offsetExists($key) ? array($key => $object[$key]) : array(); + } +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayEveryEntryToken.php b/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayEveryEntryToken.php new file mode 100644 index 0000000..5d41fa4 --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayEveryEntryToken.php @@ -0,0 +1,82 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Argument\Token; + +/** + * Array every entry token. + * + * @author Adrien Brault + */ +class ArrayEveryEntryToken implements TokenInterface +{ + /** + * @var TokenInterface + */ + private $value; + + /** + * @param mixed $value exact value or token + */ + public function __construct($value) + { + if (!$value instanceof TokenInterface) { + $value = new ExactValueToken($value); + } + + $this->value = $value; + } + + /** + * {@inheritdoc} + */ + public function scoreArgument($argument) + { + if (!$argument instanceof \Traversable && !is_array($argument)) { + return false; + } + + $scores = array(); + foreach ($argument as $key => $argumentEntry) { + $scores[] = $this->value->scoreArgument($argumentEntry); + } + + if (empty($scores) || in_array(false, $scores, true)) { + return false; + } + + return array_sum($scores) / count($scores); + } + + /** + * {@inheritdoc} + */ + public function isLast() + { + return false; + } + + /** + * {@inheritdoc} + */ + public function __toString() + { + return sprintf('[%s, ..., %s]', $this->value, $this->value); + } + + /** + * @return TokenInterface + */ + public function getValue() + { + return $this->value; + } +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/CallbackToken.php b/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/CallbackToken.php new file mode 100644 index 0000000..f45ba20 --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/CallbackToken.php @@ -0,0 +1,75 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Argument\Token; + +use Prophecy\Exception\InvalidArgumentException; + +/** + * Callback-verified token. + * + * @author Konstantin Kudryashov + */ +class CallbackToken implements TokenInterface +{ + private $callback; + + /** + * Initializes token. + * + * @param callable $callback + * + * @throws \Prophecy\Exception\InvalidArgumentException + */ + public function __construct($callback) + { + if (!is_callable($callback)) { + throw new InvalidArgumentException(sprintf( + 'Callable expected as an argument to CallbackToken, but got %s.', + gettype($callback) + )); + } + + $this->callback = $callback; + } + + /** + * Scores 7 if callback returns true, false otherwise. + * + * @param $argument + * + * @return bool|int + */ + public function scoreArgument($argument) + { + return call_user_func($this->callback, $argument) ? 7 : false; + } + + /** + * Returns false. + * + * @return bool + */ + public function isLast() + { + return false; + } + + /** + * Returns string representation for token. + * + * @return string + */ + public function __toString() + { + return 'callback()'; + } +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ExactValueToken.php b/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ExactValueToken.php new file mode 100644 index 0000000..aa960f3 --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ExactValueToken.php @@ -0,0 +1,116 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Argument\Token; + +use SebastianBergmann\Comparator\ComparisonFailure; +use Prophecy\Comparator\Factory as ComparatorFactory; +use Prophecy\Util\StringUtil; + +/** + * Exact value token. + * + * @author Konstantin Kudryashov + */ +class ExactValueToken implements TokenInterface +{ + private $value; + private $string; + private $util; + private $comparatorFactory; + + /** + * Initializes token. + * + * @param mixed $value + * @param StringUtil $util + * @param ComparatorFactory $comparatorFactory + */ + public function __construct($value, StringUtil $util = null, ComparatorFactory $comparatorFactory = null) + { + $this->value = $value; + $this->util = $util ?: new StringUtil(); + + $this->comparatorFactory = $comparatorFactory ?: ComparatorFactory::getInstance(); + } + + /** + * Scores 10 if argument matches preset value. + * + * @param $argument + * + * @return bool|int + */ + public function scoreArgument($argument) + { + if (is_object($argument) && is_object($this->value)) { + $comparator = $this->comparatorFactory->getComparatorFor( + $argument, $this->value + ); + + try { + $comparator->assertEquals($argument, $this->value); + return 10; + } catch (ComparisonFailure $failure) {} + } + + // If either one is an object it should be castable to a string + if (is_object($argument) xor is_object($this->value)) { + if (is_object($argument) && !method_exists($argument, '__toString')) { + return false; + } + + if (is_object($this->value) && !method_exists($this->value, '__toString')) { + return false; + } + } elseif (is_numeric($argument) && is_numeric($this->value)) { + // noop + } elseif (gettype($argument) !== gettype($this->value)) { + return false; + } + + return $argument == $this->value ? 10 : false; + } + + /** + * Returns preset value against which token checks arguments. + * + * @return mixed + */ + public function getValue() + { + return $this->value; + } + + /** + * Returns false. + * + * @return bool + */ + public function isLast() + { + return false; + } + + /** + * Returns string representation for token. + * + * @return string + */ + public function __toString() + { + if (null === $this->string) { + $this->string = sprintf('exact(%s)', $this->util->stringify($this->value)); + } + + return $this->string; + } +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/IdenticalValueToken.php b/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/IdenticalValueToken.php new file mode 100644 index 0000000..0b6d23a --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/IdenticalValueToken.php @@ -0,0 +1,74 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Argument\Token; + +use Prophecy\Util\StringUtil; + +/** + * Identical value token. + * + * @author Florian Voutzinos + */ +class IdenticalValueToken implements TokenInterface +{ + private $value; + private $string; + private $util; + + /** + * Initializes token. + * + * @param mixed $value + * @param StringUtil $util + */ + public function __construct($value, StringUtil $util = null) + { + $this->value = $value; + $this->util = $util ?: new StringUtil(); + } + + /** + * Scores 11 if argument matches preset value. + * + * @param $argument + * + * @return bool|int + */ + public function scoreArgument($argument) + { + return $argument === $this->value ? 11 : false; + } + + /** + * Returns false. + * + * @return bool + */ + public function isLast() + { + return false; + } + + /** + * Returns string representation for token. + * + * @return string + */ + public function __toString() + { + if (null === $this->string) { + $this->string = sprintf('identical(%s)', $this->util->stringify($this->value)); + } + + return $this->string; + } +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/LogicalAndToken.php b/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/LogicalAndToken.php new file mode 100644 index 0000000..4ee1b25 --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/LogicalAndToken.php @@ -0,0 +1,80 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Argument\Token; + +/** + * Logical AND token. + * + * @author Boris Mikhaylov + */ +class LogicalAndToken implements TokenInterface +{ + private $tokens = array(); + + /** + * @param array $arguments exact values or tokens + */ + public function __construct(array $arguments) + { + foreach ($arguments as $argument) { + if (!$argument instanceof TokenInterface) { + $argument = new ExactValueToken($argument); + } + $this->tokens[] = $argument; + } + } + + /** + * Scores maximum score from scores returned by tokens for this argument if all of them score. + * + * @param $argument + * + * @return bool|int + */ + public function scoreArgument($argument) + { + if (0 === count($this->tokens)) { + return false; + } + + $maxScore = 0; + foreach ($this->tokens as $token) { + $score = $token->scoreArgument($argument); + if (false === $score) { + return false; + } + $maxScore = max($score, $maxScore); + } + + return $maxScore; + } + + /** + * Returns false. + * + * @return boolean + */ + public function isLast() + { + return false; + } + + /** + * Returns string representation for token. + * + * @return string + */ + public function __toString() + { + return sprintf('bool(%s)', implode(' AND ', $this->tokens)); + } +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/LogicalNotToken.php b/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/LogicalNotToken.php new file mode 100644 index 0000000..623efa5 --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/LogicalNotToken.php @@ -0,0 +1,73 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Argument\Token; + +/** + * Logical NOT token. + * + * @author Boris Mikhaylov + */ +class LogicalNotToken implements TokenInterface +{ + /** @var \Prophecy\Argument\Token\TokenInterface */ + private $token; + + /** + * @param mixed $value exact value or token + */ + public function __construct($value) + { + $this->token = $value instanceof TokenInterface? $value : new ExactValueToken($value); + } + + /** + * Scores 4 when preset token does not match the argument. + * + * @param $argument + * + * @return bool|int + */ + public function scoreArgument($argument) + { + return false === $this->token->scoreArgument($argument) ? 4 : false; + } + + /** + * Returns true if preset token is last. + * + * @return bool|int + */ + public function isLast() + { + return $this->token->isLast(); + } + + /** + * Returns originating token. + * + * @return TokenInterface + */ + public function getOriginatingToken() + { + return $this->token; + } + + /** + * Returns string representation for token. + * + * @return string + */ + public function __toString() + { + return sprintf('not(%s)', $this->token); + } +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ObjectStateToken.php b/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ObjectStateToken.php new file mode 100644 index 0000000..d771077 --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ObjectStateToken.php @@ -0,0 +1,104 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Argument\Token; + +use SebastianBergmann\Comparator\ComparisonFailure; +use Prophecy\Comparator\Factory as ComparatorFactory; +use Prophecy\Util\StringUtil; + +/** + * Object state-checker token. + * + * @author Konstantin Kudryashov + */ +class ObjectStateToken implements TokenInterface +{ + private $name; + private $value; + private $util; + private $comparatorFactory; + + /** + * Initializes token. + * + * @param string $methodName + * @param mixed $value Expected return value + * @param null|StringUtil $util + * @param ComparatorFactory $comparatorFactory + */ + public function __construct( + $methodName, + $value, + StringUtil $util = null, + ComparatorFactory $comparatorFactory = null + ) { + $this->name = $methodName; + $this->value = $value; + $this->util = $util ?: new StringUtil; + + $this->comparatorFactory = $comparatorFactory ?: ComparatorFactory::getInstance(); + } + + /** + * Scores 8 if argument is an object, which method returns expected value. + * + * @param mixed $argument + * + * @return bool|int + */ + public function scoreArgument($argument) + { + if (is_object($argument) && method_exists($argument, $this->name)) { + $actual = call_user_func(array($argument, $this->name)); + + $comparator = $this->comparatorFactory->getComparatorFor( + $this->value, $actual + ); + + try { + $comparator->assertEquals($this->value, $actual); + return 8; + } catch (ComparisonFailure $failure) { + return false; + } + } + + if (is_object($argument) && property_exists($argument, $this->name)) { + return $argument->{$this->name} === $this->value ? 8 : false; + } + + return false; + } + + /** + * Returns false. + * + * @return bool + */ + public function isLast() + { + return false; + } + + /** + * Returns string representation for token. + * + * @return string + */ + public function __toString() + { + return sprintf('state(%s(), %s)', + $this->name, + $this->util->stringify($this->value) + ); + } +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/StringContainsToken.php b/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/StringContainsToken.php new file mode 100644 index 0000000..24ff8c2 --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/StringContainsToken.php @@ -0,0 +1,67 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Argument\Token; + +/** + * String contains token. + * + * @author Peter Mitchell + */ +class StringContainsToken implements TokenInterface +{ + private $value; + + /** + * Initializes token. + * + * @param string $value + */ + public function __construct($value) + { + $this->value = $value; + } + + public function scoreArgument($argument) + { + return strpos($argument, $this->value) !== false ? 6 : false; + } + + /** + * Returns preset value against which token checks arguments. + * + * @return mixed + */ + public function getValue() + { + return $this->value; + } + + /** + * Returns false. + * + * @return bool + */ + public function isLast() + { + return false; + } + + /** + * Returns string representation for token. + * + * @return string + */ + public function __toString() + { + return sprintf('contains("%s")', $this->value); + } +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/TokenInterface.php b/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/TokenInterface.php new file mode 100644 index 0000000..625d3ba --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/TokenInterface.php @@ -0,0 +1,43 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Argument\Token; + +/** + * Argument token interface. + * + * @author Konstantin Kudryashov + */ +interface TokenInterface +{ + /** + * Calculates token match score for provided argument. + * + * @param $argument + * + * @return bool|int + */ + public function scoreArgument($argument); + + /** + * Returns true if this token prevents check of other tokens (is last one). + * + * @return bool|int + */ + public function isLast(); + + /** + * Returns string representation for token. + * + * @return string + */ + public function __toString(); +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/TypeToken.php b/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/TypeToken.php new file mode 100644 index 0000000..cb65132 --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/TypeToken.php @@ -0,0 +1,76 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Argument\Token; + +use Prophecy\Exception\InvalidArgumentException; + +/** + * Value type token. + * + * @author Konstantin Kudryashov + */ +class TypeToken implements TokenInterface +{ + private $type; + + /** + * @param string $type + */ + public function __construct($type) + { + $checker = "is_{$type}"; + if (!function_exists($checker) && !interface_exists($type) && !class_exists($type)) { + throw new InvalidArgumentException(sprintf( + 'Type or class name expected as an argument to TypeToken, but got %s.', $type + )); + } + + $this->type = $type; + } + + /** + * Scores 5 if argument has the same type this token was constructed with. + * + * @param $argument + * + * @return bool|int + */ + public function scoreArgument($argument) + { + $checker = "is_{$this->type}"; + if (function_exists($checker)) { + return call_user_func($checker, $argument) ? 5 : false; + } + + return $argument instanceof $this->type ? 5 : false; + } + + /** + * Returns false. + * + * @return bool + */ + public function isLast() + { + return false; + } + + /** + * Returns string representation for token. + * + * @return string + */ + public function __toString() + { + return sprintf('type(%s)', $this->type); + } +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Call/Call.php b/vendor/phpspec/prophecy/src/Prophecy/Call/Call.php new file mode 100644 index 0000000..2f3fbad --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Call/Call.php @@ -0,0 +1,127 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Call; + +use Exception; + +/** + * Call object. + * + * @author Konstantin Kudryashov + */ +class Call +{ + private $methodName; + private $arguments; + private $returnValue; + private $exception; + private $file; + private $line; + + /** + * Initializes call. + * + * @param string $methodName + * @param array $arguments + * @param mixed $returnValue + * @param Exception $exception + * @param null|string $file + * @param null|int $line + */ + public function __construct($methodName, array $arguments, $returnValue, + Exception $exception = null, $file, $line) + { + $this->methodName = $methodName; + $this->arguments = $arguments; + $this->returnValue = $returnValue; + $this->exception = $exception; + + if ($file) { + $this->file = $file; + $this->line = intval($line); + } + } + + /** + * Returns called method name. + * + * @return string + */ + public function getMethodName() + { + return $this->methodName; + } + + /** + * Returns called method arguments. + * + * @return array + */ + public function getArguments() + { + return $this->arguments; + } + + /** + * Returns called method return value. + * + * @return null|mixed + */ + public function getReturnValue() + { + return $this->returnValue; + } + + /** + * Returns exception that call thrown. + * + * @return null|Exception + */ + public function getException() + { + return $this->exception; + } + + /** + * Returns callee filename. + * + * @return string + */ + public function getFile() + { + return $this->file; + } + + /** + * Returns callee line number. + * + * @return int + */ + public function getLine() + { + return $this->line; + } + + /** + * Returns short notation for callee place. + * + * @return string + */ + public function getCallPlace() + { + if (null === $this->file) { + return 'unknown'; + } + + return sprintf('%s:%d', $this->file, $this->line); + } +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Call/CallCenter.php b/vendor/phpspec/prophecy/src/Prophecy/Call/CallCenter.php new file mode 100644 index 0000000..53b80f0 --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Call/CallCenter.php @@ -0,0 +1,171 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +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; + +/** + * Calls receiver & manager. + * + * @author Konstantin Kudryashov + */ +class CallCenter +{ + private $util; + + /** + * @var Call[] + */ + private $recordedCalls = array(); + + /** + * Initializes call center. + * + * @param StringUtil $util + */ + public function __construct(StringUtil $util = null) + { + $this->util = $util ?: new StringUtil; + } + + /** + * Makes and records specific method call for object prophecy. + * + * @param ObjectProphecy $prophecy + * @param string $methodName + * @param array $arguments + * + * @return mixed Returns null if no promise for prophecy found or promise return value. + * + * @throws \Prophecy\Exception\Call\UnexpectedCallException If no appropriate method prophecy found + */ + public function makeCall(ObjectProphecy $prophecy, $methodName, array $arguments) + { + // For efficiency exclude 'args' from the generated backtrace + if (PHP_VERSION_ID >= 50400) { + // Limit backtrace to last 3 calls as we don't use the rest + // Limit argument was introduced in PHP 5.4.0 + $backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 3); + } elseif (defined('DEBUG_BACKTRACE_IGNORE_ARGS')) { + // DEBUG_BACKTRACE_IGNORE_ARGS was introduced in PHP 5.3.6 + $backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); + } else { + $backtrace = debug_backtrace(); + } + + $file = $line = null; + if (isset($backtrace[2]) && isset($backtrace[2]['file'])) { + $file = $backtrace[2]['file']; + $line = $backtrace[2]['line']; + } + + // If no method prophecies defined, then it's a dummy, so we'll just return null + if ('__destruct' === $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); + } + } + + // If fake/stub doesn't have method prophecy for this call - throw exception + if (!count($matches)) { + throw $this->createUnexpectedCallException($prophecy, $methodName, $arguments); + } + + // Sort matches by their score value + @usort($matches, function ($match1, $match2) { return $match2[0] - $match1[0]; }); + + // If Highest rated method prophecy has a promise - execute it or return null instead + $methodProphecy = $matches[0][1]; + $returnValue = null; + $exception = null; + if ($promise = $methodProphecy->getPromise()) { + try { + $returnValue = $promise->execute($arguments, $prophecy, $methodProphecy); + } catch (\Exception $e) { + $exception = $e; + } + } + + if ($methodProphecy->hasReturnVoid() && $returnValue !== null) { + throw new MethodProphecyException( + "The method \"$methodName\" has a void return type, but the promise returned a value", + $methodProphecy + ); + } + + $this->recordedCalls[] = new Call( + $methodName, $arguments, $returnValue, $exception, $file, $line + ); + + if (null !== $exception) { + throw $exception; + } + + return $returnValue; + } + + /** + * Searches for calls by method name & arguments wildcard. + * + * @param string $methodName + * @param ArgumentsWildcard $wildcard + * + * @return Call[] + */ + public function findCalls($methodName, ArgumentsWildcard $wildcard) + { + return array_values( + array_filter($this->recordedCalls, function (Call $call) use ($methodName, $wildcard) { + return $methodName === $call->getMethodName() + && 0 < $wildcard->scoreArguments($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)', + $methodProphecy->getMethodName(), + $methodProphecy->getArgumentsWildcard() + ); + }, 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", + + $methodName, $argstring, $classname, $expected + ), + $prophecy, $methodName, $arguments + ); + } +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Comparator/ClosureComparator.php b/vendor/phpspec/prophecy/src/Prophecy/Comparator/ClosureComparator.php new file mode 100644 index 0000000..874e474 --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Comparator/ClosureComparator.php @@ -0,0 +1,42 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Comparator; + +use SebastianBergmann\Comparator\Comparator; +use SebastianBergmann\Comparator\ComparisonFailure; + +/** + * Closure comparator. + * + * @author Konstantin Kudryashov + */ +final class ClosureComparator extends Comparator +{ + public function accepts($expected, $actual) + { + return is_object($expected) && $expected instanceof \Closure + && is_object($actual) && $actual instanceof \Closure; + } + + public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false) + { + throw new ComparisonFailure( + $expected, + $actual, + // we don't need a diff + '', + '', + false, + 'all closures are born different' + ); + } +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Comparator/Factory.php b/vendor/phpspec/prophecy/src/Prophecy/Comparator/Factory.php new file mode 100644 index 0000000..2070db1 --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Comparator/Factory.php @@ -0,0 +1,47 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Comparator; + +use SebastianBergmann\Comparator\Factory as BaseFactory; + +/** + * Prophecy comparator factory. + * + * @author Konstantin Kudryashov + */ +final class Factory extends BaseFactory +{ + /** + * @var Factory + */ + private static $instance; + + public function __construct() + { + parent::__construct(); + + $this->register(new ClosureComparator()); + $this->register(new ProphecyComparator()); + } + + /** + * @return Factory + */ + public static function getInstance() + { + if (self::$instance === null) { + self::$instance = new Factory; + } + + return self::$instance; + } +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Comparator/ProphecyComparator.php b/vendor/phpspec/prophecy/src/Prophecy/Comparator/ProphecyComparator.php new file mode 100644 index 0000000..298a8e3 --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Comparator/ProphecyComparator.php @@ -0,0 +1,28 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Comparator; + +use Prophecy\Prophecy\ProphecyInterface; +use SebastianBergmann\Comparator\ObjectComparator; + +class ProphecyComparator extends ObjectComparator +{ + public function accepts($expected, $actual) + { + return is_object($expected) && is_object($actual) && $actual instanceof ProphecyInterface; + } + + public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false, array &$processed = array()) + { + parent::assertEquals($expected, $actual->reveal(), $delta, $canonicalize, $ignoreCase, $processed); + } +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Doubler/CachedDoubler.php b/vendor/phpspec/prophecy/src/Prophecy/Doubler/CachedDoubler.php new file mode 100644 index 0000000..d6b6b1a --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Doubler/CachedDoubler.php @@ -0,0 +1,68 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Doubler; + +use ReflectionClass; + +/** + * Cached class doubler. + * Prevents mirroring/creation of the same structure twice. + * + * @author Konstantin Kudryashov + */ +class CachedDoubler extends Doubler +{ + private $classes = array(); + + /** + * {@inheritdoc} + */ + public function registerClassPatch(ClassPatch\ClassPatchInterface $patch) + { + $this->classes[] = array(); + + parent::registerClassPatch($patch); + } + + /** + * {@inheritdoc} + */ + protected function createDoubleClass(ReflectionClass $class = null, array $interfaces) + { + $classId = $this->generateClassId($class, $interfaces); + if (isset($this->classes[$classId])) { + return $this->classes[$classId]; + } + + return $this->classes[$classId] = parent::createDoubleClass($class, $interfaces); + } + + /** + * @param ReflectionClass $class + * @param ReflectionClass[] $interfaces + * + * @return string + */ + private function generateClassId(ReflectionClass $class = null, array $interfaces) + { + $parts = array(); + if (null !== $class) { + $parts[] = $class->getName(); + } + foreach ($interfaces as $interface) { + $parts[] = $interface->getName(); + } + sort($parts); + + return md5(implode('', $parts)); + } +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ClassPatchInterface.php b/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ClassPatchInterface.php new file mode 100644 index 0000000..d6d1968 --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ClassPatchInterface.php @@ -0,0 +1,48 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Doubler\ClassPatch; + +use Prophecy\Doubler\Generator\Node\ClassNode; + +/** + * Class patch interface. + * Class patches extend doubles functionality or help + * Prophecy to avoid some internal PHP bugs. + * + * @author Konstantin Kudryashov + */ +interface ClassPatchInterface +{ + /** + * Checks if patch supports specific class node. + * + * @param ClassNode $node + * + * @return bool + */ + public function supports(ClassNode $node); + + /** + * Applies patch to the specific class node. + * + * @param ClassNode $node + * @return void + */ + public function apply(ClassNode $node); + + /** + * Returns patch priority, which determines when patch will be applied. + * + * @return int Priority number (higher - earlier) + */ + public function getPriority(); +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/DisableConstructorPatch.php b/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/DisableConstructorPatch.php new file mode 100644 index 0000000..61998fc --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/DisableConstructorPatch.php @@ -0,0 +1,72 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Doubler\ClassPatch; + +use Prophecy\Doubler\Generator\Node\ClassNode; +use Prophecy\Doubler\Generator\Node\MethodNode; + +/** + * Disable constructor. + * Makes all constructor arguments optional. + * + * @author Konstantin Kudryashov + */ +class DisableConstructorPatch implements ClassPatchInterface +{ + /** + * Checks if class has `__construct` method. + * + * @param ClassNode $node + * + * @return bool + */ + public function supports(ClassNode $node) + { + return true; + } + + /** + * Makes all class constructor arguments optional. + * + * @param ClassNode $node + */ + public function apply(ClassNode $node) + { + if (!$node->hasMethod('__construct')) { + $node->addMethod(new MethodNode('__construct', '')); + + return; + } + + $constructor = $node->getMethod('__construct'); + foreach ($constructor->getArguments() as $argument) { + $argument->setDefault(null); + } + + $constructor->setCode(<< + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Doubler\ClassPatch; + +use Prophecy\Doubler\Generator\Node\ClassNode; + +/** + * Exception patch for HHVM to remove the stubs from special methods + * + * @author Christophe Coevoet + */ +class HhvmExceptionPatch implements ClassPatchInterface +{ + /** + * Supports exceptions on HHVM. + * + * @param ClassNode $node + * + * @return bool + */ + public function supports(ClassNode $node) + { + if (!defined('HHVM_VERSION')) { + return false; + } + + return 'Exception' === $node->getParentClass() || is_subclass_of($node->getParentClass(), 'Exception'); + } + + /** + * Removes special exception static methods from the doubled methods. + * + * @param ClassNode $node + * + * @return void + */ + public function apply(ClassNode $node) + { + if ($node->hasMethod('setTraceOptions')) { + $node->getMethod('setTraceOptions')->useParentCode(); + } + if ($node->hasMethod('getTraceOptions')) { + $node->getMethod('getTraceOptions')->useParentCode(); + } + } + + /** + * {@inheritdoc} + */ + public function getPriority() + { + return -50; + } +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/KeywordPatch.php b/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/KeywordPatch.php new file mode 100644 index 0000000..b0d9793 --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/KeywordPatch.php @@ -0,0 +1,135 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Doubler\ClassPatch; + +use Prophecy\Doubler\Generator\Node\ClassNode; + +/** + * Remove method functionality from the double which will clash with php keywords. + * + * @author Milan Magudia + */ +class KeywordPatch implements ClassPatchInterface +{ + /** + * Support any class + * + * @param ClassNode $node + * + * @return boolean + */ + public function supports(ClassNode $node) + { + return true; + } + + /** + * Remove methods that clash with php keywords + * + * @param ClassNode $node + */ + public function apply(ClassNode $node) + { + $methodNames = array_keys($node->getMethods()); + $methodsToRemove = array_intersect($methodNames, $this->getKeywords()); + foreach ($methodsToRemove as $methodName) { + $node->removeMethod($methodName); + } + } + + /** + * Returns patch priority, which determines when patch will be applied. + * + * @return int Priority number (higher - earlier) + */ + public function getPriority() { + return 49; + } + + /** + * Returns array of php keywords. + * + * @return array + */ + private function getKeywords() { + + return array( + '__halt_compiler', + 'abstract', + 'and', + 'array', + 'as', + 'break', + 'callable', + 'case', + 'catch', + 'class', + 'clone', + 'const', + 'continue', + 'declare', + 'default', + 'die', + 'do', + 'echo', + 'else', + 'elseif', + 'empty', + 'enddeclare', + 'endfor', + 'endforeach', + 'endif', + 'endswitch', + 'endwhile', + 'eval', + 'exit', + 'extends', + 'final', + 'finally', + 'for', + 'foreach', + 'function', + 'global', + 'goto', + 'if', + 'implements', + 'include', + 'include_once', + 'instanceof', + 'insteadof', + 'interface', + 'isset', + 'list', + 'namespace', + 'new', + 'or', + 'print', + 'private', + 'protected', + 'public', + 'require', + 'require_once', + 'return', + 'static', + 'switch', + 'throw', + 'trait', + 'try', + 'unset', + 'use', + 'var', + 'while', + 'xor', + 'yield', + ); + } +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/MagicCallPatch.php b/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/MagicCallPatch.php new file mode 100644 index 0000000..5f2c607 --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/MagicCallPatch.php @@ -0,0 +1,89 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Doubler\ClassPatch; + +use Prophecy\Doubler\Generator\Node\ClassNode; +use Prophecy\Doubler\Generator\Node\MethodNode; +use Prophecy\PhpDocumentor\ClassAndInterfaceTagRetriever; +use Prophecy\PhpDocumentor\MethodTagRetrieverInterface; + +/** + * Discover Magical API using "@method" PHPDoc format. + * + * @author Thomas Tourlourat + * @author Kévin Dunglas + * @author Théo FIDRY + */ +class MagicCallPatch implements ClassPatchInterface +{ + private $tagRetriever; + + public function __construct(MethodTagRetrieverInterface $tagRetriever = null) + { + $this->tagRetriever = null === $tagRetriever ? new ClassAndInterfaceTagRetriever() : $tagRetriever; + } + + /** + * Support any class + * + * @param ClassNode $node + * + * @return boolean + */ + public function supports(ClassNode $node) + { + return true; + } + + /** + * Discover Magical API + * + * @param ClassNode $node + */ + public function apply(ClassNode $node) + { + $types = array_filter($node->getInterfaces(), function ($interface) { + return 0 !== strpos($interface, 'Prophecy\\'); + }); + $types[] = $node->getParentClass(); + + foreach ($types as $type) { + $reflectionClass = new \ReflectionClass($type); + $tagList = $this->tagRetriever->getTagList($reflectionClass); + + 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); + } + } + } + } + + /** + * Returns patch priority, which determines when patch will be applied. + * + * @return integer Priority number (higher - earlier) + */ + public function getPriority() + { + return 50; + } +} + diff --git a/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ProphecySubjectPatch.php b/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ProphecySubjectPatch.php new file mode 100644 index 0000000..fc2cc4d --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ProphecySubjectPatch.php @@ -0,0 +1,104 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Doubler\ClassPatch; + +use Prophecy\Doubler\Generator\Node\ClassNode; +use Prophecy\Doubler\Generator\Node\MethodNode; +use Prophecy\Doubler\Generator\Node\ArgumentNode; + +/** + * Add Prophecy functionality to the double. + * This is a core class patch for Prophecy. + * + * @author Konstantin Kudryashov + */ +class ProphecySubjectPatch implements ClassPatchInterface +{ + /** + * Always returns true. + * + * @param ClassNode $node + * + * @return bool + */ + public function supports(ClassNode $node) + { + return true; + } + + /** + * Apply Prophecy functionality to class node. + * + * @param ClassNode $node + */ + public function apply(ClassNode $node) + { + $node->addInterface('Prophecy\Prophecy\ProphecySubjectInterface'); + $node->addProperty('objectProphecy', 'private'); + + foreach ($node->getMethods() as $name => $method) { + if ('__construct' === strtolower($name)) { + continue; + } + + if ($method->getReturnType() === 'void') { + $method->setCode( + '$this->getProphecy()->makeProphecyMethodCall(__FUNCTION__, func_get_args());' + ); + } else { + $method->setCode( + 'return $this->getProphecy()->makeProphecyMethodCall(__FUNCTION__, func_get_args());' + ); + } + } + + $prophecySetter = new MethodNode('setProphecy'); + $prophecyArgument = new ArgumentNode('prophecy'); + $prophecyArgument->setTypeHint('Prophecy\Prophecy\ProphecyInterface'); + $prophecySetter->addArgument($prophecyArgument); + $prophecySetter->setCode('$this->objectProphecy = $prophecy;'); + + $prophecyGetter = new MethodNode('getProphecy'); + $prophecyGetter->setCode('return $this->objectProphecy;'); + + if ($node->hasMethod('__call')) { + $__call = $node->getMethod('__call'); + } else { + $__call = new MethodNode('__call'); + $__call->addArgument(new ArgumentNode('name')); + $__call->addArgument(new ArgumentNode('arguments')); + + $node->addMethod($__call); + } + + $__call->setCode(<<getProphecy(), func_get_arg(0) +); +PHP + ); + + $node->addMethod($prophecySetter); + $node->addMethod($prophecyGetter); + } + + /** + * Returns patch priority, which determines when patch will be applied. + * + * @return int Priority number (higher - earlier) + */ + public function getPriority() + { + return 0; + } +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ReflectionClassNewInstancePatch.php b/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ReflectionClassNewInstancePatch.php new file mode 100644 index 0000000..9166aee --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ReflectionClassNewInstancePatch.php @@ -0,0 +1,57 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Doubler\ClassPatch; + +use Prophecy\Doubler\Generator\Node\ClassNode; + +/** + * ReflectionClass::newInstance patch. + * Makes first argument of newInstance optional, since it works but signature is misleading + * + * @author Florian Klein + */ +class ReflectionClassNewInstancePatch implements ClassPatchInterface +{ + /** + * Supports ReflectionClass + * + * @param ClassNode $node + * + * @return bool + */ + public function supports(ClassNode $node) + { + return 'ReflectionClass' === $node->getParentClass(); + } + + /** + * Updates newInstance's first argument to make it optional + * + * @param ClassNode $node + */ + public function apply(ClassNode $node) + { + foreach ($node->getMethod('newInstance')->getArguments() as $argument) { + $argument->setDefault(null); + } + } + + /** + * Returns patch priority, which determines when patch will be applied. + * + * @return int Priority number (higher = earlier) + */ + public function getPriority() + { + return 50; + } +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/SplFileInfoPatch.php b/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/SplFileInfoPatch.php new file mode 100644 index 0000000..eba8298 --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/SplFileInfoPatch.php @@ -0,0 +1,105 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Doubler\ClassPatch; + +use Prophecy\Doubler\Generator\Node\ClassNode; +use Prophecy\Doubler\Generator\Node\MethodNode; + +/** + * SplFileInfo patch. + * Makes SplFileInfo and derivative classes usable with Prophecy. + * + * @author Konstantin Kudryashov + */ +class SplFileInfoPatch implements ClassPatchInterface +{ + /** + * Supports everything that extends SplFileInfo. + * + * @param ClassNode $node + * + * @return bool + */ + public function supports(ClassNode $node) + { + if (null === $node->getParentClass()) { + return false; + } + + return 'SplFileInfo' === $node->getParentClass() + || is_subclass_of($node->getParentClass(), 'SplFileInfo') + ; + } + + /** + * Updated constructor code to call parent one with dummy file argument. + * + * @param ClassNode $node + */ + public function apply(ClassNode $node) + { + if ($node->hasMethod('__construct')) { + $constructor = $node->getMethod('__construct'); + } else { + $constructor = new MethodNode('__construct'); + $node->addMethod($constructor); + } + + if ($this->nodeIsDirectoryIterator($node)) { + $constructor->setCode('return parent::__construct("' . __DIR__ . '");'); + + return; + } + + if ($this->nodeIsSplFileObject($node)) { + $constructor->setCode('return parent::__construct("' . __FILE__ .'");'); + + return; + } + + $constructor->useParentCode(); + } + + /** + * Returns patch priority, which determines when patch will be applied. + * + * @return int Priority number (higher - earlier) + */ + public function getPriority() + { + return 50; + } + + /** + * @param ClassNode $node + * @return boolean + */ + private function nodeIsDirectoryIterator(ClassNode $node) + { + $parent = $node->getParentClass(); + + return 'DirectoryIterator' === $parent + || is_subclass_of($parent, 'DirectoryIterator'); + } + + /** + * @param ClassNode $node + * @return boolean + */ + private function nodeIsSplFileObject(ClassNode $node) + { + $parent = $node->getParentClass(); + + return 'SplFileObject' === $parent + || is_subclass_of($parent, 'SplFileObject'); + } +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/TraversablePatch.php b/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/TraversablePatch.php new file mode 100644 index 0000000..eea0202 --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/TraversablePatch.php @@ -0,0 +1,83 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Doubler\ClassPatch; + +use Prophecy\Doubler\Generator\Node\ClassNode; +use Prophecy\Doubler\Generator\Node\MethodNode; + +/** + * Traversable interface patch. + * Forces classes that implement interfaces, that extend Traversable to also implement Iterator. + * + * @author Konstantin Kudryashov + */ +class TraversablePatch implements ClassPatchInterface +{ + /** + * Supports nodetree, that implement Traversable, but not Iterator or IteratorAggregate. + * + * @param ClassNode $node + * + * @return bool + */ + public function supports(ClassNode $node) + { + if (in_array('Iterator', $node->getInterfaces())) { + return false; + } + if (in_array('IteratorAggregate', $node->getInterfaces())) { + return false; + } + + foreach ($node->getInterfaces() as $interface) { + if ('Traversable' !== $interface && !is_subclass_of($interface, 'Traversable')) { + continue; + } + if ('Iterator' === $interface || is_subclass_of($interface, 'Iterator')) { + continue; + } + if ('IteratorAggregate' === $interface || is_subclass_of($interface, 'IteratorAggregate')) { + continue; + } + + return true; + } + + return false; + } + + /** + * Forces class to implement Iterator interface. + * + * @param ClassNode $node + */ + public function apply(ClassNode $node) + { + $node->addInterface('Iterator'); + + $node->addMethod(new MethodNode('current')); + $node->addMethod(new MethodNode('key')); + $node->addMethod(new MethodNode('next')); + $node->addMethod(new MethodNode('rewind')); + $node->addMethod(new MethodNode('valid')); + } + + /** + * Returns patch priority, which determines when patch will be applied. + * + * @return int Priority number (higher - earlier) + */ + public function getPriority() + { + return 100; + } +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Doubler/DoubleInterface.php b/vendor/phpspec/prophecy/src/Prophecy/Doubler/DoubleInterface.php new file mode 100644 index 0000000..699be3a --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Doubler/DoubleInterface.php @@ -0,0 +1,22 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Doubler; + +/** + * Core double interface. + * All doubled classes will implement this one. + * + * @author Konstantin Kudryashov + */ +interface DoubleInterface +{ +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Doubler/Doubler.php b/vendor/phpspec/prophecy/src/Prophecy/Doubler/Doubler.php new file mode 100644 index 0000000..a378ae2 --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Doubler/Doubler.php @@ -0,0 +1,146 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Doubler; + +use Doctrine\Instantiator\Instantiator; +use Prophecy\Doubler\ClassPatch\ClassPatchInterface; +use Prophecy\Doubler\Generator\ClassMirror; +use Prophecy\Doubler\Generator\ClassCreator; +use Prophecy\Exception\InvalidArgumentException; +use ReflectionClass; + +/** + * Cached class doubler. + * Prevents mirroring/creation of the same structure twice. + * + * @author Konstantin Kudryashov + */ +class Doubler +{ + private $mirror; + private $creator; + private $namer; + + /** + * @var ClassPatchInterface[] + */ + private $patches = array(); + + /** + * @var \Doctrine\Instantiator\Instantiator + */ + private $instantiator; + + /** + * Initializes doubler. + * + * @param ClassMirror $mirror + * @param ClassCreator $creator + * @param NameGenerator $namer + */ + public function __construct(ClassMirror $mirror = null, ClassCreator $creator = null, + NameGenerator $namer = null) + { + $this->mirror = $mirror ?: new ClassMirror; + $this->creator = $creator ?: new ClassCreator; + $this->namer = $namer ?: new NameGenerator; + } + + /** + * Returns list of registered class patches. + * + * @return ClassPatchInterface[] + */ + public function getClassPatches() + { + return $this->patches; + } + + /** + * Registers new class patch. + * + * @param ClassPatchInterface $patch + */ + public function registerClassPatch(ClassPatchInterface $patch) + { + $this->patches[] = $patch; + + @usort($this->patches, function (ClassPatchInterface $patch1, ClassPatchInterface $patch2) { + return $patch2->getPriority() - $patch1->getPriority(); + }); + } + + /** + * Creates double from specific class or/and list of interfaces. + * + * @param ReflectionClass $class + * @param ReflectionClass[] $interfaces Array of ReflectionClass instances + * @param array $args Constructor arguments + * + * @return DoubleInterface + * + * @throws \Prophecy\Exception\InvalidArgumentException + */ + public function double(ReflectionClass $class = null, array $interfaces, array $args = null) + { + foreach ($interfaces as $interface) { + if (!$interface instanceof ReflectionClass) { + throw new InvalidArgumentException(sprintf( + "[ReflectionClass \$interface1 [, ReflectionClass \$interface2]] array expected as\n". + "a second argument to `Doubler::double(...)`, but got %s.", + is_object($interface) ? get_class($interface).' class' : gettype($interface) + )); + } + } + + $classname = $this->createDoubleClass($class, $interfaces); + $reflection = new ReflectionClass($classname); + + if (null !== $args) { + return $reflection->newInstanceArgs($args); + } + if ((null === $constructor = $reflection->getConstructor()) + || ($constructor->isPublic() && !$constructor->isFinal())) { + return $reflection->newInstance(); + } + + if (!$this->instantiator) { + $this->instantiator = new Instantiator(); + } + + return $this->instantiator->instantiate($classname); + } + + /** + * Creates double class and returns its FQN. + * + * @param ReflectionClass $class + * @param ReflectionClass[] $interfaces + * + * @return string + */ + protected function createDoubleClass(ReflectionClass $class = null, array $interfaces) + { + $name = $this->namer->name($class, $interfaces); + $node = $this->mirror->reflect($class, $interfaces); + + foreach ($this->patches as $patch) { + if ($patch->supports($node)) { + $patch->apply($node); + } + } + + $this->creator->create($name, $node); + + return $name; + } +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassCodeGenerator.php b/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassCodeGenerator.php new file mode 100644 index 0000000..fc1079c --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassCodeGenerator.php @@ -0,0 +1,145 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Doubler\Generator; + +/** + * Class code creator. + * Generates PHP code for specific class node tree. + * + * @author Konstantin Kudryashov + */ +class ClassCodeGenerator +{ + /** + * Generates PHP code for class node. + * + * @param string $classname + * @param Node\ClassNode $class + * + * @return string + */ + public function generate($classname, Node\ClassNode $class) + { + $parts = explode('\\', $classname); + $classname = array_pop($parts); + $namespace = implode('\\', $parts); + + $code = sprintf("class %s extends \%s implements %s {\n", + $classname, $class->getParentClass(), implode(', ', + array_map(function ($interface) {return '\\'.$interface;}, $class->getInterfaces()) + ) + ); + + foreach ($class->getProperties() as $name => $visibility) { + $code .= sprintf("%s \$%s;\n", $visibility, $name); + } + $code .= "\n"; + + foreach ($class->getMethods() as $method) { + $code .= $this->generateMethod($method)."\n"; + } + $code .= "\n}"; + + return sprintf("namespace %s {\n%s\n}", $namespace, $code); + } + + private function generateMethod(Node\MethodNode $method) + { + $php = sprintf("%s %s function %s%s(%s)%s {\n", + $method->getVisibility(), + $method->isStatic() ? 'static' : '', + $method->returnsReference() ? '&':'', + $method->getName(), + implode(', ', $this->generateArguments($method->getArguments())), + $this->getReturnType($method) + ); + $php .= $method->getCode()."\n"; + + return $php.'}'; + } + + /** + * @return string + */ + private function getReturnType(Node\MethodNode $method) + { + if (version_compare(PHP_VERSION, '7.1', '>=')) { + if ($method->hasReturnType()) { + return $method->hasNullableReturnType() + ? sprintf(': ?%s', $method->getReturnType()) + : sprintf(': %s', $method->getReturnType()); + } + } + + if (version_compare(PHP_VERSION, '7.0', '>=')) { + return $method->hasReturnType() && $method->getReturnType() !== 'void' + ? sprintf(': %s', $method->getReturnType()) + : ''; + } + + return ''; + } + + private function generateArguments(array $arguments) + { + return array_map(function (Node\ArgumentNode $argument) { + $php = ''; + + if (version_compare(PHP_VERSION, '7.1', '>=')) { + $php .= $argument->isNullable() ? '?' : ''; + } + + 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 .= ' '.($argument->isPassedByReference() ? '&' : ''); + + $php .= $argument->isVariadic() ? '...' : ''; + + $php .= '$'.$argument->getName(); + + if ($argument->isOptional() && !$argument->isVariadic()) { + $php .= ' = '.var_export($argument->getDefault(), true); + } + + return $php; + }, $arguments); + } +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassCreator.php b/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassCreator.php new file mode 100644 index 0000000..882a4a4 --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassCreator.php @@ -0,0 +1,67 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Doubler\Generator; + +use Prophecy\Exception\Doubler\ClassCreatorException; + +/** + * Class creator. + * Creates specific class in current environment. + * + * @author Konstantin Kudryashov + */ +class ClassCreator +{ + private $generator; + + /** + * Initializes creator. + * + * @param ClassCodeGenerator $generator + */ + public function __construct(ClassCodeGenerator $generator = null) + { + $this->generator = $generator ?: new ClassCodeGenerator; + } + + /** + * Creates class. + * + * @param string $classname + * @param Node\ClassNode $class + * + * @return mixed + * + * @throws \Prophecy\Exception\Doubler\ClassCreatorException + */ + public function create($classname, Node\ClassNode $class) + { + $code = $this->generator->generate($classname, $class); + $return = eval($code); + + if (!class_exists($classname, false)) { + if (count($class->getInterfaces())) { + throw new ClassCreatorException(sprintf( + 'Could not double `%s` and implement interfaces: [%s].', + $class->getParentClass(), implode(', ', $class->getInterfaces()) + ), $class); + } + + throw new ClassCreatorException( + sprintf('Could not double `%s`.', $class->getParentClass()), + $class + ); + } + + return $return; + } +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassMirror.php b/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassMirror.php new file mode 100644 index 0000000..9f99239 --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassMirror.php @@ -0,0 +1,258 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Doubler\Generator; + +use Prophecy\Exception\InvalidArgumentException; +use Prophecy\Exception\Doubler\ClassMirrorException; +use ReflectionClass; +use ReflectionMethod; +use ReflectionParameter; + +/** + * Class mirror. + * Core doubler class. Mirrors specific class and/or interfaces into class node tree. + * + * @author Konstantin Kudryashov + */ +class ClassMirror +{ + private static $reflectableMethods = array( + '__construct', + '__destruct', + '__sleep', + '__wakeup', + '__toString', + '__call', + '__invoke' + ); + + /** + * Reflects provided arguments into class node. + * + * @param ReflectionClass $class + * @param ReflectionClass[] $interfaces + * + * @return Node\ClassNode + * + * @throws \Prophecy\Exception\InvalidArgumentException + */ + public function reflect(ReflectionClass $class = null, array $interfaces) + { + $node = new Node\ClassNode; + + if (null !== $class) { + if (true === $class->isInterface()) { + throw new InvalidArgumentException(sprintf( + "Could not reflect %s as a class, because it\n". + "is interface - use the second argument instead.", + $class->getName() + )); + } + + $this->reflectClassToNode($class, $node); + } + + foreach ($interfaces as $interface) { + if (!$interface instanceof ReflectionClass) { + throw new InvalidArgumentException(sprintf( + "[ReflectionClass \$interface1 [, ReflectionClass \$interface2]] array expected as\n". + "a second argument to `ClassMirror::reflect(...)`, but got %s.", + is_object($interface) ? get_class($interface).' class' : gettype($interface) + )); + } + if (false === $interface->isInterface()) { + throw new InvalidArgumentException(sprintf( + "Could not reflect %s as an interface, because it\n". + "is class - use the first argument instead.", + $interface->getName() + )); + } + + $this->reflectInterfaceToNode($interface, $node); + } + + $node->addInterface('Prophecy\Doubler\Generator\ReflectionInterface'); + + return $node; + } + + private function reflectClassToNode(ReflectionClass $class, Node\ClassNode $node) + { + if (true === $class->isFinal()) { + throw new ClassMirrorException(sprintf( + 'Could not reflect class %s as it is marked final.', $class->getName() + ), $class); + } + + $node->setParentClass($class->getName()); + + foreach ($class->getMethods(ReflectionMethod::IS_ABSTRACT) as $method) { + if (false === $method->isProtected()) { + continue; + } + + $this->reflectMethodToNode($method, $node); + } + + foreach ($class->getMethods(ReflectionMethod::IS_PUBLIC) as $method) { + if (0 === strpos($method->getName(), '_') + && !in_array($method->getName(), self::$reflectableMethods)) { + continue; + } + + if (true === $method->isFinal()) { + $node->addUnextendableMethod($method->getName()); + continue; + } + + $this->reflectMethodToNode($method, $node); + } + } + + private function reflectInterfaceToNode(ReflectionClass $interface, Node\ClassNode $node) + { + $node->addInterface($interface->getName()); + + foreach ($interface->getMethods() as $method) { + $this->reflectMethodToNode($method, $node); + } + } + + private function reflectMethodToNode(ReflectionMethod $method, Node\ClassNode $classNode) + { + $node = new Node\MethodNode($method->getName()); + + if (true === $method->isProtected()) { + $node->setVisibility('protected'); + } + + if (true === $method->isStatic()) { + $node->setStatic(); + } + + if (true === $method->returnsReference()) { + $node->setReturnsReference(); + } + + if (version_compare(PHP_VERSION, '7.0', '>=') && $method->hasReturnType()) { + $returnType = (string) $method->getReturnType(); + $returnTypeLower = strtolower($returnType); + + if ('self' === $returnTypeLower) { + $returnType = $method->getDeclaringClass()->getName(); + } + if ('parent' === $returnTypeLower) { + $returnType = $method->getDeclaringClass()->getParentClass()->getName(); + } + + $node->setReturnType($returnType); + + if (version_compare(PHP_VERSION, '7.1', '>=') && $method->getReturnType()->allowsNull()) { + $node->setNullableReturnType(true); + } + } + + if (is_array($params = $method->getParameters()) && count($params)) { + foreach ($params as $param) { + $this->reflectArgumentToNode($param, $node); + } + } + + $classNode->addMethod($node); + } + + private function reflectArgumentToNode(ReflectionParameter $parameter, Node\MethodNode $methodNode) + { + $name = $parameter->getName() == '...' ? '__dot_dot_dot__' : $parameter->getName(); + $node = new Node\ArgumentNode($name); + + $node->setTypeHint($this->getTypeHint($parameter)); + + if ($this->isVariadic($parameter)) { + $node->setAsVariadic(); + } + + if ($this->hasDefaultValue($parameter)) { + $node->setDefault($this->getDefaultValue($parameter)); + } + + if ($parameter->isPassedByReference()) { + $node->setAsPassedByReference(); + } + + $methodNode->addArgument($node); + } + + private function hasDefaultValue(ReflectionParameter $parameter) + { + if ($this->isVariadic($parameter)) { + return false; + } + + if ($parameter->isDefaultValueAvailable()) { + return true; + } + + return $parameter->isOptional() || $this->isNullable($parameter); + } + + private function getDefaultValue(ReflectionParameter $parameter) + { + if (!$parameter->isDefaultValueAvailable()) { + return null; + } + + return $parameter->getDefaultValue(); + } + + private function getTypeHint(ReflectionParameter $parameter) + { + if (null !== $className = $this->getParameterClassName($parameter)) { + return $className; + } + + if (true === $parameter->isArray()) { + return 'array'; + } + + if (version_compare(PHP_VERSION, '5.4', '>=') && true === $parameter->isCallable()) { + return 'callable'; + } + + if (version_compare(PHP_VERSION, '7.0', '>=') && true === $parameter->hasType()) { + return (string) $parameter->getType(); + } + + return null; + } + + private function isVariadic(ReflectionParameter $parameter) + { + return PHP_VERSION_ID >= 50600 && $parameter->isVariadic(); + } + + private function isNullable(ReflectionParameter $parameter) + { + return $parameter->allowsNull() && null !== $this->getTypeHint($parameter); + } + + private function getParameterClassName(ReflectionParameter $parameter) + { + try { + return $parameter->getClass() ? $parameter->getClass()->getName() : null; + } catch (\ReflectionException $e) { + preg_match('/\[\s\<\w+?>\s([\w,\\\]+)/s', $parameter, $matches); + + return isset($matches[1]) ? $matches[1] : null; + } + } +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ArgumentNode.php b/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ArgumentNode.php new file mode 100644 index 0000000..dd29b68 --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ArgumentNode.php @@ -0,0 +1,102 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Doubler\Generator\Node; + +/** + * Argument node. + * + * @author Konstantin Kudryashov + */ +class ArgumentNode +{ + private $name; + private $typeHint; + private $default; + private $optional = false; + private $byReference = false; + private $isVariadic = false; + private $isNullable = false; + + /** + * @param string $name + */ + public function __construct($name) + { + $this->name = $name; + } + + public function getName() + { + return $this->name; + } + + public function getTypeHint() + { + return $this->typeHint; + } + + public function setTypeHint($typeHint = null) + { + $this->typeHint = $typeHint; + } + + public function hasDefault() + { + return $this->isOptional() && !$this->isVariadic(); + } + + public function getDefault() + { + return $this->default; + } + + public function setDefault($default = null) + { + $this->optional = true; + $this->default = $default; + } + + public function isOptional() + { + return $this->optional; + } + + public function setAsPassedByReference($byReference = true) + { + $this->byReference = $byReference; + } + + public function isPassedByReference() + { + return $this->byReference; + } + + public function setAsVariadic($isVariadic = true) + { + $this->isVariadic = $isVariadic; + } + + public function isVariadic() + { + return $this->isVariadic; + } + + public function isNullable() + { + return $this->isNullable; + } + + public function setAsNullable($isNullable = true) + { + $this->isNullable = $isNullable; + } +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ClassNode.php b/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ClassNode.php new file mode 100644 index 0000000..1499a1d --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ClassNode.php @@ -0,0 +1,166 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Doubler\Generator\Node; + +use Prophecy\Exception\Doubler\MethodNotExtendableException; +use Prophecy\Exception\InvalidArgumentException; + +/** + * Class node. + * + * @author Konstantin Kudryashov + */ +class ClassNode +{ + private $parentClass = 'stdClass'; + private $interfaces = array(); + private $properties = array(); + private $unextendableMethods = array(); + + /** + * @var MethodNode[] + */ + private $methods = array(); + + public function getParentClass() + { + return $this->parentClass; + } + + /** + * @param string $class + */ + public function setParentClass($class) + { + $this->parentClass = $class ?: 'stdClass'; + } + + /** + * @return string[] + */ + public function getInterfaces() + { + return $this->interfaces; + } + + /** + * @param string $interface + */ + public function addInterface($interface) + { + if ($this->hasInterface($interface)) { + return; + } + + array_unshift($this->interfaces, $interface); + } + + /** + * @param string $interface + * + * @return bool + */ + public function hasInterface($interface) + { + return in_array($interface, $this->interfaces); + } + + public function getProperties() + { + return $this->properties; + } + + public function addProperty($name, $visibility = 'public') + { + $visibility = strtolower($visibility); + + if (!in_array($visibility, array('public', 'private', 'protected'))) { + throw new InvalidArgumentException(sprintf( + '`%s` property visibility is not supported.', $visibility + )); + } + + $this->properties[$name] = $visibility; + } + + /** + * @return MethodNode[] + */ + public function getMethods() + { + return $this->methods; + } + + public function addMethod(MethodNode $method) + { + if (!$this->isExtendable($method->getName())){ + $message = sprintf( + 'Method `%s` is not extendable, so can not be added.', $method->getName() + ); + throw new MethodNotExtendableException($message, $this->getParentClass(), $method->getName()); + } + $this->methods[$method->getName()] = $method; + } + + public function removeMethod($name) + { + unset($this->methods[$name]); + } + + /** + * @param string $name + * + * @return MethodNode|null + */ + public function getMethod($name) + { + return $this->hasMethod($name) ? $this->methods[$name] : null; + } + + /** + * @param string $name + * + * @return bool + */ + public function hasMethod($name) + { + return isset($this->methods[$name]); + } + + /** + * @return string[] + */ + public function getUnextendableMethods() + { + return $this->unextendableMethods; + } + + /** + * @param string $unextendableMethod + */ + public function addUnextendableMethod($unextendableMethod) + { + if (!$this->isExtendable($unextendableMethod)){ + return; + } + $this->unextendableMethods[] = $unextendableMethod; + } + + /** + * @param string $method + * @return bool + */ + public function isExtendable($method) + { + return !in_array($method, $this->unextendableMethods); + } +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/MethodNode.php b/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/MethodNode.php new file mode 100644 index 0000000..71aabfa --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/MethodNode.php @@ -0,0 +1,207 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Doubler\Generator\Node; + +use Prophecy\Exception\InvalidArgumentException; + +/** + * Method node. + * + * @author Konstantin Kudryashov + */ +class MethodNode +{ + private $name; + private $code; + private $visibility = 'public'; + private $static = false; + private $returnsReference = false; + private $returnType; + private $nullableReturnType = false; + + /** + * @var ArgumentNode[] + */ + private $arguments = array(); + + /** + * @param string $name + * @param string $code + */ + public function __construct($name, $code = null) + { + $this->name = $name; + $this->code = $code; + } + + public function getVisibility() + { + return $this->visibility; + } + + /** + * @param string $visibility + */ + public function setVisibility($visibility) + { + $visibility = strtolower($visibility); + + if (!in_array($visibility, array('public', 'private', 'protected'))) { + throw new InvalidArgumentException(sprintf( + '`%s` method visibility is not supported.', $visibility + )); + } + + $this->visibility = $visibility; + } + + public function isStatic() + { + return $this->static; + } + + public function setStatic($static = true) + { + $this->static = (bool) $static; + } + + public function returnsReference() + { + return $this->returnsReference; + } + + public function setReturnsReference() + { + $this->returnsReference = true; + } + + public function getName() + { + return $this->name; + } + + public function addArgument(ArgumentNode $argument) + { + $this->arguments[] = $argument; + } + + /** + * @return ArgumentNode[] + */ + public function getArguments() + { + return $this->arguments; + } + + public function hasReturnType() + { + return null !== $this->returnType; + } + + /** + * @param string $type + */ + 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, '\\'); + } + } + + public function getReturnType() + { + return $this->returnType; + } + + /** + * @param bool $bool + */ + public function setNullableReturnType($bool = true) + { + $this->nullableReturnType = (bool) $bool; + } + + /** + * @return bool + */ + public function hasNullableReturnType() + { + return $this->nullableReturnType; + } + + /** + * @param string $code + */ + public function setCode($code) + { + $this->code = $code; + } + + public function getCode() + { + if ($this->returnsReference) + { + return "throw new \Prophecy\Exception\Doubler\ReturnByReferenceException('Returning by reference not supported', get_class(\$this), '{$this->name}');"; + } + + return (string) $this->code; + } + + public function useParentCode() + { + $this->code = sprintf( + 'return parent::%s(%s);', $this->getName(), implode(', ', + array_map(array($this, 'generateArgument'), $this->arguments) + ) + ); + } + + private function generateArgument(ArgumentNode $arg) + { + $argument = '$'.$arg->getName(); + + if ($arg->isVariadic()) { + $argument = '...'.$argument; + } + + return $argument; + } +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ReflectionInterface.php b/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ReflectionInterface.php new file mode 100644 index 0000000..d720b15 --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ReflectionInterface.php @@ -0,0 +1,22 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Doubler\Generator; + +/** + * Reflection interface. + * All reflected classes implement this interface. + * + * @author Konstantin Kudryashov + */ +interface ReflectionInterface +{ +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Doubler/LazyDouble.php b/vendor/phpspec/prophecy/src/Prophecy/Doubler/LazyDouble.php new file mode 100644 index 0000000..8a99c4c --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Doubler/LazyDouble.php @@ -0,0 +1,127 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Doubler; + +use Prophecy\Exception\Doubler\DoubleException; +use Prophecy\Exception\Doubler\ClassNotFoundException; +use Prophecy\Exception\Doubler\InterfaceNotFoundException; +use ReflectionClass; + +/** + * Lazy double. + * Gives simple interface to describe double before creating it. + * + * @author Konstantin Kudryashov + */ +class LazyDouble +{ + private $doubler; + private $class; + private $interfaces = array(); + private $arguments = null; + private $double; + + /** + * Initializes lazy double. + * + * @param Doubler $doubler + */ + public function __construct(Doubler $doubler) + { + $this->doubler = $doubler; + } + + /** + * Tells doubler to use specific class as parent one for double. + * + * @param string|ReflectionClass $class + * + * @throws \Prophecy\Exception\Doubler\ClassNotFoundException + * @throws \Prophecy\Exception\Doubler\DoubleException + */ + public function setParentClass($class) + { + if (null !== $this->double) { + throw new DoubleException('Can not extend class with already instantiated double.'); + } + + if (!$class instanceof ReflectionClass) { + if (!class_exists($class)) { + throw new ClassNotFoundException(sprintf('Class %s not found.', $class), $class); + } + + $class = new ReflectionClass($class); + } + + $this->class = $class; + } + + /** + * Tells doubler to implement specific interface with double. + * + * @param string|ReflectionClass $interface + * + * @throws \Prophecy\Exception\Doubler\InterfaceNotFoundException + * @throws \Prophecy\Exception\Doubler\DoubleException + */ + public function addInterface($interface) + { + if (null !== $this->double) { + throw new DoubleException( + 'Can not implement interface with already instantiated double.' + ); + } + + if (!$interface instanceof ReflectionClass) { + if (!interface_exists($interface)) { + throw new InterfaceNotFoundException( + sprintf('Interface %s not found.', $interface), + $interface + ); + } + + $interface = new ReflectionClass($interface); + } + + $this->interfaces[] = $interface; + } + + /** + * Sets constructor arguments. + * + * @param array $arguments + */ + public function setArguments(array $arguments = null) + { + $this->arguments = $arguments; + } + + /** + * Creates double instance or returns already created one. + * + * @return DoubleInterface + */ + public function getInstance() + { + if (null === $this->double) { + if (null !== $this->arguments) { + return $this->double = $this->doubler->double( + $this->class, $this->interfaces, $this->arguments + ); + } + + $this->double = $this->doubler->double($this->class, $this->interfaces); + } + + return $this->double; + } +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Doubler/NameGenerator.php b/vendor/phpspec/prophecy/src/Prophecy/Doubler/NameGenerator.php new file mode 100644 index 0000000..d67ec6a --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Doubler/NameGenerator.php @@ -0,0 +1,52 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Doubler; + +use ReflectionClass; + +/** + * Name generator. + * Generates classname for double. + * + * @author Konstantin Kudryashov + */ +class NameGenerator +{ + private static $counter = 1; + + /** + * Generates name. + * + * @param ReflectionClass $class + * @param ReflectionClass[] $interfaces + * + * @return string + */ + public function name(ReflectionClass $class = null, array $interfaces) + { + $parts = array(); + + if (null !== $class) { + $parts[] = $class->getName(); + } else { + foreach ($interfaces as $interface) { + $parts[] = $interface->getShortName(); + } + } + + if (!count($parts)) { + $parts[] = 'stdClass'; + } + + return sprintf('Double\%s\P%d', implode('\\', $parts), self::$counter++); + } +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Exception/Call/UnexpectedCallException.php b/vendor/phpspec/prophecy/src/Prophecy/Exception/Call/UnexpectedCallException.php new file mode 100644 index 0000000..48ed225 --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Exception/Call/UnexpectedCallException.php @@ -0,0 +1,40 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Exception\Call; + +use Prophecy\Exception\Prophecy\ObjectProphecyException; +use Prophecy\Prophecy\ObjectProphecy; + +class UnexpectedCallException extends ObjectProphecyException +{ + private $methodName; + private $arguments; + + public function __construct($message, ObjectProphecy $objectProphecy, + $methodName, array $arguments) + { + parent::__construct($message, $objectProphecy); + + $this->methodName = $methodName; + $this->arguments = $arguments; + } + + public function getMethodName() + { + return $this->methodName; + } + + public function getArguments() + { + return $this->arguments; + } +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassCreatorException.php b/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassCreatorException.php new file mode 100644 index 0000000..822918a --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassCreatorException.php @@ -0,0 +1,31 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Exception\Doubler; + +use Prophecy\Doubler\Generator\Node\ClassNode; + +class ClassCreatorException extends \RuntimeException implements DoublerException +{ + private $node; + + public function __construct($message, ClassNode $node) + { + parent::__construct($message); + + $this->node = $node; + } + + public function getClassNode() + { + return $this->node; + } +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassMirrorException.php b/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassMirrorException.php new file mode 100644 index 0000000..8fc53b8 --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassMirrorException.php @@ -0,0 +1,31 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Exception\Doubler; + +use ReflectionClass; + +class ClassMirrorException extends \RuntimeException implements DoublerException +{ + private $class; + + public function __construct($message, ReflectionClass $class) + { + parent::__construct($message); + + $this->class = $class; + } + + public function getReflectedClass() + { + return $this->class; + } +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassNotFoundException.php b/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassNotFoundException.php new file mode 100644 index 0000000..5bc826d --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassNotFoundException.php @@ -0,0 +1,33 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Exception\Doubler; + +class ClassNotFoundException extends DoubleException +{ + private $classname; + + /** + * @param string $message + * @param string $classname + */ + public function __construct($message, $classname) + { + parent::__construct($message); + + $this->classname = $classname; + } + + public function getClassname() + { + return $this->classname; + } +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/DoubleException.php b/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/DoubleException.php new file mode 100644 index 0000000..6642a58 --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/DoubleException.php @@ -0,0 +1,18 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Exception\Doubler; + +use RuntimeException; + +class DoubleException extends RuntimeException implements DoublerException +{ +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/DoublerException.php b/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/DoublerException.php new file mode 100644 index 0000000..9d6be17 --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/DoublerException.php @@ -0,0 +1,18 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Exception\Doubler; + +use Prophecy\Exception\Exception; + +interface DoublerException extends Exception +{ +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/InterfaceNotFoundException.php b/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/InterfaceNotFoundException.php new file mode 100644 index 0000000..e344dea --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/InterfaceNotFoundException.php @@ -0,0 +1,20 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Exception\Doubler; + +class InterfaceNotFoundException extends ClassNotFoundException +{ + public function getInterfaceName() + { + return $this->getClassname(); + } +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/MethodNotExtendableException.php b/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/MethodNotExtendableException.php new file mode 100644 index 0000000..56f47b1 --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/MethodNotExtendableException.php @@ -0,0 +1,41 @@ +methodName = $methodName; + $this->className = $className; + } + + + /** + * @return string + */ + public function getMethodName() + { + return $this->methodName; + } + + /** + * @return string + */ + public function getClassName() + { + return $this->className; + } + + } diff --git a/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/MethodNotFoundException.php b/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/MethodNotFoundException.php new file mode 100644 index 0000000..b113941 --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/MethodNotFoundException.php @@ -0,0 +1,60 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Exception\Doubler; + +class MethodNotFoundException extends DoubleException +{ + /** + * @var string + */ + private $classname; + + /** + * @var string + */ + private $methodName; + + /** + * @var array + */ + private $arguments; + + /** + * @param string $message + * @param string $classname + * @param string $methodName + * @param null|Argument\ArgumentsWildcard|array $arguments + */ + public function __construct($message, $classname, $methodName, $arguments = null) + { + parent::__construct($message); + + $this->classname = $classname; + $this->methodName = $methodName; + $this->arguments = $arguments; + } + + public function getClassname() + { + return $this->classname; + } + + public function getMethodName() + { + return $this->methodName; + } + + public function getArguments() + { + return $this->arguments; + } +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ReturnByReferenceException.php b/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ReturnByReferenceException.php new file mode 100644 index 0000000..6303049 --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ReturnByReferenceException.php @@ -0,0 +1,41 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Exception\Doubler; + +class ReturnByReferenceException extends DoubleException +{ + private $classname; + private $methodName; + + /** + * @param string $message + * @param string $classname + * @param string $methodName + */ + public function __construct($message, $classname, $methodName) + { + parent::__construct($message); + + $this->classname = $classname; + $this->methodName = $methodName; + } + + public function getClassname() + { + return $this->classname; + } + + public function getMethodName() + { + return $this->methodName; + } +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Exception/Exception.php b/vendor/phpspec/prophecy/src/Prophecy/Exception/Exception.php new file mode 100644 index 0000000..ac9fe4d --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Exception/Exception.php @@ -0,0 +1,26 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Exception; + +/** + * Core Prophecy exception interface. + * All Prophecy exceptions implement it. + * + * @author Konstantin Kudryashov + */ +interface Exception +{ + /** + * @return string + */ + public function getMessage(); +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Exception/InvalidArgumentException.php b/vendor/phpspec/prophecy/src/Prophecy/Exception/InvalidArgumentException.php new file mode 100644 index 0000000..bc91c69 --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Exception/InvalidArgumentException.php @@ -0,0 +1,16 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Exception; + +class InvalidArgumentException extends \InvalidArgumentException implements Exception +{ +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/AggregateException.php b/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/AggregateException.php new file mode 100644 index 0000000..44b598a --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/AggregateException.php @@ -0,0 +1,50 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Exception\Prediction; + +use Prophecy\Prophecy\ObjectProphecy; + +class AggregateException extends \RuntimeException implements PredictionException +{ + private $exceptions = array(); + private $objectProphecy; + + public function append(PredictionException $exception) + { + $message = $exception->getMessage(); + $message = ' '.strtr($message, array("\n" => "\n "))."\n"; + + $this->message = rtrim($this->message.$message); + $this->exceptions[] = $exception; + } + + /** + * @return PredictionException[] + */ + public function getExceptions() + { + return $this->exceptions; + } + + public function setObjectProphecy(ObjectProphecy $objectProphecy) + { + $this->objectProphecy = $objectProphecy; + } + + /** + * @return ObjectProphecy + */ + public function getObjectProphecy() + { + return $this->objectProphecy; + } +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/FailedPredictionException.php b/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/FailedPredictionException.php new file mode 100644 index 0000000..bbbbc3d --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/FailedPredictionException.php @@ -0,0 +1,24 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Exception\Prediction; + +use RuntimeException; + +/** + * Basic failed prediction exception. + * Use it for custom prediction failures. + * + * @author Konstantin Kudryashov + */ +class FailedPredictionException extends RuntimeException implements PredictionException +{ +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/NoCallsException.php b/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/NoCallsException.php new file mode 100644 index 0000000..05ea4aa --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/NoCallsException.php @@ -0,0 +1,18 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Exception\Prediction; + +use Prophecy\Exception\Prophecy\MethodProphecyException; + +class NoCallsException extends MethodProphecyException implements PredictionException +{ +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/PredictionException.php b/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/PredictionException.php new file mode 100644 index 0000000..2596b1e --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/PredictionException.php @@ -0,0 +1,18 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Exception\Prediction; + +use Prophecy\Exception\Exception; + +interface PredictionException extends Exception +{ +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/UnexpectedCallsCountException.php b/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/UnexpectedCallsCountException.php new file mode 100644 index 0000000..9d90543 --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/UnexpectedCallsCountException.php @@ -0,0 +1,31 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Exception\Prediction; + +use Prophecy\Prophecy\MethodProphecy; + +class UnexpectedCallsCountException extends UnexpectedCallsException +{ + private $expectedCount; + + public function __construct($message, MethodProphecy $methodProphecy, $count, array $calls) + { + parent::__construct($message, $methodProphecy, $calls); + + $this->expectedCount = intval($count); + } + + public function getExpectedCount() + { + return $this->expectedCount; + } +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/UnexpectedCallsException.php b/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/UnexpectedCallsException.php new file mode 100644 index 0000000..7a99c2d --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/UnexpectedCallsException.php @@ -0,0 +1,32 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Exception\Prediction; + +use Prophecy\Prophecy\MethodProphecy; +use Prophecy\Exception\Prophecy\MethodProphecyException; + +class UnexpectedCallsException extends MethodProphecyException implements PredictionException +{ + private $calls = array(); + + public function __construct($message, MethodProphecy $methodProphecy, array $calls) + { + parent::__construct($message, $methodProphecy); + + $this->calls = $calls; + } + + public function getCalls() + { + return $this->calls; + } +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/MethodProphecyException.php b/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/MethodProphecyException.php new file mode 100644 index 0000000..1b03eaf --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/MethodProphecyException.php @@ -0,0 +1,34 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Exception\Prophecy; + +use Prophecy\Prophecy\MethodProphecy; + +class MethodProphecyException extends ObjectProphecyException +{ + private $methodProphecy; + + public function __construct($message, MethodProphecy $methodProphecy) + { + parent::__construct($message, $methodProphecy->getObjectProphecy()); + + $this->methodProphecy = $methodProphecy; + } + + /** + * @return MethodProphecy + */ + public function getMethodProphecy() + { + return $this->methodProphecy; + } +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/ObjectProphecyException.php b/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/ObjectProphecyException.php new file mode 100644 index 0000000..e345402 --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/ObjectProphecyException.php @@ -0,0 +1,34 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Exception\Prophecy; + +use Prophecy\Prophecy\ObjectProphecy; + +class ObjectProphecyException extends \RuntimeException implements ProphecyException +{ + private $objectProphecy; + + public function __construct($message, ObjectProphecy $objectProphecy) + { + parent::__construct($message); + + $this->objectProphecy = $objectProphecy; + } + + /** + * @return ObjectProphecy + */ + public function getObjectProphecy() + { + return $this->objectProphecy; + } +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/ProphecyException.php b/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/ProphecyException.php new file mode 100644 index 0000000..9157332 --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/ProphecyException.php @@ -0,0 +1,18 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Exception\Prophecy; + +use Prophecy\Exception\Exception; + +interface ProphecyException extends Exception +{ +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/PhpDocumentor/ClassAndInterfaceTagRetriever.php b/vendor/phpspec/prophecy/src/Prophecy/PhpDocumentor/ClassAndInterfaceTagRetriever.php new file mode 100644 index 0000000..209821c --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/PhpDocumentor/ClassAndInterfaceTagRetriever.php @@ -0,0 +1,69 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\PhpDocumentor; + +use phpDocumentor\Reflection\DocBlock\Tag\MethodTag as LegacyMethodTag; +use phpDocumentor\Reflection\DocBlock\Tags\Method; + +/** + * @author Théo FIDRY + * + * @internal + */ +final class ClassAndInterfaceTagRetriever implements MethodTagRetrieverInterface +{ + private $classRetriever; + + public function __construct(MethodTagRetrieverInterface $classRetriever = null) + { + if (null !== $classRetriever) { + $this->classRetriever = $classRetriever; + + return; + } + + $this->classRetriever = class_exists('phpDocumentor\Reflection\DocBlockFactory') && class_exists('phpDocumentor\Reflection\Types\ContextFactory') + ? new ClassTagRetriever() + : new LegacyClassTagRetriever() + ; + } + + /** + * @param \ReflectionClass $reflectionClass + * + * @return LegacyMethodTag[]|Method[] + */ + public function getTagList(\ReflectionClass $reflectionClass) + { + return array_merge( + $this->classRetriever->getTagList($reflectionClass), + $this->getInterfacesTagList($reflectionClass) + ); + } + + /** + * @param \ReflectionClass $reflectionClass + * + * @return LegacyMethodTag[]|Method[] + */ + private function getInterfacesTagList(\ReflectionClass $reflectionClass) + { + $interfaces = $reflectionClass->getInterfaces(); + $tagList = array(); + + foreach($interfaces as $interface) { + $tagList = array_merge($tagList, $this->classRetriever->getTagList($interface)); + } + + return $tagList; + } +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/PhpDocumentor/ClassTagRetriever.php b/vendor/phpspec/prophecy/src/Prophecy/PhpDocumentor/ClassTagRetriever.php new file mode 100644 index 0000000..1d2da8f --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/PhpDocumentor/ClassTagRetriever.php @@ -0,0 +1,52 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\PhpDocumentor; + +use phpDocumentor\Reflection\DocBlock\Tags\Method; +use phpDocumentor\Reflection\DocBlockFactory; +use phpDocumentor\Reflection\Types\ContextFactory; + +/** + * @author Théo FIDRY + * + * @internal + */ +final class ClassTagRetriever implements MethodTagRetrieverInterface +{ + private $docBlockFactory; + private $contextFactory; + + public function __construct() + { + $this->docBlockFactory = DocBlockFactory::createInstance(); + $this->contextFactory = new ContextFactory(); + } + + /** + * @param \ReflectionClass $reflectionClass + * + * @return Method[] + */ + public function getTagList(\ReflectionClass $reflectionClass) + { + try { + $phpdoc = $this->docBlockFactory->create( + $reflectionClass, + $this->contextFactory->createFromReflector($reflectionClass) + ); + + return $phpdoc->getTagsByName('method'); + } catch (\InvalidArgumentException $e) { + return array(); + } + } +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/PhpDocumentor/LegacyClassTagRetriever.php b/vendor/phpspec/prophecy/src/Prophecy/PhpDocumentor/LegacyClassTagRetriever.php new file mode 100644 index 0000000..c0dec3d --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/PhpDocumentor/LegacyClassTagRetriever.php @@ -0,0 +1,35 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\PhpDocumentor; + +use phpDocumentor\Reflection\DocBlock; +use phpDocumentor\Reflection\DocBlock\Tag\MethodTag as LegacyMethodTag; + +/** + * @author Théo FIDRY + * + * @internal + */ +final class LegacyClassTagRetriever implements MethodTagRetrieverInterface +{ + /** + * @param \ReflectionClass $reflectionClass + * + * @return LegacyMethodTag[] + */ + public function getTagList(\ReflectionClass $reflectionClass) + { + $phpdoc = new DocBlock($reflectionClass->getDocComment()); + + return $phpdoc->getTagsByName('method'); + } +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/PhpDocumentor/MethodTagRetrieverInterface.php b/vendor/phpspec/prophecy/src/Prophecy/PhpDocumentor/MethodTagRetrieverInterface.php new file mode 100644 index 0000000..d3989da --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/PhpDocumentor/MethodTagRetrieverInterface.php @@ -0,0 +1,30 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\PhpDocumentor; + +use phpDocumentor\Reflection\DocBlock\Tag\MethodTag as LegacyMethodTag; +use phpDocumentor\Reflection\DocBlock\Tags\Method; + +/** + * @author Théo FIDRY + * + * @internal + */ +interface MethodTagRetrieverInterface +{ + /** + * @param \ReflectionClass $reflectionClass + * + * @return LegacyMethodTag[]|Method[] + */ + public function getTagList(\ReflectionClass $reflectionClass); +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallPrediction.php b/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallPrediction.php new file mode 100644 index 0000000..b478736 --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallPrediction.php @@ -0,0 +1,86 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Prediction; + +use Prophecy\Call\Call; +use Prophecy\Prophecy\ObjectProphecy; +use Prophecy\Prophecy\MethodProphecy; +use Prophecy\Argument\ArgumentsWildcard; +use Prophecy\Argument\Token\AnyValuesToken; +use Prophecy\Util\StringUtil; +use Prophecy\Exception\Prediction\NoCallsException; + +/** + * Call prediction. + * + * @author Konstantin Kudryashov + */ +class CallPrediction implements PredictionInterface +{ + private $util; + + /** + * Initializes prediction. + * + * @param StringUtil $util + */ + public function __construct(StringUtil $util = null) + { + $this->util = $util ?: new StringUtil; + } + + /** + * Tests that there was at least one call. + * + * @param Call[] $calls + * @param ObjectProphecy $object + * @param MethodProphecy $method + * + * @throws \Prophecy\Exception\Prediction\NoCallsException + */ + public function check(array $calls, ObjectProphecy $object, MethodProphecy $method) + { + if (count($calls)) { + return; + } + + $methodCalls = $object->findProphecyMethodCalls( + $method->getMethodName(), + new ArgumentsWildcard(array(new AnyValuesToken)) + ); + + if (count($methodCalls)) { + throw new NoCallsException(sprintf( + "No calls have been made that match:\n". + " %s->%s(%s)\n". + "but expected at least one.\n". + "Recorded `%s(...)` calls:\n%s", + + get_class($object->reveal()), + $method->getMethodName(), + $method->getArgumentsWildcard(), + $method->getMethodName(), + $this->util->stringifyCalls($methodCalls) + ), $method); + } + + throw new NoCallsException(sprintf( + "No calls have been made that match:\n". + " %s->%s(%s)\n". + "but expected at least one.", + + get_class($object->reveal()), + $method->getMethodName(), + $method->getArgumentsWildcard() + ), $method); + } +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallTimesPrediction.php b/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallTimesPrediction.php new file mode 100644 index 0000000..31c6c57 --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallTimesPrediction.php @@ -0,0 +1,107 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Prediction; + +use Prophecy\Call\Call; +use Prophecy\Prophecy\ObjectProphecy; +use Prophecy\Prophecy\MethodProphecy; +use Prophecy\Argument\ArgumentsWildcard; +use Prophecy\Argument\Token\AnyValuesToken; +use Prophecy\Util\StringUtil; +use Prophecy\Exception\Prediction\UnexpectedCallsCountException; + +/** + * Prediction interface. + * Predictions are logical test blocks, tied to `should...` keyword. + * + * @author Konstantin Kudryashov + */ +class CallTimesPrediction implements PredictionInterface +{ + private $times; + private $util; + + /** + * Initializes prediction. + * + * @param int $times + * @param StringUtil $util + */ + public function __construct($times, StringUtil $util = null) + { + $this->times = intval($times); + $this->util = $util ?: new StringUtil; + } + + /** + * Tests that there was exact amount of calls made. + * + * @param Call[] $calls + * @param ObjectProphecy $object + * @param MethodProphecy $method + * + * @throws \Prophecy\Exception\Prediction\UnexpectedCallsCountException + */ + public function check(array $calls, ObjectProphecy $object, MethodProphecy $method) + { + if ($this->times == count($calls)) { + return; + } + + $methodCalls = $object->findProphecyMethodCalls( + $method->getMethodName(), + new ArgumentsWildcard(array(new AnyValuesToken)) + ); + + if (count($calls)) { + $message = sprintf( + "Expected exactly %d calls that match:\n". + " %s->%s(%s)\n". + "but %d were made:\n%s", + + $this->times, + get_class($object->reveal()), + $method->getMethodName(), + $method->getArgumentsWildcard(), + count($calls), + $this->util->stringifyCalls($calls) + ); + } elseif (count($methodCalls)) { + $message = sprintf( + "Expected exactly %d calls that match:\n". + " %s->%s(%s)\n". + "but none were made.\n". + "Recorded `%s(...)` calls:\n%s", + + $this->times, + get_class($object->reveal()), + $method->getMethodName(), + $method->getArgumentsWildcard(), + $method->getMethodName(), + $this->util->stringifyCalls($methodCalls) + ); + } else { + $message = sprintf( + "Expected exactly %d calls that match:\n". + " %s->%s(%s)\n". + "but none were made.", + + $this->times, + get_class($object->reveal()), + $method->getMethodName(), + $method->getArgumentsWildcard() + ); + } + + throw new UnexpectedCallsCountException($message, $method, $this->times, $calls); + } +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallbackPrediction.php b/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallbackPrediction.php new file mode 100644 index 0000000..44bc782 --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallbackPrediction.php @@ -0,0 +1,65 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Prediction; + +use Prophecy\Call\Call; +use Prophecy\Prophecy\ObjectProphecy; +use Prophecy\Prophecy\MethodProphecy; +use Prophecy\Exception\InvalidArgumentException; +use Closure; + +/** + * Callback prediction. + * + * @author Konstantin Kudryashov + */ +class CallbackPrediction implements PredictionInterface +{ + private $callback; + + /** + * Initializes callback prediction. + * + * @param callable $callback Custom callback + * + * @throws \Prophecy\Exception\InvalidArgumentException + */ + public function __construct($callback) + { + if (!is_callable($callback)) { + throw new InvalidArgumentException(sprintf( + 'Callable expected as an argument to CallbackPrediction, but got %s.', + gettype($callback) + )); + } + + $this->callback = $callback; + } + + /** + * Executes preset callback. + * + * @param Call[] $calls + * @param ObjectProphecy $object + * @param MethodProphecy $method + */ + public function check(array $calls, ObjectProphecy $object, MethodProphecy $method) + { + $callback = $this->callback; + + if ($callback instanceof Closure && method_exists('Closure', 'bind')) { + $callback = Closure::bind($callback, $object); + } + + call_user_func($callback, $calls, $object, $method); + } +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Prediction/NoCallsPrediction.php b/vendor/phpspec/prophecy/src/Prophecy/Prediction/NoCallsPrediction.php new file mode 100644 index 0000000..46ac5bf --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Prediction/NoCallsPrediction.php @@ -0,0 +1,68 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Prediction; + +use Prophecy\Call\Call; +use Prophecy\Prophecy\ObjectProphecy; +use Prophecy\Prophecy\MethodProphecy; +use Prophecy\Util\StringUtil; +use Prophecy\Exception\Prediction\UnexpectedCallsException; + +/** + * No calls prediction. + * + * @author Konstantin Kudryashov + */ +class NoCallsPrediction implements PredictionInterface +{ + private $util; + + /** + * Initializes prediction. + * + * @param null|StringUtil $util + */ + public function __construct(StringUtil $util = null) + { + $this->util = $util ?: new StringUtil; + } + + /** + * Tests that there were no calls made. + * + * @param Call[] $calls + * @param ObjectProphecy $object + * @param MethodProphecy $method + * + * @throws \Prophecy\Exception\Prediction\UnexpectedCallsException + */ + public function check(array $calls, ObjectProphecy $object, MethodProphecy $method) + { + if (!count($calls)) { + return; + } + + $verb = count($calls) === 1 ? 'was' : 'were'; + + throw new UnexpectedCallsException(sprintf( + "No calls expected that match:\n". + " %s->%s(%s)\n". + "but %d %s made:\n%s", + get_class($object->reveal()), + $method->getMethodName(), + $method->getArgumentsWildcard(), + count($calls), + $verb, + $this->util->stringifyCalls($calls) + ), $method, $calls); + } +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Prediction/PredictionInterface.php b/vendor/phpspec/prophecy/src/Prophecy/Prediction/PredictionInterface.php new file mode 100644 index 0000000..f7fb06a --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Prediction/PredictionInterface.php @@ -0,0 +1,37 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Prediction; + +use Prophecy\Call\Call; +use Prophecy\Prophecy\ObjectProphecy; +use Prophecy\Prophecy\MethodProphecy; + +/** + * Prediction interface. + * Predictions are logical test blocks, tied to `should...` keyword. + * + * @author Konstantin Kudryashov + */ +interface PredictionInterface +{ + /** + * Tests that double fulfilled prediction. + * + * @param Call[] $calls + * @param ObjectProphecy $object + * @param MethodProphecy $method + * + * @throws object + * @return void + */ + public function check(array $calls, ObjectProphecy $object, MethodProphecy $method); +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Promise/CallbackPromise.php b/vendor/phpspec/prophecy/src/Prophecy/Promise/CallbackPromise.php new file mode 100644 index 0000000..5f406bf --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Promise/CallbackPromise.php @@ -0,0 +1,66 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Promise; + +use Prophecy\Prophecy\ObjectProphecy; +use Prophecy\Prophecy\MethodProphecy; +use Prophecy\Exception\InvalidArgumentException; +use Closure; + +/** + * Callback promise. + * + * @author Konstantin Kudryashov + */ +class CallbackPromise implements PromiseInterface +{ + private $callback; + + /** + * Initializes callback promise. + * + * @param callable $callback Custom callback + * + * @throws \Prophecy\Exception\InvalidArgumentException + */ + public function __construct($callback) + { + if (!is_callable($callback)) { + throw new InvalidArgumentException(sprintf( + 'Callable expected as an argument to CallbackPromise, but got %s.', + gettype($callback) + )); + } + + $this->callback = $callback; + } + + /** + * Evaluates promise callback. + * + * @param array $args + * @param ObjectProphecy $object + * @param MethodProphecy $method + * + * @return mixed + */ + public function execute(array $args, ObjectProphecy $object, MethodProphecy $method) + { + $callback = $this->callback; + + if ($callback instanceof Closure && method_exists('Closure', 'bind')) { + $callback = Closure::bind($callback, $object); + } + + return call_user_func($callback, $args, $object, $method); + } +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Promise/PromiseInterface.php b/vendor/phpspec/prophecy/src/Prophecy/Promise/PromiseInterface.php new file mode 100644 index 0000000..382537b --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Promise/PromiseInterface.php @@ -0,0 +1,35 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Promise; + +use Prophecy\Prophecy\ObjectProphecy; +use Prophecy\Prophecy\MethodProphecy; + +/** + * Promise interface. + * Promises are logical blocks, tied to `will...` keyword. + * + * @author Konstantin Kudryashov + */ +interface PromiseInterface +{ + /** + * Evaluates promise. + * + * @param array $args + * @param ObjectProphecy $object + * @param MethodProphecy $method + * + * @return mixed + */ + public function execute(array $args, ObjectProphecy $object, MethodProphecy $method); +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Promise/ReturnArgumentPromise.php b/vendor/phpspec/prophecy/src/Prophecy/Promise/ReturnArgumentPromise.php new file mode 100644 index 0000000..39bfeea --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Promise/ReturnArgumentPromise.php @@ -0,0 +1,61 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Promise; + +use Prophecy\Exception\InvalidArgumentException; +use Prophecy\Prophecy\ObjectProphecy; +use Prophecy\Prophecy\MethodProphecy; + +/** + * Return argument promise. + * + * @author Konstantin Kudryashov + */ +class ReturnArgumentPromise implements PromiseInterface +{ + /** + * @var int + */ + private $index; + + /** + * Initializes callback promise. + * + * @param int $index The zero-indexed number of the argument to return + * + * @throws \Prophecy\Exception\InvalidArgumentException + */ + public function __construct($index = 0) + { + if (!is_int($index) || $index < 0) { + throw new InvalidArgumentException(sprintf( + 'Zero-based index expected as argument to ReturnArgumentPromise, but got %s.', + $index + )); + } + $this->index = $index; + } + + /** + * Returns nth argument if has one, null otherwise. + * + * @param array $args + * @param ObjectProphecy $object + * @param MethodProphecy $method + * + * @return null|mixed + */ + public function execute(array $args, ObjectProphecy $object, MethodProphecy $method) + { + return count($args) > $this->index ? $args[$this->index] : null; + } +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Promise/ReturnPromise.php b/vendor/phpspec/prophecy/src/Prophecy/Promise/ReturnPromise.php new file mode 100644 index 0000000..c7d5ac5 --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Promise/ReturnPromise.php @@ -0,0 +1,55 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Promise; + +use Prophecy\Prophecy\ObjectProphecy; +use Prophecy\Prophecy\MethodProphecy; + +/** + * Return promise. + * + * @author Konstantin Kudryashov + */ +class ReturnPromise implements PromiseInterface +{ + private $returnValues = array(); + + /** + * Initializes promise. + * + * @param array $returnValues Array of values + */ + public function __construct(array $returnValues) + { + $this->returnValues = $returnValues; + } + + /** + * Returns saved values one by one until last one, then continuously returns last value. + * + * @param array $args + * @param ObjectProphecy $object + * @param MethodProphecy $method + * + * @return mixed + */ + public function execute(array $args, ObjectProphecy $object, MethodProphecy $method) + { + $value = array_shift($this->returnValues); + + if (!count($this->returnValues)) { + $this->returnValues[] = $value; + } + + return $value; + } +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Promise/ThrowPromise.php b/vendor/phpspec/prophecy/src/Prophecy/Promise/ThrowPromise.php new file mode 100644 index 0000000..7250fa3 --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Promise/ThrowPromise.php @@ -0,0 +1,99 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Promise; + +use Doctrine\Instantiator\Instantiator; +use Prophecy\Prophecy\ObjectProphecy; +use Prophecy\Prophecy\MethodProphecy; +use Prophecy\Exception\InvalidArgumentException; +use ReflectionClass; + +/** + * Throw promise. + * + * @author Konstantin Kudryashov + */ +class ThrowPromise implements PromiseInterface +{ + private $exception; + + /** + * @var \Doctrine\Instantiator\Instantiator + */ + private $instantiator; + + /** + * Initializes promise. + * + * @param string|\Exception|\Throwable $exception Exception class name or instance + * + * @throws \Prophecy\Exception\InvalidArgumentException + */ + public function __construct($exception) + { + if (is_string($exception)) { + if (!class_exists($exception) || !$this->isAValidThrowable($exception)) { + throw new InvalidArgumentException(sprintf( + 'Exception / Throwable class or instance expected as argument to ThrowPromise, but got %s.', + $exception + )); + } + } elseif (!$exception instanceof \Exception && !$exception instanceof \Throwable) { + throw new InvalidArgumentException(sprintf( + 'Exception / Throwable class or instance expected as argument to ThrowPromise, but got %s.', + is_object($exception) ? get_class($exception) : gettype($exception) + )); + } + + $this->exception = $exception; + } + + /** + * Throws predefined exception. + * + * @param array $args + * @param ObjectProphecy $object + * @param MethodProphecy $method + * + * @throws object + */ + public function execute(array $args, ObjectProphecy $object, MethodProphecy $method) + { + if (is_string($this->exception)) { + $classname = $this->exception; + $reflection = new ReflectionClass($classname); + $constructor = $reflection->getConstructor(); + + if ($constructor->isPublic() && 0 == $constructor->getNumberOfRequiredParameters()) { + throw $reflection->newInstance(); + } + + if (!$this->instantiator) { + $this->instantiator = new Instantiator(); + } + + throw $this->instantiator->instantiate($classname); + } + + throw $this->exception; + } + + /** + * @param string $exception + * + * @return bool + */ + private function isAValidThrowable($exception) + { + return is_a($exception, 'Exception', true) || is_subclass_of($exception, 'Throwable', true); + } +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Prophecy/MethodProphecy.php b/vendor/phpspec/prophecy/src/Prophecy/Prophecy/MethodProphecy.php new file mode 100644 index 0000000..5c0ede9 --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Prophecy/MethodProphecy.php @@ -0,0 +1,464 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Prophecy; + +use Prophecy\Argument; +use Prophecy\Prophet; +use Prophecy\Promise; +use Prophecy\Prediction; +use Prophecy\Exception\Doubler\MethodNotFoundException; +use Prophecy\Exception\InvalidArgumentException; +use Prophecy\Exception\Prophecy\MethodProphecyException; + +/** + * Method prophecy. + * + * @author Konstantin Kudryashov + */ +class MethodProphecy +{ + private $objectProphecy; + private $methodName; + private $argumentsWildcard; + private $promise; + private $prediction; + private $checkedPredictions = array(); + private $bound = false; + private $voidReturnType = false; + + /** + * Initializes method prophecy. + * + * @param ObjectProphecy $objectProphecy + * @param string $methodName + * @param null|Argument\ArgumentsWildcard|array $arguments + * + * @throws \Prophecy\Exception\Doubler\MethodNotFoundException If method not found + */ + public function __construct(ObjectProphecy $objectProphecy, $methodName, $arguments = null) + { + $double = $objectProphecy->reveal(); + if (!method_exists($double, $methodName)) { + throw new MethodNotFoundException(sprintf( + 'Method `%s::%s()` is not defined.', get_class($double), $methodName + ), get_class($double), $methodName, $arguments); + } + + $this->objectProphecy = $objectProphecy; + $this->methodName = $methodName; + + $reflectedMethod = new \ReflectionMethod($double, $methodName); + if ($reflectedMethod->isFinal()) { + throw new MethodProphecyException(sprintf( + "Can not add prophecy for a method `%s::%s()`\n". + "as it is a final method.", + get_class($double), + $methodName + ), $this); + } + + if (null !== $arguments) { + $this->withArguments($arguments); + } + + if (version_compare(PHP_VERSION, '7.0', '>=') && true === $reflectedMethod->hasReturnType()) { + $type = (string) $reflectedMethod->getReturnType(); + + if ('void' === $type) { + $this->voidReturnType = true; + return; + } + + $this->will(function () use ($type) { + switch ($type) { + case 'string': return ''; + case 'float': return 0.0; + case 'int': return 0; + case 'bool': return false; + case 'array': return array(); + + case 'callable': + case 'Closure': + return function () {}; + + case 'Traversable': + case 'Generator': + // Remove eval() when minimum version >=5.5 + /** @var callable $generator */ + $generator = eval('return function () { yield; };'); + return $generator(); + + default: + $prophet = new Prophet; + return $prophet->prophesize($type)->reveal(); + } + }); + } + } + + /** + * Sets argument wildcard. + * + * @param array|Argument\ArgumentsWildcard $arguments + * + * @return $this + * + * @throws \Prophecy\Exception\InvalidArgumentException + */ + public function withArguments($arguments) + { + if (is_array($arguments)) { + $arguments = new Argument\ArgumentsWildcard($arguments); + } + + if (!$arguments instanceof Argument\ArgumentsWildcard) { + throw new InvalidArgumentException(sprintf( + "Either an array or an instance of ArgumentsWildcard expected as\n". + 'a `MethodProphecy::withArguments()` argument, but got %s.', + gettype($arguments) + )); + } + + $this->argumentsWildcard = $arguments; + + return $this; + } + + /** + * Sets custom promise to the prophecy. + * + * @param callable|Promise\PromiseInterface $promise + * + * @return $this + * + * @throws \Prophecy\Exception\InvalidArgumentException + */ + public function will($promise) + { + if (is_callable($promise)) { + $promise = new Promise\CallbackPromise($promise); + } + + if (!$promise instanceof Promise\PromiseInterface) { + throw new InvalidArgumentException(sprintf( + 'Expected callable or instance of PromiseInterface, but got %s.', + gettype($promise) + )); + } + + $this->bindToObjectProphecy(); + $this->promise = $promise; + + return $this; + } + + /** + * Sets return promise to the prophecy. + * + * @see Prophecy\Promise\ReturnPromise + * + * @return $this + */ + public function willReturn() + { + if ($this->voidReturnType) { + throw new MethodProphecyException( + "The method \"$this->methodName\" has a void return type, and so cannot return anything", + $this + ); + } + + return $this->will(new Promise\ReturnPromise(func_get_args())); + } + + /** + * Sets return argument promise to the prophecy. + * + * @param int $index The zero-indexed number of the argument to return + * + * @see Prophecy\Promise\ReturnArgumentPromise + * + * @return $this + */ + public function willReturnArgument($index = 0) + { + if ($this->voidReturnType) { + throw new MethodProphecyException("The method \"$this->methodName\" has a void return type", $this); + } + + return $this->will(new Promise\ReturnArgumentPromise($index)); + } + + /** + * Sets throw promise to the prophecy. + * + * @see Prophecy\Promise\ThrowPromise + * + * @param string|\Exception $exception Exception class or instance + * + * @return $this + */ + public function willThrow($exception) + { + return $this->will(new Promise\ThrowPromise($exception)); + } + + /** + * Sets custom prediction to the prophecy. + * + * @param callable|Prediction\PredictionInterface $prediction + * + * @return $this + * + * @throws \Prophecy\Exception\InvalidArgumentException + */ + public function should($prediction) + { + if (is_callable($prediction)) { + $prediction = new Prediction\CallbackPrediction($prediction); + } + + if (!$prediction instanceof Prediction\PredictionInterface) { + throw new InvalidArgumentException(sprintf( + 'Expected callable or instance of PredictionInterface, but got %s.', + gettype($prediction) + )); + } + + $this->bindToObjectProphecy(); + $this->prediction = $prediction; + + return $this; + } + + /** + * Sets call prediction to the prophecy. + * + * @see Prophecy\Prediction\CallPrediction + * + * @return $this + */ + public function shouldBeCalled() + { + return $this->should(new Prediction\CallPrediction); + } + + /** + * Sets no calls prediction to the prophecy. + * + * @see Prophecy\Prediction\NoCallsPrediction + * + * @return $this + */ + public function shouldNotBeCalled() + { + return $this->should(new Prediction\NoCallsPrediction); + } + + /** + * Sets call times prediction to the prophecy. + * + * @see Prophecy\Prediction\CallTimesPrediction + * + * @param $count + * + * @return $this + */ + public function shouldBeCalledTimes($count) + { + return $this->should(new Prediction\CallTimesPrediction($count)); + } + + /** + * Checks provided prediction immediately. + * + * @param callable|Prediction\PredictionInterface $prediction + * + * @return $this + * + * @throws \Prophecy\Exception\InvalidArgumentException + */ + public function shouldHave($prediction) + { + if (is_callable($prediction)) { + $prediction = new Prediction\CallbackPrediction($prediction); + } + + if (!$prediction instanceof Prediction\PredictionInterface) { + throw new InvalidArgumentException(sprintf( + 'Expected callable or instance of PredictionInterface, but got %s.', + gettype($prediction) + )); + } + + if (null === $this->promise && !$this->voidReturnType) { + $this->willReturn(); + } + + $calls = $this->getObjectProphecy()->findProphecyMethodCalls( + $this->getMethodName(), + $this->getArgumentsWildcard() + ); + + try { + $prediction->check($calls, $this->getObjectProphecy(), $this); + $this->checkedPredictions[] = $prediction; + } catch (\Exception $e) { + $this->checkedPredictions[] = $prediction; + + throw $e; + } + + return $this; + } + + /** + * Checks call prediction. + * + * @see Prophecy\Prediction\CallPrediction + * + * @return $this + */ + public function shouldHaveBeenCalled() + { + return $this->shouldHave(new Prediction\CallPrediction); + } + + /** + * Checks no calls prediction. + * + * @see Prophecy\Prediction\NoCallsPrediction + * + * @return $this + */ + public function shouldNotHaveBeenCalled() + { + return $this->shouldHave(new Prediction\NoCallsPrediction); + } + + /** + * Checks no calls prediction. + * + * @see Prophecy\Prediction\NoCallsPrediction + * @deprecated + * + * @return $this + */ + public function shouldNotBeenCalled() + { + return $this->shouldNotHaveBeenCalled(); + } + + /** + * Checks call times prediction. + * + * @see Prophecy\Prediction\CallTimesPrediction + * + * @param int $count + * + * @return $this + */ + public function shouldHaveBeenCalledTimes($count) + { + return $this->shouldHave(new Prediction\CallTimesPrediction($count)); + } + + /** + * Checks currently registered [with should(...)] prediction. + */ + public function checkPrediction() + { + if (null === $this->prediction) { + return; + } + + $this->shouldHave($this->prediction); + } + + /** + * Returns currently registered promise. + * + * @return null|Promise\PromiseInterface + */ + public function getPromise() + { + return $this->promise; + } + + /** + * Returns currently registered prediction. + * + * @return null|Prediction\PredictionInterface + */ + public function getPrediction() + { + return $this->prediction; + } + + /** + * Returns predictions that were checked on this object. + * + * @return Prediction\PredictionInterface[] + */ + public function getCheckedPredictions() + { + return $this->checkedPredictions; + } + + /** + * Returns object prophecy this method prophecy is tied to. + * + * @return ObjectProphecy + */ + public function getObjectProphecy() + { + return $this->objectProphecy; + } + + /** + * Returns method name. + * + * @return string + */ + public function getMethodName() + { + return $this->methodName; + } + + /** + * Returns arguments wildcard. + * + * @return Argument\ArgumentsWildcard + */ + public function getArgumentsWildcard() + { + return $this->argumentsWildcard; + } + + /** + * @return bool + */ + public function hasReturnVoid() + { + return $this->voidReturnType; + } + + private function bindToObjectProphecy() + { + if ($this->bound) { + return; + } + + $this->getObjectProphecy()->addMethodProphecy($this); + $this->bound = true; + } +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ObjectProphecy.php b/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ObjectProphecy.php new file mode 100644 index 0000000..8d8f8a1 --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ObjectProphecy.php @@ -0,0 +1,281 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Prophecy; + +use SebastianBergmann\Comparator\ComparisonFailure; +use Prophecy\Comparator\Factory as ComparatorFactory; +use Prophecy\Call\Call; +use Prophecy\Doubler\LazyDouble; +use Prophecy\Argument\ArgumentsWildcard; +use Prophecy\Call\CallCenter; +use Prophecy\Exception\Prophecy\ObjectProphecyException; +use Prophecy\Exception\Prophecy\MethodProphecyException; +use Prophecy\Exception\Prediction\AggregateException; +use Prophecy\Exception\Prediction\PredictionException; + +/** + * Object prophecy. + * + * @author Konstantin Kudryashov + */ +class ObjectProphecy implements ProphecyInterface +{ + private $lazyDouble; + private $callCenter; + private $revealer; + private $comparatorFactory; + + /** + * @var MethodProphecy[][] + */ + private $methodProphecies = array(); + + /** + * Initializes object prophecy. + * + * @param LazyDouble $lazyDouble + * @param CallCenter $callCenter + * @param RevealerInterface $revealer + * @param ComparatorFactory $comparatorFactory + */ + public function __construct( + LazyDouble $lazyDouble, + CallCenter $callCenter = null, + RevealerInterface $revealer = null, + ComparatorFactory $comparatorFactory = null + ) { + $this->lazyDouble = $lazyDouble; + $this->callCenter = $callCenter ?: new CallCenter; + $this->revealer = $revealer ?: new Revealer; + + $this->comparatorFactory = $comparatorFactory ?: ComparatorFactory::getInstance(); + } + + /** + * Forces double to extend specific class. + * + * @param string $class + * + * @return $this + */ + public function willExtend($class) + { + $this->lazyDouble->setParentClass($class); + + return $this; + } + + /** + * Forces double to implement specific interface. + * + * @param string $interface + * + * @return $this + */ + public function willImplement($interface) + { + $this->lazyDouble->addInterface($interface); + + return $this; + } + + /** + * Sets constructor arguments. + * + * @param array $arguments + * + * @return $this + */ + public function willBeConstructedWith(array $arguments = null) + { + $this->lazyDouble->setArguments($arguments); + + return $this; + } + + /** + * Reveals double. + * + * @return object + * + * @throws \Prophecy\Exception\Prophecy\ObjectProphecyException If double doesn't implement needed interface + */ + public function reveal() + { + $double = $this->lazyDouble->getInstance(); + + if (null === $double || !$double instanceof ProphecySubjectInterface) { + throw new ObjectProphecyException( + "Generated double must implement ProphecySubjectInterface, but it does not.\n". + 'It seems you have wrongly configured doubler without required ClassPatch.', + $this + ); + } + + $double->setProphecy($this); + + return $double; + } + + /** + * Adds method prophecy to object prophecy. + * + * @param MethodProphecy $methodProphecy + * + * @throws \Prophecy\Exception\Prophecy\MethodProphecyException If method prophecy doesn't + * have arguments wildcard + */ + public function addMethodProphecy(MethodProphecy $methodProphecy) + { + $argumentsWildcard = $methodProphecy->getArgumentsWildcard(); + if (null === $argumentsWildcard) { + throw new MethodProphecyException(sprintf( + "Can not add prophecy for a method `%s::%s()`\n". + "as you did not specify arguments wildcard for it.", + get_class($this->reveal()), + $methodProphecy->getMethodName() + ), $methodProphecy); + } + + $methodName = $methodProphecy->getMethodName(); + + if (!isset($this->methodProphecies[$methodName])) { + $this->methodProphecies[$methodName] = array(); + } + + $this->methodProphecies[$methodName][] = $methodProphecy; + } + + /** + * Returns either all or related to single method prophecies. + * + * @param null|string $methodName + * + * @return MethodProphecy[] + */ + public function getMethodProphecies($methodName = null) + { + if (null === $methodName) { + return $this->methodProphecies; + } + + if (!isset($this->methodProphecies[$methodName])) { + return array(); + } + + return $this->methodProphecies[$methodName]; + } + + /** + * Makes specific method call. + * + * @param string $methodName + * @param array $arguments + * + * @return mixed + */ + public function makeProphecyMethodCall($methodName, array $arguments) + { + $arguments = $this->revealer->reveal($arguments); + $return = $this->callCenter->makeCall($this, $methodName, $arguments); + + return $this->revealer->reveal($return); + } + + /** + * Finds calls by method name & arguments wildcard. + * + * @param string $methodName + * @param ArgumentsWildcard $wildcard + * + * @return Call[] + */ + public function findProphecyMethodCalls($methodName, ArgumentsWildcard $wildcard) + { + return $this->callCenter->findCalls($methodName, $wildcard); + } + + /** + * Checks that registered method predictions do not fail. + * + * @throws \Prophecy\Exception\Prediction\AggregateException If any of registered predictions fail + */ + public function checkProphecyMethodsPredictions() + { + $exception = new AggregateException(sprintf("%s:\n", get_class($this->reveal()))); + $exception->setObjectProphecy($this); + + foreach ($this->methodProphecies as $prophecies) { + foreach ($prophecies as $prophecy) { + try { + $prophecy->checkPrediction(); + } catch (PredictionException $e) { + $exception->append($e); + } + } + } + + if (count($exception->getExceptions())) { + throw $exception; + } + } + + /** + * Creates new method prophecy using specified method name and arguments. + * + * @param string $methodName + * @param array $arguments + * + * @return MethodProphecy + */ + public function __call($methodName, array $arguments) + { + $arguments = new ArgumentsWildcard($this->revealer->reveal($arguments)); + + foreach ($this->getMethodProphecies($methodName) as $prophecy) { + $argumentsWildcard = $prophecy->getArgumentsWildcard(); + $comparator = $this->comparatorFactory->getComparatorFor( + $argumentsWildcard, $arguments + ); + + try { + $comparator->assertEquals($argumentsWildcard, $arguments); + return $prophecy; + } catch (ComparisonFailure $failure) {} + } + + return new MethodProphecy($this, $methodName, $arguments); + } + + /** + * Tries to get property value from double. + * + * @param string $name + * + * @return mixed + */ + public function __get($name) + { + return $this->reveal()->$name; + } + + /** + * Tries to set property value to double. + * + * @param string $name + * @param mixed $value + */ + public function __set($name, $value) + { + $this->reveal()->$name = $this->revealer->reveal($value); + } +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ProphecyInterface.php b/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ProphecyInterface.php new file mode 100644 index 0000000..462f15a --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ProphecyInterface.php @@ -0,0 +1,27 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Prophecy; + +/** + * Core Prophecy interface. + * + * @author Konstantin Kudryashov + */ +interface ProphecyInterface +{ + /** + * Reveals prophecy object (double) . + * + * @return object + */ + public function reveal(); +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ProphecySubjectInterface.php b/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ProphecySubjectInterface.php new file mode 100644 index 0000000..2d83958 --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ProphecySubjectInterface.php @@ -0,0 +1,34 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Prophecy; + +/** + * Controllable doubles interface. + * + * @author Konstantin Kudryashov + */ +interface ProphecySubjectInterface +{ + /** + * Sets subject prophecy. + * + * @param ProphecyInterface $prophecy + */ + public function setProphecy(ProphecyInterface $prophecy); + + /** + * Returns subject prophecy. + * + * @return ProphecyInterface + */ + public function getProphecy(); +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Prophecy/Revealer.php b/vendor/phpspec/prophecy/src/Prophecy/Prophecy/Revealer.php new file mode 100644 index 0000000..60ecdac --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Prophecy/Revealer.php @@ -0,0 +1,44 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Prophecy; + +/** + * Basic prophecies revealer. + * + * @author Konstantin Kudryashov + */ +class Revealer implements RevealerInterface +{ + /** + * Unwraps value(s). + * + * @param mixed $value + * + * @return mixed + */ + public function reveal($value) + { + if (is_array($value)) { + return array_map(array($this, __FUNCTION__), $value); + } + + if (!is_object($value)) { + return $value; + } + + if ($value instanceof ProphecyInterface) { + $value = $value->reveal(); + } + + return $value; + } +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Prophecy/RevealerInterface.php b/vendor/phpspec/prophecy/src/Prophecy/Prophecy/RevealerInterface.php new file mode 100644 index 0000000..ffc82bb --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Prophecy/RevealerInterface.php @@ -0,0 +1,29 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Prophecy; + +/** + * Prophecies revealer interface. + * + * @author Konstantin Kudryashov + */ +interface RevealerInterface +{ + /** + * Unwraps value(s). + * + * @param mixed $value + * + * @return mixed + */ + public function reveal($value); +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Prophet.php b/vendor/phpspec/prophecy/src/Prophecy/Prophet.php new file mode 100644 index 0000000..ac64923 --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Prophet.php @@ -0,0 +1,134 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy; + +use Prophecy\Doubler\Doubler; +use Prophecy\Doubler\LazyDouble; +use Prophecy\Doubler\ClassPatch; +use Prophecy\Prophecy\ObjectProphecy; +use Prophecy\Prophecy\RevealerInterface; +use Prophecy\Prophecy\Revealer; +use Prophecy\Call\CallCenter; +use Prophecy\Util\StringUtil; +use Prophecy\Exception\Prediction\PredictionException; +use Prophecy\Exception\Prediction\AggregateException; + +/** + * Prophet creates prophecies. + * + * @author Konstantin Kudryashov + */ +class Prophet +{ + private $doubler; + private $revealer; + private $util; + + /** + * @var ObjectProphecy[] + */ + private $prophecies = array(); + + /** + * Initializes Prophet. + * + * @param null|Doubler $doubler + * @param null|RevealerInterface $revealer + * @param null|StringUtil $util + */ + public function __construct(Doubler $doubler = null, RevealerInterface $revealer = null, + StringUtil $util = null) + { + if (null === $doubler) { + $doubler = new Doubler; + $doubler->registerClassPatch(new ClassPatch\SplFileInfoPatch); + $doubler->registerClassPatch(new ClassPatch\TraversablePatch); + $doubler->registerClassPatch(new ClassPatch\DisableConstructorPatch); + $doubler->registerClassPatch(new ClassPatch\ProphecySubjectPatch); + $doubler->registerClassPatch(new ClassPatch\ReflectionClassNewInstancePatch); + $doubler->registerClassPatch(new ClassPatch\HhvmExceptionPatch()); + $doubler->registerClassPatch(new ClassPatch\MagicCallPatch); + $doubler->registerClassPatch(new ClassPatch\KeywordPatch); + } + + $this->doubler = $doubler; + $this->revealer = $revealer ?: new Revealer; + $this->util = $util ?: new StringUtil; + } + + /** + * Creates new object prophecy. + * + * @param null|string $classOrInterface Class or interface name + * + * @return ObjectProphecy + */ + public function prophesize($classOrInterface = null) + { + $this->prophecies[] = $prophecy = new ObjectProphecy( + new LazyDouble($this->doubler), + new CallCenter($this->util), + $this->revealer + ); + + if ($classOrInterface && class_exists($classOrInterface)) { + return $prophecy->willExtend($classOrInterface); + } + + if ($classOrInterface && interface_exists($classOrInterface)) { + return $prophecy->willImplement($classOrInterface); + } + + return $prophecy; + } + + /** + * Returns all created object prophecies. + * + * @return ObjectProphecy[] + */ + public function getProphecies() + { + return $this->prophecies; + } + + /** + * Returns Doubler instance assigned to this Prophet. + * + * @return Doubler + */ + public function getDoubler() + { + return $this->doubler; + } + + /** + * Checks all predictions defined by prophecies of this Prophet. + * + * @throws Exception\Prediction\AggregateException If any prediction fails + */ + public function checkPredictions() + { + $exception = new AggregateException("Some predictions failed:\n"); + foreach ($this->prophecies as $prophecy) { + try { + $prophecy->checkProphecyMethodsPredictions(); + } catch (PredictionException $e) { + $exception->append($e); + } + } + + if (count($exception->getExceptions())) { + throw $exception; + } + } +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Util/ExportUtil.php b/vendor/phpspec/prophecy/src/Prophecy/Util/ExportUtil.php new file mode 100644 index 0000000..50dd3f3 --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Util/ExportUtil.php @@ -0,0 +1,212 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/** + * This class is a modification from sebastianbergmann/exporter + * @see https://github.com/sebastianbergmann/exporter + */ +class ExportUtil +{ + /** + * Exports a value as a string + * + * The output of this method is similar to the output of print_r(), but + * improved in various aspects: + * + * - NULL is rendered as "null" (instead of "") + * - TRUE is rendered as "true" (instead of "1") + * - FALSE is rendered as "false" (instead of "") + * - Strings are always quoted with single quotes + * - Carriage returns and newlines are normalized to \n + * - Recursion and repeated rendering is treated properly + * + * @param mixed $value + * @param int $indentation The indentation level of the 2nd+ line + * @return string + */ + public static function export($value, $indentation = 0) + { + return self::recursiveExport($value, $indentation); + } + + /** + * Converts an object to an array containing all of its private, protected + * and public properties. + * + * @param mixed $value + * @return array + */ + public static function toArray($value) + { + if (!is_object($value)) { + return (array) $value; + } + + $array = array(); + + foreach ((array) $value as $key => $val) { + // properties are transformed to keys in the following way: + // private $property => "\0Classname\0property" + // protected $property => "\0*\0property" + // public $property => "property" + if (preg_match('/^\0.+\0(.+)$/', $key, $matches)) { + $key = $matches[1]; + } + + // See https://github.com/php/php-src/commit/5721132 + if ($key === "\0gcdata") { + continue; + } + + $array[$key] = $val; + } + + // Some internal classes like SplObjectStorage don't work with the + // above (fast) mechanism nor with reflection in Zend. + // Format the output similarly to print_r() in this case + if ($value instanceof \SplObjectStorage) { + // However, the fast method does work in HHVM, and exposes the + // internal implementation. Hide it again. + if (property_exists('\SplObjectStorage', '__storage')) { + unset($array['__storage']); + } elseif (property_exists('\SplObjectStorage', 'storage')) { + unset($array['storage']); + } + + if (property_exists('\SplObjectStorage', '__key')) { + unset($array['__key']); + } + + foreach ($value as $key => $val) { + $array[spl_object_hash($val)] = array( + 'obj' => $val, + 'inf' => $value->getInfo(), + ); + } + } + + return $array; + } + + /** + * Recursive implementation of export + * + * @param mixed $value The value to export + * @param int $indentation The indentation level of the 2nd+ line + * @param \SebastianBergmann\RecursionContext\Context $processed Previously processed objects + * @return string + * @see SebastianBergmann\Exporter\Exporter::export + */ + protected static function recursiveExport(&$value, $indentation, $processed = null) + { + if ($value === null) { + return 'null'; + } + + if ($value === true) { + return 'true'; + } + + if ($value === false) { + return 'false'; + } + + if (is_float($value) && floatval(intval($value)) === $value) { + return "$value.0"; + } + + if (is_resource($value)) { + return sprintf( + 'resource(%d) of type (%s)', + $value, + get_resource_type($value) + ); + } + + if (is_string($value)) { + // Match for most non printable chars somewhat taking multibyte chars into account + if (preg_match('/[^\x09-\x0d\x20-\xff]/', $value)) { + return 'Binary String: 0x' . bin2hex($value); + } + + return "'" . + str_replace(array("\r\n", "\n\r", "\r"), array("\n", "\n", "\n"), $value) . + "'"; + } + + $whitespace = str_repeat(' ', 4 * $indentation); + + if (!$processed) { + $processed = new Context; + } + + if (is_array($value)) { + if (($key = $processed->contains($value)) !== false) { + return 'Array &' . $key; + } + + $array = $value; + $key = $processed->add($value); + $values = ''; + + if (count($array) > 0) { + foreach ($array as $k => $v) { + $values .= sprintf( + '%s %s => %s' . "\n", + $whitespace, + self::recursiveExport($k, $indentation), + self::recursiveExport($value[$k], $indentation + 1, $processed) + ); + } + + $values = "\n" . $values . $whitespace; + } + + return sprintf('Array &%s (%s)', $key, $values); + } + + if (is_object($value)) { + $class = get_class($value); + + if ($value instanceof ProphecyInterface) { + return sprintf('%s Object (*Prophecy*)', $class); + } elseif ($hash = $processed->contains($value)) { + return sprintf('%s:%s Object', $class, $hash); + } + + $hash = $processed->add($value); + $values = ''; + $array = self::toArray($value); + + if (count($array) > 0) { + foreach ($array as $k => $v) { + $values .= sprintf( + '%s %s => %s' . "\n", + $whitespace, + self::recursiveExport($k, $indentation), + self::recursiveExport($v, $indentation + 1, $processed) + ); + } + + $values = "\n" . $values . $whitespace; + } + + return sprintf('%s:%s Object (%s)', $class, $hash, $values); + } + + return var_export($value, true); + } +} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Util/StringUtil.php b/vendor/phpspec/prophecy/src/Prophecy/Util/StringUtil.php new file mode 100644 index 0000000..bb90156 --- /dev/null +++ b/vendor/phpspec/prophecy/src/Prophecy/Util/StringUtil.php @@ -0,0 +1,89 @@ + + * Marcello Duarte + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Prophecy\Util; + +use Prophecy\Call\Call; + +/** + * String utility. + * + * @author Konstantin Kudryashov + */ +class StringUtil +{ + /** + * Stringifies any provided value. + * + * @param mixed $value + * @param boolean $exportObject + * + * @return string + */ + public function stringify($value, $exportObject = true) + { + if (is_array($value)) { + if (range(0, count($value) - 1) === array_keys($value)) { + return '['.implode(', ', array_map(array($this, __FUNCTION__), $value)).']'; + } + + $stringify = array($this, __FUNCTION__); + + return '['.implode(', ', array_map(function ($item, $key) use ($stringify) { + return (is_integer($key) ? $key : '"'.$key.'"'). + ' => '.call_user_func($stringify, $item); + }, $value, array_keys($value))).']'; + } + if (is_resource($value)) { + return get_resource_type($value).':'.$value; + } + if (is_object($value)) { + return $exportObject ? ExportUtil::export($value) : sprintf('%s:%s', get_class($value), spl_object_hash($value)); + } + if (true === $value || false === $value) { + return $value ? 'true' : 'false'; + } + if (is_string($value)) { + $str = sprintf('"%s"', str_replace("\n", '\\n', $value)); + + if (50 <= strlen($str)) { + return substr($str, 0, 50).'"...'; + } + + return $str; + } + if (null === $value) { + return 'null'; + } + + return (string) $value; + } + + /** + * Stringifies provided array of calls. + * + * @param Call[] $calls Array of Call instances + * + * @return string + */ + public function stringifyCalls(array $calls) + { + $self = $this; + + return implode(PHP_EOL, array_map(function (Call $call) use ($self) { + return sprintf(' - %s(%s) @ %s', + $call->getMethodName(), + implode(', ', array_map(array($self, 'stringify'), $call->getArguments())), + str_replace(GETCWD().DIRECTORY_SEPARATOR, '', $call->getCallPlace()) + ); + }, $calls)); + } +} diff --git a/vendor/phpspec/prophecy/tests/Doubler/Generator/ClassMirrorTest.php b/vendor/phpspec/prophecy/tests/Doubler/Generator/ClassMirrorTest.php new file mode 100644 index 0000000..77f3ad8 --- /dev/null +++ b/vendor/phpspec/prophecy/tests/Doubler/Generator/ClassMirrorTest.php @@ -0,0 +1,469 @@ +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/vendor/phpunit/php-code-coverage/.gitattributes b/vendor/phpunit/php-code-coverage/.gitattributes new file mode 100644 index 0000000..461090b --- /dev/null +++ b/vendor/phpunit/php-code-coverage/.gitattributes @@ -0,0 +1 @@ +*.php diff=php diff --git a/vendor/phpunit/php-code-coverage/.github/CONTRIBUTING.md b/vendor/phpunit/php-code-coverage/.github/CONTRIBUTING.md new file mode 100644 index 0000000..76a4345 --- /dev/null +++ b/vendor/phpunit/php-code-coverage/.github/CONTRIBUTING.md @@ -0,0 +1 @@ +Please refer to [https://github.com/sebastianbergmann/phpunit/blob/master/CONTRIBUTING.md](https://github.com/sebastianbergmann/phpunit/blob/master/CONTRIBUTING.md) for details on how to contribute to this project. diff --git a/vendor/phpunit/php-code-coverage/.github/ISSUE_TEMPLATE.md b/vendor/phpunit/php-code-coverage/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..dc8e3b0 --- /dev/null +++ b/vendor/phpunit/php-code-coverage/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,18 @@ +| Q | A +| --------------------------| --------------- +| php-code-coverage version | x.y.z +| PHP version | x.y.z +| Driver | Xdebug / PHPDBG +| Xdebug version (if used) | x.y.z +| Installation Method | Composer / PHPUnit PHAR +| Usage Method | PHPUnit / other +| PHPUnit version (if used) | x.y.z + + + diff --git a/vendor/phpunit/php-code-coverage/.gitignore b/vendor/phpunit/php-code-coverage/.gitignore new file mode 100644 index 0000000..603bc9e --- /dev/null +++ b/vendor/phpunit/php-code-coverage/.gitignore @@ -0,0 +1,6 @@ +/tests/_files/tmp +/vendor +/composer.lock +/.idea +/.php_cs.cache + diff --git a/vendor/phpunit/php-code-coverage/.php_cs b/vendor/phpunit/php-code-coverage/.php_cs new file mode 100644 index 0000000..de5cde1 --- /dev/null +++ b/vendor/phpunit/php-code-coverage/.php_cs @@ -0,0 +1,69 @@ +files() + ->in('src') + ->in('tests') + ->exclude('_files') + ->name('*.php'); + +return Symfony\CS\Config\Config::create() + ->setUsingCache(true) + ->level(\Symfony\CS\FixerInterface::NONE_LEVEL) + ->fixers( + array( + 'align_double_arrow', + 'align_equals', + 'braces', + 'concat_with_spaces', + 'duplicate_semicolon', + 'elseif', + 'empty_return', + 'encoding', + 'eof_ending', + 'extra_empty_lines', + 'function_call_space', + 'function_declaration', + 'indentation', + 'join_function', + 'line_after_namespace', + 'linefeed', + 'list_commas', + 'lowercase_constants', + 'lowercase_keywords', + 'method_argument_space', + 'multiple_use', + 'namespace_no_leading_whitespace', + 'no_blank_lines_after_class_opening', + 'no_empty_lines_after_phpdocs', + 'parenthesis', + 'php_closing_tag', + 'phpdoc_indent', + 'phpdoc_no_access', + 'phpdoc_no_empty_return', + 'phpdoc_no_package', + 'phpdoc_params', + 'phpdoc_scalar', + 'phpdoc_separation', + 'phpdoc_to_comment', + 'phpdoc_trim', + 'phpdoc_types', + 'phpdoc_var_without_name', + 'remove_lines_between_uses', + 'return', + 'self_accessor', + 'short_array_syntax', + 'short_tag', + 'single_line_after_imports', + 'single_quote', + 'spaces_before_semicolon', + 'spaces_cast', + 'ternary_spaces', + 'trailing_spaces', + 'trim_array_spaces', + 'unused_use', + 'visibility', + 'whitespacy_lines' + ) + ) + ->finder($finder); + diff --git a/vendor/phpunit/php-code-coverage/.travis.yml b/vendor/phpunit/php-code-coverage/.travis.yml new file mode 100644 index 0000000..96c6368 --- /dev/null +++ b/vendor/phpunit/php-code-coverage/.travis.yml @@ -0,0 +1,42 @@ +language: php + +php: + - 5.6 + - 7.0 + - 7.0snapshot + - 7.1 + - 7.1snapshot + - master + +env: + matrix: + - DRIVER="xdebug" + - DRIVER="phpdbg" + +matrix: + allow_failures: + - php: master + fast_finish: true + exclude: + - php: 5.6 + env: DRIVER="phpdbg" + +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: + - if [[ "$DRIVER" = 'phpdbg' ]]; then phpdbg -qrr vendor/bin/phpunit --coverage-clover=coverage.xml; fi + - if [[ "$DRIVER" = 'xdebug' ]]; then vendor/bin/phpunit --coverage-clover=coverage.xml; fi + +after_success: + - bash <(curl -s https://codecov.io/bash) + +notifications: + email: false + diff --git a/vendor/phpunit/php-code-coverage/ChangeLog-2.2.md b/vendor/phpunit/php-code-coverage/ChangeLog-2.2.md new file mode 100644 index 0000000..353b6f6 --- /dev/null +++ b/vendor/phpunit/php-code-coverage/ChangeLog-2.2.md @@ -0,0 +1,56 @@ +# Changes in PHP_CodeCoverage 2.2 + +All notable changes of the PHP_CodeCoverage 2.2 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. + +## [2.2.4] - 2015-10-06 + +### Fixed + +* Fixed [#391](https://github.com/sebastianbergmann/php-code-coverage/pull/391): Missing `` tag + +## [2.2.3] - 2015-09-14 + +### Fixed + +* Fixed [#368](https://github.com/sebastianbergmann/php-code-coverage/pull/368): Blacklists and whitelists are not merged when merging data sets +* Fixed [#370](https://github.com/sebastianbergmann/php-code-coverage/issues/370): Confusing statistics for source file that declares a class without methods +* Fixed [#372](https://github.com/sebastianbergmann/php-code-coverage/pull/372): Nested classes and functions are not handled correctly +* Fixed [#382](https://github.com/sebastianbergmann/php-code-coverage/issues/382): Crap4J report generates incorrect XML logfile + +## [2.2.2] - 2015-08-04 + +### Added + +* Reintroduced the `PHP_CodeCoverage_Driver_HHVM` driver as an extension of `PHP_CodeCoverage_Driver_Xdebug` that does not use `xdebug_start_code_coverage()` with options not supported by HHVM + +### Changed + +* Bumped required version of `sebastian/environment` to 1.3.2 for [#365](https://github.com/sebastianbergmann/php-code-coverage/issues/365) + +## [2.2.1] - 2015-08-02 + +### Changed + +* Bumped required version of `sebastian/environment` to 1.3.1 for [#365](https://github.com/sebastianbergmann/php-code-coverage/issues/365) + +## [2.2.0] - 2015-08-01 + +### Added + +* Added a driver for PHPDBG (requires PHP 7) +* Added `PHP_CodeCoverage::setDisableIgnoredLines()` to disable the ignoring of lines using annotations such as `@codeCoverageIgnore` + +### Changed + +* Annotating a method with `@deprecated` now has the same effect as annotating it with `@codeCoverageIgnore` + +### Removed + +* The dedicated driver for HHVM, `PHP_CodeCoverage_Driver_HHVM` has been removed + +[2.2.4]: https://github.com/sebastianbergmann/php-code-coverage/compare/2.2.3...2.2.4 +[2.2.3]: https://github.com/sebastianbergmann/php-code-coverage/compare/2.2.2...2.2.3 +[2.2.2]: https://github.com/sebastianbergmann/php-code-coverage/compare/2.2.1...2.2.2 +[2.2.1]: https://github.com/sebastianbergmann/php-code-coverage/compare/2.2.0...2.2.1 +[2.2.0]: https://github.com/sebastianbergmann/php-code-coverage/compare/2.1...2.2.0 + diff --git a/vendor/phpunit/php-code-coverage/ChangeLog-3.0.md b/vendor/phpunit/php-code-coverage/ChangeLog-3.0.md new file mode 100644 index 0000000..a39fa8d --- /dev/null +++ b/vendor/phpunit/php-code-coverage/ChangeLog-3.0.md @@ -0,0 +1,31 @@ +# Changes in PHP_CodeCoverage 3.0 + +All notable changes of the PHP_CodeCoverage 3.0 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. + +## [3.0.2] - 2015-11-12 + +### Changed + +* It is now optional that `@deprecated` code is ignored + +## [3.0.1] - 2015-10-06 + +### Fixed + +* Fixed [#391](https://github.com/sebastianbergmann/php-code-coverage/pull/391): Missing `` tag + +## [3.0.0] - 2015-10-02 + +### Changed + +* It is now mandatory to configure a whitelist + +### Removed + +* The blacklist functionality has been removed +* PHP_CodeCoverage is no longer supported on PHP 5.3, PHP 5.4, and PHP 5.5 + +[3.0.2]: https://github.com/sebastianbergmann/php-code-coverage/compare/3.0.1...3.0.2 +[3.0.1]: https://github.com/sebastianbergmann/php-code-coverage/compare/3.0.0...3.0.1 +[3.0.0]: https://github.com/sebastianbergmann/php-code-coverage/compare/2.2...3.0.0 + diff --git a/vendor/phpunit/php-code-coverage/ChangeLog-3.1.md b/vendor/phpunit/php-code-coverage/ChangeLog-3.1.md new file mode 100644 index 0000000..f7a0de9 --- /dev/null +++ b/vendor/phpunit/php-code-coverage/ChangeLog-3.1.md @@ -0,0 +1,30 @@ +# Changes in PHP_CodeCoverage 3.1 + +All notable changes of the PHP_CodeCoverage 3.1 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. + +## [3.1.1] - 2016-02-04 + +### Changed + +* Allow version 2.0.x of `sebastian/version` dependency + +## [3.1.0] - 2016-01-11 + +### Added + +* Implemented [#234](https://github.com/sebastianbergmann/php-code-coverage/issues/234): Optionally raise an exception when a specified unit of code is not executed + +### Changed + +* The Clover XML report now contains cyclomatic complexity information +* The Clover XML report now contains method visibility information +* Cleanup and refactoring of various areas of code +* Added missing test cases + +### Removed + +* The functionality controlled by the `mapTestClassNameToCoveredClassName` setting has been removed + +[3.1.1]: https://github.com/sebastianbergmann/php-code-coverage/compare/3.1.0...3.1.1 +[3.1.0]: https://github.com/sebastianbergmann/php-code-coverage/compare/3.0...3.1.0 + diff --git a/vendor/phpunit/php-code-coverage/ChangeLog-3.2.md b/vendor/phpunit/php-code-coverage/ChangeLog-3.2.md new file mode 100644 index 0000000..34c65cf --- /dev/null +++ b/vendor/phpunit/php-code-coverage/ChangeLog-3.2.md @@ -0,0 +1,23 @@ +# Changes in PHP_CodeCoverage 3.2 + +All notable changes of the PHP_CodeCoverage 3.2 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. + +## [3.2.1] - 2016-02-18 + +### Changed + +* Updated dependency information in `composer.json` + +## [3.2.0] - 2016-02-13 + +### Added + +* Added optional check for missing `@covers` annotation when the usage of `@covers` annotations is forced + +### Changed + +* Improved `PHP_CodeCoverage_UnintentionallyCoveredCodeException` message + +[3.2.1]: https://github.com/sebastianbergmann/php-code-coverage/compare/3.2.0...3.2.1 +[3.2.0]: https://github.com/sebastianbergmann/php-code-coverage/compare/3.1...3.2.0 + diff --git a/vendor/phpunit/php-code-coverage/ChangeLog-3.3.md b/vendor/phpunit/php-code-coverage/ChangeLog-3.3.md new file mode 100644 index 0000000..2cf1522 --- /dev/null +++ b/vendor/phpunit/php-code-coverage/ChangeLog-3.3.md @@ -0,0 +1,33 @@ +# Changes in PHP_CodeCoverage 3.3 + +All notable changes of the PHP_CodeCoverage 3.3 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. + +## [3.3.3] - 2016-MM-DD + +### Fixed + +* Fixed [#438](https://github.com/sebastianbergmann/php-code-coverage/issues/438): Wrong base directory for Clover reports + +## [3.3.2] - 2016-05-25 + +### Changed + +* The constructor of `PHP_CodeCoverage_Report_Text` now has default values for its parameters + +## [3.3.1] - 2016-04-08 + +### Fixed + +* Fixed handling of lines that contain `declare` statements + +## [3.3.0] - 2016-03-03 + +### Added + +* Added support for whitelisting classes for the unintentionally covered code unit check + +[3.3.3]: https://github.com/sebastianbergmann/php-code-coverage/compare/3.3.2...3.3.3 +[3.3.2]: https://github.com/sebastianbergmann/php-code-coverage/compare/3.3.1...3.3.2 +[3.3.1]: https://github.com/sebastianbergmann/php-code-coverage/compare/3.3.0...3.3.1 +[3.3.0]: https://github.com/sebastianbergmann/php-code-coverage/compare/3.2...3.3.0 + diff --git a/vendor/phpunit/php-code-coverage/ChangeLog-4.0.md b/vendor/phpunit/php-code-coverage/ChangeLog-4.0.md new file mode 100644 index 0000000..30df010 --- /dev/null +++ b/vendor/phpunit/php-code-coverage/ChangeLog-4.0.md @@ -0,0 +1,67 @@ +# Changes in PHP_CodeCoverage 4.0 + +All notable changes of the PHP_CodeCoverage 4.0 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. + +## [4.0.8] - 2017-04-02 + +* Fixed [#515](https://github.com/sebastianbergmann/php-code-coverage/pull/515): Wrong use of recursive iterator causing duplicate entries in XML coverage report + +## [4.0.7] - 2017-03-01 + +### Changed + +* Cleaned up requirements in `composer.json` + +## [4.0.6] - 2017-02-23 + +### Changed + +* Added support for `phpunit/php-token-stream` 2.0 +* Updated HTML report assets + +## [4.0.5] - 2017-01-20 + +### Fixed + +* Fixed formatting of executed lines percentage for classes in file view + +## [4.0.4] - 2016-12-20 + +### Changed + +* Implemented [#432](https://github.com/sebastianbergmann/php-code-coverage/issues/432): Change how files with no executable lines are displayed in the HTML report + +## [4.0.3] - 2016-11-28 + +### Changed + +* The check for unintentionally covered code is no longer performed for `@medium` and `@large` tests + +## [4.0.2] - 2016-11-01 + +### Fixed + +* Fixed [#440](https://github.com/sebastianbergmann/php-code-coverage/pull/440): Dashboard charts not showing tooltips for data points + +## [4.0.1] - 2016-07-26 + +### Fixed + +* Fixed [#458](https://github.com/sebastianbergmann/php-code-coverage/pull/458): XML report does not know about warning status + +## [4.0.0] - 2016-06-03 + +### Changed + +* This component now uses namespaces + +[4.0.8]: https://github.com/sebastianbergmann/php-code-coverage/compare/4.0.7...4.0.8 +[4.0.7]: https://github.com/sebastianbergmann/php-code-coverage/compare/4.0.6...4.0.7 +[4.0.6]: https://github.com/sebastianbergmann/php-code-coverage/compare/4.0.5...4.0.6 +[4.0.5]: https://github.com/sebastianbergmann/php-code-coverage/compare/4.0.4...4.0.5 +[4.0.4]: https://github.com/sebastianbergmann/php-code-coverage/compare/4.0.3...4.0.4 +[4.0.3]: https://github.com/sebastianbergmann/php-code-coverage/compare/4.0.2...4.0.3 +[4.0.2]: https://github.com/sebastianbergmann/php-code-coverage/compare/4.0.1...4.0.2 +[4.0.1]: https://github.com/sebastianbergmann/php-code-coverage/compare/4.0.0...4.0.1 +[4.0.0]: https://github.com/sebastianbergmann/php-code-coverage/compare/3.3...4.0.0 + diff --git a/vendor/phpunit/php-code-coverage/LICENSE b/vendor/phpunit/php-code-coverage/LICENSE new file mode 100644 index 0000000..fcfa37e --- /dev/null +++ b/vendor/phpunit/php-code-coverage/LICENSE @@ -0,0 +1,33 @@ +PHP_CodeCoverage + +Copyright (c) 2009-2015, Sebastian Bergmann . +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + * Neither the name of Sebastian Bergmann nor the names of his + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/phpunit/php-code-coverage/README.md b/vendor/phpunit/php-code-coverage/README.md new file mode 100644 index 0000000..c01384b --- /dev/null +++ b/vendor/phpunit/php-code-coverage/README.md @@ -0,0 +1,51 @@ +[![Latest Stable Version](https://poser.pugx.org/phpunit/php-code-coverage/v/stable.png)](https://packagist.org/packages/phpunit/php-code-coverage) +[![Build Status](https://travis-ci.org/sebastianbergmann/php-code-coverage.svg?branch=master)](https://travis-ci.org/sebastianbergmann/php-code-coverage) + +# PHP_CodeCoverage + +**PHP_CodeCoverage** is a library that provides collection, processing, and rendering functionality for PHP code coverage information. + +## Requirements + +PHP 5.6 is required but using the latest version of PHP is highly recommended. + +### PHP 5 + +[Xdebug](http://xdebug.org/) is the only source of raw code coverage data supported for PHP 5. Version 2.2.1 of Xdebug is required but using the latest version is highly recommended. + +### PHP 7 + +Version 2.4.0 (or later) of [Xdebug](http://xdebug.org/) as well as [phpdbg](http://phpdbg.com/docs) are supported sources of raw code coverage data for PHP 7. + +### HHVM + +A version of HHVM that implements the Xdebug API for code coverage (`xdebug_*_code_coverage()`) is required. + +## Installation + +You can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/): + + composer require phpunit/php-code-coverage + +If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency: + + composer require --dev phpunit/php-code-coverage + +## Using the PHP_CodeCoverage API + +```php +start(''); + +// ... + +$coverage->stop(); + +$writer = new \SebastianBergmann\CodeCoverage\Report\Clover; +$writer->process($coverage, '/tmp/clover.xml'); + +$writer = new \SebastianBergmann\CodeCoverage\Report\Html\Facade; +$writer->process($coverage, '/tmp/code-coverage-report'); +``` + diff --git a/vendor/phpunit/php-code-coverage/build.xml b/vendor/phpunit/php-code-coverage/build.xml new file mode 100644 index 0000000..d8168c2 --- /dev/null +++ b/vendor/phpunit/php-code-coverage/build.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/vendor/phpunit/php-code-coverage/composer.json b/vendor/phpunit/php-code-coverage/composer.json new file mode 100644 index 0000000..7ca434b --- /dev/null +++ b/vendor/phpunit/php-code-coverage/composer.json @@ -0,0 +1,51 @@ +{ + "name": "phpunit/php-code-coverage", + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "type": "library", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "license": "BSD-3-Clause", + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "irc": "irc://irc.freenode.net/phpunit" + }, + "require": { + "php": "^5.6 || ^7.0", + "ext-dom": "*", + "ext-xmlwriter": "*", + "phpunit/php-file-iterator": "^1.3", + "phpunit/php-token-stream": "^1.4.2 || ^2.0", + "phpunit/php-text-template": "^1.2", + "sebastian/code-unit-reverse-lookup": "^1.0", + "sebastian/environment": "^1.3.2 || ^2.0", + "sebastian/version": "^1.0 || ^2.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7", + "ext-xdebug": "^2.1.4" + }, + "suggest": { + "ext-xdebug": "^2.5.1" + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "extra": { + "branch-alias": { + "dev-master": "4.0.x-dev" + } + } +} diff --git a/vendor/phpunit/php-code-coverage/phpunit.xml b/vendor/phpunit/php-code-coverage/phpunit.xml new file mode 100644 index 0000000..55822f0 --- /dev/null +++ b/vendor/phpunit/php-code-coverage/phpunit.xml @@ -0,0 +1,21 @@ + + + + tests/tests + + + + + src + + + + + + + + diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage.php b/vendor/phpunit/php-code-coverage/src/CodeCoverage.php new file mode 100644 index 0000000..35dab3d --- /dev/null +++ b/vendor/phpunit/php-code-coverage/src/CodeCoverage.php @@ -0,0 +1,1107 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace SebastianBergmann\CodeCoverage; + +use SebastianBergmann\CodeCoverage\Driver\Driver; +use SebastianBergmann\CodeCoverage\Driver\Xdebug; +use SebastianBergmann\CodeCoverage\Driver\HHVM; +use SebastianBergmann\CodeCoverage\Driver\PHPDBG; +use SebastianBergmann\CodeCoverage\Node\Builder; +use SebastianBergmann\CodeCoverage\Node\Directory; +use SebastianBergmann\CodeUnitReverseLookup\Wizard; +use SebastianBergmann\Environment\Runtime; + +/** + * Provides collection functionality for PHP code coverage information. + */ +class CodeCoverage +{ + /** + * @var Driver + */ + private $driver; + + /** + * @var Filter + */ + private $filter; + + /** + * @var Wizard + */ + private $wizard; + + /** + * @var bool + */ + private $cacheTokens = false; + + /** + * @var bool + */ + private $checkForUnintentionallyCoveredCode = false; + + /** + * @var bool + */ + private $forceCoversAnnotation = false; + + /** + * @var bool + */ + private $checkForUnexecutedCoveredCode = false; + + /** + * @var bool + */ + private $checkForMissingCoversAnnotation = false; + + /** + * @var bool + */ + private $addUncoveredFilesFromWhitelist = true; + + /** + * @var bool + */ + private $processUncoveredFilesFromWhitelist = false; + + /** + * @var bool + */ + private $ignoreDeprecatedCode = false; + + /** + * @var mixed + */ + private $currentId; + + /** + * Code coverage data. + * + * @var array + */ + private $data = []; + + /** + * @var array + */ + private $ignoredLines = []; + + /** + * @var bool + */ + private $disableIgnoredLines = false; + + /** + * Test data. + * + * @var array + */ + private $tests = []; + + /** + * @var string[] + */ + private $unintentionallyCoveredSubclassesWhitelist = []; + + /** + * Determine if the data has been initialized or not + * + * @var bool + */ + private $isInitialized = false; + + /** + * Determine whether we need to check for dead and unused code on each test + * + * @var bool + */ + private $shouldCheckForDeadAndUnused = true; + + /** + * Constructor. + * + * @param Driver $driver + * @param Filter $filter + * + * @throws RuntimeException + */ + public function __construct(Driver $driver = null, Filter $filter = null) + { + if ($driver === null) { + $driver = $this->selectDriver(); + } + + if ($filter === null) { + $filter = new Filter; + } + + $this->driver = $driver; + $this->filter = $filter; + + $this->wizard = new Wizard; + } + + /** + * Returns the code coverage information as a graph of node objects. + * + * @return Directory + */ + public function getReport() + { + $builder = new Builder; + + return $builder->build($this); + } + + /** + * Clears collected code coverage data. + */ + public function clear() + { + $this->isInitialized = false; + $this->currentId = null; + $this->data = []; + $this->tests = []; + } + + /** + * Returns the filter object used. + * + * @return Filter + */ + public function filter() + { + return $this->filter; + } + + /** + * Returns the collected code coverage data. + * Set $raw = true to bypass all filters. + * + * @param bool $raw + * + * @return array + */ + public function getData($raw = false) + { + if (!$raw && $this->addUncoveredFilesFromWhitelist) { + $this->addUncoveredFilesFromWhitelist(); + } + + return $this->data; + } + + /** + * Sets the coverage data. + * + * @param array $data + */ + public function setData(array $data) + { + $this->data = $data; + } + + /** + * Returns the test data. + * + * @return array + */ + public function getTests() + { + return $this->tests; + } + + /** + * Sets the test data. + * + * @param array $tests + */ + public function setTests(array $tests) + { + $this->tests = $tests; + } + + /** + * Start collection of code coverage information. + * + * @param mixed $id + * @param bool $clear + * + * @throws InvalidArgumentException + */ + public function start($id, $clear = false) + { + if (!is_bool($clear)) { + throw InvalidArgumentException::create( + 1, + 'boolean' + ); + } + + if ($clear) { + $this->clear(); + } + + if ($this->isInitialized === false) { + $this->initializeData(); + } + + $this->currentId = $id; + + $this->driver->start($this->shouldCheckForDeadAndUnused); + } + + /** + * Stop collection of code coverage information. + * + * @param bool $append + * @param mixed $linesToBeCovered + * @param array $linesToBeUsed + * + * @return array + * + * @throws InvalidArgumentException + */ + public function stop($append = true, $linesToBeCovered = [], array $linesToBeUsed = []) + { + if (!is_bool($append)) { + throw InvalidArgumentException::create( + 1, + 'boolean' + ); + } + + if (!is_array($linesToBeCovered) && $linesToBeCovered !== false) { + throw InvalidArgumentException::create( + 2, + 'array or false' + ); + } + + $data = $this->driver->stop(); + $this->append($data, null, $append, $linesToBeCovered, $linesToBeUsed); + + $this->currentId = null; + + return $data; + } + + /** + * Appends code coverage data. + * + * @param array $data + * @param mixed $id + * @param bool $append + * @param mixed $linesToBeCovered + * @param array $linesToBeUsed + * + * @throws RuntimeException + */ + public function append(array $data, $id = null, $append = true, $linesToBeCovered = [], array $linesToBeUsed = []) + { + if ($id === null) { + $id = $this->currentId; + } + + if ($id === null) { + throw new RuntimeException; + } + + $this->applyListsFilter($data); + $this->applyIgnoredLinesFilter($data); + $this->initializeFilesThatAreSeenTheFirstTime($data); + + if (!$append) { + return; + } + + if ($id != 'UNCOVERED_FILES_FROM_WHITELIST') { + $this->applyCoversAnnotationFilter( + $data, + $linesToBeCovered, + $linesToBeUsed + ); + } + + if (empty($data)) { + return; + } + + $size = 'unknown'; + $status = null; + + if ($id instanceof \PHPUnit_Framework_TestCase) { + $_size = $id->getSize(); + + if ($_size == \PHPUnit_Util_Test::SMALL) { + $size = 'small'; + } elseif ($_size == \PHPUnit_Util_Test::MEDIUM) { + $size = 'medium'; + } elseif ($_size == \PHPUnit_Util_Test::LARGE) { + $size = 'large'; + } + + $status = $id->getStatus(); + $id = get_class($id) . '::' . $id->getName(); + } elseif ($id instanceof \PHPUnit_Extensions_PhptTestCase) { + $size = 'large'; + $id = $id->getName(); + } + + $this->tests[$id] = ['size' => $size, 'status' => $status]; + + foreach ($data as $file => $lines) { + if (!$this->filter->isFile($file)) { + continue; + } + + foreach ($lines as $k => $v) { + if ($v == Driver::LINE_EXECUTED) { + if (empty($this->data[$file][$k]) || !in_array($id, $this->data[$file][$k])) { + $this->data[$file][$k][] = $id; + } + } + } + } + } + + /** + * Merges the data from another instance. + * + * @param CodeCoverage $that + */ + public function merge(CodeCoverage $that) + { + $this->filter->setWhitelistedFiles( + array_merge($this->filter->getWhitelistedFiles(), $that->filter()->getWhitelistedFiles()) + ); + + foreach ($that->data as $file => $lines) { + if (!isset($this->data[$file])) { + if (!$this->filter->isFiltered($file)) { + $this->data[$file] = $lines; + } + + continue; + } + + foreach ($lines as $line => $data) { + if ($data !== null) { + if (!isset($this->data[$file][$line])) { + $this->data[$file][$line] = $data; + } else { + $this->data[$file][$line] = array_unique( + array_merge($this->data[$file][$line], $data) + ); + } + } + } + } + + $this->tests = array_merge($this->tests, $that->getTests()); + } + + /** + * @param bool $flag + * + * @throws InvalidArgumentException + */ + public function setCacheTokens($flag) + { + if (!is_bool($flag)) { + throw InvalidArgumentException::create( + 1, + 'boolean' + ); + } + + $this->cacheTokens = $flag; + } + + /** + * @return bool + */ + public function getCacheTokens() + { + return $this->cacheTokens; + } + + /** + * @param bool $flag + * + * @throws InvalidArgumentException + */ + public function setCheckForUnintentionallyCoveredCode($flag) + { + if (!is_bool($flag)) { + throw InvalidArgumentException::create( + 1, + 'boolean' + ); + } + + $this->checkForUnintentionallyCoveredCode = $flag; + } + + /** + * @param bool $flag + * + * @throws InvalidArgumentException + */ + public function setForceCoversAnnotation($flag) + { + if (!is_bool($flag)) { + throw InvalidArgumentException::create( + 1, + 'boolean' + ); + } + + $this->forceCoversAnnotation = $flag; + } + + /** + * @param bool $flag + * + * @throws InvalidArgumentException + */ + public function setCheckForMissingCoversAnnotation($flag) + { + if (!is_bool($flag)) { + throw InvalidArgumentException::create( + 1, + 'boolean' + ); + } + + $this->checkForMissingCoversAnnotation = $flag; + } + + /** + * @param bool $flag + * + * @throws InvalidArgumentException + */ + public function setCheckForUnexecutedCoveredCode($flag) + { + if (!is_bool($flag)) { + throw InvalidArgumentException::create( + 1, + 'boolean' + ); + } + + $this->checkForUnexecutedCoveredCode = $flag; + } + + /** + * @deprecated + * + * @param bool $flag + * + * @throws InvalidArgumentException + */ + public function setMapTestClassNameToCoveredClassName($flag) + { + } + + /** + * @param bool $flag + * + * @throws InvalidArgumentException + */ + public function setAddUncoveredFilesFromWhitelist($flag) + { + if (!is_bool($flag)) { + throw InvalidArgumentException::create( + 1, + 'boolean' + ); + } + + $this->addUncoveredFilesFromWhitelist = $flag; + } + + /** + * @param bool $flag + * + * @throws InvalidArgumentException + */ + public function setProcessUncoveredFilesFromWhitelist($flag) + { + if (!is_bool($flag)) { + throw InvalidArgumentException::create( + 1, + 'boolean' + ); + } + + $this->processUncoveredFilesFromWhitelist = $flag; + } + + /** + * @param bool $flag + * + * @throws InvalidArgumentException + */ + public function setDisableIgnoredLines($flag) + { + if (!is_bool($flag)) { + throw InvalidArgumentException::create( + 1, + 'boolean' + ); + } + + $this->disableIgnoredLines = $flag; + } + + /** + * @param bool $flag + * + * @throws InvalidArgumentException + */ + public function setIgnoreDeprecatedCode($flag) + { + if (!is_bool($flag)) { + throw InvalidArgumentException::create( + 1, + 'boolean' + ); + } + + $this->ignoreDeprecatedCode = $flag; + } + + /** + * @param array $whitelist + */ + public function setUnintentionallyCoveredSubclassesWhitelist(array $whitelist) + { + $this->unintentionallyCoveredSubclassesWhitelist = $whitelist; + } + + /** + * Applies the @covers annotation filtering. + * + * @param array $data + * @param mixed $linesToBeCovered + * @param array $linesToBeUsed + * + * @throws MissingCoversAnnotationException + * @throws UnintentionallyCoveredCodeException + */ + private function applyCoversAnnotationFilter(array &$data, $linesToBeCovered, array $linesToBeUsed) + { + if ($linesToBeCovered === false || + ($this->forceCoversAnnotation && empty($linesToBeCovered))) { + if ($this->checkForMissingCoversAnnotation) { + throw new MissingCoversAnnotationException; + } + + $data = []; + + return; + } + + if (empty($linesToBeCovered)) { + return; + } + + if ($this->checkForUnintentionallyCoveredCode && + (!$this->currentId instanceof \PHPUnit_Framework_TestCase || + (!$this->currentId->isMedium() && !$this->currentId->isLarge()))) { + $this->performUnintentionallyCoveredCodeCheck( + $data, + $linesToBeCovered, + $linesToBeUsed + ); + } + + if ($this->checkForUnexecutedCoveredCode) { + $this->performUnexecutedCoveredCodeCheck($data, $linesToBeCovered, $linesToBeUsed); + } + + $data = array_intersect_key($data, $linesToBeCovered); + + foreach (array_keys($data) as $filename) { + $_linesToBeCovered = array_flip($linesToBeCovered[$filename]); + + $data[$filename] = array_intersect_key( + $data[$filename], + $_linesToBeCovered + ); + } + } + + /** + * Applies the whitelist filtering. + * + * @param array $data + */ + private function applyListsFilter(array &$data) + { + foreach (array_keys($data) as $filename) { + if ($this->filter->isFiltered($filename)) { + unset($data[$filename]); + } + } + } + + /** + * Applies the "ignored lines" filtering. + * + * @param array $data + */ + private function applyIgnoredLinesFilter(array &$data) + { + foreach (array_keys($data) as $filename) { + if (!$this->filter->isFile($filename)) { + continue; + } + + foreach ($this->getLinesToBeIgnored($filename) as $line) { + unset($data[$filename][$line]); + } + } + } + + /** + * @param array $data + */ + private function initializeFilesThatAreSeenTheFirstTime(array $data) + { + foreach ($data as $file => $lines) { + if ($this->filter->isFile($file) && !isset($this->data[$file])) { + $this->data[$file] = []; + + foreach ($lines as $k => $v) { + $this->data[$file][$k] = $v == -2 ? null : []; + } + } + } + } + + /** + * Processes whitelisted files that are not covered. + */ + private function addUncoveredFilesFromWhitelist() + { + $data = []; + $uncoveredFiles = array_diff( + $this->filter->getWhitelist(), + array_keys($this->data) + ); + + foreach ($uncoveredFiles as $uncoveredFile) { + if (!file_exists($uncoveredFile)) { + continue; + } + + if (!$this->processUncoveredFilesFromWhitelist) { + $data[$uncoveredFile] = []; + + $lines = count(file($uncoveredFile)); + + for ($i = 1; $i <= $lines; $i++) { + $data[$uncoveredFile][$i] = Driver::LINE_NOT_EXECUTED; + } + } + } + + $this->append($data, 'UNCOVERED_FILES_FROM_WHITELIST'); + } + + /** + * Returns the lines of a source file that should be ignored. + * + * @param string $filename + * + * @return array + * + * @throws InvalidArgumentException + */ + private function getLinesToBeIgnored($filename) + { + if (!is_string($filename)) { + throw InvalidArgumentException::create( + 1, + 'string' + ); + } + + if (!isset($this->ignoredLines[$filename])) { + $this->ignoredLines[$filename] = []; + + if ($this->disableIgnoredLines) { + return $this->ignoredLines[$filename]; + } + + $ignore = false; + $stop = false; + $lines = file($filename); + $numLines = count($lines); + + foreach ($lines as $index => $line) { + if (!trim($line)) { + $this->ignoredLines[$filename][] = $index + 1; + } + } + + if ($this->cacheTokens) { + $tokens = \PHP_Token_Stream_CachingFactory::get($filename); + } else { + $tokens = new \PHP_Token_Stream($filename); + } + + $classes = array_merge($tokens->getClasses(), $tokens->getTraits()); + $tokens = $tokens->tokens(); + + foreach ($tokens as $token) { + switch (get_class($token)) { + case 'PHP_Token_COMMENT': + case 'PHP_Token_DOC_COMMENT': + $_token = trim($token); + $_line = trim($lines[$token->getLine() - 1]); + + if ($_token == '// @codeCoverageIgnore' || + $_token == '//@codeCoverageIgnore') { + $ignore = true; + $stop = true; + } elseif ($_token == '// @codeCoverageIgnoreStart' || + $_token == '//@codeCoverageIgnoreStart') { + $ignore = true; + } elseif ($_token == '// @codeCoverageIgnoreEnd' || + $_token == '//@codeCoverageIgnoreEnd') { + $stop = true; + } + + if (!$ignore) { + $start = $token->getLine(); + $end = $start + substr_count($token, "\n"); + + // Do not ignore the first line when there is a token + // before the comment + if (0 !== strpos($_token, $_line)) { + $start++; + } + + for ($i = $start; $i < $end; $i++) { + $this->ignoredLines[$filename][] = $i; + } + + // A DOC_COMMENT token or a COMMENT token starting with "/*" + // does not contain the final \n character in its text + if (isset($lines[$i-1]) && 0 === strpos($_token, '/*') && '*/' === substr(trim($lines[$i-1]), -2)) { + $this->ignoredLines[$filename][] = $i; + } + } + break; + + case 'PHP_Token_INTERFACE': + case 'PHP_Token_TRAIT': + case 'PHP_Token_CLASS': + case 'PHP_Token_FUNCTION': + /* @var \PHP_Token_Interface $token */ + + $docblock = $token->getDocblock(); + + $this->ignoredLines[$filename][] = $token->getLine(); + + if (strpos($docblock, '@codeCoverageIgnore') || ($this->ignoreDeprecatedCode && strpos($docblock, '@deprecated'))) { + $endLine = $token->getEndLine(); + + for ($i = $token->getLine(); $i <= $endLine; $i++) { + $this->ignoredLines[$filename][] = $i; + } + } elseif ($token instanceof \PHP_Token_INTERFACE || + $token instanceof \PHP_Token_TRAIT || + $token instanceof \PHP_Token_CLASS) { + if (empty($classes[$token->getName()]['methods'])) { + for ($i = $token->getLine(); + $i <= $token->getEndLine(); + $i++) { + $this->ignoredLines[$filename][] = $i; + } + } else { + $firstMethod = array_shift( + $classes[$token->getName()]['methods'] + ); + + do { + $lastMethod = array_pop( + $classes[$token->getName()]['methods'] + ); + } while ($lastMethod !== null && + substr($lastMethod['signature'], 0, 18) == 'anonymous function'); + + if ($lastMethod === null) { + $lastMethod = $firstMethod; + } + + for ($i = $token->getLine(); + $i < $firstMethod['startLine']; + $i++) { + $this->ignoredLines[$filename][] = $i; + } + + for ($i = $token->getEndLine(); + $i > $lastMethod['endLine']; + $i--) { + $this->ignoredLines[$filename][] = $i; + } + } + } + break; + + case 'PHP_Token_NAMESPACE': + $this->ignoredLines[$filename][] = $token->getEndLine(); + + // Intentional fallthrough + case 'PHP_Token_DECLARE': + case 'PHP_Token_OPEN_TAG': + case 'PHP_Token_CLOSE_TAG': + case 'PHP_Token_USE': + $this->ignoredLines[$filename][] = $token->getLine(); + break; + } + + if ($ignore) { + $this->ignoredLines[$filename][] = $token->getLine(); + + if ($stop) { + $ignore = false; + $stop = false; + } + } + } + + $this->ignoredLines[$filename][] = $numLines + 1; + + $this->ignoredLines[$filename] = array_unique( + $this->ignoredLines[$filename] + ); + + sort($this->ignoredLines[$filename]); + } + + return $this->ignoredLines[$filename]; + } + + /** + * @param array $data + * @param array $linesToBeCovered + * @param array $linesToBeUsed + * + * @throws UnintentionallyCoveredCodeException + */ + private function performUnintentionallyCoveredCodeCheck(array &$data, array $linesToBeCovered, array $linesToBeUsed) + { + $allowedLines = $this->getAllowedLines( + $linesToBeCovered, + $linesToBeUsed + ); + + $unintentionallyCoveredUnits = []; + + foreach ($data as $file => $_data) { + foreach ($_data as $line => $flag) { + if ($flag == 1 && !isset($allowedLines[$file][$line])) { + $unintentionallyCoveredUnits[] = $this->wizard->lookup($file, $line); + } + } + } + + $unintentionallyCoveredUnits = $this->processUnintentionallyCoveredUnits($unintentionallyCoveredUnits); + + if (!empty($unintentionallyCoveredUnits)) { + throw new UnintentionallyCoveredCodeException( + $unintentionallyCoveredUnits + ); + } + } + + /** + * @param array $data + * @param array $linesToBeCovered + * @param array $linesToBeUsed + * + * @throws CoveredCodeNotExecutedException + */ + private function performUnexecutedCoveredCodeCheck(array &$data, array $linesToBeCovered, array $linesToBeUsed) + { + $expectedLines = $this->getAllowedLines( + $linesToBeCovered, + $linesToBeUsed + ); + + foreach ($data as $file => $_data) { + foreach (array_keys($_data) as $line) { + if (!isset($expectedLines[$file][$line])) { + continue; + } + + unset($expectedLines[$file][$line]); + } + } + + $message = ''; + + foreach ($expectedLines as $file => $lines) { + if (empty($lines)) { + continue; + } + + foreach (array_keys($lines) as $line) { + $message .= sprintf('- %s:%d' . PHP_EOL, $file, $line); + } + } + + if (!empty($message)) { + throw new CoveredCodeNotExecutedException($message); + } + } + + /** + * @param array $linesToBeCovered + * @param array $linesToBeUsed + * + * @return array + */ + private function getAllowedLines(array $linesToBeCovered, array $linesToBeUsed) + { + $allowedLines = []; + + foreach (array_keys($linesToBeCovered) as $file) { + if (!isset($allowedLines[$file])) { + $allowedLines[$file] = []; + } + + $allowedLines[$file] = array_merge( + $allowedLines[$file], + $linesToBeCovered[$file] + ); + } + + foreach (array_keys($linesToBeUsed) as $file) { + if (!isset($allowedLines[$file])) { + $allowedLines[$file] = []; + } + + $allowedLines[$file] = array_merge( + $allowedLines[$file], + $linesToBeUsed[$file] + ); + } + + foreach (array_keys($allowedLines) as $file) { + $allowedLines[$file] = array_flip( + array_unique($allowedLines[$file]) + ); + } + + return $allowedLines; + } + + /** + * @return Driver + * + * @throws RuntimeException + */ + private function selectDriver() + { + $runtime = new Runtime; + + if (!$runtime->canCollectCodeCoverage()) { + throw new RuntimeException('No code coverage driver available'); + } + + if ($runtime->isHHVM()) { + return new HHVM; + } elseif ($runtime->isPHPDBG()) { + return new PHPDBG; + } else { + return new Xdebug; + } + } + + /** + * @param array $unintentionallyCoveredUnits + * + * @return array + */ + private function processUnintentionallyCoveredUnits(array $unintentionallyCoveredUnits) + { + $unintentionallyCoveredUnits = array_unique($unintentionallyCoveredUnits); + sort($unintentionallyCoveredUnits); + + foreach (array_keys($unintentionallyCoveredUnits) as $k => $v) { + $unit = explode('::', $unintentionallyCoveredUnits[$k]); + + if (count($unit) != 2) { + continue; + } + + $class = new \ReflectionClass($unit[0]); + + foreach ($this->unintentionallyCoveredSubclassesWhitelist as $whitelisted) { + if ($class->isSubclassOf($whitelisted)) { + unset($unintentionallyCoveredUnits[$k]); + break; + } + } + } + + return array_values($unintentionallyCoveredUnits); + } + + /** + * If we are processing uncovered files from whitelist, + * we can initialize the data before we start to speed up the tests + */ + protected function initializeData() + { + $this->isInitialized = true; + + if ($this->processUncoveredFilesFromWhitelist) { + $this->shouldCheckForDeadAndUnused = false; + + $this->driver->start(true); + + foreach ($this->filter->getWhitelist() as $file) { + if ($this->filter->isFile($file)) { + include_once($file); + } + } + + $data = []; + $coverage = $this->driver->stop(); + + foreach ($coverage as $file => $fileCoverage) { + if ($this->filter->isFiltered($file)) { + continue; + } + + foreach (array_keys($fileCoverage) as $key) { + if ($fileCoverage[$key] == Driver::LINE_EXECUTED) { + $fileCoverage[$key] = Driver::LINE_NOT_EXECUTED; + } + } + + $data[$file] = $fileCoverage; + } + + $this->append($data, 'UNCOVERED_FILES_FROM_WHITELIST'); + } + } +} diff --git a/vendor/phpunit/php-code-coverage/src/Driver/Driver.php b/vendor/phpunit/php-code-coverage/src/Driver/Driver.php new file mode 100644 index 0000000..bdd1b97 --- /dev/null +++ b/vendor/phpunit/php-code-coverage/src/Driver/Driver.php @@ -0,0 +1,52 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace SebastianBergmann\CodeCoverage\Driver; + +/** + * Interface for code coverage drivers. + */ +interface Driver +{ + /** + * @var int + * + * @see http://xdebug.org/docs/code_coverage + */ + const LINE_EXECUTED = 1; + + /** + * @var int + * + * @see http://xdebug.org/docs/code_coverage + */ + const LINE_NOT_EXECUTED = -1; + + /** + * @var int + * + * @see http://xdebug.org/docs/code_coverage + */ + const LINE_NOT_EXECUTABLE = -2; + + /** + * Start collection of code coverage information. + * + * @param bool $determineUnusedAndDead + */ + public function start($determineUnusedAndDead = true); + + /** + * Stop collection of code coverage information. + * + * @return array + */ + public function stop(); +} diff --git a/vendor/phpunit/php-code-coverage/src/Driver/HHVM.php b/vendor/phpunit/php-code-coverage/src/Driver/HHVM.php new file mode 100644 index 0000000..b35ea81 --- /dev/null +++ b/vendor/phpunit/php-code-coverage/src/Driver/HHVM.php @@ -0,0 +1,29 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace SebastianBergmann\CodeCoverage\Driver; + +/** + * Driver for HHVM's code coverage functionality. + * + * @codeCoverageIgnore + */ +class HHVM extends Xdebug +{ + /** + * Start collection of code coverage information. + * + * @param bool $determineUnusedAndDead + */ + public function start($determineUnusedAndDead = true) + { + xdebug_start_code_coverage(); + } +} diff --git a/vendor/phpunit/php-code-coverage/src/Driver/PHPDBG.php b/vendor/phpunit/php-code-coverage/src/Driver/PHPDBG.php new file mode 100644 index 0000000..86cc844 --- /dev/null +++ b/vendor/phpunit/php-code-coverage/src/Driver/PHPDBG.php @@ -0,0 +1,111 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace SebastianBergmann\CodeCoverage\Driver; + +use SebastianBergmann\CodeCoverage\RuntimeException; + +/** + * Driver for PHPDBG's code coverage functionality. + * + * @codeCoverageIgnore + */ +class PHPDBG implements Driver +{ + /** + * Constructor. + */ + public function __construct() + { + if (PHP_SAPI !== 'phpdbg') { + throw new RuntimeException( + 'This driver requires the PHPDBG SAPI' + ); + } + + if (!function_exists('phpdbg_start_oplog')) { + throw new RuntimeException( + 'This build of PHPDBG does not support code coverage' + ); + } + } + + /** + * Start collection of code coverage information. + * + * @param bool $determineUnusedAndDead + */ + public function start($determineUnusedAndDead = true) + { + phpdbg_start_oplog(); + } + + /** + * Stop collection of code coverage information. + * + * @return array + */ + public function stop() + { + static $fetchedLines = []; + + $dbgData = phpdbg_end_oplog(); + + if ($fetchedLines == []) { + $sourceLines = phpdbg_get_executable(); + } else { + $newFiles = array_diff( + get_included_files(), + array_keys($fetchedLines) + ); + + if ($newFiles) { + $sourceLines = phpdbg_get_executable( + ['files' => $newFiles] + ); + } else { + $sourceLines = []; + } + } + + foreach ($sourceLines as $file => $lines) { + foreach ($lines as $lineNo => $numExecuted) { + $sourceLines[$file][$lineNo] = self::LINE_NOT_EXECUTED; + } + } + + $fetchedLines = array_merge($fetchedLines, $sourceLines); + + return $this->detectExecutedLines($fetchedLines, $dbgData); + } + + /** + * Convert phpdbg based data into the format CodeCoverage expects + * + * @param array $sourceLines + * @param array $dbgData + * + * @return array + */ + private function detectExecutedLines(array $sourceLines, array $dbgData) + { + foreach ($dbgData as $file => $coveredLines) { + foreach ($coveredLines as $lineNo => $numExecuted) { + // phpdbg also reports $lineNo=0 when e.g. exceptions get thrown. + // make sure we only mark lines executed which are actually executable. + if (isset($sourceLines[$file][$lineNo])) { + $sourceLines[$file][$lineNo] = self::LINE_EXECUTED; + } + } + } + + return $sourceLines; + } +} diff --git a/vendor/phpunit/php-code-coverage/src/Driver/Xdebug.php b/vendor/phpunit/php-code-coverage/src/Driver/Xdebug.php new file mode 100644 index 0000000..30099e0 --- /dev/null +++ b/vendor/phpunit/php-code-coverage/src/Driver/Xdebug.php @@ -0,0 +1,117 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace SebastianBergmann\CodeCoverage\Driver; + +use SebastianBergmann\CodeCoverage\RuntimeException; + +/** + * Driver for Xdebug's code coverage functionality. + * + * @codeCoverageIgnore + */ +class Xdebug implements Driver +{ + /** + * Cache the number of lines for each file + * + * @var array + */ + private $cacheNumLines = []; + + /** + * Constructor. + */ + public function __construct() + { + if (!extension_loaded('xdebug')) { + throw new RuntimeException('This driver requires Xdebug'); + } + + if (version_compare(phpversion('xdebug'), '2.2.1', '>=') && + !ini_get('xdebug.coverage_enable')) { + throw new RuntimeException( + 'xdebug.coverage_enable=On has to be set in php.ini' + ); + } + } + + /** + * Start collection of code coverage information. + * + * @param bool $determineUnusedAndDead + */ + public function start($determineUnusedAndDead = true) + { + if ($determineUnusedAndDead) { + xdebug_start_code_coverage(XDEBUG_CC_UNUSED | XDEBUG_CC_DEAD_CODE); + } else { + xdebug_start_code_coverage(); + } + } + + /** + * Stop collection of code coverage information. + * + * @return array + */ + public function stop() + { + $data = xdebug_get_code_coverage(); + xdebug_stop_code_coverage(); + + return $this->cleanup($data); + } + + /** + * @param array $data + * + * @return array + */ + private function cleanup(array $data) + { + foreach (array_keys($data) as $file) { + unset($data[$file][0]); + + if (strpos($file, 'xdebug://debug-eval') !== 0 && file_exists($file)) { + $numLines = $this->getNumberOfLinesInFile($file); + + foreach (array_keys($data[$file]) as $line) { + if ($line > $numLines) { + unset($data[$file][$line]); + } + } + } + } + + return $data; + } + + /** + * @param string $file + * + * @return int + */ + private function getNumberOfLinesInFile($file) + { + if (!isset($this->cacheNumLines[$file])) { + $buffer = file_get_contents($file); + $lines = substr_count($buffer, "\n"); + + if (substr($buffer, -1) !== "\n") { + $lines++; + } + + $this->cacheNumLines[$file] = $lines; + } + + return $this->cacheNumLines[$file]; + } +} diff --git a/vendor/phpunit/php-code-coverage/src/Exception/CoveredCodeNotExecutedException.php b/vendor/phpunit/php-code-coverage/src/Exception/CoveredCodeNotExecutedException.php new file mode 100644 index 0000000..ca28a23 --- /dev/null +++ b/vendor/phpunit/php-code-coverage/src/Exception/CoveredCodeNotExecutedException.php @@ -0,0 +1,18 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace SebastianBergmann\CodeCoverage; + +/** + * Exception that is raised when covered code is not executed. + */ +class CoveredCodeNotExecutedException extends RuntimeException +{ +} diff --git a/vendor/phpunit/php-code-coverage/src/Exception/Exception.php b/vendor/phpunit/php-code-coverage/src/Exception/Exception.php new file mode 100644 index 0000000..a3ba4c4 --- /dev/null +++ b/vendor/phpunit/php-code-coverage/src/Exception/Exception.php @@ -0,0 +1,18 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace SebastianBergmann\CodeCoverage; + +/** + * Exception interface for php-code-coverage component. + */ +interface Exception +{ +} diff --git a/vendor/phpunit/php-code-coverage/src/Exception/InvalidArgumentException.php b/vendor/phpunit/php-code-coverage/src/Exception/InvalidArgumentException.php new file mode 100644 index 0000000..1733f6c --- /dev/null +++ b/vendor/phpunit/php-code-coverage/src/Exception/InvalidArgumentException.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace SebastianBergmann\CodeCoverage; + +class InvalidArgumentException extends \InvalidArgumentException implements Exception +{ + /** + * @param int $argument + * @param string $type + * @param mixed $value + * + * @return InvalidArgumentException + */ + public static function create($argument, $type, $value = null) + { + $stack = debug_backtrace(0); + + return new self( + sprintf( + 'Argument #%d%sof %s::%s() must be a %s', + $argument, + $value !== null ? ' (' . gettype($value) . '#' . $value . ')' : ' (No Value) ', + $stack[1]['class'], + $stack[1]['function'], + $type + ) + ); + } +} diff --git a/vendor/phpunit/php-code-coverage/src/Exception/MissingCoversAnnotationException.php b/vendor/phpunit/php-code-coverage/src/Exception/MissingCoversAnnotationException.php new file mode 100644 index 0000000..7bc5cf3 --- /dev/null +++ b/vendor/phpunit/php-code-coverage/src/Exception/MissingCoversAnnotationException.php @@ -0,0 +1,18 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace SebastianBergmann\CodeCoverage; + +/** + * Exception that is raised when @covers must be used but is not. + */ +class MissingCoversAnnotationException extends RuntimeException +{ +} diff --git a/vendor/phpunit/php-code-coverage/src/Exception/RuntimeException.php b/vendor/phpunit/php-code-coverage/src/Exception/RuntimeException.php new file mode 100644 index 0000000..c143db7 --- /dev/null +++ b/vendor/phpunit/php-code-coverage/src/Exception/RuntimeException.php @@ -0,0 +1,15 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace SebastianBergmann\CodeCoverage; + +class RuntimeException extends \RuntimeException implements Exception +{ +} diff --git a/vendor/phpunit/php-code-coverage/src/Exception/UnintentionallyCoveredCodeException.php b/vendor/phpunit/php-code-coverage/src/Exception/UnintentionallyCoveredCodeException.php new file mode 100644 index 0000000..3ea542b --- /dev/null +++ b/vendor/phpunit/php-code-coverage/src/Exception/UnintentionallyCoveredCodeException.php @@ -0,0 +1,54 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace SebastianBergmann\CodeCoverage; + +/** + * Exception that is raised when code is unintentionally covered. + */ +class UnintentionallyCoveredCodeException extends RuntimeException +{ + /** + * @var array + */ + private $unintentionallyCoveredUnits = []; + + /** + * @param array $unintentionallyCoveredUnits + */ + public function __construct(array $unintentionallyCoveredUnits) + { + $this->unintentionallyCoveredUnits = $unintentionallyCoveredUnits; + + parent::__construct($this->toString()); + } + + /** + * @return array + */ + public function getUnintentionallyCoveredUnits() + { + return $this->unintentionallyCoveredUnits; + } + + /** + * @return string + */ + private function toString() + { + $message = ''; + + foreach ($this->unintentionallyCoveredUnits as $unit) { + $message .= '- ' . $unit . "\n"; + } + + return $message; + } +} diff --git a/vendor/phpunit/php-code-coverage/src/Filter.php b/vendor/phpunit/php-code-coverage/src/Filter.php new file mode 100644 index 0000000..771a657 --- /dev/null +++ b/vendor/phpunit/php-code-coverage/src/Filter.php @@ -0,0 +1,173 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace SebastianBergmann\CodeCoverage; + +/** + * Filter for whitelisting of code coverage information. + */ +class Filter +{ + /** + * Source files that are whitelisted. + * + * @var array + */ + private $whitelistedFiles = []; + + /** + * Adds a directory to the whitelist (recursively). + * + * @param string $directory + * @param string $suffix + * @param string $prefix + */ + public function addDirectoryToWhitelist($directory, $suffix = '.php', $prefix = '') + { + $facade = new \File_Iterator_Facade; + $files = $facade->getFilesAsArray($directory, $suffix, $prefix); + + foreach ($files as $file) { + $this->addFileToWhitelist($file); + } + } + + /** + * Adds a file to the whitelist. + * + * @param string $filename + */ + public function addFileToWhitelist($filename) + { + $this->whitelistedFiles[realpath($filename)] = true; + } + + /** + * Adds files to the whitelist. + * + * @param array $files + */ + public function addFilesToWhitelist(array $files) + { + foreach ($files as $file) { + $this->addFileToWhitelist($file); + } + } + + /** + * Removes a directory from the whitelist (recursively). + * + * @param string $directory + * @param string $suffix + * @param string $prefix + */ + public function removeDirectoryFromWhitelist($directory, $suffix = '.php', $prefix = '') + { + $facade = new \File_Iterator_Facade; + $files = $facade->getFilesAsArray($directory, $suffix, $prefix); + + foreach ($files as $file) { + $this->removeFileFromWhitelist($file); + } + } + + /** + * Removes a file from the whitelist. + * + * @param string $filename + */ + public function removeFileFromWhitelist($filename) + { + $filename = realpath($filename); + + unset($this->whitelistedFiles[$filename]); + } + + /** + * Checks whether a filename is a real filename. + * + * @param string $filename + * + * @return bool + */ + public function isFile($filename) + { + if ($filename == '-' || + strpos($filename, 'vfs://') === 0 || + strpos($filename, 'xdebug://debug-eval') !== false || + strpos($filename, 'eval()\'d code') !== false || + strpos($filename, 'runtime-created function') !== false || + strpos($filename, 'runkit created function') !== false || + strpos($filename, 'assert code') !== false || + strpos($filename, 'regexp code') !== false) { + return false; + } + + return file_exists($filename); + } + + /** + * Checks whether or not a file is filtered. + * + * @param string $filename + * + * @return bool + */ + public function isFiltered($filename) + { + if (!$this->isFile($filename)) { + return true; + } + + $filename = realpath($filename); + + return !isset($this->whitelistedFiles[$filename]); + } + + /** + * Returns the list of whitelisted files. + * + * @return array + */ + public function getWhitelist() + { + return array_keys($this->whitelistedFiles); + } + + /** + * Returns whether this filter has a whitelist. + * + * @return bool + */ + public function hasWhitelist() + { + return !empty($this->whitelistedFiles); + } + + /** + * Returns the whitelisted files. + * + * @return array + */ + public function getWhitelistedFiles() + { + return $this->whitelistedFiles; + } + + /** + * Sets the whitelisted files. + * + * @param array $whitelistedFiles + */ + public function setWhitelistedFiles($whitelistedFiles) + { + $this->whitelistedFiles = $whitelistedFiles; + } +} diff --git a/vendor/phpunit/php-code-coverage/src/Node/AbstractNode.php b/vendor/phpunit/php-code-coverage/src/Node/AbstractNode.php new file mode 100644 index 0000000..f360805 --- /dev/null +++ b/vendor/phpunit/php-code-coverage/src/Node/AbstractNode.php @@ -0,0 +1,342 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace SebastianBergmann\CodeCoverage\Node; + +use SebastianBergmann\CodeCoverage\Util; + +/** + * Base class for nodes in the code coverage information tree. + */ +abstract class AbstractNode implements \Countable +{ + /** + * @var string + */ + private $name; + + /** + * @var string + */ + private $path; + + /** + * @var array + */ + private $pathArray; + + /** + * @var AbstractNode + */ + private $parent; + + /** + * @var string + */ + private $id; + + /** + * Constructor. + * + * @param string $name + * @param AbstractNode $parent + */ + public function __construct($name, AbstractNode $parent = null) + { + if (substr($name, -1) == '/') { + $name = substr($name, 0, -1); + } + + $this->name = $name; + $this->parent = $parent; + } + + /** + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * @return string + */ + public function getId() + { + if ($this->id === null) { + $parent = $this->getParent(); + + if ($parent === null) { + $this->id = 'index'; + } else { + $parentId = $parent->getId(); + + if ($parentId == 'index') { + $this->id = str_replace(':', '_', $this->name); + } else { + $this->id = $parentId . '/' . $this->name; + } + } + } + + return $this->id; + } + + /** + * @return string + */ + public function getPath() + { + if ($this->path === null) { + if ($this->parent === null || $this->parent->getPath() === null || $this->parent->getPath() === false) { + $this->path = $this->name; + } else { + $this->path = $this->parent->getPath() . '/' . $this->name; + } + } + + return $this->path; + } + + /** + * @return array + */ + public function getPathAsArray() + { + if ($this->pathArray === null) { + if ($this->parent === null) { + $this->pathArray = []; + } else { + $this->pathArray = $this->parent->getPathAsArray(); + } + + $this->pathArray[] = $this; + } + + return $this->pathArray; + } + + /** + * @return AbstractNode + */ + public function getParent() + { + return $this->parent; + } + + /** + * Returns the percentage of classes that has been tested. + * + * @param bool $asString + * + * @return int + */ + public function getTestedClassesPercent($asString = true) + { + return Util::percent( + $this->getNumTestedClasses(), + $this->getNumClasses(), + $asString + ); + } + + /** + * Returns the percentage of traits that has been tested. + * + * @param bool $asString + * + * @return int + */ + public function getTestedTraitsPercent($asString = true) + { + return Util::percent( + $this->getNumTestedTraits(), + $this->getNumTraits(), + $asString + ); + } + + /** + * Returns the percentage of traits that has been tested. + * + * @param bool $asString + * + * @return int + */ + public function getTestedClassesAndTraitsPercent($asString = true) + { + return Util::percent( + $this->getNumTestedClassesAndTraits(), + $this->getNumClassesAndTraits(), + $asString + ); + } + + /** + * Returns the percentage of methods that has been tested. + * + * @param bool $asString + * + * @return int + */ + public function getTestedMethodsPercent($asString = true) + { + return Util::percent( + $this->getNumTestedMethods(), + $this->getNumMethods(), + $asString + ); + } + + /** + * Returns the percentage of executed lines. + * + * @param bool $asString + * + * @return int + */ + public function getLineExecutedPercent($asString = true) + { + return Util::percent( + $this->getNumExecutedLines(), + $this->getNumExecutableLines(), + $asString + ); + } + + /** + * Returns the number of classes and traits. + * + * @return int + */ + public function getNumClassesAndTraits() + { + return $this->getNumClasses() + $this->getNumTraits(); + } + + /** + * Returns the number of tested classes and traits. + * + * @return int + */ + public function getNumTestedClassesAndTraits() + { + return $this->getNumTestedClasses() + $this->getNumTestedTraits(); + } + + /** + * Returns the classes and traits of this node. + * + * @return array + */ + public function getClassesAndTraits() + { + return array_merge($this->getClasses(), $this->getTraits()); + } + + /** + * Returns the classes of this node. + * + * @return array + */ + abstract public function getClasses(); + + /** + * Returns the traits of this node. + * + * @return array + */ + abstract public function getTraits(); + + /** + * Returns the functions of this node. + * + * @return array + */ + abstract public function getFunctions(); + + /** + * Returns the LOC/CLOC/NCLOC of this node. + * + * @return array + */ + abstract public function getLinesOfCode(); + + /** + * Returns the number of executable lines. + * + * @return int + */ + abstract public function getNumExecutableLines(); + + /** + * Returns the number of executed lines. + * + * @return int + */ + abstract public function getNumExecutedLines(); + + /** + * Returns the number of classes. + * + * @return int + */ + abstract public function getNumClasses(); + + /** + * Returns the number of tested classes. + * + * @return int + */ + abstract public function getNumTestedClasses(); + + /** + * Returns the number of traits. + * + * @return int + */ + abstract public function getNumTraits(); + + /** + * Returns the number of tested traits. + * + * @return int + */ + abstract public function getNumTestedTraits(); + + /** + * Returns the number of methods. + * + * @return int + */ + abstract public function getNumMethods(); + + /** + * Returns the number of tested methods. + * + * @return int + */ + abstract public function getNumTestedMethods(); + + /** + * Returns the number of functions. + * + * @return int + */ + abstract public function getNumFunctions(); + + /** + * Returns the number of tested functions. + * + * @return int + */ + abstract public function getNumTestedFunctions(); +} diff --git a/vendor/phpunit/php-code-coverage/src/Node/Builder.php b/vendor/phpunit/php-code-coverage/src/Node/Builder.php new file mode 100644 index 0000000..8a6a65c --- /dev/null +++ b/vendor/phpunit/php-code-coverage/src/Node/Builder.php @@ -0,0 +1,244 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace SebastianBergmann\CodeCoverage\Node; + +use SebastianBergmann\CodeCoverage\CodeCoverage; + +class Builder +{ + /** + * @param CodeCoverage $coverage + * + * @return Directory + */ + public function build(CodeCoverage $coverage) + { + $files = $coverage->getData(); + $commonPath = $this->reducePaths($files); + $root = new Directory( + $commonPath, + null + ); + + $this->addItems( + $root, + $this->buildDirectoryStructure($files), + $coverage->getTests(), + $coverage->getCacheTokens() + ); + + return $root; + } + + /** + * @param Directory $root + * @param array $items + * @param array $tests + * @param bool $cacheTokens + */ + private function addItems(Directory $root, array $items, array $tests, $cacheTokens) + { + foreach ($items as $key => $value) { + if (substr($key, -2) == '/f') { + $key = substr($key, 0, -2); + + if (file_exists($root->getPath() . DIRECTORY_SEPARATOR . $key)) { + $root->addFile($key, $value, $tests, $cacheTokens); + } + } else { + $child = $root->addDirectory($key); + $this->addItems($child, $value, $tests, $cacheTokens); + } + } + } + + /** + * Builds an array representation of the directory structure. + * + * For instance, + * + * + * Array + * ( + * [Money.php] => Array + * ( + * ... + * ) + * + * [MoneyBag.php] => Array + * ( + * ... + * ) + * ) + * + * + * is transformed into + * + * + * Array + * ( + * [.] => Array + * ( + * [Money.php] => Array + * ( + * ... + * ) + * + * [MoneyBag.php] => Array + * ( + * ... + * ) + * ) + * ) + * + * + * @param array $files + * + * @return array + */ + private function buildDirectoryStructure($files) + { + $result = []; + + foreach ($files as $path => $file) { + $path = explode('/', $path); + $pointer = &$result; + $max = count($path); + + for ($i = 0; $i < $max; $i++) { + if ($i == ($max - 1)) { + $type = '/f'; + } else { + $type = ''; + } + + $pointer = &$pointer[$path[$i] . $type]; + } + + $pointer = $file; + } + + return $result; + } + + /** + * Reduces the paths by cutting the longest common start path. + * + * For instance, + * + * + * Array + * ( + * [/home/sb/Money/Money.php] => Array + * ( + * ... + * ) + * + * [/home/sb/Money/MoneyBag.php] => Array + * ( + * ... + * ) + * ) + * + * + * is reduced to + * + * + * Array + * ( + * [Money.php] => Array + * ( + * ... + * ) + * + * [MoneyBag.php] => Array + * ( + * ... + * ) + * ) + * + * + * @param array $files + * + * @return string + */ + private function reducePaths(&$files) + { + if (empty($files)) { + return '.'; + } + + $commonPath = ''; + $paths = array_keys($files); + + if (count($files) == 1) { + $commonPath = dirname($paths[0]) . '/'; + $files[basename($paths[0])] = $files[$paths[0]]; + + unset($files[$paths[0]]); + + return $commonPath; + } + + $max = count($paths); + + for ($i = 0; $i < $max; $i++) { + // strip phar:// prefixes + if (strpos($paths[$i], 'phar://') === 0) { + $paths[$i] = substr($paths[$i], 7); + $paths[$i] = strtr($paths[$i], '/', DIRECTORY_SEPARATOR); + } + $paths[$i] = explode(DIRECTORY_SEPARATOR, $paths[$i]); + + if (empty($paths[$i][0])) { + $paths[$i][0] = DIRECTORY_SEPARATOR; + } + } + + $done = false; + $max = count($paths); + + while (!$done) { + for ($i = 0; $i < $max - 1; $i++) { + if (!isset($paths[$i][0]) || + !isset($paths[$i+1][0]) || + $paths[$i][0] != $paths[$i+1][0]) { + $done = true; + break; + } + } + + if (!$done) { + $commonPath .= $paths[0][0]; + + if ($paths[0][0] != DIRECTORY_SEPARATOR) { + $commonPath .= DIRECTORY_SEPARATOR; + } + + for ($i = 0; $i < $max; $i++) { + array_shift($paths[$i]); + } + } + } + + $original = array_keys($files); + $max = count($original); + + for ($i = 0; $i < $max; $i++) { + $files[implode('/', $paths[$i])] = $files[$original[$i]]; + unset($files[$original[$i]]); + } + + ksort($files); + + return substr($commonPath, 0, -1); + } +} diff --git a/vendor/phpunit/php-code-coverage/src/Node/Directory.php b/vendor/phpunit/php-code-coverage/src/Node/Directory.php new file mode 100644 index 0000000..6a9f28d --- /dev/null +++ b/vendor/phpunit/php-code-coverage/src/Node/Directory.php @@ -0,0 +1,483 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace SebastianBergmann\CodeCoverage\Node; + +use SebastianBergmann\CodeCoverage\InvalidArgumentException; + +/** + * Represents a directory in the code coverage information tree. + */ +class Directory extends AbstractNode implements \IteratorAggregate +{ + /** + * @var AbstractNode[] + */ + private $children = []; + + /** + * @var Directory[] + */ + private $directories = []; + + /** + * @var File[] + */ + private $files = []; + + /** + * @var array + */ + private $classes; + + /** + * @var array + */ + private $traits; + + /** + * @var array + */ + private $functions; + + /** + * @var array + */ + private $linesOfCode = null; + + /** + * @var int + */ + private $numFiles = -1; + + /** + * @var int + */ + private $numExecutableLines = -1; + + /** + * @var int + */ + private $numExecutedLines = -1; + + /** + * @var int + */ + private $numClasses = -1; + + /** + * @var int + */ + private $numTestedClasses = -1; + + /** + * @var int + */ + private $numTraits = -1; + + /** + * @var int + */ + private $numTestedTraits = -1; + + /** + * @var int + */ + private $numMethods = -1; + + /** + * @var int + */ + private $numTestedMethods = -1; + + /** + * @var int + */ + private $numFunctions = -1; + + /** + * @var int + */ + private $numTestedFunctions = -1; + + /** + * Returns the number of files in/under this node. + * + * @return int + */ + public function count() + { + if ($this->numFiles == -1) { + $this->numFiles = 0; + + foreach ($this->children as $child) { + $this->numFiles += count($child); + } + } + + return $this->numFiles; + } + + /** + * Returns an iterator for this node. + * + * @return \RecursiveIteratorIterator + */ + public function getIterator() + { + return new \RecursiveIteratorIterator( + new Iterator($this), + \RecursiveIteratorIterator::SELF_FIRST + ); + } + + /** + * Adds a new directory. + * + * @param string $name + * + * @return Directory + */ + public function addDirectory($name) + { + $directory = new self($name, $this); + + $this->children[] = $directory; + $this->directories[] = &$this->children[count($this->children) - 1]; + + return $directory; + } + + /** + * Adds a new file. + * + * @param string $name + * @param array $coverageData + * @param array $testData + * @param bool $cacheTokens + * + * @return File + * + * @throws InvalidArgumentException + */ + public function addFile($name, array $coverageData, array $testData, $cacheTokens) + { + $file = new File( + $name, + $this, + $coverageData, + $testData, + $cacheTokens + ); + + $this->children[] = $file; + $this->files[] = &$this->children[count($this->children) - 1]; + + $this->numExecutableLines = -1; + $this->numExecutedLines = -1; + + return $file; + } + + /** + * Returns the directories in this directory. + * + * @return array + */ + public function getDirectories() + { + return $this->directories; + } + + /** + * Returns the files in this directory. + * + * @return array + */ + public function getFiles() + { + return $this->files; + } + + /** + * Returns the child nodes of this node. + * + * @return array + */ + public function getChildNodes() + { + return $this->children; + } + + /** + * Returns the classes of this node. + * + * @return array + */ + public function getClasses() + { + if ($this->classes === null) { + $this->classes = []; + + foreach ($this->children as $child) { + $this->classes = array_merge( + $this->classes, + $child->getClasses() + ); + } + } + + return $this->classes; + } + + /** + * Returns the traits of this node. + * + * @return array + */ + public function getTraits() + { + if ($this->traits === null) { + $this->traits = []; + + foreach ($this->children as $child) { + $this->traits = array_merge( + $this->traits, + $child->getTraits() + ); + } + } + + return $this->traits; + } + + /** + * Returns the functions of this node. + * + * @return array + */ + public function getFunctions() + { + if ($this->functions === null) { + $this->functions = []; + + foreach ($this->children as $child) { + $this->functions = array_merge( + $this->functions, + $child->getFunctions() + ); + } + } + + return $this->functions; + } + + /** + * Returns the LOC/CLOC/NCLOC of this node. + * + * @return array + */ + public function getLinesOfCode() + { + if ($this->linesOfCode === null) { + $this->linesOfCode = ['loc' => 0, 'cloc' => 0, 'ncloc' => 0]; + + foreach ($this->children as $child) { + $linesOfCode = $child->getLinesOfCode(); + + $this->linesOfCode['loc'] += $linesOfCode['loc']; + $this->linesOfCode['cloc'] += $linesOfCode['cloc']; + $this->linesOfCode['ncloc'] += $linesOfCode['ncloc']; + } + } + + return $this->linesOfCode; + } + + /** + * Returns the number of executable lines. + * + * @return int + */ + public function getNumExecutableLines() + { + if ($this->numExecutableLines == -1) { + $this->numExecutableLines = 0; + + foreach ($this->children as $child) { + $this->numExecutableLines += $child->getNumExecutableLines(); + } + } + + return $this->numExecutableLines; + } + + /** + * Returns the number of executed lines. + * + * @return int + */ + public function getNumExecutedLines() + { + if ($this->numExecutedLines == -1) { + $this->numExecutedLines = 0; + + foreach ($this->children as $child) { + $this->numExecutedLines += $child->getNumExecutedLines(); + } + } + + return $this->numExecutedLines; + } + + /** + * Returns the number of classes. + * + * @return int + */ + public function getNumClasses() + { + if ($this->numClasses == -1) { + $this->numClasses = 0; + + foreach ($this->children as $child) { + $this->numClasses += $child->getNumClasses(); + } + } + + return $this->numClasses; + } + + /** + * Returns the number of tested classes. + * + * @return int + */ + public function getNumTestedClasses() + { + if ($this->numTestedClasses == -1) { + $this->numTestedClasses = 0; + + foreach ($this->children as $child) { + $this->numTestedClasses += $child->getNumTestedClasses(); + } + } + + return $this->numTestedClasses; + } + + /** + * Returns the number of traits. + * + * @return int + */ + public function getNumTraits() + { + if ($this->numTraits == -1) { + $this->numTraits = 0; + + foreach ($this->children as $child) { + $this->numTraits += $child->getNumTraits(); + } + } + + return $this->numTraits; + } + + /** + * Returns the number of tested traits. + * + * @return int + */ + public function getNumTestedTraits() + { + if ($this->numTestedTraits == -1) { + $this->numTestedTraits = 0; + + foreach ($this->children as $child) { + $this->numTestedTraits += $child->getNumTestedTraits(); + } + } + + return $this->numTestedTraits; + } + + /** + * Returns the number of methods. + * + * @return int + */ + public function getNumMethods() + { + if ($this->numMethods == -1) { + $this->numMethods = 0; + + foreach ($this->children as $child) { + $this->numMethods += $child->getNumMethods(); + } + } + + return $this->numMethods; + } + + /** + * Returns the number of tested methods. + * + * @return int + */ + public function getNumTestedMethods() + { + if ($this->numTestedMethods == -1) { + $this->numTestedMethods = 0; + + foreach ($this->children as $child) { + $this->numTestedMethods += $child->getNumTestedMethods(); + } + } + + return $this->numTestedMethods; + } + + /** + * Returns the number of functions. + * + * @return int + */ + public function getNumFunctions() + { + if ($this->numFunctions == -1) { + $this->numFunctions = 0; + + foreach ($this->children as $child) { + $this->numFunctions += $child->getNumFunctions(); + } + } + + return $this->numFunctions; + } + + /** + * Returns the number of tested functions. + * + * @return int + */ + public function getNumTestedFunctions() + { + if ($this->numTestedFunctions == -1) { + $this->numTestedFunctions = 0; + + foreach ($this->children as $child) { + $this->numTestedFunctions += $child->getNumTestedFunctions(); + } + } + + return $this->numTestedFunctions; + } +} diff --git a/vendor/phpunit/php-code-coverage/src/Node/File.php b/vendor/phpunit/php-code-coverage/src/Node/File.php new file mode 100644 index 0000000..44856f0 --- /dev/null +++ b/vendor/phpunit/php-code-coverage/src/Node/File.php @@ -0,0 +1,722 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace SebastianBergmann\CodeCoverage\Node; + +use SebastianBergmann\CodeCoverage\InvalidArgumentException; + +/** + * Represents a file in the code coverage information tree. + */ +class File extends AbstractNode +{ + /** + * @var array + */ + private $coverageData; + + /** + * @var array + */ + private $testData; + + /** + * @var int + */ + private $numExecutableLines = 0; + + /** + * @var int + */ + private $numExecutedLines = 0; + + /** + * @var array + */ + private $classes = []; + + /** + * @var array + */ + private $traits = []; + + /** + * @var array + */ + private $functions = []; + + /** + * @var array + */ + private $linesOfCode = []; + + /** + * @var int + */ + private $numClasses = null; + + /** + * @var int + */ + private $numTestedClasses = 0; + + /** + * @var int + */ + private $numTraits = null; + + /** + * @var int + */ + private $numTestedTraits = 0; + + /** + * @var int + */ + private $numMethods = null; + + /** + * @var int + */ + private $numTestedMethods = null; + + /** + * @var int + */ + private $numTestedFunctions = null; + + /** + * @var array + */ + private $startLines = []; + + /** + * @var array + */ + private $endLines = []; + + /** + * @var bool + */ + private $cacheTokens; + + /** + * Constructor. + * + * @param string $name + * @param AbstractNode $parent + * @param array $coverageData + * @param array $testData + * @param bool $cacheTokens + * + * @throws InvalidArgumentException + */ + public function __construct($name, AbstractNode $parent, array $coverageData, array $testData, $cacheTokens) + { + if (!is_bool($cacheTokens)) { + throw InvalidArgumentException::create( + 1, + 'boolean' + ); + } + + parent::__construct($name, $parent); + + $this->coverageData = $coverageData; + $this->testData = $testData; + $this->cacheTokens = $cacheTokens; + + $this->calculateStatistics(); + } + + /** + * Returns the number of files in/under this node. + * + * @return int + */ + public function count() + { + return 1; + } + + /** + * Returns the code coverage data of this node. + * + * @return array + */ + public function getCoverageData() + { + return $this->coverageData; + } + + /** + * Returns the test data of this node. + * + * @return array + */ + public function getTestData() + { + return $this->testData; + } + + /** + * Returns the classes of this node. + * + * @return array + */ + public function getClasses() + { + return $this->classes; + } + + /** + * Returns the traits of this node. + * + * @return array + */ + public function getTraits() + { + return $this->traits; + } + + /** + * Returns the functions of this node. + * + * @return array + */ + public function getFunctions() + { + return $this->functions; + } + + /** + * Returns the LOC/CLOC/NCLOC of this node. + * + * @return array + */ + public function getLinesOfCode() + { + return $this->linesOfCode; + } + + /** + * Returns the number of executable lines. + * + * @return int + */ + public function getNumExecutableLines() + { + return $this->numExecutableLines; + } + + /** + * Returns the number of executed lines. + * + * @return int + */ + public function getNumExecutedLines() + { + return $this->numExecutedLines; + } + + /** + * Returns the number of classes. + * + * @return int + */ + public function getNumClasses() + { + if ($this->numClasses === null) { + $this->numClasses = 0; + + foreach ($this->classes as $class) { + foreach ($class['methods'] as $method) { + if ($method['executableLines'] > 0) { + $this->numClasses++; + + continue 2; + } + } + } + } + + return $this->numClasses; + } + + /** + * Returns the number of tested classes. + * + * @return int + */ + public function getNumTestedClasses() + { + return $this->numTestedClasses; + } + + /** + * Returns the number of traits. + * + * @return int + */ + public function getNumTraits() + { + if ($this->numTraits === null) { + $this->numTraits = 0; + + foreach ($this->traits as $trait) { + foreach ($trait['methods'] as $method) { + if ($method['executableLines'] > 0) { + $this->numTraits++; + + continue 2; + } + } + } + } + + return $this->numTraits; + } + + /** + * Returns the number of tested traits. + * + * @return int + */ + public function getNumTestedTraits() + { + return $this->numTestedTraits; + } + + /** + * Returns the number of methods. + * + * @return int + */ + public function getNumMethods() + { + if ($this->numMethods === null) { + $this->numMethods = 0; + + foreach ($this->classes as $class) { + foreach ($class['methods'] as $method) { + if ($method['executableLines'] > 0) { + $this->numMethods++; + } + } + } + + foreach ($this->traits as $trait) { + foreach ($trait['methods'] as $method) { + if ($method['executableLines'] > 0) { + $this->numMethods++; + } + } + } + } + + return $this->numMethods; + } + + /** + * Returns the number of tested methods. + * + * @return int + */ + public function getNumTestedMethods() + { + if ($this->numTestedMethods === null) { + $this->numTestedMethods = 0; + + foreach ($this->classes as $class) { + foreach ($class['methods'] as $method) { + if ($method['executableLines'] > 0 && + $method['coverage'] == 100) { + $this->numTestedMethods++; + } + } + } + + foreach ($this->traits as $trait) { + foreach ($trait['methods'] as $method) { + if ($method['executableLines'] > 0 && + $method['coverage'] == 100) { + $this->numTestedMethods++; + } + } + } + } + + return $this->numTestedMethods; + } + + /** + * Returns the number of functions. + * + * @return int + */ + public function getNumFunctions() + { + return count($this->functions); + } + + /** + * Returns the number of tested functions. + * + * @return int + */ + public function getNumTestedFunctions() + { + if ($this->numTestedFunctions === null) { + $this->numTestedFunctions = 0; + + foreach ($this->functions as $function) { + if ($function['executableLines'] > 0 && + $function['coverage'] == 100) { + $this->numTestedFunctions++; + } + } + } + + return $this->numTestedFunctions; + } + + /** + * Calculates coverage statistics for the file. + */ + protected function calculateStatistics() + { + $classStack = $functionStack = []; + + if ($this->cacheTokens) { + $tokens = \PHP_Token_Stream_CachingFactory::get($this->getPath()); + } else { + $tokens = new \PHP_Token_Stream($this->getPath()); + } + + $this->processClasses($tokens); + $this->processTraits($tokens); + $this->processFunctions($tokens); + $this->linesOfCode = $tokens->getLinesOfCode(); + unset($tokens); + + for ($lineNumber = 1; $lineNumber <= $this->linesOfCode['loc']; $lineNumber++) { + if (isset($this->startLines[$lineNumber])) { + // Start line of a class. + if (isset($this->startLines[$lineNumber]['className'])) { + if (isset($currentClass)) { + $classStack[] = &$currentClass; + } + + $currentClass = &$this->startLines[$lineNumber]; + } // Start line of a trait. + elseif (isset($this->startLines[$lineNumber]['traitName'])) { + $currentTrait = &$this->startLines[$lineNumber]; + } // Start line of a method. + elseif (isset($this->startLines[$lineNumber]['methodName'])) { + $currentMethod = &$this->startLines[$lineNumber]; + } // Start line of a function. + elseif (isset($this->startLines[$lineNumber]['functionName'])) { + if (isset($currentFunction)) { + $functionStack[] = &$currentFunction; + } + + $currentFunction = &$this->startLines[$lineNumber]; + } + } + + if (isset($this->coverageData[$lineNumber])) { + if (isset($currentClass)) { + $currentClass['executableLines']++; + } + + if (isset($currentTrait)) { + $currentTrait['executableLines']++; + } + + if (isset($currentMethod)) { + $currentMethod['executableLines']++; + } + + if (isset($currentFunction)) { + $currentFunction['executableLines']++; + } + + $this->numExecutableLines++; + + if (count($this->coverageData[$lineNumber]) > 0) { + if (isset($currentClass)) { + $currentClass['executedLines']++; + } + + if (isset($currentTrait)) { + $currentTrait['executedLines']++; + } + + if (isset($currentMethod)) { + $currentMethod['executedLines']++; + } + + if (isset($currentFunction)) { + $currentFunction['executedLines']++; + } + + $this->numExecutedLines++; + } + } + + if (isset($this->endLines[$lineNumber])) { + // End line of a class. + if (isset($this->endLines[$lineNumber]['className'])) { + unset($currentClass); + + if ($classStack) { + end($classStack); + $key = key($classStack); + $currentClass = &$classStack[$key]; + unset($classStack[$key]); + } + } // End line of a trait. + elseif (isset($this->endLines[$lineNumber]['traitName'])) { + unset($currentTrait); + } // End line of a method. + elseif (isset($this->endLines[$lineNumber]['methodName'])) { + unset($currentMethod); + } // End line of a function. + elseif (isset($this->endLines[$lineNumber]['functionName'])) { + unset($currentFunction); + + if ($functionStack) { + end($functionStack); + $key = key($functionStack); + $currentFunction = &$functionStack[$key]; + unset($functionStack[$key]); + } + } + } + } + + foreach ($this->traits as &$trait) { + foreach ($trait['methods'] as &$method) { + if ($method['executableLines'] > 0) { + $method['coverage'] = ($method['executedLines'] / + $method['executableLines']) * 100; + } else { + $method['coverage'] = 100; + } + + $method['crap'] = $this->crap( + $method['ccn'], + $method['coverage'] + ); + + $trait['ccn'] += $method['ccn']; + } + + if ($trait['executableLines'] > 0) { + $trait['coverage'] = ($trait['executedLines'] / + $trait['executableLines']) * 100; + + if ($trait['coverage'] == 100) { + $this->numTestedClasses++; + } + } else { + $trait['coverage'] = 100; + } + + $trait['crap'] = $this->crap( + $trait['ccn'], + $trait['coverage'] + ); + } + + foreach ($this->classes as &$class) { + foreach ($class['methods'] as &$method) { + if ($method['executableLines'] > 0) { + $method['coverage'] = ($method['executedLines'] / + $method['executableLines']) * 100; + } else { + $method['coverage'] = 100; + } + + $method['crap'] = $this->crap( + $method['ccn'], + $method['coverage'] + ); + + $class['ccn'] += $method['ccn']; + } + + if ($class['executableLines'] > 0) { + $class['coverage'] = ($class['executedLines'] / + $class['executableLines']) * 100; + + if ($class['coverage'] == 100) { + $this->numTestedClasses++; + } + } else { + $class['coverage'] = 100; + } + + $class['crap'] = $this->crap( + $class['ccn'], + $class['coverage'] + ); + } + } + + /** + * @param \PHP_Token_Stream $tokens + */ + protected function processClasses(\PHP_Token_Stream $tokens) + { + $classes = $tokens->getClasses(); + unset($tokens); + + $link = $this->getId() . '.html#'; + + foreach ($classes as $className => $class) { + $this->classes[$className] = [ + 'className' => $className, + 'methods' => [], + 'startLine' => $class['startLine'], + 'executableLines' => 0, + 'executedLines' => 0, + 'ccn' => 0, + 'coverage' => 0, + 'crap' => 0, + 'package' => $class['package'], + 'link' => $link . $class['startLine'] + ]; + + $this->startLines[$class['startLine']] = &$this->classes[$className]; + $this->endLines[$class['endLine']] = &$this->classes[$className]; + + foreach ($class['methods'] as $methodName => $method) { + $this->classes[$className]['methods'][$methodName] = $this->newMethod($methodName, $method, $link); + + $this->startLines[$method['startLine']] = &$this->classes[$className]['methods'][$methodName]; + $this->endLines[$method['endLine']] = &$this->classes[$className]['methods'][$methodName]; + } + } + } + + /** + * @param \PHP_Token_Stream $tokens + */ + protected function processTraits(\PHP_Token_Stream $tokens) + { + $traits = $tokens->getTraits(); + unset($tokens); + + $link = $this->getId() . '.html#'; + + foreach ($traits as $traitName => $trait) { + $this->traits[$traitName] = [ + 'traitName' => $traitName, + 'methods' => [], + 'startLine' => $trait['startLine'], + 'executableLines' => 0, + 'executedLines' => 0, + 'ccn' => 0, + 'coverage' => 0, + 'crap' => 0, + 'package' => $trait['package'], + 'link' => $link . $trait['startLine'] + ]; + + $this->startLines[$trait['startLine']] = &$this->traits[$traitName]; + $this->endLines[$trait['endLine']] = &$this->traits[$traitName]; + + foreach ($trait['methods'] as $methodName => $method) { + $this->traits[$traitName]['methods'][$methodName] = $this->newMethod($methodName, $method, $link); + + $this->startLines[$method['startLine']] = &$this->traits[$traitName]['methods'][$methodName]; + $this->endLines[$method['endLine']] = &$this->traits[$traitName]['methods'][$methodName]; + } + } + } + + /** + * @param \PHP_Token_Stream $tokens + */ + protected function processFunctions(\PHP_Token_Stream $tokens) + { + $functions = $tokens->getFunctions(); + unset($tokens); + + $link = $this->getId() . '.html#'; + + foreach ($functions as $functionName => $function) { + $this->functions[$functionName] = [ + 'functionName' => $functionName, + 'signature' => $function['signature'], + 'startLine' => $function['startLine'], + 'executableLines' => 0, + 'executedLines' => 0, + 'ccn' => $function['ccn'], + 'coverage' => 0, + 'crap' => 0, + 'link' => $link . $function['startLine'] + ]; + + $this->startLines[$function['startLine']] = &$this->functions[$functionName]; + $this->endLines[$function['endLine']] = &$this->functions[$functionName]; + } + } + + /** + * Calculates the Change Risk Anti-Patterns (CRAP) index for a unit of code + * based on its cyclomatic complexity and percentage of code coverage. + * + * @param int $ccn + * @param float $coverage + * + * @return string + */ + protected function crap($ccn, $coverage) + { + if ($coverage == 0) { + return (string) (pow($ccn, 2) + $ccn); + } + + if ($coverage >= 95) { + return (string) $ccn; + } + + return sprintf( + '%01.2F', + pow($ccn, 2) * pow(1 - $coverage/100, 3) + $ccn + ); + } + + /** + * @param string $methodName + * @param array $method + * @param string $link + * + * @return array + */ + private function newMethod($methodName, array $method, $link) + { + return [ + 'methodName' => $methodName, + 'visibility' => $method['visibility'], + 'signature' => $method['signature'], + 'startLine' => $method['startLine'], + 'endLine' => $method['endLine'], + 'executableLines' => 0, + 'executedLines' => 0, + 'ccn' => $method['ccn'], + 'coverage' => 0, + 'crap' => 0, + 'link' => $link . $method['startLine'], + ]; + } +} diff --git a/vendor/phpunit/php-code-coverage/src/Node/Iterator.php b/vendor/phpunit/php-code-coverage/src/Node/Iterator.php new file mode 100644 index 0000000..e246380 --- /dev/null +++ b/vendor/phpunit/php-code-coverage/src/Node/Iterator.php @@ -0,0 +1,103 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace SebastianBergmann\CodeCoverage\Node; + +/** + * Recursive iterator for node object graphs. + */ +class Iterator implements \RecursiveIterator +{ + /** + * @var int + */ + private $position; + + /** + * @var AbstractNode[] + */ + private $nodes; + + /** + * @param Directory $node + */ + public function __construct(Directory $node) + { + $this->nodes = $node->getChildNodes(); + } + + /** + * Rewinds the Iterator to the first element. + */ + public function rewind() + { + $this->position = 0; + } + + /** + * Checks if there is a current element after calls to rewind() or next(). + * + * @return bool + */ + public function valid() + { + return $this->position < count($this->nodes); + } + + /** + * Returns the key of the current element. + * + * @return int + */ + public function key() + { + return $this->position; + } + + /** + * Returns the current element. + * + * @return \PHPUnit_Framework_Test + */ + public function current() + { + return $this->valid() ? $this->nodes[$this->position] : null; + } + + /** + * Moves forward to next element. + */ + public function next() + { + $this->position++; + } + + /** + * Returns the sub iterator for the current element. + * + * @return Iterator + */ + public function getChildren() + { + return new self( + $this->nodes[$this->position] + ); + } + + /** + * Checks whether the current element has children. + * + * @return bool + */ + public function hasChildren() + { + return $this->nodes[$this->position] instanceof Directory; + } +} diff --git a/vendor/phpunit/php-code-coverage/src/Report/Clover.php b/vendor/phpunit/php-code-coverage/src/Report/Clover.php new file mode 100644 index 0000000..054b1df --- /dev/null +++ b/vendor/phpunit/php-code-coverage/src/Report/Clover.php @@ -0,0 +1,251 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace SebastianBergmann\CodeCoverage\Report; + +use SebastianBergmann\CodeCoverage\CodeCoverage; +use SebastianBergmann\CodeCoverage\Node\File; + +/** + * Generates a Clover XML logfile from a code coverage object. + */ +class Clover +{ + /** + * @param CodeCoverage $coverage + * @param string $target + * @param string $name + * + * @return string + */ + public function process(CodeCoverage $coverage, $target = null, $name = null) + { + $xmlDocument = new \DOMDocument('1.0', 'UTF-8'); + $xmlDocument->formatOutput = true; + + $xmlCoverage = $xmlDocument->createElement('coverage'); + $xmlCoverage->setAttribute('generated', (int) $_SERVER['REQUEST_TIME']); + $xmlDocument->appendChild($xmlCoverage); + + $xmlProject = $xmlDocument->createElement('project'); + $xmlProject->setAttribute('timestamp', (int) $_SERVER['REQUEST_TIME']); + + if (is_string($name)) { + $xmlProject->setAttribute('name', $name); + } + + $xmlCoverage->appendChild($xmlProject); + + $packages = []; + $report = $coverage->getReport(); + unset($coverage); + + foreach ($report as $item) { + if (!$item instanceof File) { + continue; + } + + /* @var File $item */ + + $xmlFile = $xmlDocument->createElement('file'); + $xmlFile->setAttribute('name', $item->getPath()); + + $classes = $item->getClassesAndTraits(); + $coverage = $item->getCoverageData(); + $lines = []; + $namespace = 'global'; + + foreach ($classes as $className => $class) { + $classStatements = 0; + $coveredClassStatements = 0; + $coveredMethods = 0; + $classMethods = 0; + + foreach ($class['methods'] as $methodName => $method) { + if ($method['executableLines'] == 0) { + continue; + } + + $classMethods++; + $classStatements += $method['executableLines']; + $coveredClassStatements += $method['executedLines']; + + if ($method['coverage'] == 100) { + $coveredMethods++; + } + + $methodCount = 0; + + foreach (range($method['startLine'], $method['endLine']) as $line) { + if (isset($coverage[$line]) && ($coverage[$line] !== null)) { + $methodCount = max($methodCount, count($coverage[$line])); + } + } + + $lines[$method['startLine']] = [ + 'ccn' => $method['ccn'], + 'count' => $methodCount, + 'crap' => $method['crap'], + 'type' => 'method', + 'visibility' => $method['visibility'], + 'name' => $methodName + ]; + } + + if (!empty($class['package']['namespace'])) { + $namespace = $class['package']['namespace']; + } + + $xmlClass = $xmlDocument->createElement('class'); + $xmlClass->setAttribute('name', $className); + $xmlClass->setAttribute('namespace', $namespace); + + if (!empty($class['package']['fullPackage'])) { + $xmlClass->setAttribute( + 'fullPackage', + $class['package']['fullPackage'] + ); + } + + if (!empty($class['package']['category'])) { + $xmlClass->setAttribute( + 'category', + $class['package']['category'] + ); + } + + if (!empty($class['package']['package'])) { + $xmlClass->setAttribute( + 'package', + $class['package']['package'] + ); + } + + if (!empty($class['package']['subpackage'])) { + $xmlClass->setAttribute( + 'subpackage', + $class['package']['subpackage'] + ); + } + + $xmlFile->appendChild($xmlClass); + + $xmlMetrics = $xmlDocument->createElement('metrics'); + $xmlMetrics->setAttribute('complexity', $class['ccn']); + $xmlMetrics->setAttribute('methods', $classMethods); + $xmlMetrics->setAttribute('coveredmethods', $coveredMethods); + $xmlMetrics->setAttribute('conditionals', 0); + $xmlMetrics->setAttribute('coveredconditionals', 0); + $xmlMetrics->setAttribute('statements', $classStatements); + $xmlMetrics->setAttribute('coveredstatements', $coveredClassStatements); + $xmlMetrics->setAttribute('elements', $classMethods + $classStatements /* + conditionals */); + $xmlMetrics->setAttribute('coveredelements', $coveredMethods + $coveredClassStatements /* + coveredconditionals */); + $xmlClass->appendChild($xmlMetrics); + } + + foreach ($coverage as $line => $data) { + if ($data === null || isset($lines[$line])) { + continue; + } + + $lines[$line] = [ + 'count' => count($data), 'type' => 'stmt' + ]; + } + + ksort($lines); + + foreach ($lines as $line => $data) { + $xmlLine = $xmlDocument->createElement('line'); + $xmlLine->setAttribute('num', $line); + $xmlLine->setAttribute('type', $data['type']); + + if (isset($data['name'])) { + $xmlLine->setAttribute('name', $data['name']); + } + + if (isset($data['visibility'])) { + $xmlLine->setAttribute('visibility', $data['visibility']); + } + + if (isset($data['ccn'])) { + $xmlLine->setAttribute('complexity', $data['ccn']); + } + + if (isset($data['crap'])) { + $xmlLine->setAttribute('crap', $data['crap']); + } + + $xmlLine->setAttribute('count', $data['count']); + $xmlFile->appendChild($xmlLine); + } + + $linesOfCode = $item->getLinesOfCode(); + + $xmlMetrics = $xmlDocument->createElement('metrics'); + $xmlMetrics->setAttribute('loc', $linesOfCode['loc']); + $xmlMetrics->setAttribute('ncloc', $linesOfCode['ncloc']); + $xmlMetrics->setAttribute('classes', $item->getNumClassesAndTraits()); + $xmlMetrics->setAttribute('methods', $item->getNumMethods()); + $xmlMetrics->setAttribute('coveredmethods', $item->getNumTestedMethods()); + $xmlMetrics->setAttribute('conditionals', 0); + $xmlMetrics->setAttribute('coveredconditionals', 0); + $xmlMetrics->setAttribute('statements', $item->getNumExecutableLines()); + $xmlMetrics->setAttribute('coveredstatements', $item->getNumExecutedLines()); + $xmlMetrics->setAttribute('elements', $item->getNumMethods() + $item->getNumExecutableLines() /* + conditionals */); + $xmlMetrics->setAttribute('coveredelements', $item->getNumTestedMethods() + $item->getNumExecutedLines() /* + coveredconditionals */); + $xmlFile->appendChild($xmlMetrics); + + if ($namespace == 'global') { + $xmlProject->appendChild($xmlFile); + } else { + if (!isset($packages[$namespace])) { + $packages[$namespace] = $xmlDocument->createElement( + 'package' + ); + + $packages[$namespace]->setAttribute('name', $namespace); + $xmlProject->appendChild($packages[$namespace]); + } + + $packages[$namespace]->appendChild($xmlFile); + } + } + + $linesOfCode = $report->getLinesOfCode(); + + $xmlMetrics = $xmlDocument->createElement('metrics'); + $xmlMetrics->setAttribute('files', count($report)); + $xmlMetrics->setAttribute('loc', $linesOfCode['loc']); + $xmlMetrics->setAttribute('ncloc', $linesOfCode['ncloc']); + $xmlMetrics->setAttribute('classes', $report->getNumClassesAndTraits()); + $xmlMetrics->setAttribute('methods', $report->getNumMethods()); + $xmlMetrics->setAttribute('coveredmethods', $report->getNumTestedMethods()); + $xmlMetrics->setAttribute('conditionals', 0); + $xmlMetrics->setAttribute('coveredconditionals', 0); + $xmlMetrics->setAttribute('statements', $report->getNumExecutableLines()); + $xmlMetrics->setAttribute('coveredstatements', $report->getNumExecutedLines()); + $xmlMetrics->setAttribute('elements', $report->getNumMethods() + $report->getNumExecutableLines() /* + conditionals */); + $xmlMetrics->setAttribute('coveredelements', $report->getNumTestedMethods() + $report->getNumExecutedLines() /* + coveredconditionals */); + $xmlProject->appendChild($xmlMetrics); + + $buffer = $xmlDocument->saveXML(); + + if ($target !== null) { + if (!is_dir(dirname($target))) { + mkdir(dirname($target), 0777, true); + } + + file_put_contents($target, $buffer); + } + + return $buffer; + } +} diff --git a/vendor/phpunit/php-code-coverage/src/Report/Crap4j.php b/vendor/phpunit/php-code-coverage/src/Report/Crap4j.php new file mode 100644 index 0000000..7adf78f --- /dev/null +++ b/vendor/phpunit/php-code-coverage/src/Report/Crap4j.php @@ -0,0 +1,172 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace SebastianBergmann\CodeCoverage\Report; + +use SebastianBergmann\CodeCoverage\CodeCoverage; +use SebastianBergmann\CodeCoverage\Node\File; +use SebastianBergmann\CodeCoverage\InvalidArgumentException; + +class Crap4j +{ + /** + * @var int + */ + private $threshold; + + /** + * @param int $threshold + */ + public function __construct($threshold = 30) + { + if (!is_int($threshold)) { + throw InvalidArgumentException::create( + 1, + 'integer' + ); + } + + $this->threshold = $threshold; + } + + /** + * @param CodeCoverage $coverage + * @param string $target + * @param string $name + * + * @return string + */ + public function process(CodeCoverage $coverage, $target = null, $name = null) + { + $document = new \DOMDocument('1.0', 'UTF-8'); + $document->formatOutput = true; + + $root = $document->createElement('crap_result'); + $document->appendChild($root); + + $project = $document->createElement('project', is_string($name) ? $name : ''); + $root->appendChild($project); + $root->appendChild($document->createElement('timestamp', date('Y-m-d H:i:s', (int) $_SERVER['REQUEST_TIME']))); + + $stats = $document->createElement('stats'); + $methodsNode = $document->createElement('methods'); + + $report = $coverage->getReport(); + unset($coverage); + + $fullMethodCount = 0; + $fullCrapMethodCount = 0; + $fullCrapLoad = 0; + $fullCrap = 0; + + foreach ($report as $item) { + $namespace = 'global'; + + if (!$item instanceof File) { + continue; + } + + $file = $document->createElement('file'); + $file->setAttribute('name', $item->getPath()); + + $classes = $item->getClassesAndTraits(); + + foreach ($classes as $className => $class) { + foreach ($class['methods'] as $methodName => $method) { + $crapLoad = $this->getCrapLoad($method['crap'], $method['ccn'], $method['coverage']); + + $fullCrap += $method['crap']; + $fullCrapLoad += $crapLoad; + $fullMethodCount++; + + if ($method['crap'] >= $this->threshold) { + $fullCrapMethodCount++; + } + + $methodNode = $document->createElement('method'); + + if (!empty($class['package']['namespace'])) { + $namespace = $class['package']['namespace']; + } + + $methodNode->appendChild($document->createElement('package', $namespace)); + $methodNode->appendChild($document->createElement('className', $className)); + $methodNode->appendChild($document->createElement('methodName', $methodName)); + $methodNode->appendChild($document->createElement('methodSignature', htmlspecialchars($method['signature']))); + $methodNode->appendChild($document->createElement('fullMethod', htmlspecialchars($method['signature']))); + $methodNode->appendChild($document->createElement('crap', $this->roundValue($method['crap']))); + $methodNode->appendChild($document->createElement('complexity', $method['ccn'])); + $methodNode->appendChild($document->createElement('coverage', $this->roundValue($method['coverage']))); + $methodNode->appendChild($document->createElement('crapLoad', round($crapLoad))); + + $methodsNode->appendChild($methodNode); + } + } + } + + $stats->appendChild($document->createElement('name', 'Method Crap Stats')); + $stats->appendChild($document->createElement('methodCount', $fullMethodCount)); + $stats->appendChild($document->createElement('crapMethodCount', $fullCrapMethodCount)); + $stats->appendChild($document->createElement('crapLoad', round($fullCrapLoad))); + $stats->appendChild($document->createElement('totalCrap', $fullCrap)); + + if ($fullMethodCount > 0) { + $crapMethodPercent = $this->roundValue((100 * $fullCrapMethodCount) / $fullMethodCount); + } else { + $crapMethodPercent = 0; + } + + $stats->appendChild($document->createElement('crapMethodPercent', $crapMethodPercent)); + + $root->appendChild($stats); + $root->appendChild($methodsNode); + + $buffer = $document->saveXML(); + + if ($target !== null) { + if (!is_dir(dirname($target))) { + mkdir(dirname($target), 0777, true); + } + + file_put_contents($target, $buffer); + } + + return $buffer; + } + + /** + * @param float $crapValue + * @param int $cyclomaticComplexity + * @param float $coveragePercent + * + * @return float + */ + private function getCrapLoad($crapValue, $cyclomaticComplexity, $coveragePercent) + { + $crapLoad = 0; + + if ($crapValue >= $this->threshold) { + $crapLoad += $cyclomaticComplexity * (1.0 - $coveragePercent / 100); + $crapLoad += $cyclomaticComplexity / $this->threshold; + } + + return $crapLoad; + } + + /** + * @param float $value + * + * @return float + */ + private function roundValue($value) + { + return round($value, 2); + } +} diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Facade.php b/vendor/phpunit/php-code-coverage/src/Report/Html/Facade.php new file mode 100644 index 0000000..adcfe42 --- /dev/null +++ b/vendor/phpunit/php-code-coverage/src/Report/Html/Facade.php @@ -0,0 +1,179 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace SebastianBergmann\CodeCoverage\Report\Html; + +use SebastianBergmann\CodeCoverage\CodeCoverage; +use SebastianBergmann\CodeCoverage\Node\Directory as DirectoryNode; +use SebastianBergmann\CodeCoverage\RuntimeException; + +/** + * Generates an HTML report from a code coverage object. + */ +class Facade +{ + /** + * @var string + */ + private $templatePath; + + /** + * @var string + */ + private $generator; + + /** + * @var int + */ + private $lowUpperBound; + + /** + * @var int + */ + private $highLowerBound; + + /** + * Constructor. + * + * @param int $lowUpperBound + * @param int $highLowerBound + * @param string $generator + */ + public function __construct($lowUpperBound = 50, $highLowerBound = 90, $generator = '') + { + $this->generator = $generator; + $this->highLowerBound = $highLowerBound; + $this->lowUpperBound = $lowUpperBound; + $this->templatePath = __DIR__ . '/Renderer/Template/'; + } + + /** + * @param CodeCoverage $coverage + * @param string $target + */ + public function process(CodeCoverage $coverage, $target) + { + $target = $this->getDirectory($target); + $report = $coverage->getReport(); + unset($coverage); + + if (!isset($_SERVER['REQUEST_TIME'])) { + $_SERVER['REQUEST_TIME'] = time(); + } + + $date = date('D M j G:i:s T Y', $_SERVER['REQUEST_TIME']); + + $dashboard = new Dashboard( + $this->templatePath, + $this->generator, + $date, + $this->lowUpperBound, + $this->highLowerBound + ); + + $directory = new Directory( + $this->templatePath, + $this->generator, + $date, + $this->lowUpperBound, + $this->highLowerBound + ); + + $file = new File( + $this->templatePath, + $this->generator, + $date, + $this->lowUpperBound, + $this->highLowerBound + ); + + $directory->render($report, $target . 'index.html'); + $dashboard->render($report, $target . 'dashboard.html'); + + foreach ($report as $node) { + $id = $node->getId(); + + if ($node instanceof DirectoryNode) { + if (!file_exists($target . $id)) { + mkdir($target . $id, 0777, true); + } + + $directory->render($node, $target . $id . '/index.html'); + $dashboard->render($node, $target . $id . '/dashboard.html'); + } else { + $dir = dirname($target . $id); + + if (!file_exists($dir)) { + mkdir($dir, 0777, true); + } + + $file->render($node, $target . $id . '.html'); + } + } + + $this->copyFiles($target); + } + + /** + * @param string $target + */ + private function copyFiles($target) + { + $dir = $this->getDirectory($target . 'css'); + copy($this->templatePath . 'css/bootstrap.min.css', $dir . 'bootstrap.min.css'); + copy($this->templatePath . 'css/nv.d3.min.css', $dir . 'nv.d3.min.css'); + copy($this->templatePath . 'css/style.css', $dir . 'style.css'); + + $dir = $this->getDirectory($target . 'fonts'); + copy($this->templatePath . 'fonts/glyphicons-halflings-regular.eot', $dir . 'glyphicons-halflings-regular.eot'); + copy($this->templatePath . 'fonts/glyphicons-halflings-regular.svg', $dir . 'glyphicons-halflings-regular.svg'); + copy($this->templatePath . 'fonts/glyphicons-halflings-regular.ttf', $dir . 'glyphicons-halflings-regular.ttf'); + copy($this->templatePath . 'fonts/glyphicons-halflings-regular.woff', $dir . 'glyphicons-halflings-regular.woff'); + copy($this->templatePath . 'fonts/glyphicons-halflings-regular.woff2', $dir . 'glyphicons-halflings-regular.woff2'); + + $dir = $this->getDirectory($target . 'js'); + copy($this->templatePath . 'js/bootstrap.min.js', $dir . 'bootstrap.min.js'); + copy($this->templatePath . 'js/d3.min.js', $dir . 'd3.min.js'); + copy($this->templatePath . 'js/holder.min.js', $dir . 'holder.min.js'); + copy($this->templatePath . 'js/html5shiv.min.js', $dir . 'html5shiv.min.js'); + copy($this->templatePath . 'js/jquery.min.js', $dir . 'jquery.min.js'); + copy($this->templatePath . 'js/nv.d3.min.js', $dir . 'nv.d3.min.js'); + copy($this->templatePath . 'js/respond.min.js', $dir . 'respond.min.js'); + } + + /** + * @param string $directory + * + * @return string + * + * @throws RuntimeException + */ + private function getDirectory($directory) + { + if (substr($directory, -1, 1) != DIRECTORY_SEPARATOR) { + $directory .= DIRECTORY_SEPARATOR; + } + + if (is_dir($directory)) { + return $directory; + } + + if (@mkdir($directory, 0777, true)) { + return $directory; + } + + throw new RuntimeException( + sprintf( + 'Directory "%s" does not exist.', + $directory + ) + ); + } +} diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer.php b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer.php new file mode 100644 index 0000000..da0937e --- /dev/null +++ b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer.php @@ -0,0 +1,298 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace SebastianBergmann\CodeCoverage\Report\Html; + +use SebastianBergmann\CodeCoverage\Node\AbstractNode; +use SebastianBergmann\CodeCoverage\Node\File as FileNode; +use SebastianBergmann\CodeCoverage\Node\Directory as DirectoryNode; +use SebastianBergmann\Environment\Runtime; +use SebastianBergmann\Version; + +/** + * Base class for node renderers. + */ +abstract class Renderer +{ + /** + * @var string + */ + protected $templatePath; + + /** + * @var string + */ + protected $generator; + + /** + * @var string + */ + protected $date; + + /** + * @var int + */ + protected $lowUpperBound; + + /** + * @var int + */ + protected $highLowerBound; + + /** + * @var string + */ + protected $version; + + /** + * Constructor. + * + * @param string $templatePath + * @param string $generator + * @param string $date + * @param int $lowUpperBound + * @param int $highLowerBound + */ + public function __construct($templatePath, $generator, $date, $lowUpperBound, $highLowerBound) + { + $version = new Version('4.0.8', dirname(dirname(dirname(dirname(__DIR__))))); + + $this->templatePath = $templatePath; + $this->generator = $generator; + $this->date = $date; + $this->lowUpperBound = $lowUpperBound; + $this->highLowerBound = $highLowerBound; + $this->version = $version->getVersion(); + } + + /** + * @param \Text_Template $template + * @param array $data + * + * @return string + */ + protected function renderItemTemplate(\Text_Template $template, array $data) + { + $numSeparator = ' / '; + + if (isset($data['numClasses']) && $data['numClasses'] > 0) { + $classesLevel = $this->getColorLevel($data['testedClassesPercent']); + + $classesNumber = $data['numTestedClasses'] . $numSeparator . + $data['numClasses']; + + $classesBar = $this->getCoverageBar( + $data['testedClassesPercent'] + ); + } else { + $classesLevel = ''; + $classesNumber = '0' . $numSeparator . '0'; + $classesBar = ''; + $data['testedClassesPercentAsString'] = 'n/a'; + } + + if ($data['numMethods'] > 0) { + $methodsLevel = $this->getColorLevel($data['testedMethodsPercent']); + + $methodsNumber = $data['numTestedMethods'] . $numSeparator . + $data['numMethods']; + + $methodsBar = $this->getCoverageBar( + $data['testedMethodsPercent'] + ); + } else { + $methodsLevel = ''; + $methodsNumber = '0' . $numSeparator . '0'; + $methodsBar = ''; + $data['testedMethodsPercentAsString'] = 'n/a'; + } + + if ($data['numExecutableLines'] > 0) { + $linesLevel = $this->getColorLevel($data['linesExecutedPercent']); + + $linesNumber = $data['numExecutedLines'] . $numSeparator . + $data['numExecutableLines']; + + $linesBar = $this->getCoverageBar( + $data['linesExecutedPercent'] + ); + } else { + $linesLevel = ''; + $linesNumber = '0' . $numSeparator . '0'; + $linesBar = ''; + $data['linesExecutedPercentAsString'] = 'n/a'; + } + + $template->setVar( + [ + 'icon' => isset($data['icon']) ? $data['icon'] : '', + 'crap' => isset($data['crap']) ? $data['crap'] : '', + 'name' => $data['name'], + 'lines_bar' => $linesBar, + 'lines_executed_percent' => $data['linesExecutedPercentAsString'], + 'lines_level' => $linesLevel, + 'lines_number' => $linesNumber, + 'methods_bar' => $methodsBar, + 'methods_tested_percent' => $data['testedMethodsPercentAsString'], + 'methods_level' => $methodsLevel, + 'methods_number' => $methodsNumber, + 'classes_bar' => $classesBar, + 'classes_tested_percent' => isset($data['testedClassesPercentAsString']) ? $data['testedClassesPercentAsString'] : '', + 'classes_level' => $classesLevel, + 'classes_number' => $classesNumber + ] + ); + + return $template->render(); + } + + /** + * @param \Text_Template $template + * @param AbstractNode $node + */ + protected function setCommonTemplateVariables(\Text_Template $template, AbstractNode $node) + { + $template->setVar( + [ + 'id' => $node->getId(), + 'full_path' => $node->getPath(), + 'path_to_root' => $this->getPathToRoot($node), + 'breadcrumbs' => $this->getBreadcrumbs($node), + 'date' => $this->date, + 'version' => $this->version, + 'runtime' => $this->getRuntimeString(), + 'generator' => $this->generator, + 'low_upper_bound' => $this->lowUpperBound, + 'high_lower_bound' => $this->highLowerBound + ] + ); + } + + protected function getBreadcrumbs(AbstractNode $node) + { + $breadcrumbs = ''; + $path = $node->getPathAsArray(); + $pathToRoot = []; + $max = count($path); + + if ($node instanceof FileNode) { + $max--; + } + + for ($i = 0; $i < $max; $i++) { + $pathToRoot[] = str_repeat('../', $i); + } + + foreach ($path as $step) { + if ($step !== $node) { + $breadcrumbs .= $this->getInactiveBreadcrumb( + $step, + array_pop($pathToRoot) + ); + } else { + $breadcrumbs .= $this->getActiveBreadcrumb($step); + } + } + + return $breadcrumbs; + } + + protected function getActiveBreadcrumb(AbstractNode $node) + { + $buffer = sprintf( + '
  • %s
  • ' . "\n", + $node->getName() + ); + + if ($node instanceof DirectoryNode) { + $buffer .= '
  • (Dashboard)
  • ' . "\n"; + } + + return $buffer; + } + + protected function getInactiveBreadcrumb(AbstractNode $node, $pathToRoot) + { + return sprintf( + '
  • %s
  • ' . "\n", + $pathToRoot, + $node->getName() + ); + } + + protected function getPathToRoot(AbstractNode $node) + { + $id = $node->getId(); + $depth = substr_count($id, '/'); + + if ($id != 'index' && + $node instanceof DirectoryNode) { + $depth++; + } + + return str_repeat('../', $depth); + } + + protected function getCoverageBar($percent) + { + $level = $this->getColorLevel($percent); + + $template = new \Text_Template( + $this->templatePath . 'coverage_bar.html', + '{{', + '}}' + ); + + $template->setVar(['level' => $level, 'percent' => sprintf('%.2F', $percent)]); + + return $template->render(); + } + + /** + * @param int $percent + * + * @return string + */ + protected function getColorLevel($percent) + { + if ($percent <= $this->lowUpperBound) { + return 'danger'; + } elseif ($percent > $this->lowUpperBound && + $percent < $this->highLowerBound) { + return 'warning'; + } else { + return 'success'; + } + } + + /** + * @return string + */ + private function getRuntimeString() + { + $runtime = new Runtime; + + $buffer = sprintf( + '%s %s', + $runtime->getVendorUrl(), + $runtime->getName(), + $runtime->getVersion() + ); + + if ($runtime->hasXdebug() && !$runtime->hasPHPDBGCodeCoverage()) { + $buffer .= sprintf( + ' with Xdebug %s', + phpversion('xdebug') + ); + } + + return $buffer; + } +} diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Dashboard.php b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Dashboard.php new file mode 100644 index 0000000..7cde175 --- /dev/null +++ b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Dashboard.php @@ -0,0 +1,302 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace SebastianBergmann\CodeCoverage\Report\Html; + +use SebastianBergmann\CodeCoverage\Node\AbstractNode; +use SebastianBergmann\CodeCoverage\Node\Directory as DirectoryNode; + +/** + * Renders the dashboard for a directory node. + */ +class Dashboard extends Renderer +{ + /** + * @param DirectoryNode $node + * @param string $file + */ + public function render(DirectoryNode $node, $file) + { + $classes = $node->getClassesAndTraits(); + $template = new \Text_Template( + $this->templatePath . 'dashboard.html', + '{{', + '}}' + ); + + $this->setCommonTemplateVariables($template, $node); + + $baseLink = $node->getId() . '/'; + $complexity = $this->complexity($classes, $baseLink); + $coverageDistribution = $this->coverageDistribution($classes); + $insufficientCoverage = $this->insufficientCoverage($classes, $baseLink); + $projectRisks = $this->projectRisks($classes, $baseLink); + + $template->setVar( + [ + 'insufficient_coverage_classes' => $insufficientCoverage['class'], + 'insufficient_coverage_methods' => $insufficientCoverage['method'], + 'project_risks_classes' => $projectRisks['class'], + 'project_risks_methods' => $projectRisks['method'], + 'complexity_class' => $complexity['class'], + 'complexity_method' => $complexity['method'], + 'class_coverage_distribution' => $coverageDistribution['class'], + 'method_coverage_distribution' => $coverageDistribution['method'] + ] + ); + + $template->renderTo($file); + } + + /** + * Returns the data for the Class/Method Complexity charts. + * + * @param array $classes + * @param string $baseLink + * + * @return array + */ + protected function complexity(array $classes, $baseLink) + { + $result = ['class' => [], 'method' => []]; + + foreach ($classes as $className => $class) { + foreach ($class['methods'] as $methodName => $method) { + if ($className != '*') { + $methodName = $className . '::' . $methodName; + } + + $result['method'][] = [ + $method['coverage'], + $method['ccn'], + sprintf( + '%s', + str_replace($baseLink, '', $method['link']), + $methodName + ) + ]; + } + + $result['class'][] = [ + $class['coverage'], + $class['ccn'], + sprintf( + '%s', + str_replace($baseLink, '', $class['link']), + $className + ) + ]; + } + + return [ + 'class' => json_encode($result['class']), + 'method' => json_encode($result['method']) + ]; + } + + /** + * Returns the data for the Class / Method Coverage Distribution chart. + * + * @param array $classes + * + * @return array + */ + protected function coverageDistribution(array $classes) + { + $result = [ + 'class' => [ + '0%' => 0, + '0-10%' => 0, + '10-20%' => 0, + '20-30%' => 0, + '30-40%' => 0, + '40-50%' => 0, + '50-60%' => 0, + '60-70%' => 0, + '70-80%' => 0, + '80-90%' => 0, + '90-100%' => 0, + '100%' => 0 + ], + 'method' => [ + '0%' => 0, + '0-10%' => 0, + '10-20%' => 0, + '20-30%' => 0, + '30-40%' => 0, + '40-50%' => 0, + '50-60%' => 0, + '60-70%' => 0, + '70-80%' => 0, + '80-90%' => 0, + '90-100%' => 0, + '100%' => 0 + ] + ]; + + foreach ($classes as $class) { + foreach ($class['methods'] as $methodName => $method) { + if ($method['coverage'] == 0) { + $result['method']['0%']++; + } elseif ($method['coverage'] == 100) { + $result['method']['100%']++; + } else { + $key = floor($method['coverage'] / 10) * 10; + $key = $key . '-' . ($key + 10) . '%'; + $result['method'][$key]++; + } + } + + if ($class['coverage'] == 0) { + $result['class']['0%']++; + } elseif ($class['coverage'] == 100) { + $result['class']['100%']++; + } else { + $key = floor($class['coverage'] / 10) * 10; + $key = $key . '-' . ($key + 10) . '%'; + $result['class'][$key]++; + } + } + + return [ + 'class' => json_encode(array_values($result['class'])), + 'method' => json_encode(array_values($result['method'])) + ]; + } + + /** + * Returns the classes / methods with insufficient coverage. + * + * @param array $classes + * @param string $baseLink + * + * @return array + */ + protected function insufficientCoverage(array $classes, $baseLink) + { + $leastTestedClasses = []; + $leastTestedMethods = []; + $result = ['class' => '', 'method' => '']; + + foreach ($classes as $className => $class) { + foreach ($class['methods'] as $methodName => $method) { + if ($method['coverage'] < $this->highLowerBound) { + if ($className != '*') { + $key = $className . '::' . $methodName; + } else { + $key = $methodName; + } + + $leastTestedMethods[$key] = $method['coverage']; + } + } + + if ($class['coverage'] < $this->highLowerBound) { + $leastTestedClasses[$className] = $class['coverage']; + } + } + + asort($leastTestedClasses); + asort($leastTestedMethods); + + foreach ($leastTestedClasses as $className => $coverage) { + $result['class'] .= sprintf( + ' %s%d%%' . "\n", + str_replace($baseLink, '', $classes[$className]['link']), + $className, + $coverage + ); + } + + foreach ($leastTestedMethods as $methodName => $coverage) { + list($class, $method) = explode('::', $methodName); + + $result['method'] .= sprintf( + ' %s%d%%' . "\n", + str_replace($baseLink, '', $classes[$class]['methods'][$method]['link']), + $methodName, + $method, + $coverage + ); + } + + return $result; + } + + /** + * Returns the project risks according to the CRAP index. + * + * @param array $classes + * @param string $baseLink + * + * @return array + */ + protected function projectRisks(array $classes, $baseLink) + { + $classRisks = []; + $methodRisks = []; + $result = ['class' => '', 'method' => '']; + + foreach ($classes as $className => $class) { + foreach ($class['methods'] as $methodName => $method) { + if ($method['coverage'] < $this->highLowerBound && + $method['ccn'] > 1) { + if ($className != '*') { + $key = $className . '::' . $methodName; + } else { + $key = $methodName; + } + + $methodRisks[$key] = $method['crap']; + } + } + + if ($class['coverage'] < $this->highLowerBound && + $class['ccn'] > count($class['methods'])) { + $classRisks[$className] = $class['crap']; + } + } + + arsort($classRisks); + arsort($methodRisks); + + foreach ($classRisks as $className => $crap) { + $result['class'] .= sprintf( + ' %s%d' . "\n", + str_replace($baseLink, '', $classes[$className]['link']), + $className, + $crap + ); + } + + foreach ($methodRisks as $methodName => $crap) { + list($class, $method) = explode('::', $methodName); + + $result['method'] .= sprintf( + ' %s%d' . "\n", + str_replace($baseLink, '', $classes[$class]['methods'][$method]['link']), + $methodName, + $method, + $crap + ); + } + + return $result; + } + + protected function getActiveBreadcrumb(AbstractNode $node) + { + return sprintf( + '
  • %s
  • ' . "\n" . + '
  • (Dashboard)
  • ' . "\n", + $node->getName() + ); + } +} diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Directory.php b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Directory.php new file mode 100644 index 0000000..a4b1b96 --- /dev/null +++ b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Directory.php @@ -0,0 +1,101 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace SebastianBergmann\CodeCoverage\Report\Html; + +use SebastianBergmann\CodeCoverage\Node\AbstractNode as Node; +use SebastianBergmann\CodeCoverage\Node\Directory as DirectoryNode; + +/** + * Renders a directory node. + */ +class Directory extends Renderer +{ + /** + * @param DirectoryNode $node + * @param string $file + */ + public function render(DirectoryNode $node, $file) + { + $template = new \Text_Template($this->templatePath . 'directory.html', '{{', '}}'); + + $this->setCommonTemplateVariables($template, $node); + + $items = $this->renderItem($node, true); + + foreach ($node->getDirectories() as $item) { + $items .= $this->renderItem($item); + } + + foreach ($node->getFiles() as $item) { + $items .= $this->renderItem($item); + } + + $template->setVar( + [ + 'id' => $node->getId(), + 'items' => $items + ] + ); + + $template->renderTo($file); + } + + /** + * @param Node $node + * @param bool $total + * + * @return string + */ + protected function renderItem(Node $node, $total = false) + { + $data = [ + 'numClasses' => $node->getNumClassesAndTraits(), + 'numTestedClasses' => $node->getNumTestedClassesAndTraits(), + 'numMethods' => $node->getNumMethods(), + 'numTestedMethods' => $node->getNumTestedMethods(), + 'linesExecutedPercent' => $node->getLineExecutedPercent(false), + 'linesExecutedPercentAsString' => $node->getLineExecutedPercent(), + 'numExecutedLines' => $node->getNumExecutedLines(), + 'numExecutableLines' => $node->getNumExecutableLines(), + 'testedMethodsPercent' => $node->getTestedMethodsPercent(false), + 'testedMethodsPercentAsString' => $node->getTestedMethodsPercent(), + 'testedClassesPercent' => $node->getTestedClassesAndTraitsPercent(false), + 'testedClassesPercentAsString' => $node->getTestedClassesAndTraitsPercent() + ]; + + if ($total) { + $data['name'] = 'Total'; + } else { + if ($node instanceof DirectoryNode) { + $data['name'] = sprintf( + '%s', + $node->getName(), + $node->getName() + ); + + $data['icon'] = ' '; + } else { + $data['name'] = sprintf( + '%s', + $node->getName(), + $node->getName() + ); + + $data['icon'] = ' '; + } + } + + return $this->renderItemTemplate( + new \Text_Template($this->templatePath . 'directory_item.html', '{{', '}}'), + $data + ); + } +} diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/File.php b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/File.php new file mode 100644 index 0000000..5461c9e --- /dev/null +++ b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/File.php @@ -0,0 +1,551 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace SebastianBergmann\CodeCoverage\Report\Html; + +use SebastianBergmann\CodeCoverage\Node\File as FileNode; +use SebastianBergmann\CodeCoverage\Util; + +/** + * Renders a file node. + */ +class File extends Renderer +{ + /** + * @var int + */ + private $htmlspecialcharsFlags; + + /** + * Constructor. + * + * @param string $templatePath + * @param string $generator + * @param string $date + * @param int $lowUpperBound + * @param int $highLowerBound + */ + public function __construct($templatePath, $generator, $date, $lowUpperBound, $highLowerBound) + { + parent::__construct( + $templatePath, + $generator, + $date, + $lowUpperBound, + $highLowerBound + ); + + $this->htmlspecialcharsFlags = ENT_COMPAT; + + $this->htmlspecialcharsFlags = $this->htmlspecialcharsFlags | ENT_HTML401 | ENT_SUBSTITUTE; + } + + /** + * @param FileNode $node + * @param string $file + */ + public function render(FileNode $node, $file) + { + $template = new \Text_Template($this->templatePath . 'file.html', '{{', '}}'); + + $template->setVar( + [ + 'items' => $this->renderItems($node), + 'lines' => $this->renderSource($node) + ] + ); + + $this->setCommonTemplateVariables($template, $node); + + $template->renderTo($file); + } + + /** + * @param FileNode $node + * + * @return string + */ + protected function renderItems(FileNode $node) + { + $template = new \Text_Template($this->templatePath . 'file_item.html', '{{', '}}'); + + $methodItemTemplate = new \Text_Template( + $this->templatePath . 'method_item.html', + '{{', + '}}' + ); + + $items = $this->renderItemTemplate( + $template, + [ + 'name' => 'Total', + 'numClasses' => $node->getNumClassesAndTraits(), + 'numTestedClasses' => $node->getNumTestedClassesAndTraits(), + 'numMethods' => $node->getNumMethods(), + 'numTestedMethods' => $node->getNumTestedMethods(), + 'linesExecutedPercent' => $node->getLineExecutedPercent(false), + 'linesExecutedPercentAsString' => $node->getLineExecutedPercent(), + 'numExecutedLines' => $node->getNumExecutedLines(), + 'numExecutableLines' => $node->getNumExecutableLines(), + 'testedMethodsPercent' => $node->getTestedMethodsPercent(false), + 'testedMethodsPercentAsString' => $node->getTestedMethodsPercent(), + 'testedClassesPercent' => $node->getTestedClassesAndTraitsPercent(false), + 'testedClassesPercentAsString' => $node->getTestedClassesAndTraitsPercent(), + 'crap' => 'CRAP' + ] + ); + + $items .= $this->renderFunctionItems( + $node->getFunctions(), + $methodItemTemplate + ); + + $items .= $this->renderTraitOrClassItems( + $node->getTraits(), + $template, + $methodItemTemplate + ); + + $items .= $this->renderTraitOrClassItems( + $node->getClasses(), + $template, + $methodItemTemplate + ); + + return $items; + } + + /** + * @param array $items + * @param \Text_Template $template + * @param \Text_Template $methodItemTemplate + * + * @return string + */ + protected function renderTraitOrClassItems(array $items, \Text_Template $template, \Text_Template $methodItemTemplate) + { + if (empty($items)) { + return ''; + } + + $buffer = ''; + + foreach ($items as $name => $item) { + $numMethods = count($item['methods']); + $numTestedMethods = 0; + + foreach ($item['methods'] as $method) { + if ($method['executedLines'] == $method['executableLines']) { + $numTestedMethods++; + } + } + + if ($item['executableLines'] > 0) { + $numClasses = 1; + $numTestedClasses = $numTestedMethods == $numMethods ? 1 : 0; + $linesExecutedPercentAsString = Util::percent( + $item['executedLines'], + $item['executableLines'], + true + ); + } else { + $numClasses = 'n/a'; + $numTestedClasses = 'n/a'; + $linesExecutedPercentAsString = 'n/a'; + } + + $buffer .= $this->renderItemTemplate( + $template, + [ + 'name' => $name, + 'numClasses' => $numClasses, + 'numTestedClasses' => $numTestedClasses, + 'numMethods' => $numMethods, + 'numTestedMethods' => $numTestedMethods, + 'linesExecutedPercent' => Util::percent( + $item['executedLines'], + $item['executableLines'], + false + ), + 'linesExecutedPercentAsString' => $linesExecutedPercentAsString, + 'numExecutedLines' => $item['executedLines'], + 'numExecutableLines' => $item['executableLines'], + 'testedMethodsPercent' => Util::percent( + $numTestedMethods, + $numMethods, + false + ), + 'testedMethodsPercentAsString' => Util::percent( + $numTestedMethods, + $numMethods, + true + ), + 'testedClassesPercent' => Util::percent( + $numTestedMethods == $numMethods ? 1 : 0, + 1, + false + ), + 'testedClassesPercentAsString' => Util::percent( + $numTestedMethods == $numMethods ? 1 : 0, + 1, + true + ), + 'crap' => $item['crap'] + ] + ); + + foreach ($item['methods'] as $method) { + $buffer .= $this->renderFunctionOrMethodItem( + $methodItemTemplate, + $method, + ' ' + ); + } + } + + return $buffer; + } + + /** + * @param array $functions + * @param \Text_Template $template + * + * @return string + */ + protected function renderFunctionItems(array $functions, \Text_Template $template) + { + if (empty($functions)) { + return ''; + } + + $buffer = ''; + + foreach ($functions as $function) { + $buffer .= $this->renderFunctionOrMethodItem( + $template, + $function + ); + } + + return $buffer; + } + + /** + * @param \Text_Template $template + * + * @return string + */ + protected function renderFunctionOrMethodItem(\Text_Template $template, array $item, $indent = '') + { + $numTestedItems = $item['executedLines'] == $item['executableLines'] ? 1 : 0; + + return $this->renderItemTemplate( + $template, + [ + 'name' => sprintf( + '%s%s', + $indent, + $item['startLine'], + htmlspecialchars($item['signature']), + isset($item['functionName']) ? $item['functionName'] : $item['methodName'] + ), + 'numMethods' => 1, + 'numTestedMethods' => $numTestedItems, + 'linesExecutedPercent' => Util::percent( + $item['executedLines'], + $item['executableLines'], + false + ), + 'linesExecutedPercentAsString' => Util::percent( + $item['executedLines'], + $item['executableLines'], + true + ), + 'numExecutedLines' => $item['executedLines'], + 'numExecutableLines' => $item['executableLines'], + 'testedMethodsPercent' => Util::percent( + $numTestedItems, + 1, + false + ), + 'testedMethodsPercentAsString' => Util::percent( + $numTestedItems, + 1, + true + ), + 'crap' => $item['crap'] + ] + ); + } + + /** + * @param FileNode $node + * + * @return string + */ + protected function renderSource(FileNode $node) + { + $coverageData = $node->getCoverageData(); + $testData = $node->getTestData(); + $codeLines = $this->loadFile($node->getPath()); + $lines = ''; + $i = 1; + + foreach ($codeLines as $line) { + $trClass = ''; + $popoverContent = ''; + $popoverTitle = ''; + + if (array_key_exists($i, $coverageData)) { + $numTests = count($coverageData[$i]); + + if ($coverageData[$i] === null) { + $trClass = ' class="warning"'; + } elseif ($numTests == 0) { + $trClass = ' class="danger"'; + } else { + $lineCss = 'covered-by-large-tests'; + $popoverContent = '
      '; + + if ($numTests > 1) { + $popoverTitle = $numTests . ' tests cover line ' . $i; + } else { + $popoverTitle = '1 test covers line ' . $i; + } + + foreach ($coverageData[$i] as $test) { + if ($lineCss == 'covered-by-large-tests' && $testData[$test]['size'] == 'medium') { + $lineCss = 'covered-by-medium-tests'; + } elseif ($testData[$test]['size'] == 'small') { + $lineCss = 'covered-by-small-tests'; + } + + switch ($testData[$test]['status']) { + case 0: + switch ($testData[$test]['size']) { + case 'small': + $testCSS = ' class="covered-by-small-tests"'; + break; + + case 'medium': + $testCSS = ' class="covered-by-medium-tests"'; + break; + + default: + $testCSS = ' class="covered-by-large-tests"'; + break; + } + break; + + case 1: + case 2: + $testCSS = ' class="warning"'; + break; + + case 3: + $testCSS = ' class="danger"'; + break; + + case 4: + $testCSS = ' class="danger"'; + break; + + default: + $testCSS = ''; + } + + $popoverContent .= sprintf( + '%s', + $testCSS, + htmlspecialchars($test) + ); + } + + $popoverContent .= '
    '; + $trClass = ' class="' . $lineCss . ' popin"'; + } + } + + if (!empty($popoverTitle)) { + $popover = sprintf( + ' data-title="%s" data-content="%s" data-placement="bottom" data-html="true"', + $popoverTitle, + htmlspecialchars($popoverContent) + ); + } else { + $popover = ''; + } + + $lines .= sprintf( + ' %s' . "\n", + $trClass, + $popover, + $i, + $i, + $i, + $line + ); + + $i++; + } + + return $lines; + } + + /** + * @param string $file + * + * @return array + */ + protected function loadFile($file) + { + $buffer = file_get_contents($file); + $tokens = token_get_all($buffer); + $result = ['']; + $i = 0; + $stringFlag = false; + $fileEndsWithNewLine = substr($buffer, -1) == "\n"; + + unset($buffer); + + foreach ($tokens as $j => $token) { + if (is_string($token)) { + if ($token === '"' && $tokens[$j - 1] !== '\\') { + $result[$i] .= sprintf( + '%s', + htmlspecialchars($token) + ); + + $stringFlag = !$stringFlag; + } else { + $result[$i] .= sprintf( + '%s', + htmlspecialchars($token) + ); + } + + continue; + } + + list($token, $value) = $token; + + $value = str_replace( + ["\t", ' '], + ['    ', ' '], + htmlspecialchars($value, $this->htmlspecialcharsFlags) + ); + + if ($value === "\n") { + $result[++$i] = ''; + } else { + $lines = explode("\n", $value); + + foreach ($lines as $jj => $line) { + $line = trim($line); + + if ($line !== '') { + if ($stringFlag) { + $colour = 'string'; + } else { + switch ($token) { + case T_INLINE_HTML: + $colour = 'html'; + break; + + case T_COMMENT: + case T_DOC_COMMENT: + $colour = 'comment'; + break; + + case T_ABSTRACT: + case T_ARRAY: + case T_AS: + case T_BREAK: + case T_CALLABLE: + case T_CASE: + case T_CATCH: + case T_CLASS: + case T_CLONE: + case T_CONTINUE: + case T_DEFAULT: + case T_ECHO: + case T_ELSE: + case T_ELSEIF: + case T_EMPTY: + case T_ENDDECLARE: + case T_ENDFOR: + case T_ENDFOREACH: + case T_ENDIF: + case T_ENDSWITCH: + case T_ENDWHILE: + case T_EXIT: + case T_EXTENDS: + case T_FINAL: + case T_FINALLY: + case T_FOREACH: + case T_FUNCTION: + case T_GLOBAL: + case T_IF: + case T_IMPLEMENTS: + case T_INCLUDE: + case T_INCLUDE_ONCE: + case T_INSTANCEOF: + case T_INSTEADOF: + case T_INTERFACE: + case T_ISSET: + case T_LOGICAL_AND: + case T_LOGICAL_OR: + case T_LOGICAL_XOR: + case T_NAMESPACE: + case T_NEW: + case T_PRIVATE: + case T_PROTECTED: + case T_PUBLIC: + case T_REQUIRE: + case T_REQUIRE_ONCE: + case T_RETURN: + case T_STATIC: + case T_THROW: + case T_TRAIT: + case T_TRY: + case T_UNSET: + case T_USE: + case T_VAR: + case T_WHILE: + case T_YIELD: + $colour = 'keyword'; + break; + + default: + $colour = 'default'; + } + } + + $result[$i] .= sprintf( + '%s', + $colour, + $line + ); + } + + if (isset($lines[$jj + 1])) { + $result[++$i] = ''; + } + } + } + } + + if ($fileEndsWithNewLine) { + unset($result[count($result)-1]); + } + + return $result; + } +} diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/coverage_bar.html.dist b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/coverage_bar.html.dist new file mode 100644 index 0000000..5a09c35 --- /dev/null +++ b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/coverage_bar.html.dist @@ -0,0 +1,5 @@ +
    +
    + {{percent}}% covered ({{level}}) +
    +
    diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/css/bootstrap.min.css b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/css/bootstrap.min.css new file mode 100644 index 0000000..ed3905e --- /dev/null +++ b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/css/bootstrap.min.css @@ -0,0 +1,6 @@ +/*! + * Bootstrap v3.3.7 (http://getbootstrap.com) + * Copyright 2011-2016 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + *//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,:after,:before{color:#000!important;text-shadow:none!important;background:0 0!important;-webkit-box-shadow:none!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}blockquote,pre{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff2) format('woff2'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\002a"}.glyphicon-plus:before{content:"\002b"}.glyphicon-eur:before,.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.glyphicon-cd:before{content:"\e201"}.glyphicon-save-file:before{content:"\e202"}.glyphicon-open-file:before{content:"\e203"}.glyphicon-level-up:before{content:"\e204"}.glyphicon-copy:before{content:"\e205"}.glyphicon-paste:before{content:"\e206"}.glyphicon-alert:before{content:"\e209"}.glyphicon-equalizer:before{content:"\e210"}.glyphicon-king:before{content:"\e211"}.glyphicon-queen:before{content:"\e212"}.glyphicon-pawn:before{content:"\e213"}.glyphicon-bishop:before{content:"\e214"}.glyphicon-knight:before{content:"\e215"}.glyphicon-baby-formula:before{content:"\e216"}.glyphicon-tent:before{content:"\26fa"}.glyphicon-blackboard:before{content:"\e218"}.glyphicon-bed:before{content:"\e219"}.glyphicon-apple:before{content:"\f8ff"}.glyphicon-erase:before{content:"\e221"}.glyphicon-hourglass:before{content:"\231b"}.glyphicon-lamp:before{content:"\e223"}.glyphicon-duplicate:before{content:"\e224"}.glyphicon-piggy-bank:before{content:"\e225"}.glyphicon-scissors:before{content:"\e226"}.glyphicon-bitcoin:before{content:"\e227"}.glyphicon-btc:before{content:"\e227"}.glyphicon-xbt:before{content:"\e227"}.glyphicon-yen:before{content:"\00a5"}.glyphicon-jpy:before{content:"\00a5"}.glyphicon-ruble:before{content:"\20bd"}.glyphicon-rub:before{content:"\20bd"}.glyphicon-scale:before{content:"\e230"}.glyphicon-ice-lolly:before{content:"\e231"}.glyphicon-ice-lolly-tasted:before{content:"\e232"}.glyphicon-education:before{content:"\e233"}.glyphicon-option-horizontal:before{content:"\e234"}.glyphicon-option-vertical:before{content:"\e235"}.glyphicon-menu-hamburger:before{content:"\e236"}.glyphicon-modal-window:before{content:"\e237"}.glyphicon-oil:before{content:"\e238"}.glyphicon-grain:before{content:"\e239"}.glyphicon-sunglasses:before{content:"\e240"}.glyphicon-text-size:before{content:"\e241"}.glyphicon-text-color:before{content:"\e242"}.glyphicon-text-background:before{content:"\e243"}.glyphicon-object-align-top:before{content:"\e244"}.glyphicon-object-align-bottom:before{content:"\e245"}.glyphicon-object-align-horizontal:before{content:"\e246"}.glyphicon-object-align-left:before{content:"\e247"}.glyphicon-object-align-vertical:before{content:"\e248"}.glyphicon-object-align-right:before{content:"\e249"}.glyphicon-triangle-right:before{content:"\e250"}.glyphicon-triangle-left:before{content:"\e251"}.glyphicon-triangle-bottom:before{content:"\e252"}.glyphicon-triangle-top:before{content:"\e253"}.glyphicon-console:before{content:"\e254"}.glyphicon-superscript:before{content:"\e255"}.glyphicon-subscript:before{content:"\e256"}.glyphicon-menu-left:before{content:"\e257"}.glyphicon-menu-right:before{content:"\e258"}.glyphicon-menu-down:before{content:"\e259"}.glyphicon-menu-up:before{content:"\e260"}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail a>img,.thumbnail>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role=button]{cursor:pointer}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{padding:.2em;background-color:#fcf8e3}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:focus,a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:focus,a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:focus,a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:focus,a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:focus,a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:focus,a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:focus,a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:focus,a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:focus,a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:focus,a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ol,ul{margin-top:0;margin-bottom:10px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;margin-left:-5px;list-style:none}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-top:0;margin-bottom:20px}dd,dt{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child{margin-bottom:0}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote .small:before,blockquote footer:before,blockquote small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:''}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:'\00A0 \2014'}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.25);box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;-webkit-box-shadow:none;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#777;text-align:left}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table-responsive{min-height:.01%;overflow-x:auto}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px\9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=file]:focus,input[type=checkbox]:focus,input[type=radio]:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control::-ms-expand{background-color:transparent;border:0}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date].form-control,input[type=time].form-control,input[type=datetime-local].form-control,input[type=month].form-control{line-height:34px}.input-group-sm input[type=date],.input-group-sm input[type=time],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],input[type=date].input-sm,input[type=time].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=time],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],input[type=date].input-lg,input[type=time].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{position:absolute;margin-top:4px\9;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.checkbox-inline.disabled,.radio-inline.disabled,fieldset[disabled] .checkbox-inline,fieldset[disabled] .radio-inline{cursor:not-allowed}.checkbox.disabled label,.radio.disabled label,fieldset[disabled] .checkbox label,fieldset[disabled] .radio label{cursor:not-allowed}.form-control-static{min-height:34px;padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.form-group-sm select.form-control{height:30px;line-height:30px}.form-group-sm select[multiple].form-control,.form-group-sm textarea.form-control{height:auto}.form-group-sm .form-control-static{height:30px;min-height:32px;padding:6px 10px;font-size:12px;line-height:1.5}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.form-group-lg select.form-control{height:46px;line-height:46px}.form-group-lg select[multiple].form-control,.form-group-lg textarea.form-control{height:auto}.form-group-lg .form-control-static{height:46px;min-height:38px;padding:11px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.form-group-lg .form-control+.form-control-feedback,.input-group-lg+.form-control-feedback,.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.form-group-sm .form-control+.form-control-feedback,.input-group-sm+.form-control-feedback,.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .checkbox,.has-success .checkbox-inline,.has-success .control-label,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.checkbox label,.has-success.checkbox-inline label,.has-success.radio label,.has-success.radio-inline label{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning .control-label,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.checkbox label,.has-warning.checkbox-inline label,.has-warning.radio label,.has-warning.radio-inline label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error .control-label,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.checkbox label,.has-error.checkbox-inline label,.has-error.radio label,.has-error.radio-inline label{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:11px;font-size:18px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px;font-size:12px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none;opacity:.65}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.focus,.btn-default:focus{color:#333;background-color:#e6e6e6;border-color:#8c8c8c}.btn-default:hover{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active.focus,.btn-default.active:focus,.btn-default.active:hover,.btn-default:active.focus,.btn-default:active:focus,.btn-default:active:hover,.open>.dropdown-toggle.btn-default.focus,.open>.dropdown-toggle.btn-default:focus,.open>.dropdown-toggle.btn-default:hover{color:#333;background-color:#d4d4d4;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled.focus,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled].focus,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#286090;border-color:#122b40}.btn-primary:hover{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active.focus,.btn-primary.active:focus,.btn-primary.active:hover,.btn-primary:active.focus,.btn-primary:active:focus,.btn-primary:active:hover,.open>.dropdown-toggle.btn-primary.focus,.open>.dropdown-toggle.btn-primary:focus,.open>.dropdown-toggle.btn-primary:hover{color:#fff;background-color:#204d74;border-color:#122b40}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled.focus,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled].focus,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.focus,.btn-success:focus{color:#fff;background-color:#449d44;border-color:#255625}.btn-success:hover{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active.focus,.btn-success.active:focus,.btn-success.active:hover,.btn-success:active.focus,.btn-success:active:focus,.btn-success:active:hover,.open>.dropdown-toggle.btn-success.focus,.open>.dropdown-toggle.btn-success:focus,.open>.dropdown-toggle.btn-success:hover{color:#fff;background-color:#398439;border-color:#255625}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled.focus,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled].focus,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.focus,.btn-info:focus{color:#fff;background-color:#31b0d5;border-color:#1b6d85}.btn-info:hover{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active.focus,.btn-info.active:focus,.btn-info.active:hover,.btn-info:active.focus,.btn-info:active:focus,.btn-info:active:hover,.open>.dropdown-toggle.btn-info.focus,.open>.dropdown-toggle.btn-info:focus,.open>.dropdown-toggle.btn-info:hover{color:#fff;background-color:#269abc;border-color:#1b6d85}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled.focus,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled].focus,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.focus,.btn-warning:focus{color:#fff;background-color:#ec971f;border-color:#985f0d}.btn-warning:hover{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active.focus,.btn-warning.active:focus,.btn-warning.active:hover,.btn-warning:active.focus,.btn-warning:active:focus,.btn-warning:active:hover,.open>.dropdown-toggle.btn-warning.focus,.open>.dropdown-toggle.btn-warning:focus,.open>.dropdown-toggle.btn-warning:hover{color:#fff;background-color:#d58512;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled.focus,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled].focus,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#c9302c;border-color:#761c19}.btn-danger:hover{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active.focus,.btn-danger.active:focus,.btn-danger.active:hover,.btn-danger:active.focus,.btn-danger:active:focus,.btn-danger:active:hover,.open>.dropdown-toggle.btn-danger.focus,.open>.dropdown-toggle.btn-danger:focus,.open>.dropdown-toggle.btn-danger:hover{color:#fff;background-color:#ac2925;border-color:#761c19}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled.focus,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled].focus,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#337ab7;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-timing-function:ease;-o-transition-timing-function:ease;transition-timing-function:ease;-webkit-transition-duration:.35s;-o-transition-duration:.35s;transition-duration:.35s;-webkit-transition-property:height,visibility;-o-transition-property:height,visibility;transition-property:height,visibility}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid\9;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown,.dropup{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{right:0;left:auto}.dropdown-menu-left{right:auto;left:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px dashed;border-bottom:4px solid\9}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn input[type=radio],[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group .form-control:focus{z-index:3}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group .form-control,.input-group-addon,.input-group-btn{display:table-cell}.input-group .form-control:not(:first-child):not(:last-child),.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{z-index:2;margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#337ab7}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;-webkit-box-shadow:none;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-right:0;padding-left:0}}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:340px}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-bottom,.navbar-fixed-top{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px 15px;font-size:18px;line-height:20px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{padding:10px 15px;margin-top:8px;margin-right:-15px;margin-bottom:8px;margin-left:-15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1)}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:768px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;-webkit-box-shadow:none;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#777}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#337ab7;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{z-index:2;color:#23527c;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:3;color:#fff;cursor:default;background-color:#337ab7;border-color:#337ab7}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px;line-height:1.3333333}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px;line-height:1.5}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:middle;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding-top:30px;padding-bottom:30px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron .h1,.jumbotron h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron,.container-fluid .jumbotron{padding-right:15px;padding-left:15px;border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron,.container-fluid .jumbotron{padding-right:60px;padding-left:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:border .2s ease-in-out;-o-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail a>img,.thumbnail>img{margin-right:auto;margin-left:auto}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#337ab7}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#337ab7;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress-bar-striped,.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;background-size:40px 40px}.progress-bar.active,.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{overflow:hidden;zoom:1}.media-body{width:10000px}.media-object{display:block}.media-object.img-thumbnail{max-width:none}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-body,.media-left,.media-right{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item,button.list-group-item{color:#555}a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover,button.list-group-item:focus,button.list-group-item:hover{color:#555;text-decoration:none;background-color:#f5f5f5}button.list-group-item{width:100%;text-align:left}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{color:#777;cursor:not-allowed;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success,button.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading,button.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover,button.list-group-item-success:focus,button.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover,button.list-group-item-success.active,button.list-group-item-success.active:focus,button.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info,button.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading,button.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover,button.list-group-item-info:focus,button.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover,button.list-group-item-info.active,button.list-group-item-info.active:focus,button.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning,button.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading,button.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover,button.list-group-item-warning:focus,button.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover,button.list-group-item-warning.active,button.list-group-item-warning.active:focus,button.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger,button.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading,button.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover,button.list-group-item-danger:focus,button.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover,button.list-group-item-danger.active,button.list-group-item-danger.active:focus,button.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.panel-heading+.panel-collapse>.list-group .list-group-item:first-child{border-top-left-radius:0;border-top-right-radius:0}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.list-group+.panel-footer{border-top-width:0}.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.panel-collapse>.table caption,.panel>.table caption,.panel>.table-responsive>.table caption{padding-right:15px;padding-left:15px}.panel>.table-responsive:first-child>.table:first-child,.panel>.table:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table:first-child>thead:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#337ab7}.panel-primary>.panel-heading{color:#fff;background-color:#337ab7;border-color:#337ab7}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#337ab7}.panel-primary>.panel-heading .badge{color:#337ab7;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#337ab7}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:0 0;border:0}.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;overflow:hidden;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);-o-transform:translate(0,-25%);transform:translate(0,-25%)}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);-o-transform:translate(0,0);transform:translate(0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;filter:alpha(opacity=0);opacity:0;line-break:auto}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{right:5px;bottom:0;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{bottom:0;left:5px;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;right:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;left:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);line-break:auto}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{bottom:-10px;left:1px;content:" ";border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;bottom:-10px;content:" ";border-right-width:0;border-left-color:#fff}.carousel{position:relative}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>a>img,.carousel-inner>.item>img{line-height:1}@media all and (transform-3d),(-webkit-transform-3d){.carousel-inner>.item{-webkit-transition:-webkit-transform .6s ease-in-out;-o-transition:-o-transform .6s ease-in-out;transition:transform .6s ease-in-out;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000px;perspective:1000px}.carousel-inner>.item.active.right,.carousel-inner>.item.next{left:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.carousel-inner>.item.active.left,.carousel-inner>.item.prev{left:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.carousel-inner>.item.active,.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right{left:0;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6);background-color:rgba(0,0,0,0);filter:alpha(opacity=50);opacity:.5}.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.0001)));background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.0001)),to(rgba(0,0,0,.5)));background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);background-repeat:repeat-x}.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;z-index:5;display:inline-block;margin-top:-10px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;font-family:serif;line-height:1}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000\9;background-color:rgba(0,0,0,0);border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-10px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-10px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.modal-header:after,.modal-header:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{display:table;content:" "}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.modal-header:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-lg,.visible-md,.visible-sm,.visible-xs{display:none!important}.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table!important}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}}@media (max-width:767px){.visible-xs-block{display:block!important}}@media (max-width:767px){.visible-xs-inline{display:inline!important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table!important}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-block{display:block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline{display:inline!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table!important}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-block{display:block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline{display:inline!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table!important}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}}@media (min-width:1200px){.visible-lg-block{display:block!important}}@media (min-width:1200px){.visible-lg-inline{display:inline!important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table!important}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}}@media print{.hidden-print{display:none!important}} +/*# sourceMappingURL=bootstrap.min.css.map */ \ No newline at end of file diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/css/nv.d3.min.css b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/css/nv.d3.min.css new file mode 100644 index 0000000..7a6f7fe --- /dev/null +++ b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/css/nv.d3.min.css @@ -0,0 +1 @@ +.nvd3 .nv-axis{pointer-events:none;opacity:1}.nvd3 .nv-axis path{fill:none;stroke:#000;stroke-opacity:.75;shape-rendering:crispEdges}.nvd3 .nv-axis path.domain{stroke-opacity:.75}.nvd3 .nv-axis.nv-x path.domain{stroke-opacity:0}.nvd3 .nv-axis line{fill:none;stroke:#e5e5e5;shape-rendering:crispEdges}.nvd3 .nv-axis .zero line,.nvd3 .nv-axis line.zero{stroke-opacity:.75}.nvd3 .nv-axis .nv-axisMaxMin text{font-weight:700}.nvd3 .x .nv-axis .nv-axisMaxMin text,.nvd3 .x2 .nv-axis .nv-axisMaxMin text,.nvd3 .x3 .nv-axis .nv-axisMaxMin text{text-anchor:middle}.nvd3 .nv-axis.nv-disabled{opacity:0}.nvd3 .nv-bars rect{fill-opacity:.75;transition:fill-opacity 250ms linear;-moz-transition:fill-opacity 250ms linear;-webkit-transition:fill-opacity 250ms linear}.nvd3 .nv-bars rect.hover{fill-opacity:1}.nvd3 .nv-bars .hover rect{fill:#add8e6}.nvd3 .nv-bars text{fill:rgba(0,0,0,0)}.nvd3 .nv-bars .hover text{fill:rgba(0,0,0,1)}.nvd3 .nv-multibar .nv-groups rect,.nvd3 .nv-multibarHorizontal .nv-groups rect,.nvd3 .nv-discretebar .nv-groups rect{stroke-opacity:0;transition:fill-opacity 250ms linear;-moz-transition:fill-opacity 250ms linear;-webkit-transition:fill-opacity 250ms linear}.nvd3 .nv-multibar .nv-groups rect:hover,.nvd3 .nv-multibarHorizontal .nv-groups rect:hover,.nvd3 .nv-candlestickBar .nv-ticks rect:hover,.nvd3 .nv-discretebar .nv-groups rect:hover{fill-opacity:1}.nvd3 .nv-discretebar .nv-groups text,.nvd3 .nv-multibarHorizontal .nv-groups text{font-weight:700;fill:rgba(0,0,0,1);stroke:rgba(0,0,0,0)}.nvd3 .nv-boxplot circle{fill-opacity:.5}.nvd3 .nv-boxplot circle:hover{fill-opacity:1}.nvd3 .nv-boxplot rect:hover{fill-opacity:1}.nvd3 line.nv-boxplot-median{stroke:#000}.nv-boxplot-tick:hover{stroke-width:2.5px}.nvd3.nv-bullet{font:10px sans-serif}.nvd3.nv-bullet .nv-measure{fill-opacity:.8}.nvd3.nv-bullet .nv-measure:hover{fill-opacity:1}.nvd3.nv-bullet .nv-marker{stroke:#000;stroke-width:2px}.nvd3.nv-bullet .nv-markerTriangle{stroke:#000;fill:#fff;stroke-width:1.5px}.nvd3.nv-bullet .nv-tick line{stroke:#666;stroke-width:.5px}.nvd3.nv-bullet .nv-range.nv-s0{fill:#eee}.nvd3.nv-bullet .nv-range.nv-s1{fill:#ddd}.nvd3.nv-bullet .nv-range.nv-s2{fill:#ccc}.nvd3.nv-bullet .nv-title{font-size:14px;font-weight:700}.nvd3.nv-bullet .nv-subtitle{fill:#999}.nvd3.nv-bullet .nv-range{fill:#bababa;fill-opacity:.4}.nvd3.nv-bullet .nv-range:hover{fill-opacity:.7}.nvd3.nv-candlestickBar .nv-ticks .nv-tick{stroke-width:1px}.nvd3.nv-candlestickBar .nv-ticks .nv-tick.hover{stroke-width:2px}.nvd3.nv-candlestickBar .nv-ticks .nv-tick.positive rect{stroke:#2ca02c;fill:#2ca02c}.nvd3.nv-candlestickBar .nv-ticks .nv-tick.negative rect{stroke:#d62728;fill:#d62728}.with-transitions .nv-candlestickBar .nv-ticks .nv-tick{transition:stroke-width 250ms linear,stroke-opacity 250ms linear;-moz-transition:stroke-width 250ms linear,stroke-opacity 250ms linear;-webkit-transition:stroke-width 250ms linear,stroke-opacity 250ms linear}.nvd3.nv-candlestickBar .nv-ticks line{stroke:#333}.nvd3 .nv-legend .nv-disabled rect{}.nvd3 .nv-check-box .nv-box{fill-opacity:0;stroke-width:2}.nvd3 .nv-check-box .nv-check{fill-opacity:0;stroke-width:4}.nvd3 .nv-series.nv-disabled .nv-check-box .nv-check{fill-opacity:0;stroke-opacity:0}.nvd3 .nv-controlsWrap .nv-legend .nv-check-box .nv-check{opacity:0}.nvd3.nv-linePlusBar .nv-bar rect{fill-opacity:.75}.nvd3.nv-linePlusBar .nv-bar rect:hover{fill-opacity:1}.nvd3 .nv-groups path.nv-line{fill:none}.nvd3 .nv-groups path.nv-area{stroke:none}.nvd3.nv-line .nvd3.nv-scatter .nv-groups .nv-point{fill-opacity:0;stroke-opacity:0}.nvd3.nv-scatter.nv-single-point .nv-groups .nv-point{fill-opacity:.5!important;stroke-opacity:.5!important}.with-transitions .nvd3 .nv-groups .nv-point{transition:stroke-width 250ms linear,stroke-opacity 250ms linear;-moz-transition:stroke-width 250ms linear,stroke-opacity 250ms linear;-webkit-transition:stroke-width 250ms linear,stroke-opacity 250ms linear}.nvd3.nv-scatter .nv-groups .nv-point.hover,.nvd3 .nv-groups .nv-point.hover{stroke-width:7px;fill-opacity:.95!important;stroke-opacity:.95!important}.nvd3 .nv-point-paths path{stroke:#aaa;stroke-opacity:0;fill:#eee;fill-opacity:0}.nvd3 .nv-indexLine{cursor:ew-resize}svg.nvd3-svg{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-ms-user-select:none;-moz-user-select:none;user-select:none;display:block;width:100%;height:100%}.nvtooltip.with-3d-shadow,.with-3d-shadow .nvtooltip{-moz-box-shadow:0 5px 10px rgba(0,0,0,.2);-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.nvd3 text{font:400 12px Arial}.nvd3 .title{font:700 14px Arial}.nvd3 .nv-background{fill:#fff;fill-opacity:0}.nvd3.nv-noData{font-size:18px;font-weight:700}.nv-brush .extent{fill-opacity:.125;shape-rendering:crispEdges}.nv-brush .resize path{fill:#eee;stroke:#666}.nvd3 .nv-legend .nv-series{cursor:pointer}.nvd3 .nv-legend .nv-disabled circle{fill-opacity:0}.nvd3 .nv-brush .extent{fill-opacity:0!important}.nvd3 .nv-brushBackground rect{stroke:#000;stroke-width:.4;fill:#fff;fill-opacity:.7}.nvd3.nv-ohlcBar .nv-ticks .nv-tick{stroke-width:1px}.nvd3.nv-ohlcBar .nv-ticks .nv-tick.hover{stroke-width:2px}.nvd3.nv-ohlcBar .nv-ticks .nv-tick.positive{stroke:#2ca02c}.nvd3.nv-ohlcBar .nv-ticks .nv-tick.negative{stroke:#d62728}.nvd3 .background path{fill:none;stroke:#EEE;stroke-opacity:.4;shape-rendering:crispEdges}.nvd3 .foreground path{fill:none;stroke-opacity:.7}.nvd3 .nv-parallelCoordinates-brush .extent{fill:#fff;fill-opacity:.6;stroke:gray;shape-rendering:crispEdges}.nvd3 .nv-parallelCoordinates .hover{fill-opacity:1;stroke-width:3px}.nvd3 .missingValuesline line{fill:none;stroke:#000;stroke-width:1;stroke-opacity:1;stroke-dasharray:5,5}.nvd3.nv-pie path{stroke-opacity:0;transition:fill-opacity 250ms linear,stroke-width 250ms linear,stroke-opacity 250ms linear;-moz-transition:fill-opacity 250ms linear,stroke-width 250ms linear,stroke-opacity 250ms linear;-webkit-transition:fill-opacity 250ms linear,stroke-width 250ms linear,stroke-opacity 250ms linear}.nvd3.nv-pie .nv-pie-title{font-size:24px;fill:rgba(19,196,249,.59)}.nvd3.nv-pie .nv-slice text{stroke:#000;stroke-width:0}.nvd3.nv-pie path{stroke:#fff;stroke-width:1px;stroke-opacity:1}.nvd3.nv-pie .hover path{fill-opacity:.7}.nvd3.nv-pie .nv-label{pointer-events:none}.nvd3.nv-pie .nv-label rect{fill-opacity:0;stroke-opacity:0}.nvd3 .nv-groups .nv-point.hover{stroke-width:20px;stroke-opacity:.5}.nvd3 .nv-scatter .nv-point.hover{fill-opacity:1}.nv-noninteractive{pointer-events:none}.nv-distx,.nv-disty{pointer-events:none}.nvd3.nv-sparkline path{fill:none}.nvd3.nv-sparklineplus g.nv-hoverValue{pointer-events:none}.nvd3.nv-sparklineplus .nv-hoverValue line{stroke:#333;stroke-width:1.5px}.nvd3.nv-sparklineplus,.nvd3.nv-sparklineplus g{pointer-events:all}.nvd3 .nv-hoverArea{fill-opacity:0;stroke-opacity:0}.nvd3.nv-sparklineplus .nv-xValue,.nvd3.nv-sparklineplus .nv-yValue{stroke-width:0;font-size:.9em;font-weight:400}.nvd3.nv-sparklineplus .nv-yValue{stroke:#f66}.nvd3.nv-sparklineplus .nv-maxValue{stroke:#2ca02c;fill:#2ca02c}.nvd3.nv-sparklineplus .nv-minValue{stroke:#d62728;fill:#d62728}.nvd3.nv-sparklineplus .nv-currentValue{font-weight:700;font-size:1.1em}.nvd3.nv-stackedarea path.nv-area{fill-opacity:.7;stroke-opacity:0;transition:fill-opacity 250ms linear,stroke-opacity 250ms linear;-moz-transition:fill-opacity 250ms linear,stroke-opacity 250ms linear;-webkit-transition:fill-opacity 250ms linear,stroke-opacity 250ms linear}.nvd3.nv-stackedarea path.nv-area.hover{fill-opacity:.9}.nvd3.nv-stackedarea .nv-groups .nv-point{stroke-opacity:0;fill-opacity:0}.nvtooltip{position:absolute;background-color:rgba(255,255,255,1);color:rgba(0,0,0,1);padding:1px;border:1px solid rgba(0,0,0,.2);z-index:10000;display:block;font-family:Arial;font-size:13px;text-align:left;pointer-events:none;white-space:nowrap;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.nvtooltip{background:rgba(255,255,255,.8);border:1px solid rgba(0,0,0,.5);border-radius:4px}.nvtooltip.with-transitions,.with-transitions .nvtooltip{transition:opacity 50ms linear;-moz-transition:opacity 50ms linear;-webkit-transition:opacity 50ms linear;transition-delay:200ms;-moz-transition-delay:200ms;-webkit-transition-delay:200ms}.nvtooltip.x-nvtooltip,.nvtooltip.y-nvtooltip{padding:8px}.nvtooltip h3{margin:0;padding:4px 14px;line-height:18px;font-weight:400;background-color:rgba(247,247,247,.75);color:rgba(0,0,0,1);text-align:center;border-bottom:1px solid #ebebeb;-webkit-border-radius:5px 5px 0 0;-moz-border-radius:5px 5px 0 0;border-radius:5px 5px 0 0}.nvtooltip p{margin:0;padding:5px 14px;text-align:center}.nvtooltip span{display:inline-block;margin:2px 0}.nvtooltip table{margin:6px;border-spacing:0}.nvtooltip table td{padding:2px 9px 2px 0;vertical-align:middle}.nvtooltip table td.key{font-weight:400}.nvtooltip table td.value{text-align:right;font-weight:700}.nvtooltip table tr.highlight td{padding:1px 9px 1px 0;border-bottom-style:solid;border-bottom-width:1px;border-top-style:solid;border-top-width:1px}.nvtooltip table td.legend-color-guide div{width:8px;height:8px;vertical-align:middle}.nvtooltip table td.legend-color-guide div{width:12px;height:12px;border:1px solid #999}.nvtooltip .footer{padding:3px;text-align:center}.nvtooltip-pending-removal{pointer-events:none;display:none}.nvd3 .nv-interactiveGuideLine{pointer-events:none}.nvd3 line.nv-guideline{stroke:#ccc} \ No newline at end of file diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/css/style.css b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/css/style.css new file mode 100644 index 0000000..824fb31 --- /dev/null +++ b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/css/style.css @@ -0,0 +1,122 @@ +body { + padding-top: 10px; +} + +.popover { + max-width: none; +} + +.glyphicon { + margin-right:.25em; +} + +.table-bordered>thead>tr>td { + border-bottom-width: 1px; +} + +.table tbody>tr>td, .table thead>tr>td { + padding-top: 3px; + padding-bottom: 3px; +} + +.table-condensed tbody>tr>td { + padding-top: 0; + padding-bottom: 0; +} + +.table .progress { + margin-bottom: inherit; +} + +.table-borderless th, .table-borderless td { + border: 0 !important; +} + +.table tbody tr.covered-by-large-tests, li.covered-by-large-tests, tr.success, td.success, li.success, span.success { + background-color: #dff0d8; +} + +.table tbody tr.covered-by-medium-tests, li.covered-by-medium-tests { + background-color: #c3e3b5; +} + +.table tbody tr.covered-by-small-tests, li.covered-by-small-tests { + background-color: #99cb84; +} + +.table tbody tr.danger, .table tbody td.danger, li.danger, span.danger { + background-color: #f2dede; +} + +.table tbody td.warning, li.warning, span.warning { + background-color: #fcf8e3; +} + +.table tbody td.info { + background-color: #d9edf7; +} + +td.big { + width: 117px; +} + +td.small { +} + +td.codeLine { + font-family: monospace; + white-space: pre; +} + +td span.comment { + color: #888a85; +} + +td span.default { + color: #2e3436; +} + +td span.html { + color: #888a85; +} + +td span.keyword { + color: #2e3436; + font-weight: bold; +} + +pre span.string { + color: #2e3436; +} + +span.success, span.warning, span.danger { + margin-right: 2px; + padding-left: 10px; + padding-right: 10px; + text-align: center; +} + +#classCoverageDistribution, #classComplexity { + height: 200px; + width: 475px; +} + +#toplink { + position: fixed; + left: 5px; + bottom: 5px; + outline: 0; +} + +svg text { + font-family: "Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, Helvetica, sans-serif; + font-size: 11px; + color: #666; + fill: #666; +} + +.scrollbox { + height:245px; + overflow-x:hidden; + overflow-y:scroll; +} diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/dashboard.html.dist b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/dashboard.html.dist new file mode 100644 index 0000000..8bdf04d --- /dev/null +++ b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/dashboard.html.dist @@ -0,0 +1,284 @@ + + + + + Dashboard for {{full_path}} + + + + + + + +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    +

    Classes

    +
    +
    +
    +
    +

    Coverage Distribution

    +
    + +
    +
    +
    +

    Complexity

    +
    + +
    +
    +
    +
    +
    +

    Insufficient Coverage

    +
    + + + + + + + + +{{insufficient_coverage_classes}} + +
    ClassCoverage
    +
    +
    +
    +

    Project Risks

    +
    + + + + + + + + +{{project_risks_classes}} + +
    ClassCRAP
    +
    +
    +
    +
    +
    +

    Methods

    +
    +
    +
    +
    +

    Coverage Distribution

    +
    + +
    +
    +
    +

    Complexity

    +
    + +
    +
    +
    +
    +
    +

    Insufficient Coverage

    +
    + + + + + + + + +{{insufficient_coverage_methods}} + +
    MethodCoverage
    +
    +
    +
    +

    Project Risks

    +
    + + + + + + + + +{{project_risks_methods}} + +
    MethodCRAP
    +
    +
    +
    + +
    + + + + + + + + diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/directory.html.dist b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/directory.html.dist new file mode 100644 index 0000000..29fbf23 --- /dev/null +++ b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/directory.html.dist @@ -0,0 +1,61 @@ + + + + + Code Coverage for {{full_path}} + + + + + + +
    +
    +
    +
    + +
    +
    +
    +
    +
    + + + + + + + + + + + + + + +{{items}} + +
     
    Code Coverage
     
    Lines
    Functions and Methods
    Classes and Traits
    +
    +
    +

    Legend

    +

    + Low: 0% to {{low_upper_bound}}% + Medium: {{low_upper_bound}}% to {{high_lower_bound}}% + High: {{high_lower_bound}}% to 100% +

    +

    + Generated by php-code-coverage {{version}} using {{runtime}}{{generator}} at {{date}}. +

    +
    +
    + + + + + diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/directory_item.html.dist b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/directory_item.html.dist new file mode 100644 index 0000000..78dbb35 --- /dev/null +++ b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/directory_item.html.dist @@ -0,0 +1,13 @@ + + {{icon}}{{name}} + {{lines_bar}} +
    {{lines_executed_percent}}
    +
    {{lines_number}}
    + {{methods_bar}} +
    {{methods_tested_percent}}
    +
    {{methods_number}}
    + {{classes_bar}} +
    {{classes_tested_percent}}
    +
    {{classes_number}}
    + + diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/file.html.dist b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/file.html.dist new file mode 100644 index 0000000..8c42d4e --- /dev/null +++ b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/file.html.dist @@ -0,0 +1,90 @@ + + + + + Code Coverage for {{full_path}} + + + + + + +
    +
    +
    +
    + +
    +
    +
    +
    +
    + + + + + + + + + + + + + + +{{items}} + +
     
    Code Coverage
     
    Classes and Traits
    Functions and Methods
    Lines
    + + +{{lines}} + +
    +
    +
    +

    Legend

    +

    + Executed + Not Executed + Dead Code +

    +

    + Generated by php-code-coverage {{version}} using {{runtime}}{{generator}} at {{date}}. +

    + +
    +
    + + + + + + diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/file_item.html.dist b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/file_item.html.dist new file mode 100644 index 0000000..756fdd6 --- /dev/null +++ b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/file_item.html.dist @@ -0,0 +1,14 @@ + + {{name}} + {{classes_bar}} +
    {{classes_tested_percent}}
    +
    {{classes_number}}
    + {{methods_bar}} +
    {{methods_tested_percent}}
    +
    {{methods_number}}
    + {{crap}} + {{lines_bar}} +
    {{lines_executed_percent}}
    +
    {{lines_number}}
    + + diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/fonts/glyphicons-halflings-regular.eot b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/fonts/glyphicons-halflings-regular.eot new file mode 100644 index 0000000..b93a495 Binary files /dev/null and b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/fonts/glyphicons-halflings-regular.eot differ diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/fonts/glyphicons-halflings-regular.svg b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/fonts/glyphicons-halflings-regular.svg new file mode 100644 index 0000000..94fb549 --- /dev/null +++ b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/fonts/glyphicons-halflings-regular.svg @@ -0,0 +1,288 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/fonts/glyphicons-halflings-regular.ttf b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/fonts/glyphicons-halflings-regular.ttf new file mode 100644 index 0000000..1413fc6 Binary files /dev/null and b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/fonts/glyphicons-halflings-regular.ttf differ diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/fonts/glyphicons-halflings-regular.woff b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/fonts/glyphicons-halflings-regular.woff new file mode 100644 index 0000000..9e61285 Binary files /dev/null and b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/fonts/glyphicons-halflings-regular.woff differ diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/fonts/glyphicons-halflings-regular.woff2 b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/fonts/glyphicons-halflings-regular.woff2 new file mode 100644 index 0000000..64539b5 Binary files /dev/null and b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/fonts/glyphicons-halflings-regular.woff2 differ diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/js/bootstrap.min.js b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/js/bootstrap.min.js new file mode 100644 index 0000000..9bcd2fc --- /dev/null +++ b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/js/bootstrap.min.js @@ -0,0 +1,7 @@ +/*! + * Bootstrap v3.3.7 (http://getbootstrap.com) + * Copyright 2011-2016 Twitter, Inc. + * Licensed under the MIT license + */ +if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1||b[0]>3)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){if(a(b.target).is(this))return b.handleObj.handler.apply(this,arguments)}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.7",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a("#"===f?[]:f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.7",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c).prop(c,!0)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c).prop(c,!1))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target).closest(".btn");b.call(d,"toggle"),a(c.target).is('input[type="radio"], input[type="checkbox"]')||(c.preventDefault(),d.is("input,button")?d.trigger("focus"):d.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.7",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(a>this.$items.length-1||a<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){if(!this.sliding)return this.slide("next")},c.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.7",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger(a.Event("hidden.bs.dropdown",f)))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.7",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger(a.Event("shown.bs.dropdown",h))}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdown-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&jdocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth
    ',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);if(c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),!c.isInStateTrue())return clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-mo.width?"left":"left"==h&&k.left-lg.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;jg.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null,a.$element=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;!e&&/destroy|hide/.test(b)||(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.7",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.7",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b=e[a]&&(void 0===e[a+1]||b .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.7",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return e=a-d&&"bottom"},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery); \ No newline at end of file diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/js/d3.min.js b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/js/d3.min.js new file mode 100644 index 0000000..1664873 --- /dev/null +++ b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/js/d3.min.js @@ -0,0 +1,5 @@ +!function(){function n(n){return n&&(n.ownerDocument||n.document||n).documentElement}function t(n){return n&&(n.ownerDocument&&n.ownerDocument.defaultView||n.document&&n||n.defaultView)}function e(n,t){return t>n?-1:n>t?1:n>=t?0:NaN}function r(n){return null===n?NaN:+n}function i(n){return!isNaN(n)}function u(n){return{left:function(t,e,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);i>r;){var u=r+i>>>1;n(t[u],e)<0?r=u+1:i=u}return r},right:function(t,e,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);i>r;){var u=r+i>>>1;n(t[u],e)>0?i=u:r=u+1}return r}}}function o(n){return n.length}function a(n){for(var t=1;n*t%1;)t*=10;return t}function l(n,t){for(var e in t)Object.defineProperty(n.prototype,e,{value:t[e],enumerable:!1})}function c(){this._=Object.create(null)}function f(n){return(n+="")===bo||n[0]===_o?_o+n:n}function s(n){return(n+="")[0]===_o?n.slice(1):n}function h(n){return f(n)in this._}function p(n){return(n=f(n))in this._&&delete this._[n]}function g(){var n=[];for(var t in this._)n.push(s(t));return n}function v(){var n=0;for(var t in this._)++n;return n}function d(){for(var n in this._)return!1;return!0}function y(){this._=Object.create(null)}function m(n){return n}function M(n,t,e){return function(){var r=e.apply(t,arguments);return r===t?n:r}}function x(n,t){if(t in n)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var e=0,r=wo.length;r>e;++e){var i=wo[e]+t;if(i in n)return i}}function b(){}function _(){}function w(n){function t(){for(var t,r=e,i=-1,u=r.length;++ie;e++)for(var i,u=n[e],o=0,a=u.length;a>o;o++)(i=u[o])&&t(i,o,e);return n}function Z(n){return ko(n,qo),n}function V(n){var t,e;return function(r,i,u){var o,a=n[u].update,l=a.length;for(u!=e&&(e=u,t=0),i>=t&&(t=i+1);!(o=a[t])&&++t0&&(n=n.slice(0,a));var c=To.get(n);return c&&(n=c,l=B),a?t?i:r:t?b:u}function $(n,t){return function(e){var r=ao.event;ao.event=e,t[0]=this.__data__;try{n.apply(this,t)}finally{ao.event=r}}}function B(n,t){var e=$(n,t);return function(n){var t=this,r=n.relatedTarget;r&&(r===t||8&r.compareDocumentPosition(t))||e.call(t,n)}}function W(e){var r=".dragsuppress-"+ ++Do,i="click"+r,u=ao.select(t(e)).on("touchmove"+r,S).on("dragstart"+r,S).on("selectstart"+r,S);if(null==Ro&&(Ro="onselectstart"in e?!1:x(e.style,"userSelect")),Ro){var o=n(e).style,a=o[Ro];o[Ro]="none"}return function(n){if(u.on(r,null),Ro&&(o[Ro]=a),n){var t=function(){u.on(i,null)};u.on(i,function(){S(),t()},!0),setTimeout(t,0)}}}function J(n,e){e.changedTouches&&(e=e.changedTouches[0]);var r=n.ownerSVGElement||n;if(r.createSVGPoint){var i=r.createSVGPoint();if(0>Po){var u=t(n);if(u.scrollX||u.scrollY){r=ao.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var o=r[0][0].getScreenCTM();Po=!(o.f||o.e),r.remove()}}return Po?(i.x=e.pageX,i.y=e.pageY):(i.x=e.clientX,i.y=e.clientY),i=i.matrixTransform(n.getScreenCTM().inverse()),[i.x,i.y]}var a=n.getBoundingClientRect();return[e.clientX-a.left-n.clientLeft,e.clientY-a.top-n.clientTop]}function G(){return ao.event.changedTouches[0].identifier}function K(n){return n>0?1:0>n?-1:0}function Q(n,t,e){return(t[0]-n[0])*(e[1]-n[1])-(t[1]-n[1])*(e[0]-n[0])}function nn(n){return n>1?0:-1>n?Fo:Math.acos(n)}function tn(n){return n>1?Io:-1>n?-Io:Math.asin(n)}function en(n){return((n=Math.exp(n))-1/n)/2}function rn(n){return((n=Math.exp(n))+1/n)/2}function un(n){return((n=Math.exp(2*n))-1)/(n+1)}function on(n){return(n=Math.sin(n/2))*n}function an(){}function ln(n,t,e){return this instanceof ln?(this.h=+n,this.s=+t,void(this.l=+e)):arguments.length<2?n instanceof ln?new ln(n.h,n.s,n.l):_n(""+n,wn,ln):new ln(n,t,e)}function cn(n,t,e){function r(n){return n>360?n-=360:0>n&&(n+=360),60>n?u+(o-u)*n/60:180>n?o:240>n?u+(o-u)*(240-n)/60:u}function i(n){return Math.round(255*r(n))}var u,o;return n=isNaN(n)?0:(n%=360)<0?n+360:n,t=isNaN(t)?0:0>t?0:t>1?1:t,e=0>e?0:e>1?1:e,o=.5>=e?e*(1+t):e+t-e*t,u=2*e-o,new mn(i(n+120),i(n),i(n-120))}function fn(n,t,e){return this instanceof fn?(this.h=+n,this.c=+t,void(this.l=+e)):arguments.length<2?n instanceof fn?new fn(n.h,n.c,n.l):n instanceof hn?gn(n.l,n.a,n.b):gn((n=Sn((n=ao.rgb(n)).r,n.g,n.b)).l,n.a,n.b):new fn(n,t,e)}function sn(n,t,e){return isNaN(n)&&(n=0),isNaN(t)&&(t=0),new hn(e,Math.cos(n*=Yo)*t,Math.sin(n)*t)}function hn(n,t,e){return this instanceof hn?(this.l=+n,this.a=+t,void(this.b=+e)):arguments.length<2?n instanceof hn?new hn(n.l,n.a,n.b):n instanceof fn?sn(n.h,n.c,n.l):Sn((n=mn(n)).r,n.g,n.b):new hn(n,t,e)}function pn(n,t,e){var r=(n+16)/116,i=r+t/500,u=r-e/200;return i=vn(i)*na,r=vn(r)*ta,u=vn(u)*ea,new mn(yn(3.2404542*i-1.5371385*r-.4985314*u),yn(-.969266*i+1.8760108*r+.041556*u),yn(.0556434*i-.2040259*r+1.0572252*u))}function gn(n,t,e){return n>0?new fn(Math.atan2(e,t)*Zo,Math.sqrt(t*t+e*e),n):new fn(NaN,NaN,n)}function vn(n){return n>.206893034?n*n*n:(n-4/29)/7.787037}function dn(n){return n>.008856?Math.pow(n,1/3):7.787037*n+4/29}function yn(n){return Math.round(255*(.00304>=n?12.92*n:1.055*Math.pow(n,1/2.4)-.055))}function mn(n,t,e){return this instanceof mn?(this.r=~~n,this.g=~~t,void(this.b=~~e)):arguments.length<2?n instanceof mn?new mn(n.r,n.g,n.b):_n(""+n,mn,cn):new mn(n,t,e)}function Mn(n){return new mn(n>>16,n>>8&255,255&n)}function xn(n){return Mn(n)+""}function bn(n){return 16>n?"0"+Math.max(0,n).toString(16):Math.min(255,n).toString(16)}function _n(n,t,e){var r,i,u,o=0,a=0,l=0;if(r=/([a-z]+)\((.*)\)/.exec(n=n.toLowerCase()))switch(i=r[2].split(","),r[1]){case"hsl":return e(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return t(Nn(i[0]),Nn(i[1]),Nn(i[2]))}return(u=ua.get(n))?t(u.r,u.g,u.b):(null==n||"#"!==n.charAt(0)||isNaN(u=parseInt(n.slice(1),16))||(4===n.length?(o=(3840&u)>>4,o=o>>4|o,a=240&u,a=a>>4|a,l=15&u,l=l<<4|l):7===n.length&&(o=(16711680&u)>>16,a=(65280&u)>>8,l=255&u)),t(o,a,l))}function wn(n,t,e){var r,i,u=Math.min(n/=255,t/=255,e/=255),o=Math.max(n,t,e),a=o-u,l=(o+u)/2;return a?(i=.5>l?a/(o+u):a/(2-o-u),r=n==o?(t-e)/a+(e>t?6:0):t==o?(e-n)/a+2:(n-t)/a+4,r*=60):(r=NaN,i=l>0&&1>l?0:r),new ln(r,i,l)}function Sn(n,t,e){n=kn(n),t=kn(t),e=kn(e);var r=dn((.4124564*n+.3575761*t+.1804375*e)/na),i=dn((.2126729*n+.7151522*t+.072175*e)/ta),u=dn((.0193339*n+.119192*t+.9503041*e)/ea);return hn(116*i-16,500*(r-i),200*(i-u))}function kn(n){return(n/=255)<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function Nn(n){var t=parseFloat(n);return"%"===n.charAt(n.length-1)?Math.round(2.55*t):t}function En(n){return"function"==typeof n?n:function(){return n}}function An(n){return function(t,e,r){return 2===arguments.length&&"function"==typeof e&&(r=e,e=null),Cn(t,e,n,r)}}function Cn(n,t,e,r){function i(){var n,t=l.status;if(!t&&Ln(l)||t>=200&&300>t||304===t){try{n=e.call(u,l)}catch(r){return void o.error.call(u,r)}o.load.call(u,n)}else o.error.call(u,l)}var u={},o=ao.dispatch("beforesend","progress","load","error"),a={},l=new XMLHttpRequest,c=null;return!this.XDomainRequest||"withCredentials"in l||!/^(http(s)?:)?\/\//.test(n)||(l=new XDomainRequest),"onload"in l?l.onload=l.onerror=i:l.onreadystatechange=function(){l.readyState>3&&i()},l.onprogress=function(n){var t=ao.event;ao.event=n;try{o.progress.call(u,l)}finally{ao.event=t}},u.header=function(n,t){return n=(n+"").toLowerCase(),arguments.length<2?a[n]:(null==t?delete a[n]:a[n]=t+"",u)},u.mimeType=function(n){return arguments.length?(t=null==n?null:n+"",u):t},u.responseType=function(n){return arguments.length?(c=n,u):c},u.response=function(n){return e=n,u},["get","post"].forEach(function(n){u[n]=function(){return u.send.apply(u,[n].concat(co(arguments)))}}),u.send=function(e,r,i){if(2===arguments.length&&"function"==typeof r&&(i=r,r=null),l.open(e,n,!0),null==t||"accept"in a||(a.accept=t+",*/*"),l.setRequestHeader)for(var f in a)l.setRequestHeader(f,a[f]);return null!=t&&l.overrideMimeType&&l.overrideMimeType(t),null!=c&&(l.responseType=c),null!=i&&u.on("error",i).on("load",function(n){i(null,n)}),o.beforesend.call(u,l),l.send(null==r?null:r),u},u.abort=function(){return l.abort(),u},ao.rebind(u,o,"on"),null==r?u:u.get(zn(r))}function zn(n){return 1===n.length?function(t,e){n(null==t?e:null)}:n}function Ln(n){var t=n.responseType;return t&&"text"!==t?n.response:n.responseText}function qn(n,t,e){var r=arguments.length;2>r&&(t=0),3>r&&(e=Date.now());var i=e+t,u={c:n,t:i,n:null};return aa?aa.n=u:oa=u,aa=u,la||(ca=clearTimeout(ca),la=1,fa(Tn)),u}function Tn(){var n=Rn(),t=Dn()-n;t>24?(isFinite(t)&&(clearTimeout(ca),ca=setTimeout(Tn,t)),la=0):(la=1,fa(Tn))}function Rn(){for(var n=Date.now(),t=oa;t;)n>=t.t&&t.c(n-t.t)&&(t.c=null),t=t.n;return n}function Dn(){for(var n,t=oa,e=1/0;t;)t.c?(t.t8?function(n){return n/e}:function(n){return n*e},symbol:n}}function jn(n){var t=n.decimal,e=n.thousands,r=n.grouping,i=n.currency,u=r&&e?function(n,t){for(var i=n.length,u=[],o=0,a=r[0],l=0;i>0&&a>0&&(l+a+1>t&&(a=Math.max(1,t-l)),u.push(n.substring(i-=a,i+a)),!((l+=a+1)>t));)a=r[o=(o+1)%r.length];return u.reverse().join(e)}:m;return function(n){var e=ha.exec(n),r=e[1]||" ",o=e[2]||">",a=e[3]||"-",l=e[4]||"",c=e[5],f=+e[6],s=e[7],h=e[8],p=e[9],g=1,v="",d="",y=!1,m=!0;switch(h&&(h=+h.substring(1)),(c||"0"===r&&"="===o)&&(c=r="0",o="="),p){case"n":s=!0,p="g";break;case"%":g=100,d="%",p="f";break;case"p":g=100,d="%",p="r";break;case"b":case"o":case"x":case"X":"#"===l&&(v="0"+p.toLowerCase());case"c":m=!1;case"d":y=!0,h=0;break;case"s":g=-1,p="r"}"$"===l&&(v=i[0],d=i[1]),"r"!=p||h||(p="g"),null!=h&&("g"==p?h=Math.max(1,Math.min(21,h)):"e"!=p&&"f"!=p||(h=Math.max(0,Math.min(20,h)))),p=pa.get(p)||Fn;var M=c&&s;return function(n){var e=d;if(y&&n%1)return"";var i=0>n||0===n&&0>1/n?(n=-n,"-"):"-"===a?"":a;if(0>g){var l=ao.formatPrefix(n,h);n=l.scale(n),e=l.symbol+d}else n*=g;n=p(n,h);var x,b,_=n.lastIndexOf(".");if(0>_){var w=m?n.lastIndexOf("e"):-1;0>w?(x=n,b=""):(x=n.substring(0,w),b=n.substring(w))}else x=n.substring(0,_),b=t+n.substring(_+1);!c&&s&&(x=u(x,1/0));var S=v.length+x.length+b.length+(M?0:i.length),k=f>S?new Array(S=f-S+1).join(r):"";return M&&(x=u(k+x,k.length?f-b.length:1/0)),i+=v,n=x+b,("<"===o?i+n+k:">"===o?k+i+n:"^"===o?k.substring(0,S>>=1)+i+n+k.substring(S):i+(M?n:k+n))+e}}}function Fn(n){return n+""}function Hn(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function On(n,t,e){function r(t){var e=n(t),r=u(e,1);return r-t>t-e?e:r}function i(e){return t(e=n(new va(e-1)),1),e}function u(n,e){return t(n=new va(+n),e),n}function o(n,r,u){var o=i(n),a=[];if(u>1)for(;r>o;)e(o)%u||a.push(new Date(+o)),t(o,1);else for(;r>o;)a.push(new Date(+o)),t(o,1);return a}function a(n,t,e){try{va=Hn;var r=new Hn;return r._=n,o(r,t,e)}finally{va=Date}}n.floor=n,n.round=r,n.ceil=i,n.offset=u,n.range=o;var l=n.utc=In(n);return l.floor=l,l.round=In(r),l.ceil=In(i),l.offset=In(u),l.range=a,n}function In(n){return function(t,e){try{va=Hn;var r=new Hn;return r._=t,n(r,e)._}finally{va=Date}}}function Yn(n){function t(n){function t(t){for(var e,i,u,o=[],a=-1,l=0;++aa;){if(r>=c)return-1;if(i=t.charCodeAt(a++),37===i){if(o=t.charAt(a++),u=C[o in ya?t.charAt(a++):o],!u||(r=u(n,e,r))<0)return-1}else if(i!=e.charCodeAt(r++))return-1}return r}function r(n,t,e){_.lastIndex=0;var r=_.exec(t.slice(e));return r?(n.w=w.get(r[0].toLowerCase()),e+r[0].length):-1}function i(n,t,e){x.lastIndex=0;var r=x.exec(t.slice(e));return r?(n.w=b.get(r[0].toLowerCase()),e+r[0].length):-1}function u(n,t,e){N.lastIndex=0;var r=N.exec(t.slice(e));return r?(n.m=E.get(r[0].toLowerCase()),e+r[0].length):-1}function o(n,t,e){S.lastIndex=0;var r=S.exec(t.slice(e));return r?(n.m=k.get(r[0].toLowerCase()),e+r[0].length):-1}function a(n,t,r){return e(n,A.c.toString(),t,r)}function l(n,t,r){return e(n,A.x.toString(),t,r)}function c(n,t,r){return e(n,A.X.toString(),t,r)}function f(n,t,e){var r=M.get(t.slice(e,e+=2).toLowerCase());return null==r?-1:(n.p=r,e)}var s=n.dateTime,h=n.date,p=n.time,g=n.periods,v=n.days,d=n.shortDays,y=n.months,m=n.shortMonths;t.utc=function(n){function e(n){try{va=Hn;var t=new va;return t._=n,r(t)}finally{va=Date}}var r=t(n);return e.parse=function(n){try{va=Hn;var t=r.parse(n);return t&&t._}finally{va=Date}},e.toString=r.toString,e},t.multi=t.utc.multi=ct;var M=ao.map(),x=Vn(v),b=Xn(v),_=Vn(d),w=Xn(d),S=Vn(y),k=Xn(y),N=Vn(m),E=Xn(m);g.forEach(function(n,t){M.set(n.toLowerCase(),t)});var A={a:function(n){return d[n.getDay()]},A:function(n){return v[n.getDay()]},b:function(n){return m[n.getMonth()]},B:function(n){return y[n.getMonth()]},c:t(s),d:function(n,t){return Zn(n.getDate(),t,2)},e:function(n,t){return Zn(n.getDate(),t,2)},H:function(n,t){return Zn(n.getHours(),t,2)},I:function(n,t){return Zn(n.getHours()%12||12,t,2)},j:function(n,t){return Zn(1+ga.dayOfYear(n),t,3)},L:function(n,t){return Zn(n.getMilliseconds(),t,3)},m:function(n,t){return Zn(n.getMonth()+1,t,2)},M:function(n,t){return Zn(n.getMinutes(),t,2)},p:function(n){return g[+(n.getHours()>=12)]},S:function(n,t){return Zn(n.getSeconds(),t,2)},U:function(n,t){return Zn(ga.sundayOfYear(n),t,2)},w:function(n){return n.getDay()},W:function(n,t){return Zn(ga.mondayOfYear(n),t,2)},x:t(h),X:t(p),y:function(n,t){return Zn(n.getFullYear()%100,t,2)},Y:function(n,t){return Zn(n.getFullYear()%1e4,t,4)},Z:at,"%":function(){return"%"}},C={a:r,A:i,b:u,B:o,c:a,d:tt,e:tt,H:rt,I:rt,j:et,L:ot,m:nt,M:it,p:f,S:ut,U:Bn,w:$n,W:Wn,x:l,X:c,y:Gn,Y:Jn,Z:Kn,"%":lt};return t}function Zn(n,t,e){var r=0>n?"-":"",i=(r?-n:n)+"",u=i.length;return r+(e>u?new Array(e-u+1).join(t)+i:i)}function Vn(n){return new RegExp("^(?:"+n.map(ao.requote).join("|")+")","i")}function Xn(n){for(var t=new c,e=-1,r=n.length;++e68?1900:2e3)}function nt(n,t,e){ma.lastIndex=0;var r=ma.exec(t.slice(e,e+2));return r?(n.m=r[0]-1,e+r[0].length):-1}function tt(n,t,e){ma.lastIndex=0;var r=ma.exec(t.slice(e,e+2));return r?(n.d=+r[0],e+r[0].length):-1}function et(n,t,e){ma.lastIndex=0;var r=ma.exec(t.slice(e,e+3));return r?(n.j=+r[0],e+r[0].length):-1}function rt(n,t,e){ma.lastIndex=0;var r=ma.exec(t.slice(e,e+2));return r?(n.H=+r[0],e+r[0].length):-1}function it(n,t,e){ma.lastIndex=0;var r=ma.exec(t.slice(e,e+2));return r?(n.M=+r[0],e+r[0].length):-1}function ut(n,t,e){ma.lastIndex=0;var r=ma.exec(t.slice(e,e+2));return r?(n.S=+r[0],e+r[0].length):-1}function ot(n,t,e){ma.lastIndex=0;var r=ma.exec(t.slice(e,e+3));return r?(n.L=+r[0],e+r[0].length):-1}function at(n){var t=n.getTimezoneOffset(),e=t>0?"-":"+",r=xo(t)/60|0,i=xo(t)%60;return e+Zn(r,"0",2)+Zn(i,"0",2)}function lt(n,t,e){Ma.lastIndex=0;var r=Ma.exec(t.slice(e,e+1));return r?e+r[0].length:-1}function ct(n){for(var t=n.length,e=-1;++e=0?1:-1,a=o*e,l=Math.cos(t),c=Math.sin(t),f=u*c,s=i*l+f*Math.cos(a),h=f*o*Math.sin(a);ka.add(Math.atan2(h,s)),r=n,i=l,u=c}var t,e,r,i,u;Na.point=function(o,a){Na.point=n,r=(t=o)*Yo,i=Math.cos(a=(e=a)*Yo/2+Fo/4),u=Math.sin(a)},Na.lineEnd=function(){n(t,e)}}function dt(n){var t=n[0],e=n[1],r=Math.cos(e);return[r*Math.cos(t),r*Math.sin(t),Math.sin(e)]}function yt(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function mt(n,t){return[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]]}function Mt(n,t){n[0]+=t[0],n[1]+=t[1],n[2]+=t[2]}function xt(n,t){return[n[0]*t,n[1]*t,n[2]*t]}function bt(n){var t=Math.sqrt(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=t,n[1]/=t,n[2]/=t}function _t(n){return[Math.atan2(n[1],n[0]),tn(n[2])]}function wt(n,t){return xo(n[0]-t[0])a;++a)i.point((e=n[a])[0],e[1]);return void i.lineEnd()}var l=new Tt(e,n,null,!0),c=new Tt(e,null,l,!1);l.o=c,u.push(l),o.push(c),l=new Tt(r,n,null,!1),c=new Tt(r,null,l,!0),l.o=c,u.push(l),o.push(c)}}),o.sort(t),qt(u),qt(o),u.length){for(var a=0,l=e,c=o.length;c>a;++a)o[a].e=l=!l;for(var f,s,h=u[0];;){for(var p=h,g=!0;p.v;)if((p=p.n)===h)return;f=p.z,i.lineStart();do{if(p.v=p.o.v=!0,p.e){if(g)for(var a=0,c=f.length;c>a;++a)i.point((s=f[a])[0],s[1]);else r(p.x,p.n.x,1,i);p=p.n}else{if(g){f=p.p.z;for(var a=f.length-1;a>=0;--a)i.point((s=f[a])[0],s[1])}else r(p.x,p.p.x,-1,i);p=p.p}p=p.o,f=p.z,g=!g}while(!p.v);i.lineEnd()}}}function qt(n){if(t=n.length){for(var t,e,r=0,i=n[0];++r0){for(b||(u.polygonStart(),b=!0),u.lineStart();++o1&&2&t&&e.push(e.pop().concat(e.shift())),p.push(e.filter(Dt))}var p,g,v,d=t(u),y=i.invert(r[0],r[1]),m={point:o,lineStart:l,lineEnd:c,polygonStart:function(){m.point=f,m.lineStart=s,m.lineEnd=h,p=[],g=[]},polygonEnd:function(){m.point=o,m.lineStart=l,m.lineEnd=c,p=ao.merge(p);var n=Ot(y,g);p.length?(b||(u.polygonStart(),b=!0),Lt(p,Ut,n,e,u)):n&&(b||(u.polygonStart(),b=!0),u.lineStart(),e(null,null,1,u),u.lineEnd()),b&&(u.polygonEnd(),b=!1),p=g=null},sphere:function(){u.polygonStart(),u.lineStart(),e(null,null,1,u),u.lineEnd(),u.polygonEnd()}},M=Pt(),x=t(M),b=!1;return m}}function Dt(n){return n.length>1}function Pt(){var n,t=[];return{lineStart:function(){t.push(n=[])},point:function(t,e){n.push([t,e])},lineEnd:b,buffer:function(){var e=t;return t=[],n=null,e},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function Ut(n,t){return((n=n.x)[0]<0?n[1]-Io-Uo:Io-n[1])-((t=t.x)[0]<0?t[1]-Io-Uo:Io-t[1])}function jt(n){var t,e=NaN,r=NaN,i=NaN;return{lineStart:function(){n.lineStart(),t=1},point:function(u,o){var a=u>0?Fo:-Fo,l=xo(u-e);xo(l-Fo)0?Io:-Io),n.point(i,r),n.lineEnd(),n.lineStart(),n.point(a,r),n.point(u,r),t=0):i!==a&&l>=Fo&&(xo(e-i)Uo?Math.atan((Math.sin(t)*(u=Math.cos(r))*Math.sin(e)-Math.sin(r)*(i=Math.cos(t))*Math.sin(n))/(i*u*o)):(t+r)/2}function Ht(n,t,e,r){var i;if(null==n)i=e*Io,r.point(-Fo,i),r.point(0,i),r.point(Fo,i),r.point(Fo,0),r.point(Fo,-i),r.point(0,-i),r.point(-Fo,-i),r.point(-Fo,0),r.point(-Fo,i);else if(xo(n[0]-t[0])>Uo){var u=n[0]a;++a){var c=t[a],f=c.length;if(f)for(var s=c[0],h=s[0],p=s[1]/2+Fo/4,g=Math.sin(p),v=Math.cos(p),d=1;;){d===f&&(d=0),n=c[d];var y=n[0],m=n[1]/2+Fo/4,M=Math.sin(m),x=Math.cos(m),b=y-h,_=b>=0?1:-1,w=_*b,S=w>Fo,k=g*M;if(ka.add(Math.atan2(k*_*Math.sin(w),v*x+k*Math.cos(w))),u+=S?b+_*Ho:b,S^h>=e^y>=e){var N=mt(dt(s),dt(n));bt(N);var E=mt(i,N);bt(E);var A=(S^b>=0?-1:1)*tn(E[2]);(r>A||r===A&&(N[0]||N[1]))&&(o+=S^b>=0?1:-1)}if(!d++)break;h=y,g=M,v=x,s=n}}return(-Uo>u||Uo>u&&-Uo>ka)^1&o}function It(n){function t(n,t){return Math.cos(n)*Math.cos(t)>u}function e(n){var e,u,l,c,f;return{lineStart:function(){c=l=!1,f=1},point:function(s,h){var p,g=[s,h],v=t(s,h),d=o?v?0:i(s,h):v?i(s+(0>s?Fo:-Fo),h):0;if(!e&&(c=l=v)&&n.lineStart(),v!==l&&(p=r(e,g),(wt(e,p)||wt(g,p))&&(g[0]+=Uo,g[1]+=Uo,v=t(g[0],g[1]))),v!==l)f=0,v?(n.lineStart(),p=r(g,e),n.point(p[0],p[1])):(p=r(e,g),n.point(p[0],p[1]),n.lineEnd()),e=p;else if(a&&e&&o^v){var y;d&u||!(y=r(g,e,!0))||(f=0,o?(n.lineStart(),n.point(y[0][0],y[0][1]),n.point(y[1][0],y[1][1]),n.lineEnd()):(n.point(y[1][0],y[1][1]),n.lineEnd(),n.lineStart(),n.point(y[0][0],y[0][1])))}!v||e&&wt(e,g)||n.point(g[0],g[1]),e=g,l=v,u=d},lineEnd:function(){l&&n.lineEnd(),e=null},clean:function(){return f|(c&&l)<<1}}}function r(n,t,e){var r=dt(n),i=dt(t),o=[1,0,0],a=mt(r,i),l=yt(a,a),c=a[0],f=l-c*c;if(!f)return!e&&n;var s=u*l/f,h=-u*c/f,p=mt(o,a),g=xt(o,s),v=xt(a,h);Mt(g,v);var d=p,y=yt(g,d),m=yt(d,d),M=y*y-m*(yt(g,g)-1);if(!(0>M)){var x=Math.sqrt(M),b=xt(d,(-y-x)/m);if(Mt(b,g),b=_t(b),!e)return b;var _,w=n[0],S=t[0],k=n[1],N=t[1];w>S&&(_=w,w=S,S=_);var E=S-w,A=xo(E-Fo)E;if(!A&&k>N&&(_=k,k=N,N=_),C?A?k+N>0^b[1]<(xo(b[0]-w)Fo^(w<=b[0]&&b[0]<=S)){var z=xt(d,(-y+x)/m);return Mt(z,g),[b,_t(z)]}}}function i(t,e){var r=o?n:Fo-n,i=0;return-r>t?i|=1:t>r&&(i|=2),-r>e?i|=4:e>r&&(i|=8),i}var u=Math.cos(n),o=u>0,a=xo(u)>Uo,l=ve(n,6*Yo);return Rt(t,e,l,o?[0,-n]:[-Fo,n-Fo])}function Yt(n,t,e,r){return function(i){var u,o=i.a,a=i.b,l=o.x,c=o.y,f=a.x,s=a.y,h=0,p=1,g=f-l,v=s-c;if(u=n-l,g||!(u>0)){if(u/=g,0>g){if(h>u)return;p>u&&(p=u)}else if(g>0){if(u>p)return;u>h&&(h=u)}if(u=e-l,g||!(0>u)){if(u/=g,0>g){if(u>p)return;u>h&&(h=u)}else if(g>0){if(h>u)return;p>u&&(p=u)}if(u=t-c,v||!(u>0)){if(u/=v,0>v){if(h>u)return;p>u&&(p=u)}else if(v>0){if(u>p)return;u>h&&(h=u)}if(u=r-c,v||!(0>u)){if(u/=v,0>v){if(u>p)return;u>h&&(h=u)}else if(v>0){if(h>u)return;p>u&&(p=u)}return h>0&&(i.a={x:l+h*g,y:c+h*v}),1>p&&(i.b={x:l+p*g,y:c+p*v}),i}}}}}}function Zt(n,t,e,r){function i(r,i){return xo(r[0]-n)0?0:3:xo(r[0]-e)0?2:1:xo(r[1]-t)0?1:0:i>0?3:2}function u(n,t){return o(n.x,t.x)}function o(n,t){var e=i(n,1),r=i(t,1);return e!==r?e-r:0===e?t[1]-n[1]:1===e?n[0]-t[0]:2===e?n[1]-t[1]:t[0]-n[0]}return function(a){function l(n){for(var t=0,e=d.length,r=n[1],i=0;e>i;++i)for(var u,o=1,a=d[i],l=a.length,c=a[0];l>o;++o)u=a[o],c[1]<=r?u[1]>r&&Q(c,u,n)>0&&++t:u[1]<=r&&Q(c,u,n)<0&&--t,c=u;return 0!==t}function c(u,a,l,c){var f=0,s=0;if(null==u||(f=i(u,l))!==(s=i(a,l))||o(u,a)<0^l>0){do c.point(0===f||3===f?n:e,f>1?r:t);while((f=(f+l+4)%4)!==s)}else c.point(a[0],a[1])}function f(i,u){return i>=n&&e>=i&&u>=t&&r>=u}function s(n,t){f(n,t)&&a.point(n,t)}function h(){C.point=g,d&&d.push(y=[]),S=!0,w=!1,b=_=NaN}function p(){v&&(g(m,M),x&&w&&E.rejoin(),v.push(E.buffer())),C.point=s,w&&a.lineEnd()}function g(n,t){n=Math.max(-Ha,Math.min(Ha,n)),t=Math.max(-Ha,Math.min(Ha,t));var e=f(n,t);if(d&&y.push([n,t]),S)m=n,M=t,x=e,S=!1,e&&(a.lineStart(),a.point(n,t));else if(e&&w)a.point(n,t);else{var r={a:{x:b,y:_},b:{x:n,y:t}};A(r)?(w||(a.lineStart(),a.point(r.a.x,r.a.y)),a.point(r.b.x,r.b.y),e||a.lineEnd(),k=!1):e&&(a.lineStart(),a.point(n,t),k=!1)}b=n,_=t,w=e}var v,d,y,m,M,x,b,_,w,S,k,N=a,E=Pt(),A=Yt(n,t,e,r),C={point:s,lineStart:h,lineEnd:p,polygonStart:function(){a=E,v=[],d=[],k=!0},polygonEnd:function(){a=N,v=ao.merge(v);var t=l([n,r]),e=k&&t,i=v.length;(e||i)&&(a.polygonStart(),e&&(a.lineStart(),c(null,null,1,a),a.lineEnd()),i&&Lt(v,u,t,c,a),a.polygonEnd()),v=d=y=null}};return C}}function Vt(n){var t=0,e=Fo/3,r=ae(n),i=r(t,e);return i.parallels=function(n){return arguments.length?r(t=n[0]*Fo/180,e=n[1]*Fo/180):[t/Fo*180,e/Fo*180]},i}function Xt(n,t){function e(n,t){var e=Math.sqrt(u-2*i*Math.sin(t))/i;return[e*Math.sin(n*=i),o-e*Math.cos(n)]}var r=Math.sin(n),i=(r+Math.sin(t))/2,u=1+r*(2*i-r),o=Math.sqrt(u)/i;return e.invert=function(n,t){var e=o-t;return[Math.atan2(n,e)/i,tn((u-(n*n+e*e)*i*i)/(2*i))]},e}function $t(){function n(n,t){Ia+=i*n-r*t,r=n,i=t}var t,e,r,i;$a.point=function(u,o){$a.point=n,t=r=u,e=i=o},$a.lineEnd=function(){n(t,e)}}function Bt(n,t){Ya>n&&(Ya=n),n>Va&&(Va=n),Za>t&&(Za=t),t>Xa&&(Xa=t)}function Wt(){function n(n,t){o.push("M",n,",",t,u)}function t(n,t){o.push("M",n,",",t),a.point=e}function e(n,t){o.push("L",n,",",t)}function r(){a.point=n}function i(){o.push("Z")}var u=Jt(4.5),o=[],a={point:n,lineStart:function(){a.point=t},lineEnd:r,polygonStart:function(){a.lineEnd=i},polygonEnd:function(){a.lineEnd=r,a.point=n},pointRadius:function(n){return u=Jt(n),a},result:function(){if(o.length){var n=o.join("");return o=[],n}}};return a}function Jt(n){return"m0,"+n+"a"+n+","+n+" 0 1,1 0,"+-2*n+"a"+n+","+n+" 0 1,1 0,"+2*n+"z"}function Gt(n,t){Ca+=n,za+=t,++La}function Kt(){function n(n,r){var i=n-t,u=r-e,o=Math.sqrt(i*i+u*u);qa+=o*(t+n)/2,Ta+=o*(e+r)/2,Ra+=o,Gt(t=n,e=r)}var t,e;Wa.point=function(r,i){Wa.point=n,Gt(t=r,e=i)}}function Qt(){Wa.point=Gt}function ne(){function n(n,t){var e=n-r,u=t-i,o=Math.sqrt(e*e+u*u);qa+=o*(r+n)/2,Ta+=o*(i+t)/2,Ra+=o,o=i*n-r*t,Da+=o*(r+n),Pa+=o*(i+t),Ua+=3*o,Gt(r=n,i=t)}var t,e,r,i;Wa.point=function(u,o){Wa.point=n,Gt(t=r=u,e=i=o)},Wa.lineEnd=function(){n(t,e)}}function te(n){function t(t,e){n.moveTo(t+o,e),n.arc(t,e,o,0,Ho)}function e(t,e){n.moveTo(t,e),a.point=r}function r(t,e){n.lineTo(t,e)}function i(){a.point=t}function u(){n.closePath()}var o=4.5,a={point:t,lineStart:function(){a.point=e},lineEnd:i,polygonStart:function(){a.lineEnd=u},polygonEnd:function(){a.lineEnd=i,a.point=t},pointRadius:function(n){return o=n,a},result:b};return a}function ee(n){function t(n){return(a?r:e)(n)}function e(t){return ue(t,function(e,r){e=n(e,r),t.point(e[0],e[1])})}function r(t){function e(e,r){e=n(e,r),t.point(e[0],e[1])}function r(){M=NaN,S.point=u,t.lineStart()}function u(e,r){var u=dt([e,r]),o=n(e,r);i(M,x,m,b,_,w,M=o[0],x=o[1],m=e,b=u[0],_=u[1],w=u[2],a,t),t.point(M,x)}function o(){S.point=e,t.lineEnd()}function l(){ +r(),S.point=c,S.lineEnd=f}function c(n,t){u(s=n,h=t),p=M,g=x,v=b,d=_,y=w,S.point=u}function f(){i(M,x,m,b,_,w,p,g,s,v,d,y,a,t),S.lineEnd=o,o()}var s,h,p,g,v,d,y,m,M,x,b,_,w,S={point:e,lineStart:r,lineEnd:o,polygonStart:function(){t.polygonStart(),S.lineStart=l},polygonEnd:function(){t.polygonEnd(),S.lineStart=r}};return S}function i(t,e,r,a,l,c,f,s,h,p,g,v,d,y){var m=f-t,M=s-e,x=m*m+M*M;if(x>4*u&&d--){var b=a+p,_=l+g,w=c+v,S=Math.sqrt(b*b+_*_+w*w),k=Math.asin(w/=S),N=xo(xo(w)-1)u||xo((m*z+M*L)/x-.5)>.3||o>a*p+l*g+c*v)&&(i(t,e,r,a,l,c,A,C,N,b/=S,_/=S,w,d,y),y.point(A,C),i(A,C,N,b,_,w,f,s,h,p,g,v,d,y))}}var u=.5,o=Math.cos(30*Yo),a=16;return t.precision=function(n){return arguments.length?(a=(u=n*n)>0&&16,t):Math.sqrt(u)},t}function re(n){var t=ee(function(t,e){return n([t*Zo,e*Zo])});return function(n){return le(t(n))}}function ie(n){this.stream=n}function ue(n,t){return{point:t,sphere:function(){n.sphere()},lineStart:function(){n.lineStart()},lineEnd:function(){n.lineEnd()},polygonStart:function(){n.polygonStart()},polygonEnd:function(){n.polygonEnd()}}}function oe(n){return ae(function(){return n})()}function ae(n){function t(n){return n=a(n[0]*Yo,n[1]*Yo),[n[0]*h+l,c-n[1]*h]}function e(n){return n=a.invert((n[0]-l)/h,(c-n[1])/h),n&&[n[0]*Zo,n[1]*Zo]}function r(){a=Ct(o=se(y,M,x),u);var n=u(v,d);return l=p-n[0]*h,c=g+n[1]*h,i()}function i(){return f&&(f.valid=!1,f=null),t}var u,o,a,l,c,f,s=ee(function(n,t){return n=u(n,t),[n[0]*h+l,c-n[1]*h]}),h=150,p=480,g=250,v=0,d=0,y=0,M=0,x=0,b=Fa,_=m,w=null,S=null;return t.stream=function(n){return f&&(f.valid=!1),f=le(b(o,s(_(n)))),f.valid=!0,f},t.clipAngle=function(n){return arguments.length?(b=null==n?(w=n,Fa):It((w=+n)*Yo),i()):w},t.clipExtent=function(n){return arguments.length?(S=n,_=n?Zt(n[0][0],n[0][1],n[1][0],n[1][1]):m,i()):S},t.scale=function(n){return arguments.length?(h=+n,r()):h},t.translate=function(n){return arguments.length?(p=+n[0],g=+n[1],r()):[p,g]},t.center=function(n){return arguments.length?(v=n[0]%360*Yo,d=n[1]%360*Yo,r()):[v*Zo,d*Zo]},t.rotate=function(n){return arguments.length?(y=n[0]%360*Yo,M=n[1]%360*Yo,x=n.length>2?n[2]%360*Yo:0,r()):[y*Zo,M*Zo,x*Zo]},ao.rebind(t,s,"precision"),function(){return u=n.apply(this,arguments),t.invert=u.invert&&e,r()}}function le(n){return ue(n,function(t,e){n.point(t*Yo,e*Yo)})}function ce(n,t){return[n,t]}function fe(n,t){return[n>Fo?n-Ho:-Fo>n?n+Ho:n,t]}function se(n,t,e){return n?t||e?Ct(pe(n),ge(t,e)):pe(n):t||e?ge(t,e):fe}function he(n){return function(t,e){return t+=n,[t>Fo?t-Ho:-Fo>t?t+Ho:t,e]}}function pe(n){var t=he(n);return t.invert=he(-n),t}function ge(n,t){function e(n,t){var e=Math.cos(t),a=Math.cos(n)*e,l=Math.sin(n)*e,c=Math.sin(t),f=c*r+a*i;return[Math.atan2(l*u-f*o,a*r-c*i),tn(f*u+l*o)]}var r=Math.cos(n),i=Math.sin(n),u=Math.cos(t),o=Math.sin(t);return e.invert=function(n,t){var e=Math.cos(t),a=Math.cos(n)*e,l=Math.sin(n)*e,c=Math.sin(t),f=c*u-l*o;return[Math.atan2(l*u+c*o,a*r+f*i),tn(f*r-a*i)]},e}function ve(n,t){var e=Math.cos(n),r=Math.sin(n);return function(i,u,o,a){var l=o*t;null!=i?(i=de(e,i),u=de(e,u),(o>0?u>i:i>u)&&(i+=o*Ho)):(i=n+o*Ho,u=n-.5*l);for(var c,f=i;o>0?f>u:u>f;f-=l)a.point((c=_t([e,-r*Math.cos(f),-r*Math.sin(f)]))[0],c[1])}}function de(n,t){var e=dt(t);e[0]-=n,bt(e);var r=nn(-e[1]);return((-e[2]<0?-r:r)+2*Math.PI-Uo)%(2*Math.PI)}function ye(n,t,e){var r=ao.range(n,t-Uo,e).concat(t);return function(n){return r.map(function(t){return[n,t]})}}function me(n,t,e){var r=ao.range(n,t-Uo,e).concat(t);return function(n){return r.map(function(t){return[t,n]})}}function Me(n){return n.source}function xe(n){return n.target}function be(n,t,e,r){var i=Math.cos(t),u=Math.sin(t),o=Math.cos(r),a=Math.sin(r),l=i*Math.cos(n),c=i*Math.sin(n),f=o*Math.cos(e),s=o*Math.sin(e),h=2*Math.asin(Math.sqrt(on(r-t)+i*o*on(e-n))),p=1/Math.sin(h),g=h?function(n){var t=Math.sin(n*=h)*p,e=Math.sin(h-n)*p,r=e*l+t*f,i=e*c+t*s,o=e*u+t*a;return[Math.atan2(i,r)*Zo,Math.atan2(o,Math.sqrt(r*r+i*i))*Zo]}:function(){return[n*Zo,t*Zo]};return g.distance=h,g}function _e(){function n(n,i){var u=Math.sin(i*=Yo),o=Math.cos(i),a=xo((n*=Yo)-t),l=Math.cos(a);Ja+=Math.atan2(Math.sqrt((a=o*Math.sin(a))*a+(a=r*u-e*o*l)*a),e*u+r*o*l),t=n,e=u,r=o}var t,e,r;Ga.point=function(i,u){t=i*Yo,e=Math.sin(u*=Yo),r=Math.cos(u),Ga.point=n},Ga.lineEnd=function(){Ga.point=Ga.lineEnd=b}}function we(n,t){function e(t,e){var r=Math.cos(t),i=Math.cos(e),u=n(r*i);return[u*i*Math.sin(t),u*Math.sin(e)]}return e.invert=function(n,e){var r=Math.sqrt(n*n+e*e),i=t(r),u=Math.sin(i),o=Math.cos(i);return[Math.atan2(n*u,r*o),Math.asin(r&&e*u/r)]},e}function Se(n,t){function e(n,t){o>0?-Io+Uo>t&&(t=-Io+Uo):t>Io-Uo&&(t=Io-Uo);var e=o/Math.pow(i(t),u);return[e*Math.sin(u*n),o-e*Math.cos(u*n)]}var r=Math.cos(n),i=function(n){return Math.tan(Fo/4+n/2)},u=n===t?Math.sin(n):Math.log(r/Math.cos(t))/Math.log(i(t)/i(n)),o=r*Math.pow(i(n),u)/u;return u?(e.invert=function(n,t){var e=o-t,r=K(u)*Math.sqrt(n*n+e*e);return[Math.atan2(n,e)/u,2*Math.atan(Math.pow(o/r,1/u))-Io]},e):Ne}function ke(n,t){function e(n,t){var e=u-t;return[e*Math.sin(i*n),u-e*Math.cos(i*n)]}var r=Math.cos(n),i=n===t?Math.sin(n):(r-Math.cos(t))/(t-n),u=r/i+n;return xo(i)i;i++){for(;r>1&&Q(n[e[r-2]],n[e[r-1]],n[i])<=0;)--r;e[r++]=i}return e.slice(0,r)}function qe(n,t){return n[0]-t[0]||n[1]-t[1]}function Te(n,t,e){return(e[0]-t[0])*(n[1]-t[1])<(e[1]-t[1])*(n[0]-t[0])}function Re(n,t,e,r){var i=n[0],u=e[0],o=t[0]-i,a=r[0]-u,l=n[1],c=e[1],f=t[1]-l,s=r[1]-c,h=(a*(l-c)-s*(i-u))/(s*o-a*f);return[i+h*o,l+h*f]}function De(n){var t=n[0],e=n[n.length-1];return!(t[0]-e[0]||t[1]-e[1])}function Pe(){rr(this),this.edge=this.site=this.circle=null}function Ue(n){var t=cl.pop()||new Pe;return t.site=n,t}function je(n){Be(n),ol.remove(n),cl.push(n),rr(n)}function Fe(n){var t=n.circle,e=t.x,r=t.cy,i={x:e,y:r},u=n.P,o=n.N,a=[n];je(n);for(var l=u;l.circle&&xo(e-l.circle.x)f;++f)c=a[f],l=a[f-1],nr(c.edge,l.site,c.site,i);l=a[0],c=a[s-1],c.edge=Ke(l.site,c.site,null,i),$e(l),$e(c)}function He(n){for(var t,e,r,i,u=n.x,o=n.y,a=ol._;a;)if(r=Oe(a,o)-u,r>Uo)a=a.L;else{if(i=u-Ie(a,o),!(i>Uo)){r>-Uo?(t=a.P,e=a):i>-Uo?(t=a,e=a.N):t=e=a;break}if(!a.R){t=a;break}a=a.R}var l=Ue(n);if(ol.insert(t,l),t||e){if(t===e)return Be(t),e=Ue(t.site),ol.insert(l,e),l.edge=e.edge=Ke(t.site,l.site),$e(t),void $e(e);if(!e)return void(l.edge=Ke(t.site,l.site));Be(t),Be(e);var c=t.site,f=c.x,s=c.y,h=n.x-f,p=n.y-s,g=e.site,v=g.x-f,d=g.y-s,y=2*(h*d-p*v),m=h*h+p*p,M=v*v+d*d,x={x:(d*m-p*M)/y+f,y:(h*M-v*m)/y+s};nr(e.edge,c,g,x),l.edge=Ke(c,n,null,x),e.edge=Ke(n,g,null,x),$e(t),$e(e)}}function Oe(n,t){var e=n.site,r=e.x,i=e.y,u=i-t;if(!u)return r;var o=n.P;if(!o)return-(1/0);e=o.site;var a=e.x,l=e.y,c=l-t;if(!c)return a;var f=a-r,s=1/u-1/c,h=f/c;return s?(-h+Math.sqrt(h*h-2*s*(f*f/(-2*c)-l+c/2+i-u/2)))/s+r:(r+a)/2}function Ie(n,t){var e=n.N;if(e)return Oe(e,t);var r=n.site;return r.y===t?r.x:1/0}function Ye(n){this.site=n,this.edges=[]}function Ze(n){for(var t,e,r,i,u,o,a,l,c,f,s=n[0][0],h=n[1][0],p=n[0][1],g=n[1][1],v=ul,d=v.length;d--;)if(u=v[d],u&&u.prepare())for(a=u.edges,l=a.length,o=0;l>o;)f=a[o].end(),r=f.x,i=f.y,c=a[++o%l].start(),t=c.x,e=c.y,(xo(r-t)>Uo||xo(i-e)>Uo)&&(a.splice(o,0,new tr(Qe(u.site,f,xo(r-s)Uo?{x:s,y:xo(t-s)Uo?{x:xo(e-g)Uo?{x:h,y:xo(t-h)Uo?{x:xo(e-p)=-jo)){var p=l*l+c*c,g=f*f+s*s,v=(s*p-c*g)/h,d=(l*g-f*p)/h,s=d+a,y=fl.pop()||new Xe;y.arc=n,y.site=i,y.x=v+o,y.y=s+Math.sqrt(v*v+d*d),y.cy=s,n.circle=y;for(var m=null,M=ll._;M;)if(y.yd||d>=a)return;if(h>g){if(u){if(u.y>=c)return}else u={x:d,y:l};e={x:d,y:c}}else{if(u){if(u.yr||r>1)if(h>g){if(u){if(u.y>=c)return}else u={x:(l-i)/r,y:l};e={x:(c-i)/r,y:c}}else{if(u){if(u.yp){if(u){if(u.x>=a)return}else u={x:o,y:r*o+i};e={x:a,y:r*a+i}}else{if(u){if(u.xu||s>o||r>h||i>p)){if(g=n.point){var g,v=t-n.x,d=e-n.y,y=v*v+d*d;if(l>y){var m=Math.sqrt(l=y);r=t-m,i=e-m,u=t+m,o=e+m,a=g}}for(var M=n.nodes,x=.5*(f+h),b=.5*(s+p),_=t>=x,w=e>=b,S=w<<1|_,k=S+4;k>S;++S)if(n=M[3&S])switch(3&S){case 0:c(n,f,s,x,b);break;case 1:c(n,x,s,h,b);break;case 2:c(n,f,b,x,p);break;case 3:c(n,x,b,h,p)}}}(n,r,i,u,o),a}function vr(n,t){n=ao.rgb(n),t=ao.rgb(t);var e=n.r,r=n.g,i=n.b,u=t.r-e,o=t.g-r,a=t.b-i;return function(n){return"#"+bn(Math.round(e+u*n))+bn(Math.round(r+o*n))+bn(Math.round(i+a*n))}}function dr(n,t){var e,r={},i={};for(e in n)e in t?r[e]=Mr(n[e],t[e]):i[e]=n[e];for(e in t)e in n||(i[e]=t[e]);return function(n){for(e in r)i[e]=r[e](n);return i}}function yr(n,t){return n=+n,t=+t,function(e){return n*(1-e)+t*e}}function mr(n,t){var e,r,i,u=hl.lastIndex=pl.lastIndex=0,o=-1,a=[],l=[];for(n+="",t+="";(e=hl.exec(n))&&(r=pl.exec(t));)(i=r.index)>u&&(i=t.slice(u,i),a[o]?a[o]+=i:a[++o]=i),(e=e[0])===(r=r[0])?a[o]?a[o]+=r:a[++o]=r:(a[++o]=null,l.push({i:o,x:yr(e,r)})),u=pl.lastIndex;return ur;++r)a[(e=l[r]).i]=e.x(n);return a.join("")})}function Mr(n,t){for(var e,r=ao.interpolators.length;--r>=0&&!(e=ao.interpolators[r](n,t)););return e}function xr(n,t){var e,r=[],i=[],u=n.length,o=t.length,a=Math.min(n.length,t.length);for(e=0;a>e;++e)r.push(Mr(n[e],t[e]));for(;u>e;++e)i[e]=n[e];for(;o>e;++e)i[e]=t[e];return function(n){for(e=0;a>e;++e)i[e]=r[e](n);return i}}function br(n){return function(t){return 0>=t?0:t>=1?1:n(t)}}function _r(n){return function(t){return 1-n(1-t)}}function wr(n){return function(t){return.5*(.5>t?n(2*t):2-n(2-2*t))}}function Sr(n){return n*n}function kr(n){return n*n*n}function Nr(n){if(0>=n)return 0;if(n>=1)return 1;var t=n*n,e=t*n;return 4*(.5>n?e:3*(n-t)+e-.75)}function Er(n){return function(t){return Math.pow(t,n)}}function Ar(n){return 1-Math.cos(n*Io)}function Cr(n){return Math.pow(2,10*(n-1))}function zr(n){return 1-Math.sqrt(1-n*n)}function Lr(n,t){var e;return arguments.length<2&&(t=.45),arguments.length?e=t/Ho*Math.asin(1/n):(n=1,e=t/4),function(r){return 1+n*Math.pow(2,-10*r)*Math.sin((r-e)*Ho/t)}}function qr(n){return n||(n=1.70158),function(t){return t*t*((n+1)*t-n)}}function Tr(n){return 1/2.75>n?7.5625*n*n:2/2.75>n?7.5625*(n-=1.5/2.75)*n+.75:2.5/2.75>n?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375}function Rr(n,t){n=ao.hcl(n),t=ao.hcl(t);var e=n.h,r=n.c,i=n.l,u=t.h-e,o=t.c-r,a=t.l-i;return isNaN(o)&&(o=0,r=isNaN(r)?t.c:r),isNaN(u)?(u=0,e=isNaN(e)?t.h:e):u>180?u-=360:-180>u&&(u+=360),function(n){return sn(e+u*n,r+o*n,i+a*n)+""}}function Dr(n,t){n=ao.hsl(n),t=ao.hsl(t);var e=n.h,r=n.s,i=n.l,u=t.h-e,o=t.s-r,a=t.l-i;return isNaN(o)&&(o=0,r=isNaN(r)?t.s:r),isNaN(u)?(u=0,e=isNaN(e)?t.h:e):u>180?u-=360:-180>u&&(u+=360),function(n){return cn(e+u*n,r+o*n,i+a*n)+""}}function Pr(n,t){n=ao.lab(n),t=ao.lab(t);var e=n.l,r=n.a,i=n.b,u=t.l-e,o=t.a-r,a=t.b-i;return function(n){return pn(e+u*n,r+o*n,i+a*n)+""}}function Ur(n,t){return t-=n,function(e){return Math.round(n+t*e)}}function jr(n){var t=[n.a,n.b],e=[n.c,n.d],r=Hr(t),i=Fr(t,e),u=Hr(Or(e,t,-i))||0;t[0]*e[1]180?t+=360:t-n>180&&(n+=360),r.push({i:e.push(Ir(e)+"rotate(",null,")")-2,x:yr(n,t)})):t&&e.push(Ir(e)+"rotate("+t+")")}function Vr(n,t,e,r){n!==t?r.push({i:e.push(Ir(e)+"skewX(",null,")")-2,x:yr(n,t)}):t&&e.push(Ir(e)+"skewX("+t+")")}function Xr(n,t,e,r){if(n[0]!==t[0]||n[1]!==t[1]){var i=e.push(Ir(e)+"scale(",null,",",null,")");r.push({i:i-4,x:yr(n[0],t[0])},{i:i-2,x:yr(n[1],t[1])})}else 1===t[0]&&1===t[1]||e.push(Ir(e)+"scale("+t+")")}function $r(n,t){var e=[],r=[];return n=ao.transform(n),t=ao.transform(t),Yr(n.translate,t.translate,e,r),Zr(n.rotate,t.rotate,e,r),Vr(n.skew,t.skew,e,r),Xr(n.scale,t.scale,e,r),n=t=null,function(n){for(var t,i=-1,u=r.length;++i=0;)e.push(i[r])}function oi(n,t){for(var e=[n],r=[];null!=(n=e.pop());)if(r.push(n),(u=n.children)&&(i=u.length))for(var i,u,o=-1;++oe;++e)(t=n[e][1])>i&&(r=e,i=t);return r}function yi(n){return n.reduce(mi,0)}function mi(n,t){return n+t[1]}function Mi(n,t){return xi(n,Math.ceil(Math.log(t.length)/Math.LN2+1))}function xi(n,t){for(var e=-1,r=+n[0],i=(n[1]-r)/t,u=[];++e<=t;)u[e]=i*e+r;return u}function bi(n){return[ao.min(n),ao.max(n)]}function _i(n,t){return n.value-t.value}function wi(n,t){var e=n._pack_next;n._pack_next=t,t._pack_prev=n,t._pack_next=e,e._pack_prev=t}function Si(n,t){n._pack_next=t,t._pack_prev=n}function ki(n,t){var e=t.x-n.x,r=t.y-n.y,i=n.r+t.r;return.999*i*i>e*e+r*r}function Ni(n){function t(n){f=Math.min(n.x-n.r,f),s=Math.max(n.x+n.r,s),h=Math.min(n.y-n.r,h),p=Math.max(n.y+n.r,p)}if((e=n.children)&&(c=e.length)){var e,r,i,u,o,a,l,c,f=1/0,s=-(1/0),h=1/0,p=-(1/0);if(e.forEach(Ei),r=e[0],r.x=-r.r,r.y=0,t(r),c>1&&(i=e[1],i.x=i.r,i.y=0,t(i),c>2))for(u=e[2],zi(r,i,u),t(u),wi(r,u),r._pack_prev=u,wi(u,i),i=r._pack_next,o=3;c>o;o++){zi(r,i,u=e[o]);var g=0,v=1,d=1;for(a=i._pack_next;a!==i;a=a._pack_next,v++)if(ki(a,u)){g=1;break}if(1==g)for(l=r._pack_prev;l!==a._pack_prev&&!ki(l,u);l=l._pack_prev,d++);g?(d>v||v==d&&i.ro;o++)u=e[o],u.x-=y,u.y-=m,M=Math.max(M,u.r+Math.sqrt(u.x*u.x+u.y*u.y));n.r=M,e.forEach(Ai)}}function Ei(n){n._pack_next=n._pack_prev=n}function Ai(n){delete n._pack_next,delete n._pack_prev}function Ci(n,t,e,r){var i=n.children;if(n.x=t+=r*n.x,n.y=e+=r*n.y,n.r*=r,i)for(var u=-1,o=i.length;++u=0;)t=i[u],t.z+=e,t.m+=e,e+=t.s+(r+=t.c)}function Pi(n,t,e){return n.a.parent===t.parent?n.a:e}function Ui(n){return 1+ao.max(n,function(n){return n.y})}function ji(n){return n.reduce(function(n,t){return n+t.x},0)/n.length}function Fi(n){var t=n.children;return t&&t.length?Fi(t[0]):n}function Hi(n){var t,e=n.children;return e&&(t=e.length)?Hi(e[t-1]):n}function Oi(n){return{x:n.x,y:n.y,dx:n.dx,dy:n.dy}}function Ii(n,t){var e=n.x+t[3],r=n.y+t[0],i=n.dx-t[1]-t[3],u=n.dy-t[0]-t[2];return 0>i&&(e+=i/2,i=0),0>u&&(r+=u/2,u=0),{x:e,y:r,dx:i,dy:u}}function Yi(n){var t=n[0],e=n[n.length-1];return e>t?[t,e]:[e,t]}function Zi(n){return n.rangeExtent?n.rangeExtent():Yi(n.range())}function Vi(n,t,e,r){var i=e(n[0],n[1]),u=r(t[0],t[1]);return function(n){return u(i(n))}}function Xi(n,t){var e,r=0,i=n.length-1,u=n[r],o=n[i];return u>o&&(e=r,r=i,i=e,e=u,u=o,o=e),n[r]=t.floor(u),n[i]=t.ceil(o),n}function $i(n){return n?{floor:function(t){return Math.floor(t/n)*n},ceil:function(t){return Math.ceil(t/n)*n}}:Sl}function Bi(n,t,e,r){var i=[],u=[],o=0,a=Math.min(n.length,t.length)-1;for(n[a]2?Bi:Vi,l=r?Wr:Br;return o=i(n,t,l,e),a=i(t,n,l,Mr),u}function u(n){return o(n)}var o,a;return u.invert=function(n){return a(n)},u.domain=function(t){return arguments.length?(n=t.map(Number),i()):n},u.range=function(n){return arguments.length?(t=n,i()):t},u.rangeRound=function(n){return u.range(n).interpolate(Ur)},u.clamp=function(n){return arguments.length?(r=n,i()):r},u.interpolate=function(n){return arguments.length?(e=n,i()):e},u.ticks=function(t){return Qi(n,t)},u.tickFormat=function(t,e){return nu(n,t,e)},u.nice=function(t){return Gi(n,t),i()},u.copy=function(){return Wi(n,t,e,r)},i()}function Ji(n,t){return ao.rebind(n,t,"range","rangeRound","interpolate","clamp")}function Gi(n,t){return Xi(n,$i(Ki(n,t)[2])),Xi(n,$i(Ki(n,t)[2])),n}function Ki(n,t){null==t&&(t=10);var e=Yi(n),r=e[1]-e[0],i=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),u=t/r*i;return.15>=u?i*=10:.35>=u?i*=5:.75>=u&&(i*=2),e[0]=Math.ceil(e[0]/i)*i,e[1]=Math.floor(e[1]/i)*i+.5*i,e[2]=i,e}function Qi(n,t){return ao.range.apply(ao,Ki(n,t))}function nu(n,t,e){var r=Ki(n,t);if(e){var i=ha.exec(e);if(i.shift(),"s"===i[8]){var u=ao.formatPrefix(Math.max(xo(r[0]),xo(r[1])));return i[7]||(i[7]="."+tu(u.scale(r[2]))),i[8]="f",e=ao.format(i.join("")),function(n){return e(u.scale(n))+u.symbol}}i[7]||(i[7]="."+eu(i[8],r)),e=i.join("")}else e=",."+tu(r[2])+"f";return ao.format(e)}function tu(n){return-Math.floor(Math.log(n)/Math.LN10+.01)}function eu(n,t){var e=tu(t[2]);return n in kl?Math.abs(e-tu(Math.max(xo(t[0]),xo(t[1]))))+ +("e"!==n):e-2*("%"===n)}function ru(n,t,e,r){function i(n){return(e?Math.log(0>n?0:n):-Math.log(n>0?0:-n))/Math.log(t)}function u(n){return e?Math.pow(t,n):-Math.pow(t,-n)}function o(t){return n(i(t))}return o.invert=function(t){return u(n.invert(t))},o.domain=function(t){return arguments.length?(e=t[0]>=0,n.domain((r=t.map(Number)).map(i)),o):r},o.base=function(e){return arguments.length?(t=+e,n.domain(r.map(i)),o):t},o.nice=function(){var t=Xi(r.map(i),e?Math:El);return n.domain(t),r=t.map(u),o},o.ticks=function(){var n=Yi(r),o=[],a=n[0],l=n[1],c=Math.floor(i(a)),f=Math.ceil(i(l)),s=t%1?2:t;if(isFinite(f-c)){if(e){for(;f>c;c++)for(var h=1;s>h;h++)o.push(u(c)*h);o.push(u(c))}else for(o.push(u(c));c++0;h--)o.push(u(c)*h);for(c=0;o[c]l;f--);o=o.slice(c,f)}return o},o.tickFormat=function(n,e){if(!arguments.length)return Nl;arguments.length<2?e=Nl:"function"!=typeof e&&(e=ao.format(e));var r=Math.max(1,t*n/o.ticks().length);return function(n){var o=n/u(Math.round(i(n)));return t-.5>o*t&&(o*=t),r>=o?e(n):""}},o.copy=function(){return ru(n.copy(),t,e,r)},Ji(o,n)}function iu(n,t,e){function r(t){return n(i(t))}var i=uu(t),u=uu(1/t);return r.invert=function(t){return u(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain((e=t.map(Number)).map(i)),r):e},r.ticks=function(n){return Qi(e,n)},r.tickFormat=function(n,t){return nu(e,n,t)},r.nice=function(n){return r.domain(Gi(e,n))},r.exponent=function(o){return arguments.length?(i=uu(t=o),u=uu(1/t),n.domain(e.map(i)),r):t},r.copy=function(){return iu(n.copy(),t,e)},Ji(r,n)}function uu(n){return function(t){return 0>t?-Math.pow(-t,n):Math.pow(t,n)}}function ou(n,t){function e(e){return u[((i.get(e)||("range"===t.t?i.set(e,n.push(e)):NaN))-1)%u.length]}function r(t,e){return ao.range(n.length).map(function(n){return t+e*n})}var i,u,o;return e.domain=function(r){if(!arguments.length)return n;n=[],i=new c;for(var u,o=-1,a=r.length;++oe?[NaN,NaN]:[e>0?a[e-1]:n[0],et?NaN:t/u+n,[t,t+1/u]},r.copy=function(){return lu(n,t,e)},i()}function cu(n,t){function e(e){return e>=e?t[ao.bisect(n,e)]:void 0}return e.domain=function(t){return arguments.length?(n=t,e):n},e.range=function(n){return arguments.length?(t=n,e):t},e.invertExtent=function(e){return e=t.indexOf(e),[n[e-1],n[e]]},e.copy=function(){return cu(n,t)},e}function fu(n){function t(n){return+n}return t.invert=t,t.domain=t.range=function(e){return arguments.length?(n=e.map(t),t):n},t.ticks=function(t){return Qi(n,t)},t.tickFormat=function(t,e){return nu(n,t,e)},t.copy=function(){return fu(n)},t}function su(){return 0}function hu(n){return n.innerRadius}function pu(n){return n.outerRadius}function gu(n){return n.startAngle}function vu(n){return n.endAngle}function du(n){return n&&n.padAngle}function yu(n,t,e,r){return(n-e)*t-(t-r)*n>0?0:1}function mu(n,t,e,r,i){var u=n[0]-t[0],o=n[1]-t[1],a=(i?r:-r)/Math.sqrt(u*u+o*o),l=a*o,c=-a*u,f=n[0]+l,s=n[1]+c,h=t[0]+l,p=t[1]+c,g=(f+h)/2,v=(s+p)/2,d=h-f,y=p-s,m=d*d+y*y,M=e-r,x=f*p-h*s,b=(0>y?-1:1)*Math.sqrt(Math.max(0,M*M*m-x*x)),_=(x*y-d*b)/m,w=(-x*d-y*b)/m,S=(x*y+d*b)/m,k=(-x*d+y*b)/m,N=_-g,E=w-v,A=S-g,C=k-v;return N*N+E*E>A*A+C*C&&(_=S,w=k),[[_-l,w-c],[_*e/M,w*e/M]]}function Mu(n){function t(t){function o(){c.push("M",u(n(f),a))}for(var l,c=[],f=[],s=-1,h=t.length,p=En(e),g=En(r);++s1?n.join("L"):n+"Z"}function bu(n){return n.join("L")+"Z"}function _u(n){for(var t=0,e=n.length,r=n[0],i=[r[0],",",r[1]];++t1&&i.push("H",r[0]),i.join("")}function wu(n){for(var t=0,e=n.length,r=n[0],i=[r[0],",",r[1]];++t1){a=t[1],u=n[l],l++,r+="C"+(i[0]+o[0])+","+(i[1]+o[1])+","+(u[0]-a[0])+","+(u[1]-a[1])+","+u[0]+","+u[1];for(var c=2;c9&&(i=3*t/Math.sqrt(i),o[a]=i*e,o[a+1]=i*r));for(a=-1;++a<=l;)i=(n[Math.min(l,a+1)][0]-n[Math.max(0,a-1)][0])/(6*(1+o[a]*o[a])),u.push([i||0,o[a]*i||0]);return u}function Fu(n){return n.length<3?xu(n):n[0]+Au(n,ju(n))}function Hu(n){for(var t,e,r,i=-1,u=n.length;++i=t?o(n-t):void(f.c=o)}function o(e){var i=g.active,u=g[i];u&&(u.timer.c=null,u.timer.t=NaN,--g.count,delete g[i],u.event&&u.event.interrupt.call(n,n.__data__,u.index));for(var o in g)if(r>+o){var c=g[o];c.timer.c=null,c.timer.t=NaN,--g.count,delete g[o]}f.c=a,qn(function(){return f.c&&a(e||1)&&(f.c=null,f.t=NaN),1},0,l),g.active=r,v.event&&v.event.start.call(n,n.__data__,t),p=[],v.tween.forEach(function(e,r){(r=r.call(n,n.__data__,t))&&p.push(r)}),h=v.ease,s=v.duration}function a(i){for(var u=i/s,o=h(u),a=p.length;a>0;)p[--a].call(n,o);return u>=1?(v.event&&v.event.end.call(n,n.__data__,t),--g.count?delete g[r]:delete n[e],1):void 0}var l,f,s,h,p,g=n[e]||(n[e]={active:0,count:0}),v=g[r];v||(l=i.time,f=qn(u,0,l),v=g[r]={tween:new c,time:l,timer:f,delay:i.delay,duration:i.duration,ease:i.ease,index:t},i=null,++g.count)}function no(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate("+(isFinite(r)?r:e(n))+",0)"})}function to(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate(0,"+(isFinite(r)?r:e(n))+")"})}function eo(n){return n.toISOString()}function ro(n,t,e){function r(t){return n(t)}function i(n,e){var r=n[1]-n[0],i=r/e,u=ao.bisect(Kl,i);return u==Kl.length?[t.year,Ki(n.map(function(n){return n/31536e6}),e)[2]]:u?t[i/Kl[u-1]1?{floor:function(t){for(;e(t=n.floor(t));)t=io(t-1);return t},ceil:function(t){for(;e(t=n.ceil(t));)t=io(+t+1);return t}}:n))},r.ticks=function(n,t){var e=Yi(r.domain()),u=null==n?i(e,10):"number"==typeof n?i(e,n):!n.range&&[{range:n},t];return u&&(n=u[0],t=u[1]),n.range(e[0],io(+e[1]+1),1>t?1:t)},r.tickFormat=function(){return e},r.copy=function(){return ro(n.copy(),t,e)},Ji(r,n)}function io(n){return new Date(n)}function uo(n){return JSON.parse(n.responseText)}function oo(n){var t=fo.createRange();return t.selectNode(fo.body),t.createContextualFragment(n.responseText)}var ao={version:"3.5.17"},lo=[].slice,co=function(n){return lo.call(n)},fo=this.document;if(fo)try{co(fo.documentElement.childNodes)[0].nodeType}catch(so){co=function(n){for(var t=n.length,e=new Array(t);t--;)e[t]=n[t];return e}}if(Date.now||(Date.now=function(){return+new Date}),fo)try{fo.createElement("DIV").style.setProperty("opacity",0,"")}catch(ho){var po=this.Element.prototype,go=po.setAttribute,vo=po.setAttributeNS,yo=this.CSSStyleDeclaration.prototype,mo=yo.setProperty;po.setAttribute=function(n,t){go.call(this,n,t+"")},po.setAttributeNS=function(n,t,e){vo.call(this,n,t,e+"")},yo.setProperty=function(n,t,e){mo.call(this,n,t+"",e)}}ao.ascending=e,ao.descending=function(n,t){return n>t?-1:t>n?1:t>=n?0:NaN},ao.min=function(n,t){var e,r,i=-1,u=n.length;if(1===arguments.length){for(;++i=r){e=r;break}for(;++ir&&(e=r)}else{for(;++i=r){e=r;break}for(;++ir&&(e=r)}return e},ao.max=function(n,t){var e,r,i=-1,u=n.length;if(1===arguments.length){for(;++i=r){e=r;break}for(;++ie&&(e=r)}else{for(;++i=r){e=r;break}for(;++ie&&(e=r)}return e},ao.extent=function(n,t){var e,r,i,u=-1,o=n.length;if(1===arguments.length){for(;++u=r){e=i=r;break}for(;++ur&&(e=r),r>i&&(i=r))}else{for(;++u=r){e=i=r;break}for(;++ur&&(e=r),r>i&&(i=r))}return[e,i]},ao.sum=function(n,t){var e,r=0,u=n.length,o=-1;if(1===arguments.length)for(;++o1?l/(f-1):void 0},ao.deviation=function(){var n=ao.variance.apply(this,arguments);return n?Math.sqrt(n):n};var Mo=u(e);ao.bisectLeft=Mo.left,ao.bisect=ao.bisectRight=Mo.right,ao.bisector=function(n){return u(1===n.length?function(t,r){return e(n(t),r)}:n)},ao.shuffle=function(n,t,e){(u=arguments.length)<3&&(e=n.length,2>u&&(t=0));for(var r,i,u=e-t;u;)i=Math.random()*u--|0,r=n[u+t],n[u+t]=n[i+t],n[i+t]=r;return n},ao.permute=function(n,t){for(var e=t.length,r=new Array(e);e--;)r[e]=n[t[e]];return r},ao.pairs=function(n){for(var t,e=0,r=n.length-1,i=n[0],u=new Array(0>r?0:r);r>e;)u[e]=[t=i,i=n[++e]];return u},ao.transpose=function(n){if(!(i=n.length))return[];for(var t=-1,e=ao.min(n,o),r=new Array(e);++t=0;)for(r=n[i],t=r.length;--t>=0;)e[--o]=r[t];return e};var xo=Math.abs;ao.range=function(n,t,e){if(arguments.length<3&&(e=1,arguments.length<2&&(t=n,n=0)),(t-n)/e===1/0)throw new Error("infinite range");var r,i=[],u=a(xo(e)),o=-1;if(n*=u,t*=u,e*=u,0>e)for(;(r=n+e*++o)>t;)i.push(r/u);else for(;(r=n+e*++o)=u.length)return r?r.call(i,o):e?o.sort(e):o;for(var l,f,s,h,p=-1,g=o.length,v=u[a++],d=new c;++p=u.length)return n;var r=[],i=o[e++];return n.forEach(function(n,i){r.push({key:n,values:t(i,e)})}),i?r.sort(function(n,t){return i(n.key,t.key)}):r}var e,r,i={},u=[],o=[];return i.map=function(t,e){return n(e,t,0)},i.entries=function(e){return t(n(ao.map,e,0),0)},i.key=function(n){return u.push(n),i},i.sortKeys=function(n){return o[u.length-1]=n,i},i.sortValues=function(n){return e=n,i},i.rollup=function(n){return r=n,i},i},ao.set=function(n){var t=new y;if(n)for(var e=0,r=n.length;r>e;++e)t.add(n[e]);return t},l(y,{has:h,add:function(n){return this._[f(n+="")]=!0,n},remove:p,values:g,size:v,empty:d,forEach:function(n){for(var t in this._)n.call(this,s(t))}}),ao.behavior={},ao.rebind=function(n,t){for(var e,r=1,i=arguments.length;++r=0&&(r=n.slice(e+1),n=n.slice(0,e)),n)return arguments.length<2?this[n].on(r):this[n].on(r,t);if(2===arguments.length){if(null==t)for(n in this)this.hasOwnProperty(n)&&this[n].on(r,null);return this}},ao.event=null,ao.requote=function(n){return n.replace(So,"\\$&")};var So=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,ko={}.__proto__?function(n,t){n.__proto__=t}:function(n,t){for(var e in t)n[e]=t[e]},No=function(n,t){return t.querySelector(n)},Eo=function(n,t){return t.querySelectorAll(n)},Ao=function(n,t){var e=n.matches||n[x(n,"matchesSelector")];return(Ao=function(n,t){return e.call(n,t)})(n,t)};"function"==typeof Sizzle&&(No=function(n,t){return Sizzle(n,t)[0]||null},Eo=Sizzle,Ao=Sizzle.matchesSelector),ao.selection=function(){return ao.select(fo.documentElement)};var Co=ao.selection.prototype=[];Co.select=function(n){var t,e,r,i,u=[];n=A(n);for(var o=-1,a=this.length;++o=0&&"xmlns"!==(e=n.slice(0,t))&&(n=n.slice(t+1)),Lo.hasOwnProperty(e)?{space:Lo[e],local:n}:n}},Co.attr=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node();return n=ao.ns.qualify(n),n.local?e.getAttributeNS(n.space,n.local):e.getAttribute(n)}for(t in n)this.each(z(t,n[t]));return this}return this.each(z(n,t))},Co.classed=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node(),r=(n=T(n)).length,i=-1;if(t=e.classList){for(;++ii){if("string"!=typeof n){2>i&&(e="");for(r in n)this.each(P(r,n[r],e));return this}if(2>i){var u=this.node();return t(u).getComputedStyle(u,null).getPropertyValue(n)}r=""}return this.each(P(n,e,r))},Co.property=function(n,t){if(arguments.length<2){if("string"==typeof n)return this.node()[n];for(t in n)this.each(U(t,n[t]));return this}return this.each(U(n,t))},Co.text=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.textContent=null==t?"":t}:null==n?function(){this.textContent=""}:function(){this.textContent=n}):this.node().textContent},Co.html=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.innerHTML=null==t?"":t}:null==n?function(){this.innerHTML=""}:function(){this.innerHTML=n}):this.node().innerHTML},Co.append=function(n){return n=j(n),this.select(function(){return this.appendChild(n.apply(this,arguments))})},Co.insert=function(n,t){return n=j(n),t=A(t),this.select(function(){return this.insertBefore(n.apply(this,arguments),t.apply(this,arguments)||null)})},Co.remove=function(){return this.each(F)},Co.data=function(n,t){function e(n,e){var r,i,u,o=n.length,s=e.length,h=Math.min(o,s),p=new Array(s),g=new Array(s),v=new Array(o);if(t){var d,y=new c,m=new Array(o);for(r=-1;++rr;++r)g[r]=H(e[r]);for(;o>r;++r)v[r]=n[r]}g.update=p,g.parentNode=p.parentNode=v.parentNode=n.parentNode,a.push(g),l.push(p),f.push(v)}var r,i,u=-1,o=this.length;if(!arguments.length){for(n=new Array(o=(r=this[0]).length);++uu;u++){i.push(t=[]),t.parentNode=(e=this[u]).parentNode;for(var a=0,l=e.length;l>a;a++)(r=e[a])&&n.call(r,r.__data__,a,u)&&t.push(r)}return E(i)},Co.order=function(){for(var n=-1,t=this.length;++n=0;)(e=r[i])&&(u&&u!==e.nextSibling&&u.parentNode.insertBefore(e,u),u=e);return this},Co.sort=function(n){n=I.apply(this,arguments);for(var t=-1,e=this.length;++tn;n++)for(var e=this[n],r=0,i=e.length;i>r;r++){var u=e[r];if(u)return u}return null},Co.size=function(){var n=0;return Y(this,function(){++n}),n};var qo=[];ao.selection.enter=Z,ao.selection.enter.prototype=qo,qo.append=Co.append,qo.empty=Co.empty,qo.node=Co.node,qo.call=Co.call,qo.size=Co.size,qo.select=function(n){for(var t,e,r,i,u,o=[],a=-1,l=this.length;++ar){if("string"!=typeof n){2>r&&(t=!1);for(e in n)this.each(X(e,n[e],t));return this}if(2>r)return(r=this.node()["__on"+n])&&r._;e=!1}return this.each(X(n,t,e))};var To=ao.map({mouseenter:"mouseover",mouseleave:"mouseout"});fo&&To.forEach(function(n){"on"+n in fo&&To.remove(n)});var Ro,Do=0;ao.mouse=function(n){return J(n,k())};var Po=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;ao.touch=function(n,t,e){if(arguments.length<3&&(e=t,t=k().changedTouches),t)for(var r,i=0,u=t.length;u>i;++i)if((r=t[i]).identifier===e)return J(n,r)},ao.behavior.drag=function(){function n(){this.on("mousedown.drag",u).on("touchstart.drag",o)}function e(n,t,e,u,o){return function(){function a(){var n,e,r=t(h,v);r&&(n=r[0]-M[0],e=r[1]-M[1],g|=n|e,M=r,p({type:"drag",x:r[0]+c[0],y:r[1]+c[1],dx:n,dy:e}))}function l(){t(h,v)&&(y.on(u+d,null).on(o+d,null),m(g),p({type:"dragend"}))}var c,f=this,s=ao.event.target.correspondingElement||ao.event.target,h=f.parentNode,p=r.of(f,arguments),g=0,v=n(),d=".drag"+(null==v?"":"-"+v),y=ao.select(e(s)).on(u+d,a).on(o+d,l),m=W(s),M=t(h,v);i?(c=i.apply(f,arguments),c=[c.x-M[0],c.y-M[1]]):c=[0,0],p({type:"dragstart"})}}var r=N(n,"drag","dragstart","dragend"),i=null,u=e(b,ao.mouse,t,"mousemove","mouseup"),o=e(G,ao.touch,m,"touchmove","touchend");return n.origin=function(t){return arguments.length?(i=t,n):i},ao.rebind(n,r,"on")},ao.touches=function(n,t){return arguments.length<2&&(t=k().touches),t?co(t).map(function(t){var e=J(n,t);return e.identifier=t.identifier,e}):[]};var Uo=1e-6,jo=Uo*Uo,Fo=Math.PI,Ho=2*Fo,Oo=Ho-Uo,Io=Fo/2,Yo=Fo/180,Zo=180/Fo,Vo=Math.SQRT2,Xo=2,$o=4;ao.interpolateZoom=function(n,t){var e,r,i=n[0],u=n[1],o=n[2],a=t[0],l=t[1],c=t[2],f=a-i,s=l-u,h=f*f+s*s;if(jo>h)r=Math.log(c/o)/Vo,e=function(n){return[i+n*f,u+n*s,o*Math.exp(Vo*n*r)]};else{var p=Math.sqrt(h),g=(c*c-o*o+$o*h)/(2*o*Xo*p),v=(c*c-o*o-$o*h)/(2*c*Xo*p),d=Math.log(Math.sqrt(g*g+1)-g),y=Math.log(Math.sqrt(v*v+1)-v);r=(y-d)/Vo,e=function(n){var t=n*r,e=rn(d),a=o/(Xo*p)*(e*un(Vo*t+d)-en(d));return[i+a*f,u+a*s,o*e/rn(Vo*t+d)]}}return e.duration=1e3*r,e},ao.behavior.zoom=function(){function n(n){n.on(L,s).on(Wo+".zoom",p).on("dblclick.zoom",g).on(R,h)}function e(n){return[(n[0]-k.x)/k.k,(n[1]-k.y)/k.k]}function r(n){return[n[0]*k.k+k.x,n[1]*k.k+k.y]}function i(n){k.k=Math.max(A[0],Math.min(A[1],n))}function u(n,t){t=r(t),k.x+=n[0]-t[0],k.y+=n[1]-t[1]}function o(t,e,r,o){t.__chart__={x:k.x,y:k.y,k:k.k},i(Math.pow(2,o)),u(d=e,r),t=ao.select(t),C>0&&(t=t.transition().duration(C)),t.call(n.event)}function a(){b&&b.domain(x.range().map(function(n){return(n-k.x)/k.k}).map(x.invert)),w&&w.domain(_.range().map(function(n){return(n-k.y)/k.k}).map(_.invert))}function l(n){z++||n({type:"zoomstart"})}function c(n){a(),n({type:"zoom",scale:k.k,translate:[k.x,k.y]})}function f(n){--z||(n({type:"zoomend"}),d=null)}function s(){function n(){a=1,u(ao.mouse(i),h),c(o)}function r(){s.on(q,null).on(T,null),p(a),f(o)}var i=this,o=D.of(i,arguments),a=0,s=ao.select(t(i)).on(q,n).on(T,r),h=e(ao.mouse(i)),p=W(i);Il.call(i),l(o)}function h(){function n(){var n=ao.touches(g);return p=k.k,n.forEach(function(n){n.identifier in d&&(d[n.identifier]=e(n))}),n}function t(){var t=ao.event.target;ao.select(t).on(x,r).on(b,a),_.push(t);for(var e=ao.event.changedTouches,i=0,u=e.length;u>i;++i)d[e[i].identifier]=null;var l=n(),c=Date.now();if(1===l.length){if(500>c-M){var f=l[0];o(g,f,d[f.identifier],Math.floor(Math.log(k.k)/Math.LN2)+1),S()}M=c}else if(l.length>1){var f=l[0],s=l[1],h=f[0]-s[0],p=f[1]-s[1];y=h*h+p*p}}function r(){var n,t,e,r,o=ao.touches(g);Il.call(g);for(var a=0,l=o.length;l>a;++a,r=null)if(e=o[a],r=d[e.identifier]){if(t)break;n=e,t=r}if(r){var f=(f=e[0]-n[0])*f+(f=e[1]-n[1])*f,s=y&&Math.sqrt(f/y);n=[(n[0]+e[0])/2,(n[1]+e[1])/2],t=[(t[0]+r[0])/2,(t[1]+r[1])/2],i(s*p)}M=null,u(n,t),c(v)}function a(){if(ao.event.touches.length){for(var t=ao.event.changedTouches,e=0,r=t.length;r>e;++e)delete d[t[e].identifier];for(var i in d)return void n()}ao.selectAll(_).on(m,null),w.on(L,s).on(R,h),N(),f(v)}var p,g=this,v=D.of(g,arguments),d={},y=0,m=".zoom-"+ao.event.changedTouches[0].identifier,x="touchmove"+m,b="touchend"+m,_=[],w=ao.select(g),N=W(g);t(),l(v),w.on(L,null).on(R,t)}function p(){var n=D.of(this,arguments);m?clearTimeout(m):(Il.call(this),v=e(d=y||ao.mouse(this)),l(n)),m=setTimeout(function(){m=null,f(n)},50),S(),i(Math.pow(2,.002*Bo())*k.k),u(d,v),c(n)}function g(){var n=ao.mouse(this),t=Math.log(k.k)/Math.LN2;o(this,n,e(n),ao.event.shiftKey?Math.ceil(t)-1:Math.floor(t)+1)}var v,d,y,m,M,x,b,_,w,k={x:0,y:0,k:1},E=[960,500],A=Jo,C=250,z=0,L="mousedown.zoom",q="mousemove.zoom",T="mouseup.zoom",R="touchstart.zoom",D=N(n,"zoomstart","zoom","zoomend");return Wo||(Wo="onwheel"in fo?(Bo=function(){return-ao.event.deltaY*(ao.event.deltaMode?120:1)},"wheel"):"onmousewheel"in fo?(Bo=function(){return ao.event.wheelDelta},"mousewheel"):(Bo=function(){return-ao.event.detail},"MozMousePixelScroll")),n.event=function(n){n.each(function(){var n=D.of(this,arguments),t=k;Hl?ao.select(this).transition().each("start.zoom",function(){k=this.__chart__||{x:0,y:0,k:1},l(n)}).tween("zoom:zoom",function(){var e=E[0],r=E[1],i=d?d[0]:e/2,u=d?d[1]:r/2,o=ao.interpolateZoom([(i-k.x)/k.k,(u-k.y)/k.k,e/k.k],[(i-t.x)/t.k,(u-t.y)/t.k,e/t.k]);return function(t){var r=o(t),a=e/r[2];this.__chart__=k={x:i-r[0]*a,y:u-r[1]*a,k:a},c(n)}}).each("interrupt.zoom",function(){f(n)}).each("end.zoom",function(){f(n)}):(this.__chart__=k,l(n),c(n),f(n))})},n.translate=function(t){return arguments.length?(k={x:+t[0],y:+t[1],k:k.k},a(),n):[k.x,k.y]},n.scale=function(t){return arguments.length?(k={x:k.x,y:k.y,k:null},i(+t),a(),n):k.k},n.scaleExtent=function(t){return arguments.length?(A=null==t?Jo:[+t[0],+t[1]],n):A},n.center=function(t){return arguments.length?(y=t&&[+t[0],+t[1]],n):y},n.size=function(t){return arguments.length?(E=t&&[+t[0],+t[1]],n):E},n.duration=function(t){return arguments.length?(C=+t,n):C},n.x=function(t){return arguments.length?(b=t,x=t.copy(),k={x:0,y:0,k:1},n):b},n.y=function(t){return arguments.length?(w=t,_=t.copy(),k={x:0,y:0,k:1},n):w},ao.rebind(n,D,"on")};var Bo,Wo,Jo=[0,1/0];ao.color=an,an.prototype.toString=function(){return this.rgb()+""},ao.hsl=ln;var Go=ln.prototype=new an;Go.brighter=function(n){return n=Math.pow(.7,arguments.length?n:1),new ln(this.h,this.s,this.l/n)},Go.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new ln(this.h,this.s,n*this.l)},Go.rgb=function(){return cn(this.h,this.s,this.l)},ao.hcl=fn;var Ko=fn.prototype=new an;Ko.brighter=function(n){return new fn(this.h,this.c,Math.min(100,this.l+Qo*(arguments.length?n:1)))},Ko.darker=function(n){return new fn(this.h,this.c,Math.max(0,this.l-Qo*(arguments.length?n:1)))},Ko.rgb=function(){return sn(this.h,this.c,this.l).rgb()},ao.lab=hn;var Qo=18,na=.95047,ta=1,ea=1.08883,ra=hn.prototype=new an;ra.brighter=function(n){return new hn(Math.min(100,this.l+Qo*(arguments.length?n:1)),this.a,this.b)},ra.darker=function(n){return new hn(Math.max(0,this.l-Qo*(arguments.length?n:1)),this.a,this.b)},ra.rgb=function(){return pn(this.l,this.a,this.b)},ao.rgb=mn;var ia=mn.prototype=new an;ia.brighter=function(n){n=Math.pow(.7,arguments.length?n:1);var t=this.r,e=this.g,r=this.b,i=30;return t||e||r?(t&&i>t&&(t=i),e&&i>e&&(e=i),r&&i>r&&(r=i),new mn(Math.min(255,t/n),Math.min(255,e/n),Math.min(255,r/n))):new mn(i,i,i)},ia.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new mn(n*this.r,n*this.g,n*this.b)},ia.hsl=function(){return wn(this.r,this.g,this.b)},ia.toString=function(){return"#"+bn(this.r)+bn(this.g)+bn(this.b)};var ua=ao.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});ua.forEach(function(n,t){ua.set(n,Mn(t))}),ao.functor=En,ao.xhr=An(m),ao.dsv=function(n,t){function e(n,e,u){arguments.length<3&&(u=e,e=null);var o=Cn(n,t,null==e?r:i(e),u);return o.row=function(n){return arguments.length?o.response(null==(e=n)?r:i(n)):e},o}function r(n){return e.parse(n.responseText)}function i(n){return function(t){return e.parse(t.responseText,n)}}function u(t){return t.map(o).join(n)}function o(n){return a.test(n)?'"'+n.replace(/\"/g,'""')+'"':n}var a=new RegExp('["'+n+"\n]"),l=n.charCodeAt(0);return e.parse=function(n,t){var r;return e.parseRows(n,function(n,e){if(r)return r(n,e-1);var i=new Function("d","return {"+n.map(function(n,t){return JSON.stringify(n)+": d["+t+"]"}).join(",")+"}");r=t?function(n,e){return t(i(n),e)}:i})},e.parseRows=function(n,t){function e(){if(f>=c)return o;if(i)return i=!1,u;var t=f;if(34===n.charCodeAt(t)){for(var e=t;e++f;){var r=n.charCodeAt(f++),a=1;if(10===r)i=!0;else if(13===r)i=!0,10===n.charCodeAt(f)&&(++f,++a);else if(r!==l)continue;return n.slice(t,f-a)}return n.slice(t)}for(var r,i,u={},o={},a=[],c=n.length,f=0,s=0;(r=e())!==o;){for(var h=[];r!==u&&r!==o;)h.push(r),r=e();t&&null==(h=t(h,s++))||a.push(h)}return a},e.format=function(t){if(Array.isArray(t[0]))return e.formatRows(t);var r=new y,i=[];return t.forEach(function(n){for(var t in n)r.has(t)||i.push(r.add(t))}),[i.map(o).join(n)].concat(t.map(function(t){return i.map(function(n){return o(t[n])}).join(n)})).join("\n")},e.formatRows=function(n){return n.map(u).join("\n")},e},ao.csv=ao.dsv(",","text/csv"),ao.tsv=ao.dsv(" ","text/tab-separated-values");var oa,aa,la,ca,fa=this[x(this,"requestAnimationFrame")]||function(n){setTimeout(n,17)};ao.timer=function(){qn.apply(this,arguments)},ao.timer.flush=function(){Rn(),Dn()},ao.round=function(n,t){return t?Math.round(n*(t=Math.pow(10,t)))/t:Math.round(n)};var sa=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"].map(Un);ao.formatPrefix=function(n,t){var e=0;return(n=+n)&&(0>n&&(n*=-1),t&&(n=ao.round(n,Pn(n,t))),e=1+Math.floor(1e-12+Math.log(n)/Math.LN10),e=Math.max(-24,Math.min(24,3*Math.floor((e-1)/3)))),sa[8+e/3]};var ha=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,pa=ao.map({b:function(n){return n.toString(2)},c:function(n){return String.fromCharCode(n)},o:function(n){return n.toString(8)},x:function(n){return n.toString(16)},X:function(n){return n.toString(16).toUpperCase()},g:function(n,t){return n.toPrecision(t)},e:function(n,t){return n.toExponential(t)},f:function(n,t){return n.toFixed(t)},r:function(n,t){return(n=ao.round(n,Pn(n,t))).toFixed(Math.max(0,Math.min(20,Pn(n*(1+1e-15),t))))}}),ga=ao.time={},va=Date;Hn.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){da.setUTCDate.apply(this._,arguments)},setDay:function(){da.setUTCDay.apply(this._,arguments)},setFullYear:function(){da.setUTCFullYear.apply(this._,arguments)},setHours:function(){da.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){da.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){da.setUTCMinutes.apply(this._,arguments)},setMonth:function(){da.setUTCMonth.apply(this._,arguments)},setSeconds:function(){da.setUTCSeconds.apply(this._,arguments)},setTime:function(){da.setTime.apply(this._,arguments)}};var da=Date.prototype;ga.year=On(function(n){return n=ga.day(n),n.setMonth(0,1),n},function(n,t){n.setFullYear(n.getFullYear()+t)},function(n){return n.getFullYear()}),ga.years=ga.year.range,ga.years.utc=ga.year.utc.range,ga.day=On(function(n){var t=new va(2e3,0);return t.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),t},function(n,t){n.setDate(n.getDate()+t)},function(n){return n.getDate()-1}),ga.days=ga.day.range,ga.days.utc=ga.day.utc.range,ga.dayOfYear=function(n){var t=ga.year(n);return Math.floor((n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(n,t){t=7-t;var e=ga[n]=On(function(n){return(n=ga.day(n)).setDate(n.getDate()-(n.getDay()+t)%7),n},function(n,t){n.setDate(n.getDate()+7*Math.floor(t))},function(n){var e=ga.year(n).getDay();return Math.floor((ga.dayOfYear(n)+(e+t)%7)/7)-(e!==t)});ga[n+"s"]=e.range,ga[n+"s"].utc=e.utc.range,ga[n+"OfYear"]=function(n){var e=ga.year(n).getDay();return Math.floor((ga.dayOfYear(n)+(e+t)%7)/7)}}),ga.week=ga.sunday,ga.weeks=ga.sunday.range,ga.weeks.utc=ga.sunday.utc.range,ga.weekOfYear=ga.sundayOfYear;var ya={"-":"",_:" ",0:"0"},ma=/^\s*\d+/,Ma=/^%/;ao.locale=function(n){return{numberFormat:jn(n),timeFormat:Yn(n)}};var xa=ao.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"], +shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});ao.format=xa.numberFormat,ao.geo={},ft.prototype={s:0,t:0,add:function(n){st(n,this.t,ba),st(ba.s,this.s,this),this.s?this.t+=ba.t:this.s=ba.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var ba=new ft;ao.geo.stream=function(n,t){n&&_a.hasOwnProperty(n.type)?_a[n.type](n,t):ht(n,t)};var _a={Feature:function(n,t){ht(n.geometry,t)},FeatureCollection:function(n,t){for(var e=n.features,r=-1,i=e.length;++rn?4*Fo+n:n,Na.lineStart=Na.lineEnd=Na.point=b}};ao.geo.bounds=function(){function n(n,t){M.push(x=[f=n,h=n]),s>t&&(s=t),t>p&&(p=t)}function t(t,e){var r=dt([t*Yo,e*Yo]);if(y){var i=mt(y,r),u=[i[1],-i[0],0],o=mt(u,i);bt(o),o=_t(o);var l=t-g,c=l>0?1:-1,v=o[0]*Zo*c,d=xo(l)>180;if(d^(v>c*g&&c*t>v)){var m=o[1]*Zo;m>p&&(p=m)}else if(v=(v+360)%360-180,d^(v>c*g&&c*t>v)){var m=-o[1]*Zo;s>m&&(s=m)}else s>e&&(s=e),e>p&&(p=e);d?g>t?a(f,t)>a(f,h)&&(h=t):a(t,h)>a(f,h)&&(f=t):h>=f?(f>t&&(f=t),t>h&&(h=t)):t>g?a(f,t)>a(f,h)&&(h=t):a(t,h)>a(f,h)&&(f=t)}else n(t,e);y=r,g=t}function e(){b.point=t}function r(){x[0]=f,x[1]=h,b.point=n,y=null}function i(n,e){if(y){var r=n-g;m+=xo(r)>180?r+(r>0?360:-360):r}else v=n,d=e;Na.point(n,e),t(n,e)}function u(){Na.lineStart()}function o(){i(v,d),Na.lineEnd(),xo(m)>Uo&&(f=-(h=180)),x[0]=f,x[1]=h,y=null}function a(n,t){return(t-=n)<0?t+360:t}function l(n,t){return n[0]-t[0]}function c(n,t){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:nka?(f=-(h=180),s=-(p=90)):m>Uo?p=90:-Uo>m&&(s=-90),x[0]=f,x[1]=h}};return function(n){p=h=-(f=s=1/0),M=[],ao.geo.stream(n,b);var t=M.length;if(t){M.sort(l);for(var e,r=1,i=M[0],u=[i];t>r;++r)e=M[r],c(e[0],i)||c(e[1],i)?(a(i[0],e[1])>a(i[0],i[1])&&(i[1]=e[1]),a(e[0],i[1])>a(i[0],i[1])&&(i[0]=e[0])):u.push(i=e);for(var o,e,g=-(1/0),t=u.length-1,r=0,i=u[t];t>=r;i=e,++r)e=u[r],(o=a(i[1],e[0]))>g&&(g=o,f=e[0],h=i[1])}return M=x=null,f===1/0||s===1/0?[[NaN,NaN],[NaN,NaN]]:[[f,s],[h,p]]}}(),ao.geo.centroid=function(n){Ea=Aa=Ca=za=La=qa=Ta=Ra=Da=Pa=Ua=0,ao.geo.stream(n,ja);var t=Da,e=Pa,r=Ua,i=t*t+e*e+r*r;return jo>i&&(t=qa,e=Ta,r=Ra,Uo>Aa&&(t=Ca,e=za,r=La),i=t*t+e*e+r*r,jo>i)?[NaN,NaN]:[Math.atan2(e,t)*Zo,tn(r/Math.sqrt(i))*Zo]};var Ea,Aa,Ca,za,La,qa,Ta,Ra,Da,Pa,Ua,ja={sphere:b,point:St,lineStart:Nt,lineEnd:Et,polygonStart:function(){ja.lineStart=At},polygonEnd:function(){ja.lineStart=Nt}},Fa=Rt(zt,jt,Ht,[-Fo,-Fo/2]),Ha=1e9;ao.geo.clipExtent=function(){var n,t,e,r,i,u,o={stream:function(n){return i&&(i.valid=!1),i=u(n),i.valid=!0,i},extent:function(a){return arguments.length?(u=Zt(n=+a[0][0],t=+a[0][1],e=+a[1][0],r=+a[1][1]),i&&(i.valid=!1,i=null),o):[[n,t],[e,r]]}};return o.extent([[0,0],[960,500]])},(ao.geo.conicEqualArea=function(){return Vt(Xt)}).raw=Xt,ao.geo.albers=function(){return ao.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},ao.geo.albersUsa=function(){function n(n){var u=n[0],o=n[1];return t=null,e(u,o),t||(r(u,o),t)||i(u,o),t}var t,e,r,i,u=ao.geo.albers(),o=ao.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),a=ao.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),l={point:function(n,e){t=[n,e]}};return n.invert=function(n){var t=u.scale(),e=u.translate(),r=(n[0]-e[0])/t,i=(n[1]-e[1])/t;return(i>=.12&&.234>i&&r>=-.425&&-.214>r?o:i>=.166&&.234>i&&r>=-.214&&-.115>r?a:u).invert(n)},n.stream=function(n){var t=u.stream(n),e=o.stream(n),r=a.stream(n);return{point:function(n,i){t.point(n,i),e.point(n,i),r.point(n,i)},sphere:function(){t.sphere(),e.sphere(),r.sphere()},lineStart:function(){t.lineStart(),e.lineStart(),r.lineStart()},lineEnd:function(){t.lineEnd(),e.lineEnd(),r.lineEnd()},polygonStart:function(){t.polygonStart(),e.polygonStart(),r.polygonStart()},polygonEnd:function(){t.polygonEnd(),e.polygonEnd(),r.polygonEnd()}}},n.precision=function(t){return arguments.length?(u.precision(t),o.precision(t),a.precision(t),n):u.precision()},n.scale=function(t){return arguments.length?(u.scale(t),o.scale(.35*t),a.scale(t),n.translate(u.translate())):u.scale()},n.translate=function(t){if(!arguments.length)return u.translate();var c=u.scale(),f=+t[0],s=+t[1];return e=u.translate(t).clipExtent([[f-.455*c,s-.238*c],[f+.455*c,s+.238*c]]).stream(l).point,r=o.translate([f-.307*c,s+.201*c]).clipExtent([[f-.425*c+Uo,s+.12*c+Uo],[f-.214*c-Uo,s+.234*c-Uo]]).stream(l).point,i=a.translate([f-.205*c,s+.212*c]).clipExtent([[f-.214*c+Uo,s+.166*c+Uo],[f-.115*c-Uo,s+.234*c-Uo]]).stream(l).point,n},n.scale(1070)};var Oa,Ia,Ya,Za,Va,Xa,$a={point:b,lineStart:b,lineEnd:b,polygonStart:function(){Ia=0,$a.lineStart=$t},polygonEnd:function(){$a.lineStart=$a.lineEnd=$a.point=b,Oa+=xo(Ia/2)}},Ba={point:Bt,lineStart:b,lineEnd:b,polygonStart:b,polygonEnd:b},Wa={point:Gt,lineStart:Kt,lineEnd:Qt,polygonStart:function(){Wa.lineStart=ne},polygonEnd:function(){Wa.point=Gt,Wa.lineStart=Kt,Wa.lineEnd=Qt}};ao.geo.path=function(){function n(n){return n&&("function"==typeof a&&u.pointRadius(+a.apply(this,arguments)),o&&o.valid||(o=i(u)),ao.geo.stream(n,o)),u.result()}function t(){return o=null,n}var e,r,i,u,o,a=4.5;return n.area=function(n){return Oa=0,ao.geo.stream(n,i($a)),Oa},n.centroid=function(n){return Ca=za=La=qa=Ta=Ra=Da=Pa=Ua=0,ao.geo.stream(n,i(Wa)),Ua?[Da/Ua,Pa/Ua]:Ra?[qa/Ra,Ta/Ra]:La?[Ca/La,za/La]:[NaN,NaN]},n.bounds=function(n){return Va=Xa=-(Ya=Za=1/0),ao.geo.stream(n,i(Ba)),[[Ya,Za],[Va,Xa]]},n.projection=function(n){return arguments.length?(i=(e=n)?n.stream||re(n):m,t()):e},n.context=function(n){return arguments.length?(u=null==(r=n)?new Wt:new te(n),"function"!=typeof a&&u.pointRadius(a),t()):r},n.pointRadius=function(t){return arguments.length?(a="function"==typeof t?t:(u.pointRadius(+t),+t),n):a},n.projection(ao.geo.albersUsa()).context(null)},ao.geo.transform=function(n){return{stream:function(t){var e=new ie(t);for(var r in n)e[r]=n[r];return e}}},ie.prototype={point:function(n,t){this.stream.point(n,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},ao.geo.projection=oe,ao.geo.projectionMutator=ae,(ao.geo.equirectangular=function(){return oe(ce)}).raw=ce.invert=ce,ao.geo.rotation=function(n){function t(t){return t=n(t[0]*Yo,t[1]*Yo),t[0]*=Zo,t[1]*=Zo,t}return n=se(n[0]%360*Yo,n[1]*Yo,n.length>2?n[2]*Yo:0),t.invert=function(t){return t=n.invert(t[0]*Yo,t[1]*Yo),t[0]*=Zo,t[1]*=Zo,t},t},fe.invert=ce,ao.geo.circle=function(){function n(){var n="function"==typeof r?r.apply(this,arguments):r,t=se(-n[0]*Yo,-n[1]*Yo,0).invert,i=[];return e(null,null,1,{point:function(n,e){i.push(n=t(n,e)),n[0]*=Zo,n[1]*=Zo}}),{type:"Polygon",coordinates:[i]}}var t,e,r=[0,0],i=6;return n.origin=function(t){return arguments.length?(r=t,n):r},n.angle=function(r){return arguments.length?(e=ve((t=+r)*Yo,i*Yo),n):t},n.precision=function(r){return arguments.length?(e=ve(t*Yo,(i=+r)*Yo),n):i},n.angle(90)},ao.geo.distance=function(n,t){var e,r=(t[0]-n[0])*Yo,i=n[1]*Yo,u=t[1]*Yo,o=Math.sin(r),a=Math.cos(r),l=Math.sin(i),c=Math.cos(i),f=Math.sin(u),s=Math.cos(u);return Math.atan2(Math.sqrt((e=s*o)*e+(e=c*f-l*s*a)*e),l*f+c*s*a)},ao.geo.graticule=function(){function n(){return{type:"MultiLineString",coordinates:t()}}function t(){return ao.range(Math.ceil(u/d)*d,i,d).map(h).concat(ao.range(Math.ceil(c/y)*y,l,y).map(p)).concat(ao.range(Math.ceil(r/g)*g,e,g).filter(function(n){return xo(n%d)>Uo}).map(f)).concat(ao.range(Math.ceil(a/v)*v,o,v).filter(function(n){return xo(n%y)>Uo}).map(s))}var e,r,i,u,o,a,l,c,f,s,h,p,g=10,v=g,d=90,y=360,m=2.5;return n.lines=function(){return t().map(function(n){return{type:"LineString",coordinates:n}})},n.outline=function(){return{type:"Polygon",coordinates:[h(u).concat(p(l).slice(1),h(i).reverse().slice(1),p(c).reverse().slice(1))]}},n.extent=function(t){return arguments.length?n.majorExtent(t).minorExtent(t):n.minorExtent()},n.majorExtent=function(t){return arguments.length?(u=+t[0][0],i=+t[1][0],c=+t[0][1],l=+t[1][1],u>i&&(t=u,u=i,i=t),c>l&&(t=c,c=l,l=t),n.precision(m)):[[u,c],[i,l]]},n.minorExtent=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],a=+t[0][1],o=+t[1][1],r>e&&(t=r,r=e,e=t),a>o&&(t=a,a=o,o=t),n.precision(m)):[[r,a],[e,o]]},n.step=function(t){return arguments.length?n.majorStep(t).minorStep(t):n.minorStep()},n.majorStep=function(t){return arguments.length?(d=+t[0],y=+t[1],n):[d,y]},n.minorStep=function(t){return arguments.length?(g=+t[0],v=+t[1],n):[g,v]},n.precision=function(t){return arguments.length?(m=+t,f=ye(a,o,90),s=me(r,e,m),h=ye(c,l,90),p=me(u,i,m),n):m},n.majorExtent([[-180,-90+Uo],[180,90-Uo]]).minorExtent([[-180,-80-Uo],[180,80+Uo]])},ao.geo.greatArc=function(){function n(){return{type:"LineString",coordinates:[t||r.apply(this,arguments),e||i.apply(this,arguments)]}}var t,e,r=Me,i=xe;return n.distance=function(){return ao.geo.distance(t||r.apply(this,arguments),e||i.apply(this,arguments))},n.source=function(e){return arguments.length?(r=e,t="function"==typeof e?null:e,n):r},n.target=function(t){return arguments.length?(i=t,e="function"==typeof t?null:t,n):i},n.precision=function(){return arguments.length?n:0},n},ao.geo.interpolate=function(n,t){return be(n[0]*Yo,n[1]*Yo,t[0]*Yo,t[1]*Yo)},ao.geo.length=function(n){return Ja=0,ao.geo.stream(n,Ga),Ja};var Ja,Ga={sphere:b,point:b,lineStart:_e,lineEnd:b,polygonStart:b,polygonEnd:b},Ka=we(function(n){return Math.sqrt(2/(1+n))},function(n){return 2*Math.asin(n/2)});(ao.geo.azimuthalEqualArea=function(){return oe(Ka)}).raw=Ka;var Qa=we(function(n){var t=Math.acos(n);return t&&t/Math.sin(t)},m);(ao.geo.azimuthalEquidistant=function(){return oe(Qa)}).raw=Qa,(ao.geo.conicConformal=function(){return Vt(Se)}).raw=Se,(ao.geo.conicEquidistant=function(){return Vt(ke)}).raw=ke;var nl=we(function(n){return 1/n},Math.atan);(ao.geo.gnomonic=function(){return oe(nl)}).raw=nl,Ne.invert=function(n,t){return[n,2*Math.atan(Math.exp(t))-Io]},(ao.geo.mercator=function(){return Ee(Ne)}).raw=Ne;var tl=we(function(){return 1},Math.asin);(ao.geo.orthographic=function(){return oe(tl)}).raw=tl;var el=we(function(n){return 1/(1+n)},function(n){return 2*Math.atan(n)});(ao.geo.stereographic=function(){return oe(el)}).raw=el,Ae.invert=function(n,t){return[-t,2*Math.atan(Math.exp(n))-Io]},(ao.geo.transverseMercator=function(){var n=Ee(Ae),t=n.center,e=n.rotate;return n.center=function(n){return n?t([-n[1],n[0]]):(n=t(),[n[1],-n[0]])},n.rotate=function(n){return n?e([n[0],n[1],n.length>2?n[2]+90:90]):(n=e(),[n[0],n[1],n[2]-90])},e([0,0,90])}).raw=Ae,ao.geom={},ao.geom.hull=function(n){function t(n){if(n.length<3)return[];var t,i=En(e),u=En(r),o=n.length,a=[],l=[];for(t=0;o>t;t++)a.push([+i.call(this,n[t],t),+u.call(this,n[t],t),t]);for(a.sort(qe),t=0;o>t;t++)l.push([a[t][0],-a[t][1]]);var c=Le(a),f=Le(l),s=f[0]===c[0],h=f[f.length-1]===c[c.length-1],p=[];for(t=c.length-1;t>=0;--t)p.push(n[a[c[t]][2]]);for(t=+s;t=r&&c.x<=u&&c.y>=i&&c.y<=o?[[r,o],[u,o],[u,i],[r,i]]:[];f.point=n[a]}),t}function e(n){return n.map(function(n,t){return{x:Math.round(u(n,t)/Uo)*Uo,y:Math.round(o(n,t)/Uo)*Uo,i:t}})}var r=Ce,i=ze,u=r,o=i,a=sl;return n?t(n):(t.links=function(n){return ar(e(n)).edges.filter(function(n){return n.l&&n.r}).map(function(t){return{source:n[t.l.i],target:n[t.r.i]}})},t.triangles=function(n){var t=[];return ar(e(n)).cells.forEach(function(e,r){for(var i,u,o=e.site,a=e.edges.sort(Ve),l=-1,c=a.length,f=a[c-1].edge,s=f.l===o?f.r:f.l;++l=c,h=r>=f,p=h<<1|s;n.leaf=!1,n=n.nodes[p]||(n.nodes[p]=hr()),s?i=c:a=c,h?o=f:l=f,u(n,t,e,r,i,o,a,l)}var f,s,h,p,g,v,d,y,m,M=En(a),x=En(l);if(null!=t)v=t,d=e,y=r,m=i;else if(y=m=-(v=d=1/0),s=[],h=[],g=n.length,o)for(p=0;g>p;++p)f=n[p],f.xy&&(y=f.x),f.y>m&&(m=f.y),s.push(f.x),h.push(f.y);else for(p=0;g>p;++p){var b=+M(f=n[p],p),_=+x(f,p);v>b&&(v=b),d>_&&(d=_),b>y&&(y=b),_>m&&(m=_),s.push(b),h.push(_)}var w=y-v,S=m-d;w>S?m=d+w:y=v+S;var k=hr();if(k.add=function(n){u(k,n,+M(n,++p),+x(n,p),v,d,y,m)},k.visit=function(n){pr(n,k,v,d,y,m)},k.find=function(n){return gr(k,n[0],n[1],v,d,y,m)},p=-1,null==t){for(;++p=0?n.slice(0,t):n,r=t>=0?n.slice(t+1):"in";return e=vl.get(e)||gl,r=dl.get(r)||m,br(r(e.apply(null,lo.call(arguments,1))))},ao.interpolateHcl=Rr,ao.interpolateHsl=Dr,ao.interpolateLab=Pr,ao.interpolateRound=Ur,ao.transform=function(n){var t=fo.createElementNS(ao.ns.prefix.svg,"g");return(ao.transform=function(n){if(null!=n){t.setAttribute("transform",n);var e=t.transform.baseVal.consolidate()}return new jr(e?e.matrix:yl)})(n)},jr.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var yl={a:1,b:0,c:0,d:1,e:0,f:0};ao.interpolateTransform=$r,ao.layout={},ao.layout.bundle=function(){return function(n){for(var t=[],e=-1,r=n.length;++ea*a/y){if(v>l){var c=t.charge/l;n.px-=u*c,n.py-=o*c}return!0}if(t.point&&l&&v>l){var c=t.pointCharge/l;n.px-=u*c,n.py-=o*c}}return!t.charge}}function t(n){n.px=ao.event.x,n.py=ao.event.y,l.resume()}var e,r,i,u,o,a,l={},c=ao.dispatch("start","tick","end"),f=[1,1],s=.9,h=ml,p=Ml,g=-30,v=xl,d=.1,y=.64,M=[],x=[];return l.tick=function(){if((i*=.99)<.005)return e=null,c.end({type:"end",alpha:i=0}),!0;var t,r,l,h,p,v,y,m,b,_=M.length,w=x.length;for(r=0;w>r;++r)l=x[r],h=l.source,p=l.target,m=p.x-h.x,b=p.y-h.y,(v=m*m+b*b)&&(v=i*o[r]*((v=Math.sqrt(v))-u[r])/v,m*=v,b*=v,p.x-=m*(y=h.weight+p.weight?h.weight/(h.weight+p.weight):.5),p.y-=b*y,h.x+=m*(y=1-y),h.y+=b*y);if((y=i*d)&&(m=f[0]/2,b=f[1]/2,r=-1,y))for(;++r<_;)l=M[r],l.x+=(m-l.x)*y,l.y+=(b-l.y)*y;if(g)for(ri(t=ao.geom.quadtree(M),i,a),r=-1;++r<_;)(l=M[r]).fixed||t.visit(n(l));for(r=-1;++r<_;)l=M[r],l.fixed?(l.x=l.px,l.y=l.py):(l.x-=(l.px-(l.px=l.x))*s,l.y-=(l.py-(l.py=l.y))*s);c.tick({type:"tick",alpha:i})},l.nodes=function(n){return arguments.length?(M=n,l):M},l.links=function(n){return arguments.length?(x=n,l):x},l.size=function(n){return arguments.length?(f=n,l):f},l.linkDistance=function(n){return arguments.length?(h="function"==typeof n?n:+n,l):h},l.distance=l.linkDistance,l.linkStrength=function(n){return arguments.length?(p="function"==typeof n?n:+n,l):p},l.friction=function(n){return arguments.length?(s=+n,l):s},l.charge=function(n){return arguments.length?(g="function"==typeof n?n:+n,l):g},l.chargeDistance=function(n){return arguments.length?(v=n*n,l):Math.sqrt(v)},l.gravity=function(n){return arguments.length?(d=+n,l):d},l.theta=function(n){return arguments.length?(y=n*n,l):Math.sqrt(y)},l.alpha=function(n){return arguments.length?(n=+n,i?n>0?i=n:(e.c=null,e.t=NaN,e=null,c.end({type:"end",alpha:i=0})):n>0&&(c.start({type:"start",alpha:i=n}),e=qn(l.tick)),l):i},l.start=function(){function n(n,r){if(!e){for(e=new Array(i),l=0;i>l;++l)e[l]=[];for(l=0;c>l;++l){var u=x[l];e[u.source.index].push(u.target),e[u.target.index].push(u.source)}}for(var o,a=e[t],l=-1,f=a.length;++lt;++t)(r=M[t]).index=t,r.weight=0;for(t=0;c>t;++t)r=x[t],"number"==typeof r.source&&(r.source=M[r.source]),"number"==typeof r.target&&(r.target=M[r.target]),++r.source.weight,++r.target.weight;for(t=0;i>t;++t)r=M[t],isNaN(r.x)&&(r.x=n("x",s)),isNaN(r.y)&&(r.y=n("y",v)),isNaN(r.px)&&(r.px=r.x),isNaN(r.py)&&(r.py=r.y);if(u=[],"function"==typeof h)for(t=0;c>t;++t)u[t]=+h.call(this,x[t],t);else for(t=0;c>t;++t)u[t]=h;if(o=[],"function"==typeof p)for(t=0;c>t;++t)o[t]=+p.call(this,x[t],t);else for(t=0;c>t;++t)o[t]=p;if(a=[],"function"==typeof g)for(t=0;i>t;++t)a[t]=+g.call(this,M[t],t);else for(t=0;i>t;++t)a[t]=g;return l.resume()},l.resume=function(){return l.alpha(.1)},l.stop=function(){return l.alpha(0)},l.drag=function(){return r||(r=ao.behavior.drag().origin(m).on("dragstart.force",Qr).on("drag.force",t).on("dragend.force",ni)),arguments.length?void this.on("mouseover.force",ti).on("mouseout.force",ei).call(r):r},ao.rebind(l,c,"on")};var ml=20,Ml=1,xl=1/0;ao.layout.hierarchy=function(){function n(i){var u,o=[i],a=[];for(i.depth=0;null!=(u=o.pop());)if(a.push(u),(c=e.call(n,u,u.depth))&&(l=c.length)){for(var l,c,f;--l>=0;)o.push(f=c[l]),f.parent=u,f.depth=u.depth+1;r&&(u.value=0),u.children=c}else r&&(u.value=+r.call(n,u,u.depth)||0),delete u.children;return oi(i,function(n){var e,i;t&&(e=n.children)&&e.sort(t),r&&(i=n.parent)&&(i.value+=n.value)}),a}var t=ci,e=ai,r=li;return n.sort=function(e){return arguments.length?(t=e,n):t},n.children=function(t){return arguments.length?(e=t,n):e},n.value=function(t){return arguments.length?(r=t,n):r},n.revalue=function(t){return r&&(ui(t,function(n){n.children&&(n.value=0)}),oi(t,function(t){var e;t.children||(t.value=+r.call(n,t,t.depth)||0),(e=t.parent)&&(e.value+=t.value)})),t},n},ao.layout.partition=function(){function n(t,e,r,i){var u=t.children;if(t.x=e,t.y=t.depth*i,t.dx=r,t.dy=i,u&&(o=u.length)){var o,a,l,c=-1;for(r=t.value?r/t.value:0;++cs?-1:1),g=ao.sum(c),v=g?(s-l*p)/g:0,d=ao.range(l),y=[];return null!=e&&d.sort(e===bl?function(n,t){return c[t]-c[n]}:function(n,t){return e(o[n],o[t])}),d.forEach(function(n){y[n]={data:o[n],value:a=c[n],startAngle:f,endAngle:f+=a*v+p,padAngle:h}}),y}var t=Number,e=bl,r=0,i=Ho,u=0;return n.value=function(e){return arguments.length?(t=e,n):t},n.sort=function(t){return arguments.length?(e=t,n):e},n.startAngle=function(t){return arguments.length?(r=t,n):r},n.endAngle=function(t){return arguments.length?(i=t,n):i},n.padAngle=function(t){return arguments.length?(u=t,n):u},n};var bl={};ao.layout.stack=function(){function n(a,l){if(!(h=a.length))return a;var c=a.map(function(e,r){return t.call(n,e,r)}),f=c.map(function(t){return t.map(function(t,e){return[u.call(n,t,e),o.call(n,t,e)]})}),s=e.call(n,f,l);c=ao.permute(c,s),f=ao.permute(f,s);var h,p,g,v,d=r.call(n,f,l),y=c[0].length;for(g=0;y>g;++g)for(i.call(n,c[0][g],v=d[g],f[0][g][1]),p=1;h>p;++p)i.call(n,c[p][g],v+=f[p-1][g][1],f[p][g][1]);return a}var t=m,e=gi,r=vi,i=pi,u=si,o=hi;return n.values=function(e){return arguments.length?(t=e,n):t},n.order=function(t){return arguments.length?(e="function"==typeof t?t:_l.get(t)||gi,n):e},n.offset=function(t){return arguments.length?(r="function"==typeof t?t:wl.get(t)||vi,n):r},n.x=function(t){return arguments.length?(u=t,n):u},n.y=function(t){return arguments.length?(o=t,n):o},n.out=function(t){return arguments.length?(i=t,n):i},n};var _l=ao.map({"inside-out":function(n){var t,e,r=n.length,i=n.map(di),u=n.map(yi),o=ao.range(r).sort(function(n,t){return i[n]-i[t]}),a=0,l=0,c=[],f=[];for(t=0;r>t;++t)e=o[t],l>a?(a+=u[e],c.push(e)):(l+=u[e],f.push(e));return f.reverse().concat(c)},reverse:function(n){return ao.range(n.length).reverse()},"default":gi}),wl=ao.map({silhouette:function(n){var t,e,r,i=n.length,u=n[0].length,o=[],a=0,l=[];for(e=0;u>e;++e){for(t=0,r=0;i>t;t++)r+=n[t][e][1];r>a&&(a=r),o.push(r)}for(e=0;u>e;++e)l[e]=(a-o[e])/2;return l},wiggle:function(n){var t,e,r,i,u,o,a,l,c,f=n.length,s=n[0],h=s.length,p=[];for(p[0]=l=c=0,e=1;h>e;++e){for(t=0,i=0;f>t;++t)i+=n[t][e][1];for(t=0,u=0,a=s[e][0]-s[e-1][0];f>t;++t){for(r=0,o=(n[t][e][1]-n[t][e-1][1])/(2*a);t>r;++r)o+=(n[r][e][1]-n[r][e-1][1])/a;u+=o*n[t][e][1]}p[e]=l-=i?u/i*a:0,c>l&&(c=l)}for(e=0;h>e;++e)p[e]-=c;return p},expand:function(n){var t,e,r,i=n.length,u=n[0].length,o=1/i,a=[];for(e=0;u>e;++e){for(t=0,r=0;i>t;t++)r+=n[t][e][1];if(r)for(t=0;i>t;t++)n[t][e][1]/=r;else for(t=0;i>t;t++)n[t][e][1]=o}for(e=0;u>e;++e)a[e]=0;return a},zero:vi});ao.layout.histogram=function(){function n(n,u){for(var o,a,l=[],c=n.map(e,this),f=r.call(this,c,u),s=i.call(this,f,c,u),u=-1,h=c.length,p=s.length-1,g=t?1:1/h;++u0)for(u=-1;++u=f[0]&&a<=f[1]&&(o=l[ao.bisect(s,a,1,p)-1],o.y+=g,o.push(n[u]));return l}var t=!0,e=Number,r=bi,i=Mi;return n.value=function(t){return arguments.length?(e=t,n):e},n.range=function(t){return arguments.length?(r=En(t),n):r},n.bins=function(t){return arguments.length?(i="number"==typeof t?function(n){return xi(n,t)}:En(t),n):i},n.frequency=function(e){return arguments.length?(t=!!e,n):t},n},ao.layout.pack=function(){function n(n,u){var o=e.call(this,n,u),a=o[0],l=i[0],c=i[1],f=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(a.x=a.y=0,oi(a,function(n){n.r=+f(n.value)}),oi(a,Ni),r){var s=r*(t?1:Math.max(2*a.r/l,2*a.r/c))/2;oi(a,function(n){n.r+=s}),oi(a,Ni),oi(a,function(n){n.r-=s})}return Ci(a,l/2,c/2,t?1:1/Math.max(2*a.r/l,2*a.r/c)),o}var t,e=ao.layout.hierarchy().sort(_i),r=0,i=[1,1];return n.size=function(t){return arguments.length?(i=t,n):i},n.radius=function(e){return arguments.length?(t=null==e||"function"==typeof e?e:+e,n):t},n.padding=function(t){return arguments.length?(r=+t,n):r},ii(n,e)},ao.layout.tree=function(){function n(n,i){var f=o.call(this,n,i),s=f[0],h=t(s);if(oi(h,e),h.parent.m=-h.z,ui(h,r),c)ui(s,u);else{var p=s,g=s,v=s;ui(s,function(n){n.xg.x&&(g=n),n.depth>v.depth&&(v=n)});var d=a(p,g)/2-p.x,y=l[0]/(g.x+a(g,p)/2+d),m=l[1]/(v.depth||1);ui(s,function(n){n.x=(n.x+d)*y,n.y=n.depth*m})}return f}function t(n){for(var t,e={A:null,children:[n]},r=[e];null!=(t=r.pop());)for(var i,u=t.children,o=0,a=u.length;a>o;++o)r.push((u[o]=i={_:u[o],parent:t,children:(i=u[o].children)&&i.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:o}).a=i);return e.children[0]}function e(n){var t=n.children,e=n.parent.children,r=n.i?e[n.i-1]:null;if(t.length){Di(n);var u=(t[0].z+t[t.length-1].z)/2;r?(n.z=r.z+a(n._,r._),n.m=n.z-u):n.z=u}else r&&(n.z=r.z+a(n._,r._));n.parent.A=i(n,r,n.parent.A||e[0])}function r(n){n._.x=n.z+n.parent.m,n.m+=n.parent.m}function i(n,t,e){if(t){for(var r,i=n,u=n,o=t,l=i.parent.children[0],c=i.m,f=u.m,s=o.m,h=l.m;o=Ti(o),i=qi(i),o&&i;)l=qi(l),u=Ti(u),u.a=n,r=o.z+s-i.z-c+a(o._,i._),r>0&&(Ri(Pi(o,n,e),n,r),c+=r,f+=r),s+=o.m,c+=i.m,h+=l.m,f+=u.m;o&&!Ti(u)&&(u.t=o,u.m+=s-f),i&&!qi(l)&&(l.t=i,l.m+=c-h,e=n)}return e}function u(n){n.x*=l[0],n.y=n.depth*l[1]}var o=ao.layout.hierarchy().sort(null).value(null),a=Li,l=[1,1],c=null;return n.separation=function(t){return arguments.length?(a=t,n):a},n.size=function(t){return arguments.length?(c=null==(l=t)?u:null,n):c?null:l},n.nodeSize=function(t){return arguments.length?(c=null==(l=t)?null:u,n):c?l:null},ii(n,o)},ao.layout.cluster=function(){function n(n,u){var o,a=t.call(this,n,u),l=a[0],c=0;oi(l,function(n){var t=n.children;t&&t.length?(n.x=ji(t),n.y=Ui(t)):(n.x=o?c+=e(n,o):0,n.y=0,o=n)});var f=Fi(l),s=Hi(l),h=f.x-e(f,s)/2,p=s.x+e(s,f)/2;return oi(l,i?function(n){n.x=(n.x-l.x)*r[0],n.y=(l.y-n.y)*r[1]}:function(n){n.x=(n.x-h)/(p-h)*r[0],n.y=(1-(l.y?n.y/l.y:1))*r[1]}),a}var t=ao.layout.hierarchy().sort(null).value(null),e=Li,r=[1,1],i=!1;return n.separation=function(t){return arguments.length?(e=t,n):e},n.size=function(t){return arguments.length?(i=null==(r=t),n):i?null:r},n.nodeSize=function(t){return arguments.length?(i=null!=(r=t),n):i?r:null},ii(n,t)},ao.layout.treemap=function(){function n(n,t){for(var e,r,i=-1,u=n.length;++it?0:t),e.area=isNaN(r)||0>=r?0:r}function t(e){var u=e.children;if(u&&u.length){var o,a,l,c=s(e),f=[],h=u.slice(),g=1/0,v="slice"===p?c.dx:"dice"===p?c.dy:"slice-dice"===p?1&e.depth?c.dy:c.dx:Math.min(c.dx,c.dy);for(n(h,c.dx*c.dy/e.value),f.area=0;(l=h.length)>0;)f.push(o=h[l-1]),f.area+=o.area,"squarify"!==p||(a=r(f,v))<=g?(h.pop(),g=a):(f.area-=f.pop().area,i(f,v,c,!1),v=Math.min(c.dx,c.dy),f.length=f.area=0,g=1/0);f.length&&(i(f,v,c,!0),f.length=f.area=0),u.forEach(t)}}function e(t){var r=t.children;if(r&&r.length){var u,o=s(t),a=r.slice(),l=[];for(n(a,o.dx*o.dy/t.value),l.area=0;u=a.pop();)l.push(u),l.area+=u.area,null!=u.z&&(i(l,u.z?o.dx:o.dy,o,!a.length),l.length=l.area=0);r.forEach(e)}}function r(n,t){for(var e,r=n.area,i=0,u=1/0,o=-1,a=n.length;++oe&&(u=e),e>i&&(i=e));return r*=r,t*=t,r?Math.max(t*i*g/r,r/(t*u*g)):1/0}function i(n,t,e,r){var i,u=-1,o=n.length,a=e.x,c=e.y,f=t?l(n.area/t):0; +if(t==e.dx){for((r||f>e.dy)&&(f=e.dy);++ue.dx)&&(f=e.dx);++ue&&(t=1),1>e&&(n=0),function(){var e,r,i;do e=2*Math.random()-1,r=2*Math.random()-1,i=e*e+r*r;while(!i||i>1);return n+t*e*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var n=ao.random.normal.apply(ao,arguments);return function(){return Math.exp(n())}},bates:function(n){var t=ao.random.irwinHall(n);return function(){return t()/n}},irwinHall:function(n){return function(){for(var t=0,e=0;n>e;e++)t+=Math.random();return t}}},ao.scale={};var Sl={floor:m,ceil:m};ao.scale.linear=function(){return Wi([0,1],[0,1],Mr,!1)};var kl={s:1,g:1,p:1,r:1,e:1};ao.scale.log=function(){return ru(ao.scale.linear().domain([0,1]),10,!0,[1,10])};var Nl=ao.format(".0e"),El={floor:function(n){return-Math.ceil(-n)},ceil:function(n){return-Math.floor(-n)}};ao.scale.pow=function(){return iu(ao.scale.linear(),1,[0,1])},ao.scale.sqrt=function(){return ao.scale.pow().exponent(.5)},ao.scale.ordinal=function(){return ou([],{t:"range",a:[[]]})},ao.scale.category10=function(){return ao.scale.ordinal().range(Al)},ao.scale.category20=function(){return ao.scale.ordinal().range(Cl)},ao.scale.category20b=function(){return ao.scale.ordinal().range(zl)},ao.scale.category20c=function(){return ao.scale.ordinal().range(Ll)};var Al=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(xn),Cl=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(xn),zl=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(xn),Ll=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(xn);ao.scale.quantile=function(){return au([],[])},ao.scale.quantize=function(){return lu(0,1,[0,1])},ao.scale.threshold=function(){return cu([.5],[0,1])},ao.scale.identity=function(){return fu([0,1])},ao.svg={},ao.svg.arc=function(){function n(){var n=Math.max(0,+e.apply(this,arguments)),c=Math.max(0,+r.apply(this,arguments)),f=o.apply(this,arguments)-Io,s=a.apply(this,arguments)-Io,h=Math.abs(s-f),p=f>s?0:1;if(n>c&&(g=c,c=n,n=g),h>=Oo)return t(c,p)+(n?t(n,1-p):"")+"Z";var g,v,d,y,m,M,x,b,_,w,S,k,N=0,E=0,A=[];if((y=(+l.apply(this,arguments)||0)/2)&&(d=u===ql?Math.sqrt(n*n+c*c):+u.apply(this,arguments),p||(E*=-1),c&&(E=tn(d/c*Math.sin(y))),n&&(N=tn(d/n*Math.sin(y)))),c){m=c*Math.cos(f+E),M=c*Math.sin(f+E),x=c*Math.cos(s-E),b=c*Math.sin(s-E);var C=Math.abs(s-f-2*E)<=Fo?0:1;if(E&&yu(m,M,x,b)===p^C){var z=(f+s)/2;m=c*Math.cos(z),M=c*Math.sin(z),x=b=null}}else m=M=0;if(n){_=n*Math.cos(s-N),w=n*Math.sin(s-N),S=n*Math.cos(f+N),k=n*Math.sin(f+N);var L=Math.abs(f-s+2*N)<=Fo?0:1;if(N&&yu(_,w,S,k)===1-p^L){var q=(f+s)/2;_=n*Math.cos(q),w=n*Math.sin(q),S=k=null}}else _=w=0;if(h>Uo&&(g=Math.min(Math.abs(c-n)/2,+i.apply(this,arguments)))>.001){v=c>n^p?0:1;var T=g,R=g;if(Fo>h){var D=null==S?[_,w]:null==x?[m,M]:Re([m,M],[S,k],[x,b],[_,w]),P=m-D[0],U=M-D[1],j=x-D[0],F=b-D[1],H=1/Math.sin(Math.acos((P*j+U*F)/(Math.sqrt(P*P+U*U)*Math.sqrt(j*j+F*F)))/2),O=Math.sqrt(D[0]*D[0]+D[1]*D[1]);R=Math.min(g,(n-O)/(H-1)),T=Math.min(g,(c-O)/(H+1))}if(null!=x){var I=mu(null==S?[_,w]:[S,k],[m,M],c,T,p),Y=mu([x,b],[_,w],c,T,p);g===T?A.push("M",I[0],"A",T,",",T," 0 0,",v," ",I[1],"A",c,",",c," 0 ",1-p^yu(I[1][0],I[1][1],Y[1][0],Y[1][1]),",",p," ",Y[1],"A",T,",",T," 0 0,",v," ",Y[0]):A.push("M",I[0],"A",T,",",T," 0 1,",v," ",Y[0])}else A.push("M",m,",",M);if(null!=S){var Z=mu([m,M],[S,k],n,-R,p),V=mu([_,w],null==x?[m,M]:[x,b],n,-R,p);g===R?A.push("L",V[0],"A",R,",",R," 0 0,",v," ",V[1],"A",n,",",n," 0 ",p^yu(V[1][0],V[1][1],Z[1][0],Z[1][1]),",",1-p," ",Z[1],"A",R,",",R," 0 0,",v," ",Z[0]):A.push("L",V[0],"A",R,",",R," 0 0,",v," ",Z[0])}else A.push("L",_,",",w)}else A.push("M",m,",",M),null!=x&&A.push("A",c,",",c," 0 ",C,",",p," ",x,",",b),A.push("L",_,",",w),null!=S&&A.push("A",n,",",n," 0 ",L,",",1-p," ",S,",",k);return A.push("Z"),A.join("")}function t(n,t){return"M0,"+n+"A"+n+","+n+" 0 1,"+t+" 0,"+-n+"A"+n+","+n+" 0 1,"+t+" 0,"+n}var e=hu,r=pu,i=su,u=ql,o=gu,a=vu,l=du;return n.innerRadius=function(t){return arguments.length?(e=En(t),n):e},n.outerRadius=function(t){return arguments.length?(r=En(t),n):r},n.cornerRadius=function(t){return arguments.length?(i=En(t),n):i},n.padRadius=function(t){return arguments.length?(u=t==ql?ql:En(t),n):u},n.startAngle=function(t){return arguments.length?(o=En(t),n):o},n.endAngle=function(t){return arguments.length?(a=En(t),n):a},n.padAngle=function(t){return arguments.length?(l=En(t),n):l},n.centroid=function(){var n=(+e.apply(this,arguments)+ +r.apply(this,arguments))/2,t=(+o.apply(this,arguments)+ +a.apply(this,arguments))/2-Io;return[Math.cos(t)*n,Math.sin(t)*n]},n};var ql="auto";ao.svg.line=function(){return Mu(m)};var Tl=ao.map({linear:xu,"linear-closed":bu,step:_u,"step-before":wu,"step-after":Su,basis:zu,"basis-open":Lu,"basis-closed":qu,bundle:Tu,cardinal:Eu,"cardinal-open":ku,"cardinal-closed":Nu,monotone:Fu});Tl.forEach(function(n,t){t.key=n,t.closed=/-closed$/.test(n)});var Rl=[0,2/3,1/3,0],Dl=[0,1/3,2/3,0],Pl=[0,1/6,2/3,1/6];ao.svg.line.radial=function(){var n=Mu(Hu);return n.radius=n.x,delete n.x,n.angle=n.y,delete n.y,n},wu.reverse=Su,Su.reverse=wu,ao.svg.area=function(){return Ou(m)},ao.svg.area.radial=function(){var n=Ou(Hu);return n.radius=n.x,delete n.x,n.innerRadius=n.x0,delete n.x0,n.outerRadius=n.x1,delete n.x1,n.angle=n.y,delete n.y,n.startAngle=n.y0,delete n.y0,n.endAngle=n.y1,delete n.y1,n},ao.svg.chord=function(){function n(n,a){var l=t(this,u,n,a),c=t(this,o,n,a);return"M"+l.p0+r(l.r,l.p1,l.a1-l.a0)+(e(l,c)?i(l.r,l.p1,l.r,l.p0):i(l.r,l.p1,c.r,c.p0)+r(c.r,c.p1,c.a1-c.a0)+i(c.r,c.p1,l.r,l.p0))+"Z"}function t(n,t,e,r){var i=t.call(n,e,r),u=a.call(n,i,r),o=l.call(n,i,r)-Io,f=c.call(n,i,r)-Io;return{r:u,a0:o,a1:f,p0:[u*Math.cos(o),u*Math.sin(o)],p1:[u*Math.cos(f),u*Math.sin(f)]}}function e(n,t){return n.a0==t.a0&&n.a1==t.a1}function r(n,t,e){return"A"+n+","+n+" 0 "+ +(e>Fo)+",1 "+t}function i(n,t,e,r){return"Q 0,0 "+r}var u=Me,o=xe,a=Iu,l=gu,c=vu;return n.radius=function(t){return arguments.length?(a=En(t),n):a},n.source=function(t){return arguments.length?(u=En(t),n):u},n.target=function(t){return arguments.length?(o=En(t),n):o},n.startAngle=function(t){return arguments.length?(l=En(t),n):l},n.endAngle=function(t){return arguments.length?(c=En(t),n):c},n},ao.svg.diagonal=function(){function n(n,i){var u=t.call(this,n,i),o=e.call(this,n,i),a=(u.y+o.y)/2,l=[u,{x:u.x,y:a},{x:o.x,y:a},o];return l=l.map(r),"M"+l[0]+"C"+l[1]+" "+l[2]+" "+l[3]}var t=Me,e=xe,r=Yu;return n.source=function(e){return arguments.length?(t=En(e),n):t},n.target=function(t){return arguments.length?(e=En(t),n):e},n.projection=function(t){return arguments.length?(r=t,n):r},n},ao.svg.diagonal.radial=function(){var n=ao.svg.diagonal(),t=Yu,e=n.projection;return n.projection=function(n){return arguments.length?e(Zu(t=n)):t},n},ao.svg.symbol=function(){function n(n,r){return(Ul.get(t.call(this,n,r))||$u)(e.call(this,n,r))}var t=Xu,e=Vu;return n.type=function(e){return arguments.length?(t=En(e),n):t},n.size=function(t){return arguments.length?(e=En(t),n):e},n};var Ul=ao.map({circle:$u,cross:function(n){var t=Math.sqrt(n/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(n){var t=Math.sqrt(n/(2*Fl)),e=t*Fl;return"M0,"+-t+"L"+e+",0 0,"+t+" "+-e+",0Z"},square:function(n){var t=Math.sqrt(n)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(n){var t=Math.sqrt(n/jl),e=t*jl/2;return"M0,"+e+"L"+t+","+-e+" "+-t+","+-e+"Z"},"triangle-up":function(n){var t=Math.sqrt(n/jl),e=t*jl/2;return"M0,"+-e+"L"+t+","+e+" "+-t+","+e+"Z"}});ao.svg.symbolTypes=Ul.keys();var jl=Math.sqrt(3),Fl=Math.tan(30*Yo);Co.transition=function(n){for(var t,e,r=Hl||++Zl,i=Ku(n),u=[],o=Ol||{time:Date.now(),ease:Nr,delay:0,duration:250},a=-1,l=this.length;++au;u++){i.push(t=[]);for(var e=this[u],a=0,l=e.length;l>a;a++)(r=e[a])&&n.call(r,r.__data__,a,u)&&t.push(r)}return Wu(i,this.namespace,this.id)},Yl.tween=function(n,t){var e=this.id,r=this.namespace;return arguments.length<2?this.node()[r][e].tween.get(n):Y(this,null==t?function(t){t[r][e].tween.remove(n)}:function(i){i[r][e].tween.set(n,t)})},Yl.attr=function(n,t){function e(){this.removeAttribute(a)}function r(){this.removeAttributeNS(a.space,a.local)}function i(n){return null==n?e:(n+="",function(){var t,e=this.getAttribute(a);return e!==n&&(t=o(e,n),function(n){this.setAttribute(a,t(n))})})}function u(n){return null==n?r:(n+="",function(){var t,e=this.getAttributeNS(a.space,a.local);return e!==n&&(t=o(e,n),function(n){this.setAttributeNS(a.space,a.local,t(n))})})}if(arguments.length<2){for(t in n)this.attr(t,n[t]);return this}var o="transform"==n?$r:Mr,a=ao.ns.qualify(n);return Ju(this,"attr."+n,t,a.local?u:i)},Yl.attrTween=function(n,t){function e(n,e){var r=t.call(this,n,e,this.getAttribute(i));return r&&function(n){this.setAttribute(i,r(n))}}function r(n,e){var r=t.call(this,n,e,this.getAttributeNS(i.space,i.local));return r&&function(n){this.setAttributeNS(i.space,i.local,r(n))}}var i=ao.ns.qualify(n);return this.tween("attr."+n,i.local?r:e)},Yl.style=function(n,e,r){function i(){this.style.removeProperty(n)}function u(e){return null==e?i:(e+="",function(){var i,u=t(this).getComputedStyle(this,null).getPropertyValue(n);return u!==e&&(i=Mr(u,e),function(t){this.style.setProperty(n,i(t),r)})})}var o=arguments.length;if(3>o){if("string"!=typeof n){2>o&&(e="");for(r in n)this.style(r,n[r],e);return this}r=""}return Ju(this,"style."+n,e,u)},Yl.styleTween=function(n,e,r){function i(i,u){var o=e.call(this,i,u,t(this).getComputedStyle(this,null).getPropertyValue(n));return o&&function(t){this.style.setProperty(n,o(t),r)}}return arguments.length<3&&(r=""),this.tween("style."+n,i)},Yl.text=function(n){return Ju(this,"text",n,Gu)},Yl.remove=function(){var n=this.namespace;return this.each("end.transition",function(){var t;this[n].count<2&&(t=this.parentNode)&&t.removeChild(this)})},Yl.ease=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].ease:("function"!=typeof n&&(n=ao.ease.apply(ao,arguments)),Y(this,function(r){r[e][t].ease=n}))},Yl.delay=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].delay:Y(this,"function"==typeof n?function(r,i,u){r[e][t].delay=+n.call(r,r.__data__,i,u)}:(n=+n,function(r){r[e][t].delay=n}))},Yl.duration=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].duration:Y(this,"function"==typeof n?function(r,i,u){r[e][t].duration=Math.max(1,n.call(r,r.__data__,i,u))}:(n=Math.max(1,n),function(r){r[e][t].duration=n}))},Yl.each=function(n,t){var e=this.id,r=this.namespace;if(arguments.length<2){var i=Ol,u=Hl;try{Hl=e,Y(this,function(t,i,u){Ol=t[r][e],n.call(t,t.__data__,i,u)})}finally{Ol=i,Hl=u}}else Y(this,function(i){var u=i[r][e];(u.event||(u.event=ao.dispatch("start","end","interrupt"))).on(n,t)});return this},Yl.transition=function(){for(var n,t,e,r,i=this.id,u=++Zl,o=this.namespace,a=[],l=0,c=this.length;c>l;l++){a.push(n=[]);for(var t=this[l],f=0,s=t.length;s>f;f++)(e=t[f])&&(r=e[o][i],Qu(e,f,o,u,{time:r.time,ease:r.ease,delay:r.delay+r.duration,duration:r.duration})),n.push(e)}return Wu(a,o,u)},ao.svg.axis=function(){function n(n){n.each(function(){var n,c=ao.select(this),f=this.__chart__||e,s=this.__chart__=e.copy(),h=null==l?s.ticks?s.ticks.apply(s,a):s.domain():l,p=null==t?s.tickFormat?s.tickFormat.apply(s,a):m:t,g=c.selectAll(".tick").data(h,s),v=g.enter().insert("g",".domain").attr("class","tick").style("opacity",Uo),d=ao.transition(g.exit()).style("opacity",Uo).remove(),y=ao.transition(g.order()).style("opacity",1),M=Math.max(i,0)+o,x=Zi(s),b=c.selectAll(".domain").data([0]),_=(b.enter().append("path").attr("class","domain"),ao.transition(b));v.append("line"),v.append("text");var w,S,k,N,E=v.select("line"),A=y.select("line"),C=g.select("text").text(p),z=v.select("text"),L=y.select("text"),q="top"===r||"left"===r?-1:1;if("bottom"===r||"top"===r?(n=no,w="x",k="y",S="x2",N="y2",C.attr("dy",0>q?"0em":".71em").style("text-anchor","middle"),_.attr("d","M"+x[0]+","+q*u+"V0H"+x[1]+"V"+q*u)):(n=to,w="y",k="x",S="y2",N="x2",C.attr("dy",".32em").style("text-anchor",0>q?"end":"start"),_.attr("d","M"+q*u+","+x[0]+"H0V"+x[1]+"H"+q*u)),E.attr(N,q*i),z.attr(k,q*M),A.attr(S,0).attr(N,q*i),L.attr(w,0).attr(k,q*M),s.rangeBand){var T=s,R=T.rangeBand()/2;f=s=function(n){return T(n)+R}}else f.rangeBand?f=s:d.call(n,s,f);v.call(n,f,s),y.call(n,s,s)})}var t,e=ao.scale.linear(),r=Vl,i=6,u=6,o=3,a=[10],l=null;return n.scale=function(t){return arguments.length?(e=t,n):e},n.orient=function(t){return arguments.length?(r=t in Xl?t+"":Vl,n):r},n.ticks=function(){return arguments.length?(a=co(arguments),n):a},n.tickValues=function(t){return arguments.length?(l=t,n):l},n.tickFormat=function(e){return arguments.length?(t=e,n):t},n.tickSize=function(t){var e=arguments.length;return e?(i=+t,u=+arguments[e-1],n):i},n.innerTickSize=function(t){return arguments.length?(i=+t,n):i},n.outerTickSize=function(t){return arguments.length?(u=+t,n):u},n.tickPadding=function(t){return arguments.length?(o=+t,n):o},n.tickSubdivide=function(){return arguments.length&&n},n};var Vl="bottom",Xl={top:1,right:1,bottom:1,left:1};ao.svg.brush=function(){function n(t){t.each(function(){var t=ao.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",u).on("touchstart.brush",u),o=t.selectAll(".background").data([0]);o.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),t.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var a=t.selectAll(".resize").data(v,m);a.exit().remove(),a.enter().append("g").attr("class",function(n){return"resize "+n}).style("cursor",function(n){return $l[n]}).append("rect").attr("x",function(n){return/[ew]$/.test(n)?-3:null}).attr("y",function(n){return/^[ns]/.test(n)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),a.style("display",n.empty()?"none":null);var l,s=ao.transition(t),h=ao.transition(o);c&&(l=Zi(c),h.attr("x",l[0]).attr("width",l[1]-l[0]),r(s)),f&&(l=Zi(f),h.attr("y",l[0]).attr("height",l[1]-l[0]),i(s)),e(s)})}function e(n){n.selectAll(".resize").attr("transform",function(n){return"translate("+s[+/e$/.test(n)]+","+h[+/^s/.test(n)]+")"})}function r(n){n.select(".extent").attr("x",s[0]),n.selectAll(".extent,.n>rect,.s>rect").attr("width",s[1]-s[0])}function i(n){n.select(".extent").attr("y",h[0]),n.selectAll(".extent,.e>rect,.w>rect").attr("height",h[1]-h[0])}function u(){function u(){32==ao.event.keyCode&&(C||(M=null,L[0]-=s[1],L[1]-=h[1],C=2),S())}function v(){32==ao.event.keyCode&&2==C&&(L[0]+=s[1],L[1]+=h[1],C=0,S())}function d(){var n=ao.mouse(b),t=!1;x&&(n[0]+=x[0],n[1]+=x[1]),C||(ao.event.altKey?(M||(M=[(s[0]+s[1])/2,(h[0]+h[1])/2]),L[0]=s[+(n[0]f?(i=r,r=f):i=f),v[0]!=r||v[1]!=i?(e?a=null:o=null,v[0]=r,v[1]=i,!0):void 0}function m(){d(),k.style("pointer-events","all").selectAll(".resize").style("display",n.empty()?"none":null),ao.select("body").style("cursor",null),q.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),z(),w({type:"brushend"})}var M,x,b=this,_=ao.select(ao.event.target),w=l.of(b,arguments),k=ao.select(b),N=_.datum(),E=!/^(n|s)$/.test(N)&&c,A=!/^(e|w)$/.test(N)&&f,C=_.classed("extent"),z=W(b),L=ao.mouse(b),q=ao.select(t(b)).on("keydown.brush",u).on("keyup.brush",v);if(ao.event.changedTouches?q.on("touchmove.brush",d).on("touchend.brush",m):q.on("mousemove.brush",d).on("mouseup.brush",m),k.interrupt().selectAll("*").interrupt(),C)L[0]=s[0]-L[0],L[1]=h[0]-L[1];else if(N){var T=+/w$/.test(N),R=+/^n/.test(N);x=[s[1-T]-L[0],h[1-R]-L[1]],L[0]=s[T],L[1]=h[R]}else ao.event.altKey&&(M=L.slice());k.style("pointer-events","none").selectAll(".resize").style("display",null),ao.select("body").style("cursor",_.style("cursor")),w({type:"brushstart"}),d()}var o,a,l=N(n,"brushstart","brush","brushend"),c=null,f=null,s=[0,0],h=[0,0],p=!0,g=!0,v=Bl[0];return n.event=function(n){n.each(function(){var n=l.of(this,arguments),t={x:s,y:h,i:o,j:a},e=this.__chart__||t;this.__chart__=t,Hl?ao.select(this).transition().each("start.brush",function(){o=e.i,a=e.j,s=e.x,h=e.y,n({type:"brushstart"})}).tween("brush:brush",function(){var e=xr(s,t.x),r=xr(h,t.y);return o=a=null,function(i){s=t.x=e(i),h=t.y=r(i),n({type:"brush",mode:"resize"})}}).each("end.brush",function(){o=t.i,a=t.j,n({type:"brush",mode:"resize"}),n({type:"brushend"})}):(n({type:"brushstart"}),n({type:"brush",mode:"resize"}),n({type:"brushend"}))})},n.x=function(t){return arguments.length?(c=t,v=Bl[!c<<1|!f],n):c},n.y=function(t){return arguments.length?(f=t,v=Bl[!c<<1|!f],n):f},n.clamp=function(t){return arguments.length?(c&&f?(p=!!t[0],g=!!t[1]):c?p=!!t:f&&(g=!!t),n):c&&f?[p,g]:c?p:f?g:null},n.extent=function(t){var e,r,i,u,l;return arguments.length?(c&&(e=t[0],r=t[1],f&&(e=e[0],r=r[0]),o=[e,r],c.invert&&(e=c(e),r=c(r)),e>r&&(l=e,e=r,r=l),e==s[0]&&r==s[1]||(s=[e,r])),f&&(i=t[0],u=t[1],c&&(i=i[1],u=u[1]),a=[i,u],f.invert&&(i=f(i),u=f(u)),i>u&&(l=i,i=u,u=l),i==h[0]&&u==h[1]||(h=[i,u])),n):(c&&(o?(e=o[0],r=o[1]):(e=s[0],r=s[1],c.invert&&(e=c.invert(e),r=c.invert(r)),e>r&&(l=e,e=r,r=l))),f&&(a?(i=a[0],u=a[1]):(i=h[0],u=h[1],f.invert&&(i=f.invert(i),u=f.invert(u)),i>u&&(l=i,i=u,u=l))),c&&f?[[e,i],[r,u]]:c?[e,r]:f&&[i,u])},n.clear=function(){return n.empty()||(s=[0,0],h=[0,0],o=a=null),n},n.empty=function(){return!!c&&s[0]==s[1]||!!f&&h[0]==h[1]},ao.rebind(n,l,"on")};var $l={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Bl=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Wl=ga.format=xa.timeFormat,Jl=Wl.utc,Gl=Jl("%Y-%m-%dT%H:%M:%S.%LZ");Wl.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?eo:Gl,eo.parse=function(n){var t=new Date(n);return isNaN(t)?null:t},eo.toString=Gl.toString,ga.second=On(function(n){return new va(1e3*Math.floor(n/1e3))},function(n,t){n.setTime(n.getTime()+1e3*Math.floor(t))},function(n){return n.getSeconds()}),ga.seconds=ga.second.range,ga.seconds.utc=ga.second.utc.range,ga.minute=On(function(n){return new va(6e4*Math.floor(n/6e4))},function(n,t){n.setTime(n.getTime()+6e4*Math.floor(t))},function(n){return n.getMinutes()}),ga.minutes=ga.minute.range,ga.minutes.utc=ga.minute.utc.range,ga.hour=On(function(n){var t=n.getTimezoneOffset()/60;return new va(36e5*(Math.floor(n/36e5-t)+t))},function(n,t){n.setTime(n.getTime()+36e5*Math.floor(t))},function(n){return n.getHours()}),ga.hours=ga.hour.range,ga.hours.utc=ga.hour.utc.range,ga.month=On(function(n){return n=ga.day(n),n.setDate(1),n},function(n,t){n.setMonth(n.getMonth()+t)},function(n){return n.getMonth()}),ga.months=ga.month.range,ga.months.utc=ga.month.utc.range;var Kl=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Ql=[[ga.second,1],[ga.second,5],[ga.second,15],[ga.second,30],[ga.minute,1],[ga.minute,5],[ga.minute,15],[ga.minute,30],[ga.hour,1],[ga.hour,3],[ga.hour,6],[ga.hour,12],[ga.day,1],[ga.day,2],[ga.week,1],[ga.month,1],[ga.month,3],[ga.year,1]],nc=Wl.multi([[".%L",function(n){return n.getMilliseconds()}],[":%S",function(n){return n.getSeconds()}],["%I:%M",function(n){return n.getMinutes()}],["%I %p",function(n){return n.getHours()}],["%a %d",function(n){return n.getDay()&&1!=n.getDate()}],["%b %d",function(n){return 1!=n.getDate()}],["%B",function(n){return n.getMonth()}],["%Y",zt]]),tc={range:function(n,t,e){return ao.range(Math.ceil(n/e)*e,+t,e).map(io)},floor:m,ceil:m};Ql.year=ga.year,ga.scale=function(){return ro(ao.scale.linear(),Ql,nc)};var ec=Ql.map(function(n){return[n[0].utc,n[1]]}),rc=Jl.multi([[".%L",function(n){return n.getUTCMilliseconds()}],[":%S",function(n){return n.getUTCSeconds()}],["%I:%M",function(n){return n.getUTCMinutes()}],["%I %p",function(n){return n.getUTCHours()}],["%a %d",function(n){return n.getUTCDay()&&1!=n.getUTCDate()}],["%b %d",function(n){return 1!=n.getUTCDate()}],["%B",function(n){return n.getUTCMonth()}],["%Y",zt]]);ec.year=ga.year.utc,ga.scale.utc=function(){return ro(ao.scale.linear(),ec,rc)},ao.text=An(function(n){return n.responseText}),ao.json=function(n,t){return Cn(n,"application/json",uo,t)},ao.html=function(n,t){return Cn(n,"text/html",oo,t)},ao.xml=An(function(n){return n.responseXML}),"function"==typeof define&&define.amd?(this.d3=ao,define(ao)):"object"==typeof module&&module.exports?module.exports=ao:this.d3=ao}(); \ No newline at end of file diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/js/holder.min.js b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/js/holder.min.js new file mode 100644 index 0000000..6bfc844 --- /dev/null +++ b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/js/holder.min.js @@ -0,0 +1,12 @@ +/*! + +Holder - client side image placeholders +Version 2.7.1+6hydf +© 2015 Ivan Malopinsky - http://imsky.co + +Site: http://holderjs.com +Issues: https://github.com/imsky/holder/issues +License: http://opensource.org/licenses/MIT + +*/ +!function(a){if(a.document){var b=a.document;b.querySelectorAll||(b.querySelectorAll=function(c){var d,e=b.createElement("style"),f=[];for(b.documentElement.firstChild.appendChild(e),b._qsa=[],e.styleSheet.cssText=c+"{x-qsa:expression(document._qsa && document._qsa.push(this))}",a.scrollBy(0,0),e.parentNode.removeChild(e);b._qsa.length;)d=b._qsa.shift(),d.style.removeAttribute("x-qsa"),f.push(d);return b._qsa=null,f}),b.querySelector||(b.querySelector=function(a){var c=b.querySelectorAll(a);return c.length?c[0]:null}),b.getElementsByClassName||(b.getElementsByClassName=function(a){return a=String(a).replace(/^|\s+/g,"."),b.querySelectorAll(a)}),Object.keys||(Object.keys=function(a){if(a!==Object(a))throw TypeError("Object.keys called on non-object");var b,c=[];for(b in a)Object.prototype.hasOwnProperty.call(a,b)&&c.push(b);return c}),function(a){var b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";a.atob=a.atob||function(a){a=String(a);var c,d=0,e=[],f=0,g=0;if(a=a.replace(/\s/g,""),a.length%4===0&&(a=a.replace(/=+$/,"")),a.length%4===1)throw Error("InvalidCharacterError");if(/[^+/0-9A-Za-z]/.test(a))throw Error("InvalidCharacterError");for(;d>16&255)),e.push(String.fromCharCode(f>>8&255)),e.push(String.fromCharCode(255&f)),g=0,f=0),d+=1;return 12===g?(f>>=4,e.push(String.fromCharCode(255&f))):18===g&&(f>>=2,e.push(String.fromCharCode(f>>8&255)),e.push(String.fromCharCode(255&f))),e.join("")},a.btoa=a.btoa||function(a){a=String(a);var c,d,e,f,g,h,i,j=0,k=[];if(/[^\x00-\xFF]/.test(a))throw Error("InvalidCharacterError");for(;j>2,g=(3&c)<<4|d>>4,h=(15&d)<<2|e>>6,i=63&e,j===a.length+2?(h=64,i=64):j===a.length+1&&(i=64),k.push(b.charAt(f),b.charAt(g),b.charAt(h),b.charAt(i));return k.join("")}}(a),Object.prototype.hasOwnProperty||(Object.prototype.hasOwnProperty=function(a){var b=this.__proto__||this.constructor.prototype;return a in this&&(!(a in b)||b[a]!==this[a])}),function(){if("performance"in a==!1&&(a.performance={}),Date.now=Date.now||function(){return(new Date).getTime()},"now"in a.performance==!1){var b=Date.now();performance.timing&&performance.timing.navigationStart&&(b=performance.timing.navigationStart),a.performance.now=function(){return Date.now()-b}}}(),a.requestAnimationFrame||(a.webkitRequestAnimationFrame?!function(a){a.requestAnimationFrame=function(b){return webkitRequestAnimationFrame(function(){b(a.performance.now())})},a.cancelAnimationFrame=webkitCancelAnimationFrame}(a):a.mozRequestAnimationFrame?!function(a){a.requestAnimationFrame=function(b){return mozRequestAnimationFrame(function(){b(a.performance.now())})},a.cancelAnimationFrame=mozCancelAnimationFrame}(a):!function(a){a.requestAnimationFrame=function(b){return a.setTimeout(b,1e3/60)},a.cancelAnimationFrame=a.clearTimeout}(a))}}(this),function(a,b){"object"==typeof exports&&"object"==typeof module?module.exports=b():"function"==typeof define&&define.amd?define(b):"object"==typeof exports?exports.Holder=b():a.Holder=b()}(this,function(){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){(function(b){function d(a,b,c,d){var f=e(c.substr(c.lastIndexOf(a.domain)),a);f&&h({mode:null,el:d,flags:f,engineSettings:b})}function e(a,b){var c={theme:B(J.settings.themes.gray,null),stylesheets:b.stylesheets,instanceOptions:b};return a.match(/([\d]+p?)x([\d]+p?)(?:\?|$)/)?f(a,c):g(a,c)}function f(a,b){var c=a.split("?"),d=c[0].split("/");b.holderURL=a;var e=d[1],f=e.match(/([\d]+p?)x([\d]+p?)/);if(!f)return!1;if(b.fluid=-1!==e.indexOf("p"),b.dimensions={width:f[1].replace("p","%"),height:f[2].replace("p","%")},2===c.length){var g=A.parse(c[1]);if(g.bg&&(b.theme.background=(-1===g.bg.indexOf("#")?"#":"")+g.bg),g.fg&&(b.theme.foreground=(-1===g.fg.indexOf("#")?"#":"")+g.fg),g.theme&&b.instanceOptions.themes.hasOwnProperty(g.theme)&&(b.theme=B(b.instanceOptions.themes[g.theme],null)),g.text&&(b.text=g.text),g.textmode&&(b.textmode=g.textmode),g.size&&(b.size=g.size),g.font&&(b.font=g.font),g.align&&(b.align=g.align),b.nowrap=z.truthy(g.nowrap),b.auto=z.truthy(g.auto),z.truthy(g.random)){J.vars.cache.themeKeys=J.vars.cache.themeKeys||Object.keys(b.instanceOptions.themes);var h=J.vars.cache.themeKeys[0|Math.random()*J.vars.cache.themeKeys.length];b.theme=B(b.instanceOptions.themes[h],null)}}return b}function g(a,b){var c=!1,d=String.fromCharCode(11),e=a.replace(/([^\\])\//g,"$1"+d).split(d),f=/%[0-9a-f]{2}/gi,g=b.instanceOptions;b.holderURL=[];for(var h=e.length,i=0;h>i;i++){var j=e[i];if(j.match(f))try{j=decodeURIComponent(j)}catch(k){j=e[i]}var l=!1;if(J.flags.dimensions.match(j))c=!0,b.dimensions=J.flags.dimensions.output(j),l=!0;else if(J.flags.fluid.match(j))c=!0,b.dimensions=J.flags.fluid.output(j),b.fluid=!0,l=!0;else if(J.flags.textmode.match(j))b.textmode=J.flags.textmode.output(j),l=!0;else if(J.flags.colors.match(j)){var m=J.flags.colors.output(j);b.theme=B(b.theme,m),l=!0}else if(g.themes[j])g.themes.hasOwnProperty(j)&&(b.theme=B(g.themes[j],null)),l=!0;else if(J.flags.font.match(j))b.font=J.flags.font.output(j),l=!0;else if(J.flags.auto.match(j))b.auto=!0,l=!0;else if(J.flags.text.match(j))b.text=J.flags.text.output(j),l=!0;else if(J.flags.size.match(j))b.size=J.flags.size.output(j),l=!0;else if(J.flags.random.match(j)){null==J.vars.cache.themeKeys&&(J.vars.cache.themeKeys=Object.keys(g.themes));var n=J.vars.cache.themeKeys[0|Math.random()*J.vars.cache.themeKeys.length];b.theme=B(g.themes[n],null),l=!0}l&&b.holderURL.push(j)}return b.holderURL.unshift(g.domain),b.holderURL=b.holderURL.join("/"),c?b:!1}function h(a){var b=a.mode,c=a.el,d=a.flags,e=a.engineSettings,f=d.dimensions,g=d.theme,h=f.width+"x"+f.height;if(b=null==b?d.fluid?"fluid":"image":b,null!=d.text&&(g.text=d.text,"object"===c.nodeName.toLowerCase())){for(var j=g.text.split("\\n"),k=0;k1){var n,o=0,p=0,q=0;j=new e.Group("line"+q),("left"===a.align||"right"===a.align)&&(m=a.width*(1-2*(1-J.setup.lineWrapRatio)));for(var r=0;r=m||t===!0)&&(b(g,j,o,g.properties.leading),g.add(j),o=0,p+=g.properties.leading,q+=1,j=new e.Group("line"+q),j.y=p),t!==!0&&(i.moveTo(o,0),o+=h.spaceWidth+s.width,j.add(i))}if(b(g,j,o,g.properties.leading),g.add(j),"left"===a.align)g.moveTo(a.width-l,null,null);else if("right"===a.align){for(n in g.children)j=g.children[n],j.moveTo(a.width-j.width,null,null);g.moveTo(0-(a.width-l),null,null)}else{for(n in g.children)j=g.children[n],j.moveTo((g.width-j.width)/2,null,null);g.moveTo((a.width-g.width)/2,null,null)}g.moveTo(null,(a.height-g.height)/2,null),(a.height-g.height)/2<0&&g.moveTo(null,0,null)}else i=new e.Text(a.text),j=new e.Group("line0"),j.add(i),g.add(j),"left"===a.align?g.moveTo(a.width-l,null,null):"right"===a.align?g.moveTo(0-(a.width-l),null,null):g.moveTo((a.width-h.boundingBox.width)/2,null,null),g.moveTo(null,(a.height-h.boundingBox.height)/2,null);return d}function k(a,b,c){var d=parseInt(a,10),e=parseInt(b,10),f=Math.max(d,e),g=Math.min(d,e),h=.8*Math.min(g,f*J.defaults.scale);return Math.round(Math.max(c,h))}function l(a){var b;b=null==a||null==a.nodeType?J.vars.resizableImages:[a];for(var c=0,d=b.length;d>c;c++){var e=b[c];if(e.holderData){var f=e.holderData.flags,g=D(e);if(g){if(!e.holderData.resizeUpdate)continue;if(f.fluid&&f.auto){var h=e.holderData.fluidConfig;switch(h.mode){case"width":g.height=g.width/h.ratio;break;case"height":g.width=g.height*h.ratio}}var j={mode:"image",holderSettings:{dimensions:g,theme:f.theme,flags:f},el:e,engineSettings:e.holderData.engineSettings};"exact"==f.textmode&&(f.exactDimensions=g,j.holderSettings.dimensions=f.dimensions),i(j)}else p(e)}}}function m(a){if(a.holderData){var b=D(a);if(b){var c=a.holderData.flags,d={fluidHeight:"%"==c.dimensions.height.slice(-1),fluidWidth:"%"==c.dimensions.width.slice(-1),mode:null,initialDimensions:b};d.fluidWidth&&!d.fluidHeight?(d.mode="width",d.ratio=d.initialDimensions.width/parseFloat(c.dimensions.height)):!d.fluidWidth&&d.fluidHeight&&(d.mode="height",d.ratio=parseFloat(c.dimensions.width)/d.initialDimensions.height),a.holderData.fluidConfig=d}else p(a)}}function n(){for(var a,c=[],d=Object.keys(J.vars.invisibleImages),e=0,f=d.length;f>e;e++)a=J.vars.invisibleImages[d[e]],D(a)&&"img"==a.nodeName.toLowerCase()&&(c.push(a),delete J.vars.invisibleImages[d[e]]);c.length&&I.run({images:c}),b.requestAnimationFrame(n)}function o(){J.vars.visibilityCheckStarted||(b.requestAnimationFrame(n),J.vars.visibilityCheckStarted=!0)}function p(a){a.holderData.invisibleId||(J.vars.invisibleId+=1,J.vars.invisibleImages["i"+J.vars.invisibleId]=a,a.holderData.invisibleId=J.vars.invisibleId)}function q(a,b){return null==b?document.createElement(a):document.createElementNS(b,a)}function r(a,b){for(var c in b)a.setAttribute(c,b[c])}function s(a,b,c){var d,e;null==a?(a=q("svg",E),d=q("defs",E),e=q("style",E),r(e,{type:"text/css"}),d.appendChild(e),a.appendChild(d)):e=a.querySelector("style"),a.webkitMatchesSelector&&a.setAttribute("xmlns",E);for(var f=0;f=0;h--){var i=g.createProcessingInstruction("xml-stylesheet",'href="'+f[h]+'" rel="stylesheet"');g.insertBefore(i,g.firstChild)}g.removeChild(g.documentElement),e=d.serializeToString(g)}var j=d.serializeToString(a);return j=j.replace(/\&(\#[0-9]{2,}\;)/g,"&$1"),e+j}}function u(){return b.DOMParser?(new DOMParser).parseFromString("","application/xml"):void 0}function v(a){J.vars.debounceTimer||a.call(this),J.vars.debounceTimer&&b.clearTimeout(J.vars.debounceTimer),J.vars.debounceTimer=b.setTimeout(function(){J.vars.debounceTimer=null,a.call(this)},J.setup.debounce)}function w(){v(function(){l(null)})}var x=c(1),y=c(2),z=c(3),A=c(4),B=z.extend,C=z.getNodeArray,D=z.dimensionCheck,E="http://www.w3.org/2000/svg",F=8,G="2.7.1",H="\nCreated with Holder.js "+G+".\nLearn more at http://holderjs.com\n(c) 2012-2015 Ivan Malopinsky - http://imsky.co\n",I={version:G,addTheme:function(a,b){return null!=a&&null!=b&&(J.settings.themes[a]=b),delete J.vars.cache.themeKeys,this},addImage:function(a,b){var c=document.querySelectorAll(b);if(c.length)for(var d=0,e=c.length;e>d;d++){var f=q("img"),g={};g[J.vars.dataAttr]=a,r(f,g),c[d].appendChild(f)}return this},setResizeUpdate:function(a,b){a.holderData&&(a.holderData.resizeUpdate=!!b,a.holderData.resizeUpdate&&l(a))},run:function(a){a=a||{};var c={},f=B(J.settings,a);J.vars.preempted=!0,J.vars.dataAttr=f.dataAttr||J.vars.dataAttr,c.renderer=f.renderer?f.renderer:J.setup.renderer,-1===J.setup.renderers.join(",").indexOf(c.renderer)&&(c.renderer=J.setup.supportsSVG?"svg":J.setup.supportsCanvas?"canvas":"html");var g=C(f.images),i=C(f.bgnodes),j=C(f.stylenodes),k=C(f.objects);c.stylesheets=[],c.svgXMLStylesheet=!0,c.noFontFallback=f.noFontFallback?f.noFontFallback:!1;for(var l=0;l1){c.nodeValue="";for(var u=0;u=0?b:1)}function f(a){v?e(a):w.push(a)}null==document.readyState&&document.addEventListener&&(document.addEventListener("DOMContentLoaded",function y(){document.removeEventListener("DOMContentLoaded",y,!1),document.readyState="complete"},!1),document.readyState="loading");var g=a.document,h=g.documentElement,i="load",j=!1,k="on"+i,l="complete",m="readyState",n="attachEvent",o="detachEvent",p="addEventListener",q="DOMContentLoaded",r="onreadystatechange",s="removeEventListener",t=p in g,u=j,v=j,w=[];if(g[m]===l)e(b);else if(t)g[p](q,c,j),a[p](i,c,j);else{g[n](r,c),a[n](k,c);try{u=null==a.frameElement&&h}catch(x){}u&&u.doScroll&&!function z(){if(!v){try{u.doScroll("left")}catch(a){return e(z,50)}d(),b()}}()}return f.version="1.4.0",f.isReady=function(){return v},f}a.exports="undefined"!=typeof window&&b(window)},function(a,b,c){var d=c(5),e=function(a){function b(a,b){for(var c in b)a[c]=b[c];return a}var c=1,e=d.defclass({constructor:function(a){c++,this.parent=null,this.children={},this.id=c,this.name="n"+c,null!=a&&(this.name=a),this.x=0,this.y=0,this.z=0,this.width=0,this.height=0},resize:function(a,b){null!=a&&(this.width=a),null!=b&&(this.height=b)},moveTo:function(a,b,c){this.x=null!=a?a:this.x,this.y=null!=b?b:this.y,this.z=null!=c?c:this.z},add:function(a){var b=a.name;if(null!=this.children[b])throw"SceneGraph: child with that name already exists: "+b;this.children[b]=a,a.parent=this}}),f=d(e,function(b){this.constructor=function(){b.constructor.call(this,"root"),this.properties=a}}),g=d(e,function(a){function c(c,d){if(a.constructor.call(this,c),this.properties={fill:"#000"},null!=d)b(this.properties,d);else if(null!=c&&"string"!=typeof c)throw"SceneGraph: invalid node name"}this.Group=d.extend(this,{constructor:c,type:"group"}),this.Rect=d.extend(this,{constructor:c,type:"rect"}),this.Text=d.extend(this,{constructor:function(a){c.call(this),this.properties.text=a},type:"text"})}),h=new f;return this.Shape=g,this.root=h,this};a.exports=e},function(a,b){(function(a){b.extend=function(a,b){var c={};for(var d in a)a.hasOwnProperty(d)&&(c[d]=a[d]);if(null!=b)for(var e in b)b.hasOwnProperty(e)&&(c[e]=b[e]);return c},b.cssProps=function(a){var b=[];for(var c in a)a.hasOwnProperty(c)&&b.push(c+":"+a[c]);return b.join(";")},b.encodeHtmlEntity=function(a){for(var b=[],c=0,d=a.length-1;d>=0;d--)c=a.charCodeAt(d),b.unshift(c>128?["&#",c,";"].join(""):a[d]);return b.join("")},b.getNodeArray=function(b){var c=null;return"string"==typeof b?c=document.querySelectorAll(b):a.NodeList&&b instanceof a.NodeList?c=b:a.Node&&b instanceof a.Node?c=[b]:a.HTMLCollection&&b instanceof a.HTMLCollection?c=b:b instanceof Array?c=b:null===b&&(c=[]),c},b.imageExists=function(a,b){var c=new Image;c.onerror=function(){b.call(this,!1)},c.onload=function(){b.call(this,!0)},c.src=a},b.decodeHtmlEntity=function(a){return a.replace(/&#(\d+);/g,function(a,b){return String.fromCharCode(b)})},b.dimensionCheck=function(a){var b={height:a.clientHeight,width:a.clientWidth};return b.height&&b.width?b:!1},b.truthy=function(a){return"string"==typeof a?"true"===a||"yes"===a||"1"===a||"on"===a||"✓"===a:!!a}}).call(b,function(){return this}())},function(a,b,c){var d=encodeURIComponent,e=decodeURIComponent,f=c(6),g=c(7),h=/(\w+)\[(\d+)\]/,i=/\w+\.\w+/;b.parse=function(a){if("string"!=typeof a)return{};if(a=f(a),""===a)return{};"?"===a.charAt(0)&&(a=a.slice(1));for(var b={},c=a.split("&"),d=0;d